Fix var no defined

This commit is contained in:
Laurent Destailleur
2023-04-05 15:59:40 +02:00
parent bb2bb638e6
commit 0df02e3141

View File

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