';
print '
'.$langs->trans("ChangeIntoRepeatableIntervention").' ';
diff --git a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
index 0f8b8341a3d..5457a9ee376 100644
--- a/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
+++ b/htdocs/fourn/class/fournisseur.commande.dispatch.class.php
@@ -333,7 +333,6 @@ class CommandeFournisseurDispatch extends CommonObject
*/
public function update($user, $notrigger = 0)
{
- global $conf, $langs;
$error = 0;
// Clean parameters
@@ -411,12 +410,12 @@ class CommandeFournisseurDispatch extends CommonObject
}
if (!$notrigger) {
- // Uncomment this and change MYOBJECT to your own tag if you
+ // Call triggers
$result = $this->call_trigger('LINERECEPTION_UPDATE', $user);
if ($result < 0) {
$error++;
}
- //// End call triggers
+ // End call triggers
}
}
@@ -444,24 +443,22 @@ class CommandeFournisseurDispatch extends CommonObject
*/
public function delete($user, $notrigger = 0)
{
- global $conf, $langs;
$error = 0;
$this->db->begin();
if (!$error) {
if (!$notrigger) {
- // Uncomment this and change MYOBJECT to your own tag if you
- // want this action calls a trigger.
-
- //// Call triggers
- //$result=$this->call_trigger('MYOBJECT_DELETE',$user);
- //if ($result < 0) { $error++; //Do also what you must do to rollback action if trigger fail}
- //// End call triggers
+ // Call triggers
+ $result = $this->call_trigger('LINERECEPTION_DELETE', $user);
+ if ($result < 0) {
+ $error++;
+ }
+ // End call triggers
}
}
- // Remove extrafields
+ // Remove extrafields
if (!$error) {
$result = $this->deleteExtraFields();
if ($result < 0) {
@@ -496,7 +493,6 @@ class CommandeFournisseurDispatch extends CommonObject
}
-
/**
* Load an object from its id and create a new one in database
*
diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php
index d5ff9bc229f..44a712969c1 100644
--- a/htdocs/fourn/commande/card.php
+++ b/htdocs/fourn/commande/card.php
@@ -70,8 +70,6 @@ $socid = GETPOST('socid', 'int');
$projectid = GETPOST('projectid', 'int');
$cancel = GETPOST('cancel', 'alpha');
$lineid = GETPOST('lineid', 'int');
-
-$lineid = GETPOST('lineid', 'int');
$origin = GETPOST('origin', 'alpha');
$originid = (GETPOST('originid', 'int') ? GETPOST('originid', 'int') : GETPOST('origin_id', 'int')); // For backward compatibility
diff --git a/htdocs/fourn/commande/dispatch.php b/htdocs/fourn/commande/dispatch.php
index 4b8812cf22e..2c847b9a421 100644
--- a/htdocs/fourn/commande/dispatch.php
+++ b/htdocs/fourn/commande/dispatch.php
@@ -443,7 +443,7 @@ if ($action == 'updateline' && $user->rights->fournisseur->commande->receptionne
$product = $supplierorderdispatch->fk_product;
$price = price2num(GETPOST('price'), '', 2);
$comment = $supplierorderdispatch->comment;
- $eatby = $supplierorderdispatch->fk_product;
+ $eatby = $supplierorderdispatch->eatby;
$sellby = $supplierorderdispatch->sellby;
$batch = $supplierorderdispatch->batch;
diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php
index a8a4cb63258..622c494d095 100644
--- a/htdocs/fourn/facture/card.php
+++ b/htdocs/fourn/facture/card.php
@@ -1791,8 +1791,8 @@ if (!empty($conf->projet->enabled)) {
$now = dol_now();
$title = $langs->trans('SupplierInvoice')." - ".$langs->trans('Card');
-$helpurl = "EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores";
-llxHeader('', $title, $helpurl);
+$help_url = 'EN:Module_Suppliers_Invoices|FR:Module_Fournisseurs_Factures|ES:Módulo_Facturas_de_proveedores|DE:Modul_Lieferantenrechnungen';
+llxHeader('', $title, $help_url);
// Mode creation
if ($action == 'create') {
diff --git a/htdocs/fourn/product/list.php b/htdocs/fourn/product/list.php
index f411d70af25..ed137fd5d86 100644
--- a/htdocs/fourn/product/list.php
+++ b/htdocs/fourn/product/list.php
@@ -121,7 +121,7 @@ $form = new Form($db);
$productstatic = new Product($db);
$companystatic = new Societe($db);
-$title = $langs->trans("ProductsAndServices");
+$title = $langs->trans('Supplier')." - ".$langs->trans('ProductsAndServices');
if ($fourn_id) {
$supplier = new Fournisseur($db);
diff --git a/htdocs/holiday/list.php b/htdocs/holiday/list.php
index b00abadb9c3..c62185d5f2a 100644
--- a/htdocs/holiday/list.php
+++ b/htdocs/holiday/list.php
@@ -117,7 +117,7 @@ $search_month_end = GETPOST('search_month_end', 'int');
$search_year_end = GETPOST('search_year_end', 'int');
$search_employee = GETPOST('search_employee', 'int');
$search_valideur = GETPOST('search_valideur', 'int');
-$search_status = GETPOST('search_statut', 'int');
+$search_status = GETPOST('search_status', 'int');
$search_type = GETPOST('search_type', 'int');
// Initialize technical objects
@@ -722,6 +722,7 @@ if ($resql) {
$i = 0;
$totalarray = array();
+ $totalarray['nbfield'] = 0;
while ($i < min($num, $limit)) {
$obj = $db->fetch_object($resql);
diff --git a/htdocs/holiday/month_report.php b/htdocs/holiday/month_report.php
index 966dd7e8dee..698d71e5dc7 100644
--- a/htdocs/holiday/month_report.php
+++ b/htdocs/holiday/month_report.php
@@ -144,16 +144,16 @@ $sql .= " FROM ".MAIN_DB_PREFIX."holiday cp";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."user u ON cp.fk_user = u.rowid";
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_holiday_types ct ON cp.fk_type = ct.rowid";
$sql .= " WHERE cp.rowid > 0";
-$sql .= " AND cp.statut = 3"; // 3 = Approved
+$sql .= " AND cp.statut = ".Holiday::STATUS_APPROVED;
$sql .= " AND (date_format(cp.date_debut, '%Y-%m') = '".$db->escape($year_month)."' OR date_format(cp.date_fin, '%Y-%m') = '".$db->escape($year_month)."')";
if (!empty($search_ref)) {
$sql .= natural_search('cp.ref', $search_ref);
}
-if (!empty($search_employee)) {
- $sql .= " AND cp.fk_user = '".$db->escape($search_employee)."'";
+if (!empty($search_employee) && $search_employee > 0) {
+ $sql .= " AND cp.fk_user = ".((int) $search_employee);
}
-if (!empty($search_type)) {
+if (!empty($search_type) && $search_type != '-1') {
$sql .= ' AND cp.fk_type IN ('.$db->sanitize($search_type).')';
}
if (!empty($search_description)) {
diff --git a/htdocs/install/mysql/data/llx_00_c_country.sql b/htdocs/install/mysql/data/llx_00_c_country.sql
index 677447f1af2..1e2e8b69c39 100644
--- a/htdocs/install/mysql/data/llx_00_c_country.sql
+++ b/htdocs/install/mysql/data/llx_00_c_country.sql
@@ -216,21 +216,21 @@ INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (18
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (184,'PL','POL','Pologne',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (185,'PR','PRI','Puerto Rico',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (186,'QA','QAT','Qatar',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Roumanie',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (188,'RO','ROU','Romania',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (189,'RW','RWA','Rwanda',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Sainte-Hélène',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint-Christophe-et-Niévès',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Sainte-Lucie',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint-Pierre-et-Miquelon',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint-Vincent-et-les-Grenadines',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (190,'SH','SHN','Saint Helena',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (191,'KN','KNA','Saint Kitts and Nevis',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (192,'LC','LCA','Saint Lucia',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (193,'PM','SPM','Saint Pierre and Miquelon',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (194,'VC','VCT','Saint Vincent and the Grenadines',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (195,'WS','WSM','Samoa',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','Saint-Marin',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Sao Tomé-et-Principe',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbie',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (196,'SM','SMR','San Marino ',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (197,'ST','STP','Saint Thomas and Prince',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (198,'RS','SRB','Serbia',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (199,'SC','SYC','Seychelles',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (200,'SL','SLE','Sierra Leone',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovaquie',1,0);
-INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovénie',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (201,'SK','SVK','Slovakia',1,0);
+INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (202,'SI','SVN','Slovenia',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (203,'SB','SLB','Iles Salomon',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (204,'SO','SOM','Somalie',1,0);
INSERT INTO llx_c_country (rowid,code,code_iso,label,active,favorite) VALUES (205,'ZA','ZAF','South Africa',1,0);
diff --git a/htdocs/install/mysql/data/llx_c_chargesociales.sql b/htdocs/install/mysql/data/llx_c_chargesociales.sql
index b728d9c6414..a7e12df0d31 100644
--- a/htdocs/install/mysql/data/llx_c_chargesociales.sql
+++ b/htdocs/install/mysql/data/llx_c_chargesociales.sql
@@ -50,10 +50,10 @@ insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays
--
-- Belgique
--
-insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (201, 'ONSS', 1,1,'TAXBEONSS' ,'2');
-insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (210, 'Precompte professionnel', 1,1,'TAXBEPREPRO' ,'2');
-insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (220, 'Prime existence', 1,1,'TAXBEPRIEXI' ,'2');
-insert into llx_c_chargesociales (id, libelle, deductible, active, code, fk_pays) values (230, 'Precompte immobilier', 1,1,'TAXBEPREIMMO','2');
+insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 201, 'ONSS', 1,1,'TAXBEONSS');
+insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 210, 'Precompte professionnel', 1,1,'TAXBEPREPRO');
+insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 220, 'Prime existence', 1,1,'TAXBEPRIEXI');
+insert into llx_c_chargesociales (fk_pays, id, libelle, deductible, active, code) values ('2', 230, 'Precompte immobilier', 1,1,'TAXBEPREIMMO');
--
-- Austria
diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql
index 5ca98be8545..acc09bad008 100644
--- a/htdocs/install/mysql/data/llx_c_email_templates.sql
+++ b/htdocs/install/mysql/data/llx_c_email_templates.sql
@@ -20,21 +20,24 @@
-- de l'install et tous les sigles '--' sont supprimés.
--
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'$conf->societe->enabled && $conf->banque->enabled && $conf->prelevement->enabled',0,'__(YourSEPAMandate)__','__(Hello)__,
\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__
\n__(Sincerely)__
\n__USER_SIGNATURE__',null);
+-- Bank Thirdparty
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines) VALUES (0,'banque','thirdparty','',0,null,null,'(YourSEPAMandate)',1,'$conf->societe->enabled && $conf->banque->enabled && $conf->prelevement->enabled',0,'__(YourSEPAMandate)__','__(Hello)__,
\n\n__(FindYourSEPAMandate)__ :
\n__MYCOMPANY_NAME__
\n__MYCOMPANY_FULLADDRESS__
\n__(Sincerely)__
\n__USER_SIGNATURE__',null);
+-- Members
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfYourMembershipWasValidated)__
__(FirstName)__ : __MEMBER_FIRSTNAME__
__(LastName)__ : __MEMBER_LASTNAME__
__(ID)__ : __MEMBER_ID__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 1);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(YourMembershipWasCanceled)__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,
\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnAutoSubscription)' ,10,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipRequestWasReceived)__','__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfYourMembershipRequestWasReceived)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnMemberValidation)' ,20,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasValidated)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfYourMembershipWasValidated)__
__(FirstName)__ : __MEMBER_FIRSTNAME__
__(LastName)__ : __MEMBER_LASTNAME__
__(ID)__ : __MEMBER_ID__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnNewSubscription)' ,30,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourSubscriptionWasRecorded)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfYourSubscriptionWasRecorded)__
\n\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 1);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingReminderForExpiredSubscription)',40,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(SubscriptionReminderEmail)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(ThisIsContentOfSubscriptionReminderEmail)__
\n
__ONLINE_PAYMENT_TEXT_AND_URL__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingEmailOnCancelation)' ,50,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourMembershipWasCanceled)__', '__(Hello)__ __MEMBER_FULLNAME__,
\n\n__(YourMembershipWasCanceled)__
\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'adherent','member','',0,null,null,'(SendingAnEMailToMember)' ,60,'$conf->adherent->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(CardContent)__', '__(Hello)__,
\n\n__(ThisIsContentOfYourCard)__
\n__(ID)__ : __ID__
\n__(Civiliyty)__ : __MEMBER_CIVILITY__
\n__(Firstname)__ : __MEMBER_FIRSTNAME__
\n__(Lastname)__ : __MEMBER_LASTNAME__
\n__(Fullname)__ : __MEMBER_FULLNAME__
\n__(Company)__ : __MEMBER_COMPANY__
\n__(Address)__ : __MEMBER_ADDRESS__
\n__(Zip)__ : __MEMBER_ZIP__
\n__(Town)__ : __MEMBER_TOWN__
\n__(Country)__ : __MEMBER_COUNTRY__
\n__(Email)__ : __MEMBER_EMAIL__
\n__(Birthday)__ : __MEMBER_BIRTH__
\n__(Photo)__ : __MEMBER_PHOTO__
\n__(Login)__ : __MEMBER_LOGIN__
\n__(Password)__ : __MEMBER_PASSWORD__
\n__(Phone)__ : __MEMBER_PHONE__
\n__(PhonePerso)__ : __MEMBER_PHONEPRO__
\n__(PhoneMobile)__ : __MEMBER_PHONEMOBILE__
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
+-- Recruiting
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, enabled, active, topic, content, content_lines, joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,
\n\n__(YourCandidatureAnswerMessage)__
__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_user,datec,label,position,enabled,active,topic,content,content_lines,joinfiles) VALUES (0,'recruitment','recruitmentcandidature_send','',0,null,null,'(AnswerCandidature)' ,100,'$conf->recruitment->enabled',1,'[__[MAIN_INFO_SOCIETE_NOM]__] __(YourCandidature)__', '__(Hello)__ __CANDIDATE_FULLNAME__,
\n\n__(YourCandidatureAnswerMessage)__
__ONLINE_INTERVIEW_SCHEDULER_TEXT_AND_URL__\n
\n__(Sincerely)__
__USER_SIGNATURE__',null, 0);
-
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__
__ONLINE_PAYMENT_TEXT_AND_URL__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__
__ONLINE_PAYMENT_TEXT_AND_URL__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__
__ONLINE_PAYMENT_TEXT_AND_URL__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__
__(Sincerely)__
__MYCOMPANY_NAME__
__USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
-INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, tms, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, '2021-02-14 14:42:41', 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
+-- Event organization
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskConf', 10, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskConf)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventConfRequestWasReceived)__
__ONLINE_PAYMENT_TEXT_AND_URL__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailAskBooth', 20, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailAskBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBoothRequestWasReceived)__
__ONLINE_PAYMENT_TEXT_AND_URL__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsBooth', 30, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsBooth)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBoothSubscriptionWasReceived)__
__ONLINE_PAYMENT_TEXT_AND_URL__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationEmailSubsEvent', 40, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationEmailSubsEvent)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventEventSubscriptionWasReceived)__
__(Sincerely)__
__MYCOMPANY_NAME__
__USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailAttendees', 50, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailAttendees)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBulkMailToAttendees)__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
+INSERT INTO llx_c_email_templates (entity, module, type_template, lang, private, fk_user, datec, label, position, active, topic, content, content_lines, enabled, joinfiles) values (0, '', 'eventorganization_send', '', 0, null, null, 'EventOrganizationMassEmailSpeakers', 60, 1, '[__[MAIN_INFO_SOCIETE_NOM]__] __(EventOrganizationMassEmailSpeakers)__', '__(Hello)__ __THIRDPARTY_NAME__,
__(ThisIsContentOfYourOrganizationEventBulkMailToSpeakers)__
__(Sincerely)__
__USER_SIGNATURE__', null, '1', null);
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 25a6a6b09e8..3fb671fa9b2 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
@@ -418,7 +418,7 @@ UPDATE llx_propal SET fk_user_signature = fk_user_cloture WHERE fk_user_signatur
UPDATE llx_propal SET date_signature = date_cloture WHERE date_signature IS NULL AND date_cloture IS NOT NULL;
-ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) NULL;
+ALTER TABLE llx_product ADD COLUMN batch_mask VARCHAR(32) DEFAULT NULL;
ALTER TABLE llx_product ADD COLUMN lifetime INTEGER NULL;
ALTER TABLE llx_product ADD COLUMN qc_frequency INTEGER NULL;
diff --git a/htdocs/install/mysql/tables/llx_product.sql b/htdocs/install/mysql/tables/llx_product.sql
index 73b4473a5a4..4aad3393137 100644
--- a/htdocs/install/mysql/tables/llx_product.sql
+++ b/htdocs/install/mysql/tables/llx_product.sql
@@ -59,7 +59,7 @@ create table llx_product
tobuy tinyint DEFAULT 1, -- Product you buy
onportal tinyint DEFAULT 0, -- If it is a product you sell and you want to sell it on portal (module website must be on)
tobatch tinyint DEFAULT 0 NOT NULL, -- Is it a product that need a batch management (eat-by or lot management)
- batch_mask varchar(32), -- If the product has batch feature, you may want to use a batch mask per product
+ batch_mask varchar(32) DEFAULT NULL, -- If the product has batch feature, you may want to use a batch mask per product
fk_product_type integer DEFAULT 0, -- Type of product: 0 for regular product, 1 for service, 9 for other (used by external module)
duration varchar(6),
seuil_stock_alerte float DEFAULT NULL,
@@ -95,7 +95,7 @@ create table llx_product
canvas varchar(32) DEFAULT NULL,
finished tinyint DEFAULT NULL, -- see dictionnary c_product_nature
lifetime integer DEFAULT NULL,
- qc_frequency integer DEFAULT NULL,
+ qc_frequency integer DEFAULT NULL, -- Quality control periodicity
hidden tinyint DEFAULT 0, -- Not used. Deprecated.
import_key varchar(14), -- Import key
model_pdf varchar(255), -- model save dodument used
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index 2eaba13de3c..b7618f64739 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1987,7 +1987,7 @@ MAIN_PDF_MARGIN_RIGHT=Right margin on PDF
MAIN_PDF_MARGIN_TOP=Top margin on PDF
MAIN_PDF_MARGIN_BOTTOM=Bottom margin on PDF
MAIN_DOCUMENTS_LOGO_HEIGHT=Height for logo on PDF
-MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal ligne
+MAIN_GENERATE_PROPOSALS_WITH_PICTURE=Add picture on proposal line
MAIN_PDF_PROPAL_USE_ELECTRONIC_SIGNING=Add electronic sign in PDF
NothingToSetup=There is no specific setup required for this module.
SetToYesIfGroupIsComputationOfOtherGroups=Set this to yes if this group is a computation of other groups
@@ -2140,4 +2140,5 @@ CheckForModuleUpdateHelp=This action will connect to editors of external modules
ModuleUpdateAvailable=An update is available
NoExternalModuleWithUpdate=No updates found for external modules
SwaggerDescriptionFile=Swagger API description file (for use with redoc for example)
-YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead.
\ No newline at end of file
+YouEnableDeprecatedWSAPIsUseRESTAPIsInstead=You enabled deprecated WS API. You should use REST API instead.
+RandomlySelectedIfSeveral=Randomly selected if several pictures are available
\ No newline at end of file
diff --git a/htdocs/langs/en_US/eventorganization.lang b/htdocs/langs/en_US/eventorganization.lang
index 9f75374f2a0..335c257b224 100644
--- a/htdocs/langs/en_US/eventorganization.lang
+++ b/htdocs/langs/en_US/eventorganization.lang
@@ -1,4 +1,5 @@
# Copyright (C) 2021 Florian Henry
+# Copyright (C) 2021 Dorian Vabre
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -81,6 +82,7 @@ PriceOfBoothHelp=Subscription price to stand a booth
EventOrganizationICSLink=Link ICS for events
ConferenceOrBoothInformation=Conference Or Booth informations
Attendees = Attendees
+DownloadICSLink = Download ICS link
EVENTORGANIZATION_SECUREKEY = Secure Key of the public registration link to a conference
SERVICE_BOOTH_LOCATION = Service used for the invoice row about a booth location
SERVICE_CONFERENCE_ATTENDEE_SUBSCRIPTION = Service used for the invoice row about an attendee subscription to a conference
@@ -96,9 +98,13 @@ EvntOrgCancelled = Cancelled
#
# Public page
#
+SuggestForm = Suggestion page
RegisterPage = Page for conferences or booth
-EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page.
-EvntOrgRegistrationHelpMessage = Here, you can suggest a new conference or a new booth for the project
+EvntOrgRegistrationHelpMessage = Here, you can vote for an event, or suggest a new conference or booth for the project
+EvntOrgRegistrationConfHelpMessage = Here, you can suggest a new conference for the project
+EvntOrgRegistrationBoothHelpMessage = Here, you can suggest a new booth for the project
+ListOfSuggestedConferences = List of suggested conferences
+ListOfSuggestedBooths = List of suggested booths
SuggestConference = Suggest a new conference
SuggestBooth = Suggest a booth
ViewAndVote = View and vote for suggested events
@@ -107,6 +113,20 @@ MissingOrBadSecureKey = The security key is invalid or missing
EvntOrgWelcomeMessage = This form allows you to register as a new participant to the conference : '%s'
EvntOrgDuration = This conference starts on %s and ends on %s.
ConferenceAttendeeFee = Conference attendee fee for the event : '%s' occurring from %s to %s.
+BoothLocationFee = Booth location for the event : '%s' occurring from %s to %s
+EventType = Event type
+
+#
+# Vote page
+#
+EvntOrgRegistrationWelcomeMessage = Welcome on the conference or booth suggestion page.
+EvntOrgRegistrationConfWelcomeMessage = Welcome on the conference suggestion page.
+EvntOrgRegistrationBoothWelcomeMessage = Welcome on the booth suggestion page.
+EvntOrgVoteHelpMessage = Here, you can view and vote for the suggested events for the project
+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
#
@@ -118,5 +138,6 @@ ConfAttendeeSubscriptionConfirmation = Confirmation of your subscription to a co
#
# Payment page
#
-Attendee = Participant
-PaymentConferenceAttendee = Paiement de participation à une conférence
+Attendee = Attendee
+PaymentConferenceAttendee = Conference attendee payment
+PaymentBoothLocation = Booth location payment
diff --git a/htdocs/langs/en_US/knowledgemanagement.lang b/htdocs/langs/en_US/knowledgemanagement.lang
index 269007e60f8..68f5cced76c 100644
--- a/htdocs/langs/en_US/knowledgemanagement.lang
+++ b/htdocs/langs/en_US/knowledgemanagement.lang
@@ -47,7 +47,7 @@ KnowledgeManagementArea = Knowledge Management
# Menu
#
MenuKnowledgeRecord = Knowledge base
-ListOfArticles = List of articles
+ListKnowledgeRecord = List of articles
NewKnowledgeRecord = New article
ValidateReply = Validate solution
KnowledgeRecords = Articles
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index 93cf9e9e037..977aab588a2 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -255,3 +255,4 @@ MakeMovementsAndClose=Generate movements and close
AutofillWithExpected=Fill real quantity with expected quantity
ShowAllBatchByDefault=By default, show batch details on product "stock" tab
CollapseBatchDetailHelp=You can set batch detail default display in stocks module configuration
+FieldCannotBeNegative=Field "%s" cannot be negative
\ No newline at end of file
diff --git a/htdocs/product/class/product.class.php b/htdocs/product/class/product.class.php
index 2ccc5e63c8f..f76a6fec0ad 100644
--- a/htdocs/product/class/product.class.php
+++ b/htdocs/product/class/product.class.php
@@ -5422,11 +5422,11 @@ class Product extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Retourne tableau de toutes les photos du produit
+ * Return an array with all photos of product found on disk. There is no sorting criteria.
*
- * @param string $dir Repertoire a scanner
- * @param int $nbmax Nombre maximum de photos (0=pas de max)
- * @return array Tableau de photos
+ * @param string $dir Directory to scan
+ * @param int $nbmax Number maxium of photos (0=no maximum)
+ * @return array Array of photos
*/
public function liste_photos($dir, $nbmax = 0)
{
@@ -5447,9 +5447,10 @@ class Product extends CommonObject
if (dol_is_file($dir.$file) && image_format_supported($file) >= 0) {
$nbphoto++;
- // On determine nom du fichier vignette
+ // We forge name of thumb.
$photo = $file;
$photo_vignette = '';
+ $regs = array();
if (preg_match('/('.$this->regeximgext.')$/i', $photo, $regs)) {
$photo_vignette = preg_replace('/'.$regs[0].'/i', '', $photo).'_small'.$regs[0];
}
@@ -5467,7 +5468,7 @@ class Product extends CommonObject
$tabobj[$nbphoto - 1] = $obj;
- // On continue ou on arrete de boucler ?
+ // Do we have to continue with next photo ?
if ($nbmax && $nbphoto >= $nbmax) {
break;
}
@@ -5482,9 +5483,9 @@ class Product extends CommonObject
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
/**
- * Efface la photo du produit et sa vignette
+ * Delete a photo and its thumbs
*
- * @param string $file Chemin de l'image
+ * @param string $file Path to image file
* @return void
*/
public function delete_photo($file)
diff --git a/htdocs/product/inventory/inventory.php b/htdocs/product/inventory/inventory.php
index 2abc830eb7c..89394e56e29 100644
--- a/htdocs/product/inventory/inventory.php
+++ b/htdocs/product/inventory/inventory.php
@@ -160,7 +160,7 @@ if ($action == 'update' && !empty($user->rights->stock->mouvement->creer)) {
if (! $error) {
$db->commit();
} else {
- $db->rollbak();
+ $db->rollback();
}
}
@@ -185,8 +185,11 @@ if ($action =='updateinventorylines' && $permissiontoadd) {
if (GETPOST("id_".$lineid, 'alpha') != '') { // If a value was set ('0' or something else)
$qtytoupdate = price2num(GETPOST("id_".$lineid, 'alpha'), 'MS');
-
$result = $inventoryline->fetch($lineid);
+ if ($qtytoupdate < 0) {
+ $result = -1;
+ setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors');
+ }
if ($result > 0) {
$inventoryline->qty_view = $qtytoupdate;
$resultupdate = $inventoryline->update($user);
@@ -251,7 +254,10 @@ if (empty($reshook)) {
$error++;
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Product")), null, 'errors');
}
-
+ if (price2num(GETPOST('qtytoadd'), 'MS') < 0) {
+ $error++;
+ setEventMessages($langs->trans("FieldCannotBeNegative", $langs->transnoentitiesnoconv("RealQty")), null, 'errors');
+ }
if (!$error && !empty($conf->productbatch->enabled)) {
$tmpproduct = new Product($db);
$result = $tmpproduct->fetch($fk_product);
@@ -654,7 +660,7 @@ if ($object->id > 0) {
// Real quantity
print '';
if ($object->status == $object::STATUS_VALIDATED) {
- $qty_view = GETPOST("id_".$obj->rowid) ? GETPOST("id_".$obj->rowid) : $obj->qty_view;
+ $qty_view = GETPOST("id_".$obj->rowid) && price2num(GETPOST("id_".$obj->rowid), 'MS') >= 0 ? GETPOST("id_".$obj->rowid) : $obj->qty_view;
$totalfound += price2num($qty_view, 'MS');
print ' ';
print ' ';
diff --git a/htdocs/product/stock/class/mouvementstock.class.php b/htdocs/product/stock/class/mouvementstock.class.php
index 959336c1671..5e609bbe301 100644
--- a/htdocs/product/stock/class/mouvementstock.class.php
+++ b/htdocs/product/stock/class/mouvementstock.class.php
@@ -370,8 +370,12 @@ class MouvementStock extends CommonObject
if (!empty($conf->productbatch->enabled) && $product->hasbatch() && !$skip_batch) {
$foundforbatch = 0;
$qtyisnotenough = 0;
+
foreach ($product->stock_warehouse[$entrepot_id]->detail_batch as $batchcursor => $prodbatch) {
- if ($batch != $batchcursor) continue;
+ if ((string) $batch != (string) $batchcursor) { // Lot '59' must be different than lot '59c'
+ continue;
+ }
+
$foundforbatch = 1;
if ($prodbatch->qty < abs($qty)) $qtyisnotenough = $prodbatch->qty;
break;
diff --git a/htdocs/product/stock/productlot_document.php b/htdocs/product/stock/productlot_document.php
index 5b19288deff..820ad4d38bb 100644
--- a/htdocs/product/stock/productlot_document.php
+++ b/htdocs/product/stock/productlot_document.php
@@ -94,7 +94,9 @@ $usercanread = $user->rights->produit->lire;
$usercancreate = $user->rights->produit->creer;
$usercandelete = $user->rights->produit->supprimer;
-$upload_dir = $conf->productbatch->multidir_output[$conf->entity];
+if (empty($upload_dir)) {
+ $upload_dir = $conf->productbatch->multidir_output[$conf->entity];
+}
$permissiontoread = $usercanread;
$permissiontoadd = $usercancreate;
diff --git a/htdocs/product/stock/stockatdate.php b/htdocs/product/stock/stockatdate.php
index b36d530d624..52addeba637 100644
--- a/htdocs/product/stock/stockatdate.php
+++ b/htdocs/product/stock/stockatdate.php
@@ -45,7 +45,7 @@ if ($user->socid) {
$result = restrictedArea($user, 'produit|service');
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context
-$hookmanager->initHooks(array('stockreplenishlist'));
+$hookmanager->initHooks(array('stockatdate'));
//checks if a product has been ordered
diff --git a/htdocs/public/agenda/agendaexport.php b/htdocs/public/agenda/agendaexport.php
index cc255b185ed..a0e7ea817a7 100644
--- a/htdocs/public/agenda/agendaexport.php
+++ b/htdocs/public/agenda/agendaexport.php
@@ -135,7 +135,12 @@ if (GETPOST("notolderthan", 'int')) {
} else {
$filters['notolderthan'] = $conf->global->MAIN_AGENDA_EXPORT_PAST_DELAY;
}
-
+if (GETPOST("module", 'alpha')) {
+ $filters['module'] = GETPOST("module", 'alpha');
+}
+if (GETPOST("status", 'int')) {
+ $filters['status'] = GETPOST("status", 'int');
+}
// Check config
if (empty($conf->global->MAIN_AGENDA_XCAL_EXPORTKEY)) {
$user->getrights();
@@ -201,6 +206,15 @@ foreach ($filters as $key => $value) {
if ($key == 'notactiontype') {
$filename .= '-notactiontype'.$value;
}
+ if ($key == 'actiontype') {
+ $filename .= '-actiontype'.$value;
+ }
+ if ($key == 'module') {
+ $filename .= '-module'.$value;
+ }
+ if ($key == 'status') {
+ $filename .= '-status'.$value;
+ }
}
// Add extension
if ($format == 'vcal') {
diff --git a/htdocs/public/eventorganization/attendee_subscription.php b/htdocs/public/eventorganization/attendee_subscription.php
index 70e994d57cd..a81ac456353 100644
--- a/htdocs/public/eventorganization/attendee_subscription.php
+++ b/htdocs/public/eventorganization/attendee_subscription.php
@@ -1,11 +1,5 @@
- * Copyright (C) 2001-2002 Jean-Louis Bergamo
- * Copyright (C) 2006-2013 Laurent Destailleur
- * Copyright (C) 2012 Regis Houssin
- * Copyright (C) 2012 J. Fernando Lagrange
- * Copyright (C) 2018-2019 Frédéric France
- * Copyright (C) 2018 Alexandre Spangaro
+/* Copyright (C) 2021 Dorian Vabre
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/htdocs/public/eventorganization/subscriptionok.php b/htdocs/public/eventorganization/subscriptionok.php
index 02fb456f7d2..8586535f5ab 100644
--- a/htdocs/public/eventorganization/subscriptionok.php
+++ b/htdocs/public/eventorganization/subscriptionok.php
@@ -3,6 +3,7 @@
* Copyright (C) 2006-2013 Laurent Destailleur
* Copyright (C) 2012 Regis Houssin
* Copyright (C) 2021 Waël Almoman
+ * Copyright (C) 2021 Dorian Vabre
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index b58a57fc706..377077531ae 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -5,6 +5,7 @@
* Copyright (C) 2018 Juanjo Menent
* Copyright (C) 2018-2019 Thibault FOUCART
* Copyright (C) 2021 Waël Almoman
+ * Copyright (C) 2021 Dorian Vabre
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -142,6 +143,23 @@ if ($source == 'conferencesubscription') {
}
}
}
+} elseif ($source == 'boothlocation') {
+ // Getting the amount to pay, the invoice, finding the thirdparty
+ $invoiceid = GETPOST('ref');
+ $invoice = new Facture($db);
+ $resultinvoice = $invoice->fetch($invoiceid);
+ if ($resultinvoice <= 0) {
+ setEventMessages(null, $invoice->errors, "errors");
+ } else {
+ $amount = price2num($invoice->total_ttc);
+ // Finding the associated thirdparty
+ $thirdparty = new Societe($db);
+ $resultthirdparty = $thirdparty->fetch($invoice->socid);
+ if ($resultthirdparty <= 0) {
+ setEventMessages(null, $thirdparty->errors, "errors");
+ }
+ $object = $thirdparty;
+ }
}
@@ -1807,9 +1825,92 @@ if ($source == 'conferencesubscription') {
// Object
$text = ''.$langs->trans("PaymentConferenceAttendee").' ';
- if (GETPOST('desc', 'alpha')) {
- $text = ''.$langs->trans(GETPOST('desc', 'alpha')).' ';
+ print ''.$langs->trans("Designation");
+ print ' '.$text;
+ print ' ';
+ print ' ';
+ print ' '."\n";
+
+ // Amount
+ print ''.$langs->trans("Amount");
+ print ' ';
+ $valtoshow = $amount;
+ print ''.price($valtoshow).' ';
+ print ' ';
+ print ' ';
+
+ // Currency
+ print ' '.$langs->trans("Currency".$currency).' ';
+ print ' ';
+ print ' '."\n";
+
+ // Tag
+ print ''.$langs->trans("PaymentCode");
+ print ' '.$fulltag.' ';
+ print ' ';
+ print ' ';
+ print ' '."\n";
+
+ // Shipping address
+ $shipToName = $thirdparty->getFullName($langs);
+ $shipToStreet = $thirdparty->address;
+ $shipToCity = $thirdparty->town;
+ $shipToState = $thirdparty->state_code;
+ $shipToCountryCode = $thirdparty->country_code;
+ $shipToZip = $thirdparty->zip;
+ $shipToStreet2 = '';
+ $phoneNum = $thirdparty->phone;
+ if ($shipToName && $shipToStreet && $shipToCity && $shipToCountryCode && $shipToZip) {
+ print '';
+ print ' '."\n";
+ print ' '."\n";
+ print ' '."\n";
+ print ' '."\n";
+ print ' '."\n";
+ print ' '."\n";
+ print ' '."\n";
+ print ' '."\n";
+ } else {
+ print ''."\n";
}
+ print ' '."\n";
+ print ' '."\n";
+ $labeldesc = $langs->trans("PaymentSubscription");
+ if (GETPOST('desc', 'alpha')) {
+ $labeldesc = GETPOST('desc', 'alpha');
+ }
+ print ' '."\n";
+}
+
+if ($source == 'boothlocation') {
+ $found = true;
+ $langs->load("members");
+
+ if (GETPOST('fulltag', 'alpha')) {
+ $fulltag = GETPOST('fulltag', 'alpha');
+ } else {
+ $fulltag = 'BOO='.GETPOST("booth").'.DAT='.dol_print_date(dol_now(), '%Y%m%d%H%M%S');
+ if (!empty($TAG)) {
+ $tag = $TAG; $fulltag .= '.TAG='.$TAG;
+ }
+ }
+ $fulltag = dol_string_unaccent($fulltag);
+
+ // Creditor
+ print ''.$langs->trans("Creditor");
+ print ' '.$creditor.' ';
+ print ' ';
+ print ' '."\n";
+
+ // Debitor
+ print ''.$langs->trans("Attendee");
+ print ' ';
+ print $thirdparty->name;
+ print ' ';
+ print ' '."\n";
+
+ // Object
+ $text = ''.$langs->trans("PaymentBoothLocation").' ';
print ''.$langs->trans("Designation");
print ' '.$text;
print ' ';
diff --git a/htdocs/public/payment/paymentok.php b/htdocs/public/payment/paymentok.php
index de9deb7d249..b589a6c37e0 100644
--- a/htdocs/public/payment/paymentok.php
+++ b/htdocs/public/payment/paymentok.php
@@ -4,6 +4,7 @@
* Copyright (C) 2012 Regis Houssin
* Copyright (C) 2021 Waël Almoman
* Copyright (C) 2021 Maxime Demarest
+ * Copyright (C) 2021 Dorian Vabre
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -52,6 +53,7 @@ require '../../main.inc.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/company.lib.php';
require_once DOL_DOCUMENT_ROOT.'/core/lib/payments.lib.php';
require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorboothattendee.class.php';
+require_once DOL_DOCUMENT_ROOT.'/eventorganization/class/conferenceorbooth.class.php';
if (!empty($conf->paypal->enabled)) {
require_once DOL_DOCUMENT_ROOT.'/paypal/lib/paypal.lib.php';
@@ -1024,52 +1026,55 @@ if ($ispaymentok) {
if ($resultattendee < 0) {
setEventMessages(null, $attendeetovalidate->errors, "errors");
} else {
- $attendeetovalidate->setStatut(1);
+ $attendeetovalidate->validate($user);
// Sending mail
$thirdparty = new Societe($db);
- $thirdparty->fetch($attendeetovalidate->fk_soc);
-
- require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
- include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
- $formmail = new FormMail($db);
- // Set output language
- $outputlangs = new Translate('', $conf);
- $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
- // Load traductions files required by page
- $outputlangs->loadLangs(array("main", "members"));
- // Get email content from template
- $arraydefaultmessage = null;
-
- $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
- if (!empty($labeltouse)) {
- $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
- }
-
- if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
- $subject = $arraydefaultmessage->topic;
- $msg = $arraydefaultmessage->content;
- }
-
- $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
- complete_substitutions_array($substitutionarray, $outputlangs, $object);
-
- $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
- $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
-
- $sendto = $thirdparty->email;
- $from = $conf->global->MAILING_EMAIL_FROM;
- $urlback = $_SERVER["REQUEST_URI"];
-
- $ishtml = dol_textishtml($texttosend); // May contain urls
-
- $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
-
- $result = $mailfile->sendfile();
- if ($result) {
- dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment');
+ $resultthirdparty = $thirdparty->fetch($attendeetovalidate->fk_soc);
+ if ($resultthirdparty < 0) {
+ setEventMessages(null, $attendeetovalidate->errors, "errors");
} else {
- dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
+ require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
+ $formmail = new FormMail($db);
+ // Set output language
+ $outputlangs = new Translate('', $conf);
+ $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
+ // Load traductions files required by page
+ $outputlangs->loadLangs(array("main", "members"));
+ // Get email content from template
+ $arraydefaultmessage = null;
+
+ $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
+ if (!empty($labeltouse)) {
+ $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
+ }
+
+ if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
+ $subject = $arraydefaultmessage->topic;
+ $msg = $arraydefaultmessage->content;
+ }
+
+ $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
+ complete_substitutions_array($substitutionarray, $outputlangs, $object);
+
+ $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
+ $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
+
+ $sendto = $thirdparty->email;
+ $from = $conf->global->MAILING_EMAIL_FROM;
+ $urlback = $_SERVER["REQUEST_URI"];
+
+ $ishtml = dol_textishtml($texttosend); // May contain urls
+
+ $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
+
+ $result = $mailfile->sendfile();
+ if ($result) {
+ dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment');
+ } else {
+ dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
+ }
}
}
} else {
@@ -1085,7 +1090,192 @@ if ($ispaymentok) {
$ispostactionok = -1;
}
} elseif (array_key_exists('BOO', $tmptag) && $tmptag['BOO'] > 0) {
- // @todo BOOTH CASE (to copy and adapt from above)
+ // Record payment
+ include_once DOL_DOCUMENT_ROOT.'/compta/facture/class/facture.class.php';
+ $object = new Facture($db);
+ $result = $object->fetch($ref);
+ if ($result) {
+ $FinalPaymentAmt = $_SESSION["FinalPaymentAmt"];
+
+ $paymentTypeId = 0;
+ if ($paymentmethod == 'paybox') {
+ $paymentTypeId = $conf->global->PAYBOX_PAYMENT_MODE_FOR_PAYMENTS;
+ }
+ if ($paymentmethod == 'paypal') {
+ $paymentTypeId = $conf->global->PAYPAL_PAYMENT_MODE_FOR_PAYMENTS;
+ }
+ if ($paymentmethod == 'stripe') {
+ $paymentTypeId = $conf->global->STRIPE_PAYMENT_MODE_FOR_PAYMENTS;
+ }
+ if (empty($paymentTypeId)) {
+ $paymentType = $_SESSION["paymentType"];
+ if (empty($paymentType)) {
+ $paymentType = 'CB';
+ }
+ $paymentTypeId = dol_getIdFromCode($db, $paymentType, 'c_paiement', 'code', 'id', 1);
+ }
+
+ $currencyCodeType = $_SESSION['currencyCodeType'];
+
+ // Do action only if $FinalPaymentAmt is set (session variable is cleaned after this page to avoid duplicate actions when page is POST a second time)
+ if (!empty($FinalPaymentAmt) && $paymentTypeId > 0) {
+ $resultvalidate = $object->validate($user);
+ if ($resultvalidate < 0) {
+ $postactionmessages[] = 'Cannot validate invoice';
+ $ispostactionok = -1;
+ $error++; // Not yet supported
+ } else {
+ $db->begin();
+
+ // Creation of payment line
+ include_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php';
+ $paiement = new Paiement($db);
+ $paiement->datepaye = $now;
+ if ($currencyCodeType == $conf->currency) {
+ $paiement->amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching with invoice id
+ } else {
+ $paiement->multicurrency_amounts = array($object->id => $FinalPaymentAmt); // Array with all payments dispatching
+
+ $postactionmessages[] = 'Payment was done in a different currency that currency expected of company';
+ $ispostactionok = -1;
+ $error++; // Not yet supported
+ }
+ $paiement->paiementid = $paymentTypeId;
+ $paiement->num_payment = '';
+ $paiement->note_public = 'Online payment '.dol_print_date($now, 'standard').' from '.$ipaddress;
+ $paiement->ext_payment_id = $TRANSACTIONID;
+ $paiement->ext_payment_site = $service;
+
+ if (!$error) {
+ $paiement_id = $paiement->create($user, 1); // This include closing invoices and regenerating documents
+ if ($paiement_id < 0) {
+ $postactionmessages[] = $paiement->error.' '.join(" \n", $paiement->errors);
+ $ispostactionok = -1;
+ $error++;
+ } else {
+ $postactionmessages[] = 'Payment created';
+ $ispostactionok = 1;
+ }
+ }
+
+ if (!$error && !empty($conf->banque->enabled)) {
+ $bankaccountid = 0;
+ if ($paymentmethod == 'paybox') {
+ $bankaccountid = $conf->global->PAYBOX_BANK_ACCOUNT_FOR_PAYMENTS;
+ } elseif ($paymentmethod == 'paypal') {
+ $bankaccountid = $conf->global->PAYPAL_BANK_ACCOUNT_FOR_PAYMENTS;
+ } elseif ($paymentmethod == 'stripe') {
+ $bankaccountid = $conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS;
+ }
+
+ if ($bankaccountid > 0) {
+ $label = '(CustomerInvoicePayment)';
+ if ($object->type == Facture::TYPE_CREDIT_NOTE) {
+ $label = '(CustomerInvoicePaymentBack)'; // Refund of a credit note
+ }
+ $result = $paiement->addPaymentToBank($user, 'payment', $label, $bankaccountid, '', '');
+ if ($result < 0) {
+ $postactionmessages[] = $paiement->error.' '.join(" \n", $paiement->errors);
+ $ispostactionok = -1;
+ $error++;
+ } else {
+ $postactionmessages[] = 'Bank transaction of payment created';
+ $ispostactionok = 1;
+ }
+ } else {
+ $postactionmessages[] = 'Setup of bank account to use in module '.$paymentmethod.' was not set. No way to record the payment.';
+ $ispostactionok = -1;
+ $error++;
+ }
+ }
+
+ if (!$error) {
+ // Putting the booth to "suggested" state
+ $booth = new ConferenceOrBooth($db);
+ $resultbooth = $booth->fetch($tmptag['BOO']);
+ if ($resultbooth < 0) {
+ $error++;
+ setEventMessages(null, $booth->errors, "errors");
+ } else {
+ $booth->status = CONFERENCEORBOOTH::STATUS_SUGGESTED;
+ $resultboothupdate = $booth->update($user);
+ if ($resultboothupdate<0) {
+ // Finding the thirdparty by getting the invoice
+ $invoice = new Facture($db);
+ $resultinvoice = $invoice->fetch($ref);
+ if ($resultinvoice<0) {
+ $postactionmessages[] = 'Could not find the associated invoice.';
+ $ispostactionok = -1;
+ $error++;
+ } else {
+ $thirdparty = new Societe($db);
+ $resultthirdparty = $thirdparty->fetch($invoice->socid);
+ if ($resultthirdparty<0) {
+ $error++;
+ setEventMessages(null, $thirdparty->errors, "errors");
+ } else {
+ // Sending mail
+ require_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
+ include_once DOL_DOCUMENT_ROOT.'/core/class/html.formmail.class.php';
+ $formmail = new FormMail($db);
+ // Set output language
+ $outputlangs = new Translate('', $conf);
+ $outputlangs->setDefaultLang(empty($thirdparty->default_lang) ? $mysoc->default_lang : $thirdparty->default_lang);
+ // Load traductions files required by page
+ $outputlangs->loadLangs(array("main", "members"));
+ // Get email content from template
+ $arraydefaultmessage = null;
+
+ $labeltouse = $conf->global->EVENTORGANIZATION_TEMPLATE_EMAIL_AFT_SUBS_EVENT;
+ if (!empty($labeltouse)) {
+ $arraydefaultmessage = $formmail->getEMailTemplate($db, 'eventorganization_send', $user, $outputlangs, $labeltouse, 1, '');
+ }
+
+ if (!empty($labeltouse) && is_object($arraydefaultmessage) && $arraydefaultmessage->id > 0) {
+ $subject = $arraydefaultmessage->topic;
+ $msg = $arraydefaultmessage->content;
+ }
+
+ $substitutionarray = getCommonSubstitutionArray($outputlangs, 0, null, $thirdparty);
+ complete_substitutions_array($substitutionarray, $outputlangs, $object);
+
+ $subjecttosend = make_substitutions($subject, $substitutionarray, $outputlangs);
+ $texttosend = make_substitutions($msg, $substitutionarray, $outputlangs);
+
+ $sendto = $thirdparty->email;
+ $from = $conf->global->MAILING_EMAIL_FROM;
+ $urlback = $_SERVER["REQUEST_URI"];
+
+ $ishtml = dol_textishtml($texttosend); // May contain urls
+
+ $mailfile = new CMailFile($subjecttosend, $sendto, $from, $texttosend, array(), array(), array(), '', '', 0, $ishtml);
+
+ $result = $mailfile->sendfile();
+ if ($result) {
+ dol_syslog("EMail sent to ".$sendto, LOG_DEBUG, 0, '_payment');
+ } else {
+ dol_syslog("Failed to send EMail to ".$sendto, LOG_ERR, 0, '_payment');
+ }
+ }
+ }
+ }
+ }
+ }
+
+ if (!$error) {
+ $db->commit();
+ } else {
+ $db->rollback();
+ }
+ }
+ } else {
+ $postactionmessages[] = 'Failed to get a valid value for "amount paid" ('.$FinalPaymentAmt.') or "payment type" ('.$paymentType.') to record the payment of invoice '.$tmptag['ATT'].'. May be payment was already recorded.';
+ $ispostactionok = -1;
+ }
+ } else {
+ $postactionmessages[] = 'Invoice paid '.$tmptag['ATT'].' was not found';
+ $ispostactionok = -1;
+ }
} else {
// Nothing done
}
diff --git a/htdocs/public/project/index.php b/htdocs/public/project/index.php
index 013f290dc6a..48c77944d72 100644
--- a/htdocs/public/project/index.php
+++ b/htdocs/public/project/index.php
@@ -1,10 +1,5 @@
- * Copyright (C) 2006-2017 Laurent Destailleur
- * Copyright (C) 2009-2012 Regis Houssin
- * Copyright (C) 2018 Juanjo Menent
- * Copyright (C) 2018-2019 Thibault FOUCART
- * Copyright (C) 2021 Waël Almoman
+/* Copyright (C) 2021 Dorian Vabre
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -103,6 +98,23 @@ if ($resultproject < 0) {
* Actions
*/
+if (GETPOST('suggestbooth')) {
+ header("Location: ".dol_buildpath('/public/project/suggestbooth.php', 1).'?id='.$id."&securekey=".$securekeyreceived);
+ exit;
+}
+
+if (GETPOST('suggestconference')) {
+ header("Location: ".dol_buildpath('/public/project/suggestconference.php', 1).'?id='.$id."&securekey=".$securekeyreceived);
+ exit;
+}
+
+if (GETPOST('viewandvote')) {
+ header("Location: ".dol_buildpath('/public/project/viewandvote.php', 1).'?id='.$id."&securekey=".$securekeyreceived);
+ exit;
+}
+
+
+
/*
* View
@@ -117,17 +129,7 @@ $conf->dol_hide_topmenu = 1;
$conf->dol_hide_leftmenu = 1;
$replacemainarea = (empty($conf->dol_hide_leftmenu) ? '' : '').'
';
-llxHeader($head, $langs->trans("PaymentForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
-
-
-// Show sandbox warning
-if ((empty($paymentmethod) || $paymentmethod == 'paypal') && !empty($conf->paypal->enabled) && (!empty($conf->global->PAYPAL_API_SANDBOX) || GETPOST('forcesandbox', 'int'))) { // We can force sand box with param 'forcesandbox'
- dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Paypal'), '', 'warning');
-}
-if ((empty($paymentmethod) || $paymentmethod == 'stripe') && !empty($conf->stripe->enabled) && (empty($conf->global->STRIPE_LIVE) || GETPOST('forcesandbox', 'int'))) {
- dol_htmloutput_mesg($langs->trans('YouAreCurrentlyInSandboxMode', 'Stripe'), '', 'warning');
-}
-
+llxHeader($head, $langs->trans("SuggestForm"), '', '', 0, 0, '', '', '', 'onlinepaymentbody', $replacemainarea);
print '
'."\n";
print '
'."\n";
@@ -135,8 +137,9 @@ print '