Connecting Tech Pros Worldwide Forums | Help | Site Map

Referring to last day's cost.

cesar.zapata@gmail.com
Guest
 
Posts: n/a
#1: Dec 13 '06
Hi,.

I'm trying to make a inventory and average cost that includes receivied
weights and cost.
The cost changes everytime we receivie product as cost from vendor
changes every time.

Everyday I would get a average cost depending on a calculation..and the
tricky part will be getting the last day;'s received cost.

for example
DATE Weight Cost Average Cost
12/10/06 1000 3.13 3.13
12/11/06 1232 3.14 3.16

now to calculate next day's average cost I need to get 3.16

my question is do I need to write a procedure that after calculation
write the average cost to the table for that day?

thanks,

Gord
Guest
 
Posts: n/a
#2: Dec 13 '06

re: Referring to last day's cost.



cesar.zapata@gmail.com wrote:
Quote:
Hi,.
>
I'm trying to make a inventory and average cost that includes receivied
weights and cost.
The cost changes everytime we receivie product as cost from vendor
changes every time.
>
Everyday I would get a average cost depending on a calculation..and the
tricky part will be getting the last day;'s received cost.
>
for example
DATE Weight Cost Average Cost
12/10/06 1000 3.13 3.13
12/11/06 1232 3.14 3.16
>
now to calculate next day's average cost I need to get 3.16
Why? The next day's average cost will be

Sum(Weight*Cost) / Sum(Weight)

for all three days. The average cost for the previous day is not
required.

Closed Thread