GST Rounding in Enabler: Difference between revisions

From EnablerWiki
Jump to navigationJump to search
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...
 
mNo edit summary
 
(11 intermediate revisions by one other user not shown)
Line 1: Line 1:
Created:  4 February 2009.  Last Reviewed:  4 February 2009
'''GST Rounding in Enabler.'''
'''GST Rounding in Enabler.'''


In Enabler version 4.43, Magenta Internal JT9896, a correction was made to the rounding of fractions
In Enabler version 4.43, 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


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


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:.


incorrect GST being report at a transaction-total level:


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


In a less extreme example, consider this transaction:
In a less extreme example, consider this transaction:


Extended Line Item Incl GST GST Component GST to 2 d.p.
  ''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 ]]


5.93 0.5390909091 0.54
However, 14.03 / 11 = 1.2754545 = 1.28.
 
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
The correct GST in the above example is $1.28, however Enabler prior to version 4.43 would report
Line 54: Line 52:


zero.
zero.


In making the above correction in version 4.43, the GST exclusive amount at the transaction header
In making the above correction in version 4.43, the GST exclusive amount at the transaction header
Line 61: Line 60:
Continuing the above example:
Continuing the above example:


Extended Line Item Incl GST Ex-GST (Inc / 1.1) Ex=GST to 2 d.p
''Extended Line Item Incl GST     Ex-GST (Inc / 1.1)   Ex=GST to 2 d.p''
 
  5.93                           5.3909090909         5.39
5.93 5.3909090909 5.39
  4.22                           3.8363636364         3.84
 
  3.88                           3.5272727273         3.53
4.22 3.8363636364 3.84
  [[14.03                                               12.76]]
 
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.
However, the GST-exclusive total of the total $14.03: 14.03 / 1.1 = 12.754545 = 12.75.
Line 77: Line 72:
the line items as the header-level GST exclusive amount, Enabler had a header that looked like this:
the line items as the header-level GST exclusive amount, Enabler had a header that looked like this:


Excl-GST GST incl-GST
''Excl-GST   GST     Incl-GST''
  12.76      1.28      14.03
 
However, 12.76 + 1.28 = 14.04.


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
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.
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
An example of such a discrepancy was a $0.35 imbalance out of sales totalling over $85,000, or
Line 97: Line 91:
calculated as the GST inclusive amount less the GST – i.e. $12.75.
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
What we now have:


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


Sales History Header
Sales History Header


Excl-GST GST Incl-GST
''Excl-GST   GST   Incl-GST''
  12.75    1.28  14.03


12.75 1.28 14.03


Sales History Detail
Sales History Detail


Excl-GST GST Incl-GST
''Excl-GST   GST       Incl-GST''
 
  5.39     0.54     5.93
5.39 0.54 5.93
  3.84     0.38     4.22
 
  3.53     0.35     3.88
3.84 0.38 4.22
  [[ 12.76     1.27     14.03]]
 
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
This means that if you run two different sales reports in Enabler, on a GST-exclusive basis, one which
Line 136: Line 124:


amount of GST itself).
amount of GST itself).


'''Related Problem – Also Addressed in versions 4.47.01 and 4.48.00.'''
'''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.
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.
0.222 x 18.99 = 4.21578, which rounds to $4.22.


Enabler previously calculated the GST-exclusive amount of this line item:
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.
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.
However, the GST was calculated (correctly): 4.22 / 11 = 0.38363, or 0.38.


So we have a line item:
So we have a line item:


Excl-GST GST Incl-GST
''Excl-GST   GST   Incl-GST''
  3.83      0.38    4.22


3.83 0.38 4.22


And, of course, that line does not add across.
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
In versions 4.47.01 and 4.48.00, the calculation of the GST-exclusive amount of a line item has been


corrected:
corrected:


Ex-GST = Incl-GST / 1.1: 4.22 / 1.1 = 3.836363 = 3.84.
Ex-GST = Incl-GST / 1.1: 4.22 / 1.1 = 3.836363 = 3.84.
Line 165: Line 161:
And so now we have a line item:
And so now we have a line item:


Excl-GST GST Incl-GST


3.84 0.38 4.22
''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
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.
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.

Latest revision as of 02:25, 22 April 2009

Created: 4 February 2009. Last Reviewed: 4 February 2009

GST Rounding in Enabler.

In Enabler version 4.43, 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 Magenta Retail
========================================

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.


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.


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.