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 ''; + print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); + print ''; + } + else + { + print ''; + } + } + } + print ''; + print ''; + $searchpicto=$form->showFilterAndCheckAddButtons(0); + print $searchpicto; + print ''; + print ''; + + // Title of lines + print ''; + foreach ($fieldlist as $field => $value) { // Determine le nom du champ par rapport aux noms possibles // dans les dictionnaires de donnees @@ -845,44 +803,11 @@ if ($id) print getTitleFieldOfList($valuetoshow, 0, $_SERVER["PHP_SELF"], ($sortable?$fieldlist[$field]:''), ($page?'page='.$page.'&':''), $param, "align=".$align, $sortfield, $sortorder); } } - // Favorite - Only activated on country dictionary - if ($id == 4) print getTitleFieldOfList($langs->trans("Favorite"), 0, $_SERVER["PHP_SELF"], "favorite", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder); - print getTitleFieldOfList($langs->trans("Status"), 0, $_SERVER["PHP_SELF"], "active", ($page?'page='.$page.'&':''), $param, 'align="center"', $sortfield, $sortorder); print getTitleFieldOfList(''); print getTitleFieldOfList(''); print ''; - // 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 ''; - print $form->select_country($search_country_id, 'search_country_id', '', 28, 'maxwidth200 maxwidthonsmartphone'); - print ''; - } - else - { - print ''; - } - } - } - if ($id == 4) print ''; - print ''; - print ''; - $searchpicto=$form->showFilterAndCheckAddButtons(0); - print $searchpicto; - print ''; - print ''; - if ($num) { // Lines with values @@ -1090,16 +1015,6 @@ if ($id) if ($param) $url .= '&'.$param; $url.='&'; - // Favorite - // Only activated on country dictionary - if ($id == 4) - { - print ''; - if ($iserasable) print ''.$actl[$obj->favorite].''; - else print $langs->trans("AlwaysActive"); - print ''; - } - // Active 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 ''; - print ''; - print ''; - print ''; - - $showemptyline=''; - foreach ($taborder as $i) - { - if (isset($tabname[$i]) && empty($tabcond[$i])) continue; - - if ($i) - { - if ($showemptyline) - { - print ''; - $showemptyline=0; - } - - - $value=$tabname[$i]; - print ''; - print ''; - print ''; - $lastlineisempty=false; - } - else - { - if (! $lastlineisempty) - { - $showemptyline=1; - $lastlineisempty=true; - } - } - } - print '
'.$langs->trans("Module").''.$langs->trans("Dictionary").''.$langs->trans("Table").'
   
'; - if (! empty($tabcond[$i])) - { - print ''.$langs->trans($tablib[$i]).''; - } - else - { - print $langs->trans($tablib[$i]); - } - print ''; - /*if (empty($tabcond[$i])) - { - print info_admin($langs->trans("DictionaryDisabledSinceNoModuleNeedIt"),1); - }*/ - print ''.$tabname[$i].'
'; -} print '
'; diff --git a/htdocs/accountancy/admin/journals_list.php b/htdocs/accountancy/admin/journals_list.php index 2271fa73c0b..9bbd37449be 100644 --- a/htdocs/accountancy/admin/journals_list.php +++ b/htdocs/accountancy/admin/journals_list.php @@ -354,6 +354,7 @@ if ($action == $acts[1]) } } + /* * View */ @@ -527,8 +528,25 @@ if ($id) print ''; } + // Title line with search boxes + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + if ($filterfound) + { + $searchpicto=$form->showFilterAndCheckAddButtons(0); + print $searchpicto; + } + print ''; + print ''; + // Title of lines - print ''; + 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 ''; - // Title line with search boxes - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - print ''; - if ($filterfound) - { - $searchpicto=$form->showFilterAndCheckAddButtons(0); - print $searchpicto; - } - print ''; - print ''; - if ($num) { // Lines with values diff --git a/htdocs/compta/sociales/card.php b/htdocs/compta/sociales/card.php index a8f795115c4..7dff138f849 100644 --- a/htdocs/compta/sociales/card.php +++ b/htdocs/compta/sociales/card.php @@ -308,7 +308,7 @@ if ($action == 'create') print ''; print $langs->trans("Label"); print ''; - print ''; + print ''; print ''; print ''; @@ -317,7 +317,7 @@ if ($action == 'create') print $langs->trans("Type"); print ''; print ''; - $formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode")?GETPOST("actioncode"):'','actioncode',1); + $formsocialcontrib->select_type_socialcontrib(GETPOST("actioncode",'alpha')?GETPOST("actioncode",'alpha'):'','actioncode',1); print ''; print ''; @@ -336,7 +336,7 @@ if ($action == 'create') print ''; print $langs->trans("Amount"); print ''; - print ''; + print ''; print ''; // Project