Fix: Solve some regressions
This commit is contained in:
parent
dbbf31d87b
commit
58b15fa736
@ -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
|
||||
|
||||
@ -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 '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||
if ($showempty) print '<option value="0"></option>';
|
||||
foreach($lesTypes as $key=>$value)
|
||||
{
|
||||
print '<option value="'.$key.'"';
|
||||
if ($key == $selected)
|
||||
print ' selected';
|
||||
if ($key == $selected) print ' selected';
|
||||
print '>'.$value.'</option>';
|
||||
}
|
||||
print "</select>\n";
|
||||
|
||||
@ -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++;
|
||||
}
|
||||
|
||||
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user