diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php index 7c9494d8b..70284fd87 100644 --- a/classes/pdf/HTMLTemplateInvoice.php +++ b/classes/pdf/HTMLTemplateInvoice.php @@ -169,7 +169,11 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate $order_detail['unit_price_tax_excl_before_specific_price'] = $order_detail['unit_price_tax_excl_including_ecotax'] + $order_detail['reduction_amount_tax_excl']; } elseif ($order_detail['reduction_percent'] > 0) { $has_discount = true; - $order_detail['unit_price_tax_excl_before_specific_price'] = (100 * $order_detail['unit_price_tax_excl_including_ecotax']) / (100 - $order_detail['reduction_percent']); + if ($order_detail['reduction_percent'] >= 100) { + $order_detail['unit_price_tax_excl_before_specific_price'] = $order_detail['original_product_price']; + } else { + $order_detail['unit_price_tax_excl_before_specific_price'] = (100 * $order_detail['unit_price_tax_excl_including_ecotax']) / (100 - $order_detail['reduction_percent']); + } } // Set tax_code diff --git a/controllers/front/GuestTrackingController.php b/controllers/front/GuestTrackingController.php index f8be455c6..cf5007d66 100644 --- a/controllers/front/GuestTrackingController.php +++ b/controllers/front/GuestTrackingController.php @@ -252,7 +252,6 @@ class GuestTrackingControllerCore extends FrontController if ($orderProducts = $order->getProducts()) { $total_convenience_fee_te = 0; $total_convenience_fee_ti = 0; - $total_tourism_tax = OrderTaxDetail::getOrderTourismTaxTotal($idOrder); $objOrderReturn = new OrderReturn(); $refundReqBookings = $objOrderReturn->getOrderRefundRequestedBookings($order->id, 0, 1); @@ -536,6 +535,7 @@ class GuestTrackingControllerCore extends FrontController // set order specific values $order->total_convenience_fee_ti = $total_convenience_fee_ti; $order->total_convenience_fee_te = $total_convenience_fee_te; + $order->total_tourism_tax = OrderTaxDetail::getOrderTourismTaxTotal($idOrder); $order->any_back_order = $anyBackOrder; $order->shw_bo_msg = Configuration::get('WK_SHOW_MSG_ON_BO'); $order->back_ord_msg = Configuration::get('WK_BO_MESSAGE'); @@ -567,7 +567,6 @@ class GuestTrackingControllerCore extends FrontController 'use_tax' => Configuration::get('PS_TAX'), 'guestInformations' => (array)$customer, 'view_on_map' => Configuration::get('WK_GOOGLE_ACTIVE_MAP'), - 'total_tourism_tax' => isset($total_tourism_tax) ? $total_tourism_tax : 0, 'show_tourism_tax_separately' => (bool) Configuration::get('QLO_TOURISM_TAX_SHOW_SEPARATE'), )); } diff --git a/install-dev/models/install.php b/install-dev/models/install.php index d9dabfca6..6f3fd3265 100644 --- a/install-dev/models/install.php +++ b/install-dev/models/install.php @@ -721,7 +721,7 @@ class InstallModelInstall extends InstallAbstractModel 'qlostatsserviceproducts', 'blockcart', 'blockuserinfo', - 'qlochannelmanagerconnector', + 'qlocmconnector', 'qlogooglehotelconnector' ); } diff --git a/modules/blockcart/blockcart.tpl b/modules/blockcart/blockcart.tpl index 347cab3f9..f2d03ddae 100644 --- a/modules/blockcart/blockcart.tpl +++ b/modules/blockcart/blockcart.tpl @@ -161,7 +161,7 @@ {/block} {block name='blockcart_shopping_cart_total_convenience_fee'} {if isset($total_convenience_fee)} -
+ @@ -343,7 +343,7 @@
--> {block name='blockcart_layer_cart_total_convenience_fee'} {if isset($total_convenience_fee)} -
+
+ {if $active_report == 'payment-method'} +
+ +
+ +
+
+ {else}
@@ -48,6 +63,7 @@ placeholder="{l s='All sources' mod='qlohotelreports'}">
+ {/if}

diff --git a/themes/hotel-reservation-theme/guest-tracking.tpl b/themes/hotel-reservation-theme/guest-tracking.tpl index 8a9dbca36..89f6a2d63 100644 --- a/themes/hotel-reservation-theme/guest-tracking.tpl +++ b/themes/hotel-reservation-theme/guest-tracking.tpl @@ -64,6 +64,7 @@ {assign var=hotel_address_info value=$order->hotel_address_info} {assign var=hotel_refund_rules value=$order->hotel_refund_rules} {assign var=property_type value=$order->property_type} + {assign var=total_tourism_tax value=$order->total_tourism_tax} {if isset($order->total_old)} {assign var=total_old value=$order->total_old} diff --git a/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl b/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl index b16637ee7..10a7a5bea 100644 --- a/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl +++ b/themes/hotel-reservation-theme/modules/blockcart/blockcart.tpl @@ -161,8 +161,8 @@ {/if} {/block} {block name='blockcart_shopping_cart_total_convenience_fee'} - {if isset($total_convenience_fee) && $total_convenience_fee} -
+ {if isset($total_convenience_fee)} + @@ -343,8 +343,8 @@
--> {block name='blockcart_layer_cart_total_convenience_fee'} - {if isset($total_convenience_fee) && $total_convenience_fee} -
+ {if isset($total_convenience_fee)} +