Use this guide when configuring the Printer.Ticket totals section for UAE VAT invoices and India GST invoices.
UAE VAT receipt behavior #
UAE customer-facing prices should be VAT-inclusive. The receipt should show Total before VAT, the VAT amount charged, and the final Total. UAE standard VAT is 5% unless the item is zero-rated or exempt.
UAE totals section without discount #
<!-- TAXES START-->
#set($beforeVat = $ticket.getTotal() - $ticket.getTax())
<line>
<text align="left" length="24">Total before VAT</text>
<text align="right" length="24">$ticket.formatCurrency($beforeVat)</text>
</line>
<line>
<text align="left" length="24">VAT incl.</text>
<text align="right" length="24">${ticket.printTax()}</text>
</line>
<!-- TAXES END-->
<line size="1">
<text align="left" length="12" bold="true">Total</text>
<text align="right" length="36" bold="true">${ticket.printTotal()}</text>
</line>
UAE totals section with discount #
Show the gross total first, then the discount, then calculate and display the VAT-exclusive amount and VAT included in the final total.
<!-- TAXES START-->
#set($beforeVat = $ticket.getTotal() - $ticket.getTax())
<line>
<text align="left" length="24">Gross total</text>
<text align="right" length="24">$ticket.formatCurrency($ticket.getGrossTotalBeforeDiscount())</text>
</line>
<line>
<text align="left" length="24">Discount</text>
<text align="right" length="24">${ticket.printAppliedDiscountTotal()}</text>
</line>
<line>
<text align="left" length="24">Total before VAT</text>
<text align="right" length="24">$ticket.formatCurrency($beforeVat)</text>
</line>
<line>
<text align="left" length="24">VAT incl.</text>
<text align="right" length="24">${ticket.printTax()}</text>
</line>
<!-- TAXES END-->
<line size="1">
<text align="left" length="12" bold="true">Total</text>
<text align="right" length="36" bold="true">${ticket.printTotal()}</text>
</line>
India GST receipt behavior #
For India, show the taxable value after discount and the tax amount charged. For intra-state sales, split GST equally into CGST and SGST. For inter-state sales, replace the CGST and SGST rows with one IGST row using ${ticket.printTax()}.
India totals section without discount, intra-state #
<!-- TAXES START-->
#set($taxableValue = $ticket.getTotal() - $ticket.getTax())
#set($cgst = $ticket.getTax() / 2)
#set($sgst = $ticket.getTax() / 2)
<line>
<text align="left" length="24">Taxable Value</text>
<text align="right" length="24">$ticket.formatCurrency($taxableValue)</text>
</line>
<line>
<text align="left" length="24">CGST</text>
<text align="right" length="24">$ticket.formatCurrency($cgst)</text>
</line>
<line>
<text align="left" length="24">SGST</text>
<text align="right" length="24">$ticket.formatCurrency($sgst)</text>
</line>
<!-- TAXES END-->
<line size="1">
<text align="left" length="12" bold="true">Total</text>
<text align="right" length="36" bold="true">${ticket.printTotal()}</text>
</line>
India totals section with discount, intra-state #
<!-- TAXES START-->
#set($taxableValue = $ticket.getTotal() - $ticket.getTax())
#set($cgst = $ticket.getTax() / 2)
#set($sgst = $ticket.getTax() / 2)
<line>
<text align="left" length="24">Gross total</text>
<text align="right" length="24">$ticket.formatCurrency($ticket.getGrossTotalBeforeDiscount())</text>
</line>
<line>
<text align="left" length="24">Discount</text>
<text align="right" length="24">${ticket.printAppliedDiscountTotal()}</text>
</line>
<line>
<text align="left" length="24">Taxable Value</text>
<text align="right" length="24">$ticket.formatCurrency($taxableValue)</text>
</line>
<line>
<text align="left" length="24">CGST</text>
<text align="right" length="24">$ticket.formatCurrency($cgst)</text>
</line>
<line>
<text align="left" length="24">SGST</text>
<text align="right" length="24">$ticket.formatCurrency($sgst)</text>
</line>
<!-- TAXES END-->
<line size="1">
<text align="left" length="12" bold="true">Total</text>
<text align="right" length="36" bold="true">${ticket.printTotal()}</text>
</line>
Implementation notes #
- Replace only the existing
<!-- TAXES START-->to<!-- TAXES END-->block and keep the payment section below it unchanged. ticket.getTotal()is the final payable amount.ticket.getTax()is calculated after discounts are distributed across lines.ticket.getGrossTotalBeforeDiscount()is useful when a discount is applied.ticket.printAppliedDiscountTotal()prints the formatted discount amount.