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

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
elsiosanchez authored Oct 24, 2024
1 parent e63544d commit 8726fc7
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@ along with this program. If not, see <https:www.gnu.org/licenses/>.
style="font-size: 12px;"
/>
<el-button
v-show="!isEmptyValue(order)"
v-show="!isEmptyValue(order) && !isEmptyValue(currentLine)"
type="danger"
icon="el-icon-delete"
@click="deleteOrderLine(currentLine)"
/>
<el-button
v-show="!isEmptyValue(order)"
Expand Down Expand Up @@ -71,6 +72,10 @@ export default defineComponent({
return store.getters.getCurrentOrder
})

const currentLine = computed(() => {
return store.getters.getCurrentLine
})

function releaseOrder(order) {
store.dispatch('releaseCurrentOrder', { order })
}
Expand All @@ -84,10 +89,18 @@ export default defineComponent({
})
}

function deleteOrderLine(line) {
store.dispatch('deleteCurrentLine', {
lineId: line
})
}

return {
order,
currentLine,
// isEmptyValue,
releaseOrder,
deleteOrderLine,
openShowCollections
}
}
Expand Down
8 changes: 5 additions & 3 deletions src/store/modules/ADempiere/form/VPOS/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,11 @@ export default {
}) {
return new Promise(resolve => {
const currentPos = getters.getVPOS
const lisVPOS = getters.getLisVPOS
if (!isEmptyValue(lisVPOS)) {
resolve(lisVPOS)
return
}
listPointOfSales()
.then(response => {
const { selling_points } = response
Expand Down Expand Up @@ -163,9 +168,6 @@ export default {
})
resolve([])
})
.finally(() => {
dispatch('availablePaymentMethods')
})
})
},
/**
Expand Down
3 changes: 2 additions & 1 deletion src/store/modules/ADempiere/form/VPOS/order.js
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,8 @@ export default {
orderId: response.id
}
}, () => {})
dispatch('overloadOrder', { order: response })
dispatch('currentOrder', response)
// dispatch('overloadOrder', { order: response })
resolve({})
})
.catch(error => {
Expand Down

0 comments on commit 8726fc7

Please sign in to comment.