diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index d92ace207b0..f3ab92d170c 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -123,7 +123,7 @@ $tabsql[7] = "SELECT a.id as rowid, a.code as code, a.libelle AS libelle, a.d $tabsql[8] = "SELECT id as rowid, code, libelle, active FROM ".MAIN_DB_PREFIX."c_typent"; //$tabsql[9] = "SELECT code, code_iso, label as libelle, symbole, active FROM ".MAIN_DB_PREFIX."c_currencies"; $tabsql[9] = "SELECT code, code_iso, label as libelle, active FROM ".MAIN_DB_PREFIX."c_currencies"; -$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; +$tabsql[10]= "SELECT t.rowid, t.taux, t.localtax1, t.localtax2, p.libelle as pays, p.code as pays_code, t.fk_pays as pays_id, t.recuperableonly, t.note, t.active,t.accountancy_code FROM ".MAIN_DB_PREFIX."c_tva as t, llx_c_pays as p WHERE t.fk_pays=p.rowid"; $tabsql[11]= "SELECT t.rowid as rowid, element, source, code, libelle, active FROM ".MAIN_DB_PREFIX."c_type_contact AS t"; $tabsql[12]= "SELECT c.rowid as rowid, code, sortorder, c.libelle, c.libelle_facture, nbjour, fdm, decalage, active FROM ".MAIN_DB_PREFIX.'c_payment_term AS c'; $tabsql[13]= "SELECT id as rowid, code, c.libelle, type, active FROM ".MAIN_DB_PREFIX."c_paiement AS c"; @@ -172,7 +172,7 @@ $tabfield[7] = "code,libelle,pays_id,pays,deductible"; $tabfield[8] = "code,libelle"; //$tabfield[9] = "code,code_iso,libelle,symbole"; $tabfield[9] = "code,code_iso,libelle"; -$tabfield[10]= "pays_id,pays,taux,recuperableonly,localtax1,localtax2,note"; +$tabfield[10]= "pays_id,pays,taux,recuperableonly,localtax1,localtax2,note,accountancy_code"; $tabfield[11]= "element,source,code,libelle"; $tabfield[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; $tabfield[13]= "code,libelle,type"; @@ -197,7 +197,7 @@ $tabfieldvalue[7] = "code,libelle,pays,deductible"; $tabfieldvalue[8] = "code,libelle"; //$tabfieldvalue[9] = "code,code_iso,libelle,symbole"; $tabfieldvalue[9] = "code,code_iso,libelle"; -$tabfieldvalue[10]= "pays,taux,recuperableonly,localtax1,localtax2,note"; +$tabfieldvalue[10]= "pays,taux,recuperableonly,localtax1,localtax2,note,accountancy_code"; $tabfieldvalue[11]= "element,source,code,libelle"; $tabfieldvalue[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; $tabfieldvalue[13]= "code,libelle,type"; @@ -222,7 +222,7 @@ $tabfieldinsert[7] = "code,libelle,fk_pays,deductible"; $tabfieldinsert[8] = "code,libelle"; //$tabfieldinsert[9] = "code,code_iso,label,symbole"; $tabfieldinsert[9] = "code,code_iso,label"; -$tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1,localtax2,note"; +$tabfieldinsert[10]= "fk_pays,taux,recuperableonly,localtax1,localtax2,note,accountancy_code"; $tabfieldinsert[11]= "element,source,code,libelle"; $tabfieldinsert[12]= "code,libelle,libelle_facture,nbjour,fdm,decalage"; $tabfieldinsert[13]= "code,libelle,type"; @@ -337,7 +337,8 @@ if ($_POST["actionadd"] || $_POST["actionmodify"]) } if ((! isset($_POST[$value]) || $_POST[$value]=='') && $listfield[$f] != 'decalage' // Fields that are not mandatory - && $listfield[$f] != 'module') // Fields that are not mandatory + && $listfield[$f] != 'module' // Fields that are not mandatory + && $listfield[$f] != 'accountancy_code') // Fields that are not mandatory { $ok=0; $fieldnamekey=$listfield[$f]; @@ -638,7 +639,7 @@ if ($_GET["id"]) if ($fieldlist[$field]=='height') { $valuetoshow=$langs->trans("Height"); } if ($fieldlist[$field]=='unit') { $valuetoshow=$langs->trans("MeasuringUnit"); } if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='pays_id') { $valuetoshow=''; } - + if ($fieldlist[$field]=='accountancy_code'){ $valuetoshow=$langs->trans("AccountancyCode"); } if ($valuetoshow != '') { print '