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

EPC-QR Code captures total invoice amount although partially paid #33148

Open
ThatMojo opened this issue Feb 19, 2025 · 2 comments
Open

EPC-QR Code captures total invoice amount although partially paid #33148

ThatMojo opened this issue Feb 19, 2025 · 2 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@ThatMojo
Copy link

Bug

Image

Module: Invoices
Observed behaviour: Created EPC QR Code of the invoice references the total amount 800 € not considering partial payment
Expected behaviour: EPC QR Code considers partial payments and code generated enters 650 € instead of 800 € in this example.

Dolibarr Version

20.0.3

Environment PHP

No response

Environment Database

No response

Steps to reproduce the behavior and expected behavior

  1. Create invoice
  2. Enter a partial payment
  3. Generate invoice PDF with EPC QR Code
  4. Scan QR Code with your mobile

Attached files

No response

@ThatMojo ThatMojo added the Bug This is a bug (something does not work as expected) label Feb 19, 2025
@hregis
Copy link
Contributor

hregis commented Feb 19, 2025

@ThatMojo i confirm this bug but i don't know how to fix this. @eldy ?

@shasta123
Copy link
Contributor

@ThatMojo, I also ran into this once while testing.
In core/class/commoninvoice.class.php buildEPCQrCodeString() I changed

                // $totalTTCString = number_format($this->total_ttc, 2, '.', '');
to
                $totalTTCString = number_format($this->getRemainToPay(), 2, '.', '');

I haven't had the time to test it properly, so it could have strange side effects.

Cheers,
Michael

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

3 participants