an already subscribed attendee will not be redirected to a payment page, now
This commit is contained in:
parent
e6318eb4f4
commit
467595ce60
@ -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';
|
require_once DOL_DOCUMENT_ROOT.'/core/class/html.formcompany.class.php';
|
||||||
|
|
||||||
global $dolibarr_main_instance_unique_id;
|
global $dolibarr_main_instance_unique_id;
|
||||||
|
global $dolibarr_main_url_root;
|
||||||
|
|
||||||
// Init vars
|
// Init vars
|
||||||
$errmsg = '';
|
$errmsg = '';
|
||||||
@ -246,7 +247,11 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
$errmsg .= $confattendee->error;
|
$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
|
// Getting the thirdparty or creating it
|
||||||
$thirdparty = new Societe($db);
|
$thirdparty = new Societe($db);
|
||||||
// Fetch using fk_soc of the existing attendee
|
// Fetch using fk_soc of the existing attendee
|
||||||
@ -320,7 +325,6 @@ if (empty($reshook) && $action == 'add') {
|
|||||||
|
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$db->commit();
|
$db->commit();
|
||||||
global $dolibarr_main_url_root;
|
|
||||||
if (!empty(floatval($project->price_registration))) {
|
if (!empty(floatval($project->price_registration))) {
|
||||||
$productforinvoicerow = new Product($db);
|
$productforinvoicerow = new Product($db);
|
||||||
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
|
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
|
||||||
|
|||||||
@ -944,7 +944,7 @@ if ($ispaymentok) {
|
|||||||
$ispostactionok = -1;
|
$ispostactionok = -1;
|
||||||
}
|
}
|
||||||
} elseif (array_key_exists('BOO', $tmptag) && $tmptag['BOO'] > 0) {
|
} 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 {
|
} else {
|
||||||
// Nothing done
|
// Nothing done
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user