forked from adempiere/adempiere-vue
-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Support Allowed to Refund (Transcoding) (adempiere#1559)
* Feat: Support Allowed to Refund( Transcoding) * Update currencies.vue
- Loading branch information
1 parent
054c89d
commit c554178
Showing
20 changed files
with
1,782 additions
and
90 deletions.
There are no files selected for viewing
76 changes: 76 additions & 0 deletions
76
src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/accountNo.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
<!-- | ||
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution | ||
Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. | ||
Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https:www.gnu.org/licenses/>. | ||
--> | ||
|
||
<template> | ||
<el-form-item | ||
:label="$t('pointOfSales.collection.field.accountNo')" | ||
class="form-item-criteria" | ||
style="margin: 0px;width: 100%;" | ||
> | ||
<el-input | ||
v-model="accountNo" | ||
:disabled="!isEmptyValue(currentAccount)" | ||
style="width: 100%;" | ||
/> | ||
</el-form-item> | ||
</template> | ||
|
||
<script> | ||
import { computed, defineComponent } from '@vue/composition-api' | ||
|
||
import store from '@/store' | ||
// import { isEmptyValue } from '@/utils/ADempiere' | ||
|
||
export default defineComponent({ | ||
name: 'AccountNo', | ||
props: { | ||
isRefund: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
setup(props) { | ||
const accountNo = computed({ | ||
get() { | ||
return store.getters.getAttributeField({ | ||
field: 'fieldsRefunds', | ||
attribute: 'accountNo' | ||
}) | ||
}, | ||
// setter | ||
set(value) { | ||
store.commit('setAttributeField', { | ||
field: 'fieldsRefunds', | ||
attribute: 'accountNo', | ||
value | ||
}) | ||
} | ||
}) | ||
|
||
const currentAccount = computed(() => { | ||
return store.getters.getAttributeField({ | ||
field: 'fieldsRefunds', | ||
attribute: 'currentAccount' | ||
}) | ||
}) | ||
|
||
return { | ||
accountNo, | ||
currentAccount | ||
} | ||
} | ||
}) | ||
</script> |
99 changes: 99 additions & 0 deletions
99
src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bank.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!-- | ||
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution | ||
Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. | ||
Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https:www.gnu.org/licenses/>. | ||
--> | ||
|
||
<template> | ||
<el-form-item | ||
:label="$t('pointOfSales.collection.bank')" | ||
class="form-item-criteria" | ||
style="margin: 0px;width: 100%;" | ||
> | ||
<el-select | ||
v-model="bank" | ||
filterable | ||
clearable | ||
style="width: 100%;" | ||
@visible-change="findBanks" | ||
> | ||
<el-option | ||
v-for="item in listBanks" | ||
:key="item.id" | ||
:label="item.name" | ||
:value="item.id" | ||
/> | ||
</el-select> | ||
</el-form-item> | ||
</template> | ||
|
||
<script> | ||
import { computed, defineComponent } from '@vue/composition-api' | ||
|
||
import store from '@/store' | ||
// import { isEmptyValue } from '@/utils/ADempiere' | ||
|
||
export default defineComponent({ | ||
name: 'bank', | ||
props: { | ||
isRefund: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
setup(props) { | ||
const listBanks = computed(() => { | ||
return store.getters.getAttributeField({ | ||
field: 'banks', | ||
attribute: 'listBanks' | ||
}) | ||
}) | ||
|
||
const bank = computed({ | ||
get() { | ||
const banck = store.getters.getAttributeField({ | ||
field: 'fieldsRefunds', | ||
attribute: 'bank' | ||
}) | ||
if (banck) return banck.id | ||
return '' | ||
}, | ||
// setter | ||
set(bank) { | ||
let currentBank | ||
if (bank) { | ||
currentBank = listBanks.value.find(list => list.id === bank) | ||
} | ||
store.commit('setAttributeField', { | ||
field: 'fieldsRefunds', | ||
attribute: 'bank', | ||
value: currentBank | ||
}) | ||
} | ||
}) | ||
|
||
function findBanks(show) { | ||
if (!show) return | ||
store.dispatch('banks') | ||
} | ||
|
||
findBanks(true) | ||
|
||
return { | ||
listBanks, | ||
bank, | ||
findBanks | ||
} | ||
} | ||
}) | ||
</script> |
99 changes: 99 additions & 0 deletions
99
src/components/ADempiere/Form/VPOS2/Collection/Refund/Field/bankAccountType.vue
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,99 @@ | ||
<!-- | ||
ADempiere-Vue (Frontend) for ADempiere ERP & CRM Smart Business Solution | ||
Copyright (C) 2018-Present E.R.P. Consultores y Asociados, C.A. | ||
Contributor(s): Elsio Sanchez elsiosanchez15@outlook.com https://github.com/elsiosanchez | ||
This program is free software: you can redistribute it and/or modify | ||
it under the terms of the GNU General Public License as published by | ||
the Free Software Foundation, either version 3 of the License, or | ||
(at your option) any later version. | ||
This program is distributed in the hope that it will be useful, | ||
but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
GNU General Public License for more details. | ||
You should have received a copy of the GNU General Public License | ||
along with this program. If not, see <https:www.gnu.org/licenses/>. | ||
--> | ||
|
||
<template> | ||
<el-form-item | ||
:label="$t('pointOfSales.collection.field.bankAccountType.label')" | ||
class="form-item-criteria" | ||
style="margin: 0px;width: 100%;" | ||
> | ||
<el-select | ||
v-model="bankAccountType" | ||
filterable | ||
clearable | ||
:disabled="!isEmptyValue(currentAccount)" | ||
style="width: 100%;" | ||
> | ||
<el-option | ||
v-for="item in list" | ||
:key="item.value" | ||
:label="item.name" | ||
:value="item.value" | ||
/> | ||
</el-select> | ||
</el-form-item> | ||
</template> | ||
|
||
<script> | ||
import { computed, defineComponent } from '@vue/composition-api' | ||
import lang from '@/lang' | ||
import store from '@/store' | ||
// import { isEmptyValue } from '@/utils/ADempiere' | ||
|
||
export default defineComponent({ | ||
name: 'BankAccountType', | ||
props: { | ||
isRefund: { | ||
type: Boolean, | ||
default: false | ||
} | ||
}, | ||
setup(props) { | ||
const currentAccount = computed(() => { | ||
return store.getters.getAttributeField({ | ||
field: 'bankAccounts', | ||
attribute: 'currentAccount' | ||
}) | ||
}) | ||
|
||
const list = computed(() => { | ||
return [ | ||
{ | ||
value: 'S', | ||
name: lang.t('pointOfSales.collection.field.bankAccountType.checking') | ||
}, | ||
{ | ||
value: 'C', | ||
name: lang.t('pointOfSales.collection.field.bankAccountType.currentAccount') | ||
} | ||
] | ||
}) | ||
|
||
const bankAccountType = computed({ | ||
get() { | ||
return store.getters.getAttributeField({ | ||
field: 'fieldsRefunds', | ||
attribute: 'bankAccountType' | ||
}) | ||
}, | ||
// setter | ||
set(type) { | ||
store.commit('setAttributeField', { | ||
field: 'fieldsRefunds', | ||
attribute: 'bankAccountType', | ||
value: type | ||
}) | ||
} | ||
}) | ||
|
||
return { | ||
list, | ||
bankAccountType, | ||
currentAccount | ||
} | ||
} | ||
}) | ||
</script> |
Oops, something went wrong.