On Thu, 3 Apr 2003, MJ Ray wrote:
Pat Eyler <pate@eylerfamily.org> wrote:
Well, we may have some additional issues to deal with here, what about currency with no decimel part, or currencies with different kinds of units (do any of these still exist?). Perhaps we need to store currency in two fields (curr_major and curr_minor) with names controlled by (curr_major_name and curr_minor_name). Then we can ask for data to be
Only two? Why not have a curr_elements linked list table (four elements, called id, unit, amount, next_id) and then enter the id of the highest valued currency unit used in the cost column. The names would be controlled by curr_name, a reference into a chain in the curr_names table describing a linked list of currencies, least valued first and how many of them before we are worth one of the next most highly valued unit. Then koha purchases can handle all currencies, no matter how many units they have in the system. After that, we can add a table that describes the accounting worth of the various things that libraries may barter for fines and purchases.
Isn't this a bit overkill? Is there anyone who still uses three or more units of currency? IMHO the most sensible thing to do is to use an integer, recording the number of smallest-valued units of currency (cents, pence, centimes, halala, rubber ningis, or whatever). Heck, that'd even work with pre-decimalisation L.S.d in the UK. -- Andrew Arensburger Actually, these _do_ represent the arensb@ooblick.com opinions of ooblick.com! Generic Tagline V 6.01