diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/accountNo.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/accountNo.vue
new file mode 100644
index 00000000000..ed27aa4e003
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/accountNo.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bank.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bank.vue
new file mode 100644
index 00000000000..8cf9d05f097
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bank.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bankAccountType.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bankAccountType.vue
new file mode 100644
index 00000000000..8c07f96b9c7
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bankAccountType.vue
@@ -0,0 +1,99 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/banksAccounts.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/banksAccounts.vue
new file mode 100644
index 00000000000..2a35969021d
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/banksAccounts.vue
@@ -0,0 +1,175 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/creditMemo.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/creditMemo.vue
new file mode 100644
index 00000000000..a2b1267d299
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/creditMemo.vue
@@ -0,0 +1,150 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/currencies.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/currencies.vue
new file mode 100644
index 00000000000..c7a3fbc0baf
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/currencies.vue
@@ -0,0 +1,174 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/date.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/date.vue
new file mode 100644
index 00000000000..44b75d15bf3
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/date.vue
@@ -0,0 +1,85 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/description.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/description.vue
new file mode 100644
index 00000000000..670778970da
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/description.vue
@@ -0,0 +1,86 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/fieldSelect.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/fieldSelect.vue
new file mode 100644
index 00000000000..93b2b7e9d5d
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/fieldSelect.vue
@@ -0,0 +1,142 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/issuingBank.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/issuingBank.vue
new file mode 100644
index 00000000000..714af755b9d
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/issuingBank.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/paymentMethods.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/paymentMethods.vue
new file mode 100644
index 00000000000..017a3ea0931
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/paymentMethods.vue
@@ -0,0 +1,113 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/phone.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/phone.vue
new file mode 100644
index 00000000000..59d323978e2
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/phone.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/recipientBank.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/recipientBank.vue
new file mode 100644
index 00000000000..f9db5eda2ba
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/recipientBank.vue
@@ -0,0 +1,97 @@
+
+
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/referenceNo.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/referenceNo.vue
new file mode 100644
index 00000000000..caa51cf1e42
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/referenceNo.vue
@@ -0,0 +1,84 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/value.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/value.vue
new file mode 100644
index 00000000000..4726fffd9b9
--- /dev/null
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/value.vue
@@ -0,0 +1,76 @@
+
+
+
+
+
+
+
+
+
diff --git a/src/components/ADempiere/Form/VPOS2/Collection/Refund/index.vue b/src/components/ADempiere/Form/VPOS2/Collection/Refund/index.vue
index 69379217ff6..d86dcc21235 100644
--- a/src/components/ADempiere/Form/VPOS2/Collection/Refund/index.vue
+++ b/src/components/ADempiere/Form/VPOS2/Collection/Refund/index.vue
@@ -42,97 +42,50 @@ along with this program. If not, see .
-
+
+
+
+
-
+
+
+
+
+
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
+
-
-
-
-
+
+
@@ -159,13 +112,19 @@ import store from '@/store'
// import router from '@/router'
// Component and Mixins
import fieldAmount from '@/components/ADempiere/Form/VPOS2/MainOrder/OptionLine/editLine/fieldAmount.vue'
-import paymentMethods from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/paymentMethods'
-import currencie from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/currencies'
-import recipientBank from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/recipientBank.vue'
-import banksAccounts from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/banksAccounts.vue'
-import creditMemo from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/creditMemo.vue'
-import issuingBank from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/issuingBank.vue'
-import bank from '@/components/ADempiere/Form/VPOS2/Collection/Charge/Field/bank.vue'
+import paymentMethods from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/paymentMethods'
+import currencie from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/currencies'
+import recipientBank from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/recipientBank.vue'
+import banksAccounts from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/banksAccounts.vue'
+import creditMemo from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/creditMemo.vue'
+import issuingBank from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/issuingBank.vue'
+import bankAccountType from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bankAccountType.vue'
+import bank from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bank.vue'
+import Value from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/value'
+import description from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/description'
+import date from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/date'
+import phone from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/phone'
+import accountNo from '@/components/ADempiere/Form/VPOS2/Collection/Refund/Field/accountNo'
// Utils and Helper Methods
import { isEmptyValue } from '@/utils/ADempiere/valueUtils'
import { formatPrice } from '@/utils/ADempiere/formatValue/numberFormat'
@@ -181,7 +140,13 @@ export default defineComponent({
recipientBank,
banksAccounts,
creditMemo,
- issuingBank
+ issuingBank,
+ bankAccountType,
+ description,
+ accountNo,
+ date,
+ phone,
+ Value
},
props: {
isRefund: {
@@ -216,6 +181,13 @@ export default defineComponent({
})
})
+ const typeOptions = computed(() => {
+ return store.getters.getAttributeField({
+ field: 'fieldsRefunds',
+ attribute: 'typeOptions'
+ })
+ })
+
const code = computed({
get() {
return store.getters.getAttributeField({
@@ -309,11 +281,18 @@ export default defineComponent({
})
})
+ const currentAmount = computed(() => {
+ return Number(store.getters.getAttributeField({
+ field: 'fieldsRefunds',
+ attribute: 'amount'
+ }))
+ })
+
if (!isEmptyValue(currentOrder.value.open_amount)) {
store.commit('setAttributeField', {
field: 'fieldsRefunds',
attribute: 'amount',
- value: currentOrder.value.refund_amount.value
+ value: Number(currentOrder.value.refund_amount.value)
})
// store.commit('setPayAmount', currentOrder.value.refund_amount.value)
}
@@ -334,6 +313,11 @@ export default defineComponent({
attribute: 'currencie',
value: currency
})
+ store.commit('setAttributeField', {
+ field: 'fieldsRefunds',
+ attribute: 'amount',
+ value: Number(currentOrder.value.refund_amount.value)
+ })
// store.commit('setAvailableCurrencies', currency)
clearFieldsCollections()
}
@@ -357,7 +341,7 @@ export default defineComponent({
let currencyPayment = price_list.currency
if (isEmptyValue(refund_amount)) return '0.00'
if (!isEmptyValue(currentCurrency.value)) currencyPayment = currentCurrency.value
- return formatPrice({ value: Number(refund_amount.value), currency: currencyPayment.iso_code })
+ return formatPrice({ value: Number(amount.value), currency: currencyPayment.iso_code })
})
const currentPos = computed(() => {
@@ -408,6 +392,32 @@ export default defineComponent({
field: 'fieldsRefunds',
attribute: 'currencie'
})
+ if (isEmptyValue(currentAccount.value) && typeOptions.value === '2') {
+ let accountNo
+ accountNo = store.getters.getAttributeField({
+ field: 'fieldsRefunds',
+ attribute: 'accountNo'
+ })
+ const driverLicense = store.getters.getAttributeField({
+ field: 'fieldsRefunds',
+ attribute: 'value'
+ })
+ const bankId = store.getters.getAttributeField({
+ field: 'fieldsRefunds',
+ attribute: 'bank'
+ })
+ const bankAccountType = store.getters.getAttributeField({
+ field: 'fieldsRefunds',
+ attribute: 'bankAccountType'
+ })
+ if (isEmptyValue(accountNo)) accountNo = phone.value
+ store.dispatch('newCustomerBankAccount', {
+ accountNo,
+ driverLicense,
+ bankId: bankId.id,
+ bankAccountType
+ })
+ }
if (
!isEmptyValue(currentPos.value.maximum_refund_allowed.value) &&
Number(currentPos.value.maximum_refund_allowed.value) > 0 &&
@@ -439,6 +449,8 @@ export default defineComponent({
code,
date,
phone,
+ currentAmount,
+ typeOptions,
description,
referenceNo,
currentAccount,
diff --git a/src/components/ADempiere/Form/VPOS2/DialogInfo/overdrawnInvoice.vue b/src/components/ADempiere/Form/VPOS2/DialogInfo/overdrawnInvoice.vue
index 1bec4fefb33..47a61b033e9 100644
--- a/src/components/ADempiere/Form/VPOS2/DialogInfo/overdrawnInvoice.vue
+++ b/src/components/ADempiere/Form/VPOS2/DialogInfo/overdrawnInvoice.vue
@@ -68,8 +68,7 @@ along with this program. If not, see .
.