From 98b4c763947e0990236b8da6f72cd3a2268eabe0 Mon Sep 17 00:00:00 2001 From: Surya Paolo Date: Tue, 12 Dec 2023 15:42:49 +0100 Subject: [PATCH] aggio query --- src/common/shared_vuejs.ts | 3 +++ src/components/CProductCard/CProductCard.ts | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) 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() {