RFC: Constraints on Cash accounts

Conrad Canterford conrad@mail.watersprite.com.au
Thu, 06 Dec 2001 00:39:37 +1100


Derek Atkins wrote:

 > What happens if you just change the (AUD$) currency so that the
 > denominator is e.g. 20 instead of 100?  Does that do the right thing?
 > -derek

As Phillip noted, this does not work, as cheques and credit cards are 
still valid down to the 1c.

Further, Bill Gribble's suggestion (changing the account SCU), while 
closer to the mark, also isn't suitable without further work for two 
reasons:
1. It displays as fractions if the SCU is not set to 100, which is 
confusing and not really usable. We would need to add some means of 
flagging an account to always display as decimal or similar before this 
could be used (in addition to providing a means of changing the SCU for 
each account).

2. If the (decimal) amount entered is not an exact multiple, it silently 
rounds to the nearest exact multiple. I'm not convinced this should 
*ever* be correct behaviour, and it definitely is not the behaviour I'd 
expect in the case I'm proposing a solution for - I'm expecting a 
warning of some sort, not a silent guess as to what I might have meant. 
For a start, we'd be guessing that "round-to-nearest" is the correct 
behaviour and this needn't be the case for all currencies.

I'm still leaning towards a check of a split to see if the account on 
that split is flagged with some multiple, and then checking against that 
multiple (option 2 in my initial proposal). However, I'm open to 
convincing that we should instead fix the problems I've identified above 
regarding the use of the SCU - particularly if problem 2 is agreed to be 
a universal problem, and not just unique to the circumstances I'm trying 
to fix. (This also would have the advantage that I would be working on 
account code and not register code, and less likely to clash with work 
Josh and Derek are doing).

Conrad.
-- 
Conrad Canterford  (conrad@mail.watersprite.com.au)
Water Sprite Pty Ltd   |  url - http://www.watersprite.com.au/
GPO Box 355,           |  - Australian Tour and Event Management (ATEM)
Canberra, ACT 2601     |  - Ticketing Division.
Mobile: +61 402 697054 |  - Catering Services Division.