D&C GLug - Home Page

[ Date Index ] [ Thread Index ] [ <= Previous by date / thread ] [ Next by date / thread => ]

Re: [LUG] Expenses records

 

On 08/10/06 13:56:05, Henry Bremridge wrote:
On Sat, Oct 07, 2006 at 08:28:50AM +0100, Neil Williams wrote:
> Addresses have vcard, ToDo lists have vTodo, Appointments have
> vCalendar (amongst others).
>
> What could be conceived as a "standard format for expenses"?
>
Anything to get away from QIF

Especially as QIF cannot support even simple business records. The format needs to be usable for automated invoice generation.

> Basically, needs to include:
> 1. Amount (a simple number, independent of currency)
> 2. Currency (standardised ID that references a fixed table of
symbols,
> fractions, mnemonics, formatting and currency code suitable for
> retrieval of currency conversion rates).

You need two sorts of variants:
-   Currency which is the ISO currency derivation
-   What the display is (eg is it xx,xxx,xxx.xx or is it
xx.xxx.xxx,xx.

That doesn't need to be in the file. A single ID is sufficient to act as a tag with a standard "lookup" table. The fraction, symbols, currency rates, layouts, formats etc. can all be looked up in fixed tables that only change comparatively rarely. This is how gnucash does it. Some apps (like Palm apps) can only support a limited number of currencies, with limited custom currency ID's for others.

    Similarly what the date fields are YYMMDD or MMDDYY etc etc)
Unless
    this information is obtained from elsewhere

Any date format in the file needs to be:
1. Locale independent
2. Easily parsed

That then means that a standard date / timestamp format would be used, leaving further processing to the apps.

> 3. Date (timestamp)
> 4. form of payment (visa, prepaid, cash, etc.)

Presumably this would depend on the format. Would this not be a
string?

Yes, probably a string. vCard handles this for things like categories. If the application doesn't recognise a particular "form_of_payment" string, it'll just have to ask the user or use the string "as-is".

--

Neil Williams
=============
http://www.data-freedom.org/
http://www.nosoftwarepatents.com/
http://www.linux.codehelp.co.uk/

Attachment: pgpeUUQ7awolS.pgp
Description: PGP signature

-- 
The Mailing List for the Devon & Cornwall LUG
http://mailman.dclug.org.uk/listinfo/list
FAQ: http://www.dcglug.org.uk/linux_adm/list-faq.html