Tax & VAT/GST Calculations

Allocate freight across post-discount bases

InvoiceDiplomat allocates document discounts before prorating freight so delivery charges follow what the customer actually pays for each tax bucket, not inflated pre-discount list prices. If two $0.01 bases (A taxable, B untaxed) receive a $0.01 document discount assigned to A, their post-discount weights become $0.00 and $0.01, routing 100% of a $1.00 prorated freight fee to B and producing $0.00 tax. If every base hits zero, an explicit shipping class is required.

Order of operations quietly governs mixed-tax freight calculations. If you prorate shipping using pre-discount item totals, a fully discounted taxable item still attracts a slice of taxable shipping even though the customer paid nothing for that item. InvoiceDiplomat enforces a strict pipeline: line extensions first, line and document discounts second, pro-rata freight allocation third using post-discount positive bases, and bucket tax calculation fourth—plus an explicit guard whenever discounts wipe out all item bases.

Step-by-Step Guide

  1. 1. Enter all line items and review pre-discount subtotals

    In the Invoice Generator, list each product with its Qty, Rate / Price, Tax Treatment, and Tax Rate (%). Keep taxable and untaxed items on separate lines so their buckets stay distinct.

  2. 2. Apply Document Discount before evaluating shipping weights

    Type your invoice-level discount into Document Discount. InvoiceDiplomat allocates that discount across buckets using largest-remainder apportionment and stable keys, establishing each bucket's true post-discount base.

  3. 3. Set Shipping and choose Pro-rata across item buckets

    Enter the freight amount in Shipping and select Pro-rata across item buckets under Shipping Tax Class. Any bucket whose post-discount net base dropped to $0.00 carries zero weight and receives $0.00 of prorated freight.

  4. 4. Resolve zero-denominator orders explicitly

    When a 100% discount wipes out every item on the invoice so all post-discount bases equal $0.00, pro-rata weighting cannot divide by zero. Switch Shipping Tax Class to Exempt / Untaxed or Custom shipping tax rate so the freight's tax treatment is explicit.

  5. 5. Verify top-to-bottom math and issue the PDF

    Check that Subtotal minus Discount plus Shipping plus Tax equals Total on the preview, then click Issue & Download PDF to lock in the finalized calculation.

Worked Example: Prorating $1.00 freight after a $0.01 discount zeroes out a taxable bucket

Input / Step Value
Bucket A (Taxable @ 10%, stable key A) $0.01 pre-discount
Bucket B (Exempt @ 0%, stable key B) $0.01 pre-discount
Document Discount $0.01 (allocated to A by stable key)
Shipping (Pro-rata across item buckets) $1.00 USD
Result Post-discount weights: A = $0.00, B = $0.01 | Allocated freight: A = $0.00, B = $1.00 | Tax = $0.00 | Total = $1.01

First, the $0.01 document discount allocates to Bucket A (the first tied key), reducing post-discount bases to A = $0.00 and B = $0.01. Next, $1.00 of prorated freight splits according to those post-discount weights (0:1), assigning $0.00 freight to taxable Bucket A and all $1.00 freight to exempt Bucket B. Finally, 10% tax on Bucket A's $0.00 combined net yields $0.00 tax, and the invoice reconciles cleanly: $0.02 subtotal − $0.01 discount + $1.00 shipping + $0.00 tax = $1.01.

Scope & Limitation: When refunding shipping on a partial credit note, verify your original shipping tax class and never exceed the remaining refundable shipping balance. Always check local VAT or sales-tax regulations regarding promotional 100%-discounted goods paired with paid shipping.