fix: pdf template customization

This commit is contained in:
Ahmed Bouhuolia
2024-09-17 18:19:28 +02:00
parent bb0d91a9cb
commit 5f40d50852
16 changed files with 74 additions and 41 deletions

View File

@@ -9,7 +9,6 @@ export const mergePdfTemplateWithDefaultAttributes = (
brandingTemplate,
(val, key) => val !== null && Object.keys(defaultAttributes).includes(key)
);
return {
...defaultAttributes,
...brandingAttributes,
@@ -39,5 +38,9 @@ export const transformInvoiceToPdfTemplate = (
quantity: entry.quantityFormatted,
total: entry.totalFormatted,
})),
taxes: invoice.taxes.map((tax) => ({
label: tax.name,
amount: tax.taxRateAmountFormatted,
})),
};
};