diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php
index 3d1ee6272cc..a18912da4ef 100644
--- a/htdocs/public/eventorganization/attendee_subscription.php
+++ b/htdocs/public/eventorganization/attendee_subscription.php
@@ -81,6 +81,9 @@ $email = GETPOST("email");
$encodedid = GETPOST('id');
$id = dol_decode($encodedid, $dolibarr_main_instance_unique_id);
+$project = new Project($db);
+
+
// Getting 'securekey'.'id' from Post and decoding it
$encodedsecurekeyandid = GETPOST('securekey', 'alpha');
$securekeyandid = dol_decode($encodedsecurekeyandid, $dolibarr_main_instance_unique_id);
@@ -193,10 +196,11 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n";
}
- /*if (!GETPOST("societe")) {
+ // If the price has been set, name is required for the invoice
+ if (!GETPOST("societe") && !empty(floatval($project->price_registration))) {
$error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n";
- }*/
+ }
if (GETPOST("email") && !isValidEmail(GETPOST("email"))) {
$error++;
$langs->load("errors");
@@ -350,7 +354,11 @@ print '
| '.$langs->trans("Email").' * | |
| '.$langs->trans("Company").' | |
| '.$langs->trans("Company"); +if(!empty(floatval($project->price_registration))){ + print '*'; +} +print ' | |
| '.$langs->trans("Address").' | '."\n"; print ' |