"Landed Cost Voucher on submit" Debit and Credit not equal for Purchase Invoice #PINV-01267-1. Difference is 420.0

bench update

the last release solved this issue

Just ran
bench update --reset
Now at:
ERPNext: v12.3.1 (version-12)

Frappe Framework: v12.1.0 (version-12)

Cannot post LCV.

This is a quick fix, at least we can move ahead. Why did I say this? We can create only one LCV per purchase document.

So temporarily, if you want to move ahead with your working, you can still move on. All you have to do is create an LCV e.g. “LCV001”. if you need to enter another LCV for the same purchase document, cancel LCV001, amend it and submit. This way at least your inventory valuation is maintained properly.

This will keep you going for now until there is a proper fix available for this problem i.e. multiple LCVs for the same purchase document.

I still have to check a few more things i.e. editing old LCVs where we have entered multiple LCVs for a purchase document and then come back with feedback.

In all honesty, this work well for now. :slight_smile:

erpnext 12.3.1
frappe 12.1.0

Are you able to create more than one LCVs for the same purchase document?

Hi Akram,

would you agree with this?

Now in my opinion, when the changes were made where multiple accounts are now allowed to be in the category of “Expenses included in Valuation”, it was not taken into consideration that the system also looks at Default “Expenses Included In Valuation” account in company doctype at the time we submit it.

If there are previously booked LCVs and even if you cancel one, the system keeps its value and rather than reducing the value of cancelled LCV in purchase invoice, it updates the same value in the purchase invoice. even if you delete that LCV that amount stays.

In all honesty, when multiple accounts were introduced i.e. “Expense Account” the Default “Expenses Included In Valuation” was redundant. it can be there in company doctype to pull this account automatically at the time of entering the LCV (not necessarily).

OLD LCV, prior to the update
Previously (prior to this fix), entered LCVs can be cancelled, but cannot be submitted after amending it.
At the time of cancelling the LCV, this cancellation does not correctly amend the “Landed Cost Amount” in the purchase invoice.
After introducing multiple “Expense Accounts” in the LCV, Default “Expenses Included In Valuation” is redundant in company doctype. Since there are different “Expense Accounts” in valuation category the system should not look at the Default “Expenses Included In Valuation” prior to submitting the LCV.

New LCVs
We can add only one LCV per receipt document, cancel it, amend it and submit are all ok. However, you cannot add more than one LCV for the same purchase document. We should be able to add more than one LCVs for a purchase document.

These two LCVs were created, however, the one in the sum of 300 was cancelled prior to the fix.

if we look at the transaction, it shows 420, which is the total of both LCVs.

Please see below:

what do we do? if I cancel 120, it shows the difference 300, if I post 300 it shows the difference 420

I tried to update the transaction with importing it using import tool, it did not allow it.

Here is the solution on github


what is command to pull these changes?

I ran bench update --patch but it does not work