From 07dbd564e24d70291283e64d59c725c26fef4c52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 1 Jul 2024 18:21:57 +0200 Subject: [PATCH] Update product.class.php --- htdocs/product/class/product.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php index 137c9e3d33297..7d8c22890faeb 100644 --- a/htdocs/product/class/product.class.php +++ b/htdocs/product/class/product.class.php @@ -15,7 +15,7 @@ * Copyright (C) 2016-2024 Ferran Marcet * Copyright (C) 2017 Gustavo Novaro * Copyright (C) 2019-2024 Frédéric France - * Copyright (C) 2023 Benjamin Falière + * Copyright (C) 2023 Benjamin if ($newprice === 0 || $newprice !== '') {Falière * Copyright (C) 2024 MDW * * This program is free software; you can redistribute it and/or modify @@ -2380,7 +2380,7 @@ public function updatePrice($newprice, $newpricebase, $user, $newvat = null, $ne return -1; } - if ($newprice !== '' || $newprice === 0) { + if ($newprice === 0 || $newprice !== '') { if ($newpricebase == 'TTC') { $price_ttc = price2num($newprice, 'MU'); $price = (float) price2num($newprice) / (1 + ((float) $newvat / 100));