generatePaymentInvoice method
Future<Document>
generatePaymentInvoice(
- DataPaymentInvoice reportData,
- String paperSize,
- bool isDuplicate
Implementation
Future<pw.Document> generatePaymentInvoice(
DataPaymentInvoice reportData,
String paperSize,
bool isDuplicate,
) async {
final pdf = pw.Document();
pdf.addPage(
await PaymentInvoiceTemplate.buildInvoice(
paperSize,
companyName: reportData.companyName!,
invoiceNumber: reportData.invoiceNumber,
phoneNumber: reportData.phoneNumber!,
invoiceTitle: reportData.invoiceTitle!,
date: reportData.date,
recipientName: reportData.recipientName,
amount: reportData.amount,
amountInWords: reportData.amountInWords!,
note: reportData.note,
account: reportData.totalAccount,
paid: reportData.totalPaid,
authorizedSignature: reportData.authorizedSignature,
address: reportData.address!,
language: reportData.language,
duplicate: isDuplicate,
),
);
return pdf;
}