diff --git a/htdocs/comm/propal/list.php b/htdocs/comm/propal/list.php index e59700b78e0..19fe59062dd 100644 --- a/htdocs/comm/propal/list.php +++ b/htdocs/comm/propal/list.php @@ -62,6 +62,7 @@ $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref', 'alpha'):GETPOST('search_ref', ' $search_refcustomer=GETPOST('search_refcustomer', 'alpha'); $search_refproject=GETPOST('search_refproject', 'alpha'); +$search_project=GETPOST('search_project', 'alpha'); $search_societe=GETPOST('search_societe', 'alpha'); $search_montant_ht=GETPOST('search_montant_ht', 'alpha'); @@ -144,27 +145,28 @@ if (empty($user->socid)) $fieldstosearchall["p.note_private"]="NotePrivate"; $checkedtypetiers=0; $arrayfields=array( - 'p.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'p.ref_client'=>array('label'=>$langs->trans("RefCustomer"), 'checked'=>1), - 'pr.ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), - 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), - 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), - 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), - 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'p.date'=>array('label'=>$langs->trans("Date"), 'checked'=>1), - 'p.fin_validite'=>array('label'=>$langs->trans("DateEnd"), 'checked'=>1), - 'p.date_livraison'=>array('label'=>$langs->trans("DeliveryDate"), 'checked'=>0), - 'ava.rowid'=>array('label'=>$langs->trans("AvailabilityPeriod"), 'checked'=>0), - 'p.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'p.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), - 'p.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), - 'u.login'=>array('label'=>$langs->trans("Author"), 'checked'=>1, 'position'=>10), - 'sale_representative'=>array('label'=>$langs->trans("SaleRepresentativesOfThirdParty"), 'checked'=>1), - 'p.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'p.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'p.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), + 'p.ref'=>array('label'=>"Ref", 'checked'=>1), + 'p.ref_client'=>array('label'=>"RefCustomer", 'checked'=>1), + 'pr.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 'pr.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 's.town'=>array('label'=>"Town", 'checked'=>1), + 's.zip'=>array('label'=>"Zip", 'checked'=>1), + 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), + 'country.code_iso'=>array('label'=>"Country", 'checked'=>0), + 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers), + 'p.date'=>array('label'=>"Date", 'checked'=>1), + 'p.fin_validite'=>array('label'=>"DateEnd", 'checked'=>1), + 'p.date_livraison'=>array('label'=>"DeliveryDate", 'checked'=>0), + 'ava.rowid'=>array('label'=>"AvailabilityPeriod", 'checked'=>0), + 'p.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), + 'p.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), + 'p.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), + 'u.login'=>array('label'=>"Author", 'checked'=>1, 'position'=>10), + 'sale_representative'=>array('label'=>"SaleRepresentativesOfThirdParty", 'checked'=>1), + 'p.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'p.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'p.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), ); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) @@ -197,6 +199,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x' $search_ref=''; $search_refcustomer=''; $search_refproject=''; + $search_project=''; $search_societe=''; $search_montant_ht=''; $search_montant_vat=''; @@ -265,7 +268,7 @@ $sql.= " ava.rowid as availability,"; $sql.= " state.code_departement as state_code, state.nom as state_name,"; $sql.= ' p.rowid, p.entity, p.note_private, p.total_ht, p.tva as total_vat, p.total as total_ttc, p.localtax1, p.localtax2, p.ref, p.ref_client, p.fk_statut, p.fk_user_author, p.datep as dp, p.fin_validite as dfv,p.date_livraison as ddelivery,'; $sql.= ' p.datec as date_creation, p.tms as date_update,'; -$sql.= " pr.rowid as project_id, pr.ref as project_ref, p.title as project_label,"; +$sql.= " pr.rowid as project_id, pr.ref as project_ref, pr.title as project_label,"; $sql.= ' u.login'; if (! $user->rights->societe->client->voir && ! $socid) $sql .= ", sc.fk_soc, sc.fk_user,"; if ($search_categ_cus) $sql .= ", cc.fk_categorie, cc.fk_soc"; @@ -309,6 +312,7 @@ if ($search_type_thirdparty) $sql .= " AND s.fk_typent IN (".$db->escape($search if ($search_ref) $sql .= natural_search('p.ref', $search_ref); if ($search_refcustomer) $sql .= natural_search('p.ref_client', $search_refcustomer); if ($search_refproject) $sql .= natural_search('pr.ref', $search_refproject); +if ($search_project) $sql .= natural_search('pr.title', $search_project); if ($search_availability) $sql .= " AND p.fk_availability IN (".$db->escape($search_availability).')'; if ($search_societe) $sql .= natural_search('s.nom', $search_societe); @@ -536,19 +540,25 @@ if ($resql) { print ''; print ''; - print ''; + print ''; } if (! empty($arrayfields['pr.ref']['checked'])) { print ''; print ''; - print ''; + print ''; + } + if (! empty($arrayfields['pr.title']['checked'])) + { + print ''; + print ''; + print ''; } if (! empty($arrayfields['s.nom']['checked'])) { print ''; print ''; - print ''; + print ''; } if (! empty($arrayfields['s.town']['checked'])) print ''; if (! empty($arrayfields['s.zip']['checked'])) print ''; @@ -686,7 +696,8 @@ if ($resql) print ''; if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], 'p.ref', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['p.ref_client']['checked'])) print_liste_field_titre($arrayfields['p.ref_client']['label'], $_SERVER["PHP_SELF"], 'p.ref_client', '', $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], 'pr.ref', '', $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['pr.ref']['checked'])) print_liste_field_titre($arrayfields['pr.ref']['label'], $_SERVER["PHP_SELF"], 'pr.ref', '', $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['pr.title']['checked'])) print_liste_field_titre($arrayfields['pr.title']['label'], $_SERVER["PHP_SELF"], 'pr.title', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); @@ -730,6 +741,10 @@ if ($resql) $companystatic->code_client=$obj->code_client; $companystatic->email=$obj->email; + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + print ''; if (! empty($arrayfields['p.ref']['checked'])) @@ -772,7 +787,7 @@ if ($resql) if (! empty($arrayfields['p.ref_client']['checked'])) { // Customer ref - print ''; + print ''; print $obj->ref_client; print ''; if (! $i) $totalarray['nbfield']++; @@ -781,17 +796,25 @@ if ($resql) if (! empty($arrayfields['pr.ref']['checked'])) { // Project ref - print ''; + print ''; if ($obj->project_id > 0) { - $projectstatic->id=$obj->project_id; - $projectstatic->ref=$obj->project_ref; - $projectstatic->title=$obj->project_label; print $projectstatic->getNomUrl(1); } print ''; if (! $i) $totalarray['nbfield']++; } + if (! empty($arrayfields['pr.title']['checked'])) + { + // Project ref + print ''; + if ($obj->project_id > 0) { + print $projectstatic->title; + } + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Thirdparty if (! empty($arrayfields['s.nom']['checked'])) { diff --git a/htdocs/commande/list.php b/htdocs/commande/list.php index d991fb1cc97..4ff7fe364bd 100644 --- a/htdocs/commande/list.php +++ b/htdocs/commande/list.php @@ -84,6 +84,7 @@ $viewstatut=GETPOST('viewstatut'); $search_btn=GETPOST('button_search', 'alpha'); $search_remove_btn=GETPOST('button_removefilter', 'alpha'); $search_project_ref=GETPOST('search_project_ref', 'alpha'); +$search_project=GETPOST('search_project', 'alpha'); // Security check $id = (GETPOST('orderid')?GETPOST('orderid', 'int'):GETPOST('id', 'int')); @@ -125,24 +126,25 @@ if (empty($user->socid)) $fieldstosearchall["c.note_private"]="NotePrivate"; $checkedtypetiers=0; $arrayfields=array( - 'c.ref'=>array('label'=>$langs->trans("Ref"), 'checked'=>1), - 'c.ref_client'=>array('label'=>$langs->trans("RefCustomerOrder"), 'checked'=>1), - 'p.project_ref'=>array('label'=>$langs->trans("ProjectRef"), 'checked'=>0, 'enabled'=>1), - 's.nom'=>array('label'=>$langs->trans("ThirdParty"), 'checked'=>1), - 's.town'=>array('label'=>$langs->trans("Town"), 'checked'=>1), - 's.zip'=>array('label'=>$langs->trans("Zip"), 'checked'=>1), - 'state.nom'=>array('label'=>$langs->trans("StateShort"), 'checked'=>0), - 'country.code_iso'=>array('label'=>$langs->trans("Country"), 'checked'=>0), - 'typent.code'=>array('label'=>$langs->trans("ThirdPartyType"), 'checked'=>$checkedtypetiers), - 'c.date_commande'=>array('label'=>$langs->trans("OrderDateShort"), 'checked'=>1), - 'c.date_delivery'=>array('label'=>$langs->trans("DateDeliveryPlanned"), 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)), - 'c.total_ht'=>array('label'=>$langs->trans("AmountHT"), 'checked'=>1), - 'c.total_vat'=>array('label'=>$langs->trans("AmountVAT"), 'checked'=>0), - 'c.total_ttc'=>array('label'=>$langs->trans("AmountTTC"), 'checked'=>0), - 'c.datec'=>array('label'=>$langs->trans("DateCreation"), 'checked'=>0, 'position'=>500), - 'c.tms'=>array('label'=>$langs->trans("DateModificationShort"), 'checked'=>0, 'position'=>500), - 'c.fk_statut'=>array('label'=>$langs->trans("Status"), 'checked'=>1, 'position'=>1000), - 'c.facture'=>array('label'=>$langs->trans("Billed"), 'checked'=>1, 'position'=>1000, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) + 'c.ref'=>array('label'=>"Ref", 'checked'=>1), + 'c.ref_client'=>array('label'=>"RefCustomerOrder", 'checked'=>1), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 's.town'=>array('label'=>"Town", 'checked'=>1), + 's.zip'=>array('label'=>"Zip", 'checked'=>1), + 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), + 'country.code_iso'=>array('label'=>"Country", 'checked'=>0), + 'typent.code'=>array('label'=>"ThirdPartyType", 'checked'=>$checkedtypetiers), + 'c.date_commande'=>array('label'=>"OrderDateShort", 'checked'=>1), + 'c.date_delivery'=>array('label'=>"DateDeliveryPlanned", 'checked'=>1, 'enabled'=>empty($conf->global->ORDER_DISABLE_DELIVERY_DATE)), + 'c.total_ht'=>array('label'=>"AmountHT", 'checked'=>1), + 'c.total_vat'=>array('label'=>"AmountVAT", 'checked'=>0), + 'c.total_ttc'=>array('label'=>"AmountTTC", 'checked'=>0), + 'c.datec'=>array('label'=>"DateCreation", 'checked'=>0, 'position'=>500), + 'c.tms'=>array('label'=>"DateModificationShort", 'checked'=>0, 'position'=>500), + 'c.fk_statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>1000), + 'c.facture'=>array('label'=>"Billed", 'checked'=>1, 'position'=>1000, 'enabled'=>(empty($conf->global->WORKFLOW_BILL_ON_SHIPMENT))) ); // Extra fields if (is_array($extrafields->attribute_label) && count($extrafields->attribute_label)) @@ -197,6 +199,7 @@ if (empty($reshook)) $search_deliverymonth=''; $search_deliveryyear=''; $search_project_ref=''; + $search_project=''; $viewstatut=''; $billed=''; $toselect=''; @@ -315,6 +318,7 @@ if ($search_user > 0) $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.elemen if ($search_total_ht != '') $sql.= natural_search('c.total_ht', $search_total_ht, 1); if ($search_total_ttc != '') $sql.= natural_search('c.total_ttc', $search_total_ttc, 1); if ($search_project_ref != '') $sql.= natural_search("p.ref", $search_project_ref); +if ($search_project != '') $sql.= natural_search("p.title", $search_project); if ($search_categ_cus > 0) $sql.= " AND cc.fk_categorie = ".$db->escape($search_categ_cus); if ($search_categ_cus == -2) $sql.= " AND cc.fk_categorie IS NULL"; // Add where from extra fields @@ -595,10 +599,15 @@ if ($resql) print ''; } // Project ref - if (! empty($arrayfields['p.project_ref']['checked'])) + if (! empty($arrayfields['p.ref']['checked'])) { print ''; } + // Project title + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; + } // Thirpdarty if (! empty($arrayfields['s.nom']['checked'])) { @@ -721,7 +730,8 @@ if ($resql) print ''; if (! empty($arrayfields['c.ref']['checked'])) print_liste_field_titre($arrayfields['c.ref']['label'], $_SERVER["PHP_SELF"], 'c.ref', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['c.ref_client']['checked'])) print_liste_field_titre($arrayfields['c.ref_client']['label'], $_SERVER["PHP_SELF"], 'c.ref_client', '', $param, '', $sortfield, $sortorder); - if (! empty($arrayfields['p.project_ref']['checked'])) print_liste_field_titre($arrayfields['p.project_ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER["PHP_SELF"], "p.ref", "", $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['p.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER["PHP_SELF"], "p.title", "", $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER["PHP_SELF"], 's.nom', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); @@ -781,6 +791,10 @@ if ($resql) $generic_commande->total_tva = $obj->total_tva; $generic_commande->total_ttc = $obj->total_ttc; + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + print ''; // Ref @@ -932,21 +946,30 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - // Project - if (! empty($arrayfields['p.project_ref']['checked'])) + // Project ref + if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { - $projectstatic->id=$obj->project_id; - $projectstatic->ref=$obj->project_ref; - $projectstatic->title=$obj->project_label; print $projectstatic->getNomUrl(1); } print ''; if (! $i) $totalarray['nbfield']++; } + // Project label + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; + if ($obj->project_id > 0) + { + print $projectstatic->title; + } + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Third party if (! empty($arrayfields['s.nom']['checked'])) { diff --git a/htdocs/compta/facture/list.php b/htdocs/compta/facture/list.php index 7961ca58730..fe669a73312 100644 --- a/htdocs/compta/facture/list.php +++ b/htdocs/compta/facture/list.php @@ -78,6 +78,7 @@ $search_product_category=GETPOST('search_product_category', 'int'); $search_ref=GETPOST('sf_ref')?GETPOST('sf_ref', 'alpha'):GETPOST('search_ref', 'alpha'); $search_refcustomer=GETPOST('search_refcustomer', 'alpha'); $search_type=GETPOST('search_type', 'int'); +$search_project_ref=GETPOST('search_project_ref', 'alpha'); $search_project=GETPOST('search_project', 'alpha'); $search_societe=GETPOST('search_societe', 'alpha'); $search_montant_ht=GETPOST('search_montant_ht', 'alpha'); @@ -160,8 +161,9 @@ $arrayfields=array( 'f.type'=>array('label'=>"Type", 'checked'=>0), 'f.date'=>array('label'=>"DateInvoice", 'checked'=>1), 'f.date_lim_reglement'=>array('label'=>"DateDue", 'checked'=>1), - 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), - 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), + 'p.ref'=>array('label'=>"ProjectRef", 'checked'=>1, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(empty($conf->projet->enabled)?0:1)), + 's.nom'=>array('label'=>"ThirdParty", 'checked'=>1), 's.town'=>array('label'=>"Town", 'checked'=>1), 's.zip'=>array('label'=>"Zip", 'checked'=>1), 'state.nom'=>array('label'=>"StateShort", 'checked'=>0), @@ -212,6 +214,7 @@ if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter', $search_ref=''; $search_refcustomer=''; $search_type=''; + $search_project_ref=''; $search_project=''; $search_societe=''; $search_montant_ht=''; @@ -426,7 +429,8 @@ if ($filtre) if ($search_ref) $sql .= natural_search('f.ref', $search_ref); if ($search_refcustomer) $sql .= natural_search('f.ref_client', $search_refcustomer); if ($search_type != '' && $search_type != '-1') $sql.=" AND f.type IN (".$db->escape($search_type).")"; -if ($search_project) $sql .= natural_search('p.ref', $search_project); +if ($search_project_ref) $sql .= natural_search('p.ref', $search_project_ref); +if ($search_project) $sql .= natural_search('p.title', $search_project); if ($search_societe) $sql .= natural_search('s.nom', $search_societe); if ($search_town) $sql.= natural_search('s.town', $search_town); if ($search_zip) $sql.= natural_search("s.zip", $search_zip); @@ -452,7 +456,7 @@ if ($search_status != '-1' && $search_status != '') } else { - $sql.= " AND f.fk_statut IN (".$search_status.")"; // When search_status is '1,2' for example + $sql.= " AND f.fk_statut IN (".$db->escape($search_status).")"; // When search_status is '1,2' for example } } if ($search_paymentmode > 0) $sql .= " AND f.fk_mode_reglement = ".$db->escape($search_paymentmode); @@ -460,7 +464,7 @@ if ($search_paymentterms > 0) $sql .= " AND f.fk_cond_reglement = ".$db->escape( $sql.= dolSqlDateFilter("f.datef", $search_day, $search_month, $search_year); $sql.= dolSqlDateFilter("f.date_lim_reglement", $search_day_lim, $search_month_lim, $search_year_lim); if ($option == 'late') $sql.=" AND f.date_lim_reglement < '".$db->idate(dol_now() - $conf->facture->client->warning_delay)."'"; -if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .$search_sale; +if ($search_sale > 0) $sql.= " AND s.rowid = sc.fk_soc AND sc.fk_user = " .(int) $search_sale; if ($search_user > 0) { $sql.= " AND ec.fk_c_type_contact = tc.rowid AND tc.element='facture' AND tc.source='internal' AND ec.element_id = f.rowid AND ec.fk_socpeople = ".$search_user; @@ -554,6 +558,8 @@ if ($resql) if ($search_year_lim) $param.='&search_year_lim=' .urlencode($search_year_lim); if ($search_ref) $param.='&search_ref=' .urlencode($search_ref); if ($search_refcustomer) $param.='&search_refcustomer=' .urlencode($search_refcustomer); + if ($search_project_ref) $param.='&search_project_ref='.urlencode($search_project_ref); + if ($search_project) $param.='&search_project='.urlencode($search_project); if ($search_type != '') $param.='&search_type='.urlencode($search_type); if ($search_societe) $param.='&search_societe=' .urlencode($search_societe); if ($search_town) $param.='&search_town='.urlencode($search_town); @@ -741,10 +747,15 @@ if ($resql) print '
'.$langs->trans("Alert"); print ''; } - // Project + // Project ref if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; + } + // Project label + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; } // Thirpdarty if (! empty($arrayfields['s.nom']['checked'])) @@ -876,6 +887,7 @@ if ($resql) if (! empty($arrayfields['f.date']['checked'])) print_liste_field_titre($arrayfields['f.date']['label'], $_SERVER['PHP_SELF'], 'f.datef', '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['f.date_lim_reglement']['checked'])) print_liste_field_titre($arrayfields['f.date_lim_reglement']['label'], $_SERVER['PHP_SELF'], "f.date_lim_reglement", '', $param, 'align="center"', $sortfield, $sortorder); if (! empty($arrayfields['p.ref']['checked'])) print_liste_field_titre($arrayfields['p.ref']['label'], $_SERVER['PHP_SELF'], "p.ref", '', $param, '', $sortfield, $sortorder); + if (! empty($arrayfields['p.title']['checked'])) print_liste_field_titre($arrayfields['p.title']['label'], $_SERVER['PHP_SELF'], "p.title", '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.nom']['checked'])) print_liste_field_titre($arrayfields['s.nom']['label'], $_SERVER['PHP_SELF'], 's.nom', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.town']['checked'])) print_liste_field_titre($arrayfields['s.town']['label'], $_SERVER["PHP_SELF"], 's.town', '', $param, '', $sortfield, $sortorder); if (! empty($arrayfields['s.zip']['checked'])) print_liste_field_titre($arrayfields['s.zip']['label'], $_SERVER["PHP_SELF"], 's.zip', '', $param, '', $sortfield, $sortorder); @@ -941,6 +953,10 @@ if ($resql) $thirdpartystatic->email=$obj->email; $thirdpartystatic->country_code=$obj->country_code; + $projectstatic->id=$obj->project_id; + $projectstatic->ref=$obj->project_ref; + $projectstatic->title=$obj->project_label; + $paiement = $facturestatic->getSommePaiement(); $totalcreditnotes = $facturestatic->getSumCreditNotesUsed(); $totaldeposits = $facturestatic->getSumDepositsUsed(); @@ -1026,21 +1042,30 @@ if ($resql) if (! $i) $totalarray['nbfield']++; } - // Project + // Project ref if (! empty($arrayfields['p.ref']['checked'])) { - print ''; + print ''; if ($obj->project_id > 0) { - $projectstatic->id=$obj->project_id; - $projectstatic->ref=$obj->project_ref; - $projectstatic->title=$obj->project_label; print $projectstatic->getNomUrl(1); } print ''; if (! $i) $totalarray['nbfield']++; } + // Project title + if (! empty($arrayfields['p.title']['checked'])) + { + print ''; + if ($obj->project_id > 0) + { + print $projectstatic->title; + } + print ''; + if (! $i) $totalarray['nbfield']++; + } + // Third party if (! empty($arrayfields['s.nom']['checked'])) {