frappe / erpnext

Free and Open Source Enterprise Resource Planning (ERP)
https://erpnext.com
GNU General Public License v3.0
21.93k stars 7.35k forks source link

Accounts Payable Summary Report shows advance amount #33564

Open zahidmansoor opened 1 year ago

zahidmansoor commented 1 year ago

Information about bug

When I reconcile payments and with supplier invoices from payment reconciliation. The invoice status is changed to "Paid" but in accounts payable summary, it shows the amount in advance amount section. In the genereal ledger of that supplier, the invoice number is also not showed against the payment entry although when I open the payment entry, the invoice is linked with that payment entry.

Module

accounts

Version

ERPNext: v14.12.0 (version-14) Frappe Framework: v14.21.1 (version-14)

Installation method

manual install

Relevant log output / Stack trace / Full Error Message.

No response

zahidmansoor commented 1 year ago

Accounts receivable Summary Report also shows advance amount after reconciling through payment reconciliation too. Both payable and receivable reports and their respective ledgers do not show linked invoices that have been hit from payment reconciliation tool.

ruthra-kumar commented 1 year ago

From V14, a new ledger- 'Payment Ledger', is used to link invoices with payments. Upon reconciliation, only payment ledger is updated. So, 'against_voucher' in General Ledger is will not show linked invoice.

Can you post screenshot of the 'Payment Ledger Entry' for the advance payment? You can filter on 'Voucher Type' and 'Voucher No'. Ex:

Screenshot 2023-01-10 at 1 38 19 PM
zahidmansoor commented 1 year ago

image This image shows my payment ledger entry for which has been hit against a sales invoice from payment reconciliation. But when I check the receivable summary report, it shows this amount under advance amount not under paid amount. Screen shot attached below: image

ruthra-kumar commented 1 year ago

This could be caused by an Invalid Payment Ledger Entry. Use 'Repost Payment Ledger' to repost Payment Ledger entries. If there are invalid entries, it should fix it.

Check this PR description for more details

zahidmansoor commented 1 year ago

I am not able to repost payment ledger entry. It gives the following error: image

ruthra-kumar commented 1 year ago

I am not able to repost payment ledger entry. It gives the following error: image

'AttributeError' is fixed in 14.13.0. You can retry post update.

aei-gt commented 1 year ago

I have a similar problem, i delete all transactions and documents of a client (error on erpnext when void a invoice) but the report apear with data in report "Accounts Receivable Summary"

image

but in TRIAL balance show correct value (0 because not have transactions).

image

the big problem is the dashboard account change show data to a invalid values (all data of purcharse reset to 0 or negative).

image

is a BIG BUG

ruthra-kumar commented 1 year ago

@aei-gt Would suggest you to create a seperate issue for this

ruthra-kumar commented 1 year ago

I am not able to repost payment ledger entry. It gives the following error: image

'AttributeError' is fixed in 14.13.0. You can retry post update.

@zahidmansoor were you able to repost?

zahidmansoor commented 1 year ago

Yes I was able to repost items. But aging issue remains

aashaybinaykia commented 1 year ago

I am facing the same issue, I made a payment reconciliation and a payment ledger entry was created.

image

However, the Accounts Receivable summary does not reflect the same. Perhaps because it picks advance entries from GL only?

image

What can be done? @ruthra-kumar any suggestions? Thanks!

ruthra-kumar commented 1 year ago

@aashaybinaykia Accounts Receivable Summary and Accounts Receivable both uses Payment Ledger.

Check the Accounts Receivable report for that Customer and identify which vouchers contribute to the advance amount. Then you can check the Payment Ledger of those vouchers to see if there is any incorrect postings.

aashaybinaykia commented 1 year ago

image

@ruthra-kumar thanks for your response. I checked the accounts receivable report. There is no amount which is an 'advance' for any invoice. The amount showing under 'Advance Amount of Accounts Receivable Summary is adjusted against a sales invoice as shared in the picture. Is this a bug?

amrit-citrusleaf commented 5 months ago

@ruthra-kumar - we are facing somewhat same issue. After doing payment reconciliation on a sales invoice against a payment entry, payment entry gets updated with the references (sales invoices, in this case) but this payment entry is not shown in the general ledger of the customer and/or of the sales invoice.

Further investigation showed that the GL Entry made against the payment entry (which was updated by the payment reconciliation tool) does not have any value for "Against Voucher Type" and "Against Voucher". The Sales invoice is not there in the remarks as well.

ruthra-kumar commented 5 months ago

@amrit-citrusleaf

In v14, a new Ledger called Payment Ledger was added. This ledger only captures entries associated with Receivable/Payable accounts.

Check this pr for more details

When you reconcile, only the Payment Ledger will be updated. So, if you want to find out payments made against an Invoice, you can make use of Payment Ledger report.

amrit-citrusleaf commented 5 months ago

@ruthra-kumar - understood.

However, the clients are used to clicking "Accounting Ledger" button which is present everywhere, from sales invoice to customer details, and accounting ledger is built with "GL Entry" DocType. The payment entries which have been reconciled are now missing from it which is causing great confusion to enveryone.

Please suggest how to tackle this? Should we add a "Payment Ledger" button in all the doctypes where "Accounting Ledger" button is present?

amrit-citrusleaf commented 5 months ago

We can continue this discussion here- https://discuss.frappe.io/t/payment-ledger-v-s-general-ledger-and-payment-reconciliation/124131