GST Rounding in Enabler

From EnablerWiki
Revision as of 03:41, 4 February 2009 by Lucy (talk | contribs) (New page: '''GST Rounding in Enabler.''' In Enabler version 4.43, Magenta Internal JT9896, a correction was made to the rounding of fractions of cents in GST calculations. Prior to version 4.43, G...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

GST Rounding in Enabler.

In Enabler version 4.43, Magenta Internal JT9896, a correction was made to the rounding of fractions

of cents in GST calculations. Prior to version 4.43, GST on a transaction was incorrectly calculated as

the sum of the GST, rounded to the whole cent, on each line item. This treatment could result in

incorrect GST being report at a transaction-total level:

ACN:
ABN: 78 003 283 823
January 25, 2007 09:10:48 0100000455
Invoice: 021101000162 0211 011
Tax Invoice
$
WAHU SKIMBOARD 41" 06 ASSORT -49.99
07697923 Qty -1 @ $49.99ea
Sales Person. Self
OFFICIAL BEACH CRKT BALL RED 9.99
07976871
Sales Person. James
ORIGINAL SKIMBOARD 41" 06 CO 39.99
05663034
Sales Person. James
Sub Total $-0.01
Rounding $0.01
Items 3.00
Cash 0.00
Inclusive of $0.01 GST
You were served by Alison
Thank you for shopping at Rebel Sport
========================================

In a less extreme example, consider this transaction:

Extended Line Item Incl GST GST Component GST to 2 d.p.

5.93 0.5390909091 0.54

4.22 0.3836363636 0.38

3.88 0.3527272727 0.35

14.03 1.27

However, 14.03 / 11 = 1.2754545 = 1.28.

The correct GST in the above example is $1.28, however Enabler prior to version 4.43 would report

1.27. This was corrected in version 4.43. Note also that some transactions would round the other

way and GST would be overstated by 1 cent. The net total result of this error would approximate

zero.

In making the above correction in version 4.43, the GST exclusive amount at the transaction header

level continued to be calculated as the sum of the rounded GST exclusive amounts in the line item.

Continuing the above example:

Extended Line Item Incl GST Ex-GST (Inc / 1.1) Ex=GST to 2 d.p

5.93 5.3909090909 5.39

4.22 3.8363636364 3.84

3.88 3.5272727273 3.53

14.03 12.76

However, the GST-exclusive total of the total $14.03: 14.03 / 1.1 = 12.754545 = 12.75.

As Enabler 4.43 through 4.47.00 used the total of the GST-exclusive amounts, rounded to 2 d.p, of

the line items as the header-level GST exclusive amount, Enabler had a header that looked like this:

Excl-GST GST incl-GST

12.76 1.28 14.03

However, 12.76 + 1.28 = 14.04. So, the amounts in the Enabler sales history header-level data did

not correctly add across. The same applies to the SH (sale header) record in the HOS files.

This has caused the small discrepancies in the Harris Farm Markets reports which are the subject

of Peter Kozak’s emails from August 2008 titled “Glendale Sales $ and HOS files $ do not match.”

An example of such a discrepancy was a $0.35 imbalance out of sales totalling over $85,000, or

0.00041%. In another example there was a discrepancy of $0.07 out of sales of around $26,500.

This has been changed in 4.47.01 and 4.48.00. The GST exclusive amount in the header is now

calculated as the GST inclusive amount less the GST – i.e. $12.75.

I deliberately use the word “changed” rather than “fixed”. It is highly debatable whether this should

be changed. On balance, I think what we have in 4.47.01 is “less wrong” than versions 4.43 to

4.47.00. However, consider more fully what we now have:

Sales History Header

Excl-GST GST Incl-GST

12.75 1.28 14.03

Sales History Detail

Excl-GST GST Incl-GST

5.39 0.54 5.93

3.84 0.38 4.22

3.53 0.35 3.88

12.76 1.27 14.03

This means that if you run two different sales reports in Enabler, on a GST-exclusive basis, one which

reports of header level data (such as the hourly sales report) and one which reports off detail-level

data (most other sales reports), there will be a small (immaterial) discrepancy between the report

totals.

Like I said, on balance, I think this is slightly less wrong that in the past, but that it debatable. The

discrepancy has to exist somewhere; that is an arithmetic fact (unless all reports run to fractions of

cents). The discrepancy only arises when reporting on rounded, GST-exclusive sales (or on the

amount of GST itself).

Related Problem – Also Addressed in versions 4.47.01 and 4.48.00.

Consider a sale of 222 grams of an item priced at $18.99 per kg.

0.222 x 18.99 = 4.21578, which rounds to $4.22.

Enabler previously calculated the GST-exclusive amount of this line item:

Ex-GST = Unit price excl GST x quantity: 18.99/1.1 x 0.222 = 3.83253, or 3.83.

However, the GST was calculated (correctly): 4.22 / 11 = 0.38363, or 0.38.

So we have a line item:

Excl-GST GST Incl-GST

3.83 0.38 4.22

And, of course, that line does not add across.

In versions 4.47.01 and 4.48.00, the calculation of the GST-exclusive amount of a line item has been

corrected:

Ex-GST = Incl-GST / 1.1: 4.22 / 1.1 = 3.836363 = 3.84.

And so now we have a line item:

Excl-GST GST Incl-GST

3.84 0.38 4.22

And that adds across correctly. The examples of the header-level rounding earlier in this document

are show with this correction assumed to be in place.

At Harris Farm, the $0.07 discrepancy in sales of $26,424.23 was comprised of:

$0.04 of this line item level rounding error; and

$0.03 of the header level rounding conundrum.