From aae30ff64f2ac02485754c7a5d85ccb58a15546f Mon Sep 17 00:00:00 2001 From: MDW Date: Tue, 19 Mar 2024 21:48:09 +0100 Subject: [PATCH] Fix arg type to SimpleXMLElement::addChild() with casts --- htdocs/intracommreport/class/intracommreport.class.php | 6 +++--- htdocs/stripe/class/stripe.class.php | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/intracommreport/class/intracommreport.class.php b/htdocs/intracommreport/class/intracommreport.class.php index 710bfacdb6d..1975994353e 100644 --- a/htdocs/intracommreport/class/intracommreport.class.php +++ b/htdocs/intracommreport/class/intracommreport.class.php @@ -368,9 +368,9 @@ class IntracommReport extends CommonObject $cn8->addChild('CN8Code', $code_douane); $item->addChild('MSConsDestCode', $res->code); // code iso pays client $item->addChild('countryOfOriginCode', substr($res->zip, 0, 2)); // code iso pays d'origine - $item->addChild('netMass', round($res->weight * $res->qty)); // Poids du produit - $item->addChild('quantityInSU', $res->qty); // Quantité de produit dans la ligne - $item->addChild('invoicedAmount', round($res->total_ht)); // Montant total ht de la facture (entier attendu) + $item->addChild('netMass', (string) round($res->weight * $res->qty)); // Poids du produit + $item->addChild('quantityInSU', (string) $res->qty); // Quantité de produit dans la ligne + $item->addChild('invoicedAmount', (string) round($res->total_ht)); // Montant total ht de la facture (entier attendu) // $item->addChild('invoicedNumber', $res->refinvoice); // Numéro facture if (!empty($res->tva_intra)) { $item->addChild('partnerId', $res->tva_intra); diff --git a/htdocs/stripe/class/stripe.class.php b/htdocs/stripe/class/stripe.class.php index e6881132167..f483787068d 100644 --- a/htdocs/stripe/class/stripe.class.php +++ b/htdocs/stripe/class/stripe.class.php @@ -165,13 +165,13 @@ class Stripe extends CommonObject * Get the Stripe customer of a thirdparty (with option to create it in Stripe if not linked yet). * Search on site_account = 0 or = $stripearrayofkeysbyenv[$status]['publishable_key'] * - * @param Societe $object Object thirdparty to check, or create on stripe (create on stripe also update the stripe_account table for current entity) + * @param CommonObject $object Object thirdparty to check, or create on stripe (create on stripe also update the stripe_account table for current entity). Used for AdherentType and Societe. * @param string $key ''=Use common API. If not '', it is the Stripe connect account 'acc_....' to use Stripe connect * @param int $status Status (0=test, 1=live) * @param int $createifnotlinkedtostripe 1=Create the stripe customer and the link if the thirdparty is not yet linked to a stripe customer * @return \Stripe\Customer|null Stripe Customer or null if not found */ - public function customerStripe(Societe $object, $key = '', $status = 0, $createifnotlinkedtostripe = 0) + public function customerStripe(CommonObject $object, $key = '', $status = 0, $createifnotlinkedtostripe = 0) { global $conf, $user;