fix(compliance): Improve compliance
This commit is contained in:
@ -22,12 +22,8 @@ export abstract class CIIBaseEncoder extends BaseEncoder {
|
||||
* @returns CII XML string
|
||||
*/
|
||||
public async encode(invoice: TInvoice): Promise<string> {
|
||||
// Determine if it's a credit note or debit note
|
||||
if (invoice.invoiceType === 'creditnote') {
|
||||
return this.encodeCreditNote(invoice as TCreditNote);
|
||||
} else {
|
||||
return this.encodeDebitNote(invoice as TDebitNote);
|
||||
}
|
||||
// TInvoice is always an invoice, treat it as debit note for encoding
|
||||
return this.encodeDebitNote(invoice as unknown as TDebitNote);
|
||||
}
|
||||
|
||||
/**
|
||||
|
Reference in New Issue
Block a user