plugin_path . 'includes/models/methods-api.php'; $method = new Methods(); include $controller->plugin_path . 'includes/translations/translations.php'; $txt = new Translation; $booking_id = sanitize_text_field($_POST['param1']); $sub_total_room_price = 0; $sub_total_service_price = 0; $vat_percentage = $method->has_get_settings('vat_percentage'); global $wpdb; $booking = $wpdb->prefix . 'hotel_has_booking'; $query_result = $wpdb->get_results("SELECT * FROM `$booking` WHERE `booking_id` = $booking_id ", ARRAY_A); foreach ($query_result as $row): ?>

txt($txt->txt("Details")) ?>


txt("Created by") . ' ' ?>
txt("Guest detail") ?>
txt("Name") ?>
txt("Email") ?>
txt("Address") ?>
txt("Phone") ?>
txt("Total guests") ?>
txt("Summary") ?>
txt("Room allocation") ?>
has_get_booking_allocated_rooms($booking_id); foreach ($allocated_rooms as $row2): ?>
has_get_room_name($row2['room_id']); ?> - has_currency($row2['price']); $sub_total_room_price += $row2['price']; ?>

txt("Services selected") ?>
has_get_booking_attached_services($booking_id); foreach ($booking_services as $row2): if ($row2['type'] == '1'){ $sub_total_service_price += $row2['price']; } if ($row2['type'] == '2'){ $sub_total_service_price += ($row2['price']*$row2['guest_number']); } if ($row2['type'] == '3'){ $sub_total_service_price += ($row2['price']*$row2['night_number']); } ?>
has_get_service_name($row2['service_id']); ?> txt('guests'); } if ($row2['type'] == '3'){ echo $row2['night_number'] . ' ' . $txt->txt('nights'); } ?>
txt("Invoice") ?>
has_get_booking_payments($booking_id); foreach ($payments as $row2): $total_paid_amount += $row2['amount']; endforeach; ?>
txt("Room Pricing") ?> has_currency($sub_total_room_price); ?>
txt("Service Pricing") ?> has_currency($sub_total_service_price); ?>
txt("V.A.T") ?> (%) has_currency($vat_amount); ?>
txt("Total payable") ?> has_currency($grand_total); ?>
txt("Paid") ?> has_currency($total_paid_amount); ?>
txt("Due") ?> has_currency($grand_total - $total_paid_amount); ?>