Skip to content

Commit

Permalink
check precommit et phan
Browse files Browse the repository at this point in the history
  • Loading branch information
atm-jonathan committed Sep 6, 2024
1 parent 58fb46c commit 11a2372
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
6 changes: 3 additions & 3 deletions htdocs/comm/propal/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -990,11 +990,11 @@
foreach ($object->lines as &$line) {
$subprice_multicurrency = $line->subprice;
if (is_numeric($margin_rate) && $margin_rate > 0) {
$line->subprice = price2num($line->pa_ht * (1 + floatval($margin_rate) / 100), 'MU');
$line->subprice = floatval(price2num(floatval($line->pa_ht) * (1 + floatval($margin_rate) / 100), 'MU'));
} elseif (is_numeric($mark_rate) && $mark_rate > 0) {
$line->subprice = $line->pa_ht / (1 - (floatval($mark_rate) / 100));
$line->subprice = floatval($line->pa_ht / (1 - (floatval($mark_rate) / 100)));
} else {
$line->subprice = $line->pa_ht;
$line->subprice = floatval($line->pa_ht);
}
$prod = new Product($db);
$res = $prod->fetch($line->fk_product);
Expand Down
6 changes: 3 additions & 3 deletions htdocs/commande/card.php
Original file line number Diff line number Diff line change
Expand Up @@ -699,11 +699,11 @@
foreach ($object->lines as &$line) {
$subprice_multicurrency = $line->subprice;
if (is_numeric($margin_rate) && $margin_rate > 0) {
$line->subprice = price2num($line->pa_ht * (1 + floatval($margin_rate) / 100), 'MU');
$line->subprice = floatval(price2num(floatval($line->pa_ht) * (1 + floatval($margin_rate) / 100), 'MU'));
} elseif (is_numeric($mark_rate) && $mark_rate > 0) {
$line->subprice = $line->pa_ht / (1 - (floatval($mark_rate) / 100));
$line->subprice = floatval($line->pa_ht / (1 - (floatval($mark_rate) / 100)));
} else {
$line->subprice = $line->pa_ht;
$line->subprice = floatval($line->pa_ht);
}

$prod = new Product($db);
Expand Down

0 comments on commit 11a2372

Please sign in to comment.