diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 942473a362b..f592b20ceea 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -7944,6 +7944,8 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, // Set the online payment url link into __ONLINE_PAYMENT_URL__ key require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php'; $outputlangs->loadLangs(array('paypal', 'other')); + + $amounttouse = 0; $typeforonlinepayment = 'free'; if (is_object($object) && $object->element == 'commande') { $typeforonlinepayment = 'order'; @@ -7953,7 +7955,6 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null, } if (is_object($object) && $object->element == 'member') { $typeforonlinepayment = 'member'; - $amounttouse = 0; if (!empty($object->last_subscription_amount)) { $amounttouse = $object->last_subscription_amount; }