VAT error using Italian language

i use this traslation but there is a problem with the vat. when i insert a row on quotation module, i can chose either 20.0 and 10.0 (when i set colon for decimal number). this cause an calculate error, the total price of a single service/product becomes twice!!!

i try to edit this dropdown list with studio --> edit dropdown but :

  1. i can edit only the laber and not the value
  2. after save nothing happen only 20.0 and 10.0 are showed

Sounds strange that a error like this depends on translation… Do you have no problem if you change language?

We’ll verify.

Thank you Ruberto!

Hi, after some test (with other language) i think that this is a suite crm error and is a big bug…i open a new post. On your version do you have problem with vat?

OK!
You can’t modify the “value” in dropdown, is not a problem with translation.
To change VAT value in dropdown list, you have to insert a new one (and delete the other if you want)

i try but i can edit only the label and after save nothing change (via studio --> edit dropdown --> vat_list), suitecrm display only 10.0 and 20.0

Modify value is not possible. Add new row in dropdown list.
If you add new row, for example value:22 and label:22, and save. Everything is right.

The problem i had see is for value with dot (like 22.5) something go wrong when suitecrm calculate the vat. There is a bug with decimal…but this is not the right post to discuss about that. :wink:

You could create new items in the dropdown list and delete those that you don’t need.

When creating the new ones make sure that, in the value, you enter percentages with the correct decimal separator

if i insert 0,21 (value) and 21% (label) i get an error: “Chiave - Deve essere alfa-numerico senza spazi e il primo carettere deve essere una lettera”

if i insert 21.0 (value) and 21.0 (laber) and than i click on add i can see my added but after save i can choose only between 10.0 and 20.0, my added isn’t there.

however i’ll open a new post in the correct sections.

thanks

These values are stored in files and if the permissions are not set correctly you will not be able to ave them.

So you must make sure that the permissions are correct.

In addition try to delete the content of the cahe folder (do not delete the folder itself) and then run quick repair and rebuild.

To set permissions correctly you should:

  1. change the permissions manually:
    sudo chown -R [owner]:[group] .

sudo chmod -R 755 .

sudo chmod -R 775 cache custom modules themes data upload config_override.php

Where the owner/group are that of your web server.

  1. make sure that config.php has the correct values:
    ‘default_permissions’ =>
    array (
    ‘dir_mode’ => 1517,
    ‘file_mode’ => 420,
    ‘user’ => ‘’, // set correct user here
    ‘group’ => ‘’, // set correct group here

Maybe this is the problem

Alternatively you could edit the dropdown directly in custom/include/language/it_it.lang.php:

$GLOBALS['app_list_strings']['vat_list']=array (
  '0.0' => '0%',
  '5.0' => '5%',
  '7.5' => '7.5%',
  '17.5' => '17.5%',
  '20.0' => '20%',
  '22.0' => '22%',
);

Do the same also for other language files: en_us.lang.php, es_es.lang.php, etc…

i have no group setted and i have no it_it.lang.php file.

  1. Group: use the group to which your ftp user belongs.
    If not sure leave it blank for the time being.

  2. it_it.lang.php
    If you can’t find such file in the directory /custom/include/languages
    just create one and put the definition as in my example:

<?php
$GLOBALS['app_list_strings']['vat_list']=array (
  '0.0' => '0%',
  '5.0' => '5%',
  '7.5' => '7.5%',
  '17.5' => '17.5%',
  '20.0' => '20%',
  '22.0' => '22%',
);

(don’t put the closing tag ?> at the end of the file

I installed an italien lenguage pack so can i add your code in a way that when i upgrade suite crm i’ll not lose it?

if i login with english setting in the vat dropdown list i can select the values that i insert before when was logged with italian settings!!

the problem when i try to add new vat and save remain but now:

  • if i choose italian and delete the two value/line (10.0 and 20.0) then the list for english become empty and for italian remain the same;
  • if i choose english and insert new value then this value are listed into spanish list;
    -if i choose italian and add new vat then this are showed in english list and the italian remain the same
    -if i choose spanish and delete all line then in english vat list are empty and the spanish remain the same;
    -if i choose russion the suitecrm display “an error occured”
    -if i choose italian and delete all line all english and spanish vat list become empty!!

very strange!!!

p.s. moreover the list of voices in the menu under All are double respect to the voice showed by italian settings.

I think you must definitely have a permissions problem!

Please provide:
. SuiteCRM version
.Operating System
. file permissions settings in config.php
. current permissions

I am attaching a script (chperms.php) for linux systems that you can upload to your SuiteCRM main directory and then run in order to set the correct starting permissions after having updated the config.php settings.

I am also attaching four php files with the vat lists in english, italian, russian and spanish that you have to put in custom/include/language
Be careful not to overwrite other existing language files. In case there are you should append the content of the files I am sending you at the end of its respective file.

Then you have to run quick repair and rebuild.

One more thing: please check the SuiteCRM log to see if there are any errors that have been logged

Hi guys.
After a little test, suitecrm do the same things in all the languages. There are something wrong in the source code that calculate the vat.

  • When you insert an integer (without dot) in the dropdown key, the vat calculator work correctly.
  • When you insert a decimal (with dot) in the dropdown key, the vat calculator don’t divide by 100.

SOLUTION:
simply if you want to insert a decimal value, create a key in the dropdown list already divided by 100.

example: If you want a VAT value 12.5%

  1. create new dropdown element
  2. key value = 0.125 and label value = 12.5%

To be honest I haven’t tried it but this means the issues experienced by nonchiedercilaparola are two:

  1. misbehaviour when a dot is used
  2. misbehaviour when editing with dropdown editor

My contribution was towards the second problem as I assumed that the rest was fine.

if i can edit italian dropdown list the first proble will be resolved. i’ll use the script of amariussi…stay tunned:)

Hi there,

Your image of permissions is not showing, also you need to specify a user/group in your config(the user/group recommended by SugarCRM for your OS).

Thanks,

Will.

i’m an idiot!!! sorry