diff --git a/htdocs/eventorganization/class/conferenceorboothattendee.class.php b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
index b640c57b929..8203fee19f1 100644
--- a/htdocs/eventorganization/class/conferenceorboothattendee.class.php
+++ b/htdocs/eventorganization/class/conferenceorboothattendee.class.php
@@ -418,15 +418,15 @@ class ConferenceOrBoothAttendee extends CommonObject
if (count($filter) > 0) {
foreach ($filter as $key => $value) {
if ($key == 't.rowid' || $key == 't.fk_soc' || $key == 't.fk_project' || $key == 't.fk_actioncomm') {
- $sqlwhere[] = $key.'='.$value;
+ $sqlwhere[] = $key.'='.((int) $value);
} elseif (in_array($this->fields[$key]['type'], array('date', 'datetime', 'timestamp'))) {
- $sqlwhere[] = $key.' = \''.$this->db->idate($value).'\'';
+ $sqlwhere[] = $key." = '".$this->db->idate($value)."'";
} elseif ($key == 'customsql') {
$sqlwhere[] = $value;
} elseif (strpos($value, '%') === false) {
$sqlwhere[] = $key.' IN ('.$this->db->sanitize($this->db->escape($value)).')';
} else {
- $sqlwhere[] = $key.' LIKE \'%'.$this->db->escape($value).'%\'';
+ $sqlwhere[] = $key." LIKE '%".$this->db->escape($value)."%'";
}
}
}
diff --git a/htdocs/eventorganization/conferenceorboothattendee_list.php b/htdocs/eventorganization/conferenceorboothattendee_list.php
index 39cd3e0aded..627a89a8170 100644
--- a/htdocs/eventorganization/conferenceorboothattendee_list.php
+++ b/htdocs/eventorganization/conferenceorboothattendee_list.php
@@ -513,7 +513,7 @@ if ($projectstatic->id > 0 || $confOrBooth > 0) {
print "";
}
- print '
| ';
$typeofdata = 'checkbox:'.($projectstatic->accept_conference_suggestions ? ' checked="checked"' : '');
$htmltext = $langs->trans("AllowUnknownPeopleSuggestConfHelp");
print $form->editfieldkey('AllowUnknownPeopleSuggestConf', 'accept_conference_suggestions', '', $projectstatic, 0, $typeofdata, '', 0, 0, 'projectid', $htmltext);
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 7dd52818798..faa2013ceb5 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -142,17 +142,10 @@ VoteOk = Your vote has been accepted.
AlreadyVoted = You have already voted for this event.
VoteError = An error has occurred during the vote, please try again.
-#
-# SubscriptionOk page
-#
-SubscriptionOk = Your subscription has been validated
-#
-# Subscription validation mail
-#
+SubscriptionOk = Your registration has been validated
ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to an event
-#
-# Payment page
-#
Attendee = Attendee
PaymentConferenceAttendee = Conference attendee payment
PaymentBoothLocation = Booth location payment
+
+RegistrationAndPaymentWereAlreadyRecorder=A registration and a payment were already recorded for the email %s
diff --git a/htdocs/public/eventorganization/attendee_registration.php b/htdocs/public/eventorganization/attendee_registration.php
index 385152e420a..fdfd9a3f2e3 100644
--- a/htdocs/public/eventorganization/attendee_registration.php
+++ b/htdocs/public/eventorganization/attendee_registration.php
@@ -279,10 +279,16 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
// At this point, we have an existing $confattendee. It may not be linked to a thirdparty.
//var_dump($confattendee);
- // If the attendee has already been paid
- if (!empty($confattendee->date_subscription)) {
- $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2);
+ // If the registration has already been paid for this attendee
+ if (!empty($confattendee->date_subscription) && !empty($confattendee->amount)) {
+ $securekeyurl = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'master');
$redirection = $dolibarr_main_url_root.'/public/eventorganization/subscriptionok.php?id='.((int) $id).'&securekey='.urlencode($securekeyurl);
+
+ $mesg = $langs->trans("RegistrationAndPaymentWereAlreadyRecorder", $email);
+ setEventMessages($mesg, null, 'mesgs');
+
+ $db->commit();
+
Header("Location: ".$redirection);
exit;
}
@@ -359,6 +365,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
$thirdparty->country_code = getCountry($thirdparty->country_id, 2, $db, $langs);
$thirdparty->country = getCountry($thirdparty->country_code, 0, $db, $langs);
+ // Update attendee country to match country of thirdparty
$confattendee->fk_soc = $thirdparty->id;
$confattendee->update($user);
}
@@ -370,6 +377,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
$outputlangs = $langs;
// TODO Use default language of $thirdparty->default_lang to build $outputlang
+ // Get product to use for invoice
$productforinvoicerow = new Product($db);
$productforinvoicerow->id = 0;
@@ -378,6 +386,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
$resultprod = $productforinvoicerow->fetch($conf->global->SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION);
}
+ // Create invoice
if ($resultprod < 0) {
$error++;
$errmsg .= $productforinvoicerow->error;
@@ -442,6 +451,7 @@ if (empty($reshook) && $action == 'add' && (!empty($conference->id) && $conferen
$redirection .= '&securekey='.urlencode($conf->global->PAYMENT_SECURITY_TOKEN);
}
}
+
Header("Location: ".$redirection);
exit;
} else {
|