diff --git a/src/filters/toPercentage.js b/src/filters/toPercentage.js index e2b49ce22..9b5e953c0 100644 --- a/src/filters/toPercentage.js +++ b/src/filters/toPercentage.js @@ -1,7 +1,6 @@ import { useI18n } from 'vue-i18n'; export default function (value, fractionSize = 2) { - console.log('toPercentage value: ', value); if (value == null || value === '') return; const { locale } = useI18n(); diff --git a/src/pages/Ticket/Card/TicketSale.vue b/src/pages/Ticket/Card/TicketSale.vue index a093beafa..4ae710d17 100644 --- a/src/pages/Ticket/Card/TicketSale.vue +++ b/src/pages/Ticket/Card/TicketSale.vue @@ -195,11 +195,13 @@ const addSale = async (sale) => { }; const changeQuantity = (sale) => { - console.log('edit.quantity', edit.value.quantity); - console.log('sale.quantity', sale.quantity); - if (!sale.itemFk || sale.quantity == null) return; + if ( + !sale.itemFk || + sale.quantity == null || + edit.value?.oldQuantity === sale.quantity + ) + return; if (!sale.id) return addSale(sale); - updateQuantity(sale); }; @@ -566,7 +568,7 @@ onUnmounted(() => (stateStore.rightDrawer = false)); v-model.number="row.quantity" @keyup.enter="changeQuantity(row)" @blur="changeQuantity(row)" - @focus="edit.quantity = row.quantity" + @focus="edit.oldQuantity = row.quantity" /> {{ row.quantity }}