refactor: mail templates

This commit is contained in:
Ahmed Bouhuolia
2025-06-08 16:49:03 +02:00
parent 0a57b6e20e
commit 4366bf478a
44 changed files with 1866 additions and 134 deletions

View File

@@ -44,7 +44,10 @@ export const transformInvoiceToPdfTemplate = (
label: tax.name,
amount: tax.taxRateAmountFormatted,
})),
discount: invoice.discountAmountFormatted,
discountLabel: invoice.discountPercentageFormatted
? `Discount [${invoice.discountPercentageFormatted}]`
: 'Discount',
customerAddress: contactAddressTextFormat(invoice.customer),
};
};