feat: Hook up customer/company address to pdf templates

This commit is contained in:
Ahmed Bouhuolia
2024-09-29 22:59:14 +02:00
parent 776b69475c
commit 863c7ad99f
29 changed files with 242 additions and 152 deletions

View File

@@ -150,17 +150,14 @@ block content
div(class=`${prefix}-terms-item__value`) #{creditNoteDate}
div(class=`${prefix}-address-section`)
if showBilledFromAddress
div(class=`${prefix}-address`)
strong #{companyName}
each address in billedFromAddress
div #{address}
if showCompanyAddress
div(class=`${prefix}-address-from`)
div !{companyAddress}
if showBilledToAddress
div(class=`${prefix}-address`)
if showCustomerAddress
div(class=`${prefix}-address-to`)
strong #{billedToLabel}
each address in billedToAddress
div #{address}
div !{customerAddress}
table(class=`${prefix}-table`)
thead

View File

@@ -156,17 +156,14 @@ block content
//- Addresses (Group section)
div(class=`${prefix}-addresses`)
if showBilledFromAddress
div(class=`${prefix}-address`)
strong #{companyName}
each item in billedFromAddress
div(class=`${prefix}-address__item`) #{item}
if showCompanyAddress
div(class=`${prefix}-address-from`)
div !{companyAddress}
if showBilledToAddress
div(class=`${prefix}-address`)
if showCustomerAddress
div(class=`${prefix}-address-to`)
strong #{billedToLabel}
each item in billedToAddress
div(class=`${prefix}-address__item`) #{item}
div !{customerAddress}
//- Table section (Line items)
table(class=`${prefix}-table`)

View File

@@ -173,6 +173,7 @@ block content
if showCustomerAddress
div(class=`${prefix}-address-to`)
strong #{billedToLabel}
div !{customerAddress}
//- Invoice table

View File

@@ -140,17 +140,14 @@ block content
div(class=`${prefix}-terms-item__value`) #{paymentReceivedDate}
div(class=`${prefix}-addresses`)
if showBilledFromAddress
div(class=`${prefix}-address`)
strong(class=`${prefix}-address__item`) #{companyName}
each addressLine in billedFromAddress
div(class=`${prefix}-address__item`) #{addressLine}
if showCompanyAddress
div(class=`${prefix}-address-from`)
div !{companyAddress}
if showBillingToAddress
div(class=`${prefix}-address`)
strong(class=`${prefix}-address__item`) #{billedToLabel}
each addressLine in billedToAddress
div(class=`${prefix}-address__item`) #{addressLine}
if showCustomerAddress
div(class=`${prefix}-address-to`)
strong #{billedToLabel}
div !{customerAddress}
table(class=`${prefix}-table`)
thead

View File

@@ -146,17 +146,14 @@ block content
//- Address Section
div(class=`${prefix}-address-section`)
if showBilledFromAddress
div(class=`${prefix}-address`)
strong= companyName
each addressLine in billedFromAddress
div= addressLine
if showCompanyAddress
div(class=`${prefix}-address-from`)
div !{companyAddress}
if showBilledToAddress
div(class=`${prefix}-address`)
strong= billedToLabel
each addressLine in billedToAddress
div= addressLine
if showCustomerAddress
div(class=`${prefix}-address-to`)
strong #{billedToLabel}
div !{customerAddress}
//- Table Section
table(class=`${prefix}-table`)