mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: validate the payment not delivered on make payment receive.
This commit is contained in:
@@ -18,6 +18,9 @@ export default class VendorsSubscriber {
|
||||
this.vendorsService = Container.get(VendorsService);
|
||||
}
|
||||
|
||||
/**
|
||||
* Writes the open balance journal entries once the vendor created.
|
||||
*/
|
||||
@On(events.vendors.onCreated)
|
||||
async handleWriteOpeningBalanceEntries({ tenantId, vendorId, vendor }) {
|
||||
// Writes the vendor opening balance journal entries.
|
||||
@@ -30,6 +33,9 @@ export default class VendorsSubscriber {
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert the opening balance journal entries once the vendor deleted.
|
||||
*/
|
||||
@On(events.vendors.onDeleted)
|
||||
async handleRevertOpeningBalanceEntries({ tenantId, vendorId }) {
|
||||
await this.vendorsService.revertOpeningBalanceEntries(
|
||||
@@ -37,6 +43,9 @@ export default class VendorsSubscriber {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Revert the opening balance journal entries once the vendors deleted in bulk.
|
||||
*/
|
||||
@On(events.vendors.onBulkDeleted)
|
||||
async handleBulkRevertOpeningBalanceEntries({ tenantId, vendorsIds }) {
|
||||
await this.vendorsService.revertOpeningBalanceEntries(
|
||||
|
||||
Reference in New Issue
Block a user