Merge pull request #1202 from shreesh-webkul/gli-2278
Fixed: service not visible in booking when service is deleted from catalog after order
This commit is contained in:
@@ -57,9 +57,11 @@
|
||||
{if $service['allow_multiple_quantity']}
|
||||
<div class="qty_container">
|
||||
<input type="number" class="form-control qty" min="1" data-id_product="{$service['id_product']|escape:'html':'UTF-8'}" value="{$service['quantity']|escape:'html':'UTF-8'}">
|
||||
<p style="display:{if $service['quantity'] > $service['max_quantity']}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']}</span>
|
||||
</p>
|
||||
{if $service['max_quantity']}
|
||||
<p style="display:{if $service['quantity'] > $service['max_quantity']}block{else}none{/if}; margin-top: 4px;">
|
||||
<span class="label label-warning">{l s='Maximum allowed quantity: %s' sprintf=$service['max_quantity']}</span>
|
||||
</p>
|
||||
{/if}
|
||||
</div>
|
||||
{else}
|
||||
--
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user