fix(server): filter ledger entries that effect contact balance to AR/AP accounts only

This commit is contained in:
Ahmed Bouhuolia
2023-06-11 19:23:31 +02:00
parent 4d9e3ccfb4
commit 7bf008a9cb
3 changed files with 43 additions and 5 deletions

View File

@@ -55,7 +55,7 @@ export class CreateCustomer {
} as ICustomerEventCreatingPayload);
// Creates a new contact as customer.
const customer = await Contact.query().insertAndFetch({
const customer = await Contact.query(trx).insertAndFetch({
...customerObj,
});
// Triggers `onCustomerCreated` event.