diff --git a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl index ac4ce1231..ffeba9c2c 100644 --- a/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl +++ b/admin/themes/default/template/controllers/orders/modals/_extra_services_service_products_tab_content.tpl @@ -57,9 +57,11 @@ {if $service['allow_multiple_quantity']}
-

- {l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']} -

+ {if $service['max_quantity']} +

+ {l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']} +

+ {/if}
{else} -- diff --git a/controllers/admin/AdminOrdersController.php b/controllers/admin/AdminOrdersController.php index 30bd234cc..edf488755 100644 --- a/controllers/admin/AdminOrdersController.php +++ b/controllers/admin/AdminOrdersController.php @@ -4994,7 +4994,7 @@ class AdminOrdersControllerCore extends AdminController && count($orderServiceProduct['additional_services']) ) { foreach ($orderServiceProduct['additional_services'] as $serviceProduct) { - if (Product::getProductPriceCalculation($serviceProduct['id_product']) == Product::PRICE_CALCULATION_METHOD_PER_DAY) { + if ($serviceProduct['price_calculation_method'] == Product::PRICE_CALCULATION_METHOD_PER_DAY) { $newNumDays = HotelHelper::getNumberOfDays($new_date_from, $new_date_to); $objRoomTypeServiceProductOrderDetail = new RoomTypeServiceProductOrderDetail((int) $serviceProduct['id_room_type_service_product_order_detail']); $unitPriceTaxExcl = $objRoomTypeServiceProductOrderDetail->unit_price_tax_excl; diff --git a/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php b/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php index 8692ee1e4..d8a236f66 100644 --- a/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php +++ b/modules/hotelreservationsystem/classes/RoomTypeServiceProductOrderDetail.php @@ -78,7 +78,7 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel $sql = 'SELECT rsod.*'; if (!$getTotalPrice) { - $sql .= ', hbd.`id_product` as `room_type_id_product`, od.`product_allow_multiple_quantity`, hbd.`id_room`, hbd.`adults`, hbd.`children`'; + $sql .= ', hbd.`id_product` as `room_type_id_product`, od.`product_allow_multiple_quantity`, od.`product_price_calculation_method`, hbd.`id_room`, hbd.`adults`, hbd.`children`'; } $sql .= ' FROM `'._DB_PREFIX_.'htl_booking_detail` hbd LEFT JOIN `'._DB_PREFIX_.'htl_room_type_service_product_order_detail` rsod ON(rsod.`id_htl_booking_detail` = hbd.`id`)'; @@ -152,6 +152,7 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel 'product_tax' => $product_tax, 'product_tax_label' => $product_tax_label, 'allow_multiple_quantity' => $product['product_allow_multiple_quantity'], + 'price_calculation_method' => $product['product_price_calculation_method'], 'total_price_tax_excl' => $product['total_price_tax_excl'], 'total_price_tax_incl' => $product['total_price_tax_incl'], ); @@ -175,6 +176,7 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel 'name' => $product['name'], 'quantity' => $product['quantity'], 'allow_multiple_quantity' => $product['product_allow_multiple_quantity'], + 'price_calculation_method' => $product['product_price_calculation_method'], 'product_tax' => $product_tax, 'product_tax_label' => $product_tax_label, 'total_price_tax_excl' => $product['total_price_tax_excl'], @@ -213,7 +215,7 @@ class RoomTypeServiceProductOrderDetail extends ObjectModel INNER JOIN `'._DB_PREFIX_.'htl_room_type_service_product_order_detail` rsod ON(rsod.`id_htl_booking_detail` = hbd.`id`)'; $sql .= ' LEFT JOIN `'._DB_PREFIX_.'order_detail` od ON(od.`id_order_detail` = rsod.`id_order_detail`)'; - $sql .= ' INNER JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = rsod.`id_product`)'; + $sql .= ' LEFT JOIN `'._DB_PREFIX_.'product` p ON (p.`id_product` = rsod.`id_product`)'; $sql .= ' WHERE hbd.`id` = '.(int)$idHotelBookingDetail;