Merge branch 'dev_EventOrganizer' of github.com:DorianVabre/dolibarr into dev_EventOrganizer_payment

This commit is contained in:
Dorian Vabre 2021-04-12 10:02:04 +02:00
commit 58abeb1e1e
2 changed files with 60 additions and 62 deletions

View File

@ -202,12 +202,11 @@ if (empty($reshook) && $action == 'add') {
$nomsociete = GETPOST("societe"); $nomsociete = GETPOST("societe");
$resultfetchthirdparty = $thirdparty->fetch('', $nomsociete); $resultfetchthirdparty = $thirdparty->fetch('', $nomsociete);
if($resultfetchthirdparty<0){ if ($resultfetchthirdparty<0) {
$error++; $error++;
$errmsg .= $thirdparty->error; $errmsg .= $thirdparty->error;
$readythirdparty = -1; $readythirdparty = -1;
} elseif ($resultfetchthirdparty==0) {
} elseif($resultfetchthirdparty==0){
// creation of a new thirdparty // creation of a new thirdparty
$thirdparty->name = $nomsociete; $thirdparty->name = $nomsociete;
$thirdparty->address = GETPOST("address"); $thirdparty->address = GETPOST("address");
@ -237,13 +236,12 @@ if (empty($reshook) && $action == 'add') {
} }
$thirdparty->code_client = $tmpcode; $thirdparty->code_client = $tmpcode;
$readythirdparty = $thirdparty->create($user); $readythirdparty = $thirdparty->create($user);
} else { } else {
// We have an existing thirdparty ready to use // We have an existing thirdparty ready to use
$readythirdparty = 1; $readythirdparty = 1;
} }
if ($readythirdparty < 0){ if ($readythirdparty < 0) {
$error++; $error++;
$errmsg .= $thirdparty->error; $errmsg .= $thirdparty->error;
} else { } else {
@ -254,7 +252,7 @@ if (empty($reshook) && $action == 'add') {
$confattendee->email = GETPOST("email"); $confattendee->email = GETPOST("email");
$confattendee->fk_actioncomm = $id; $confattendee->fk_actioncomm = $id;
$resultconfattendee = $confattendee->create($user); $resultconfattendee = $confattendee->create($user);
if ($resultconfattendee < 0){ if ($resultconfattendee < 0) {
$error++; $error++;
$errmsg .= $confattendee->error; $errmsg .= $confattendee->error;
} }
@ -293,7 +291,7 @@ $formcompany = new FormCompany($db);
$conference = new ConferenceOrBooth($db); $conference = new ConferenceOrBooth($db);
$resultconf = $conference->fetch($id); $resultconf = $conference->fetch($id);
if ($resultconf < 0){ if ($resultconf < 0) {
setEventMessages(null, $object->errors, "errors"); setEventMessages(null, $object->errors, "errors");
} }