From e0c161e4c2ee6b5ce347b1f6da3345e06fe3e695 Mon Sep 17 00:00:00 2001 From: lamrani abdelwadoud Date: Fri, 1 Mar 2024 20:47:47 +0100 Subject: [PATCH] fix assigne variable (#28559) * fix assigne variable * Update paiement.php --------- Co-authored-by: Laurent Destailleur --- htdocs/fourn/facture/paiement.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/paiement.php b/htdocs/fourn/facture/paiement.php index cb36f12fe4f..4f1c81602a1 100644 --- a/htdocs/fourn/facture/paiement.php +++ b/htdocs/fourn/facture/paiement.php @@ -311,7 +311,13 @@ if (empty($reshook)) { // Creation of payment line $paiement = new PaiementFourn($db); $paiement->datepaye = $datepaye; - $paiement->amounts = $amounts; // Array of amounts + + $correctedAmounts = []; + foreach ($amounts as $key => $value) { + $correctedAmounts[$key] = (float) $value; + } + + $paiement->amounts = $correctedAmounts; // Array of amounts $paiement->multicurrency_amounts = $multicurrency_amounts; $paiement->multicurrency_code = $multicurrency_code; // Array with all currency of payments dispatching $paiement->multicurrency_tx = $multicurrency_tx; // Array with all currency tx of payments dispatching