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);
|
||||
@ -154,12 +152,12 @@ if ($id > 0 || ! empty($ref))
|
||||
print '<td colspan="3">';
|
||||
print $form->showrefnav($object,'id','',($user->societe_id?0:1),'rowid','nom');
|
||||
print '</td></tr>';
|
||||
|
||||
|
||||
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>';
|
||||
}
|
||||
|
||||
|
||||
if ($object->client)
|
||||
{
|
||||
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>';
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
|
||||
if ($object->fournisseur)
|
||||
{
|
||||
print '<tr><td>';
|
||||
@ -216,7 +214,7 @@ if ($id > 0 || ! empty($ref))
|
||||
{
|
||||
$titre=$langs->trans("MembersListOfTiers");
|
||||
print '<br>';
|
||||
|
||||
|
||||
print_barre_liste($titre,$page,$_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num,$nbtotalofrecords,'');
|
||||
|
||||
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("EndSubscription"),$_SERVER["PHP_SELF"],"d.datefin",$param,"",'align="center"',$sortfield,$sortorder);
|
||||
print "</tr>\n";
|
||||
|
||||
|
||||
$var=True;
|
||||
$i=0;
|
||||
while ($i < $num && $i < $conf->liste_limit)
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
|
||||
|
||||
$datefin=$db->jdate($objp->datefin);
|
||||
$memberstatic->id=$objp->rowid;
|
||||
$memberstatic->ref=$objp->rowid;
|
||||
@ -244,43 +242,43 @@ if ($id > 0 || ! empty($ref))
|
||||
$memberstatic->firstname=$objp->firstname;
|
||||
|
||||
$companyname=$objp->company;
|
||||
|
||||
|
||||
$var=!$var;
|
||||
print "<tr ".$bc[$var].">";
|
||||
|
||||
|
||||
// Ref
|
||||
print "<td>";
|
||||
print $memberstatic->getNomUrl(1);
|
||||
print "</td>\n";
|
||||
|
||||
|
||||
// Lastname
|
||||
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)) && ! empty($companyname)) ? ' / ' : '');
|
||||
print (! empty($companyname) ? dol_trunc($companyname, 32) : '');
|
||||
print "</a></td>\n";
|
||||
|
||||
|
||||
// Login
|
||||
print "<td>".$objp->login."</td>\n";
|
||||
|
||||
|
||||
// Type
|
||||
$membertypestatic->id=$objp->type_id;
|
||||
$membertypestatic->libelle=$objp->type;
|
||||
print '<td class="nowrap">';
|
||||
print $membertypestatic->getNomUrl(1,32);
|
||||
print '</td>';
|
||||
|
||||
|
||||
// Moral/Physique
|
||||
print "<td>".$memberstatic->getmorphylib($objp->morphy)."</td>\n";
|
||||
|
||||
|
||||
// EMail
|
||||
print "<td>".dol_print_email($objp->email,0,0,1)."</td>\n";
|
||||
|
||||
|
||||
// Statut
|
||||
print '<td class="nowrap">';
|
||||
print $memberstatic->LibStatut($objp->statut,$objp->cotisation,$datefin,2);
|
||||
print "</td>";
|
||||
|
||||
|
||||
// End of subscription date
|
||||
if ($datefin)
|
||||
{
|
||||
@ -303,7 +301,7 @@ if ($id > 0 || ! empty($ref))
|
||||
}
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
|
||||
print "</tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user