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 481c41a80..9c374affe 100644 --- a/admin/themes/default/template/controllers/orders/helpers/view/view.tpl +++ b/admin/themes/default/template/controllers/orders/helpers/view/view.tpl @@ -862,61 +862,66 @@ {assign var=order_shipping_price value=$order->total_shipping_tax_incl} {/if} - {assign var=room_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)} - {assign var=room_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)} - {assign var=service_products_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)} - {assign var=service_products_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITHOUT_ROOMTYPE)} - {assign var=convenience_fee_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)} - {assign var=convenience_fee_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)} - {assign var=additional_service_price_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTE)} - {assign var=additional_service_price_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTI)} - {if $room_price_tax_excl} + {* total extra demands prices *} + {* $totalDemandsPriceTE + $totalDemandsPriceTI *} + + {* Get total rooms prices *} + {assign var=total_rooms_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, true)} + {assign var=total_rooms_price_tax_incl value=$order->getTotalProductsWithTaxes(false, true)} + + {* Get total extra services including convenience fees prices *} + {assign var=total_services_price_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false)} + {assign var=total_services_price_tax_incl value=$order->getTotalProductsWithTaxes(false, false)} + + {* Get total of extra services and extra demands prices(excluding convenience fee) *} + {assign var=total_room_services_and_demands_tax_excl value=($order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTE)} + {assign var=total_room_services_and_demands_tax_incl value=($order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE) + $totalDemandsPriceTI)} + + {* Get total of only convenience fees prices *} + {assign var=total_convenience_fee_tax_excl value=$order->getTotalProductsWithoutTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)} + {assign var=total_convenience_fee_tax_incl value=$order->getTotalProductsWithTaxes(false, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE, 1, Product::PRICE_ADDITION_TYPE_INDEPENDENT)} + + {assign var=order_total_price_tax_excl value=($total_rooms_price_tax_excl + $total_services_price_tax_excl + $totalDemandsPriceTE)} + {assign var=order_total_price_tax_incl value=($total_rooms_price_tax_incl + $total_services_price_tax_incl + $totalDemandsPriceTI)} + + {if $total_rooms_price_tax_excl} {l s='Total Rooms Cost (Tax excl.)'} - {displayPrice price=$room_price_tax_excl currency=$currency->id} + {displayPrice price=$total_rooms_price_tax_excl currency=$currency->id} {/if} - {if isset($additional_service_price_tax_excl) && $additional_service_price_tax_excl > 0} + {if isset($total_room_services_and_demands_tax_excl) && $total_room_services_and_demands_tax_excl > 0} {l s='Total Extra services (Tax excl.)'} - {displayPrice price=($additional_service_price_tax_excl - $convenience_fee_price_tax_excl) currency=$currency->id} + {displayPrice price=($total_room_services_and_demands_tax_excl - $total_convenience_fee_tax_excl) currency=$currency->id} {/if} - {if $service_products_price_tax_excl} - - {l s='Total service products cost (Tax excl.)'} - - {displayPrice price=$service_products_price_tax_excl currency=$currency->id} - - - - {/if} - - {if isset($convenience_fee_price_tax_excl) && $convenience_fee_price_tax_excl > 0} + {if isset($total_convenience_fee_tax_excl) && $total_convenience_fee_tax_excl > 0} {l s='Convenience Fee (Tax excl.)'} - {if isset($booking_auto_added_services) && count($booking_auto_added_services)} + {if isset($order_convenience_fee_services) && count($order_convenience_fee_services)} {/if} - {displayPrice price=$convenience_fee_price_tax_excl currency=$currency->id} + {displayPrice price=$total_convenience_fee_tax_excl currency=$currency->id} - {if isset($booking_auto_added_services) && count($booking_auto_added_services)} + {if isset($order_convenience_fee_services) && count($order_convenience_fee_services)} - {foreach $booking_auto_added_services as $service} + {foreach $order_convenience_fee_services as $service} @@ -932,41 +937,41 @@ - - {if ($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0} + {if ($order_total_price_tax_incl - $order_total_price_tax_excl) > 0}
{$service.name} {displayPrice price=$service.total_price_tax_excl currency=$currency->id}
{l s='Total Taxes'} - {if ($order->total_paid_tax_incl - $order->total_paid_tax_excl) > 0} + {if ($order_total_price_tax_incl - $order_total_price_tax_excl) > 0} {/if} {displayPrice price=(($order->total_paid_tax_incl + $order->total_discounts_tax_incl) - ($order->total_paid_tax_excl + $order->total_discounts_tax_excl)) currency=$currency->id} + {displayPrice price=($order_total_price_tax_incl - $order_total_price_tax_excl) currency=$currency->id}