Merge pull request #1234 from vishal-singh-webkul/gli-2308

Fixed: The price breakdown was incorrect with tax when a voucher was applied to an order, affecting invoices, emails, front-office, and back-office displays.
This commit is contained in:
Rohit Jain
2024-10-07 16:09:53 +05:30
committed by GitHub
17 changed files with 235 additions and 228 deletions

View File

@@ -387,7 +387,6 @@
let haserror = false
if ($(this).hasClass('num_children')) {
max_child_in_room = $(this).closest(".booking_occupancy_wrapper").find('.max_children').val();
console.log(no_children_allowed_txt);
if (elementVal > max_child_in_room) {
$(this).val(max_child_in_room);
if (elementVal == 1) {
@@ -705,12 +704,12 @@
}
function updateCartSummaryData(jsonSummary) {
$('#total_rooms').html(formatCurrency(parseFloat(jsonSummary.summary.total_rooms + jsonSummary.summary.total_extra_demands + jsonSummary.summary.total_additional_services + jsonSummary.summary.total_additional_services_auto_add), currency_format, currency_sign, currency_blank));
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc), currency_format, currency_sign, currency_blank));
$('#total_rooms').html(formatCurrency(parseFloat(jsonSummary.summary.total_rooms_with_services_without_discount_te), currency_format, currency_sign, currency_blank));
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts), currency_format, currency_sign, currency_blank));
$('#total_convenience_fees').html(formatCurrency(parseFloat(jsonSummary.summary.convenience_fee), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax - jsonSummary.summary.convenience_fee), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.cart_total_without_discount_te), currency_format, currency_sign, currency_blank));
// $('#total_service_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_service_products), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount), currency_format, currency_sign, currency_blank));
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
$('#payment_amount').val(jsonSummary.summary.total_price);
@@ -1211,11 +1210,11 @@
shipping_price_selected_carrier = jsonSummary.summary.total_shipping;
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts_tax_exc), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price_without_tax - jsonSummary.summary.convenience_fee), currency_format, currency_sign, currency_blank));
$('#total_vouchers').html(formatCurrency(parseFloat(jsonSummary.summary.total_discounts), currency_format, currency_sign, currency_blank));
$('#total_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_tax_without_discount), currency_format, currency_sign, currency_blank));
$('#total_without_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.cart_total_without_discount_te), currency_format, currency_sign, currency_blank));
$('#total_with_taxes').html(formatCurrency(parseFloat(jsonSummary.summary.total_price), currency_format, currency_sign, currency_blank));
$('#total_rooms').html(formatCurrency(parseFloat(jsonSummary.summary.total_rooms + jsonSummary.summary.total_extra_demands + jsonSummary.summary.total_additional_services + jsonSummary.summary.total_additional_services_auto_add), currency_format, currency_sign, currency_blank));
$('#total_rooms').html(formatCurrency(parseFloat(jsonSummary.summary.total_rooms_with_services_without_discount_te), currency_format, currency_sign, currency_blank));
$('#total_convenience_fees').html(formatCurrency(parseFloat(jsonSummary.summary.convenience_fee), currency_format, currency_sign, currency_blank));
// $('#total_service_products').html(formatCurrency(parseFloat(jsonSummary.summary.total_service_products), currency_format, currency_sign, currency_blank));
@@ -2130,30 +2129,30 @@
<span id="total_service_products" class="size_l text-success"></span>
</div>
</div> *}
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Convenience fees (Tax excl.)'}</span><br/>
<span id="total_convenience_fees" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total (Tax excl.)'}</span><br/>
<span id="total_without_taxes" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total taxes'}</span><br/>
<span id="total_taxes" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total vouchers (Tax excl.)'}</span><br/>
<span>{l s='Total vouchers'}</span><br/>
<span id="total_vouchers" class="size_l text-danger"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total (Tax excl.)'}</span><br/>
<span id="total_without_taxes" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Convenience fees (Tax excl.)'}</span><br/>
<span id="total_convenience_fees" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus">
<span>{l s='Total taxes'}</span><br/>
<span id="total_taxes" class="size_l"></span>
</div>
</div>
<div class="col-lg-2">
<div class="data-focus data-focus-primary">
<span>{l s='Total (Tax incl.)'}</span><br/>

View File

@@ -3772,6 +3772,15 @@ class CartCore extends ObjectModel
}
$objHotelAdvancedPayment = new HotelAdvancedPayment();
$total_rooms_with_services_without_discount_te = $total_rooms + $total_demands + $total_additional_services + $total_additional_services_auto_add;
$total_rooms_with_services_without_discount_ti = $total_rooms_wt + $total_demands_wt + $total_additional_services_wt + $total_additional_services_auto_add_wt;
$cart_total_without_discount_te = $total_rooms_with_services_without_discount_te + $convenience_fee;
$cart_total_without_discount_ti = $total_rooms_with_services_without_discount_ti + $convenience_fee_wt;
$total_tax_without_discount = $cart_total_without_discount_ti - $cart_total_without_discount_te;
if ($total_tax_without_discount < 0) {
$total_tax_without_discount = 0;
}
$summary = array(
'delivery' => $delivery,
@@ -3814,6 +3823,11 @@ class CartCore extends ObjectModel
'is_multi_address_delivery' => $this->isMultiAddressDelivery() || ((int)Tools::getValue('multi-shipping') == 1),
'free_ship' =>!$total_shipping && !count($this->getDeliveryAddressesWithoutCarriers(true, $errors)),
'carrier' => new Carrier($this->id_carrier, $id_lang),
'total_rooms_with_services_without_discount_te' => $total_rooms_with_services_without_discount_te,
'total_rooms_with_services_without_discount_ti' => $total_rooms_with_services_without_discount_ti,
'cart_total_without_discount_te' => $cart_total_without_discount_te,
'cart_total_without_discount_ti' => $cart_total_without_discount_ti,
'total_tax_without_discount' => $total_tax_without_discount
);
$hook = Hook::exec('actionCartSummary', $summary, null, true);

View File

@@ -1090,15 +1090,16 @@ 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;
$idOrderHotel = HotelBookingDetail::getIdHotelByIdOrder($order->id);
$objHotelBranchInfo = new HotelBranchInformation($idOrderHotel, $order->id_lang);
@@ -1153,11 +1154,12 @@ abstract class PaymentModuleCore extends Module
'{discounts_txt}' => $cart_rules_list_txt,
'{total_paid}' => Tools::displayPrice($order->total_paid, $this->context->currency, false),
'{total_products}' => Tools::displayPrice(Product::getTaxCalculationMethod() == PS_TAX_EXC ? $order->total_products : $order->total_products_wt, $this->context->currency, false),
'{total_discounts}' => Tools::displayPrice($order->total_discounts, $this->context->currency, false),
'{total_discounts}' => Tools::displayPrice(-$order->total_discounts, $this->context->currency, false),
'{total_shipping}' => Tools::displayPrice($order->total_shipping, $this->context->currency, false),
'{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),

View File

@@ -561,7 +561,7 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
$footer['total_convenience_fee_ti'] = 0;
if ($idsOrderDetail = array_column($order_details, 'id_order_detail')) {
$footer['room_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, true, null, null, null, $idsOrderDetail) + $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM, $idsOrderDetail);
$footer['room_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, true, null, null, null, $idsOrderDetail) + $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM, $idsOrderDetail);
$footer['room_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, true, null, null, null, $idsOrderDetail) + $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_WITH_ROOM, $idsOrderDetail);
// $footer['service_products_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
// $footer['service_products_price_tax_incl'] = $this->order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE);
$footer['additional_service_price_tax_excl'] = $this->order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 0, null, $idsOrderDetail) + $totalDemandsPriceTE;
@@ -569,7 +569,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_without_discount_te'] = $footer['room_price_tax_excl'] + $footer['total_convenience_fee_te'] + $footer['additional_service_price_tax_excl'];
$footer['total_without_discount_ti'] = $footer['room_price_tax_incl'] + $footer['total_convenience_fee_ti'] + $footer['additional_service_price_tax_incl'];
$footer['total_tax_without_discount'] = $footer['total_without_discount_ti'] - $footer['total_without_discount_te'];
if ($footer['total_tax_without_discount'] < 0) {
$footer['total_tax_without_discount'] = 0;
}
$data = array(
'cart_htl_data' => $cart_htl_data,
@@ -591,6 +598,9 @@ class HTMLTemplateInvoiceCore extends HTMLTemplate
'ps_price_compute_precision' => _PS_PRICE_COMPUTE_PRECISION_,
'round_type' => $round_type,
'legal_free_text' => $legal_free_text,
'total_without_discount_te' => $total_without_discount_te,
'total_without_discount_ti' => $total_without_discount_ti,
'total_tax_without_discount' => $total_tax_without_discount
);
if (Tools::getValue('debug')) {

View File

@@ -394,6 +394,10 @@ class OrderConfirmationControllerCore extends FrontController
$orderTotalInfo['total_paid'] += $objCartOrder->total_paid;
$orderTotalInfo['total_paid_real'] += $objCartOrder->total_paid_real;
}
$totalTaxIncl = $orderTotalInfo['total_rooms_ti'] + $orderTotalInfo['total_services_ti'] + $orderTotalInfo['total_convenience_fee_ti'] + $orderTotalInfo['total_auto_add_services_ti'] + $orderTotalInfo['total_demands_price_ti'];
$totalTaxExcl = $orderTotalInfo['total_rooms_te'] + $orderTotalInfo['total_services_te'] + $orderTotalInfo['total_convenience_fee_te'] + $orderTotalInfo['total_auto_add_services_te'] + $orderTotalInfo['total_demands_price_te'];
$orderTotalInfo['total_tax_without_discount'] = $totalTaxIncl - $totalTaxExcl;
}
$this->context->smarty->assign('orderTotalInfo', $orderTotalInfo);

View File

@@ -135,11 +135,6 @@
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<table class="table table-recap" bgcolor="#ffffff" style="width:100%;border-collapse:collapse"><!-- Title -->
<tr>
<td colspan="2" style="border:1px solid #D6D4D4;text-align:center;color:#777;padding:7px 0">
&nbsp;&nbsp;{discounts}
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -197,35 +192,6 @@
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -274,7 +240,35 @@
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_tax_paid}
{total_order_tax}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>

View File

@@ -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}

View File

@@ -149,11 +149,6 @@
{extra_demands_details_html}
</td>
</tr>
<tr>
<td colspan="9" style="border:1px solid #D6D4D4;text-align:center;color:#777;padding:7px 0">
&nbsp;&nbsp;{discounts}
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -210,34 +205,6 @@
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="5" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -286,7 +253,35 @@
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_tax_paid}
{total_order_tax}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="5" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>

View File

@@ -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}

View File

@@ -13,7 +13,7 @@
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<td bgcolor="#f8f8f8" colspan="5" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0"></td>
@@ -27,4 +27,4 @@
</table>
</td>
</tr>
{/foreach}
{/foreach}

View File

@@ -137,11 +137,6 @@
<td style="padding:7px 0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<table class="table table-recap" bgcolor="#ffffff" style="width:100%;border-collapse:collapse"><!-- Title -->
<tr>
<td colspan="2" style="border:1px solid #D6D4D4;text-align:center;color:#777;padding:7px 0">
&nbsp;&nbsp;{discounts}
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -199,34 +194,6 @@
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -275,7 +242,35 @@
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_tax_paid}
{total_order_tax}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>

View File

@@ -23,8 +23,6 @@ Total
{extra_demands_details_text}
{discounts}
Total Rooms Cost
{total_products}

View File

@@ -152,13 +152,6 @@
{extra_demands_details_html}
</td>
</tr>
<tr>
<td colspan="9" style="border:1px solid #D6D4D4;text-align:center;color:#777;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
&nbsp;&nbsp;{discounts}
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -215,34 +208,6 @@
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="5" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
@@ -291,7 +256,35 @@
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_tax_paid}
{total_order_tax}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
</tr>
<tr class="conf_body">
<td bgcolor="#f8f8f8" colspan="4" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
<strong>Discounts</strong>
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
</tr>
</table>
</td>
<td bgcolor="#f8f8f8" colspan="5" style="border:1px solid #D6D4D4;color:#333;padding:7px 0">
<table class="table" style="width:100%;border-collapse:collapse">
<tr>
<td width="10" style="color:#333;padding:0">&nbsp;</td>
<td align="right" style="color:#333;padding:0">
<font size="2" face="Open-sans, sans-serif" color="#555454">
{total_discounts}
</font>
</td>
<td width="10" style="color:#333;padding:0">&nbsp;</td>

View File

@@ -52,16 +52,6 @@
</td>
</tr>
{/if}
{if $footer.product_discounts_tax_excl > 0}
<tr>
<td class="grey" width="70%">
{l s='Total Discounts' pdf='true'}
</td>
<td class="white" width="30%">
- {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_excl}
</td>
</tr>
{/if}
{* {if isset($footer.product_taxes) && $footer.product_taxes}
<tr>
<td class="grey" width="70%">
@@ -108,21 +98,30 @@
{l s='Total (Tax excl.)' pdf='true'}
</td>
<td class="white">
{displayPrice currency=$order->id_currency price=$footer.total_paid_tax_excl}
{displayPrice currency=$order->id_currency price=$footer.total_without_discount_te}
</td>
</tr>
{if $footer.total_taxes > 0}
{if $footer.total_tax_without_discount > 0}
<tr class="bold">
<td class="grey">
{l s='Total Tax' pdf='true'}
</td>
<td class="white">
{displayPrice currency=$order->id_currency price=$footer.total_taxes}
{displayPrice currency=$order->id_currency price=$footer.total_tax_without_discount}
</td>
</tr>
{/if}
{if $footer.product_discounts_tax_incl > 0}
<tr class="bold">
<td class="grey" width="70%">
{l s='Total Discounts' pdf='true'}
</td>
<td class="white" width="30%">
- {displayPrice currency=$order->id_currency price=$footer.product_discounts_tax_incl}
</td>
</tr>
{/if}
<tr class="bold big">
<td class="grey">
{l s='Final Booking Amount' pdf='true'}

View File

@@ -349,21 +349,6 @@
</td>
</tr>
{/if}
{if $order->total_discounts > 0}
<tr class="item">
<td colspan="3"></td>
<td colspan="3">
<strong>{l s='Total Vouchers'}</strong>
</td>
<td colspan="2">
{if $priceDisplay && $use_tax}
<span class="price-discount">{displayWtPriceWithCurrency price=($orderTotalInfo['total_discounts_te'] * -1) currency=$objOrderCurrency convert=1}</span>
{else}
<span class="price-discount">{displayWtPriceWithCurrency price=($orderTotalInfo['total_discounts'] * -1) currency=$objOrderCurrency convert=1}</span>
{/if}
</td>
</tr>
{/if}
{if $priceDisplay && $use_tax && $orderTotalInfo['total_convenience_fee_te']}
<tr class="item">
<td colspan="3"></td>
@@ -391,9 +376,24 @@
<strong>{l s='Total Tax'}</strong>
</td>
<td colspan="2">
<span class="price-discount">{displayWtPriceWithCurrency price=$orderTotalInfo['total_tax'] currency=$objOrderCurrency convert=1}</span>
<span class="price-discount">{displayWtPriceWithCurrency price=$orderTotalInfo['total_tax_without_discount'] currency=$objOrderCurrency convert=1}</span>
</td>
</tr>
{if $order->total_discounts > 0}
<tr class="item">
<td colspan="3"></td>
<td colspan="3">
<strong>{l s='Total Vouchers'}</strong>
</td>
<td colspan="2">
{if $priceDisplay && $use_tax}
<span class="price-discount">{displayWtPriceWithCurrency price=($orderTotalInfo['total_discounts_te'] * -1) currency=$objOrderCurrency convert=1}</span>
{else}
<span class="price-discount">{displayWtPriceWithCurrency price=($orderTotalInfo['total_discounts'] * -1) currency=$objOrderCurrency convert=1}</span>
{/if}
</td>
</tr>
{/if}
<tr class="totalprice item">
<td colspan="3"></td>
<td colspan="3">

View File

@@ -262,6 +262,7 @@
{assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)}
{assign var=additional_service_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $total_demands_price_te)}
{assign var=additional_service_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $total_demands_price_ti)}
{assign var=total_tax_without_discount value=(($room_price_tax_incl - $room_price_tax_excl) + ($additional_service_price_tax_incl - $additional_service_price_tax_excl ))}
{if $priceDisplay && $use_tax && $room_price_tax_excl}
<tr>
<td>{l s='Total rooms cost (tax excl.)'}</td>
@@ -278,14 +279,6 @@
</tr>
{/if}
{if $order->total_discounts > 0}
<tr>
<td>{l s='Total Vouchers'}</td>
<td class="text-right">
<span class="price price-discount">-{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span>
</td>
</tr>
{/if}
{if $priceDisplay && $use_tax && $total_convenience_fee_te}
<tr>
<td>{l s='Total Convenience Fees (tax excl.)'}</td>
@@ -305,9 +298,18 @@
<tr class="totalprice item">
<td>{l s='Total Tax'}</td>
<td class="text-right">
<span class="price">{displayWtPriceWithCurrency price=($order->total_paid - $order->total_paid_tax_excl) currency=$currency}</span>
<span class="price">{displayWtPriceWithCurrency price=($total_tax_without_discount) currency=$currency}</span>
</td>
</tr>
{if $order->total_discounts > 0}
<tr>
<td>{l s='Total Vouchers'}</td>
<td class="text-right">
<span class="price price-discount">-{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span>
</td>
</tr>
{/if}
<tr class="totalprice item">
<td><strong>{l s='Final Booking Total'}<strong></td>
<td class="text-right">
@@ -648,6 +650,7 @@
{assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)}
{assign var=additional_service_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $total_demands_price_te)}
{assign var=additional_service_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $total_demands_price_ti)}
{assign var=total_tax_without_discount value=(($room_price_tax_incl - $room_price_tax_excl) + ($additional_service_price_tax_incl - $additional_service_price_tax_excl ))}
{if $priceDisplay && $use_tax && $room_price_tax_excl}
<tr>
<td>{l s='Total rooms cost (tax excl.)'}</td>
@@ -664,14 +667,6 @@
</tr>
{/if}
{if $order->total_discounts > 0}
<tr>
<td>{l s='Total Vouchers'}</td>
<td class="text-right">
<span class="price price-discount">-{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span>
</td>
</tr>
{/if}
{if $priceDisplay && $use_tax && $total_convenience_fee_te}
<tr>
<td>{l s='Total Convenience Fees (tax excl.)'}</td>
@@ -691,9 +686,17 @@
<tr class="totalprice item">
<td>{l s='Total Tax'}</td>
<td class="text-right">
<span class="price">{displayWtPriceWithCurrency price=($order->total_paid - $order->total_paid_tax_excl) currency=$currency}</span>
<span class="price">{displayWtPriceWithCurrency price=($total_tax_without_discount) currency=$currency}</span>
</td>
</tr>
{if $order->total_discounts > 0}
<tr>
<td>{l s='Total Vouchers'}</td>
<td class="text-right">
<span class="price price-discount">-{displayWtPriceWithCurrency price=$order->total_discounts currency=$currency convert=1}</span>
</td>
</tr>
{/if}
<tr class="totalprice item">
<td><strong>{l s='Final Booking Total'}<strong></td>
<td class="text-right">

View File

@@ -301,7 +301,7 @@
{if $show_taxes}
<p class="cart_total_tax">
<span>{l s='Total tax'}</span>
<span class="cart_total_values">{displayPrice price=($total_tax)}</span>
<span class="cart_total_values">{displayPrice price=($total_tax_without_discount)}</span>
</p>
{/if}
<p class="total_discount_block {if $total_discounts == 0}unvisible{/if}">