diff --git a/htdocs/compta/paiement/card.php b/htdocs/compta/paiement/card.php index eccbf017735..ab6f0f5e574 100644 --- a/htdocs/compta/paiement/card.php +++ b/htdocs/compta/paiement/card.php @@ -416,10 +416,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++; } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index 21d6e73eb39..02e52c8164b 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2377,7 +2377,7 @@ if ($action == 'create') { print ''; - $objectsrc->printOriginLinesList(); + $objectsrc->printOriginLinesList('', $selectedLines); print '
'; } 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 29c2aad9bd4..a9f1a669e52 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); 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'; diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang index e3b32a7c8cd..8c91d842485 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 @@ -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/index.php b/htdocs/public/project/index.php index bb0f9005057..3990e31ba2f 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 b07b7350372..7e1607adbe2 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 @@ -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)) { @@ -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"; @@ -529,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 '
'; @@ -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 3119c7831a9..ff159e30943 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 @@ -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)) { @@ -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,30 +237,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"; - } - 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"); @@ -460,10 +448,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 '
'; @@ -472,7 +460,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 +556,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"; diff --git a/htdocs/public/project/viewandvote.php b/htdocs/public/project/viewandvote.php index 017dda834c6..f119f08239d 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');