Our accounting team has been playing with Landed Cost in ERPNext and we think it is not correctly done. Let’s me try to explain (in perpetual inventory)
I created a Purchase Receipt for 1 item at 1,000 on 28-Jun-2025
The system will just replace the Accounting Ledger of the Purchase Receipt directly (in fact, it reverse old one and add new one) back in time for 28-Jun-2025 and ignore the fact that the freight cost just arrive on 30-July-2025
This is very much in correct by accounting standard. Because in any decent ERP, we should be able to run the Stock Ledger and see that stock valuation on
28-Jun = 1,000
30-July = 1,010
But in ERPNext, everything is just Reposted to the past (it is like deleting all the trails) and make valuation on
28-Jun = 1,010
This make ERPNext looks like a small accounting software that every thing can be overwritten. Even worse, if the freight cost came in after an accounting period closed, the Landed Cost Voucher is not submittable (because system not allow editing ledger) and this leave things in undesirable status.
I hope ERPNext is correct and I am wrong here, because as I see, it is very difficult to fix. I wonder why this is usable for you all ?
Valuation is tricky. Unlike most accounting transactions, order of events matters. I’ve asked several different accountants the right way to do this, and they’ve all given me different answers.
In general, I agree that retroactive changes should be avoided. With valuation, though, I think it’s sometimes better than the alternative. A very common scenario I’ve run into is backdated stock transactions. If I buy 20 units at 1000 each on June 20th, and then a week later realize that I failed to post the 10 units I bought at 800 on June 1st, what should happen?
To my non-accountant mind, the answer depends on whether the accounting period is still open. If it is, I’m okay with recalculating dependent transactions. If the accounting period is closed, I think the mistake has already been set in stone and fixing it should require manual correction. I think that’s the stance ERPNext takes here, at least as far as I’ve understood it.
We do not need to argue about accounting practice as @peterg said, different accountants may have different approaches and we can’t please everyone Let’s shift the discussion to the ERP Concept instead.
My point of view, there are 2 things.
Transaction based: In this case, there are 2 transactions, Purchasing item (Item cost) and Shipping/Landed cost. System should reflect this by showing the landed cost as a separate line in both stock ledger and accounting ledger, rather than adjusting it directly in purchasing transaction.
Time based: Landed cost is the transaction coming after Purchasing transaction. It’s different event at different time. ERP should not mislead our user by backdating the landed cost to match the purchase date. Instead, we should allow users the flexibility to manage/adjust it as their preferred approach.
This part I definitely agree with. The way things are written right now to the general ledger is very confusing. The added expenses are listed in the GL Entry doc as part of the original invoice, but then those charges aren’t actually shown anywhere on the invoice. At very minimum, the GL Entry should point to the LCV since that’s where these expenses are documented.
The LCV should probably also tie to a payable account of some sort, which would potentially also solve @mujeerhashmi’s issue.
You know, the more I think about this the weirder it seems.
I stand by my initial response to @kittiu, which was just trying to think about why retroactive valuation might be justified in open accounting periods, but now I’m not understanding what the LCV even tries to do.
Why are these costs getting booked as expenses but then rolled into stock value? When they’re sold, won’t they get expensed again as COGS? What am I missing here?
It might just be too early in the morning for me, but right now nothing about the LCV is making any sense to me. Did you see my second post right after the one you’re quoting? If these costs are to become part of stock value, why are they being expensed at all?
Edit: I just tested, and I’m realizing now that these costs are being applied as credits to expense accounts. I guess the idea is that they’re supposed to match the debit booked by a more conventional invoice of some sort?
It cannot be understood so simply. What @kittiu mentioned is an issue related to landed cost. In the latest version of ERPNext, the handling of landed costs is exactly as @kittiu described: if the cost is incurred in the current accounting period, the system directly modifies the general ledger entries and the inventory valuation of the related incoming items — with no historical trace available.
In reality, these are two separate transactions and should not be handled merely by modifying the data of the original entry to achieve data accuracy. This approach does not align with real-world accounting practices, because although we are dealing with two business transactions, only one general ledger entry is recorded. This logic is flawed — that’s the first issue.
The second issue is that if the purchase receipt belongs to a closed accounting period, the landed cost voucher cannot be submitted. This is a serious problem. Allocating taxes and fees related to purchasing into the cost of goods is a reasonable requirement and aligns with accounting standards. However, in ERPNext, such cross-period cost allocation cannot be completed through existing landed cost voucher; it can only be done through inventory adjustments.
For businesses with a large number of such scenarios, this is unacceptable. This functionality needs to be improved and enhanced.
Luckily our customer knows the freight charges at the time of invoicing so we customized to add a row in the taxes table for valuation only and link the supplier to book the payable at submit. But rightly said by you this needs to be handled in the LCV also.
I’m confused about who you’re replying to here. You phrase it as though you’re disagreeing with @wipawii, but then you seem to be repeating pretty much exactly what they said.
I think at least everyone here is on the same pace that the GL Entry and Stock Ledger of LCV should be separated in it’s own timing. And so, LCV need some enhancement to adress the existing problem.
It update Landed Cost Amount directly into Purchase Receipt Item and Repost GL of the Purchase Receipt again (cancel old and post new with increased amount)
It update Valuation Rate, and use that rate to Repost Stock Ledger (cancel old and post new value)
Everthing done on the same date as the original Purhcase Receipt (go back intime and rewrite the history, which we don’t want)
From my observation, it will be too difficult and might not be accepted to update the existing code.
So I think what we can is to make a separated feature, i.e., “Landed Cost Allocation”,
On the doctype “Landed Cost Allocation”, ust it to calculate and allocate freight expenses (freight $10) into item similar to existing Landed Cost Voucher.
Create GL Entry to add freight cost $10 add to Stock In Hand (for perpetual only)
Create SL Entry for the buying item $10 with Qty = 0