mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix: accounts types with new design.
This commit is contained in:
@@ -10,23 +10,4 @@ export default class ItemsSubscriber{
|
||||
constructor() {
|
||||
this.itemsService = Container.get(ItemsService);
|
||||
};
|
||||
|
||||
/**
|
||||
* Handle writing opening item inventory transaction.
|
||||
*/
|
||||
@On(events.item.onCreated)
|
||||
handleWriteOpeningInventoryTransaction({ tenantId, item }) {
|
||||
// Can't continue if the opeing cost, quantity or opening date was empty.
|
||||
if (!item.openingCost || !item.openingQuantity || !item.openingDate) {
|
||||
return;
|
||||
}
|
||||
// Records the opeing items inventory transaction once the item created.
|
||||
this.itemsService.recordOpeningItemsInventoryTransaction(
|
||||
tenantId,
|
||||
item.id,
|
||||
item.openingQuantity,
|
||||
item.openingCost,
|
||||
item.openingDate,
|
||||
)
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user