We have a scenario where manufacturing is done from customer provided raw materials.
This means in the stock entry stage, all incoming raw materials will have 0 valuation rates. But there will be work order operation costs added into the additional cost table of stock entry. This cost is not being added to finished good’s valuation. There’s also some weird GL entries being created. Consider the following example.
Stock Entry
- Raw 1, qty 5, rate 0, allow zero valuation
- Raw 2, qty 5, rate 0, allow zero valuation
- Raw 3, qty 5, rate 0, allow zero valuation
- FG, qty 10, rate 0, not allow zero valuation, expense account: “Stock Adjustment”
Additional Cost - 80,000 with Account “Expenses included in valuation”
When I submit this, it complains that FG line does not allow zero valuation. I was expecting the additional cost to be automatically distributed to FG as 80,000 / 10 = 8,000
.
When I did allow zero valuation on FG line though, it can be submitted. However, FG’s valuation will be zero and also the accounting ledger seems strange. It is as follows -
Expenses Included In Valuation: 40,000 credited
Stock Adjustment : 40,000 debited
I’ve checked the code and it seems intentional that if the FG incoming basic rate is 0, additional cost won’t be distributed.
if self.purpose in ("Repack", "Manufacture"):
incoming_items_cost = sum(flt(t.basic_amount) for t in self.get("items") if t.is_finished_item)
else:
incoming_items_cost = sum(flt(t.basic_amount) for t in self.get("items") if t.t_warehouse)
if not incoming_items_cost:
return
Is there a reason for this behavior? Also what’s going on with accounting ledger entries?
Thanks for your time!