NEW: add customer code to invoices listing
This commit is contained in:
parent
5c0ace0c89
commit
e12d10158c
@ -200,6 +200,7 @@ $fieldstosearchall = array(
|
||||
'f.ref_client'=>'RefCustomer',
|
||||
'f.note_public'=>'NotePublic',
|
||||
's.nom'=>"ThirdParty",
|
||||
's.code_client'=>"CustomerCodeShort",
|
||||
's.name_alias'=>"AliasNameShort",
|
||||
's.zip'=>"Zip",
|
||||
's.town'=>"Town",
|
||||
@ -222,6 +223,7 @@ $arrayfields = array(
|
||||
'p.title'=>array('label'=>"ProjectLabel", 'checked'=>0, 'enabled'=>(!isModEnabled('project') ? 0 : 1), 'position'=>41),
|
||||
's.nom'=>array('label'=>"ThirdParty", 'checked'=>1, 'position'=>50),
|
||||
's.name_alias'=>array('label'=>"AliasNameShort", 'checked'=>1, 'position'=>51),
|
||||
's.code_client'=>array('label'=>"CustomerCodeShort", 'checked'=>1, 'position'=>52),
|
||||
's2.nom'=>array('label'=>'ParentCompany', 'position'=>32, 'checked'=>0),
|
||||
's.town'=>array('label'=>"Town", 'checked'=>-1, 'position'=>55),
|
||||
's.zip'=>array('label'=>"Zip", 'checked'=>1, 'position'=>60),
|
||||
@ -574,7 +576,7 @@ $sql .= ' f.datef, f.date_valid, f.date_lim_reglement as datelimite, f.module_so
|
||||
$sql .= ' f.paye as paye, f.fk_statut, f.close_code,';
|
||||
$sql .= ' f.datec as date_creation, f.tms as date_update, f.date_closing as date_closing,';
|
||||
$sql .= ' f.retained_warranty, f.retained_warranty_date_limit, f.situation_final, f.situation_cycle_ref, f.situation_counter,';
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
|
||||
$sql .= ' s.rowid as socid, s.nom as name, s.name_alias as alias, s.code_client as code_client, s.email, s.phone, s.fax, s.address, s.town, s.zip, s.fk_pays, s.client, s.fournisseur, s.code_client, s.code_fournisseur, s.code_compta as code_compta_client, s.code_compta_fournisseur,';
|
||||
$sql .= " s.parent as fk_parent,";
|
||||
$sql .= " s2.nom as name2,";
|
||||
$sql .= ' typent.code as typent_code,';
|
||||
@ -687,6 +689,9 @@ if (empty($arrayfields['s.name_alias']['checked']) && $search_company) {
|
||||
if ($search_parent_name) {
|
||||
$sql .= natural_search('s2.nom', $search_parent_name);
|
||||
}
|
||||
if ($search_company_code_client) {
|
||||
$sql .= natural_search('s.code_client', $search_company_code_client);
|
||||
}
|
||||
if ($search_town) {
|
||||
$sql .= natural_search('s.town', $search_town);
|
||||
}
|
||||
@ -1402,6 +1407,10 @@ if ($resql) {
|
||||
print '<input class="flat maxwidth100" type="text" name="search_parent_name" value="'.dol_escape_htmltag($search_parent_name).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Customer Code
|
||||
if (!empty($arrayfields['s.code_client']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_company_code_client" value="'.$search_company_code_client.'"></td>';
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
|
||||
@ -1654,6 +1663,9 @@ if ($resql) {
|
||||
if (!empty($arrayfields['s2.nom']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s2.nom']['label'], $_SERVER['PHP_SELF'], 's2.nom', '', $param, '', $sortfield, $sortorder);
|
||||
}
|
||||
if (!empty($arrayfields['s.code_client']['checked'])) {
|
||||
print_liste_field_titre($arrayfields['s.code_client']['label'], $_SERVER['PHP_SELF'], 's.code_client', '', $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);
|
||||
}
|
||||
@ -1850,6 +1862,7 @@ if ($resql) {
|
||||
$companystatic->id = $obj->socid;
|
||||
$companystatic->name = $obj->name;
|
||||
$companystatic->name_alias = $obj->alias;
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
$companystatic->client = $obj->client;
|
||||
$companystatic->fournisseur = $obj->fournisseur;
|
||||
$companystatic->code_client = $obj->code_client;
|
||||
@ -2095,7 +2108,16 @@ if ($resql) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Town
|
||||
// Customer Code
|
||||
if (!empty($arrayfields['s.code_client']['checked'])) {
|
||||
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($companystatic->code_client).'">';
|
||||
print dol_escape_htmltag($companystatic->code_client);
|
||||
print '</td>';
|
||||
if (!$i) {
|
||||
$totalarray['nbfield']++;
|
||||
}
|
||||
}
|
||||
// Town
|
||||
if (!empty($arrayfields['s.town']['checked'])) {
|
||||
print '<td class="tdoverflowmax100" title="'.dol_escape_htmltag($obj->town).'">';
|
||||
print dol_escape_htmltag($obj->town);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user