';
+ }
}
}
diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php
index fac9bdfd764..c1b75793220 100644
--- a/htdocs/core/class/commonobject.class.php
+++ b/htdocs/core/class/commonobject.class.php
@@ -2271,6 +2271,35 @@ abstract class CommonObject
}
$out .= "\n";
$out .= ' ';
+ $out .= '
+ ';
}
return $out;
}
diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php
index dcff2aedf14..640075a06b1 100644
--- a/htdocs/core/class/extrafields.class.php
+++ b/htdocs/core/class/extrafields.class.php
@@ -673,8 +673,10 @@ class ExtraFields
$out='';
@@ -688,11 +690,16 @@ class ExtraFields
// 0 1 : tableName
// 1 2 : label field name Nom du champ contenant le libelle
// 2 3 : key fields name (if differ of rowid)
+ // 3 4 : key field parent (for dependent lists)
$keyList='rowid';
- if (count($InfoFieldList)==3)
+ if (count($InfoFieldList)>=3)
$keyList=$InfoFieldList[2].' as rowid';
+ if (count($InfoFieldList)>=4) {
+ list($parentName, $parentField) = explode('|', $InfoFieldList[3]);
+ $keyList.= ', '.$parentField;
+ }
$sql = 'SELECT '.$keyList.', '.$InfoFieldList[1];
$sql.= ' FROM '.MAIN_DB_PREFIX .$InfoFieldList[0];
@@ -717,15 +724,16 @@ class ExtraFields
}else {
$labeltoshow=dol_trunc($obj->$InfoFieldList[1],18);
}
+
+ if(!empty($InfoFieldList[3])) {
+ $parent = $parentName.':'.$obj->{$parentField};
+ }
- if ($value==$obj->rowid)
- {
- $out.='';
- }
- else
- {
- $out.='';
- }
+ $out.='';
+
$i++;
}
}
diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index c913a06be06..cf645055ab2 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -2326,7 +2326,7 @@ class Form
$sql = "SELECT rowid, label, bank";
$sql.= " FROM ".MAIN_DB_PREFIX."bank_account";
$sql.= " WHERE clos = '".$statut."'";
- $sql.= " AND entity = ".$conf->entity;
+ $sql.= " AND entity IN (".getEntity('bank_account', 1).")";
if ($filtre) $sql.=" AND ".$filtre;
$sql.= " ORDER BY label";
diff --git a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql
index 62811bdb70c..76137d75b7f 100755
--- a/htdocs/install/mysql/migration/3.4.0-3.5.0.sql
+++ b/htdocs/install/mysql/migration/3.4.0-3.5.0.sql
@@ -275,3 +275,6 @@ INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, nc
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN22', 1001, '', 0, '', 'Tozeur', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN23', 1001, '', 0, '', 'Tunis', 1);
INSERT INTO llx_c_departements ( code_departement, fk_region, cheflieu, tncc, ncc, nom, active) VALUES('TN24', 1001, '', 0, '', 'Zaghouan', 1);
+
+# Add ref_ext on bordereau_cheque
+ALTER TABLE `llx_bordereau_cheque` ADD `ref_ext` VARCHAR( 255 ) NOT NULL;
diff --git a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql
index cc93cf188d6..60365665932 100644
--- a/htdocs/install/mysql/tables/llx_bordereau_cheque.sql
+++ b/htdocs/install/mysql/tables/llx_bordereau_cheque.sql
@@ -33,6 +33,7 @@ create table llx_bordereau_cheque
fk_bank_account integer,
fk_user_author integer,
note text,
- statut smallint NOT NULL DEFAULT 0
+ statut smallint NOT NULL DEFAULT 0,
+ ref_ext varchar(255)
)ENGINE=innodb;
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 34f04575546..36751e0679a 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -364,10 +364,10 @@ ExtrafieldSelectList = Select from table
ExtrafieldSeparator=Separator
ExtrafieldCheckBox=Checkbox
ExtrafieldRadio=Radio button
-ExtrafieldParamHelpselect=Parameters list have to be like key,value
for exemple : 1,value1 2,value2 3,value3 ...
+ExtrafieldParamHelpselect=Parameters list have to be like key,value
for exemple : 1,value1 2,value2 3,value3 ...
In order to have the list depending on another : 1,value1|parent_list_code:parent_key 2,value2|parent_list_code:parent_key
ExtrafieldParamHelpcheckbox=Parameters list have to be like key,value
for exemple : 1,value1 2,value2 3,value3 ...
ExtrafieldParamHelpradio=Parameters list have to be like key,value
for exemple : 1,value1 2,value2 3,value3 ...
-ExtrafieldParamHelpsellist=Parameters list have come from table
for exemple : c_typent:libelle:id
+ExtrafieldParamHelpsellist=Parameters list have come from table
for exemple : c_typent:libelle:id
In order to have the list depending on another : c_typent:libelle:id:parent_list_code|parent_column
LibraryToBuildPDF=Library used to build PDF
WarningUsingFPDF=Warning: Your conf.php contains directive dolibarr_pdf_force_fpdf=1. This means you use the FPDF library to generate PDF files. This library is old and does not support a lot of features (Unicode, image transparency, cyrillic, arab and asiatic languages, ...), so you may experience errors during PDF generation. To solve this and have a full support of PDF generation, please download TCPDF library, then comment or remove the line $dolibarr_pdf_force_fpdf=1, and add instead $dolibarr_lib_TCPDF_PATH='path_to_TCPDF_dir'
LocalTaxDesc=Some countries apply 2 or 3 taxes on each invoice line. If this is the case, choose type for second and third tax and its rate. Possible type are: 1 : local tax apply on products and services without vat (vat is not applied on local tax) 2 : local tax apply on products and services before vat (vat is calculated on amount + localtax) 3 : local tax apply on products without vat (vat is not applied on local tax) 4 : local tax apply on products before vat (vat is calculated on amount + localtax) 5 : local tax apply on services without vat (vat is not applied on local tax) 6 : local tax apply on services before vat (vat is calculated on amount + localtax)
diff --git a/htdocs/langs/en_US/compta.lang b/htdocs/langs/en_US/compta.lang
index cf95e809e4f..c2a27fe8b7d 100644
--- a/htdocs/langs/en_US/compta.lang
+++ b/htdocs/langs/en_US/compta.lang
@@ -154,3 +154,4 @@ InvoiceLinesToDispatch=Invoice lines to dispatch
InvoiceDispatched=Dispatched invoices
AccountancyDashboard=Accountancy summary
ByProductsAndServices=By products and services
+RefExt=External ref
\ No newline at end of file
diff --git a/htdocs/langs/fr_FR/admin.lang b/htdocs/langs/fr_FR/admin.lang
index 1f4be3a3722..69a4fbba426 100644
--- a/htdocs/langs/fr_FR/admin.lang
+++ b/htdocs/langs/fr_FR/admin.lang
@@ -365,10 +365,10 @@ ExtrafieldSelectList = Liste issue d'une table
ExtrafieldSeparator=Séparateur de champ
ExtrafieldCheckBox=Case à cocher
ExtrafieldRadio=Bouton radio
-ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur
par exemple : 1,valeur1 2,valeur2 3,valeur3 …
-ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur
par exemple : 1,valeur1 2,valeur2 3,valeur3 …
-ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur
par exemple : 1,valeur1 2,valeur2 3,valeur3 …
-ExtrafieldParamHelpsellist=La liste vient d'une table
par exemple : c_typent:libelle:id
+ExtrafieldParamHelpselect=La liste doit être de la forme clef,valeur
par exemple : 1,valeur1 2,valeur2 3,valeur3 ...
Pour que la liste soit dépendante d'une autre : 1,valeur1|code_liste_parent:clef_parent 2,valeur2|code_liste_parent:clef_parent
+ExtrafieldParamHelpcheckbox=La liste doit être de la forme clef,valeur
par exemple : 1,valeur1 2,valeur2 3,valeur3 ...
+ExtrafieldParamHelpradio=La liste doit être de la forme clef,valeur
par exemple : 1,valeur1 2,valeur2 3,valeur3 ...
+ExtrafieldParamHelpsellist=La liste vient d'une table
par exemple : c_typent:libelle:id
Pour que la liste soit dépendante d'une autre : c_typent:libelle:id:code_liste_parent|colonne_parent
LibraryToBuildPDF=Bibliothèque utilisée pour la génération des PDF
WarningUsingFPDF=Attention : votre fichier conf.php contient la directive dolibarr_pdf_force_fpdf=1. Cela signifie que vous utilisez la librairie FPDF pour générer vos fichiers PDF. Cette librairie est ancienne et ne couvre pas de nombreuses fonctionnalités (Unicode, transparence des images, langues cyrilliques, arabes ou asiatiques...), aussi vous pouvez rencontrer des problèmes durant la génération des PDF. Pour résoudre cela et avoir une prise en charge complète de PDF, vous pouvez télécharger la bibliothèque TCPDF puis commenter ou supprimer la ligne $dolibarr_pdf_force_fpdf=1, et ajouter à la place $dolibarr_lib_TCPDF_PATH='chemin_vers_TCPDF'
LocalTaxDesc=Certains pays appliquent 2 voire 3 taux sur chaque ligne de facture. Si c'est le cas, choisissez le type du deuxième et troisième taux et sa valeur. Les types possibles sont: 1 : taxe locale sur les produits et services hors tva (la tva n'est pas appliquée sur la taxe locale) 2 : taxe locale sur les produits et services avant tva (la tva est appliquée sur le montant + la taxe locale) 3 : taxe locale uniquement sur les produits hors tva (la tva n'est pas appliquée sur la taxe locale) 4 : taxe locale uniquement sur les produits avant tva (la tva est appliquée sur le montant + la taxe locale) 5 : taxe locale uniquement sur les services hors tva (la tva n'est pas appliquée sur la taxe locale) 6 : taxe locale uniquement sur les service avant tva (la tva est appliquée sur le montant + la taxe locale)
diff --git a/htdocs/langs/fr_FR/compta.lang b/htdocs/langs/fr_FR/compta.lang
index a86676b36b9..0b9cf8b7dda 100644
--- a/htdocs/langs/fr_FR/compta.lang
+++ b/htdocs/langs/fr_FR/compta.lang
@@ -165,3 +165,4 @@ InvoiceLinesToDispatch=Lignes de factures à ventiler
InvoiceDispatched=Factures ventilées
AccountancyDashboard=Synthèse compta/tréso
ByProductsAndServices=Par produits et services
+RefExt=Référence externe