fix: accounts types with new design.

This commit is contained in:
a.bouhuolia
2021-01-26 12:51:13 +02:00
parent a871aea84d
commit d789228038
24 changed files with 101 additions and 100 deletions

View File

@@ -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,
)
}
}