mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-17 21:30:31 +00:00
fix: pdf template customization
This commit is contained in:
@@ -18,7 +18,7 @@ export class PaymentReceivedBrandingTemplate {
|
||||
public async getPaymentReceivedPdfTemplate(
|
||||
tenantId: number,
|
||||
paymentTemplateId: number
|
||||
): Promise<PdfTemplate> {
|
||||
) {
|
||||
const template = await this.getPdfTemplateService.getPdfTemplate(
|
||||
tenantId,
|
||||
paymentTemplateId
|
||||
|
||||
@@ -7,6 +7,15 @@ export const transformPaymentReceivedToPdfTemplate = (
|
||||
payment: IPaymentReceived
|
||||
): Partial<PaymentReceivedPdfTemplateAttributes> => {
|
||||
return {
|
||||
// ...payment
|
||||
total: payment.formattedAmount,
|
||||
subtotal: payment.subtotalFormatted,
|
||||
paymentReceivedNumebr: payment.paymentReceiveNo,
|
||||
paymentReceivedDate: payment.formattedPaymentDate,
|
||||
customerName: payment.customer.displayName,
|
||||
lines: payment.entries.map((entry) => ({
|
||||
invoiceNumber: entry.invoice.invoiceNo,
|
||||
invoiceAmount: entry.invoice.totalFormatted,
|
||||
paidAmount: entry.paymentAmountFormatted,
|
||||
})),
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user