fix assigne variable (#28559)

* fix assigne variable

* Update paiement.php

---------

Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
lamrani abdelwadoud 2024-03-01 20:47:47 +01:00 committed by GitHub
parent e39070af37
commit e0c161e4c2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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