Put the town in the list of propal
This commit is contained in:
parent
8bae6a774d
commit
29094c9623
@ -54,6 +54,7 @@ $search_refcustomer=GETPOST('search_refcustomer','alpha');
|
||||
$search_societe=GETPOST('search_societe','alpha');
|
||||
$search_montant_ht=GETPOST('search_montant_ht','alpha');
|
||||
$search_author=GETPOST('search_author','alpha');
|
||||
$search_ville=GETPOST('search_ville','alpha');
|
||||
|
||||
$sall=GETPOST("sall");
|
||||
$mesg=(GETPOST("msg") ? GETPOST("msg") : GETPOST("mesg"));
|
||||
@ -101,6 +102,7 @@ if (GETPOST("button_removefilter_x"))
|
||||
$search_societe='';
|
||||
$search_montant_ht='';
|
||||
$search_author='';
|
||||
$search_ville='';
|
||||
$year='';
|
||||
$month='';
|
||||
}
|
||||
@ -137,7 +139,7 @@ if (! $sortfield) $sortfield='p.datep';
|
||||
if (! $sortorder) $sortorder='DESC';
|
||||
$limit = $conf->liste_limit;
|
||||
|
||||
$sql = 'SELECT s.rowid, s.nom, s.client, ';
|
||||
$sql = 'SELECT s.rowid, s.nom, s.town, s.client, ';
|
||||
$sql.= 'p.rowid as propalid, p.total_ht, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,';
|
||||
if (! $user->rights->societe->client->voir && ! $socid) $sql .= " sc.fk_soc, sc.fk_user,";
|
||||
$sql.= ' u.login';
|
||||
@ -157,6 +159,10 @@ if (! $user->rights->societe->client->voir && ! $socid) //restriction
|
||||
{
|
||||
$sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$user->id;
|
||||
}
|
||||
if ($search_ville) //restriction
|
||||
{
|
||||
$sql.= " AND s.town LIKE '%".$db->escape(trim($search_ville))."%'";
|
||||
}
|
||||
if ($search_ref)
|
||||
{
|
||||
$sql.= " AND p.ref LIKE '%".$db->escape(trim($search_ref))."%'";
|
||||
@ -229,6 +235,7 @@ if ($result)
|
||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||
if ($search_montant_ht) $param.='&search_montant_ht='.$search_montant_ht;
|
||||
if ($search_author) $param.='&search_author='.$search_author;
|
||||
if ($search_ville) $param.='&search_ville='.$search_ville;
|
||||
print_barre_liste($langs->trans('ListOfProposals').' '.($socid?'- '.$soc->nom:''), $page, $_SERVER["PHP_SELF"],$param,$sortfield,$sortorder,'',$num);
|
||||
|
||||
// Lignes des champs de filtre
|
||||
@ -264,6 +271,7 @@ if ($result)
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'p.ref','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Town'),$_SERVER["PHP_SELF"],'s.town','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Date'),$_SERVER["PHP_SELF"],'p.datep','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('DateEndPropalShort'),$_SERVER["PHP_SELF"],'dfv','',$param, 'align="center"',$sortfield,$sortorder);
|
||||
@ -280,6 +288,7 @@ if ($result)
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
|
||||
print '</td>';
|
||||
print '<td colspan="1"></td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
|
||||
print '</td>';
|
||||
@ -344,9 +353,12 @@ if ($result)
|
||||
print '<td>';
|
||||
print $companystatic->getNomUrl(1,'customer');
|
||||
print '</td>';
|
||||
|
||||
|
||||
print '<td class="nocellnopadd">';
|
||||
print $objp->town;
|
||||
print '</td>';
|
||||
// Customer ref
|
||||
print '<td class="nowrap">';
|
||||
print '<td class="nocellnopadd">';
|
||||
print $objp->ref_client;
|
||||
print '</td>';
|
||||
|
||||
@ -399,14 +411,14 @@ if ($result)
|
||||
if($num<$limit){
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT").'</td>';
|
||||
print '<td colspan="5" align="right"">'.price($total).'<td colspan="3"</td>';
|
||||
print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
$var=!$var;
|
||||
print '<tr class="liste_total"><td align="left">'.$langs->trans("Total HT for this page").'</td>';
|
||||
print '<td colspan="5" align="right"">'.price($total).'<td colspan="3"</td>';
|
||||
print '<td colspan="6" align="right"">'.price($total).'<td colspan="3"</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user