fix: stock error for service item

(cherry picked from commit 32965f1af9)
This commit is contained in:
Rohit Waghchaure
2023-06-20 16:27:23 +05:30
committed by Mergify
parent 95e3dc9b81
commit 2bbea63de1
2 changed files with 5 additions and 2 deletions

View File

@@ -219,7 +219,8 @@ class ItemConfigure {
: ''
}
${available_qty === 0 ? '<span class="text-danger">(' + __('Out of Stock') + ')</span>' : ''}
${available_qty === 0 && product_info && product_info?.is_stock_item
? '<span class="text-danger">(' + __('Out of Stock') + ')</span>' : ''}
</div></div>
<a href data-action="btn_clear_values" data-item-code="${one_item}">
@@ -236,7 +237,8 @@ class ItemConfigure {
</div>`;
/* eslint-disable indent */
if (!product_info?.allow_items_not_in_stock && available_qty === 0) {
if (!product_info?.allow_items_not_in_stock && available_qty === 0
&& product_info && product_info?.is_stock_item) {
item_add_to_cart = '';
}