WIP final
This commit is contained in:
parent
9cdb6ce31c
commit
a4d9e3b9d3
@ -1398,55 +1398,35 @@ if ($resql)
|
|||||||
if (!empty($arrayfields['bu.label']['checked']))
|
if (!empty($arrayfields['bu.label']['checked']))
|
||||||
{
|
{
|
||||||
print '<td class="tdoverflowmax150">';
|
print '<td class="tdoverflowmax150">';
|
||||||
if ($objp->url_id) //display company
|
|
||||||
{
|
$companylinked = 0;
|
||||||
if($objp->type_url == 'company') {
|
$userlinked = 0;
|
||||||
$companystatic->id = $objp->url_id;
|
|
||||||
$companystatic->name = $objp->nom;
|
|
||||||
$companystatic->name_alias = $objp->name_alias;
|
|
||||||
$companystatic->client = $objp->client;
|
|
||||||
$companystatic->email = $objp->email;
|
|
||||||
$companystatic->fournisseur = $objp->fournisseur;
|
|
||||||
$companystatic->code_client = $objp->code_client;
|
|
||||||
$companystatic->code_fournisseur = $objp->code_fournisseur;
|
|
||||||
$companystatic->code_compta = $objp->code_compta;
|
|
||||||
$companystatic->code_compta_fournisseur = $objp->code_compta_fournisseur;
|
|
||||||
print $companystatic->getNomUrl(1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
else //display user or nothing
|
|
||||||
{
|
|
||||||
//payment line type to define user display
|
//payment line type to define user display
|
||||||
foreach($links as $key=>$value){
|
foreach($links as $key=>$value){
|
||||||
if($links[$key]['type'] == 'payment_sc') $type_link = 'payment_sc';
|
if($links[$key]['type'] == 'payment_sc') $type_link = 'payment_sc';
|
||||||
if($links[$key]['type'] == 'payment_salary') $type_link = 'payment_salary';
|
if($links[$key]['type'] == 'payment_salary') $type_link = 'payment_salary';
|
||||||
|
|
||||||
|
if($links[$key]['type'] == 'company') {
|
||||||
|
$companylinked = $links[$key]['url_id'];
|
||||||
|
}
|
||||||
|
if($links[$key]['type'] == 'user') {
|
||||||
|
$userlinked = $links[$key]['url_id'];
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$sqlu = "SELECT url_id FROM ".MAIN_DB_PREFIX."bank_url WHERE fk_bank=".$objp->rowid." AND type='user'";
|
if($companylinked) {
|
||||||
$resqlu = $db->query($sqlu);
|
$companystatic->fetch($companylinked);
|
||||||
|
print $companystatic->getNomUrl(1);
|
||||||
if($resqlu) {
|
} elseif($userlinked &&
|
||||||
|
|
||||||
if($db->num_rows($resqlu) > 0 &&
|
|
||||||
(($type_link == 'payment_salary' && !empty($user->rights->salaries->read))
|
(($type_link == 'payment_salary' && !empty($user->rights->salaries->read))
|
||||||
|| ($type_link == 'payment_sc' && !empty($user->rights->tax->charges->lire)))){
|
|| ($type_link == 'payment_sc' && !empty($user->rights->tax->charges->lire)))){
|
||||||
|
$userstatic->fetch($userlinked);
|
||||||
$obj = $db->fetch_object($resqlu);
|
|
||||||
$userstatic->fetch($obj->url_id);
|
|
||||||
print $userstatic->getNomUrl(1);
|
print $userstatic->getNomUrl(1);
|
||||||
|
} else {
|
||||||
}
|
|
||||||
|
|
||||||
else {
|
|
||||||
print ' ';
|
print ' ';
|
||||||
}
|
}
|
||||||
|
|
||||||
} else
|
|
||||||
{
|
|
||||||
dol_print_error($db);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
print '</td>';
|
print '</td>';
|
||||||
if (!$i) $totalarray['nbfield']++;
|
if (!$i) $totalarray['nbfield']++;
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user