From 91c6d47a60059b5f70bfcd55d9b55a41c7b21629 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Oct 2013 00:06:14 +0200 Subject: [PATCH 01/25] Fix: Clean param Conflicts: htdocs/fourn/class/fournisseur.facture.class.php --- htdocs/fourn/class/fournisseur.facture.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/fourn/class/fournisseur.facture.class.php b/htdocs/fourn/class/fournisseur.facture.class.php index be2ce721356..dbaf9ac2cea 100644 --- a/htdocs/fourn/class/fournisseur.facture.class.php +++ b/htdocs/fourn/class/fournisseur.facture.class.php @@ -1126,6 +1126,7 @@ class FactureFournisseur extends CommonInvoice if ($type < 0) return -1; // Clean parameters + if (empty($vatrate)) $vatrate=0; if (empty($txlocaltax1)) $txlocaltax1=0; if (empty($txlocaltax2)) $txlocaltax2=0; From 8d63c2f9c53b5d1e31473d0649ffd8a27acde715 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Oct 2013 00:44:55 +0200 Subject: [PATCH 02/25] Fix: ref_ext was not loaded Conflicts: htdocs/contact/class/contact.class.php --- htdocs/contact/class/contact.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/contact/class/contact.class.php b/htdocs/contact/class/contact.class.php index 036b99f9ae3..4a05f112eba 100644 --- a/htdocs/contact/class/contact.class.php +++ b/htdocs/contact/class/contact.class.php @@ -469,7 +469,7 @@ class Contact extends CommonObject /** - * Charge l'objet contact + * Load object contact * * @param int $id id du contact * @param User $user Utilisateur (abonnes aux alertes) qui veut les alertes de ce contact @@ -481,7 +481,7 @@ class Contact extends CommonObject $langs->load("companies"); - $sql = "SELECT c.rowid, c.fk_soc, c.civilite as civilite_id, c.lastname, c.firstname,"; + $sql = "SELECT c.rowid, c.fk_soc, c.ref_ext, c.civilite as civilite_id, c.lastname, c.firstname,"; $sql.= " c.address, c.zip, c.town,"; $sql.= " c.fk_pays as country_id,"; $sql.= " c.fk_departement,"; @@ -510,6 +510,7 @@ class Contact extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->rowid; + $this->ref_ext = $obj->ref_ext; $this->civilite_id = $obj->civilite_id; $this->lastname = $obj->lastname; $this->firstname = $obj->firstname; From e343d3bc6ff12ea7536b0de0e382565437904f96 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Tue, 8 Oct 2013 21:14:54 +0200 Subject: [PATCH 03/25] Fix: missing property --- htdocs/adherents/fiche.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/adherents/fiche.php b/htdocs/adherents/fiche.php index d297e6aad81..bca9710c2c7 100644 --- a/htdocs/adherents/fiche.php +++ b/htdocs/adherents/fiche.php @@ -273,6 +273,8 @@ if ($action == 'update' && ! $_POST["cancel"] && $user->rights->adherent->creer) $object->pass = trim($_POST["pass"]); $object->societe = trim($_POST["societe"]); + $object->company = trim($_POST["societe"]); + $object->address = trim($_POST["address"]); $object->zip = trim($_POST["zipcode"]); $object->town = trim($_POST["town"]); From 637417e1d4cb43531091d838d58ac29a7bd476c5 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 9 Oct 2013 18:14:19 +0200 Subject: [PATCH 04/25] Create contrat_extrafields.sql --- .../mysql/tables/contrat_extrafields.sql | 25 +++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 htdocs/install/mysql/tables/contrat_extrafields.sql diff --git a/htdocs/install/mysql/tables/contrat_extrafields.sql b/htdocs/install/mysql/tables/contrat_extrafields.sql new file mode 100644 index 00000000000..75a1f9cabc9 --- /dev/null +++ b/htdocs/install/mysql/tables/contrat_extrafields.sql @@ -0,0 +1,25 @@ +-- ======================================================================== +-- Copyright (C) 2013 Charles-Fr BENKE +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- ======================================================================== + +create table llx_contrat_extrafields +( + rowid integer AUTO_INCREMENT PRIMARY KEY, + tms timestamp, + fk_object integer NOT NULL, + import_key varchar(14) -- import key +) ENGINE=innodb; From 943bb2afc78f5038d325a4774cf6187e33128f8d Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 9 Oct 2013 18:16:56 +0200 Subject: [PATCH 05/25] Create llx_contrat_extrafields.key.sql add contrat extrafields key file --- .../tables/llx_contrat_extrafields.key.sql | 20 +++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql diff --git a/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql b/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql new file mode 100644 index 00000000000..277520d7c2e --- /dev/null +++ b/htdocs/install/mysql/tables/llx_contrat_extrafields.key.sql @@ -0,0 +1,20 @@ +-- =================================================================== +-- Copyright (C) 2013 Charles-Fr BENKE +-- +-- This program is free software; you can redistribute it and/or modify +-- it under the terms of the GNU General Public License as published by +-- the Free Software Foundation; either version 3 of the License, or +-- (at your option) any later version. +-- +-- This program is distributed in the hope that it will be useful, +-- but WITHOUT ANY WARRANTY; without even the implied warranty of +-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +-- GNU General Public License for more details. +-- +-- You should have received a copy of the GNU General Public License +-- along with this program. If not, see . +-- +-- =================================================================== + + +ALTER TABLE llx_contrat_extrafields ADD INDEX idx_contrat_extrafields (fk_object); From bafea2c4eba0d1f2d607e4a2f114a7777bf73ea8 Mon Sep 17 00:00:00 2001 From: BENKE Charles Date: Wed, 9 Oct 2013 18:17:59 +0200 Subject: [PATCH 06/25] Rename contrat_extrafields.sql to llx_contrat_extrafields.sql --- .../{contrat_extrafields.sql => llx_contrat_extrafields.sql} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename htdocs/install/mysql/tables/{contrat_extrafields.sql => llx_contrat_extrafields.sql} (100%) diff --git a/htdocs/install/mysql/tables/contrat_extrafields.sql b/htdocs/install/mysql/tables/llx_contrat_extrafields.sql similarity index 100% rename from htdocs/install/mysql/tables/contrat_extrafields.sql rename to htdocs/install/mysql/tables/llx_contrat_extrafields.sql From 41bf4d53a84d614d150c4fa12e1667b7f3d312d6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 9 Oct 2013 20:44:42 +0200 Subject: [PATCH 07/25] Fix: filter on warehouse Conflicts: htdocs/product/stock/mouvement.php --- htdocs/product/stock/mouvement.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index a5de7d9bb3d..4b879e2dd59 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2011 Laurent Destailleur + * Copyright (C) 2004-2013 Laurent Destailleur * Copyright (C) 2005-2009 Regis Houssin * * This program is free software; you can redistribute it and/or modify @@ -426,7 +426,7 @@ if ($resql) print ''; print ''; print ''; - print ''; + if (empty($idproduct) || $idproduct < 0) print ''; // We are on a specific warehouse card, no filter on other should be possible print ''; print ''; print ''; From d6da87138150d5f477ff3be014d810109926348e Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 10 Oct 2013 09:31:37 +0200 Subject: [PATCH 08/25] Add object declaration on paiment --- htdocs/compta/paiement.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/htdocs/compta/paiement.php b/htdocs/compta/paiement.php index 6faeb1fa951..b75c952b1f6 100644 --- a/htdocs/compta/paiement.php +++ b/htdocs/compta/paiement.php @@ -57,6 +57,14 @@ if ($user->societe_id > 0) $socid = $user->societe_id; } +$object=new Facture($db); + +// Load object +if ($facid > 0) +{ + $ret=$object->fetch($id); +} + // Initialize technical object to manage hooks of paiements. Note that conf->hooks_modules contains array array $hookmanager = new HookManager($db); $hookmanager->initHooks(array('paiementcard')); From 695cef55d9a7f8ed7d731975bd46afd2f8c15951 Mon Sep 17 00:00:00 2001 From: Maxime Kohlhaas Date: Thu, 10 Oct 2013 09:31:47 +0200 Subject: [PATCH 09/25] Rem duplicate code --- htdocs/expedition/fiche.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/htdocs/expedition/fiche.php b/htdocs/expedition/fiche.php index c586329d4c9..f869bb24715 100644 --- a/htdocs/expedition/fiche.php +++ b/htdocs/expedition/fiche.php @@ -70,11 +70,6 @@ $hidedesc = (GETPOST('hidedesc','int') ? GETPOST('hidedesc','int') : (! empty( $hideref = (GETPOST('hideref','int') ? GETPOST('hideref','int') : (! empty($conf->global->MAIN_GENERATE_DOCUMENTS_HIDE_REF) ? 1 : 0)); $object = new Expedition($db); -// Load object -if ($id > 0 || ! empty($ref)) -{ - $ret=$object->fetch($id, $ref); -} // Load object if ($id > 0 || ! empty($ref)) @@ -95,8 +90,6 @@ if ($action == 'add') { $error=0; - $object = new Expedition($db); - $db->begin(); $object->note = GETPOST('note','alpha'); From f225b35a909e78e461cbad2cb9e97ce603e7610e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Oct 2013 15:51:59 +0200 Subject: [PATCH 10/25] Fix: filter on warehouse Conflicts: htdocs/product/stock/mouvement.php --- htdocs/product/stock/mouvement.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/stock/mouvement.php b/htdocs/product/stock/mouvement.php index 4b879e2dd59..330fae32f3d 100644 --- a/htdocs/product/stock/mouvement.php +++ b/htdocs/product/stock/mouvement.php @@ -42,7 +42,7 @@ $id=GETPOST('id','int'); $product_id=GETPOST("product_id"); $action=GETPOST('action'); $cancel=GETPOST('cancel'); -$idproduct = isset($_GET["idproduct"])?$_GET["idproduct"]:$_PRODUCT["idproduct"]; +$idproduct = GETPOST('idproduct','int'); $year = isset($_GET["year"])?$_GET["year"]:$_POST["year"]; $month = isset($_GET["month"])?$_GET["month"]:$_POST["month"]; $search_movement = isset($_REQUEST["search_movement"])?$_REQUEST["search_movement"]:''; From d12240e0877dab7c0b4faf926874709823efd952 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Oct 2013 22:37:07 +0200 Subject: [PATCH 11/25] Add doc --- dev/iso-normes/vat_number_names.txt | 1 + 1 file changed, 1 insertion(+) create mode 100644 dev/iso-normes/vat_number_names.txt diff --git a/dev/iso-normes/vat_number_names.txt b/dev/iso-normes/vat_number_names.txt new file mode 100644 index 00000000000..23fce59ed3b --- /dev/null +++ b/dev/iso-normes/vat_number_names.txt @@ -0,0 +1 @@ +http://en.wikipedia.org/wiki/VAT_identification_number \ No newline at end of file From 053d5eeff77829047446915fd65446b2d1845d3a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 10 Oct 2013 22:50:22 +0200 Subject: [PATCH 12/25] Set name of vat number for some countries according to http://en.wikipedia.org/wiki/VAT_identification_number --- htdocs/langs/bg_BG/companies.lang | 2 +- htdocs/langs/da_DK/companies.lang | 2 +- htdocs/langs/de_AT/companies.lang | 2 +- htdocs/langs/de_DE/companies.lang | 2 +- htdocs/langs/es_AR/companies.lang | 3 +++ htdocs/langs/es_HN/companies.lang | 5 ++++- htdocs/langs/es_MX/companies.lang | 5 ++++- htdocs/langs/es_PE/companies.lang | 5 ++++- htdocs/langs/et_EE/companies.lang | 2 +- htdocs/langs/fi_FI/companies.lang | 2 +- htdocs/langs/hu_HU/companies.lang | 2 +- htdocs/langs/is_IS/companies.lang | 2 +- htdocs/langs/nb_NO/companies.lang | 2 +- htdocs/langs/nl_NL/companies.lang | 2 +- htdocs/langs/pl_PL/companies.lang | 2 +- htdocs/langs/pt_PT/companies.lang | 8 ++++---- htdocs/langs/ro_RO/companies.lang | 2 +- htdocs/langs/ru_RU/companies.lang | 2 +- htdocs/langs/sv_SE/companies.lang | 2 +- htdocs/langs/tr_TR/companies.lang | 2 +- 20 files changed, 34 insertions(+), 22 deletions(-) diff --git a/htdocs/langs/bg_BG/companies.lang b/htdocs/langs/bg_BG/companies.lang index 5d1d8adf60e..e2daf7c53bc 100644 --- a/htdocs/langs/bg_BG/companies.lang +++ b/htdocs/langs/bg_BG/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 ProfId6=Professional ID 6 -ProfId1AR=Проф. Id едно (CUIT / Cuil) +ProfId1AR=Проф. Id едно (CUIL) ProfId2AR=Проф. Id 2 (Revenu зверове) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/da_DK/companies.lang b/htdocs/langs/da_DK/companies.lang index a10474280f6..abaf28da9d6 100644 --- a/htdocs/langs/da_DK/companies.lang +++ b/htdocs/langs/da_DK/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professionel ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (revenu Bestier) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/de_AT/companies.lang b/htdocs/langs/de_AT/companies.lang index a885eb31aa9..70a7d5b1c30 100644 --- a/htdocs/langs/de_AT/companies.lang +++ b/htdocs/langs/de_AT/companies.lang @@ -301,7 +301,7 @@ ProfId1NL=KVK nummer ProfId2NL=- ProfId3NL=- ProfId4NL=- -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (Revenu Bestien) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/de_DE/companies.lang b/htdocs/langs/de_DE/companies.lang index 0bc933d8487..e362c554287 100644 --- a/htdocs/langs/de_DE/companies.lang +++ b/htdocs/langs/de_DE/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (Revenu Bestien) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/es_AR/companies.lang b/htdocs/langs/es_AR/companies.lang index 81f8cda5161..22a314d088a 100644 --- a/htdocs/langs/es_AR/companies.lang +++ b/htdocs/langs/es_AR/companies.lang @@ -1,3 +1,6 @@ # Dolibarr language file - es_AR - companies CHARSET=UTF-8 CompanyHasCreditNote=Este cliente tiene %s %s notas de crédito/anticipos disponibles +VATIntra=CUIT +VATIntraShort=CUIT +VATIntraVeryShort=CUIT \ No newline at end of file diff --git a/htdocs/langs/es_HN/companies.lang b/htdocs/langs/es_HN/companies.lang index c0f5dce747f..58896f39eaf 100644 --- a/htdocs/langs/es_HN/companies.lang +++ b/htdocs/langs/es_HN/companies.lang @@ -1,4 +1,7 @@ # Dolibarr language file - es_HN - companies CHARSET=UTF-8 VATIsUsed=Sujeto a ISV -VATIsNotUsed=No sujeto a ISV \ No newline at end of file +VATIsNotUsed=No sujeto a ISV +VATIntra=RTN +VATIntraShort=RTN +VATIntraVeryShort=RTN \ No newline at end of file diff --git a/htdocs/langs/es_MX/companies.lang b/htdocs/langs/es_MX/companies.lang index 6c7e95b8796..8a13efbdb55 100644 --- a/htdocs/langs/es_MX/companies.lang +++ b/htdocs/langs/es_MX/companies.lang @@ -2,4 +2,7 @@ CHARSET=UTF-8 State=Estado Town=Municipio -CompanyHasCreditNote=Este cliente tiene %s %s notas de crédito/anticipos disponibles \ No newline at end of file +CompanyHasCreditNote=Este cliente tiene %s %s notas de crédito/anticipos disponibles +VATIntra=RFC +VATIntraShort=RFC +VATIntraVeryShort=RFC \ No newline at end of file diff --git a/htdocs/langs/es_PE/companies.lang b/htdocs/langs/es_PE/companies.lang index 81d0eff2c55..7b11f590caa 100644 --- a/htdocs/langs/es_PE/companies.lang +++ b/htdocs/langs/es_PE/companies.lang @@ -1,4 +1,7 @@ # Dolibarr language file - es_PU - companies CHARSET=UTF-8 VATIsUsed=Sujeto a IGV -VATIsNotUsed=No sujeto a IGV \ No newline at end of file +VATIsNotUsed=No sujeto a IGV +VATIntra=RUC +VATIntraShort=RUC +VATIntraVeryShort=RUC \ No newline at end of file diff --git a/htdocs/langs/et_EE/companies.lang b/htdocs/langs/et_EE/companies.lang index 558ab85399f..06eb8aa93aa 100644 --- a/htdocs/langs/et_EE/companies.lang +++ b/htdocs/langs/et_EE/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/fi_FI/companies.lang b/htdocs/langs/fi_FI/companies.lang index d6f3cd6652f..4223cc9a7b3 100644 --- a/htdocs/langs/fi_FI/companies.lang +++ b/htdocs/langs/fi_FI/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional-tunnuksen 3 ProfId4=Professional-tunnuksen 4 ProfId5=Ammatillinen tunnus 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (revenu brutes) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/hu_HU/companies.lang b/htdocs/langs/hu_HU/companies.lang index 8634faed477..133f32f706f 100644 --- a/htdocs/langs/hu_HU/companies.lang +++ b/htdocs/langs/hu_HU/companies.lang @@ -104,7 +104,7 @@ ProfId3=Szakmai ID 3 ProfId4=Szakmai ID 4 ProfId5=Szakmai ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof ID 1 (CUIT / CUIL) +ProfId1AR=Prof ID 1 (CUIL) ProfId2AR=Prof ID 2 (revenu barmok) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/is_IS/companies.lang b/htdocs/langs/is_IS/companies.lang index 79078841816..242815d9afb 100644 --- a/htdocs/langs/is_IS/companies.lang +++ b/htdocs/langs/is_IS/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / CUIL) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (Revenu brutes) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/nb_NO/companies.lang b/htdocs/langs/nb_NO/companies.lang index a69b4865fe8..9b5fd5d7ed4 100644 --- a/htdocs/langs/nb_NO/companies.lang +++ b/htdocs/langs/nb_NO/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Profesjonell ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof ID 2 (inntekter på brutes) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/nl_NL/companies.lang b/htdocs/langs/nl_NL/companies.lang index b596a1e39a8..6f69c2d1963 100644 --- a/htdocs/langs/nl_NL/companies.lang +++ b/htdocs/langs/nl_NL/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professioneel ID 3 ProfId4=Professioneel ID 4 ProfId5=Professionele ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (Cuit / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (Revenu woestelingen) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/pl_PL/companies.lang b/htdocs/langs/pl_PL/companies.lang index 29795a956e4..b1fa2967cf0 100644 --- a/htdocs/langs/pl_PL/companies.lang +++ b/htdocs/langs/pl_PL/companies.lang @@ -104,7 +104,7 @@ ProfId3=Profesjonalne ID 3 ProfId4=Profesjonalne ID 4 ProfId5=Profesjonalny ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Id Prof 2 (bydlęta Revenu) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/pt_PT/companies.lang b/htdocs/langs/pt_PT/companies.lang index 2d0ca3f7e2f..734091edac9 100644 --- a/htdocs/langs/pt_PT/companies.lang +++ b/htdocs/langs/pt_PT/companies.lang @@ -104,7 +104,7 @@ ProfId3=ID profesional 3 ProfId4=ID profesional 4 ProfId5=Professional ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / CUIL) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Id Prof 2 (brutos Revenu) ProfId3AR=- ProfId4AR=- @@ -224,9 +224,9 @@ ProfId3RU=Prof Id 3 (KPP) ProfId4RU=Prof Id 4 (OKPO) ProfId5RU=- # ProfId6RU=- -VATIntra=IVA Intracomunitário -VATIntraShort=IVA Intracomunitário Mínimo -VATIntraVeryShort=IVA Intracomunitário Nulo +VATIntra=CNPJ +VATIntraShort=CNPJ +VATIntraVeryShort=CNPJ VATIntraSyntaxIsValid=Sintaxe Válida VATIntraValueIsValid=Valor Válido ProspectCustomer=Cliente Potencial/Cliente diff --git a/htdocs/langs/ro_RO/companies.lang b/htdocs/langs/ro_RO/companies.lang index 03cb37af0bb..70f40c8d953 100644 --- a/htdocs/langs/ro_RO/companies.lang +++ b/htdocs/langs/ro_RO/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professional ID 3 ProfId4=Professional ID 4 ProfId5=Professional ID 5 ProfId6=Profesional ID 6 -ProfId1AR=Id-ul prof. 1 (CUIT / Cuil) +ProfId1AR=Id-ul prof. 1 (CUIL) ProfId2AR=Id-ul prof. 2 (Venituri brute) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/ru_RU/companies.lang b/htdocs/langs/ru_RU/companies.lang index 7a2a1121579..ff02d5393b5 100644 --- a/htdocs/langs/ru_RU/companies.lang +++ b/htdocs/langs/ru_RU/companies.lang @@ -104,7 +104,7 @@ ProfId3=Профессиональный ID 3 ProfId4=Профессиональный ID 4 ProfId5=Профессиональный ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Проф Id 1 (CUIT / Cuil) +ProfId1AR=Проф Id 1 (CUIL) ProfId2AR=Проф Id 2 (Revenu скоты) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/sv_SE/companies.lang b/htdocs/langs/sv_SE/companies.lang index 59bdbe1afb8..f26d98531dc 100644 --- a/htdocs/langs/sv_SE/companies.lang +++ b/htdocs/langs/sv_SE/companies.lang @@ -104,7 +104,7 @@ ProfId3=Professionella ID 3 ProfId4=Professionella ID 4 ProfId5=Professionell ID 5 # ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (Revenu sällar) ProfId3AR=- ProfId4AR=- diff --git a/htdocs/langs/tr_TR/companies.lang b/htdocs/langs/tr_TR/companies.lang index ab4d21a2ab0..f35b6ae79de 100644 --- a/htdocs/langs/tr_TR/companies.lang +++ b/htdocs/langs/tr_TR/companies.lang @@ -104,7 +104,7 @@ ProfId3=Profesyonel ID 3 ProfId4=Profesyonel ID 4 ProfId5=Profesyonel ID 5 ProfId6=Professional ID 6 -ProfId1AR=Prof Id 1 (CUIT / Cuil) +ProfId1AR=Prof Id 1 (CUIL) ProfId2AR=Prof Id 2 (revenu canavarlar) ProfId3AR=- ProfId4AR=- From b0e38f7619fdea6fc73a35e03d671cdadda1b1ba Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2013 10:01:47 +0200 Subject: [PATCH 13/25] Fix: Manage strange language code reported bu chrome browsers. --- htdocs/core/class/translate.class.php | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index a4830ebe0a9..7a855eb9325 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -106,11 +106,12 @@ class Translate // Array force long code from first part, even if long code is defined $longforshort=array('ar'=>'ar_SA'); if (isset($longforshort[strtolower($langpart[0])])) $srclang=$longforshort[strtolower($langpart[0])]; - else { + else if (! is_numeric($langpart[1])) { // Second part YY may be a numeric with some Chrome browser $srclang=strtolower($langpart[0])."_".strtoupper($langpart[1]); $longforlong=array('no_nb'=>'nb_NO'); if (isset($longforlong[strtolower($srclang)])) $srclang=$longforlong[strtolower($srclang)]; } + else $srclang=strtolower($langpart[0])."_".strtoupper($langpart[0]); } else { // If it's for a codetouse that is a short code xx // Array to convert short lang code into long code. @@ -787,11 +788,11 @@ class Translate function get_translations_for_substitutions() { $substitutionarray = array(); - + foreach($this->tab_translate as $code => $label) { $substitutionarray['lang_'.$code] = $label; } - + return $substitutionarray; } } From 5ee05836b669248b97fa5c86ff21b69c2133359e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2013 10:06:30 +0200 Subject: [PATCH 14/25] Missing translation languages --- htdocs/langs/en_US/languages.lang | 1 + htdocs/langs/es_ES/languages.lang | 3 +++ htdocs/langs/fr_FR/languages.lang | 1 + 3 files changed, 5 insertions(+) diff --git a/htdocs/langs/en_US/languages.lang b/htdocs/langs/en_US/languages.lang index f44c0824c2c..eb082e1f155 100644 --- a/htdocs/langs/en_US/languages.lang +++ b/htdocs/langs/en_US/languages.lang @@ -22,6 +22,7 @@ Language_es_AR=Spanish (Argentina) Language_es_HN=Spanish (Honduras) Language_es_MX=Spanish (Mexico) Language_es_PY=Spanish (Paraguay) +Language_es_PE=Spanish (Peru) Language_es_PR=Spanish (Puerto Rico) Language_et_EE=Estonian Language_fa_IR=Persian diff --git a/htdocs/langs/es_ES/languages.lang b/htdocs/langs/es_ES/languages.lang index 1ca07e971a1..0f9d565f3a5 100644 --- a/htdocs/langs/es_ES/languages.lang +++ b/htdocs/langs/es_ES/languages.lang @@ -21,6 +21,8 @@ Language_es_ES=Español Language_es_AR=Español (Argentina) Language_es_HN=Español (Honduras) Language_es_MX=Español (México) +Language_es_PY=Español (Paraguay) +Language_es_PE=Español (Perú) Language_es_PR=Español (Puerto Rico) Language_et_EE=Estonio Language_fa_IR=Persa @@ -29,6 +31,7 @@ Language_fr_BE=Francés (Bélgica) Language_fr_CA=Francés (Canadá) Language_fr_CH=Francés (Suiza) Language_fr_FR=Francés +Language_fr_NC=Francés (Nueva Caledonia) Language_he_IL=Hebreo Language_hu_HU=Húngaro Language_is_IS=Islandés diff --git a/htdocs/langs/fr_FR/languages.lang b/htdocs/langs/fr_FR/languages.lang index e603c355b37..965f3b2f4b7 100644 --- a/htdocs/langs/fr_FR/languages.lang +++ b/htdocs/langs/fr_FR/languages.lang @@ -22,6 +22,7 @@ Language_es_AR=Espagnol (Argentine) Language_es_HN=Espagnol (Honduras) Language_es_MX=Espagnol (Mexique) Language_es_PY=Espagnol (Paraguay) +Language_es_PE=Espagnol (Peru) Language_es_PR=Espagnol (Puerto Rico) Language_et_EE=Estonien Language_fa_IR=Perse From 559b75c49bbec28d9141310c9ec4d2d9cb0944bc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 11 Oct 2013 12:14:14 +0200 Subject: [PATCH 15/25] New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID. --- ChangeLog | 3 ++- htdocs/core/class/html.formcompany.class.php | 5 +++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/ChangeLog b/ChangeLog index 22b71858b4c..bbea29ab68b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -61,7 +61,8 @@ For users: - New: Can send an email from thirdparty card. - New: Can cancel holidays that were previously validated. - Fix: [bug #1022] correct margin calculation for credit notes. -- New: Can choose contact on event (action com) creation, and filtred by thirdparty +- New: Can choose contact on event (action com) creation, and filtred by thirdparty. +- New: Add hidden option MAIN_FORCE_DEFAULT_STATE_ID. For translators: - Qual: Normalized sort order of all languages files with english reference files. diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index a6210be79c6..cc295197119 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -203,7 +203,7 @@ class FormCompany * un code donnee mais dans ce cas, le champ pays differe). * Ainsi les liens avec les departements se font sur un departement independemment de son nom. * - * @param string $selected Code state preselected + * @param string $selected Code state preselected (mus be state id) * @param string $country_codeid Country code or id: 0=list for all countries, otherwise country code or country rowid to show * @param string $htmlname Id of department * @return string String with HTML select @@ -257,7 +257,8 @@ class FormCompany } } - if ($selected > 0 && $selected == $obj->rowid) + if ((! empty($selected) && $selected == $obj->rowid) + || (empty($selected) && ! empty($conf->global->MAIN_FORCE_DEFAULT_STATE_ID) && $conf->global->MAIN_FORCE_DEFAULT_STATE_ID == $obj->rowid)) { $out.= '