diff --git a/htdocs/accountancy/admin/accountmodel.php b/htdocs/accountancy/admin/accountmodel.php
index 5c17f07183e..66f2e156b4c 100644
--- a/htdocs/accountancy/admin/accountmodel.php
+++ b/htdocs/accountancy/admin/accountmodel.php
@@ -87,9 +87,6 @@ $hookmanager->initHooks(array('admin'));
// This page is a generic page to edit dictionaries
// Put here declaration of dictionaries properties
-// Sort order to show dictionary (0 is space). All other dictionaries (added by modules) will be at end of this.
-$taborder=array(9,0,4,3,2,0,1,8,19,16,27,0,5,11,0,33,34,0,6,0,29,0,7,17,24,28,0,10,23,12,13,0,14,0,22,20,18,21,0,15,30,0,25,0,26,0,31,32,0);
-
// Name of SQL tables of dictionaries
$tabname=array();
@@ -148,75 +145,10 @@ $tabfieldcheck=array();
$tabfieldcheck[31] = array();
$tabfieldcheck[32] = array();
-// Complete all arrays with entries found into modules
-complete_dictionary_with_modules($taborder,$tabname,$tablib,$tabsql,$tabsqlsort,$tabfield,$tabfieldvalue,$tabfieldinsert,$tabrowid,$tabcond,$tabhelp,$tabfieldcheck);
-
// Define elementList and sourceList (used for dictionary type of contacts "llx_c_type_contact")
$elementList = array();
$sourceList=array();
-if ($id == 11)
-{
- $langs->load("orders");
- $langs->load("contracts");
- $langs->load("projects");
- $langs->load("propal");
- $langs->load("bills");
- $langs->load("interventions");
- $elementList = array(
- '' => '',
- 'societe' => $langs->trans('ThirdParty'),
-// 'proposal' => $langs->trans('Proposal'),
-// 'order' => $langs->trans('Order'),
-// 'invoice' => $langs->trans('Bill'),
- 'invoice_supplier' => $langs->trans('SupplierBill'),
- 'order_supplier' => $langs->trans('SupplierOrder'),
-// 'intervention' => $langs->trans('InterventionCard'),
-// 'contract' => $langs->trans('Contract'),
- 'project' => $langs->trans('Project'),
- 'project_task' => $langs->trans('Task'),
- 'agenda' => $langs->trans('Agenda'),
- // old deprecated
- 'contrat' => $langs->trans('Contract'),
- 'propal' => $langs->trans('Proposal'),
- 'commande' => $langs->trans('Order'),
- 'facture' => $langs->trans('Bill'),
- 'resource' => $langs->trans('Resource'),
-// 'facture_fourn' => $langs->trans('SupplierBill'),
- 'fichinter' => $langs->trans('InterventionCard')
- );
- if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty');
-
- complete_elementList_with_modules($elementList);
-
- asort($elementList);
- $sourceList = array(
- 'internal' => $langs->trans('Internal'),
- 'external' => $langs->trans('External')
- );
-}
-if ($id == 25)
-{
- // We save list of template email Dolibarr can manage. This list can found by a grep into code on "->param['models']"
- $elementList = array();
- if ($conf->propal->enabled) $elementList['propal_send']=$langs->trans('MailToSendProposal');
- if ($conf->commande->enabled) $elementList['order_send']=$langs->trans('MailToSendOrder');
- if ($conf->facture->enabled) $elementList['facture_send']=$langs->trans('MailToSendInvoice');
- if ($conf->expedition->enabled) $elementList['shipping_send']=$langs->trans('MailToSendShipment');
- if ($conf->ficheinter->enabled) $elementList['fichinter_send']=$langs->trans('MailToSendIntervention');
- if ($conf->supplier_proposal->enabled) $elementList['supplier_proposal_send']=$langs->trans('MailToSendSupplierRequestForQuotation');
- if ($conf->fournisseur->enabled) $elementList['order_supplier_send']=$langs->trans('MailToSendSupplierOrder');
- if ($conf->fournisseur->enabled) $elementList['invoice_supplier_send']=$langs->trans('MailToSendSupplierInvoice');
- if ($conf->societe->enabled) $elementList['thirdparty']=$langs->trans('MailToThirdparty');
-
- $parameters=array('elementList'=>$elementList);
- $reshook=$hookmanager->executeHooks('emailElementlist',$parameters); // Note that $action and $object may have been modified by some hooks
- if ($reshook == 0) {
- foreach ($hookmanager->resArray as $item => $value) {
- $elementList[$item] = $value;
- }
- }
-}
@@ -690,7 +622,6 @@ if ($id)
if ($fieldlist[$field]=='libelle' || $fieldlist[$field]=='label') $alabelisused=1;
}
- if ($id == 4) print '
';
print '
';
print '';
print '
';
@@ -731,7 +662,6 @@ if ($id)
}
}
- if ($id == 4) print '
';
print '
';
if ($tabname[$id] != MAIN_DB_PREFIX.'c_email_templates' || $action != 'edit')
{
@@ -741,9 +671,8 @@ if ($id)
print "";
$colspan=count($fieldlist)+3;
- if ($id == 4) $colspan++;
- if (! empty($alabelisused) && $id != 25) // If there is one label among fields, we show legend of *
+ if (! empty($alabelisused)) // If there is one label among fields, we show legend of *
{
print '
* '.$langs->trans("LabelUsedByDefault").'.
';
}
@@ -775,9 +704,38 @@ if ($id)
print '';
}
- // Title of lines
+ // Title line with search boxes
print '
';
foreach ($fieldlist as $field => $value)
+ {
+ $showfield=1; // By defaut
+
+ if ($fieldlist[$field]=='region_id' || $fieldlist[$field]=='country_id') { $showfield=0; }
+
+ if ($showfield)
+ {
+ if ($value == 'country')
+ {
+ print '
';
if ($canbedisabled) print ''.$actl[$obj->active].'';
@@ -1135,65 +1050,6 @@ if ($id)
print '';
}
-else
-{
- /*
- * Show list of dictionary to show
- */
-
- $lastlineisempty=false;
- print '
';
- print '
';
- //print '
'.$langs->trans("Module").'
';
- print '
'.$langs->trans("Dictionary").'
';
- print '
'.$langs->trans("Table").'
';
- print '
';
-
- $showemptyline='';
- foreach ($taborder as $i)
- {
- if (isset($tabname[$i]) && empty($tabcond[$i])) continue;
-
- if ($i)
- {
- if ($showemptyline)
- {
- print '
';
foreach ($fieldlist as $field => $value)
{
// Determine le nom du champ par rapport aux noms possibles
@@ -562,23 +580,6 @@ if ($id)
print getTitleFieldOfList('');
print '