Gestione Ordini: evaso...
This commit is contained in:
@@ -154,6 +154,9 @@ export default defineComponent({
|
||||
if (myorder.value.quantity > 0) {
|
||||
myproduct.value.quantityAvailable -= myorder.value.quantity
|
||||
}
|
||||
if (myproduct.value.tempTotalQty > 0) {
|
||||
myproduct.value.quantityAvailable -= myproduct.value.tempTotalQty
|
||||
}
|
||||
}
|
||||
|
||||
function getQtyAvailable() {
|
||||
@@ -190,7 +193,7 @@ export default defineComponent({
|
||||
console.log('myproduct', myproduct, 'product', props.product)
|
||||
|
||||
if (!!myproduct.value) {
|
||||
if (myproduct.value.storehouses.length === 1) {
|
||||
if (myproduct.value.storehouses && myproduct.value.storehouses.length === 1) {
|
||||
myorder.value.idStorehouse = myproduct.value.storehouses[0]._id
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user