fix test failure
Build & Push / Pipeline Tests (push) Successful in 1m54s
Test / Type Check (all packages) (push) Successful in 53s
Build & Push / Build & Push Docker Image (push) Successful in 5m13s
Test / API Unit Tests (push) Successful in 1m18s
Test / Homepage Unit Tests (push) Successful in 48s
Test / Carplace Unit Tests (push) Successful in 41s
Test / Admin Unit Tests (push) Successful in 41s
Test / Dashboard Unit Tests (push) Successful in 42s
Test / API Integration Tests (push) Successful in 1m8s

This commit is contained in:
root
2026-08-10 23:33:46 -04:00
parent 7b8f81336a
commit 53de25120a
2 changed files with 42 additions and 11 deletions
@@ -850,7 +850,10 @@ export async function finalizeInvoice(invoiceId: string, adminId: string, ip?: s
}
const taxBase = Math.max(preTaxBase - autoCreditToApply, 0)
const { taxRate, taxAmount } = calculateTaxAmount(taxBase, account.taxExempt, platformBillingSettings.taxRate)
const shouldApplyTax = current.invoiceType !== 'MANUAL'
const { taxRate, taxAmount } = shouldApplyTax
? calculateTaxAmount(taxBase, account.taxExempt, platformBillingSettings.taxRate)
: { taxRate: 0, taxAmount: 0 }
if (taxAmount > 0) {
await tx.billingInvoiceLineItem.create({