mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 05:10:31 +00:00
fix(server): shouldn't write GL entries when save transaction as draft.
This commit is contained in:
@@ -36,8 +36,12 @@ export default class BillWriteInventoryTransactionsSubscriber {
|
||||
private handleWritingInventoryTransactions = async ({
|
||||
tenantId,
|
||||
billId,
|
||||
bill,
|
||||
trx,
|
||||
}: IBillCreatedPayload) => {
|
||||
// Can't continue if the bill is not opened yet.
|
||||
if (!bill.openedAt) return null;
|
||||
|
||||
await this.billsInventory.recordInventoryTransactions(
|
||||
tenantId,
|
||||
billId,
|
||||
@@ -52,8 +56,12 @@ export default class BillWriteInventoryTransactionsSubscriber {
|
||||
private handleOverwritingInventoryTransactions = async ({
|
||||
tenantId,
|
||||
billId,
|
||||
bill,
|
||||
trx,
|
||||
}: IBillEditedPayload) => {
|
||||
// Can't continue if the bill is not opened yet.
|
||||
if (!bill.openedAt) return null;
|
||||
|
||||
await this.billsInventory.recordInventoryTransactions(
|
||||
tenantId,
|
||||
billId,
|
||||
|
||||
Reference in New Issue
Block a user