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

Commit

Permalink
Fix: Maximun Line DIscount Allowed (#1893)
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Jan 30, 2024
1 parent 9e9132e commit 351790e
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 7 deletions.
2 changes: 2 additions & 0 deletions src/components/ADempiere/Form/VPOS2/DialogInfo/pin.vue
Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,8 @@ export default defineComponent({
const { srcKey } = event
if (srcKey === 'close') {
closeDialog()
} else if (srcKey === 'enter') {
doneButton()
}
}

Expand Down
4 changes: 2 additions & 2 deletions src/components/ADempiere/Form/VPOS2/MainOrder/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -358,12 +358,12 @@ export default defineComponent({
})
}
function updateDiscount(discount_rate) {
const { is_allows_modify_discount } = currentPos.value
const { is_allows_modify_discount, maximum_line_discount_allowed } = currentPos.value
const {
quantity_ordered
} = currentLine.value
isLoadingDiscount.value = true
if (!is_allows_modify_discount) {
if (!is_allows_modify_discount || (Number(maximum_line_discount_allowed) !== 0 && discount_rate > Number(maximum_line_discount_allowed))) {
store.dispatch('setModalPin', {
title: lang.t('form.pos.pinMessage.pin') + lang.t('form.pos.pinMessage.qtyEntered'),
doneMethod: () => {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ export default defineComponent({
* Computed
*/
const listProdcut = computed(() => {
return store.getters.getListProduct
return store.getters.getListProductExpressMovement
})
const listMovementLines = computed(() => {
return store.getters.getListMovementLines
Expand Down
6 changes: 3 additions & 3 deletions src/store/modules/ADempiere/form/VPOS/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -429,9 +429,9 @@ export default {
getListCampaigns: (state) => {
return state.listCampaigns
},
getListSellers: (state) => {
return state.listSellers
},
// getListSellers: (state) => {
// return state.listSellers
// },
getListDocumentTypes: (state) => {
return state.listDocumentTypes
},
Expand Down
2 changes: 1 addition & 1 deletion src/store/modules/ADempiere/form/expressMovement.js
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ export default {
}
},
getters: {
getListProduct(state) {
getListProductExpressMovement(state) {
return state.listProduct
},
getListMovementLines(state) {
Expand Down

0 comments on commit 351790e

Please sign in to comment.