Locale file (el_GR) & decimals problem

Hi to all,

I just discoverd your software (v1.5.11) and was willing to try it on my localhost (Debian 9, php 7.4 mariadb 10.1.48).

Installation and seting up the system (company, taxes, system language etc.) using the Greek language was fine and smooth. I entered a virtual client and a couple of products without problems.

However when I was trying to create my first invoice the system halted and I’m getting the message «It seems that the application stuck because of an error.»

In the application/logs/log-2021-07-05.php log file I have the messages:

DEBUG - 2021-07-05 16:09:05 → File loaded: /var/www/krytopos/application/modules/invoices/models/Mdl_item_amounts.php
ERROR - 2021-07-05 16:09:05 → Query error: 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 problem is that the query real values to insert are 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 «.»

I tried to reset the locale (user and system languages) to en_US but no change.

Thank you for any help

Change the comma’s for your amounts to periods.

Somehow the comma’s for the amounts got into the SQL Query and that is a mistake.

If you can describe step-by-step what you did to get those comma’s for the amounts into the database, it’s good enough to supplement the bug report.

I’ve made an issue for it on github.

Can you add your information here or there

Hi again,

As I wrote before, I installed the software locally on a debian 9 pc, running php7.4 and MariadDB 10.1.48.

I followed the instructions for the install and db creation. The software is configured:

System Language: Greek

Default country: Greece

Currency Symbol: €

Currency Code: EUR

Number Format: 1.000.000,00 European format

Tax Rate Decimal Places: 2

User settings

Language: Greek

Country: Greece

I added 1 virtual client, 2 products categories, 2 products (all entries in Greek) and the system was running smoothly.

When I tried to create an invoice for my virtual client I get the bug (?).

I changed the system and user language config to english, currency to US dollar and number format to US/EN but I’m getting the same result.

My debian system locales (if can be of any help) are:

locale command result:

LANG=en_US.UTF-8

LANGUAGE=en_US:en

LC_CTYPE=el_GR.UTF-8

LC_NUMERIC=el_GR.UTF-8

LC_TIME=el_GR.UTF-8

LC_COLLATE=el_GR.UTF-8

LC_MONETARY=el_GR.UTF-8

LC_MESSAGES=en_US.UTF-8

LC_PAPER=el_GR.UTF-8

LC_NAME=el_GR.UTF-8

LC_ADDRESS=el_GR.UTF-8

LC_TELEPHONE=el_GR.UTF-8

LC_MEASUREMENT=el_GR.UTF-8

LC_IDENTIFICATION=el_GR.UTF-8

Thank you

Your solution is as follows:

  • make sure that you are not using comma’s《,》in your amounts.

This topic was automatically closed after 3 days. New replies are no longer allowed.