Skip to content

Incorrect rounding on Credit Notes #47705

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
WillemJansen opened this issue May 23, 2025 · 3 comments
Open

Incorrect rounding on Credit Notes #47705

WillemJansen opened this issue May 23, 2025 · 3 comments
Labels
bug need-more-info Provide additional context, steps to reproduce this issue.

Comments

@WillemJansen
Copy link

Information about bug

Dear ERPNext team,
first of a a big thank you for creating such a powerful and elegant software!

Basic premise is a somewhat peculiar rounding strategy for negative numbers resulting in inconsistent credit notes:

Situation:
The total values of a credit note differs from the original sales invoice, often just by a single cent. This is induced by the total value per item (price * quantity) gives minimally different results, depending on whether the quantity is positive or negative, which it is by default on credit notes.

Root cause:
Rounding strategy for negative numbers

  • "+12,345 EUR" for an item on the sales invoice is rounded up to "+12,35 EUR" (correctly)
  • "-12,345 EUR" for an item on the credit note is rounded up to "-12,34 EUR (definitely inconsistent, likely incorrect)

Solution:
To ensure consistency of invoices and credit notes, employ a rounding strategy that is not affected by the sign of the value.

Module

accounts

Version

Installed Apps
ALYF Banking: v15.17.0 (HEAD)

ERPNext: v15.61.1 (HEAD)

ERPNext Gocardless Bank: v1.0.0 (HEAD)

European e-Invoice: v15.9.0 (HEAD)

Frappe Framework: v15.68.1 (HEAD)

Frappe HR: v15.45.2 (HEAD)

Installation method

FrappeCloud

Relevant log output / Stack trace / Full Error Message.

@DipenFrappe
Copy link
Collaborator

Can you confirm what the rounding method is in your case

Image

@DipenFrappe DipenFrappe added the need-more-info Provide additional context, steps to reproduce this issue. label May 26, 2025
@WillemJansen
Copy link
Author

Rounding method was not set, will set it to commercial & check once more!
Regardless, I feel that any inconsistency between original invoice and credit note should be avoided...

Will report back!

@DipenFrappe
Copy link
Collaborator

I checked it is working fine. 112.5 rounding to 113 and 112.49 to 112 in both the sales invoice and sales return/credit note.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug need-more-info Provide additional context, steps to reproduce this issue.
Projects
None yet
Development

No branches or pull requests

2 participants