fix: issue in sales invoices and bills.

This commit is contained in:
Ahmed Bouhuolia
2020-10-25 19:58:32 +02:00
parent 5e615e57c3
commit ca6acf6517
8 changed files with 64 additions and 34 deletions

View File

@@ -16,6 +16,20 @@ export default class Contact extends TenantModel {
return ['createdAt', 'updatedAt'];
}
/**
* Defined virtual attributes.
*/
static get virtualAttributes() {
return ['closingBalance'];
}
/**
* Closing balance attribute.
*/
closingBalance() {
return this.openingBalance + this.balance;
}
/**
* Model modifiers.
*/