From d0508d557b92468b694f89fa1dec88bda9c8f9b6 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 30 Sep 2021 14:56:02 +0200 Subject: [PATCH 01/14] fix: checkbox for line selection between supplier order and supplier invoice was infective --- htdocs/fourn/facture/card.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index c063e636a91..690c232cb64 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -668,6 +668,7 @@ if (empty($reshook)) elseif ($action == 'add' && $usercancreate) { if ($socid > 0) $object->socid = GETPOST('socid', 'int'); + $selectedLines = GETPOST('toselect', 'array'); $db->begin(); @@ -980,6 +981,8 @@ if (empty($reshook)) $num = count($lines); for ($i = 0; $i < $num; $i++) // TODO handle subprice < 0 { + if (!in_array($lines[$i]->id, $selectedLines)) continue; // Skip unselected lines + $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); @@ -2239,9 +2242,6 @@ if ($action == 'create') print ''; print ''; - print "\n"; - - // Show origin lines if (is_object($objectsrc)) { @@ -2256,6 +2256,8 @@ if ($action == 'create') print ''; } + + print "\n"; } else { From 6d00097c896ac40360dd0186949184f2ea8ed095 Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 30 Sep 2021 16:37:52 +0200 Subject: [PATCH 02/14] fix --- htdocs/fourn/facture/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 690c232cb64..778c1db1aaf 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2252,7 +2252,7 @@ if ($action == 'create') print ''; - $objectsrc->printOriginLinesList(); + $objectsrc->printOriginLinesList('', $selectedLines); print '
'; } From 157112758b297ace525aa1d056efd23797dd47ae Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 30 Sep 2021 20:14:59 +0200 Subject: [PATCH 03/14] Fix phpcs --- htdocs/comm/action/class/actioncomm.class.php | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/htdocs/comm/action/class/actioncomm.class.php b/htdocs/comm/action/class/actioncomm.class.php index ff30f16b8dd..e5b8ff0f49c 100644 --- a/htdocs/comm/action/class/actioncomm.class.php +++ b/htdocs/comm/action/class/actioncomm.class.php @@ -788,9 +788,7 @@ class ActionComm extends CommonObject } $this->db->free($resql); - } - else - { + } else { $this->error = $this->db->lasterror(); return -1; } From 1c56f65c27c293ab9551cc23d63f8550adce97c3 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 4 Oct 2021 11:49:49 +0200 Subject: [PATCH 04/14] Fix missing migration instruction --- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index cb466f94b10..cf4b5747684 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -37,6 +37,7 @@ ALTER TABLE llx_prelevement_bons ADD COLUMN type varchar(16) DEFAULT 'debit-orde ALTER TABLE llx_prelevement_facture CHANGE COLUMN fk_facture_foun fk_facture_fourn integer NULL; +ALTER TABLE llx_prelevement_facture_demande ADD COLUMN fk_facture_fourn INTEGER NULL; ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture (fk_facture); ALTER TABLE llx_prelevement_facture_demande ADD INDEX idx_prelevement_facture_demande_fk_facture_fourn (fk_facture_fourn); From 10f0434116ee3898a8e6b41cdb8f8f4c0958ae37 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 15:30:19 +0200 Subject: [PATCH 05/14] Update card.php --- htdocs/fourn/facture/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 778c1db1aaf..e4aeae07581 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -981,8 +981,10 @@ if (empty($reshook)) $num = count($lines); for ($i = 0; $i < $num; $i++) // TODO handle subprice < 0 { - if (!in_array($lines[$i]->id, $selectedLines)) continue; // Skip unselected lines - + if (!in_array($lines[$i]->id, $selectedLines)) { + continue; // Skip unselected lines + } + $desc = ($lines[$i]->desc ? $lines[$i]->desc : $lines[$i]->libelle); $product_type = ($lines[$i]->product_type ? $lines[$i]->product_type : 0); From f95b0c3033f0e7fd9e1b3383baea365d52b3d7c5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 21:43:30 +0200 Subject: [PATCH 06/14] Debug --- htdocs/public/project/index.php | 17 ++++------------- htdocs/public/project/suggestbooth.php | 4 ++-- htdocs/public/project/suggestconference.php | 4 ++-- 3 files changed, 8 insertions(+), 17 deletions(-) diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php index 5620e44a3f2..7beae2ee971 100644 --- a/htdocs/public/project/index.php +++ b/htdocs/public/project/index.php @@ -13,21 +13,12 @@ * * You should have received a copy of the GNU General Public License * along with this program. If not, see . - * - * For Paypal test: https://developer.paypal.com/ - * For Paybox test: ??? - * For Stripe test: Use credit card 4242424242424242 .More example on https://stripe.com/docs/testing - * - * Variants: - * - When option STRIPE_USE_INTENT_WITH_AUTOMATIC_CONFIRMATION is on, we use the new PaymentIntent API - * - When option STRIPE_USE_NEW_CHECKOUT is on, we use the new checkout API - * - If no option set, we use old APIS (charge) */ /** - * \file htdocs/public/payment/newpayment.php + * \file htdocs/public/project/index.php * \ingroup core - * \brief File to offer a way to make a payment for a particular Dolibarr object + * \brief File to offer a way to suggest a conference or a booth for an event */ if (!defined('NOLOGIN')) { @@ -74,8 +65,8 @@ $langs->loadLangs(array("other", "dict", "bills", "companies", "errors", "paybox $action = GETPOST('action', 'aZ09'); $id = GETPOST('id'); -$securekeyreceived = GETPOST("securekey"); -$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); +$securekeyreceived = GETPOST("securekey", 'alpha'); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { print $langs->trans('MissingOrBadSecureKey'); diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index c695ea9cec1..57817fb5200 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -16,9 +16,9 @@ */ /** - * \file htdocs/public/members/new.php + * \file htdocs/public/project/suggestbooth.php * \ingroup member - * \brief Example of form to add a new member + * \brief Example of form to suggest a booth * * Note that you can add following constant to change behaviour of page * MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 399969bc80d..bfaf8a31b08 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -16,9 +16,9 @@ */ /** - * \file htdocs/public/members/new.php + * \file htdocs/public/project/suggestconference.php * \ingroup member - * \brief Example of form to add a new member + * \brief Example of form to suggest a conference * * Note that you can add following constant to change behaviour of page * MEMBER_NEWFORM_AMOUNT Default amount for auto-subscribe form From b34279da897c2146fd1ebe4a3d72d27f52f10185 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 21:46:01 +0200 Subject: [PATCH 07/14] Debug v14 --- htdocs/public/project/suggestbooth.php | 4 ++-- htdocs/public/project/suggestconference.php | 2 +- htdocs/public/project/viewandvote.php | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 57817fb5200..410ba698ae1 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -94,7 +94,7 @@ if ($resultproject < 0) { // Security check $securekeyreceived = GETPOST("securekey"); -$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { print $langs->trans('MissingOrBadSecureKey'); @@ -112,7 +112,7 @@ $extrafields = new ExtraFields($db); $user->loadDefaultValues(); $cactioncomm = new CActionComm($db); -$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, 'module=\'booth@eventorganization\''); +$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='booth@eventorganization'"); // Security check if (empty($conf->eventorganization->enabled)) { diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index bfaf8a31b08..c8e784ab3c6 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -113,7 +113,7 @@ $extrafields = new ExtraFields($db); $user->loadDefaultValues(); $cactioncomm = new CActionComm($db); -$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, 'module=\'conference@eventorganization\''); +$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conference@eventorganization'"); // Security check if (empty($conf->eventorganization->enabled)) { diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index e78176a5f56..157a0053ac5 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -67,7 +67,7 @@ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", $action = GETPOST('action', 'aZ09'); $id = GETPOST('id'); $securekeyreceived = GETPOST("securekey"); -$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { print $langs->trans('MissingOrBadSecureKey'); From 2a5e654544b5e444b86004712ffc9d18ab1bed44 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 21:46:01 +0200 Subject: [PATCH 08/14] Debug v14 --- htdocs/public/project/suggestbooth.php | 4 ++-- htdocs/public/project/suggestconference.php | 4 ++-- htdocs/public/project/viewandvote.php | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 57817fb5200..410ba698ae1 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -94,7 +94,7 @@ if ($resultproject < 0) { // Security check $securekeyreceived = GETPOST("securekey"); -$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { print $langs->trans('MissingOrBadSecureKey'); @@ -112,7 +112,7 @@ $extrafields = new ExtraFields($db); $user->loadDefaultValues(); $cactioncomm = new CActionComm($db); -$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, 'module=\'booth@eventorganization\''); +$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='booth@eventorganization'"); // Security check if (empty($conf->eventorganization->enabled)) { diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index bfaf8a31b08..43d004fb90a 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -95,7 +95,7 @@ if ($resultproject < 0) { // Security check $securekeyreceived = GETPOST("securekey"); -$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { print $langs->trans('MissingOrBadSecureKey'); @@ -113,7 +113,7 @@ $extrafields = new ExtraFields($db); $user->loadDefaultValues(); $cactioncomm = new CActionComm($db); -$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, 'module=\'conference@eventorganization\''); +$arrayofeventtype = $cactioncomm->liste_array('', 'id', '', 0, "module='conference@eventorganization'"); // Security check if (empty($conf->eventorganization->enabled)) { diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index e78176a5f56..157a0053ac5 100644 --- a/htdocs/public/project/viewandvote.php +++ b/htdocs/public/project/viewandvote.php @@ -67,7 +67,7 @@ $langs->loadLangs(array("main", "other", "dict", "bills", "companies", "errors", $action = GETPOST('action', 'aZ09'); $id = GETPOST('id'); $securekeyreceived = GETPOST("securekey"); -$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 2); +$securekeytocompare = dol_hash($conf->global->EVENTORGANIZATION_SECUREKEY.'conferenceorbooth'.$id, 'md5'); if ($securekeytocompare != $securekeyreceived) { print $langs->trans('MissingOrBadSecureKey'); From 8fe37b20c03020f19a4d14694ae595b4e7d977e9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 21:54:04 +0200 Subject: [PATCH 09/14] Debug v14 --- htdocs/public/project/suggestbooth.php | 34 +-------------------- htdocs/public/project/suggestconference.php | 17 +---------- 2 files changed, 2 insertions(+), 49 deletions(-) diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 410ba698ae1..8dd91a54a4c 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -224,20 +224,6 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Note"))."
\n"; } - if (empty($datestart)) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart"))."
\n"; - } elseif ($datestart < $project->date_start) { - $error++; - $errmsg .= $langs->trans("DateMustBeAfterThan", $langs->transnoentitiesnoconv("DateStart"), dol_print_date($project->date_start))."
\n"; - } - if (empty($dateend)) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd"))."
\n"; - } elseif ($dateend > dol_mktime(23, 59, 59, dol_print_date($project->date_end, '%m'), dol_print_date($project->date_end, '%d'), dol_print_date($project->date_end, '%Y'))) { - $error++; - $errmsg .= $langs->trans("DateMustBeBeforeThan", $langs->transnoentitiesnoconv("DateEnd"), dol_print_date($project->date_end))."
\n"; - } if (!GETPOST("email")) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; @@ -541,7 +527,7 @@ print '
'; // Welcome message $text = ''.$langs->trans("EvntOrgRegistrationBoothWelcomeMessage").'
'; -$text .= ''.$langs->trans("EvntOrgRegistrationBoothHelpMessage").' '.$id.'.

'."\n"; +$text .= ''.$langs->trans("EvntOrgRegistrationBoothHelpMessage").' '.$project->label.'.

'."\n"; $text .= ''.$project->note_public.''."\n";; print $text; print '
'; @@ -636,24 +622,6 @@ print '*'."\n"; print ''."\n"; -// Start Date -print ''.$langs->trans("DateStart").'*'; -if (!empty($project->date_start)) { - print '('.$langs->trans('Min'). ' '.dol_print_date($project->date_start).')'; -} -print ''."\n"; -print ''; -print $form->selectDate((empty($datestart)?$project->date_start:$datestart), 'datestart'); -print ''."\n"; -// End Date -print ''.$langs->trans("DateEnd").'*'; -if (!empty($project->date_end)) { - print '('.$langs->trans('Max'). ' '.dol_print_date($project->date_end).')'; -} -print ''."\n"; -print ''; -print $form->selectDate(empty($dateend)?$project->date_end:$dateend, 'dateend'); -print ''."\n"; print "\n"; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 43d004fb90a..6b534198140 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -225,14 +225,6 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Note"))."
\n"; } - if (!GETPOST("datestart")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateStart"))."
\n"; - } - if (!GETPOST("dateend")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("DateEnd"))."
\n"; - } if (!GETPOST("email")) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; @@ -472,7 +464,7 @@ print '
'; // Welcome message $text = ''.$langs->trans("EvntOrgRegistrationConfWelcomeMessage").'
'; -$text .= ''.$langs->trans("EvntOrgRegistrationConfHelpMessage").' '.$id.'.

'."\n"; +$text .= ''.$langs->trans("EvntOrgRegistrationConfHelpMessage").' '.$project->label.'.

'."\n"; $text .= ''.$project->note_public.''."\n";; print $text; print '
'; @@ -568,13 +560,6 @@ print '*'."\n"; print ''."\n"; -// Start Date -print ''.$langs->trans("DateStart").''."\n"; -print ''."\n"; -// End Date -print ''.$langs->trans("DateEnd").''."\n"; -print ''."\n"; - print "\n"; From 6cb690e6780b8c2232265bde6759676581953450 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 21:56:48 +0200 Subject: [PATCH 10/14] Debug v14 --- htdocs/langs/en_US/eventorganization.lang | 3 +++ htdocs/public/project/suggestbooth.php | 4 ++-- htdocs/public/project/suggestconference.php | 4 ++-- 3 files changed, 7 insertions(+), 4 deletions(-) diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index e6f3432589c..55ef2652d80 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -138,6 +138,9 @@ OrganizationEventBulkMailToAttendees=This is a remind about your participation i OrganizationEventBulkMailToSpeakers=This is a reminder on your participation in the event as a speaker OrganizationEventLinkToThirdParty=Link to third party (customer, supplier or partner) +NewSuggestionOfBooth=Application for a booth +NewSuggestionOfConference=Application for a conference + # # Vote page # diff --git a/htdocs/public/project/suggestbooth.php b/htdocs/public/project/suggestbooth.php index 8dd91a54a4c..f87fcf6f041 100644 --- a/htdocs/public/project/suggestbooth.php +++ b/htdocs/public/project/suggestbooth.php @@ -515,10 +515,10 @@ if (empty($reshook) && $action == 'add') { $form = new Form($db); $formcompany = new FormCompany($db); -llxHeaderVierge($langs->trans("NewSuggestion")); +llxHeaderVierge($langs->trans("NewSuggestionOfBooth")); -print load_fiche_titre($langs->trans("NewSuggestion"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewSuggestionOfBooth"), '', '', 0, 0, 'center'); print '
'; diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 6b534198140..525dc5a60ba 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -452,10 +452,10 @@ if (empty($reshook) && $action == 'add') { $form = new Form($db); $formcompany = new FormCompany($db); -llxHeaderVierge($langs->trans("NewSuggestion")); +llxHeaderVierge($langs->trans("NewSuggestionOfConference")); -print load_fiche_titre($langs->trans("NewSuggestion"), '', '', 0, 0, 'center'); +print load_fiche_titre($langs->trans("NewSuggestionOfConference"), '', '', 0, 0, 'center'); print '
'; From 5463a0288745a49bee8f9c5937b2b383d507783c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 6 Oct 2021 21:59:10 +0200 Subject: [PATCH 11/14] Debug v14 --- htdocs/public/project/suggestconference.php | 28 +++++++++------------ 1 file changed, 12 insertions(+), 16 deletions(-) diff --git a/htdocs/public/project/suggestconference.php b/htdocs/public/project/suggestconference.php index 525dc5a60ba..1e365a51f57 100644 --- a/htdocs/public/project/suggestconference.php +++ b/htdocs/public/project/suggestconference.php @@ -213,10 +213,22 @@ if (empty($reshook) && $action == 'add') { $db->begin(); + if (!GETPOST("lastname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."
\n"; + } + if (!GETPOST("firstname")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
\n"; + } if (!GETPOST("email")) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; } + if (!GETPOST("societe")) { + $error++; + $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; + } if (!GETPOST("label")) { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Label"))."
\n"; @@ -225,22 +237,6 @@ if (empty($reshook) && $action == 'add') { $error++; $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Note"))."
\n"; } - if (!GETPOST("email")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Email"))."
\n"; - } - if (!GETPOST("lastname")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Lastname"))."
\n"; - } - if (!GETPOST("firstname")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."
\n"; - } - if (!GETPOST("societe")) { - $error++; - $errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Societe"))."
\n"; - } if (GETPOST("email") && !isValidEmail(GETPOST("email"))) { $error++; $langs->load("errors"); From ec545f89676f402fc0bb1bff292beb0abb59a003 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Oct 2021 02:58:51 +0200 Subject: [PATCH 12/14] Fix data --- htdocs/install/mysql/migration/13.0.0-14.0.0.sql | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql index db0e40790dc..d6e21f17aeb 100644 --- a/htdocs/install/mysql/migration/13.0.0-14.0.0.sql +++ b/htdocs/install/mysql/migration/13.0.0-14.0.0.sql @@ -76,6 +76,7 @@ INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUE INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 14, 'CA-ENG-BASE', 'Canadian basic chart of accounts - English', 1); INSERT INTO llx_accounting_system (fk_country, pcg_version, label, active) VALUES ( 154, 'SAT/24-2019', 'Catalogo y codigo agrupador fiscal del 2019', 1); +UPDATE llx_accounting_system SET fk_country = 1 WHERE fk_country IS NULL; UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'auguria'; UPDATE llx_const set value = __ENCRYPT('eldy')__ WHERE __DECRYPT('value')__ = 'bureau2crea'; From ed6fefc4937672799f3b50602714c418e003e45a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Oct 2021 04:10:39 +0200 Subject: [PATCH 13/14] Trans --- htdocs/langs/en_US/eventorganization.lang | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index 55ef2652d80..1fd767f556c 100644 --- a/htdocs/langs/en_US/eventorganization.lang +++ b/htdocs/langs/en_US/eventorganization.lang @@ -75,10 +75,10 @@ EventOrganizationMassEmailSpeakers = Communication to speakers # # Event # -AllowUnknownPeopleSuggestConf=Allow unknown people to suggest conferences -AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest conferences -AllowUnknownPeopleSuggestBooth=Allow unknown people to suggest booth -AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to suggest booth +AllowUnknownPeopleSuggestConf=Allow people to suggest conferences +AllowUnknownPeopleSuggestConfHelp=Allow unknown people to suggest a conference they want to do +AllowUnknownPeopleSuggestBooth=Allow people to apply for a booth +AllowUnknownPeopleSuggestBoothHelp=Allow unknown people to apply for a booth PriceOfRegistration=Price of registration PriceOfRegistrationHelp=Price to pay to register or participate in the event PriceOfBooth=Subscription price to stand a booth @@ -106,9 +106,9 @@ EvntOrgCancelled = Cancelled # SuggestForm = Suggestion page SuggestOrVoteForConfOrBooth = Page for suggestion or vote -EvntOrgRegistrationHelpMessage = Here, you can vote for a conference or booth or suggest a new one for the event -EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project -EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project +EvntOrgRegistrationHelpMessage = Here, you can vote for a conference or suggest a new one for the event. You can also apply to have a booth during the event. +EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference to animate during the event. +EvntOrgRegistrationBoothHelpMessage = Here, you can apply to have a booth during the event. ListOfSuggestedConferences = List of suggested conferences ListOfSuggestedBooths = List of suggested booths ListOfConferencesOrBooths=List of conferences or booths of event project From 5910d100217c88ab6ac854c0ff17094bfbed67bd Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 Oct 2021 10:43:50 +0200 Subject: [PATCH 14/14] Add hidden option to allow to fix corrupted situations --- htdocs/compta/paiement/card.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index bc62064dc82..a90a52c4e20 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -443,11 +443,13 @@ if ($resql) print ''.$invoice->getLibStatut(5, $alreadypayed).''; print "\n"; - if ($objp->paye == 1) // If at least one invoice is paid, disable delete - { + + // If at least one invoice is paid, disable delete. INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED Can be use for maintenance purpose. Never use this in production + if ($objp->paye == 1 && empty($conf->global->INVOICE_CAN_DELETE_PAYMENT_EVEN_IF_INVOICE_CLOSED)) { $disable_delete = 1; $title_button = dol_escape_htmltag($langs->transnoentitiesnoconv("CantRemovePaymentWithOneInvoicePaid")); } + $total = $total + $objp->amount; $i++; }