Skip to content
This repository has been archived by the owner on Nov 25, 2024. It is now read-only.

Commit

Permalink
Fix: Corrections Point of Sale (#2904)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Oct 31, 2024
1 parent ddd2437 commit ff8617b
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -284,7 +284,8 @@ export default defineComponent({
const currency = getCurrencyPayment({
paymentMethods: currentPaymentMethod
})
updateAmount(0)
const { open_amount } = store.getters.getCurrentOrder
updateAmount(open_amount)
store.commit('setAvailableCurrencies', currency)
clearFieldsCollections()
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,8 @@ export default defineComponent({
if (isEmptyValue(currentPointOfSales.value)) return ''
if (!isEmptyValue(currentOrder.value.id)) return currentOrder.value.document_type.name
const { document_type } = currentPointOfSales.value
return document_type.name
if (!isEmptyValue(document_type)) return document_type.name
return ''
})

const listDocumentTypes = computed(() => {
Expand All @@ -196,7 +197,8 @@ export default defineComponent({
if (isEmptyValue(currentPointOfSales.value)) return ''
if (!isEmptyValue(currentOrder.value.id)) return currentOrder.value.price_list.name
const { price_list } = currentPointOfSales.value
return price_list.name
if (!isEmptyValue(price_list)) return price_list.name
return ''
})

const listPrices = computed(() => {
Expand All @@ -211,7 +213,8 @@ export default defineComponent({
if (isEmptyValue(currentPointOfSales.value)) return ''
if (!isEmptyValue(currentOrder.value.id)) return currentOrder.value.warehouse.name
const { warehouse } = currentPointOfSales.value
return warehouse.name
if (!isEmptyValue(warehouse)) return warehouse.name
return ''
})

const pointCampaigns = computed(() => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,19 @@ export default defineComponent({
isShowed: true
})
}

function fetchMethodsPayments() {
const listPaymentMethods = store.getters.getListPaymentMethods
if (isEmptyValue(listPaymentMethods)) {
store.dispatch('availablePaymentMethods')
}
}

fetchMethodsPayments()

return {
openCahs
openCahs,
fetchMethodsPayments
}
}
})
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ export default defineComponent({
},
setup() {
const isLoadingPayment = ref(false)
const isAddAcount = ref(false)
const isAddAcount = ref(true)

// Computed

Expand Down
4 changes: 4 additions & 0 deletions src/store/modules/ADempiere/form/VPOS/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -1102,6 +1102,10 @@ export default {
if (!isEmptyValue(error.response) && !isEmptyValue(error.response.data.message)) {
message = error.response.data.message
}
commit('setAttributeCashClosings', {
attribute: 'listSummary',
value: []
})

showMessage({
type: 'error',
Expand Down

0 comments on commit ff8617b

Please sign in to comment.