InvoicePlane / InvoicePlane

A self-hosted open source application for managing your invoices, clients and payments.
https://www.invoiceplane.com
Other
2.55k stars 799 forks source link

In some cases an amount with a comma in it will not give an error, resulting in SQL Query errors #745

Closed UnderDogg closed 1 year ago

UnderDogg commented 3 years ago

Somehow it was possible for amounts to contain comma's and will not error out: /modules/invoices/models/Mdl_item_amounts.php Will result in: Column count doesn’t match value count at row 1 - Invalid query: INSERT INTO ip_invoice_item_amounts (item_id, item_subtotal, item_tax_total, item_discount, item_total) VALUES (23, 19, 2,47, 0, 21,47)

The system USES THE LOCALE DECIMAL SIGN (in my case «,» as defined in el_GR locale) IN PLACE OF the standard sql decimal separator «.»

oussamadouhou commented 3 years ago

You need to use the . (dot) instead

UnderDogg commented 3 years ago

Yes, I'm aware of that.

I've asked the user on the forum to give me steps to reproduce, so the bug report can become more clear.

UnderDogg commented 3 years ago

The user in the forum is using Greek language file. He says he switched to English and has the same problem.

The user has added the following information:

The user has failed to add the steps:

@oussamadouhou can you help reproduce this?

nielsdrost7 commented 1 year ago

Cannot reproduce the problem, going to close this issue