Skip to content
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

Return invoice wrong total #41343

Closed
perotom opened this issue May 6, 2024 · 6 comments
Closed

Return invoice wrong total #41343

perotom opened this issue May 6, 2024 · 6 comments
Labels

Comments

@perotom
Copy link

perotom commented May 6, 2024

Information about bug

I created a normal invoice:
Bild (6)

And then tried to create a return invoice but the total amount is different:
Bild (7)

Looks like the difference comes from this one green marked item. Maybe rounding error?

Module

selling

Version

ERPNext: v15.20.3
Frappe Framework: v15.22.0

Installation method

easy-install

Relevant log output / Stack trace / Full Error Message.

No response

@perotom perotom added the bug label May 6, 2024
@Nihantra-Patel
Copy link
Contributor

Everything is working fine. No problems were encountered in the latest version 15.

scrnli_06_06_2024_16-31-06.mp4

@perotom
Copy link
Author

perotom commented Jun 6, 2024

If you use quantity 1, it works but if you use for example quantity 10 with price 82.50€ and 15% discount, you will get a wrong total. This issue is still there.

@Nihantra-Patel
Copy link
Contributor

Tested, worked properly.

scrnli_06_06_2024_17-21-03.mp4

@perotom
Copy link
Author

perotom commented Jun 6, 2024

Please use the price values I used. It is a rounding issue. The following is happening:
Item A: 82,50€ - 15% = 70,125€
On the sales invoice, it is rounded up:
70,125 = 70,13€ * 10 = 701,30€
and on the return invoice it is rounded down:
70,125 = 70,12€ * 10 = 701,20€
resulting in a wrong total value. Seems like the rounding mode is not consistent across sales and return invoices.

@Nihantra-Patel
Copy link
Contributor

Please check with latest version and provide the video.

@perotom
Copy link
Author

perotom commented Jun 6, 2024

I changed the rounding mode from bankers to commercial and now it works. Thank you.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants