[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Proposal for 1.4: CoA structure redesign



On 10/19/07, Chris Travers <..hidden..> wrote:

> > I don't see any obvious handling of foreign currency accounts.  How
> > would, for example, a USD account be handled for a CAD business?  (For
> > that matter, I don't understand how to do this in the current 1.2
> > series)
>
> Good point.  We should probably build in a default currency into asset
> accounts. This will require a preloaded currency table.

Just in case anyone is wondering, the actual accounting storage and
reports aside from reconcilliation would still be handled in a single
master currency.  This would probably need to be a different set of
tables like:

CREATE TABLE currency (
    id SERIAL NOT NULL UNIQUE,
    short_name TEXT PRIMARY KEY,
    name TEXT NOT NULL UNIQUE
);

CREATE TABLE  account_currency (
    id SERIAL NOT NULL UNIQUE,
    currency INT REFERENCES  currency(id),
    account int REFERENCES account(id)
    PRIMARY KEY (currency, account)
);

The goal here is to keep people from depositing the wrong currency
into accounts that don't support it, for non-default currency
operations of asset accounts.

Best Wishes,
Chris Travers

>
> Best Wishes,
> Chris Travers
>