Skip to content

Commit

Permalink
Revert "FIX: calculation of $products_dispatched"
Browse files Browse the repository at this point in the history
This reverts commit 75ae611.
  • Loading branch information
atm-florianm committed Jul 18, 2019
1 parent 770b419 commit e404069
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions htdocs/fourn/commande/dispatch.php
Expand Up @@ -482,7 +482,7 @@
if ($num) {
while ( $i < $num ) {
$objd = $db->fetch_object($resql);
$products_dispatched[$objd->fk_product] = price2num($objd->qty, 5);
$products_dispatched[$objd->rowid] = price2num($objd->qty, 5);
$i++;
}
}
Expand Down Expand Up @@ -540,7 +540,7 @@
if (! $objp->fk_product > 0) {
$nbfreeproduct++;
} else {
$remaintodispatch = price2num($objp->qty - (( float ) $products_dispatched[$objp->fk_product]), 5); // Calculation of dispatched
$remaintodispatch = price2num($objp->qty - (( float ) $products_dispatched[$objp->rowid]), 5); // Calculation of dispatched
if ($remaintodispatch < 0)
$remaintodispatch = 0;

Expand Down

0 comments on commit e404069

Please sign in to comment.