import { Stack } from '@/components'; import { PaperTemplate, PaperTemplateProps, } from '../../Invoices/InvoiceCustomize/PaperTemplate'; export interface ReceiptPaperTemplateProps extends PaperTemplateProps { // Addresses billedToAddress?: Array; billedFromAddress?: Array; showBilledFromAddress?: boolean; showBilledToAddress?: boolean; billedToLabel?: string; // Total total?: string; showTotal?: boolean; totalLabel?: string; // Subtotal subtotal?: string; showSubtotal?: boolean; subtotalLabel?: string; // Customer Note showCustomerNote?: boolean; customerNote?: string; customerNoteLabel?: string; // Terms & Conditions showTermsConditions?: boolean; termsConditions?: string; termsConditionsLabel?: string; // Lines lines?: Array<{ item: string; description: string; rate: string; quantity: string; total: string; }>; // Receipt Date. receiptDateLabel?: string; showReceiptDate?: boolean; receiptDate?: string; // Receipt Number receiptNumebr?: string; receiptNumberLabel?: string; showReceiptNumber?: boolean; } export function ReceiptPaperTemplate({ // # Colors primaryColor, secondaryColor, // # Company logo showCompanyLogo = true, companyLogoUri, // # Company name companyName = 'Bigcapital Technology, Inc.', // # Address billedToAddress = [ 'Bigcapital Technology, Inc.', '131 Continental Dr Suite 305 Newark,', 'Delaware 19713', 'United States', '+1 762-339-5634', 'ahmed@bigcapital.app', ], billedFromAddress = [ '131 Continental Dr Suite 305 Newark,', 'Delaware 19713', 'United States', '+1 762-339-5634', 'ahmed@bigcapital.app', ], showBilledFromAddress = true, showBilledToAddress = true, billedToLabel = 'Billed To', total = '$1000.00', totalLabel = 'Total', showTotal = true, subtotal = '1000/00', subtotalLabel = 'Subtotal', showSubtotal = true, showCustomerNote = true, customerNote = 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.', customerNoteLabel = 'Customer Note', showTermsConditions = true, termsConditions = 'It is a long established fact that a reader will be distracted by the readable content of a page when looking at its layout.', termsConditionsLabel = 'Terms & Conditions', lines = [ { item: 'Simply dummy text', description: 'Simply dummy text of the printing and typesetting', rate: '1', quantity: '1000', total: '$1000.00', }, ], showReceiptNumber = true, receiptNumberLabel = 'Receipt Number', receiptNumebr = '346D3D40-0001', receiptDate = 'September 3, 2024', showReceiptDate = true, receiptDateLabel = 'Receipt Date', }: ReceiptPaperTemplateProps) { return ( {showReceiptNumber && ( {receiptNumebr} )} {showReceiptDate && ( {receiptDate} )} {showBilledFromAddress && ( {companyName}, ...billedFromAddress]} /> )} {showBilledToAddress && ( {billedToLabel}, ...billedToAddress]} /> )} {showSubtotal && ( )} {showTotal && ( )} {showCustomerNote && ( {customerNote} )} {showTermsConditions && ( {termsConditions} )} ); }