an already subscribed attendee will not be redirected to a payment page, now

This commit is contained in:
Dorian Vabre 2021-04-22 14:53:32 +02:00
parent e6318eb4f4
commit 467595ce60
2 changed files with 7 additions and 3 deletions

View File

@ -72,6 +72,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/facture/class/paymentterm.class.php';
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
global $dolibarr_main_instance_unique_id;
global $dolibarr_main_url_root;
// Init vars
$errmsg = '';
@ -246,7 +247,11 @@ if (empty($reshook) && $action == 'add') {
$errmsg .= $confattendee->error;
}
}
if($confattendee->status == 1) {
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?securekey='.dol_encode($conf->global->EVENTORGANIZATION_SECUREKEY, $dolibarr_main_instance_unique_id);
Header("Location: ".$redirection);
exit;
}
// Getting the thirdparty or creating it
$thirdparty = new Societe($db);
// Fetch using fk_soc of the existing attendee
@ -320,7 +325,6 @@ if (empty($reshook) && $action == 'add') {
if (!$error) {
$db->commit();
global $dolibarr_main_url_root;
if (!empty(floatval($project->price_registration))) {
$productforinvoicerow = new Product($db);
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);

View File

@ -944,7 +944,7 @@ if ($ispaymentok) {
$ispostactionok = -1;
}
} elseif (array_key_exists('BOO', $tmptag) && $tmptag['BOO'] > 0) {
// BOOTH CASE (to copy and adapt from above)
// @todo BOOTH CASE (to copy and adapt from above)
} else {
// Nothing done
}