feat: apply credit note to invoice module

This commit is contained in:
Ahmed Bouhuolia
2025-05-04 01:32:08 +02:00
parent 1d53063e09
commit 4f6ad2b293
28 changed files with 633 additions and 707 deletions

View File

@@ -70,6 +70,7 @@ import { PaymentsReceivedImportable } from './commands/PaymentsReceivedImportabl
PaymentReceivedGLEntries,
PaymentsReceivedExportable,
PaymentsReceivedImportable,
PaymentReceivedValidators
],
imports: [
ChromiumlyTenancyModule,

View File

@@ -14,15 +14,14 @@ export class PaymentReceivedBrandingTemplate {
/**
* Retrieves the payment received pdf template.
* @param {number} paymentTemplateId
* @returns
* @returns
*/
public async getPaymentReceivedPdfTemplate(paymentTemplateId: number) {
const template = await this.getPdfTemplateService.getPdfTemplate(
paymentTemplateId
);
const template =
await this.getPdfTemplateService.getPdfTemplate(paymentTemplateId);
// Retrieves the organization branding attributes.
const commonOrgBrandingAttrs =
await this.getOrgBrandingAttributes.getOrganizationBrandingAttributes();
await this.getOrgBrandingAttributes.execute();
// Merges the default branding attributes with common organization branding attrs.
const organizationBrandingAttrs = {
@@ -35,7 +34,7 @@ export class PaymentReceivedBrandingTemplate {
};
const attributes = mergePdfTemplateWithDefaultAttributes(
brandingTemplateAttrs,
organizationBrandingAttrs
organizationBrandingAttrs,
);
return {
...template,