From 11ef094c2f2a061b8dce54dd3c38ed3ded6ca620 Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 15:25:51 +0100 Subject: [PATCH] Fix arg type to abs() with cast --- htdocs/compta/localtax/class/localtax.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/compta/localtax/class/localtax.class.php b/htdocs/compta/localtax/class/localtax.class.php index 579890f9b38..e49c317a53e 100644 --- a/htdocs/compta/localtax/class/localtax.class.php +++ b/htdocs/compta/localtax/class/localtax.class.php @@ -1,6 +1,7 @@ * Copyright (C) 2024 Frédéric France + * Copyright (C) 2024 MDW * * 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 @@ -534,7 +535,7 @@ class Localtax extends CommonObject dol_print_error($this->db); } - $bank_line_id = $acc->addline($this->datep, $this->paymenttype, $this->label, -abs($this->amount), '', '', $user); + $bank_line_id = $acc->addline($this->datep, $this->paymenttype, $this->label, -abs((float) $this->amount), '', '', $user); // Update fk_bank into llx_localtax so we know the line of localtax used to generate the bank entry. if ($bank_line_id > 0) {