Uniformize ref_customer into list
Conflicts: htdocs/comm/propal/list.php htdocs/compta/facture/list.php
This commit is contained in:
parent
a99aa9acba
commit
47a9837046
@ -233,7 +233,7 @@ if ($result)
|
||||
if ($month) $param.='&month='.$month;
|
||||
if ($year) $param.='&year='.$year;
|
||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||
if ($search_refcustomer) $param.='&search_ref=' .$search_refcustomer;
|
||||
if ($search_refcustomer) $param.='&search_refcustomer=' .$search_refcustomer;
|
||||
if ($search_societe) $param.='&search_societe=' .$search_societe;
|
||||
if ($search_user > 0) $param.='&search_user='.$search_user;
|
||||
if ($search_sale > 0) $param.='&search_sale='.$search_sale;
|
||||
@ -274,9 +274,9 @@ 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('RefCustomer'),$_SERVER["PHP_SELF"],'p.ref_client','',$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);
|
||||
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'p.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
@ -287,7 +287,10 @@ if ($result)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="16" name="search_societe" value="'.$search_societe.'">';
|
||||
@ -347,6 +350,7 @@ if ($result)
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
// Ref
|
||||
print '<td width="16" align="right" class="nobordernopadding hideonsmartphone">';
|
||||
$filename=dol_sanitizeFileName($objp->ref);
|
||||
$filedir=$conf->propal->dir_output . '/' . dol_sanitizeFileName($objp->ref);
|
||||
@ -354,6 +358,13 @@ if ($result)
|
||||
print $formfile->getDocumentsLink($objectstatic->element, $filename, $filedir);
|
||||
print '</td></tr></table>';
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
// Customer ref
|
||||
print '<td class="nocellnopadd nowrap">';
|
||||
print $objp->ref_client;
|
||||
print '</td>';
|
||||
|
||||
$url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->rowid;
|
||||
|
||||
// Company
|
||||
@ -369,11 +380,6 @@ if ($result)
|
||||
print $objp->town;
|
||||
print '</td>';
|
||||
|
||||
// Customer ref
|
||||
print '<td class="nocellnopadd nowrap">';
|
||||
print $objp->ref_client;
|
||||
print '</td>';
|
||||
|
||||
// Date proposal
|
||||
print '<td align="center">';
|
||||
$y = dol_print_date($db->jdate($objp->dp),'%Y');
|
||||
|
||||
@ -280,8 +280,8 @@ if ($resql)
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER["PHP_SELF"],'c.ref','',$param,'width="25%"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomerOrder'),$_SERVER["PHP_SELF"],'c.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER["PHP_SELF"],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('OrderDate'),$_SERVER["PHP_SELF"],'c.date_commande','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('DeliveryDate'),$_SERVER["PHP_SELF"],'c.date_livraison','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('AmountHT'),$_SERVER["PHP_SELF"],'c.total_ht','',$param, 'align="right"',$sortfield,$sortorder);
|
||||
@ -289,12 +289,15 @@ if ($resql)
|
||||
print '</tr>';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="10" type="text" name="sref" value="'.$sref.'">';
|
||||
print '</td><td class="liste_titre" align="left">';
|
||||
print '<input class="flat" size="6" type="text" name="sref" value="'.$sref.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="6" name="sref_client" value="'.$sref_client.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" name="snom" value="'.$snom.'">';
|
||||
print '</td><td class="liste_titre" align="left">';
|
||||
print '<input class="flat" type="text" size="10" name="sref_client" value="'.$sref_client.'">';
|
||||
print '</td><td class="liste_titre"> ';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre"> ';
|
||||
print '</td><td class="liste_titre"> ';
|
||||
print '</td><td class="liste_titre"> ';
|
||||
print '</td><td align="right" class="liste_titre">';
|
||||
@ -341,6 +344,9 @@ if ($resql)
|
||||
|
||||
print '</td>';
|
||||
|
||||
// Ref customer
|
||||
print '<td>'.$objp->ref_client.'</td>';
|
||||
|
||||
// Company
|
||||
$companystatic->id=$objp->socid;
|
||||
$companystatic->nom=$objp->nom;
|
||||
@ -362,8 +368,6 @@ if ($resql)
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
print '<td>'.$objp->ref_client.'</td>';
|
||||
|
||||
// Order date
|
||||
$y = dol_print_date($db->jdate($objp->date_commande),'%Y');
|
||||
$m = dol_print_date($db->jdate($objp->date_commande),'%m');
|
||||
|
||||
@ -62,6 +62,7 @@ $confirm=GETPOST('confirm','alpha');
|
||||
$lineid=GETPOST('lineid','int');
|
||||
$userid=GETPOST('userid','int');
|
||||
$search_ref=GETPOST('sf_ref')?GETPOST('sf_ref','alpha'):GETPOST('search_ref','alpha');
|
||||
$search_refcustomer=GETPOST('search_refcustomer','alpha');
|
||||
$search_societe=GETPOST('search_societe','alpha');
|
||||
$search_montant_ht=GETPOST('search_montant_ht','alpha');
|
||||
$search_montant_ttc=GETPOST('search_montant_ttc','alpha');
|
||||
@ -139,7 +140,7 @@ $facturestatic=new Facture($db);
|
||||
|
||||
if (! $sall) $sql = 'SELECT';
|
||||
else $sql = 'SELECT DISTINCT';
|
||||
$sql.= ' f.rowid as facid, f.facnumber, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,';
|
||||
$sql.= ' f.rowid as facid, f.facnumber, f.ref_client, f.type, f.note_private, f.increment, f.total as total_ht, f.tva as total_tva, f.total_ttc,';
|
||||
$sql.= ' f.datef as df, f.date_lim_reglement as datelimite,';
|
||||
$sql.= ' f.paye as paye, f.fk_statut,';
|
||||
$sql.= ' s.nom, s.rowid as socid';
|
||||
@ -177,6 +178,10 @@ if ($search_ref)
|
||||
{
|
||||
$sql .= natural_search('f.facnumber', $search_ref);
|
||||
}
|
||||
if ($search_refcustomer)
|
||||
{
|
||||
$sql .= natural_search('f.ref_client', $search_refcustomer);
|
||||
}
|
||||
if ($search_societe)
|
||||
{
|
||||
$sql .= natural_search('s.nom', $search_societe);
|
||||
@ -244,6 +249,7 @@ if ($resql)
|
||||
if ($month) $param.='&month='.$month;
|
||||
if ($year) $param.='&year=' .$year;
|
||||
if ($search_ref) $param.='&search_ref=' .$search_ref;
|
||||
if ($search_refcustomer) $param.='&search_refcustomer=' .$search_refcustomer;
|
||||
if ($search_societe) $param.='&search_societe=' .$search_societe;
|
||||
if ($search_sale > 0) $param.='&search_sale=' .$search_sale;
|
||||
if ($search_user > 0) $param.='&search_user=' .$search_user;
|
||||
@ -273,13 +279,14 @@ if ($resql)
|
||||
if ($moreforfilter)
|
||||
{
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" colspan="9">';
|
||||
print '<td class="liste_titre" colspan="10">';
|
||||
print $moreforfilter;
|
||||
print '</td></tr>';
|
||||
}
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print_liste_field_titre($langs->trans('Ref'),$_SERVER['PHP_SELF'],'f.facnumber','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('RefCustomer'),$_SERVER["PHP_SELF"],'f.ref_client','',$param,'',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Date'),$_SERVER['PHP_SELF'],'f.datef','',$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans("DateDue"),$_SERVER['PHP_SELF'],"f.date_lim_reglement",'',$param,'align="center"',$sortfield,$sortorder);
|
||||
print_liste_field_titre($langs->trans('Company'),$_SERVER['PHP_SELF'],'s.nom','',$param,'',$sortfield,$sortorder);
|
||||
@ -294,8 +301,11 @@ if ($resql)
|
||||
// Filters lines
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.$search_ref.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.$search_refcustomer.'">';
|
||||
print '</td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print '<input class="flat" type="text" size="1" maxlength="2" name="day" value="'.$day.'">';
|
||||
print '<input class="flat" type="text" size="1" maxlength="2" name="month" value="'.$month.'">';
|
||||
@ -358,13 +368,18 @@ if ($resql)
|
||||
|
||||
print "</td>\n";
|
||||
|
||||
// Date
|
||||
print '<td align="center" nowrap>';
|
||||
// Customer ref
|
||||
print '<td class="nowrap">';
|
||||
print $objp->ref_client;
|
||||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center" class="nowrap">';
|
||||
print dol_print_date($db->jdate($objp->df),'day');
|
||||
print '</td>';
|
||||
|
||||
// Date limit
|
||||
print '<td align="center" nowrap="1">'.dol_print_date($datelimit,'day');
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($datelimit,'day');
|
||||
if ($datelimit < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1 && ! $paiement)
|
||||
{
|
||||
print img_warning($langs->trans('Late'));
|
||||
@ -403,7 +418,7 @@ if ($resql)
|
||||
{
|
||||
// Print total
|
||||
print '<tr class="liste_total">';
|
||||
print '<td class="liste_total" colspan="4" align="left">'.$langs->trans('Total').'</td>';
|
||||
print '<td class="liste_total" colspan="5" align="left">'.$langs->trans('Total').'</td>';
|
||||
print '<td class="liste_total" align="right">'.price($total_ht,0,$langs).'</td>';
|
||||
print '<td class="liste_total" align="right">'.price($total_tva,0,$langs).'</td>';
|
||||
print '<td class="liste_total" align="right">'.price($total_ttc,0,$langs).'</td>';
|
||||
|
||||
Loading…
Reference in New Issue
Block a user