mirror of
https://github.com/bigcapitalhq/bigcapital.git
synced 2026-02-18 05:40:31 +00:00
fix: discount and adjustment of sale and purchase transactions
This commit is contained in:
@@ -16,6 +16,7 @@ import {
|
||||
PaperTemplateProps,
|
||||
PaperTemplateTotalBorder,
|
||||
} from './PaperTemplate';
|
||||
import { theme } from '../constants';
|
||||
|
||||
export interface EstimatePaperTemplateProps extends PaperTemplateProps {
|
||||
// # Company
|
||||
@@ -173,6 +174,7 @@ export function EstimatePaperTemplate({
|
||||
lineRateLabel = 'Rate',
|
||||
lineTotalLabel = 'Total',
|
||||
}: EstimatePaperTemplateProps) {
|
||||
|
||||
return (
|
||||
<PaperTemplate primaryColor={primaryColor} secondaryColor={secondaryColor}>
|
||||
<Stack spacing={24}>
|
||||
@@ -228,13 +230,13 @@ export function EstimatePaperTemplate({
|
||||
<Text>{data.item}</Text>
|
||||
<Text
|
||||
fontSize={'12px'}
|
||||
// className={Classes.TEXT_MUTED}
|
||||
// style={{ fontSize: 12 }}
|
||||
color={theme.colors['cool-gray-500']}
|
||||
>
|
||||
{data.description}
|
||||
</Text>
|
||||
</Stack>
|
||||
),
|
||||
thStyle: { width: '60%' },
|
||||
},
|
||||
{ label: lineQuantityLabel, accessor: 'quantity' },
|
||||
{ label: lineRateLabel, accessor: 'rate', align: 'right' },
|
||||
|
||||
@@ -118,23 +118,27 @@ export interface InvoicePaperTemplateProps extends PaperTemplateProps {
|
||||
}
|
||||
|
||||
export function InvoicePaperTemplate({
|
||||
// # Colors
|
||||
primaryColor,
|
||||
secondaryColor,
|
||||
|
||||
// # Company.
|
||||
companyName = 'Bigcapital Technology, Inc.',
|
||||
|
||||
showCompanyLogo = true,
|
||||
companyLogoUri = '',
|
||||
|
||||
// # Due date
|
||||
dueDate = 'September 3, 2024',
|
||||
dueDateLabel = 'Date due',
|
||||
showDueDate = true,
|
||||
|
||||
// # Issue date.
|
||||
dateIssue = 'September 3, 2024',
|
||||
dateIssueLabel = 'Date of issue',
|
||||
showDateIssue = true,
|
||||
|
||||
// dateIssue,
|
||||
// Invoice #,
|
||||
invoiceNumberLabel = 'Invoice number',
|
||||
invoiceNumber = '346D3D40-0001',
|
||||
showInvoiceNumber = true,
|
||||
@@ -197,6 +201,7 @@ export function InvoicePaperTemplate({
|
||||
{ label: 'Sample Tax2 (7.00%)', amount: '21.74' },
|
||||
],
|
||||
|
||||
// # Statement
|
||||
statementLabel = 'Statement',
|
||||
showStatement = true,
|
||||
statement = DefaultPdfTemplateStatement,
|
||||
|
||||
@@ -16,6 +16,7 @@ import {
|
||||
DefaultPdfTemplateAddressBilledTo,
|
||||
DefaultPdfTemplateAddressBilledFrom,
|
||||
} from './_constants';
|
||||
import { theme } from '../constants';
|
||||
|
||||
export interface ReceiptPaperTemplateProps extends PaperTemplateProps {
|
||||
// # Company logo
|
||||
@@ -216,8 +217,7 @@ export function ReceiptPaperTemplate({
|
||||
<Text>{data.item}</Text>
|
||||
<Text
|
||||
fontSize={'12px'}
|
||||
// className={Classes.TEXT_MUTED}
|
||||
// style={{ fontSize: 12 }}
|
||||
color={theme.colors['cool-gray-500']}
|
||||
>
|
||||
{data.description}
|
||||
</Text>
|
||||
@@ -255,7 +255,7 @@ export function ReceiptPaperTemplate({
|
||||
<PaperTemplate.TotalLine
|
||||
label={totalLabel}
|
||||
amount={total}
|
||||
border={PaperTemplateTotalBorder.Gray}
|
||||
border={PaperTemplateTotalBorder.Dark}
|
||||
style={{ fontWeight: 500 }}
|
||||
/>
|
||||
)}
|
||||
|
||||
@@ -1,5 +1,11 @@
|
||||
import { defaultTheme } from "@xstyled/system";
|
||||
|
||||
export const OpenSansFontLink = `
|
||||
<link rel="preconnect" href="https://fonts.googleapis.com">
|
||||
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
|
||||
<link href="https://fonts.googleapis.com/css2?family=Open+Sans:ital,wght@0,300..800;1,300..800&family=Roboto:ital,wght@0,100;0,300;0,400;0,500;0,700;0,900;1,100;1,300;1,400;1,500;1,700;1,900&display=swap" rel="stylesheet">
|
||||
`;
|
||||
|
||||
export const theme = {
|
||||
...defaultTheme,
|
||||
}
|
||||
Reference in New Issue
Block a user