auto add services with add price with room type will have tax rule same as room type

This commit is contained in:
Shreesh Arora
2023-11-03 18:17:42 +05:30
parent ce93a9826f
commit 4a7f85e6a3
6 changed files with 53 additions and 30 deletions

View File

@@ -1898,6 +1898,12 @@ class AdminNormalProductsControllerCore extends AdminController
// set product visibility to none for current flow.
$object->visibility = 'none';
// if service is auto_added and price addition is in room price, then the tax rule is applied of room price.
// so setting tax rule as no tax for now
if ($object->auto_add_to_cart && $object->price_addition_type == Product::PRICE_ADDITION_TYPE_WITH_ROOM) {
$object->id_tax_rules_group = 0;
}
// Duplicate combinations if not associated to shop
if ($this->context->shop->getContext() == Shop::CONTEXT_SHOP && !$object->isAssociatedToShop()) {
$is_associated_to_shop = false;