bug fixed

This commit is contained in:
Carlos Jimenez Ruiz 2021-01-21 10:25:25 +01:00
parent a6dfdc971a
commit 9fc14c70ae
3 changed files with 3 additions and 3 deletions

View File

@ -12,7 +12,7 @@ module.exports = function(Self) {
return !isNaN(value) && value != 0; return !isNaN(value) && value != 0;
} }
Self.validateBinded('companyFk', isOfficialCompany, { Self.validateAsync('companyFk', isOfficialCompany, {
message: 'Company has to be official' message: 'Company has to be official'
}); });

View File

@ -43,9 +43,8 @@
<vn-input-number <vn-input-number
vn-focus vn-focus
label="Amount" label="Amount"
ng-model="$ctrl.receipt.amountPaid" ng-model="$ctrl.amountPaid"
step="0.01" step="0.01"
rule
required="true"> required="true">
</vn-input-number> </vn-input-number>
</vn-horizontal> </vn-horizontal>

View File

@ -17,6 +17,7 @@ class Controller extends Dialog {
set amountPaid(value) { set amountPaid(value) {
this.receipt.amountPaid = value; this.receipt.amountPaid = value;
this.amountToReturn = this.deliveredAmount - value;
} }
get amountPaid() { get amountPaid() {