Fix: correct invoice price calculation and fix standalone service product not being added when another product exists

This commit is contained in:
Amit sharma
2026-03-03 16:20:58 +05:30
parent e5dd7e67a5
commit 7aaa29e07b
7 changed files with 41 additions and 128 deletions

View File

@@ -478,14 +478,16 @@ class OrderInvoiceCore extends ObjectModel
// - 'total_price_tax_excl'
// - 'total_amount'
$breakdown = array();
$order_detail = $this->getProducts();
$order_detail = array_filter($order_detail, function($v) {
return (
!$v['is_booking_product']
&& !$v['product_auto_add']
&& Product::isSellableWithRoomType($v['selling_preference_type'])
);
});
$order_detail = $this->getProducts(
$order->getProductsDetail(
false,
null,
0,
Product::PRICE_ADDITION_TYPE_INDEPENDENT,
array(),
Order::SERVICE_PRODUCT_CONTEXT_ROOM_LINKED
)
);
$details = $order->getProductTaxesDetails($order_detail, false);
if ($sum_composite_taxes) {