mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: closed sale receipt status.
feat: approve and reject sale estimate. feat: initial receipts, invoices, estimates and bills views.
This commit is contained in:
@@ -16,6 +16,32 @@ export default class SaleReceipt extends TenantModel {
|
||||
return ['created_at', 'updated_at'];
|
||||
}
|
||||
|
||||
/**
|
||||
* Virtual attributes.
|
||||
*/
|
||||
static get virtualAttributes() {
|
||||
return [
|
||||
'isClosed',
|
||||
'isDraft',
|
||||
];
|
||||
}
|
||||
|
||||
/**
|
||||
* Detarmine whether the sale receipt closed.
|
||||
* @return {boolean}
|
||||
*/
|
||||
get isClosed() {
|
||||
return !!this.closedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Detarmines whether the sale receipt drafted.
|
||||
* @return {boolean}
|
||||
*/
|
||||
get isDraft() {
|
||||
return !this.closedAt;
|
||||
}
|
||||
|
||||
/**
|
||||
* Relationship mapping.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user