erpnext icon indicating copy to clipboard operation
erpnext copied to clipboard

v15: Purchase order advance paid is not updated on payment entry & the payment request status is also not updated.

Open mujeerhashmi opened this issue 1 year ago • 14 comments

Information about bug

The payment ledger entry created for payment against purchase order is not created properly. The fields "Against Voucher Type" and "Against Voucher No" are same as "Voucher Type" & "Voucher No".

Screenshot 2024-01-26 at 9 07 04 AM

Module

accounts, buying

Version

ERPNext: v15.10.6 (version-15) Frappe Framework: v15.11.0 (version-15)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

mujeerhashmi avatar Jan 26 '24 03:01 mujeerhashmi

@deepeshgarg007 @ruthra-kumar Kindly have a look. Tagging for criticality.

mujeerhashmi avatar Jan 26 '24 10:01 mujeerhashmi

Does the Payment Entry has any reference? and Is the Book Advance Payments in Separate Party Account option enabled in Company master?

ruthra-kumar avatar Jan 26 '24 14:01 ruthra-kumar

Does the Payment Entry has any reference?

The payment entry has reference to purchase order.

and Is the Book Advance Payments in Separate Party Account option enabled in Company master?

Yes the option is selected.

To give you the timelines, the issue seems to have happened with changes introduced after Jan 1.

mujeerhashmi avatar Jan 27 '24 04:01 mujeerhashmi

@ruthra-kumar The issue is not seen when we disable Book Advance Payments in Separate Party Account.

mujeerhashmi avatar Jan 27 '24 18:01 mujeerhashmi

I think the GL build logic introduced in #38393 is the issue . The references for PO are not kept in the GL entry and hence the logic to update the advance paid status fails.

mujeerhashmi avatar Jan 27 '24 19:01 mujeerhashmi

@ruthra-kumar either the gl build logic or the status of the advance paid logic has to change. I am not fully aware of the design of the gl build logic so cannot send the PR. But it is very critical for this to be fixed as some of us have production sites on v15. Hope this issue will get the attention it needs 😊.

mujeerhashmi avatar Jan 28 '24 19:01 mujeerhashmi

@ruthra-kumar Request your kind attention for the fix. May be you can guide me so that i can raise the PR for this.

mujeerhashmi avatar Jan 30 '24 14:01 mujeerhashmi

@mujeerhashmi We are making a fix for this. Should be ready by this week

ruthra-kumar avatar Jan 31 '24 03:01 ruthra-kumar

Fix will take more time to develop.

ruthra-kumar avatar Feb 02 '24 12:02 ruthra-kumar

Thanks for the heads up. Any quick fix for production ? By the way more as in how much more ?

mujeerhashmi avatar Feb 02 '24 12:02 mujeerhashmi

Can't provide any date at the moment.

This issue only affects the Advance Paid field in Sales/Purchase Order, which is not a critical field. Can you explain how this field affects or important for your scenario?

ruthra-kumar avatar Feb 02 '24 14:02 ruthra-kumar

As stated in the title, The status of payment request through which the payment entry is created is also not getting updated. The team processing payment request will not know whether it was processed. The workflows are getting affected.

mujeerhashmi avatar Feb 02 '24 15:02 mujeerhashmi

Hello @ruthra-kumar. Any updates ???

mujeerhashmi avatar Feb 12 '24 03:02 mujeerhashmi

You can pull the changes from https://github.com/frappe/erpnext/pull/39681, test on your case and use it. But, it is highly inefficient - if payment entry has many references, reconciliation will be slow.

We are working on a fix that will be performant than this, which will take a while.

ruthra-kumar avatar Feb 12 '24 07:02 ruthra-kumar

Fixed by https://github.com/frappe/erpnext/pull/39681

ruthra-kumar avatar Mar 22 '24 03:03 ruthra-kumar