mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-19 14:20:31 +00:00
feat: add adjustment total in estimates, invoices, and receipts pdf templates
This commit is contained in:
@@ -43,7 +43,7 @@ export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
||||
companyAddress?: string;
|
||||
billedToLabel?: string;
|
||||
|
||||
// Totals
|
||||
// Total
|
||||
total?: string;
|
||||
showTotal?: boolean;
|
||||
totalLabel?: string;
|
||||
@@ -53,6 +53,11 @@ export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
||||
showDiscount?: boolean;
|
||||
discountLabel?: string;
|
||||
|
||||
// # Adjustment
|
||||
adjustment?: string;
|
||||
showAdjustment?: boolean;
|
||||
adjustmentLabel?: string;
|
||||
|
||||
// # Subtotal
|
||||
subtotal?: string;
|
||||
showSubtotal?: boolean;
|
||||
@@ -117,6 +122,11 @@ export function EstimatePaperTemplate({
|
||||
subtotalLabel = 'Subtotal',
|
||||
showSubtotal = true,
|
||||
|
||||
// # Adjustment
|
||||
adjustment = '',
|
||||
showAdjustment = true,
|
||||
adjustmentLabel = 'Adjustment',
|
||||
|
||||
// # Customer Note
|
||||
showCustomerNote = true,
|
||||
customerNote = DefaultPdfTemplateStatement,
|
||||
@@ -240,6 +250,12 @@ export function EstimatePaperTemplate({
|
||||
amount={discount}
|
||||
/>
|
||||
)}
|
||||
{showAdjustment && adjustment && (
|
||||
<PaperTemplate.TotalLine
|
||||
label={adjustmentLabel}
|
||||
amount={adjustment}
|
||||
/>
|
||||
)}
|
||||
{showTotal && (
|
||||
<PaperTemplate.TotalLine label={totalLabel} amount={total} />
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user