diff --git a/src/pages/Item/components/ItemProposal.vue b/src/pages/Item/components/ItemProposal.vue index 1a818d47d..8babc731b 100644 --- a/src/pages/Item/components/ItemProposal.vue +++ b/src/pages/Item/components/ItemProposal.vue @@ -1,15 +1,14 @@ - {{ sales }} - - {{ itemLack }} - (quantity = val)" - type="number" min="0" + :max="Math.abs(itemLack.lack)" :label="t('proposal.quantityToReplace')" dense + autofocus class="q-ml-xs" /> @@ -215,39 +245,77 @@ function handleSelection(value, _) { handleSelection(props.row, null)" > + + {{ + t('proposal.available') + }} + {{ t('proposal.available') }} + - - - {{ row.id }} - - - {{ row.longName }} - - - - {{ row.price2 }} - - ID: {{ row.id }} + + + {{ row.id }} + + + ({{ row.id }}){{ row.longName }} + + + + + + + + + + + + + + {{ compatibilityItem(statusConditionalValue(row)) }} + + + - - - - - + - + + {{ row.available }} + + + {{ row.counter }} + + + {{ row.minQuantity }} + + - - {{ toCurrency(row.price2) }} - - {{ - toCurrency(row.price2) - }} + + + {{ + toCurrency(row.price2) + }} + @@ -273,7 +348,8 @@ function handleSelection(value, _) { + + + en: + diff --git a/src/pages/Item/components/ItemProposalProxy.vue b/src/pages/Item/components/ItemProposalProxy.vue index 48ce1e4d4..84c614840 100644 --- a/src/pages/Item/components/ItemProposalProxy.vue +++ b/src/pages/Item/components/ItemProposalProxy.vue @@ -25,7 +25,7 @@ const $props = defineProps({ - + {{ $t('Item proposal') }} diff --git a/src/pages/Item/locale/en.yml b/src/pages/Item/locale/en.yml index fa18b499c..047d3d2e5 100644 --- a/src/pages/Item/locale/en.yml +++ b/src/pages/Item/locale/en.yml @@ -100,7 +100,7 @@ proposal: value8: value8 available: Available minQuantity: minQuantity - price2: price2 + price2: Price located: Located counter: Counter groupingPrice: Grouping Price diff --git a/src/pages/Item/locale/es.yml b/src/pages/Item/locale/es.yml index 7f694fa6d..d9076f47b 100644 --- a/src/pages/Item/locale/es.yml +++ b/src/pages/Item/locale/es.yml @@ -90,6 +90,9 @@ itemType: temperature: Temperatura itemProposal: Artículos similares proposal: + substitutionAvailable: Sustitución disponible + notSubstitutionAvailableByPrice: Sustitución no disponible, 30% de diferencia por precio o cantidad + compatibility: Compatibilidad title: Items de sustitución para los tickets seleccionados itemFk: Item longName: Nombre diff --git a/src/pages/Ticket/Negative/TicketLackDetail.vue b/src/pages/Ticket/Negative/TicketLackDetail.vue index 925c393f4..0dd099dad 100644 --- a/src/pages/Ticket/Negative/TicketLackDetail.vue +++ b/src/pages/Ticket/Negative/TicketLackDetail.vue @@ -30,7 +30,7 @@ const showProposalDialog = ref(false); const showChangeQuantityDialog = ref(false); const showFree = ref(true); const selectedRows = ref([]); - +const badgeLackRef = ref(); const route = useRoute(); const itemLack = ref(null); const originalRowDataCopy = ref(null); @@ -76,8 +76,11 @@ defineExpose({ reload }); // return rows; // }; -const itemProposalEvt = ({ itemProposal }) => { +const itemProposalEvt = (data) => { + const { itemProposal, quantity } = data; itemProposalSelected.value = itemProposal; + // badgeLackRef.value.reload(); + itemLack.value.lack += +quantity; tableRef.value.reload(); // replaceItem(); }; @@ -134,8 +137,8 @@ const itemProposalSelected = ref(null); { // window.location.reload(); - console.err(data); + console.error(data); }; defineExpose({ reload }); const emit = defineEmits(['update:selection']); @@ -187,7 +187,6 @@ watch(selectedRows, () => emit('update:selection', selectedRows)); - {{ selectedRows }} (editableStates = data)" diff --git a/src/pages/Ticket/locale/en.yml b/src/pages/Ticket/locale/en.yml index f676f7628..5db64da6f 100644 --- a/src/pages/Ticket/locale/en.yml +++ b/src/pages/Ticket/locale/en.yml @@ -268,9 +268,9 @@ negative: totalNegative: 'Total negatives' days: Days buttonsUpdate: - itemProposal: artículo - state: Estado - quantity: Cantidad + itemProposal: Item + state: State + quantity: Quantity modalOrigin: title: 'Update negatives' question: 'Select a state to update'