Skip to content

Commit

Permalink
Merge branch 'develop' into avoid_double_links
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Nov 18, 2024
2 parents 53f7fe5 + 7fc47c1 commit 54e294a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions htdocs/product/class/product.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2616,7 +2616,7 @@ public function get_buyprice($prodfournprice, $qty, $product_id = 0, $fourn_ref
/**
* Modify customer price of a product/Service for a given level
*
* @param double|string $newprice New price
* @param double $newprice New price
* @param string $newpricebase HT or TTC
* @param User $user Object user that make change
* @param ?float $newvat New VAT Rate (For example 8.5. Should not be a string)
Expand Down Expand Up @@ -2675,7 +2675,7 @@ public function updatePrice($newprice, $newpricebase, $user, $newvat = null, $ne
$price = (float) price2num($newprice) / (1 + ((float) $newvat / 100));
$price = (float) price2num($price, 'MU');

if ($newminprice == 0) {
if ((string) $newminprice != '0') {
$price_min_ttc = (float) price2num($newminprice, 'MU');
$price_min = (float) price2num($newminprice) / (1 + ($newvat / 100));
$price_min = (float) price2num($price_min, 'MU');
Expand All @@ -2688,7 +2688,7 @@ public function updatePrice($newprice, $newpricebase, $user, $newvat = null, $ne
$price_ttc = ($newnpr != 1) ? (float) price2num($newprice) * (1 + ($newvat / 100)) : $price;
$price_ttc = (float) price2num($price_ttc, 'MU');

if ($newminprice == 0) {
if ((string) $newminprice != '0') {
$price_min = (float) price2num($newminprice, 'MU');
$price_min_ttc = (float) price2num($newminprice) * (1 + ($newvat / 100));
$price_min_ttc = (float) price2num($price_min_ttc, 'MU');
Expand Down

0 comments on commit 54e294a

Please sign in to comment.