Repost Item Valuation Issues V-13

We have identified multiple issues with Repost Item Valuation

1. Purchase Return
In case of purchase return the item rate field on Purchase receipt document shows the original purchase rate and whole document is valued/calculated on original purchase prices and accounting GLE is also calculated based upon the values derived from purchase receipt document. However the stock ledger entry is getting calculated at Valuation Rate (Which keeps on changing on each backdated transaction) thereby resulting in major difference in accounting GLE and stock ledger Entry.

2. Subcontracting Purchase Receipt
The raw materials supplied for subcontracting in a purchase receipt continue getting revalued on each back dated transaction/adjustment however the subcontracted item (Finished Good) on the same purchase receipt values at incoming rate and valuation adjustment for raw material do not impact their incoming rate. Therefore there always is a difference in Stock Ledger Entry and GL entry.

3. Stock Entry
We identified abnormal behavior for “Recalculate Incoming/Outgoing Rate” check field on stock ledger entry. Especially in case of multiple lines entry (more than 20+ items) where there are multiple finished goods the check box for “Recalculate Incoming/Outgoing Rate” donot get checked therefore the repost valuation impact is not getting calculated for items where this check box is not checked and eventually the stock entry becomes out of balance.

4. Items having Batches
We are facing major challenge in processing repost entry for a transaction (specially stock entry) which have more than 10 items having different batches. There are multiple issues faced while processing repost;
i. The repost gets stuck, system gets extremely slow and we are not able to process any stock related transaction. below error comes quiet frequently
(File “/home/erp/frappe-bench/env/lib/python3.6/site-packages/rq/”, line 64, in handle_death_penalty
‘({0} seconds)’.format(self._timeout))
rq.timeouts.JobTimeoutException: Task exceeded maximum timeout value (1500 seconds)

ii. Abnormal valuation rates and stock value differences get calculated for stock ledger entry which do not balance if we make simple multiplication (QTY * valuation rate = stock value difference)

iii. In some cases stock entry document and stock ledger entry tally but GL entry is having abnormal amounts

Requesting ERPNext team to look into this serious issue


Wow! Could you pls confirm if your system is set to Delete Accounting and Stock Ledger Entries on deletion of Transaction ?

Also, what method of Stock Valuation are you using ?

No its not set on deletion and we are using pertetual accounting - moving average method

Could you please create a Github Issue and paste the link here ? This will allow others who experience similar issues add their comments and upvote on Github


The Github issue is already created. Below is the link