From 9323f3b8ce845c231c3d396ee18bb1f1a0cbc9b4 Mon Sep 17 00:00:00 2001 From: Sumit Panwar Date: Sat, 22 Mar 2025 18:17:50 +0530 Subject: [PATCH] Testing issues resolve and flow testing --- .../controllers/normal_products/options.tpl | 121 ++ .../orders/_current_cart_details_data.tpl | 37 - .../orders/_hotel_service_products_table.tpl | 236 +-- .../_standalone_service_products_table.tpl | 234 +-- .../template/controllers/orders/form.tpl | 1 - .../controllers/orders/helpers/view/view.tpl | 9 +- .../orders/modals/_add_product.tpl | 2 +- .../orders/modals/_cancel_room_bookings.tpl | 38 +- .../orders/modals/_edit_product.tpl | 40 +- ..._services_service_products_tab_content.tpl | 11 +- cache/smarty/cache/index.php | 4 +- cache/smarty/compile/index.php | 4 +- classes/Cart.php | 91 +- classes/PaymentModule.php | 236 ++- classes/Product.php | 13 +- classes/order/Order.php | 53 +- classes/order/OrderHistory.php | 29 +- classes/order/OrderInvoice.php | 2 +- classes/order/OrderReturn.php | 89 +- classes/order/OrderReturnDetail.php | 4 +- classes/order/OrderSlip.php | 17 +- classes/pdf/HTMLTemplateInvoice.php | 36 +- classes/pdf/HTMLTemplateOrderSlip.php | 2 +- .../WebserviceSpecificManagementBookings.php | 362 ++-- controllers/admin/AdminCartsController.php | 23 +- controllers/admin/AdminImportController.php | 10 +- .../admin/AdminNormalProductsController.php | 91 +- controllers/admin/AdminOrdersController.php | 1593 +++++++++-------- controllers/admin/AdminStatsController.php | 246 ++- controllers/front/CartController.php | 39 +- controllers/front/GuestTrackingController.php | 20 +- .../front/OrderConfirmationController.php | 39 +- controllers/front/OrderDetailController.php | 82 +- controllers/front/OrderOpcController.php | 6 +- controllers/front/ParentOrderController.php | 10 +- controllers/front/ProductController.php | 9 +- install/data/db_structure.sql | 10 +- js/admin/orders.js | 556 +----- mails/en/awaiting_payment.html | 2 +- mails/en/booking_extra_demands.tpl | 281 +-- .../bookings_refund_request_detail_admin.tpl | 60 + ...ookings_refund_request_detail_customer.tpl | 60 + mails/en/hotel-booking-cart-data.tpl | 214 +-- mails/en/order-conf-total-info-text.tpl | 22 + mails/en/order-conf-total-info.tpl | 82 + mails/en/order_canceled.html | 14 +- mails/en/order_conf.html | 209 +-- mails/en/order_conf.txt | 27 +- mails/en/order_conf_admin.html | 225 +-- mails/en/order_conf_admin.txt | 28 +- mails/en/order_conf_product_list.tpl | 248 +-- mails/en/order_header_line.tpl | 21 + mails/en/order_hotel_detail.tpl | 13 + mails/en/order_refund_completed_admin.html | 22 +- mails/en/order_refund_completed_customer.html | 22 +- mails/en/order_refund_denied_admin.html | 22 +- mails/en/order_refund_denied_customer.html | 22 +- mails/en/order_refund_pending_admin.html | 22 +- mails/en/order_refund_pending_customer.html | 22 +- mails/en/overbooking.html | 204 +-- mails/en/overbooking.txt | 28 +- mails/en/overbooking_admin.html | 217 +-- mails/en/overbooking_admin.txt | 30 +- mails/en/partial_payment_accepted.html | 2 +- mails/en/payment_accepted.html | 2 +- mails/en/refund_request_detail_admin.tpl | 63 - mails/en/refund_request_detail_customer.tpl | 63 - mails/en/service-product-data.tpl | 159 +- ...service_products_refund_request_detail.tpl | 60 + .../bankwire/controllers/front/payment.php | 2 +- .../bankwire/controllers/front/validation.php | 2 +- modules/bankwire/translations/fr.php | 59 +- modules/blockcart/blockcart.php | 17 +- modules/blocksocial/translations/fr.php | 42 +- modules/blockuserinfo/translations/fr.php | 35 +- modules/cheque/controllers/front/payment.php | 2 +- .../cheque/controllers/front/validation.php | 2 +- modules/cheque/translations/fr.php | 51 +- modules/dashguestcycle/translations/fr.php | 29 +- modules/dashperformance/translations/fr.php | 27 +- .../classes/HotelBookingDemands.php | 2 +- .../classes/HotelBookingDetail.php | 80 +- .../classes/HotelCartBookingData.php | 111 +- .../classes/HotelOrderRefundRules.php | 18 +- .../classes/HotelReservationSystemDb.php | 13 +- .../classes/HotelRoomTypeFeaturePricing.php | 4 +- .../classes/RoomTypeServiceProduct.php | 31 +- .../RoomTypeServiceProductCartDetail.php | 884 --------- .../classes/RoomTypeServiceProductPrice.php | 59 - .../classes/ServiceProductCartDetail.php | 556 ++++++ .../classes/ServiceProductOption.php | 19 +- ...tail.php => ServiceProductOrderDetail.php} | 154 +- .../AdminHotelRoomsBookingController.php | 24 +- .../AdminOrderRefundRequestsController.php | 31 +- modules/hotelreservationsystem/define.php | 4 +- .../hotelreservationsystem.php | 8 +- .../upgrade/upgrade-1.5.0.php | 22 +- .../helpers/view/_partials/booking-cart.tpl | 6 +- modules/qlocleaner/qlocleaner.php | 5 +- modules/qlohotelreview/translations/fr.php | 104 +- .../qlostatsserviceproducts.php | 94 +- .../statsbestcategories.php | 84 +- .../statsbestcustomers/statsbestcustomers.php | 39 +- modules/statscheckup/statscheckup.php | 46 +- modules/statsforecast/statsforecast.php | 146 +- modules/statssales/statssales.php | 102 +- pdf/invoice.extra-demands-tab.tpl | 171 +- pdf/invoice.product-tab.tpl | 3 + pdf/invoice.service-product-tab.tpl | 27 +- pdf/invoice.tax-tab.tpl | 3 + pdf/invoice.total-tab.tpl | 20 +- pdf/invoice.tpl | 6 - pdf/order-slip.product-tab.tpl | 194 +- pdf/order-slip.total-tab.tpl | 6 +- .../_partials/booking-form.tpl | 5 +- .../_partials/order-hotel-service-detail.tpl | 1 - .../order-standalone-service-detail.tpl | 13 + .../css/order-detail.css | 42 +- .../js/modules/blockcart/ajax-cart.js | 116 +- .../js/order-detail.js | 3 + .../modules/blockcart/blockcart.tpl | 9 +- .../order-confirmation.tpl | 4 +- .../hotel-reservation-theme/order-detail.tpl | 230 +-- themes/hotel-reservation-theme/order-opc.tpl | 2 +- 124 files changed, 4959 insertions(+), 5681 deletions(-) create mode 100644 admin/themes/default/template/controllers/normal_products/options.tpl create mode 100644 mails/en/bookings_refund_request_detail_admin.tpl create mode 100644 mails/en/bookings_refund_request_detail_customer.tpl create mode 100644 mails/en/order-conf-total-info-text.tpl create mode 100644 mails/en/order-conf-total-info.tpl create mode 100644 mails/en/order_header_line.tpl create mode 100644 mails/en/order_hotel_detail.tpl delete mode 100644 mails/en/refund_request_detail_admin.tpl delete mode 100644 mails/en/refund_request_detail_customer.tpl create mode 100644 mails/en/service_products_refund_request_detail.tpl delete mode 100644 modules/hotelreservationsystem/classes/RoomTypeServiceProductCartDetail.php create mode 100644 modules/hotelreservationsystem/classes/ServiceProductCartDetail.php rename modules/hotelreservationsystem/classes/{RoomTypeServiceProductOrderDetail.php => ServiceProductOrderDetail.php} (84%) diff --git a/admin/themes/default/template/controllers/normal_products/options.tpl b/admin/themes/default/template/controllers/normal_products/options.tpl new file mode 100644 index 000000000..3a866309e --- /dev/null +++ b/admin/themes/default/template/controllers/normal_products/options.tpl @@ -0,0 +1,121 @@ +{* +* NOTICE OF LICENSE +* +* This source file is subject to the Open Software License version 3.0 +* that is bundled with this package in the file LICENSE.md +* It is also available through the world-wide-web at this URL: +* https://opensource.org/license/osl-3-0-php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to support@qloapps.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade this module to a newer +* versions in the future. If you wish to customize this module for your needs +* please refer to https://store.webkul.com/customisation-guidelines for more information. +* +* @author Webkul IN +* @copyright Since 2010 Webkul +* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0 +*} + +
+ +

{l s='Options'}

+ +
+ + + + + + + + {if $serviceProductOptions} + {foreach $serviceProductOptions as $productOption} + + + + + + {/foreach} + {/if} + + + + + + + + + + + +
{l s='Name'}{l s='Price Impact'}{l s='Action'}
+ + +
+ {$currency->prefix}{$currency->suffix} + + +
+
+ +
+ + +
+ {$currency->prefix}{$currency->suffix} + + +
+
+
+ + +
+ {$currency->prefix}{$currency->suffix} + +
+
+
+
+ + +
+ + + \ No newline at end of file diff --git a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl index aacfd3228..730f0016f 100644 --- a/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl +++ b/admin/themes/default/template/controllers/orders/_current_cart_details_data.tpl @@ -154,43 +154,6 @@ {/foreach} {/if} - {if isset($cart_hotel_product_data) && $cart_hotel_product_data} - - - {l s='Image'} - {l s='Name'} - {l s='Hotel Name'} - {l s='Unit Price (tax excl)'} - {l s='Quantity'} - {l s='Total Price (Tax incl.)'} - - - - - {foreach $cart_hotel_product_data as $product} - - -

{$product['name']|escape:'html':'UTF-8'}{if $product.option_name} : {$product.option_name|escape:'html':'UTF-8'}{/if}

- {$product['hotel_name']} - {displayPrice price=$product['unit_price_tax_excl']} - - {if $product.allow_multiple_quantity} - 0}max="{$product.max_quantity}"{/if}> - - {else} - -- - {/if} - - {displayPrice price=$product['total_price_tax_incl']} - - - - - {/foreach} - - {/if} diff --git a/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl b/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl index cb97956ba..c5538a56d 100644 --- a/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl +++ b/admin/themes/default/template/controllers/orders/_hotel_service_products_table.tpl @@ -19,134 +19,144 @@
- +
- - - - - - + + + + + + {if isset($refundReqProducts) && $refundReqProducts} - - + + {/if} - {if ($can_edit && !$order->hasBeenDelivered())} - + {if $can_edit} + {/if} - {if $hotel_service_products} - {foreach from=$hotel_service_products item=product} - {* Include product line partial *} - {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} - {assign var=product_price value=($product['unit_price_tax_excl'])} - {else} - {assign var=product_price value=$product['unit_price_tax_incl']} - {/if} - - - - - - - - {if (isset($refundReqProducts) && $refundReqProducts)} - + + + + + + + {if (isset($refundReqProducts) && $refundReqProducts)} + - - {/if} - {if ($can_edit && !$order->hasBeenDelivered())} - + {/if} - - + + + {/if} + + {/foreach} + {else} + + {assign var=colspan value=6} + {if isset($refundReqProducts) && $refundReqProducts} + {assign var=colspan value=($colspan+2)} {/if} + {if ($can_edit)} + {assign var=colspan value=($colspan+1)} + {/if} + - {/foreach} - {else} - - - - {/if} - {* Include product line partial *} - {* {include file='controllers/orders/_new_service_product.tpl'} *} + {/if}
{l s='Image'}{l s='Name'}{l s='Quantity'}{l s='Price (Tax excl.)'}{l s='Total Tax'}{l s='Total Price (Tax incl.)'}{l s='Image'}{l s='Name'}{l s='Quantity'}{l s='Price (Tax excl.)'}{l s='Total Tax'}{l s='Total Price (Tax incl.)'}{l s='Refund State'}{l s='Refunded amount'}{l s='Refund State'}{l s='Refunded amount'}{l s='Edit Order'}{l s='Actions'}
- {if isset($product.image) && $product.image->id}{$product.image_tag}{/if} - - - {$product['name']}{if isset($product['option_name']) && $product['option_name']} : {$product['option_name']}{/if}
-
-
- {(int)$product['quantity']} - -

{displayPrice price=$product.total_price_tax_excl currency=$currency->id}

-

{l s='Unit price'} : {displayPrice price=$product.unit_price_tax_excl currency=$currency->id}

-
- {displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id} - - {displayPrice price=$product.total_price_tax_incl currency=$currency->id} - - {if $product.id_room_type_service_product_order_detail|in_array:$refundReqProducts} - {if $product.is_cancelled} - {l s='Cancelled'} - {elseif isset($product.refund_info) && (!$product.refund_info.refunded || $product.refund_info.id_customization)} - {$product.refund_info.name|escape:'html':'UTF-8'} + {if $hotel_service_products} + {foreach from=$hotel_service_products item=product} + {* Include product line partial *} + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {assign var=product_price value=($product['unit_price_tax_excl'])} + {else} + {assign var=product_price value=$product['unit_price_tax_incl']} + {/if} +
+ {if isset($product.image) && $product.image->id}{$product.image_tag}{/if} + + + {$product['name']}{if isset($product['option_name']) && $product['option_name']} : {$product['option_name']}{/if}
+
+
+ {(int)$product['quantity']} + +

{displayPrice price=$product.total_price_tax_excl currency=$currency->id}

+

{l s='Unit price'} : {displayPrice price=$product.unit_price_tax_excl currency=$currency->id}

+
+ {displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id} + + {displayPrice price=$product.total_price_tax_incl currency=$currency->id} + + {if $product.id_service_product_order_detail|in_array:$refundReqProducts} + {if $product.is_cancelled} + {l s='Cancelled'} + {elseif isset($product.refund_info) && (!$product.refund_info.refunded || $product.refund_info.id_customization)} + {$product.refund_info.name|escape:'html':'UTF-8'} + {else} + -- + {/if} {else} -- {/if} - {else} - -- - {/if} - - {if $product.is_refunded && isset($product.refund_info) && $product.refund_info} - {convertPriceWithCurrency price=$product.refund_info.refunded_amount currency=$currency->id} - {else} - -- - {/if} - + {if $product.is_refunded && isset($product.refund_info) && $product.refund_info} + {convertPriceWithCurrency price=$product.refund_info.refunded_amount currency=$currency->id} + {else} + -- + {/if} + - {* edit/delete controls *} -
- {*
+ {* edit/delete controls *} +
+ {* *} + + + +
+ {* Update controls *} + {* + *} - - - - - {* Update controls *} - {* - *} -
+
+ + {l s='No products added yet'} +
+
{l s='No Data Found.'}
diff --git a/admin/themes/default/template/controllers/orders/_standalone_service_products_table.tpl b/admin/themes/default/template/controllers/orders/_standalone_service_products_table.tpl index 1382e4404..4c23230e7 100644 --- a/admin/themes/default/template/controllers/orders/_standalone_service_products_table.tpl +++ b/admin/themes/default/template/controllers/orders/_standalone_service_products_table.tpl @@ -22,131 +22,141 @@ - - - - - - + + + + + + {if isset($refundReqProducts) && $refundReqProducts} - - + + {/if} - {if ($can_edit && !$order->hasBeenDelivered())} - + {if ($can_edit)} + {/if} - {if $standalone_service_products} - {foreach from=$standalone_service_products item=product} - {* Include product line partial *} - {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} - {assign var=product_price value=($product['unit_price_tax_excl'])} - {else} - {assign var=product_price value=$product['unit_price_tax_incl']} - {/if} - - - - - - - - {if (isset($refundReqProducts) && $refundReqProducts)} - + + + + + + + {if (isset($refundReqProducts) && $refundReqProducts)} + - - {/if} - {if ($can_edit && !$order->hasBeenDelivered())} - + {/if} - - + + + {/if} + + {/foreach} + {else} + + {assign var=colspan value=6} + {if isset($refundReqProducts) && $refundReqProducts} + {assign var=colspan value=($colspan+2)} {/if} + {if ($can_edit)} + {assign var=colspan value=($colspan+1)} + {/if} + - {/foreach} - {else} - - - - {/if} - {* Include product line partial *} - {* {include file='controllers/orders/_new_service_product.tpl'} *} + {/if}
{l s='Image'}{l s='Name'}{l s='Quantity'}{l s='Price (Tax excl.)'}{l s='Total Tax'}{l s='Total Price (Tax incl.)'}{l s='Image'}{l s='Name'}{l s='Quantity'}{l s='Price (Tax excl.)'}{l s='Total Tax'}{l s='Total Price (Tax incl.)'}{l s='Refund State'}{l s='Refunded amount'}{l s='Refund State'}{l s='Refunded amount'}{l s='Edit Order'}{l s='Actions'}
- {if isset($product.image) && $product.image->id}{$product.image_tag}{/if} - - - {$product['name']}{if $product['option_name']} : {$product['option_name']}{/if}
-
-
- {(int)$product['quantity']} - -

{displayPrice price=$product.total_price_tax_excl currency=$currency->id}

-

{l s='Unit price'} : {displayPrice price=$product.unit_price_tax_excl currency=$currency->id}

-
- {displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id} - - {displayPrice price=$product.total_price_tax_incl currency=$currency->id} - - {if $product.id_room_type_service_product_order_detail|in_array:$refundReqProducts} - {if $product.is_cancelled} - {l s='Cancelled'} - {elseif isset($product.refund_info) && (!$product.refund_info.refunded || $product.refund_info.id_customization)} - {$product.refund_info.name|escape:'html':'UTF-8'} + {if $standalone_service_products} + {foreach from=$standalone_service_products item=product} + {* Include product line partial *} + {if ($order->getTaxCalculationMethod() == $smarty.const.PS_TAX_EXC)} + {assign var=product_price value=($product['unit_price_tax_excl'])} + {else} + {assign var=product_price value=$product['unit_price_tax_incl']} + {/if} +
+ {if isset($product.image) && $product.image->id}{$product.image_tag}{/if} + + + {$product['name']}{if $product['option_name']} : {$product['option_name']}{/if}
+
+
+ {(int)$product['quantity']} + +

{displayPrice price=$product.total_price_tax_excl currency=$currency->id}

+

{l s='Unit price'} : {displayPrice price=$product.unit_price_tax_excl currency=$currency->id}

+
+ {displayPrice price=($product.total_price_tax_incl - $product.total_price_tax_excl) currency=$currency->id} + + {displayPrice price=$product.total_price_tax_incl currency=$currency->id} + + {if $product.id_service_product_order_detail|in_array:$refundReqProducts} + {if $product.is_cancelled} + {l s='Cancelled'} + {elseif isset($product.refund_info) && (!$product.refund_info.refunded || $product.refund_info.id_customization)} + {$product.refund_info.name|escape:'html':'UTF-8'} + {else} + -- + {/if} {else} -- {/if} - {else} - -- - {/if} - - {if $product.is_refunded && isset($product.refund_info) && $product.refund_info} - {convertPriceWithCurrency price=$product.refund_info.refunded_amount currency=$currency->id} - {else} - -- - {/if} - + {if $product.is_refunded && isset($product.refund_info) && $product.refund_info} + {convertPriceWithCurrency price=$product.refund_info.refunded_amount currency=$currency->id} + {else} + -- + {/if} + - {* edit/delete controls *} -
- {*
+ {* edit/delete controls *} +
+ {* *} + + + +
+ {* Update controls *} + {* + *} - - - - - {* Update controls *} - {* - *} -
+
+ + {l s='No products added yet'} +
+
{l s='No Data Found.'}
diff --git a/admin/themes/default/template/controllers/orders/form.tpl b/admin/themes/default/template/controllers/orders/form.tpl index e3252bf82..c225814ca 100644 --- a/admin/themes/default/template/controllers/orders/form.tpl +++ b/admin/themes/default/template/controllers/orders/form.tpl @@ -293,7 +293,6 @@ var params = { id_product: parseInt($(cart_row).attr('data-id-product')), - id_hotel_service_product_cart_detail: parseInt($(cart_row).attr('data-id_hotel_service_product_cart_detail')), qty: qty_to_update, opt: opt, id_cart: id_cart diff --git a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl index 4bbe013c4..c8cd16e24 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -843,9 +843,10 @@ {/if} +
-  {l s='Product Detail'} {$hotel_service_products|count} +  {l s='Products Detail'} {$hotel_service_products|count} {if $can_edit && (!$order->hasBeenDelivered() && $currentState->id != Configuration::get('PS_OS_REFUND') && $currentState->id != Configuration::get('PS_OS_CANCELED'))}
-
+
diff --git a/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl b/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl index 5f67497f0..00413ed13 100644 --- a/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_cancel_room_bookings.tpl @@ -19,11 +19,23 @@