This commit is contained in:
parent
e68afa3169
commit
dca5ae0f72
|
@ -8,15 +8,14 @@ module.exports = Self => {
|
||||||
arg: 'bankAccount',
|
arg: 'bankAccount',
|
||||||
type: 'number',
|
type: 'number',
|
||||||
required: true,
|
required: true,
|
||||||
description: 'The bank account of a client or a supplier',
|
description: 'The bank account of a client or a supplier'
|
||||||
http: {source: 'path'}
|
|
||||||
},
|
},
|
||||||
returns: {
|
returns: {
|
||||||
type: 'string',
|
type: 'string',
|
||||||
root: true
|
root: true
|
||||||
},
|
},
|
||||||
http: {
|
http: {
|
||||||
path: `/:bankAccount/getClientOrSupplierReference`,
|
path: `/getClientOrSupplierReference`,
|
||||||
verb: 'GET'
|
verb: 'GET'
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
|
@ -116,7 +116,8 @@ class Controller extends Dialog {
|
||||||
accountShortToStandard(value) {
|
accountShortToStandard(value) {
|
||||||
if (value) {
|
if (value) {
|
||||||
this.receipt.compensationAccount = value.replace('.', '0'.repeat(11 - value.length));
|
this.receipt.compensationAccount = value.replace('.', '0'.repeat(11 - value.length));
|
||||||
this.$http.get(`Clients/${this.receipt.compensationAccount}/getClientOrSupplierReference`)
|
const params = {bankAccount: this.receipt.compensationAccount};
|
||||||
|
this.$http.get(`Clients/getClientOrSupplierReference`, {params})
|
||||||
.then(res => {
|
.then(res => {
|
||||||
if (res.data.clientId) {
|
if (res.data.clientId) {
|
||||||
this.receipt.description = this.$t('Client Compensation Reference', {
|
this.receipt.description = this.$t('Client Compensation Reference', {
|
||||||
|
|
Loading…
Reference in New Issue