fix: Remove empty lines from address formats

This commit is contained in:
Ahmed Bouhuolia
2024-10-05 16:08:09 +02:00
parent c5ff1e4d4a
commit a0a9f4a768
3 changed files with 34 additions and 24 deletions

View File

@@ -104,12 +104,24 @@ export class GetInvoicePaymentLinkMetaTransformer extends SaleInvoiceTransformer
);
}
protected formattedCustomerAddress(invoice) {
return contactAddressTextFormat(invoice.customer, `{ADDRESS_1}
get customerAddressFormat() {
return `{ADDRESS_1}
{ADDRESS_2}
{CITY}, {STATE} {POSTAL_CODE}
{CITY} {STATE} {POSTAL_CODE}
{COUNTRY}
{PHONE}`);
{PHONE}`;
}
/**
* Retrieves the formatted customer address.
* @param invoice
* @returns {string}
*/
protected formattedCustomerAddress(invoice) {
return contactAddressTextFormat(
invoice.customer,
this.customerAddressFormat
);
}
}