feat: issues in bills and payments made

This commit is contained in:
Ahmed Bouhuolia
2020-10-24 14:49:32 +02:00
parent e8aa4b5d73
commit b91c452101
6 changed files with 67 additions and 47 deletions

View File

@@ -284,6 +284,7 @@ export default class BillPaymentsService {
* - Re-insert the journal transactions and update the diff accounts balance.
* - Update the diff vendor balance.
* - Update the diff bill payment amount.
* ------
* @param {number} tenantId - Tenant id
* @param {Integer} billPaymentId
* @param {BillPaymentDTO} billPayment
@@ -313,6 +314,7 @@ export default class BillPaymentsService {
.upsertGraph({
id: billPaymentId,
...omit(billPaymentObj, ['entries']),
entries: billPaymentDTO.entries,
});
await this.eventDispatcher.dispatch(events.billPayments.onEdited);
this.logger.info('[bill_payment] edited successfully.', { tenantId, billPaymentId, billPayment, oldPaymentMade });