diff --git a/src/common/shared_vuejs.ts b/src/common/shared_vuejs.ts index 43aa2327..0a2433ea 100755 --- a/src/common/shared_vuejs.ts +++ b/src/common/shared_vuejs.ts @@ -1038,6 +1038,9 @@ export const shared_consts = { PAGATI: 3, COMPLETATI: 4, CANCELLATI: 5, + + // + STATO_PER_SCARICARE_LE_QTA_DAL_MAGAZZINO: 4, // inferiore ai completati }, OrderStatusView: [ diff --git a/src/components/CProductCard/CProductCard.ts b/src/components/CProductCard/CProductCard.ts index 3e67641b..911e907b 100755 --- a/src/components/CProductCard/CProductCard.ts +++ b/src/components/CProductCard/CProductCard.ts @@ -150,7 +150,10 @@ export default defineComponent({ } function updateQtyAvailable() { - myproduct.value.quantityAvailable = myproduct.value.stockQty - myorder.value.quantity + myproduct.value.quantityAvailable = myproduct.value.stockQty + if (myorder.value.quantity > 0) { + myproduct.value.quantityAvailable -= myorder.value.quantity + } } function getQtyAvailable() {