diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php index 7a84470b320..51f0f4df8b9 100644 --- a/htdocs/admin/dict.php +++ b/htdocs/admin/dict.php @@ -387,13 +387,14 @@ if ($id == 11) $langs->load("bills"); $langs->load("interventions"); $elementList = array( - 'proposal' => $langs->trans('Proposal'), - 'order' => $langs->trans('Order'), - 'invoice' => $langs->trans('Bill'), + '' => '', +// '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'), +// 'intervention' => $langs->trans('InterventionCard'), +// 'contract' => $langs->trans('Contract'), 'project' => $langs->trans('Project'), 'project_task' => $langs->trans('Task'), 'agenda' => $langs->trans('Agenda'), @@ -402,10 +403,11 @@ if ($id == 11) 'propal' => $langs->trans('Proposal'), 'commande' => $langs->trans('Order'), 'facture' => $langs->trans('Bill'), - 'facture_fourn' => $langs->trans('SupplierBill'), +// 'facture_fourn' => $langs->trans('SupplierBill'), 'fichinter' => $langs->trans('InterventionCard') ); if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty'); + asort($elementList); $sourceList = array( 'internal' => $langs->trans('Internal'), 'external' => $langs->trans('External') @@ -709,6 +711,7 @@ if ($action == 'delete') { print $form->formconfirm($_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.$rowid.'&code='.$_GET["code"].'&id='.$id, $langs->trans('DeleteLine'), $langs->trans('ConfirmDeleteLine'), 'confirm_delete','',0,1); } +//var_dump($elementList); /* * Show a dictionary diff --git a/htdocs/core/class/html.formcompany.class.php b/htdocs/core/class/html.formcompany.class.php index ef58b6c7322..d32c0def5ab 100644 --- a/htdocs/core/class/html.formcompany.class.php +++ b/htdocs/core/class/html.formcompany.class.php @@ -682,22 +682,21 @@ class FormCompany * @param string $selected Default selected value * @param string $htmlname HTML select name * @param string $source Source ('internal' or 'external') - * @param string $order Sort criteria + * @param string $sortorder Sort criteria * @param int $showempty 1=Add en empty line * @return void */ - function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $order='code', $showempty=0) + function selectTypeContact($object, $selected, $htmlname = 'type', $source='internal', $sortorder='code', $showempty=0) { if (is_object($object) && method_exists($object, 'liste_type_contact')) { - $lesTypes = $object->liste_type_contact($source, $order, 0, 1); + $lesTypes = $object->liste_type_contact($source, $sortorder, 0, 1); print '\n"; diff --git a/htdocs/core/lib/company.lib.php b/htdocs/core/lib/company.lib.php index 1ff61f96c83..e5723b9e2d6 100644 --- a/htdocs/core/lib/company.lib.php +++ b/htdocs/core/lib/company.lib.php @@ -67,7 +67,7 @@ function societe_prepare_head($object) if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) { $head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id; - $head[$h][1] = $langs->trans("Contact"); + $head[$h][1] = $langs->trans("ContactsAddresses"); $head[$h][2] = 'contact'; $h++; } diff --git a/htdocs/societe/societecontact.php b/htdocs/societe/societecontact.php index 9e82e1a052f..7a2274e81b5 100644 --- a/htdocs/societe/societecontact.php +++ b/htdocs/societe/societecontact.php @@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php'; $langs->load("orders"); $langs->load("companies"); -$id=GETPOST('id','int'); +$id=GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int'); $ref=GETPOST('ref','alpha'); $action=GETPOST('action','alpha'); @@ -44,8 +44,9 @@ $result = restrictedArea($user, 'societe', $id,''); $object = new Societe($db); + /* - * Ajout d'un nouveau contact + * Actions */ if ($action == 'addcontact' && $user->rights->societe->creer) @@ -133,12 +134,9 @@ $userstatic=new User($db); /* Mode vue et edition */ /* */ /* *************************************************************************** */ -dol_htmloutput_mesg($mesg); if ($id > 0 || ! empty($ref)) { - $langs->trans("OrderCard"); - if ($object->fetch($id, $ref) > 0) { $soc = new Societe($db); @@ -154,12 +152,12 @@ if ($id > 0 || ! empty($ref)) print '
| "; print $memberstatic->getNomUrl(1); print " | \n"; - + // Lastname print "rowid\">"; print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : ''); print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : ''); print (! empty($companyname) ? dol_trunc($companyname, 32) : ''); print " | \n"; - + // Login print "".$objp->login." | \n"; - + // Type $membertypestatic->id=$objp->type_id; $membertypestatic->libelle=$objp->type; print ''; print $membertypestatic->getNomUrl(1,32); print ' | '; - + // Moral/Physique print "".$memberstatic->getmorphylib($objp->morphy)." | \n"; - + // EMail print "".dol_print_email($objp->email,0,0,1)." | \n"; - + // Statut print ''; print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2); print " | "; - + // End of subscription date if ($datefin) { @@ -303,7 +301,7 @@ if ($id > 0 || ! empty($ref)) } print ''; } - + print "