frappe / erpnext

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

Incorrect Taxes on Advance Payment #42843

Open ruthra-kumar opened 2 months ago

ruthra-kumar commented 2 months ago

Information about bug

Consider this scenario:

We have a Sales Order for $100 + 20% VAT

We have agreed on 50% payment in advance

The VAT is payable by us on receipt of the advance payment

On receipt of the advance payment, we create a Payment Entry recoding Paid Amount: $60, Allocated to Sales Order: $50, VAT included in payment (Taxes table): $10

This creates the following issues:

The Advance Paid in Sales Order shows only $50, despite having received $60 from the customer.

In the final Sales Invoice, Total Advance is $50. The Outstanding Amount is calculated as Grand Total - Advance Received. The $10 VAT that we have received in advance is not getting deducted.

Possible solution:

The Advance Paid in Sales Order either shows $60 or is clearly named Net Advance Received.

The Total Advance in Sales Invoice either shows $60 or gets deducted from the Net Total, not from the Grand Total.

Module

accounts

Version

ERPNext v14 ERPNext v15

Installation method

None

Relevant log output / Stack trace / Full Error Message.

No response

Internal Ref: https://support.frappe.io/helpdesk/tickets/19411

ruthra-kumar commented 2 months ago
To fix this, allocation should always have the gross amount - 60, with the below ledger entries. Account Debit Credit
Debtors   60
Vat 10  
Cash 50

nakul80 commented 2 months ago

I have had similar issue along with another linked issue. Payment terms typically say advance of a certain percentage and in most cases this does not include taxes as the job isn't performed or goods not delivered. Advance should generally not include the tax. So if 10% advance is shown in purchase order in the payment terms table, it shows as 12$ when it should be 10$. Giving this print to the supplier is not possible. To clarify, I'm in India where this is most likely scenario as gst is not payable on advance.

barredterra commented 2 months ago

In Germany, advances are usually considered as gross payments. The GST liability is created on receipt of the advance.

nakul80 commented 2 months ago

Right now I have managed to bypass the issue by removing the taxes in PO and adding it at the time of invoicing. Not ideal but its a workaround.

Since different countries have different procedures, this should be tackled. Maybe a dropdown like we have in taxation table.