The operation can be seen in /purchasing/includes/db/grn_db.inc in the first function update_average_material_cost($supplier, $stock_id, $price, $qty, $date, $adj_only=false).

On line 66 you will see

$material_cost = ($qoh * $material_cost + $qty * $price_in_home_currency) / ($qoh + $qty);

$material_cost will be currennt material cost multiplied by current qoh + transaction qty multiplied by price in home currency. This will then be divided by qoh + qty.

These operations will be new average matefial cost.

So the calculations are correctly done.

All stock transactions are going through this routine.

Joe

]]>Purchase of 10pieces at a rate of 1,708.85 in the last tax period

sales of 2 piece at a rate of 1712.38 in the last tax period

after sales purchase of 5 piece at a rate of 1708.85 in the last tax period

Currently, there are 28 pieces left in stock

Solution

alculate the unit cost of the item using the Weighted Average method:

Step 1: Calculate the total cost of the opening stock

Total cost of opening stock = 15 x 1,637.16 = 24,557.40

Step 2: Calculate the total cost of the purchases made in the last tax period

Total cost of purchases = (10 - 2 + 5) x 1,708.85 = 20,351.25

Step 3: Calculate the total cost of goods available for sale

Total cost of goods available for sale = Total cost of opening stock + Total cost of purchases = 24,557.40 + 20,351.25 = 44,908.65

Step 4: Calculate the weighted average cost per unit

Total units available for sale = Opening stock + Purchases - Sales = 15 + 10 - 2 + 5 = 28

Weighted average cost per unit = Total cost of goods available for sale / Total units available for sale = 44,908.65 / 28 = 1,603.16

as per my calculation unit price is 1603.16

but in front accounting 1776.1466666667

i think same issue

]]>Sales are recorded in one currency and purchases are recorded in the home currency.

Is there any way to re-calculate standard cost for transactions which are already recorded?

]]>When is standard cost calculated? At purchase order? Or invoice payment... or some other transaction?

And is standard cost affected by the most recent currency rate as seen in the Exchange Rates page?

Any clarification on this is appreciated.

]]>