risolto qtaminima "|" era sbagliato, corretto: product.minBuyQty || 1

This commit is contained in:
Surya Paolo
2024-01-17 11:13:19 +01:00
parent 32e5e37b91
commit c4e2b76d65
2 changed files with 4 additions and 4 deletions

View File

@@ -95,7 +95,7 @@ export default defineComponent({
}
}
function addsubqty(addqty: boolean, subqty: boolean) {
async function addsubqty(addqty: boolean, subqty: boolean) {
if (products.isQtyAvailableByOrder(props.order)) {
if (addqty) {
if (props.order.quantity >= 100)
@@ -121,7 +121,7 @@ export default defineComponent({
}
}
products.addSubQtyToItem({
return await products.addSubQtyToItem({
addqty,
subqty,
order: props.order,

View File

@@ -660,11 +660,11 @@ export const useProducts = defineStore('Products', {
}
} else {
if (this.isQtyAvailableByProduct(product)) {
order.quantity = product.minBuyQty | 1
order.quantity = product.minBuyQty || 1
order.quantitypreordered = 0
} else {
if (this.isInPreorderByProduct(product)) {
order.quantitypreordered = product.minBuyQty | 1
order.quantitypreordered = product.minBuyQty || 1
order.quantity = 0
}
}