Fixed: Standard product flow issues

This commit is contained in:
Sumit Panwar
2025-03-08 17:41:29 +05:30
parent 6b5ed912e6
commit 5265247e16
51 changed files with 1092 additions and 699 deletions

View File

@@ -417,7 +417,7 @@ class OrderInvoiceCore extends ObjectModel
$order_detail = array_filter($order_detail, function($v) {
return ($v['is_booking_product']
|| ($v['product_auto_add']
&& $v['product_service_type'] == Product::SERVICE_PRODUCT_WITH_ROOMTYPE
&& $v['selling_preference_type'] == Product::SELLING_PREFERENCE_WITH_ROOM_TYPE
&& $v['product_price_addition_type'] == ProductCore::PRICE_ADDITION_TYPE_WITH_ROOM)
);
});
@@ -484,9 +484,9 @@ class OrderInvoiceCore extends ObjectModel
$breakdown = array();
$order_detail = $this->getProducts();
$order_detail = array_filter($order_detail, function($v) {
return (!$v['is_booking_product'] && !$v['product_auto_add'] && $v['product_service_type'] == Product::SERVICE_PRODUCT_WITH_ROOMTYPE);
return (!$v['is_booking_product'] && !$v['product_auto_add'] && $v['selling_preference_type'] == Product::SELLING_PREFERENCE_WITH_ROOM_TYPE);
});
$details = $order->getProductTaxesDetails($order_detail, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE);
$details = $order->getProductTaxesDetails($order_detail, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE);
if ($sum_composite_taxes) {
$grouped_details = array();
@@ -550,12 +550,12 @@ class OrderInvoiceCore extends ObjectModel
$order_detail = array_filter($order_detail, function($v) {
return (!$v['is_booking_product']
&& $v['product_auto_add']
&& $v['product_service_type'] == Product::SERVICE_PRODUCT_WITH_ROOMTYPE
&& $v['selling_preference_type'] == Product::SELLING_PREFERENCE_WITH_ROOM_TYPE
&& $v['product_price_addition_type'] == Product::PRICE_ADDITION_TYPE_INDEPENDENT
);
});
$details = $order->getProductTaxesDetails($order_detail, false, Product::SERVICE_PRODUCT_WITH_ROOMTYPE);
$details = $order->getProductTaxesDetails($order_detail, false, Product::SELLING_PREFERENCE_WITH_ROOM_TYPE);
if ($sum_composite_taxes) {
$grouped_details = array();
@@ -619,8 +619,8 @@ class OrderInvoiceCore extends ObjectModel
$order_detail = $this->getProducts();
$order_detail = array_filter($order_detail, function($v) {
return (!$v['is_booking_product'] && (
$v['product_service_type'] == Product::SERVICE_PRODUCT_STANDALONE
|| $v['product_service_type'] == Product::SERVICE_PRODUCT_lINKED_WITH_HOTEL
$v['selling_preference_type'] == Product::SELLING_PREFERENCE_STANDALONE
|| $v['selling_preference_type'] == Product::SELLING_PREFERENCE_HOTEL_STANDALONE
));
});