Skip to content

Commit

Permalink
FIX avoid pgsql error (#30678)
Browse files Browse the repository at this point in the history
  • Loading branch information
hregis authored Aug 20, 2024
1 parent 0479319 commit 5590cc1
Showing 1 changed file with 9 additions and 8 deletions.
17 changes: 9 additions & 8 deletions htdocs/accountancy/journal/sellsjournal.php
Original file line number Diff line number Diff line change
Expand Up @@ -396,15 +396,16 @@
GROUP BY fk_facture
";
$resql = $db->query($sql);

$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->nb > 0) {
$errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound';
if ($resql) {
$num = $db->num_rows($resql);
$i = 0;
while ($i < $num) {
$obj = $db->fetch_object($resql);
if ($obj->nb > 0) {
$errorforinvoice[$obj->fk_facture_fourn] = 'somelinesarenotbound';
}
$i++;
}
$i++;
}
//var_dump($errorforinvoice);exit;

Expand Down

0 comments on commit 5590cc1

Please sign in to comment.