fix: attach branding template attrs to payment page

This commit is contained in:
Ahmed Bouhuolia
2024-11-11 20:25:42 +02:00
parent c58822fd6c
commit 7ee3392d3e
6 changed files with 93 additions and 6 deletions

View File

@@ -25,7 +25,7 @@ export class GetInvoicePaymentLinkMetadata {
.findOne('linkId', linkId)
.where('resourceType', 'SaleInvoice')
.throwIfNotFound();
// Validate the expiry at date.
if (paymentLink.expiryAt) {
const currentDate = moment();
@@ -46,6 +46,7 @@ export class GetInvoicePaymentLinkMetadata {
.withGraphFetched('customer')
.withGraphFetched('taxes.taxRate')
.withGraphFetched('paymentMethods.paymentIntegration')
.withGraphFetched('pdfTemplate')
.throwIfNotFound();
return this.transformer.transform(