risolto qtaminima "|" era sbagliato, corretto: product.minBuyQty || 1
This commit is contained in:
@@ -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,
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user