diff --git a/classes/PaymentModule.php b/classes/PaymentModule.php index 9c2cfb082..924a08d27 100644 --- a/classes/PaymentModule.php +++ b/classes/PaymentModule.php @@ -1090,16 +1090,18 @@ abstract class PaymentModuleCore extends Module $additional_service_price_tax_incl = ($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 0) + $cart_booking_data['total_extra_demands_ti']); $additional_service_tax = ($additional_service_price_tax_incl - $additional_service_price_tax_excl); - // convenience fee price $total_convenience_fee_ti = $order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT); $total_convenience_fee_te = $order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT); + $total_convenience_fee_tax = $total_convenience_fee_ti - $total_convenience_fee_te; // service products // $service_products_price_tax_excl = $order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE); // $service_products_price_tax_incl = $order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE); // $service_products_tax = ($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE) - $order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)); + $total_order_tax = $room_tax + $additional_service_tax + $total_convenience_fee_tax; + $data = array( '{cart_booking_data_html}' => $cart_booking_data_html, '{cart_booking_data_text}' => $cart_booking_data_text, @@ -1155,6 +1157,7 @@ abstract class PaymentModuleCore extends Module '{total_wrapping}' => Tools::displayPrice($order->total_wrapping, $this->context->currency, false), // '{total_tax_paid}' => Tools::displayPrice(($order->total_products_wt - $order->total_products) + ($order->total_shipping_tax_incl - $order->total_shipping_tax_excl), $this->context->currency, false), '{total_tax_paid}' => Tools::displayPrice(($order->total_paid_tax_incl - $order->total_paid_tax_excl), $this->context->currency, false), + '{total_order_tax}' => Tools::displayPrice(($total_order_tax), $this->context->currency, false), // additional data '{room_price_tax_excl}' => Tools::displayPrice($room_price_tax_excl, $this->context->currency, false), '{room_price_tax_incl}' => Tools::displayPrice($room_price_tax_incl, $this->context->currency, false), diff --git a/classes/pdf/HTMLTemplateInvoice.php b/classes/pdf/HTMLTemplateInvoice.php index 75d696ffd..c806dac74 100644 --- a/classes/pdf/HTMLTemplateInvoice.php +++ b/classes/pdf/HTMLTemplateInvoice.php @@ -570,7 +570,14 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate $footer['total_convenience_fee_te'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT, $idsOrderDetail); $footer['total_convenience_fee_ti'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT, $idsOrderDetail); } + $footer['total_paid_real'] = $this->order_invoice->getTotalPaid(); + $footer['total_tax_excl_without_discount'] = $footer['room_price_tax_excl'] + $footer['total_convenience_fee_te'] + $footer['additional_service_price_tax_excl']; + $footer['total_tax_incl_without_discount'] = $footer['room_price_tax_incl'] + $footer['total_convenience_fee_ti'] + $footer['additional_service_price_tax_incl']; + $footer['total_tax_without_discount'] = $footer['total_tax_incl_without_discount'] - $footer['total_tax_excl_without_discount']; + if ($footer['total_tax_without_discount'] < 0) { + $footer['total_tax_without_discount'] = 0; + } $data = array( 'cart_htl_data' => $cart_htl_data, @@ -592,6 +599,9 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate 'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_, 'round_type' => $round_type, 'legal_free_text' => $legal_free_text, + 'total_tax_excl_without_discount' => $total_tax_excl_without_discount, + 'total_tax_incl_without_discount' => $total_tax_incl_without_discount, + 'total_tax_without_discount' => $total_tax_without_discount ); if (Tools::getValue('debug')) { diff --git a/mails/en/order_conf.html b/mails/en/order_conf.html index c5990d109..d15f92248 100755 --- a/mails/en/order_conf.html +++ b/mails/en/order_conf.html @@ -197,35 +197,6 @@ - - - - - - - - - -
  - - Discounts - -  
- - - - - - - - -
  - - {total_discounts} - -  
- - @@ -274,7 +245,35 @@ + + +
  - {total_tax_paid} + {total_order_tax} + +  
+ + + + + + + + + + +
  + + Discounts + +  
+ + + + + + diff --git a/mails/en/order_conf.txt b/mails/en/order_conf.txt index 2f6384972..643cf195d 100644 --- a/mails/en/order_conf.txt +++ b/mails/en/order_conf.txt @@ -25,15 +25,15 @@ Total Rooms Cost Total Extra Services Cost {total_extra_demands_te} -Discounts -{total_discounts} - Total Rooms Tax {total_tax_paid} Extra Services Tax {extra_demands_tax} +Discounts +{total_discounts} + Final Booking Amount {total_paid} diff --git a/mails/en/order_conf_admin.html b/mails/en/order_conf_admin.html index c6e2a41a1..599c0dd70 100755 --- a/mails/en/order_conf_admin.html +++ b/mails/en/order_conf_admin.html @@ -210,34 +210,6 @@
  + + {total_discounts}  
- - - - - - - - -
  - - Discounts - -  
- - - - - - - - -
  - - {total_discounts} - -  
- - @@ -286,7 +258,35 @@ + + +
  - {total_tax_paid} + {total_order_tax} + +  
+ + + + + + + + + + +
  + + Discounts + +  
+ + + + + + diff --git a/mails/en/order_conf_admin.txt b/mails/en/order_conf_admin.txt index 3ba3031df..3156e658c 100644 --- a/mails/en/order_conf_admin.txt +++ b/mails/en/order_conf_admin.txt @@ -32,8 +32,6 @@ Total Rooms Cost Total Extra Services Cost {total_extra_demands_te} -Discounts -{total_discounts} Total Rooms Tax {total_tax_paid} @@ -41,6 +39,9 @@ Total Rooms Tax Extra Services Tax {extra_demands_tax} +Discounts +{total_discounts} + Final Booking Amount {total_paid} diff --git a/mails/en/overbooking.html b/mails/en/overbooking.html index 95631ee77..14174a248 100755 --- a/mails/en/overbooking.html +++ b/mails/en/overbooking.html @@ -199,34 +199,6 @@ - - - - + + + + - - - - + + + +
  + + {total_discounts}  
- - - - - - -
  - - Discounts - -  
-
- - - - - - -
  - - {total_discounts} - -  
-
@@ -275,7 +247,35 @@ + + +
  - {total_tax_paid} + {total_order_tax} + +  
+
+ + + + + + +
  + + Discounts + +  
+
+ + + + diff --git a/mails/en/overbooking.txt b/mails/en/overbooking.txt index 6a8f8975a..fa07d8743 100644 --- a/mails/en/overbooking.txt +++ b/mails/en/overbooking.txt @@ -23,14 +23,14 @@ Total {extra_demands_details_text} -{discounts} - Total Rooms Cost {total_products} Total Extra Services Cost {total_extra_demands_te} +{discounts} + Discounts {total_discounts} diff --git a/mails/en/overbooking_admin.html b/mails/en/overbooking_admin.html index 505142081..3cc40689d 100755 --- a/mails/en/overbooking_admin.html +++ b/mails/en/overbooking_admin.html @@ -215,34 +215,6 @@
  + + {total_discounts}  
- - - - - - -
  - - Discounts - -  
-
- - - - - - -
  - - {total_discounts} - -  
-
@@ -291,7 +263,35 @@ + + +
  - {total_tax_paid} + {total_order_tax} + +  
+
+ + + + + + +
  + + Discounts + +  
+
+ + + +
  + + {total_discounts}