mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-16 12:50:38 +00:00
feat: ability to publish and draft inventory adjustment transactions.
This commit is contained in:
@@ -20,7 +20,7 @@ export default class InventoryAdjustment extends TenantModel {
|
||||
* Virtual attributes.
|
||||
*/
|
||||
static get virtualAttributes() {
|
||||
return ['inventoryDirection'];
|
||||
return ['inventoryDirection', 'isPublished'];
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -30,6 +30,14 @@ export default class InventoryAdjustment extends TenantModel {
|
||||
return InventoryAdjustment.getInventoryDirection(this.type);
|
||||
}
|
||||
|
||||
/**
|
||||
* Detarmines whether the adjustment is published.
|
||||
* @return {boolean}
|
||||
*/
|
||||
get isPublished() {
|
||||
return !!this.publishedAt;
|
||||
}
|
||||
|
||||
static getInventoryDirection(type) {
|
||||
const directions = {
|
||||
'increment': 'IN',
|
||||
|
||||
Reference in New Issue
Block a user