[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: COGS incorrect when invoices are reposted
- Subject: Re: COGS incorrect when invoices are reposted
- From: David Tangye <..hidden..>
- Date: Fri, 22 Sep 2006 10:51:20 +1000
On Thu, 2006-09-21 at 09:54 -0700, Roland Porth wrote:
> Adjusting/Voiding of website orders happens all the time. On our
> site, customers are invoiced and inventory levels are adjusted when
> credit card approval is received. Hence, the next customer can only
> order items that are available AFTER the prior orders have been
> allocated.
This sounds like a valid business rule, that can co-incide with the
'account best practice' rule discussed this week about 'once an invoice
is "posted" it is a legal document, so cannot be altered.'
>
> It would seem that reposting or voiding could have troublesome side
> effects for some or all of the following
>
> Time-dependent functions:
> * Cost of Goods Sold (which cost is allocated to which purchase)
> * Inventory Levels (adjusted after each transaction)
> * Tax Rate applied (rates change, shipping address changes cause
> different tax rates to apply)
> * Currency Conversion Rate applied (todays rate is different
> than yesterdays)
> * Shipping Rates applied (shipping rates change)
> * Discounts applied (some discounts are only applicable within
> a time period)
> * Selling Price applied (some price tables change at a specific
> date
Agreed. And all the time dependent functions should manipulate data from
time-dependent tables, which I spoke of a week or so ago, ie
journal/temporal tables that have a sequence(pseudo-time indicator) or a
date/timestamp as part of its primary key.
> How does LedgerSMB handle these time-dependent prices and rates? How
> should it?
Some are not handled in time-dependent tables per subject, but instead
only the current data is stored in those tables, and prices frozen in
downstream tables, eg in invoice line-item tables, which themselves
*are* time-dependent.