From f5a58e769372fe2be2cf2074ffd3aade4228b273 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Fri, 15 Dec 2023 14:20:54 +0100 Subject: [PATCH] Fix warnings --- htdocs/compta/facture/class/api_invoices.class.php | 2 +- htdocs/compta/tva/card.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/facture/class/api_invoices.class.php b/htdocs/compta/facture/class/api_invoices.class.php index 09a382a8520..94de562a3c2 100644 --- a/htdocs/compta/facture/class/api_invoices.class.php +++ b/htdocs/compta/facture/class/api_invoices.class.php @@ -1580,7 +1580,7 @@ class Invoices extends DolibarrApi } if ($this->invoice->type == Facture::TYPE_CREDIT_NOTE) { - $amount = -$amount; + $amount = price2num(-1 * $amount, 'MT'); } if ($is_multicurrency) { diff --git a/htdocs/compta/tva/card.php b/htdocs/compta/tva/card.php index a7b1e10312a..0b89a923153 100644 --- a/htdocs/compta/tva/card.php +++ b/htdocs/compta/tva/card.php @@ -181,7 +181,7 @@ if (empty($reshook)) { $amount = price2num(GETPOST("amount", 'alpha')); if ($refund == 1) { - $amount = -$amount; + $amount = price2num(-1 * $amount); } $object->amount = $amount; $object->label = GETPOST("label", 'alpha');