import { Group, Stack } from '@/components'; import { PaperTemplate, PaperTemplateProps, } from '../../Invoices/InvoiceCustomize/PaperTemplate'; export interface CreditNotePaperTemplateProps extends PaperTemplateProps { // Address billedToAddress?: Array; billedFromAddress?: Array; showBilledToAddress?: boolean; showBilledFromAddress?: 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; }>; // Date issue. creditNoteDateLabel?: string; showCreditNoteDate?: boolean; creditNoteDate?: string; // Credit Number. creditNoteNumebr?: string; creditNoteNumberLabel?: string; showCreditNoteNumber?: boolean; } export function CreditNotePaperTemplate({ // # Colors primaryColor, secondaryColor, // # Company Logo showCompanyLogo = true, companyLogoUri = '', 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', ], showBilledToAddress = true, showBilledFromAddress = true, billedToLabel = 'Billed To', // Total total = '$1000.00', totalLabel = 'Total', showTotal = true, // Subtotal subtotal = '1000/00', subtotalLabel = 'Subtotal', showSubtotal = true, // Customer note 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', // Terms & conditions 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', }, ], // Credit note number. showCreditNoteNumber = true, creditNoteNumberLabel = 'Credit Note Number', creditNoteNumebr = '346D3D40-0001', // Credit note date. creditNoteDate = 'September 3, 2024', showCreditNoteDate = true, creditNoteDateLabel = 'Credit Note Date', }: CreditNotePaperTemplateProps) { return ( {showCreditNoteNumber && ( {creditNoteNumebr} )} {showCreditNoteDate && ( {creditNoteDate} )} {showBilledFromAddress && ( {companyName}, ...billedFromAddress]} /> )} {showBilledToAddress && ( {billedToLabel}, ...billedToAddress]} /> )} {showSubtotal && ( )} {showTotal && ( )} {showCustomerNote && ( {customerNote} )} {showTermsConditions && ( {termsConditions} )} ); }