diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index ae489ce83c0..b0f51e442c6 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -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 ''; 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 ''; print ''; - print ''; + print ''; + print ''; + print ''; + print ''; print ''; print ''; print ''; @@ -347,6 +350,7 @@ if ($result) } print ''; + // Ref print ''; $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 ''; + print "\n"; + + // Customer ref + print ''; + print $objp->ref_client; + print ''; + $url = DOL_URL_ROOT.'/comm/fiche.php?socid='.$objp->rowid; // Company @@ -369,11 +380,6 @@ if ($result) print $objp->town; print ''; - // Customer ref - print ''; - print $objp->ref_client; - print ''; - // Date proposal print ''; $y = dol_print_date($db->jdate($objp->dp),'%Y'); diff --git a/htdocs/commande/liste.php b/htdocs/commande/liste.php index 9bf7caf379a..8f4f0045f60 100644 --- a/htdocs/commande/liste.php +++ b/htdocs/commande/liste.php @@ -280,8 +280,8 @@ if ($resql) print ''; 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 ''; print ''; print ''; - print ''; - print ''; + print ''; + print ''; + print ''; + print ''; + print ''; + print ''; print ''; - print ''; - print ''; - print ' '; + print ''; + print ' '; print ' '; print ' '; print ''; @@ -341,6 +344,9 @@ if ($resql) print ''; + // Ref customer + print ''.$objp->ref_client.''; + // Company $companystatic->id=$objp->socid; $companystatic->nom=$objp->nom; @@ -362,8 +368,6 @@ if ($resql) } print ''; - print ''.$objp->ref_client.''; - // Order date $y = dol_print_date($db->jdate($objp->date_commande),'%Y'); $m = dol_print_date($db->jdate($objp->date_commande),'%m'); diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7a5749006a6..8fe94f6c3fd 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -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 ''; - print ''; + print ''; print $moreforfilter; print ''; } print ''; 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 ''; print ''; - print ''; + print ''; print ''; + print ''; + print ''; + print ''; print ''; if (! empty($conf->global->MAIN_LIST_FILTER_ON_DAY)) print ''; print ''; @@ -358,13 +368,18 @@ if ($resql) print "\n"; - // Date - print ''; + // Customer ref + print ''; + print $objp->ref_client; + print ''; + + // Date + print ''; print dol_print_date($db->jdate($objp->df),'day'); print ''; // Date limit - print ''.dol_print_date($datelimit,'day'); + print ''.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 ''; - print ''.$langs->trans('Total').''; + print ''.$langs->trans('Total').''; print ''.price($total_ht,0,$langs).''; print ''.price($total_tva,0,$langs).''; print ''.price($total_ttc,0,$langs).'';