Fix arg type to preg_replace() with cast
This commit is contained in:
parent
e515cc864d
commit
4c3faabf3c
1 changed files with 2 additions and 1 deletions
|
|
@ -10,6 +10,7 @@
|
|||
* Copyright (C) 2016 Meziane Sof <virtualsof@yahoo.fr>
|
||||
* Copyright (C) 2017-2018 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2023 Nick Fragoulis
|
||||
* Copyright (C) 2024 MDW <mdeweerd@users.noreply.github.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
|
|
@ -542,7 +543,7 @@ if (empty($reshook)) {
|
|||
//$tva_npr = $datapriceofproduct['tva_npr'];
|
||||
|
||||
$tmpvat = (float) price2num(preg_replace('/\s*\(.*\)/', '', $tva_tx));
|
||||
$tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', $prod->tva_tx));
|
||||
$tmpprodvat = price2num(preg_replace('/\s*\(.*\)/', '', (string) $prod->tva_tx));
|
||||
|
||||
// if price ht was forced (ie: from gui when calculated by margin rate and cost price). TODO Why this ?
|
||||
if (!empty($price_ht)) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue