Skip to content

Commit

Permalink
Debug v20
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy committed Jul 2, 2024
1 parent d648059 commit 12f53a8
Showing 1 changed file with 14 additions and 6 deletions.
20 changes: 14 additions & 6 deletions htdocs/compta/prelevement/factures.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,16 +323,18 @@
$invoicetmpsupplier = new FactureFournisseur($db);
}

while ($i < min($num, $limit)) {
$imaxinloop = ($limit ? min($num, $limit) : $num);
while ($i < $imaxinloop) {
$obj = $db->fetch_object($resql);

$itemurl = '';
$partyurl = '';
if ($salaryBonPl && ($salarytmp instanceof Salary) && ($user instanceof User)) {
if ($salaryBonPl && ($salarytmp instanceof Salary) && ($usertmp instanceof User)) {
$salarytmp->fetch($obj->salaryid);
$usertmp->fetch($obj->userid);
$itemurl = $salarytmp->getNomUrl(1);
$partyurl = $usertmp->getNomUrl(1);
} elseif ($invoicetmp instanceof Facture && $invoicetmpsupplier instanceof FactureFournisseur) {
} elseif ($invoicetmpcustomer instanceof Facture && $invoicetmpsupplier instanceof FactureFournisseur) {
if ($obj->type == 'bank-transfer') {
$invoicetmp = $invoicetmpsupplier;
} else {
Expand All @@ -351,9 +353,15 @@
print $itemurl;
print "</td>\n";

if ($object->type == 'bank-transfer' && !$salaryBonPl && $invoicetmp instanceof Facture) {
print '<td class="tdoverflowmax150" title="'.dol_escape_htmltag($invoicetmp->ref_supplier).'">';
print dol_escape_htmltag($invoicetmp->ref_supplier);
if ($object->type == 'bank-transfer' && !$salaryBonPl) {
$labeltoshow = '';
if ($invoicetmp instanceof Facture) {
$labeltoshow = $invoicetmp->ref_supplier;
}
print '<td class="tdoverflowmax150" title="'.dolPrintHTMLForAttribute($labeltoshow).'">';
if ($invoicetmp instanceof Facture) {
print dol_escape_htmltag($invoicetmp->ref_supplier);
}
print "</td>\n";
}

Expand Down

0 comments on commit 12f53a8

Please sign in to comment.