Tax Calculation Discrepancy Bug - Report tags

SQL Server 2022
SambaPOS 5.7.14

REPORT TICKET DETAILS
Report tag for getting an account transaction type amount from the ticket document doesn’t work, it also doesn’t work in all of its aggregate forms.
TTA.

`TTA.<account transaction type>`
`TTA.<account transaction type>.sum`
`TTA.<account transaction type>.count`
`TTA.<account transaction type>.percent`

REPORT ORDER DETAILS
There’s a discrepancy between the calculated tax values at the order level versus the ticket level. The tax totals don’t match between these two views.

  • In the “Test” view (Image 1), the ticket tax column adds up to 14.60 (T.Tax) with a TX.VAT value of 14.61
  • In the “Outlets Gross Net” report (Image 2), the tax value is shown as 57.02 (O.Tax.sum) with TX.VAT.sum as 56.89
  • These inconsistencies suggest the tax is being calculated differently in different contexts

The likely cause is that the order model doesn’t store fixed tax amount values. Instead, the tax is recalculated dynamically in different contexts using potentially different calculation methods.

These values should be set once and directly match the tax transaction values from the ticket document rather than being recalculated by different parts of the engine.

  1. A fixed taxable amount field in order table (O.ExactTotal)
  2. A fixed tax amount field in order.taxes column

You are facing two separate but related issues in SambaPOS 5.7.14 when using SQL Server 2022. The first issue involves the TTA (Account Transaction Type Amount) report tag, which doesn’t work within the “Report Ticket Details” context. Tags such as TTA., TTA..sum, TTA..count, and TTA..percent fail to return any results. This issue occurs because the TTA tag isn’t properly linked to the ticket-level reporting context in recent SambaPOS builds. While it previously worked within REPORT ACCOUNT TRANSACTIONS or REPORT TRANSACTION DETAILS, it no longer functions inside ticket-scoped reports. The likely reason is that the ticket document isn’t being cross-referenced to its associated account transaction type entries. Until this is fixed in a future release, you can use a workaround by either generating results through REPORT ACCOUNT TRANSACTIONS or by creating a custom SQL report using the Report SQL tag to manually join ticket and transaction data