mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 22:00:31 +00:00
feat: paper template customize
This commit is contained in:
@@ -0,0 +1,40 @@
|
|||||||
|
// @ts-nocheck
|
||||||
|
import { FInputGroup, FSwitch, Group, Stack } from '@/components';
|
||||||
|
import { CLASSES } from '@/constants';
|
||||||
|
import { InputGroupProps, SwitchProps } from '@blueprintjs/core';
|
||||||
|
|
||||||
|
export function ElementCustomizeFieldsGroup({
|
||||||
|
label,
|
||||||
|
children,
|
||||||
|
}: {
|
||||||
|
label: string;
|
||||||
|
children: React.ReactNode;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<Stack spacing={20}>
|
||||||
|
<h4 className={CLASSES.TEXT_MUTED} style={{ fontWeight: 600 }}>
|
||||||
|
{label}
|
||||||
|
</h4>
|
||||||
|
|
||||||
|
<Stack spacing={14}>{children}</Stack>
|
||||||
|
</Stack>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
export function ElementCustomizeContentItemFieldGroup({
|
||||||
|
inputGroupProps,
|
||||||
|
switchProps,
|
||||||
|
}: {
|
||||||
|
inputGroupProps: InputGroupProps;
|
||||||
|
switchProps?: SwitchProps;
|
||||||
|
}) {
|
||||||
|
return (
|
||||||
|
<Group spacing={14} position={'apart'}>
|
||||||
|
<FSwitch {...inputGroupProps} fastField />
|
||||||
|
|
||||||
|
{switchProps?.name && (
|
||||||
|
<FInputGroup {...switchProps} style={{ maxWidth: 150 }} fastField />
|
||||||
|
)}
|
||||||
|
</Group>
|
||||||
|
);
|
||||||
|
}
|
||||||
@@ -1,13 +1,12 @@
|
|||||||
import React from 'react';
|
|
||||||
import { Box } from '@/components';
|
import { Box } from '@/components';
|
||||||
import { Classes } from '@blueprintjs/core';
|
import { Classes } from '@blueprintjs/core';
|
||||||
// import { InvoicePaperTemplate } from './InvoicePaperTemplate';
|
|
||||||
import { ElementCustomize } from '../../../ElementCustomize/ElementCustomize';
|
import { ElementCustomize } from '../../../ElementCustomize/ElementCustomize';
|
||||||
import { CreditNoteCustomizeGeneralField } from './CreditNoteCustomizeGeneralFields';
|
import { CreditNoteCustomizeGeneralField } from './CreditNoteCustomizeGeneralFields';
|
||||||
import { CreditNoteCustomizeContentFields } from './CreditNoteCutomizeContentFields';
|
import { CreditNoteCustomizeContentFields } from './CreditNoteCutomizeContentFields';
|
||||||
import { CreditNotePaperTemplate } from './CreditNotePaperTemplate';
|
import { CreditNotePaperTemplate } from './CreditNotePaperTemplate';
|
||||||
import { CreditNoteCustomizeValues } from './types';
|
import { CreditNoteCustomizeValues } from './types';
|
||||||
import { initialValues } from './constants';
|
import { initialValues } from './constants';
|
||||||
|
import { useFormikContext } from 'formik';
|
||||||
|
|
||||||
export default function CreditNoteCustomizeContent() {
|
export default function CreditNoteCustomizeContent() {
|
||||||
const handleFormSubmit = (values: CreditNoteCustomizeValues) => {};
|
const handleFormSubmit = (values: CreditNoteCustomizeValues) => {};
|
||||||
@@ -19,7 +18,7 @@ export default function CreditNoteCustomizeContent() {
|
|||||||
onSubmit={handleFormSubmit}
|
onSubmit={handleFormSubmit}
|
||||||
>
|
>
|
||||||
<ElementCustomize.PaperTemplate>
|
<ElementCustomize.PaperTemplate>
|
||||||
<CreditNotePaperTemplate />
|
<CreditNotePaperTemplateFormConnected />
|
||||||
</ElementCustomize.PaperTemplate>
|
</ElementCustomize.PaperTemplate>
|
||||||
|
|
||||||
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
||||||
@@ -37,3 +36,9 @@ export default function CreditNoteCustomizeContent() {
|
|||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function CreditNotePaperTemplateFormConnected() {
|
||||||
|
const { values } = useFormikContext<CreditNoteCustomizeValues>();
|
||||||
|
|
||||||
|
return <CreditNotePaperTemplate {...values} />;
|
||||||
|
}
|
||||||
|
|||||||
@@ -18,7 +18,7 @@ export function CreditNoteCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'primaryColor'}
|
name={'primaryColor'}
|
||||||
label={'Primary Color'}
|
label={'Primary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -32,7 +32,7 @@ export function CreditNoteCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'secondaryColor'}
|
name={'secondaryColor'}
|
||||||
label={'Secondary Color'}
|
label={'Secondary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -47,7 +47,7 @@ export function CreditNoteCustomizeGeneralField() {
|
|||||||
<FSwitch
|
<FSwitch
|
||||||
name={'showCompanyLogo'}
|
name={'showCompanyLogo'}
|
||||||
label={'Display company logo in the paper'}
|
label={'Display company logo in the paper'}
|
||||||
// className={styles.showCompanyLogoField}
|
style={{ fontSize: 14 }}
|
||||||
large
|
large
|
||||||
fastField
|
fastField
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -7,6 +7,7 @@ import { EstimateCustomizeContentFields } from './EstimateCustomizeFieldsContent
|
|||||||
import { EstimatePaperTemplate } from './EstimatePaperTemplate';
|
import { EstimatePaperTemplate } from './EstimatePaperTemplate';
|
||||||
import { EstimateCustomizeValues } from './types';
|
import { EstimateCustomizeValues } from './types';
|
||||||
import { initialValues } from './constants';
|
import { initialValues } from './constants';
|
||||||
|
import { useFormikContext } from 'formik';
|
||||||
|
|
||||||
export default function EstimateCustomizeContent() {
|
export default function EstimateCustomizeContent() {
|
||||||
const handleFormSubmit = (values: EstimateCustomizeValues) => {};
|
const handleFormSubmit = (values: EstimateCustomizeValues) => {};
|
||||||
@@ -18,7 +19,7 @@ export default function EstimateCustomizeContent() {
|
|||||||
onSubmit={handleFormSubmit}
|
onSubmit={handleFormSubmit}
|
||||||
>
|
>
|
||||||
<ElementCustomize.PaperTemplate>
|
<ElementCustomize.PaperTemplate>
|
||||||
<EstimatePaperTemplate />
|
<EstimatePaperTemplateFormConnected />
|
||||||
</ElementCustomize.PaperTemplate>
|
</ElementCustomize.PaperTemplate>
|
||||||
|
|
||||||
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
||||||
@@ -36,3 +37,9 @@ export default function EstimateCustomizeContent() {
|
|||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function EstimatePaperTemplateFormConnected() {
|
||||||
|
const { values } = useFormikContext<EstimateCustomizeValues>();
|
||||||
|
|
||||||
|
return <EstimatePaperTemplate {...values} />;
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function EstimateCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'primaryColor'}
|
name={'primaryColor'}
|
||||||
label={'Primary Color'}
|
label={'Primary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -33,7 +33,7 @@ export function EstimateCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'secondaryColor'}
|
name={'secondaryColor'}
|
||||||
label={'Secondary Color'}
|
label={'Secondary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -48,7 +48,7 @@ export function EstimateCustomizeGeneralField() {
|
|||||||
<FSwitch
|
<FSwitch
|
||||||
name={'showCompanyLogo'}
|
name={'showCompanyLogo'}
|
||||||
label={'Display company logo in the paper'}
|
label={'Display company logo in the paper'}
|
||||||
// className={styles.showCompanyLogoField}
|
style={{ fontSize: 14 }}
|
||||||
large
|
large
|
||||||
fastField
|
fastField
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,10 +1,32 @@
|
|||||||
import { Group, Stack } from '@/components';
|
import { Group, Stack } from '@/components';
|
||||||
import { PaperTemplate, PaperTemplateProps } from '../../Invoices/InvoiceCustomize/PaperTemplate';
|
import {
|
||||||
|
PaperTemplate,
|
||||||
|
PaperTemplateProps,
|
||||||
|
} from '../../Invoices/InvoiceCustomize/PaperTemplate';
|
||||||
|
|
||||||
export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
||||||
|
estimateNumebr?: string;
|
||||||
|
estimateNumberLabel?: string;
|
||||||
|
showEstimateNumber?: boolean;
|
||||||
|
|
||||||
|
expirationDate?: string;
|
||||||
|
showExpirationDate?: boolean;
|
||||||
|
expirationDateLabel?: string;
|
||||||
|
|
||||||
|
estimateDateLabel?: string;
|
||||||
|
showEstimateDate?: boolean;
|
||||||
|
estimateDate?: string;
|
||||||
|
|
||||||
|
companyName?: string;
|
||||||
|
|
||||||
|
// Address
|
||||||
|
showBilledToAddress?: boolean;
|
||||||
billedToAddress?: Array<string>;
|
billedToAddress?: Array<string>;
|
||||||
|
|
||||||
|
showBilledFromAddress?: boolean;
|
||||||
billedFromAddress?: Array<string>;
|
billedFromAddress?: Array<string>;
|
||||||
|
|
||||||
|
// Totals
|
||||||
total?: string;
|
total?: string;
|
||||||
showTotal?: boolean;
|
showTotal?: boolean;
|
||||||
totalLabel?: string;
|
totalLabel?: string;
|
||||||
@@ -13,6 +35,7 @@ export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
|||||||
showSubtotal?: boolean;
|
showSubtotal?: boolean;
|
||||||
subtotalLabel?: string;
|
subtotalLabel?: string;
|
||||||
|
|
||||||
|
// Statements
|
||||||
showCustomerNote?: boolean;
|
showCustomerNote?: boolean;
|
||||||
customerNote?: string;
|
customerNote?: string;
|
||||||
customerNoteLabel?: string;
|
customerNoteLabel?: string;
|
||||||
@@ -28,18 +51,6 @@ export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
|||||||
quantity: string;
|
quantity: string;
|
||||||
total: string;
|
total: string;
|
||||||
}>;
|
}>;
|
||||||
|
|
||||||
expirationDate?: string;
|
|
||||||
showExpirationDate?: boolean;
|
|
||||||
expirationDateLabel?: string;
|
|
||||||
|
|
||||||
estimateDateLabel?: string;
|
|
||||||
showEstimateDate?: boolean;
|
|
||||||
estimateDate?: string;
|
|
||||||
|
|
||||||
estimateNumebr?: string;
|
|
||||||
estimateNumberLabel?: string;
|
|
||||||
showEstimateNumber?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
export function EstimatePaperTemplate({
|
export function EstimatePaperTemplate({
|
||||||
|
|||||||
@@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
export const initialValues = {
|
export const initialValues = {
|
||||||
// Colors
|
// Colors
|
||||||
primaryColor: '#2c3dd8',
|
primaryColor: '#2c3dd8',
|
||||||
@@ -13,8 +12,8 @@ export const initialValues = {
|
|||||||
showEstimateNumber: true,
|
showEstimateNumber: true,
|
||||||
estimateNumberLabel: 'Estimate number',
|
estimateNumberLabel: 'Estimate number',
|
||||||
|
|
||||||
showDateIssue: true,
|
estimateDateLabel: 'Date of Issue',
|
||||||
dateIssueLabel: 'Date of Issue',
|
showEstimateDate: true,
|
||||||
|
|
||||||
showExpirationDate: true,
|
showExpirationDate: true,
|
||||||
expirationDateLabel: 'Expiration Date',
|
expirationDateLabel: 'Expiration Date',
|
||||||
@@ -37,24 +36,17 @@ export const initialValues = {
|
|||||||
showSubtotal: true,
|
showSubtotal: true,
|
||||||
subtotalLabel: 'Subtotal',
|
subtotalLabel: 'Subtotal',
|
||||||
|
|
||||||
showDiscount: true,
|
|
||||||
discountLabel: 'Discount',
|
|
||||||
|
|
||||||
showTaxes: true,
|
|
||||||
|
|
||||||
showTotal: true,
|
showTotal: true,
|
||||||
totalLabel: 'Total',
|
totalLabel: 'Total',
|
||||||
|
|
||||||
// Footer paragraphs.
|
// Statements
|
||||||
termsConditionsLabel: 'Terms & Conditions',
|
showCustomerNote: true,
|
||||||
|
customerNoteLabel: 'Customer Note',
|
||||||
|
|
||||||
showTermsConditions: true,
|
showTermsConditions: true,
|
||||||
|
termsConditionsLabel: 'Terms & Conditions',
|
||||||
statementLabel: 'Statement',
|
|
||||||
showStatement: true,
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
export const fieldsGroups = [
|
export const fieldsGroups = [
|
||||||
{
|
{
|
||||||
label: 'Header',
|
label: 'Header',
|
||||||
@@ -65,8 +57,8 @@ export const fieldsGroups = [
|
|||||||
label: 'Estimate No.',
|
label: 'Estimate No.',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelKey: 'dateIssueLabel',
|
labelKey: 'estimateDateLabel',
|
||||||
enableKey: 'showDateIssue',
|
enableKey: 'showEstimateDate',
|
||||||
label: 'Issue Date',
|
label: 'Issue Date',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -93,12 +85,6 @@ export const fieldsGroups = [
|
|||||||
enableKey: 'showSubtotal',
|
enableKey: 'showSubtotal',
|
||||||
label: 'Subtotal',
|
label: 'Subtotal',
|
||||||
},
|
},
|
||||||
{
|
|
||||||
labelKey: 'discountLabel',
|
|
||||||
enableKey: 'showDiscount',
|
|
||||||
label: 'Discount',
|
|
||||||
},
|
|
||||||
{ enableKey: 'showTaxes', label: 'Taxes' },
|
|
||||||
{ labelKey: 'totalLabel', enableKey: 'showTotal', label: 'Total' },
|
{ labelKey: 'totalLabel', enableKey: 'showTotal', label: 'Total' },
|
||||||
],
|
],
|
||||||
},
|
},
|
||||||
@@ -111,8 +97,8 @@ export const fieldsGroups = [
|
|||||||
label: 'Terms & Conditions',
|
label: 'Terms & Conditions',
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
labelKey: 'statementLabel',
|
labelKey: 'customerNoteLabel',
|
||||||
enableKey: 'showStatement',
|
enableKey: 'showCustomerNote',
|
||||||
label: 'Statement',
|
label: 'Statement',
|
||||||
labelPlaceholder: 'Statement',
|
labelPlaceholder: 'Statement',
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -8,14 +8,14 @@ export interface EstimateCustomizeValues {
|
|||||||
companyLogo?: string;
|
companyLogo?: string;
|
||||||
|
|
||||||
// Top details.
|
// Top details.
|
||||||
showInvoiceNumber?: boolean;
|
estimateNumberLabel?: string;
|
||||||
invoiceNumberLabel?: string;
|
showEstimateNumber?: boolean;
|
||||||
|
|
||||||
showDateIssue?: boolean;
|
showExpirationDate?: boolean;
|
||||||
dateIssueLabel?: string;
|
expirationDateLabel?: string;
|
||||||
|
|
||||||
showDueDate?: boolean;
|
estimateDateLabel?: string;
|
||||||
dueDateLabel?: string;
|
showEstimateDate?: boolean;
|
||||||
|
|
||||||
// Company name
|
// Company name
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
@@ -35,24 +35,13 @@ export interface EstimateCustomizeValues {
|
|||||||
showSubtotal?: boolean;
|
showSubtotal?: boolean;
|
||||||
subtotalLabel?: string;
|
subtotalLabel?: string;
|
||||||
|
|
||||||
showDiscount?: boolean;
|
|
||||||
discountLabel?: string;
|
|
||||||
|
|
||||||
showTaxes?: boolean;
|
|
||||||
|
|
||||||
showTotal?: boolean;
|
showTotal?: boolean;
|
||||||
totalLabel?: string;
|
totalLabel?: string;
|
||||||
|
|
||||||
paymentMadeLabel?: string;
|
// Statements
|
||||||
showPaymentMade?: boolean;
|
showCustomerNote?: boolean;
|
||||||
|
customerNoteLabel?: string;
|
||||||
|
|
||||||
dueAmountLabel?: string;
|
|
||||||
showDueAmount?: boolean;
|
|
||||||
|
|
||||||
// Footer paragraphs.
|
|
||||||
termsConditionsLabel?: string;
|
|
||||||
showTermsConditions?: boolean;
|
showTermsConditions?: boolean;
|
||||||
|
termsConditionsLabel?: string;
|
||||||
statementLabel?: string;
|
|
||||||
showStatement?: boolean;
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ import { Classes, Text } from '@blueprintjs/core';
|
|||||||
import { FFormGroup, FSwitch, Group, Stack } from '@/components';
|
import { FFormGroup, FSwitch, Group, Stack } from '@/components';
|
||||||
import { FColorInput } from '@/components/Forms/FColorInput';
|
import { FColorInput } from '@/components/Forms/FColorInput';
|
||||||
import { CreditCardIcon } from '@/icons/CreditCardIcon';
|
import { CreditCardIcon } from '@/icons/CreditCardIcon';
|
||||||
import styles from './InvoiceCustomizeFields.module.scss';
|
|
||||||
|
|
||||||
export function InvoiceCustomizeGeneralField() {
|
export function InvoiceCustomizeGeneralField() {
|
||||||
return (
|
return (
|
||||||
@@ -20,7 +19,7 @@ export function InvoiceCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'primaryColor'}
|
name={'primaryColor'}
|
||||||
label={'Primary Color'}
|
label={'Primary Color'}
|
||||||
className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -34,7 +33,7 @@ export function InvoiceCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'secondaryColor'}
|
name={'secondaryColor'}
|
||||||
label={'Secondary Color'}
|
label={'Secondary Color'}
|
||||||
className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -49,7 +48,7 @@ export function InvoiceCustomizeGeneralField() {
|
|||||||
<FSwitch
|
<FSwitch
|
||||||
name={'showCompanyLogo'}
|
name={'showCompanyLogo'}
|
||||||
label={'Display company logo in the paper'}
|
label={'Display company logo in the paper'}
|
||||||
className={styles.showCompanyLogoField}
|
style={{ fontSize: 14 }}
|
||||||
large
|
large
|
||||||
fastField
|
fastField
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -1,8 +1,11 @@
|
|||||||
// @ts-nocheck
|
// @ts-nocheck
|
||||||
import { FInputGroup, FSwitch, Group, Stack } from '@/components';
|
import { Stack } from '@/components';
|
||||||
import { CLASSES } from '@/constants';
|
|
||||||
import { Classes } from '@blueprintjs/core';
|
import { Classes } from '@blueprintjs/core';
|
||||||
import { fieldsGroups } from './constants';
|
import { fieldsGroups } from './constants';
|
||||||
|
import {
|
||||||
|
ElementCustomizeFieldsGroup,
|
||||||
|
ElementCustomizeContentItemFieldGroup,
|
||||||
|
} from '@/containers/ElementCustomize/ElementCustomizeFieldsGroup';
|
||||||
|
|
||||||
export function InvoiceCustomizeContentFields() {
|
export function InvoiceCustomizeContentFields() {
|
||||||
return (
|
return (
|
||||||
@@ -20,25 +23,20 @@ export function InvoiceCustomizeContentFields() {
|
|||||||
|
|
||||||
<Stack>
|
<Stack>
|
||||||
{fieldsGroups.map((group) => (
|
{fieldsGroups.map((group) => (
|
||||||
<>
|
<ElementCustomizeFieldsGroup label={group.label}>
|
||||||
<h4 className={CLASSES.TEXT_MUTED} style={{ fontWeight: 600 }}>
|
{group.fields.map((item, index) => (
|
||||||
{group.label}
|
<ElementCustomizeContentItemFieldGroup
|
||||||
</h4>
|
key={index}
|
||||||
<Stack spacing={14}>
|
inputGroupProps={{
|
||||||
{group.fields.map((item, index) => (
|
name: item.enableKey,
|
||||||
<Group spacing={14} position={'apart'} key={index}>
|
label: item.label,
|
||||||
<FSwitch name={item.enableKey} label={item.label} fastField />
|
}}
|
||||||
{item.labelKey && (
|
switchProps={{
|
||||||
<FInputGroup
|
name: item.labelKey,
|
||||||
name={item.labelKey}
|
}}
|
||||||
style={{ maxWidth: 150 }}
|
/>
|
||||||
fastField
|
))}
|
||||||
/>
|
</ElementCustomizeFieldsGroup>
|
||||||
)}
|
|
||||||
</Group>
|
|
||||||
))}
|
|
||||||
</Stack>
|
|
||||||
</>
|
|
||||||
))}
|
))}
|
||||||
</Stack>
|
</Stack>
|
||||||
</Stack>
|
</Stack>
|
||||||
|
|||||||
@@ -22,7 +22,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.details {
|
.details {
|
||||||
margin-bottom: 25px;
|
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
gap: 4px;
|
gap: 4px;
|
||||||
@@ -40,7 +39,6 @@
|
|||||||
.addressRoot{
|
.addressRoot{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
margin-bottom: 25px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.addressBillTo{
|
.addressBillTo{
|
||||||
@@ -101,7 +99,6 @@
|
|||||||
.totals{
|
.totals{
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: column;
|
flex-direction: column;
|
||||||
margin-bottom: 40px;
|
|
||||||
margin-left: auto;
|
margin-left: auto;
|
||||||
width: 300px;
|
width: 300px;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -2,6 +2,9 @@ import clsx from 'classnames';
|
|||||||
import * as R from 'ramda';
|
import * as R from 'ramda';
|
||||||
import { useFormikContext } from 'formik';
|
import { useFormikContext } from 'formik';
|
||||||
import styles from './InvoicePaperTemplate.module.scss';
|
import styles from './InvoicePaperTemplate.module.scss';
|
||||||
|
import { PaperTemplate } from './PaperTemplate';
|
||||||
|
import { Group, Stack } from '@/components';
|
||||||
|
import React from 'react';
|
||||||
|
|
||||||
interface PapaerLine {
|
interface PapaerLine {
|
||||||
item?: string;
|
item?: string;
|
||||||
@@ -85,15 +88,14 @@ interface PaperTemplateProps {
|
|||||||
lines?: Array<PapaerLine>;
|
lines?: Array<PapaerLine>;
|
||||||
taxes?: Array<PaperTax>;
|
taxes?: Array<PaperTax>;
|
||||||
|
|
||||||
billedFromAddres?: Array<string>;
|
billedFromAddres?: Array<string | React.ReactNode>;
|
||||||
billedToAddress?: Array<string>;
|
billedToAddress?: Array<string | React.ReactNode>;
|
||||||
}
|
}
|
||||||
|
|
||||||
function InvoicePaperTemplateRoot({
|
function InvoicePaperTemplateRoot({
|
||||||
primaryColor,
|
primaryColor,
|
||||||
secondaryColor,
|
secondaryColor,
|
||||||
|
|
||||||
bigtitle = 'Invoice',
|
|
||||||
companyName = 'Bigcapital Technology, Inc.',
|
companyName = 'Bigcapital Technology, Inc.',
|
||||||
|
|
||||||
showCompanyLogo = true,
|
showCompanyLogo = true,
|
||||||
@@ -183,156 +185,109 @@ function InvoicePaperTemplateRoot({
|
|||||||
],
|
],
|
||||||
}: PaperTemplateProps) {
|
}: PaperTemplateProps) {
|
||||||
return (
|
return (
|
||||||
<div className={styles.root}>
|
<PaperTemplate
|
||||||
<style>{`:root { --invoice-primary-color: ${primaryColor}; --invoice-secondary-color: ${secondaryColor}; }`}</style>
|
primaryColor={primaryColor}
|
||||||
|
secondaryColor={secondaryColor}
|
||||||
<div>
|
showCompanyLogo={showCompanyLogo}
|
||||||
<h1 className={styles.bigTitle}>{bigtitle}</h1>
|
companyLogo={companyLogo}
|
||||||
|
bigtitle={'Invoice'}
|
||||||
{showCompanyLogo && (
|
>
|
||||||
<div className={styles.logoWrap}>
|
<Stack spacing={24}>
|
||||||
<img alt="" src={companyLogo} />
|
<PaperTemplate.TermsList>
|
||||||
</div>
|
{showInvoiceNumber && (
|
||||||
)}
|
<PaperTemplate.TermsItem label={invoiceNumberLabel}>
|
||||||
</div>
|
{invoiceNumber}
|
||||||
|
</PaperTemplate.TermsItem>
|
||||||
<div className={styles.details}>
|
|
||||||
{showInvoiceNumber && (
|
|
||||||
<div className={styles.detail}>
|
|
||||||
<div className={styles.detailLabel}>{invoiceNumberLabel}</div>
|
|
||||||
<div>{invoiceNumber}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{showDateIssue && (
|
|
||||||
<div className={styles.detail}>
|
|
||||||
<div className={styles.detailLabel}>{dateIssueLabel}</div>
|
|
||||||
<div>{dateIssue}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
{showDueDate && (
|
|
||||||
<div className={styles.detail}>
|
|
||||||
<div className={styles.detailLabel}>{dueDateLabel}</div>
|
|
||||||
<div>{dueDate}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div className={styles.addressRoot}>
|
|
||||||
{showBilledFromAddress && (
|
|
||||||
<div className={styles.addressBillTo}>
|
|
||||||
<strong>{companyName}</strong> <br />
|
|
||||||
{billedFromAddres.map((text, index) => (
|
|
||||||
<div key={index}>{text}</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
|
|
||||||
{showBillingToAddress && (
|
|
||||||
<div className={styles.addressFrom}>
|
|
||||||
<strong>{billedToLabel}</strong> <br />
|
|
||||||
{billedToAddress.map((text, index) => (
|
|
||||||
<div key={index}>{text}</div>
|
|
||||||
))}
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<table className={styles.table}>
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th>{lineItemLabel}</th>
|
|
||||||
<th>{lineDescriptionLabel}</th>
|
|
||||||
<th className={styles.rate}>{lineRateLabel}</th>
|
|
||||||
<th className={styles.total}>{lineTotalLabel}</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
|
|
||||||
<tbody className={styles.tableBody}>
|
|
||||||
{lines.map((line, index) => (
|
|
||||||
<tr key={index}>
|
|
||||||
<td>{line.item}</td>
|
|
||||||
<td>{line.description}</td>
|
|
||||||
<td className={styles.rate}>
|
|
||||||
{line.quantity} X {line.rate}
|
|
||||||
</td>
|
|
||||||
<td className={styles.total}>{line.total}</td>
|
|
||||||
</tr>
|
|
||||||
))}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
|
|
||||||
<div style={{ display: 'flex' }}>
|
|
||||||
<div className={styles.totals}>
|
|
||||||
{showSubtotal && (
|
|
||||||
<div
|
|
||||||
className={clsx(
|
|
||||||
styles.totalsItem,
|
|
||||||
styles.totalBottomGrayBordered,
|
|
||||||
)}
|
|
||||||
>
|
|
||||||
<div className={styles.totalsItemLabel}>{subtotalLabel}</div>
|
|
||||||
<div className={styles.totalsItemAmount}>{subtotal}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
{showDateIssue && (
|
||||||
{showDiscount && (
|
<PaperTemplate.TermsItem label={dateIssueLabel}>
|
||||||
<div className={styles.totalsItem}>
|
{dateIssue}
|
||||||
<div className={styles.totalsItemLabel}>{discountLabel}</div>
|
</PaperTemplate.TermsItem>
|
||||||
<div className={styles.totalsItemAmount}>{discount}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
{showDueDate && (
|
||||||
{showTaxes && (
|
<PaperTemplate.TermsItem label={dueDateLabel}>
|
||||||
<>
|
{dueDate}
|
||||||
{taxes.map((tax, index) => (
|
</PaperTemplate.TermsItem>
|
||||||
<div key={index} className={styles.totalsItem}>
|
|
||||||
<div className={styles.totalsItemLabel}>{tax.label}</div>
|
|
||||||
<div className={styles.totalsItemAmount}>{tax.amount}</div>
|
|
||||||
</div>
|
|
||||||
))}
|
|
||||||
</>
|
|
||||||
)}
|
)}
|
||||||
|
</PaperTemplate.TermsList>
|
||||||
|
|
||||||
{showTotal && (
|
<Group spacing={10}>
|
||||||
<div
|
{showBilledFromAddress && (
|
||||||
className={clsx(styles.totalsItem, styles.totalBottomBordered)}
|
<PaperTemplate.Address
|
||||||
>
|
items={[<strong>{companyName}</strong>, ...billedFromAddres]}
|
||||||
<div className={styles.totalsItemLabel}>{totalLabel}</div>
|
/>
|
||||||
<div className={styles.totalsItemAmount}>{total}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
{showBillingToAddress && (
|
||||||
{showPaymentMade && (
|
<PaperTemplate.Address items={billedToAddress} />
|
||||||
<div className={styles.totalsItem}>
|
|
||||||
<div className={styles.totalsItemLabel}>{paymentMadeLabel}</div>
|
|
||||||
<div className={styles.totalsItemAmount}>{paymentMade}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
)}
|
||||||
|
</Group>
|
||||||
|
|
||||||
{showBalanceDue && (
|
<Stack spacing={0}>
|
||||||
<div
|
<PaperTemplate.Table
|
||||||
className={clsx(styles.totalsItem, styles.totalBottomBordered)}
|
columns={[
|
||||||
>
|
{ label: lineItemLabel, accessor: 'item' },
|
||||||
<div className={styles.totalsItemLabel}>{balanceDueLabel}</div>
|
{ label: lineDescriptionLabel, accessor: 'description' },
|
||||||
<div className={styles.totalsItemAmount}>{balanceDue}</div>
|
{ label: lineRateLabel, accessor: 'rate' },
|
||||||
</div>
|
{ label: lineTotalLabel, accessor: 'total' },
|
||||||
|
]}
|
||||||
|
data={lines}
|
||||||
|
/>
|
||||||
|
<PaperTemplate.Totals>
|
||||||
|
{showSubtotal && (
|
||||||
|
<PaperTemplate.TotalLine
|
||||||
|
label={subtotalLabel}
|
||||||
|
amount={subtotal}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{showDiscount && (
|
||||||
|
<PaperTemplate.TotalLine
|
||||||
|
label={discountLabel}
|
||||||
|
amount={discount}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{showTaxes && (
|
||||||
|
<>
|
||||||
|
{taxes.map((tax, index) => (
|
||||||
|
<PaperTemplate.TotalLine
|
||||||
|
key={index}
|
||||||
|
label={tax.label}
|
||||||
|
amount={tax.amount}
|
||||||
|
/>
|
||||||
|
))}
|
||||||
|
</>
|
||||||
|
)}
|
||||||
|
{showTotal && (
|
||||||
|
<PaperTemplate.TotalLine label={totalLabel} amount={total} />
|
||||||
|
)}
|
||||||
|
{showPaymentMade && (
|
||||||
|
<PaperTemplate.TotalLine
|
||||||
|
label={paymentMadeLabel}
|
||||||
|
amount={paymentMade}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
{showBalanceDue && (
|
||||||
|
<PaperTemplate.TotalLine
|
||||||
|
label={balanceDueLabel}
|
||||||
|
amount={balanceDue}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
|
</PaperTemplate.Totals>
|
||||||
|
</Stack>
|
||||||
|
|
||||||
|
<Stack spacing={0}>
|
||||||
|
{showTermsConditions && (
|
||||||
|
<PaperTemplate.Statement label={termsConditionsLabel}>
|
||||||
|
{termsConditions}
|
||||||
|
</PaperTemplate.Statement>
|
||||||
)}
|
)}
|
||||||
</div>
|
{showStatement && (
|
||||||
</div>
|
<PaperTemplate.Statement label={statementLabel}>
|
||||||
|
{statement}
|
||||||
{showTermsConditions && (
|
</PaperTemplate.Statement>
|
||||||
<div className={styles.paragraph}>
|
)}
|
||||||
<div className={styles.paragraphLabel}>{termsConditionsLabel}</div>
|
</Stack>
|
||||||
<div>{termsConditions}</div>
|
</Stack>
|
||||||
</div>
|
</PaperTemplate>
|
||||||
)}
|
|
||||||
{showStatement && (
|
|
||||||
<div className={styles.paragraph}>
|
|
||||||
<div className={styles.paragraphLabel}>{statementLabel}</div>
|
|
||||||
<div>{statement}</div>
|
|
||||||
</div>
|
|
||||||
)}
|
|
||||||
</div>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -94,7 +94,11 @@ PaperTemplate.MutedText = () => {};
|
|||||||
|
|
||||||
PaperTemplate.Text = () => {};
|
PaperTemplate.Text = () => {};
|
||||||
|
|
||||||
PaperTemplate.Address = ({ items }: { items: Array<string> }) => {
|
PaperTemplate.Address = ({
|
||||||
|
items,
|
||||||
|
}: {
|
||||||
|
items: Array<string | React.ReactNode>;
|
||||||
|
}) => {
|
||||||
return (
|
return (
|
||||||
<Stack spacing={0}>
|
<Stack spacing={0}>
|
||||||
{items.map((item, index) => (
|
{items.map((item, index) => (
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
import React from 'react';
|
import React from 'react';
|
||||||
import { Box } from '@/components';
|
import { useFormikContext } from 'formik';
|
||||||
import { Classes } from '@blueprintjs/core';
|
import { Classes } from '@blueprintjs/core';
|
||||||
|
import { Box } from '@/components';
|
||||||
import { ElementCustomize } from '../../../ElementCustomize/ElementCustomize';
|
import { ElementCustomize } from '../../../ElementCustomize/ElementCustomize';
|
||||||
import { PaymentReceivedCustomizeGeneralField } from './PaymentReceivedCustomizeFieldsGeneral';
|
import { PaymentReceivedCustomizeGeneralField } from './PaymentReceivedCustomizeFieldsGeneral';
|
||||||
import { PaymentReceivedCustomizeContentFields } from './PaymentReceivedCustomizeFieldsContent';
|
import { PaymentReceivedCustomizeContentFields } from './PaymentReceivedCustomizeFieldsContent';
|
||||||
@@ -18,7 +19,7 @@ export default function PaymentReceivedCustomizeContent() {
|
|||||||
onSubmit={handleFormSubmit}
|
onSubmit={handleFormSubmit}
|
||||||
>
|
>
|
||||||
<ElementCustomize.PaperTemplate>
|
<ElementCustomize.PaperTemplate>
|
||||||
<PaymentReceivedPaperTemplate />
|
<PaymentReceivedPaperTemplateFormConnected />
|
||||||
</ElementCustomize.PaperTemplate>
|
</ElementCustomize.PaperTemplate>
|
||||||
|
|
||||||
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
||||||
@@ -36,3 +37,9 @@ export default function PaymentReceivedCustomizeContent() {
|
|||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function PaymentReceivedPaperTemplateFormConnected() {
|
||||||
|
const { values } = useFormikContext<PaymentReceivedCustomizeValues>();
|
||||||
|
|
||||||
|
return <PaymentReceivedPaperTemplate {...values} />;
|
||||||
|
}
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ export function PaymentReceivedCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'primaryColor'}
|
name={'primaryColor'}
|
||||||
label={'Primary Color'}
|
label={'Primary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -33,7 +33,7 @@ export function PaymentReceivedCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'secondaryColor'}
|
name={'secondaryColor'}
|
||||||
label={'Secondary Color'}
|
label={'Secondary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -48,7 +48,7 @@ export function PaymentReceivedCustomizeGeneralField() {
|
|||||||
<FSwitch
|
<FSwitch
|
||||||
name={'showCompanyLogo'}
|
name={'showCompanyLogo'}
|
||||||
label={'Display company logo in the paper'}
|
label={'Display company logo in the paper'}
|
||||||
// className={styles.showCompanyLogoField}
|
style={{ fontSize: 14 }}
|
||||||
large
|
large
|
||||||
fastField
|
fastField
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ import { ReceiptCustomizeFieldsContent } from './ReceiptCustomizeFieldsContent';
|
|||||||
import { ReceiptPaperTemplate } from './ReceiptPaperTemplate';
|
import { ReceiptPaperTemplate } from './ReceiptPaperTemplate';
|
||||||
import { ReceiptCustomizeValues } from './types';
|
import { ReceiptCustomizeValues } from './types';
|
||||||
import { initialValues } from './constants';
|
import { initialValues } from './constants';
|
||||||
|
import { useFormikContext } from 'formik';
|
||||||
|
|
||||||
export default function ReceiptCustomizeContent() {
|
export default function ReceiptCustomizeContent() {
|
||||||
const handleFormSubmit = (values: ReceiptCustomizeValues) => {};
|
const handleFormSubmit = (values: ReceiptCustomizeValues) => {};
|
||||||
@@ -17,7 +18,7 @@ export default function ReceiptCustomizeContent() {
|
|||||||
onSubmit={handleFormSubmit}
|
onSubmit={handleFormSubmit}
|
||||||
>
|
>
|
||||||
<ElementCustomize.PaperTemplate>
|
<ElementCustomize.PaperTemplate>
|
||||||
<ReceiptPaperTemplate />
|
<ReceiptPaperTemplateFormConnected />
|
||||||
</ElementCustomize.PaperTemplate>
|
</ElementCustomize.PaperTemplate>
|
||||||
|
|
||||||
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
<ElementCustomize.FieldsTab id={'general'} label={'General'}>
|
||||||
@@ -35,3 +36,9 @@ export default function ReceiptCustomizeContent() {
|
|||||||
</Box>
|
</Box>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function ReceiptPaperTemplateFormConnected() {
|
||||||
|
const { values } = useFormikContext<ReceiptCustomizeValues>();
|
||||||
|
|
||||||
|
return <ReceiptPaperTemplate {...values} />;
|
||||||
|
}
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
import { Classes } from '@blueprintjs/core';
|
import { Classes } from '@blueprintjs/core';
|
||||||
import { FFormGroup, FSwitch, Stack } from '@/components';
|
import { FFormGroup, FSwitch, Stack } from '@/components';
|
||||||
import { FColorInput } from '@/components/Forms/FColorInput';
|
import { FColorInput } from '@/components/Forms/FColorInput';
|
||||||
// import styles from './InvoiceCustomizeFields.module.scss';
|
|
||||||
|
|
||||||
export function ReceiptCustomizeGeneralField() {
|
export function ReceiptCustomizeGeneralField() {
|
||||||
return (
|
return (
|
||||||
@@ -19,7 +18,7 @@ export function ReceiptCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'primaryColor'}
|
name={'primaryColor'}
|
||||||
label={'Primary Color'}
|
label={'Primary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -33,7 +32,7 @@ export function ReceiptCustomizeGeneralField() {
|
|||||||
<FFormGroup
|
<FFormGroup
|
||||||
name={'secondaryColor'}
|
name={'secondaryColor'}
|
||||||
label={'Secondary Color'}
|
label={'Secondary Color'}
|
||||||
// className={styles.fieldGroup}
|
style={{ justifyContent: 'space-between' }}
|
||||||
inline
|
inline
|
||||||
fastField
|
fastField
|
||||||
>
|
>
|
||||||
@@ -48,7 +47,7 @@ export function ReceiptCustomizeGeneralField() {
|
|||||||
<FSwitch
|
<FSwitch
|
||||||
name={'showCompanyLogo'}
|
name={'showCompanyLogo'}
|
||||||
label={'Display company logo in the paper'}
|
label={'Display company logo in the paper'}
|
||||||
// className={styles.showCompanyLogoField}
|
style={{ fontSize: 14 }}
|
||||||
large
|
large
|
||||||
fastField
|
fastField
|
||||||
/>
|
/>
|
||||||
|
|||||||
@@ -10,13 +10,10 @@ export const initialValues = {
|
|||||||
|
|
||||||
// Top details.
|
// Top details.
|
||||||
showReceiptNumber: true,
|
showReceiptNumber: true,
|
||||||
receiptNumberLabel: 'Invoice number',
|
receiptNumberLabel: 'Receipt number',
|
||||||
|
|
||||||
showDateIssue: true,
|
showReceiptDate: true,
|
||||||
dateIssueLabel: 'Date of Issue',
|
receiptDateLabel: 'Date of Issue',
|
||||||
|
|
||||||
showDueDate: true,
|
|
||||||
dueDateLabel: 'Due Date',
|
|
||||||
|
|
||||||
// Company name
|
// Company name
|
||||||
companyName: 'Bigcapital Technology, Inc.',
|
companyName: 'Bigcapital Technology, Inc.',
|
||||||
@@ -36,24 +33,13 @@ export const initialValues = {
|
|||||||
showSubtotal: true,
|
showSubtotal: true,
|
||||||
subtotalLabel: 'Subtotal',
|
subtotalLabel: 'Subtotal',
|
||||||
|
|
||||||
showDiscount: true,
|
|
||||||
discountLabel: 'Discount',
|
|
||||||
|
|
||||||
showTaxes: true,
|
|
||||||
|
|
||||||
showTotal: true,
|
showTotal: true,
|
||||||
totalLabel: 'Total',
|
totalLabel: 'Total',
|
||||||
|
|
||||||
paymentMadeLabel: 'Payment Made',
|
|
||||||
showPaymentMade: true,
|
|
||||||
|
|
||||||
dueAmountLabel: 'Due Amount',
|
|
||||||
showDueAmount: true,
|
|
||||||
|
|
||||||
// Footer paragraphs.
|
// Footer paragraphs.
|
||||||
termsConditionsLabel: 'Terms & Conditions',
|
termsConditionsLabel: 'Terms & Conditions',
|
||||||
showTermsConditions: true,
|
showTermsConditions: true,
|
||||||
|
|
||||||
statementLabel: 'Statement',
|
customerNoteLabel: 'Customer Note',
|
||||||
showStatement: true,
|
showCustomerNote: true,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -8,14 +8,11 @@ export interface ReceiptCustomizeValues {
|
|||||||
companyLogo?: string;
|
companyLogo?: string;
|
||||||
|
|
||||||
// Top details.
|
// Top details.
|
||||||
showInvoiceNumber?: boolean;
|
showReceiptNumber?: boolean;
|
||||||
invoiceNumberLabel?: string;
|
receiptNumberLabel?: string;
|
||||||
|
|
||||||
showDateIssue?: boolean;
|
showReceiptDate?: boolean;
|
||||||
dateIssueLabel?: string;
|
receiptDateLabel?: string;
|
||||||
|
|
||||||
showDueDate?: boolean;
|
|
||||||
dueDateLabel?: string;
|
|
||||||
|
|
||||||
// Company name
|
// Company name
|
||||||
companyName?: string;
|
companyName?: string;
|
||||||
@@ -35,24 +32,13 @@ export interface ReceiptCustomizeValues {
|
|||||||
showSubtotal?: boolean;
|
showSubtotal?: boolean;
|
||||||
subtotalLabel?: string;
|
subtotalLabel?: string;
|
||||||
|
|
||||||
showDiscount?: boolean;
|
|
||||||
discountLabel?: string;
|
|
||||||
|
|
||||||
showTaxes?: boolean;
|
|
||||||
|
|
||||||
showTotal?: boolean;
|
showTotal?: boolean;
|
||||||
totalLabel?: string;
|
totalLabel?: string;
|
||||||
|
|
||||||
paymentMadeLabel?: string;
|
// Statements
|
||||||
showPaymentMade?: boolean;
|
|
||||||
|
|
||||||
dueAmountLabel?: string;
|
|
||||||
showDueAmount?: boolean;
|
|
||||||
|
|
||||||
// Footer paragraphs.
|
|
||||||
termsConditionsLabel?: string;
|
termsConditionsLabel?: string;
|
||||||
showTermsConditions?: boolean;
|
showTermsConditions?: boolean;
|
||||||
|
|
||||||
statementLabel?: string;
|
customerNoteLabel?: string;
|
||||||
showStatement?: boolean;
|
showCustomerNote?: boolean;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user