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("Name") ?> | |
| txt("Email") ?> | |
| txt("Address") ?> | |
| txt("Phone") ?> | |
| txt("Total guests") ?> | |
| txt("Summary") ?> |
| has_get_room_name($row2['room_id']); ?> | - | has_currency($row2['price']); $sub_total_room_price += $row2['price']; ?> |
| has_get_service_name($row2['service_id']); ?> | txt('guests'); } if ($row2['type'] == '3'){ echo $row2['night_number'] . ' ' . $txt->txt('nights'); } ?> |
| 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); ?> |