Merge branch 'develop' into tax-compliance

This commit is contained in:
Ahmed Bouhuolia
2023-08-29 15:09:52 +02:00
238 changed files with 1917 additions and 1285 deletions

View File

@@ -63,14 +63,17 @@ export class DeliverSaleInvoice {
// Record the delivered at on the storage.
const saleInvoice = await SaleInvoice.query(trx)
.where({ id: saleInvoiceId })
.update({ deliveredAt: moment().toMySqlDateTime() });
.patchAndFetchById(saleInvoiceId, {
deliveredAt: moment().toMySqlDateTime(),
})
.withGraphFetched('entries');
// Triggers `onSaleInvoiceDelivered` event.
await this.eventPublisher.emitAsync(events.saleInvoice.onDelivered, {
tenantId,
saleInvoiceId,
saleInvoice,
trx,
} as ISaleInvoiceEventDeliveredPayload);
});
}

View File

@@ -12,7 +12,7 @@ export class GetInvoicePaymentsService {
private transformer: TransformerInjectable;
/**
* Retrieve the invoice assocaited payments transactions.
* Retrieve the invoice associated payments transactions.
* @param {number} tenantId - Tenant id.
* @param {number} invoiceId - Invoice id.
*/