feat(client_balance): add maxImport if "cash"
gitea/salix/pipeline/head There was a failure building this commit
Details
gitea/salix/pipeline/head There was a failure building this commit
Details
This commit is contained in:
parent
06b72ae708
commit
fbbb1ecdf6
|
@ -25,6 +25,9 @@
|
|||
},
|
||||
"isAutoConciliated": {
|
||||
"type": "boolean"
|
||||
},
|
||||
"maxAmount": {
|
||||
"type": "number"
|
||||
}
|
||||
},
|
||||
"acls": [{
|
||||
|
|
|
@ -44,7 +44,8 @@
|
|||
label="Amount"
|
||||
ng-model="$ctrl.amountPaid"
|
||||
step="0.01"
|
||||
required="true">
|
||||
required="true"
|
||||
max="$ctrl.maxAmount">
|
||||
</vn-input-number>
|
||||
</vn-horizontal>
|
||||
<vn-horizontal>
|
||||
|
|
|
@ -61,8 +61,14 @@ class Controller extends Dialog {
|
|||
|
||||
if (value) {
|
||||
const accountingType = value.accountingType;
|
||||
this.receipt.description =
|
||||
if (this.originalDescription) {
|
||||
this.receipt.description =
|
||||
`${accountingType && accountingType.receiptDescription}, ${this.originalDescription}`;
|
||||
} else {
|
||||
this.receipt.description =
|
||||
`${accountingType && accountingType.receiptDescription}`;
|
||||
}
|
||||
this.maxAmount = accountingType && accountingType.maxAmount;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -123,6 +129,9 @@ class Controller extends Dialog {
|
|||
if (response !== 'accept')
|
||||
return super.responseHandler(response);
|
||||
|
||||
if (this.bankSelection.accountingType.code == 'cash' && this.receipt.amountPaid > this.maxAmount)
|
||||
return this.vnApp.showError(this.$t('Amount exceeded', {maxAmount: this.maxAmount}));
|
||||
|
||||
let receiptId;
|
||||
return this.$http.post(`Clients/${this.clientFk}/createReceipt`, this.receipt)
|
||||
.then(res => {
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
View receipt: Ver recibo
|
||||
View receipt: Ver recibo
|
||||
Amount exceeded: Según ley contra el fraude no se puede recibir cobros por importe igual o superior a {{maxAmount}}
|
Loading…
Reference in New Issue