From 9fc14c70ae6f0a21512a67aeefdda7fbd3ac0f0a Mon Sep 17 00:00:00 2001 From: carlosjr Date: Thu, 21 Jan 2021 10:25:25 +0100 Subject: [PATCH] bug fixed --- modules/client/back/models/receipt.js | 2 +- modules/client/front/balance/create/index.html | 3 +-- modules/client/front/balance/create/index.js | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/client/back/models/receipt.js b/modules/client/back/models/receipt.js index b37dfb9a3..02976a973 100644 --- a/modules/client/back/models/receipt.js +++ b/modules/client/back/models/receipt.js @@ -12,7 +12,7 @@ module.exports = function(Self) { return !isNaN(value) && value != 0; } - Self.validateBinded('companyFk', isOfficialCompany, { + Self.validateAsync('companyFk', isOfficialCompany, { message: 'Company has to be official' }); diff --git a/modules/client/front/balance/create/index.html b/modules/client/front/balance/create/index.html index 1da25c8cb..89ec3b049 100644 --- a/modules/client/front/balance/create/index.html +++ b/modules/client/front/balance/create/index.html @@ -43,9 +43,8 @@ diff --git a/modules/client/front/balance/create/index.js b/modules/client/front/balance/create/index.js index e1b474452..dfda85ca7 100644 --- a/modules/client/front/balance/create/index.js +++ b/modules/client/front/balance/create/index.js @@ -17,6 +17,7 @@ class Controller extends Dialog { set amountPaid(value) { this.receipt.amountPaid = value; + this.amountToReturn = this.deliveredAmount - value; } get amountPaid() {