mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 06:10:31 +00:00
feat: PDF templates company/customer address
This commit is contained in:
@@ -32,11 +32,11 @@ export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
||||
companyName?: string;
|
||||
|
||||
// Address
|
||||
showBilledToAddress?: boolean;
|
||||
billedToAddress?: string;
|
||||
showCustomerAddress?: boolean;
|
||||
customerAddress?: string;
|
||||
|
||||
showBilledFromAddress?: boolean;
|
||||
billedFromAddress?: string;
|
||||
showCompanyAddress?: boolean;
|
||||
companyAddress?: string;
|
||||
billedToLabel?: string;
|
||||
|
||||
// Totals
|
||||
@@ -77,10 +77,10 @@ export function EstimatePaperTemplate({
|
||||
companyName,
|
||||
|
||||
// # Address
|
||||
billedToAddress = DefaultPdfTemplateAddressBilledTo,
|
||||
billedFromAddress = DefaultPdfTemplateAddressBilledFrom,
|
||||
showBilledFromAddress = true,
|
||||
showBilledToAddress = true,
|
||||
customerAddress = DefaultPdfTemplateAddressBilledTo,
|
||||
companyAddress = DefaultPdfTemplateAddressBilledFrom,
|
||||
showCompanyAddress = true,
|
||||
showCustomerAddress = true,
|
||||
billedToLabel = 'Billed To',
|
||||
|
||||
// #Total
|
||||
@@ -151,16 +151,15 @@ export function EstimatePaperTemplate({
|
||||
</PaperTemplate.TermsList>
|
||||
|
||||
<PaperTemplate.AddressesGroup>
|
||||
{showBilledFromAddress && (
|
||||
{showCompanyAddress && (
|
||||
<PaperTemplate.Address>
|
||||
<strong>{companyName}</strong>
|
||||
<Box dangerouslySetInnerHTML={{ __html: billedFromAddress }} />
|
||||
<Box dangerouslySetInnerHTML={{ __html: companyAddress }} />
|
||||
</PaperTemplate.Address>
|
||||
)}
|
||||
{showBilledToAddress && (
|
||||
{showCustomerAddress && (
|
||||
<PaperTemplate.Address>
|
||||
<strong>{billedToLabel}</strong>
|
||||
<Box dangerouslySetInnerHTML={{ __html: billedToAddress }} />
|
||||
<Box dangerouslySetInnerHTML={{ __html: customerAddress }} />
|
||||
</PaperTemplate.Address>
|
||||
)}
|
||||
</PaperTemplate.AddressesGroup>
|
||||
|
||||
@@ -24,8 +24,10 @@ export const initialValues = {
|
||||
companyName: 'Bigcapital Technology, Inc.',
|
||||
|
||||
// Addresses
|
||||
showBilledFromAddress: true,
|
||||
showBilledToAddress: true,
|
||||
showCustomerAddress: true,
|
||||
showCompanyAddress: true,
|
||||
customerAddress: '',
|
||||
companyAddress: '',
|
||||
billedToLabel: 'Billed To',
|
||||
|
||||
// Entries
|
||||
@@ -45,6 +47,7 @@ export const initialValues = {
|
||||
showCustomerNote: true,
|
||||
customerNoteLabel: 'Customer Note',
|
||||
|
||||
// Terms & Conditions
|
||||
showTermsConditions: true,
|
||||
termsConditionsLabel: 'Terms & Conditions',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user