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

@@ -19,9 +19,9 @@ export class SaleEstimatePdfTemplate {
public async getEstimatePdfTemplate(estimateTemplateId: number) {
const template =
await this.getPdfTemplateService.getPdfTemplate(estimateTemplateId);
// Retreives the organization branding attributes.
const commonOrgBrandingAttrs =
await this.getOrgBrandingAttrs.getOrganizationBrandingAttributes();
const commonOrgBrandingAttrs = await this.getOrgBrandingAttrs.execute();
// Merge the default branding attributes with organization attrs.
const orgainizationBrandingAttrs = {

View File

@@ -19,9 +19,10 @@ export class SaleInvoicePdfTemplate {
async getInvoicePdfTemplate(invoiceTemplateId: number) {
const template =
await this.getPdfTemplateService.getPdfTemplate(invoiceTemplateId);
// Retrieves the organization branding attributes.
const commonOrgBrandingAttrs =
await this.getOrgBrandingAttributes.getOrganizationBrandingAttributes();
await this.getOrgBrandingAttributes.execute();
const organizationBrandingAttrs = {
...defaultInvoicePdfTemplateAttributes,