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("bills");
|
||||||
$langs->load("interventions");
|
$langs->load("interventions");
|
||||||
$elementList = array(
|
$elementList = array(
|
||||||
'proposal' => $langs->trans('Proposal'),
|
'' => '',
|
||||||
'order' => $langs->trans('Order'),
|
// 'proposal' => $langs->trans('Proposal'),
|
||||||
'invoice' => $langs->trans('Bill'),
|
// 'order' => $langs->trans('Order'),
|
||||||
|
// 'invoice' => $langs->trans('Bill'),
|
||||||
'invoice_supplier' => $langs->trans('SupplierBill'),
|
'invoice_supplier' => $langs->trans('SupplierBill'),
|
||||||
'order_supplier' => $langs->trans('SupplierOrder'),
|
'order_supplier' => $langs->trans('SupplierOrder'),
|
||||||
'intervention' => $langs->trans('InterventionCard'),
|
// 'intervention' => $langs->trans('InterventionCard'),
|
||||||
'contract' => $langs->trans('Contract'),
|
// 'contract' => $langs->trans('Contract'),
|
||||||
'project' => $langs->trans('Project'),
|
'project' => $langs->trans('Project'),
|
||||||
'project_task' => $langs->trans('Task'),
|
'project_task' => $langs->trans('Task'),
|
||||||
'agenda' => $langs->trans('Agenda'),
|
'agenda' => $langs->trans('Agenda'),
|
||||||
@ -402,10 +403,11 @@ if ($id == 11)
|
|||||||
'propal' => $langs->trans('Proposal'),
|
'propal' => $langs->trans('Proposal'),
|
||||||
'commande' => $langs->trans('Order'),
|
'commande' => $langs->trans('Order'),
|
||||||
'facture' => $langs->trans('Bill'),
|
'facture' => $langs->trans('Bill'),
|
||||||
'facture_fourn' => $langs->trans('SupplierBill'),
|
// 'facture_fourn' => $langs->trans('SupplierBill'),
|
||||||
'fichinter' => $langs->trans('InterventionCard')
|
'fichinter' => $langs->trans('InterventionCard')
|
||||||
);
|
);
|
||||||
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty');
|
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES)) $elementList["societe"] = $langs->trans('ThirdParty');
|
||||||
|
asort($elementList);
|
||||||
$sourceList = array(
|
$sourceList = array(
|
||||||
'internal' => $langs->trans('Internal'),
|
'internal' => $langs->trans('Internal'),
|
||||||
'external' => $langs->trans('External')
|
'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);
|
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
|
* Show a dictionary
|
||||||
|
|||||||
@ -682,22 +682,21 @@ class FormCompany
|
|||||||
* @param string $selected Default selected value
|
* @param string $selected Default selected value
|
||||||
* @param string $htmlname HTML select name
|
* @param string $htmlname HTML select name
|
||||||
* @param string $source Source ('internal' or 'external')
|
* @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
|
* @param int $showempty 1=Add en empty line
|
||||||
* @return void
|
* @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'))
|
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.'">';
|
print '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
|
||||||
if ($showempty) print '<option value="0"></option>';
|
if ($showempty) print '<option value="0"></option>';
|
||||||
foreach($lesTypes as $key=>$value)
|
foreach($lesTypes as $key=>$value)
|
||||||
{
|
{
|
||||||
print '<option value="'.$key.'"';
|
print '<option value="'.$key.'"';
|
||||||
if ($key == $selected)
|
if ($key == $selected) print ' selected';
|
||||||
print ' selected';
|
|
||||||
print '>'.$value.'</option>';
|
print '>'.$value.'</option>';
|
||||||
}
|
}
|
||||||
print "</select>\n";
|
print "</select>\n";
|
||||||
|
|||||||
@ -67,7 +67,7 @@ function societe_prepare_head($object)
|
|||||||
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES))
|
if (! empty($conf->global->MAIN_SUPPORT_SHARED_CONTACT_BETWEEN_THIRDPARTIES))
|
||||||
{
|
{
|
||||||
$head[$h][0] = DOL_URL_ROOT.'/societe/societecontact.php?socid='.$object->id;
|
$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';
|
$head[$h][2] = 'contact';
|
||||||
$h++;
|
$h++;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -34,7 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
|||||||
$langs->load("orders");
|
$langs->load("orders");
|
||||||
$langs->load("companies");
|
$langs->load("companies");
|
||||||
|
|
||||||
$id=GETPOST('id','int');
|
$id=GETPOST('id','int')?GETPOST('id','int'):GETPOST('socid','int');
|
||||||
$ref=GETPOST('ref','alpha');
|
$ref=GETPOST('ref','alpha');
|
||||||
$action=GETPOST('action','alpha');
|
$action=GETPOST('action','alpha');
|
||||||
|
|
||||||
@ -44,8 +44,9 @@ $result = restrictedArea($user, 'societe', $id,'');
|
|||||||
|
|
||||||
$object = new Societe($db);
|
$object = new Societe($db);
|
||||||
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Ajout d'un nouveau contact
|
* Actions
|
||||||
*/
|
*/
|
||||||
|
|
||||||
if ($action == 'addcontact' && $user->rights->societe->creer)
|
if ($action == 'addcontact' && $user->rights->societe->creer)
|
||||||
@ -133,12 +134,9 @@ $userstatic=new User($db);
|
|||||||
/* Mode vue et edition */
|
/* Mode vue et edition */
|
||||||
/* */
|
/* */
|
||||||
/* *************************************************************************** */
|
/* *************************************************************************** */
|
||||||
dol_htmloutput_mesg($mesg);
|
|
||||||
|
|
||||||
if ($id > 0 || ! empty($ref))
|
if ($id > 0 || ! empty($ref))
|
||||||
{
|
{
|
||||||
$langs->trans("OrderCard");
|
|
||||||
|
|
||||||
if ($object->fetch($id, $ref) > 0)
|
if ($object->fetch($id, $ref) > 0)
|
||||||
{
|
{
|
||||||
$soc = new Societe($db);
|
$soc = new Societe($db);
|
||||||
@ -154,12 +152,12 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print '<td colspan="3">';
|
print '<td colspan="3">';
|
||||||
print $form->showrefnav($object,'id','',($user->societe_id?0:1),'rowid','nom');
|
print $form->showrefnav($object,'id','',($user->societe_id?0:1),'rowid','nom');
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
|
|
||||||
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
if (! empty($conf->global->SOCIETE_USEPREFIX)) // Old not used prefix field
|
||||||
{
|
{
|
||||||
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
print '<tr><td>'.$langs->trans('Prefix').'</td><td colspan="3">'.$object->prefix_comm.'</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->client)
|
if ($object->client)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
@ -168,7 +166,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
if ($object->check_codeclient() <> 0) print ' <font class="error">('.$langs->trans("WrongCustomerCode").')</font>';
|
||||||
print '</td></tr>';
|
print '</td></tr>';
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($object->fournisseur)
|
if ($object->fournisseur)
|
||||||
{
|
{
|
||||||
print '<tr><td>';
|
print '<tr><td>';
|
||||||
@ -216,7 +214,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
{
|
{
|
||||||
$titre=$langs->trans("MembersListOfTiers");
|
$titre=$langs->trans("MembersListOfTiers");
|
||||||
print '<br>';
|
print '<br>';
|
||||||
|
|
||||||
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'');
|
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'');
|
||||||
|
|
||||||
print "<table class=\"noborder\" width=\"100%\">";
|
print "<table class=\"noborder\" width=\"100%\">";
|
||||||
@ -230,13 +228,13 @@ if ($id > 0 || ! empty($ref))
|
|||||||
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"d.statut,d.datefin",$param,"","",$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"d.statut,d.datefin",$param,"","",$sortfield,$sortorder);
|
||||||
print_liste_field_titre($langs->trans("EndSubscription"),$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
|
print_liste_field_titre($langs->trans("EndSubscription"),$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
|
|
||||||
$var=True;
|
$var=True;
|
||||||
$i=0;
|
$i=0;
|
||||||
while ($i < $num && $i < $conf->liste_limit)
|
while ($i < $num && $i < $conf->liste_limit)
|
||||||
{
|
{
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
$datefin=$db->jdate($objp->datefin);
|
$datefin=$db->jdate($objp->datefin);
|
||||||
$memberstatic->id=$objp->rowid;
|
$memberstatic->id=$objp->rowid;
|
||||||
$memberstatic->ref=$objp->rowid;
|
$memberstatic->ref=$objp->rowid;
|
||||||
@ -244,43 +242,43 @@ if ($id > 0 || ! empty($ref))
|
|||||||
$memberstatic->firstname=$objp->firstname;
|
$memberstatic->firstname=$objp->firstname;
|
||||||
|
|
||||||
$companyname=$objp->company;
|
$companyname=$objp->company;
|
||||||
|
|
||||||
$var=!$var;
|
$var=!$var;
|
||||||
print "<tr ".$bc[$var].">";
|
print "<tr ".$bc[$var].">";
|
||||||
|
|
||||||
// Ref
|
// Ref
|
||||||
print "<td>";
|
print "<td>";
|
||||||
print $memberstatic->getNomUrl(1);
|
print $memberstatic->getNomUrl(1);
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
// Lastname
|
// Lastname
|
||||||
print "<td><a href=\"card.php?rowid=$objp->rowid\">";
|
print "<td><a href=\"card.php?rowid=$objp->rowid\">";
|
||||||
print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : '');
|
print ((! empty($objp->lastname) || ! empty($objp->firstname)) ? dol_trunc($memberstatic->getFullName($langs)) : '');
|
||||||
print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : '');
|
print (((! empty($objp->lastname) || ! empty($objp->firstname)) && ! empty($companyname)) ? ' / ' : '');
|
||||||
print (! empty($companyname) ? dol_trunc($companyname, 32) : '');
|
print (! empty($companyname) ? dol_trunc($companyname, 32) : '');
|
||||||
print "</a></td>\n";
|
print "</a></td>\n";
|
||||||
|
|
||||||
// Login
|
// Login
|
||||||
print "<td>".$objp->login."</td>\n";
|
print "<td>".$objp->login."</td>\n";
|
||||||
|
|
||||||
// Type
|
// Type
|
||||||
$membertypestatic->id=$objp->type_id;
|
$membertypestatic->id=$objp->type_id;
|
||||||
$membertypestatic->libelle=$objp->type;
|
$membertypestatic->libelle=$objp->type;
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print $membertypestatic->getNomUrl(1,32);
|
print $membertypestatic->getNomUrl(1,32);
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|
||||||
// Moral/Physique
|
// Moral/Physique
|
||||||
print "<td>".$memberstatic->getmorphylib($objp->morphy)."</td>\n";
|
print "<td>".$memberstatic->getmorphylib($objp->morphy)."</td>\n";
|
||||||
|
|
||||||
// EMail
|
// EMail
|
||||||
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
||||||
|
|
||||||
// Statut
|
// Statut
|
||||||
print '<td class="nowrap">';
|
print '<td class="nowrap">';
|
||||||
print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
|
print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
|
||||||
print "</td>";
|
print "</td>";
|
||||||
|
|
||||||
// End of subscription date
|
// End of subscription date
|
||||||
if ($datefin)
|
if ($datefin)
|
||||||
{
|
{
|
||||||
@ -303,7 +301,7 @@ if ($id > 0 || ! empty($ref))
|
|||||||
}
|
}
|
||||||
print '</td>';
|
print '</td>';
|
||||||
}
|
}
|
||||||
|
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
$i++;
|
$i++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user