';
// End of page
diff --git a/htdocs/hrm/admin/admin_hrm.php b/htdocs/hrm/admin/admin_hrm.php
index c839e7c4cd4..dcf4fe8bbec 100644
--- a/htdocs/hrm/admin/admin_hrm.php
+++ b/htdocs/hrm/admin/admin_hrm.php
@@ -34,7 +34,7 @@ $action = GETPOST('action', 'alpha');
// Other parameters HRM_*
$list = array(
- 'HRM_EMAIL_EXTERNAL_SERVICE' // To prevent your public accountant for example
+// 'HRM_EMAIL_EXTERNAL_SERVICE' // To prevent your public accountant for example
);
/*
@@ -82,7 +82,7 @@ dol_fiche_head($head, 'parameters', $langs->trans("HRM"), -1, "user");
print '
';
diff --git a/htdocs/install/mysql/data/llx_c_action_trigger.sql b/htdocs/install/mysql/data/llx_c_action_trigger.sql
index dee1200389c..eeca137dbc0 100644
--- a/htdocs/install/mysql/data/llx_c_action_trigger.sql
+++ b/htdocs/install/mysql/data/llx_c_action_trigger.sql
@@ -124,11 +124,25 @@ insert into llx_c_action_trigger (code,label,description,elementtype,rang) value
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_CLOSE','BOM disabled','Executed when a BOM is disabled','bom',652);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_REOPEN','BOM reopen','Executed when a BOM is re-open','bom',653);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('BOM_DELETE','BOM deleted','Executed when a BOM deleted','bom',654);
-insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','bom',660);
-insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','bom',661);
-insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','bom',662);
-insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','bom',663);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_VALIDATE','MO validated','Executed when a MO is validated','mrp',660);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_PRODUCED','MO produced','Executed when a MO is produced','mrp',661);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_DELETE','MO deleted','Executed when a MO is deleted','mrp',662);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('MRP_MO_CANCEL','MO canceled','Executed when a MO is canceled','mrp',663);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact address record','contact',51);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52);
+
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516);
+
-- actions not enabled by default : they are excluded when we enable the module Agenda (except TASK_...)
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_CREATE','Task created','Executed when a project task is created','project',150);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_MODIFY','Task modified','Executed when a project task is modified','project',151);
insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('TASK_DELETE','Task deleted','Executed when a project task is deleted','project',152);
+
diff --git a/htdocs/install/mysql/data/llx_c_email_templates.sql b/htdocs/install/mysql/data/llx_c_email_templates.sql
index f417804ff93..253ace246e7 100644
--- a/htdocs/install/mysql/data/llx_c_email_templates.sql
+++ b/htdocs/install/mysql/data/llx_c_email_templates.sql
@@ -30,3 +30,5 @@ INSERT INTO llx_c_email_templates (entity,module,type_template,lang,private,fk_u
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__(Sincerely)__ __USER_SIGNATURE__',null, 0);
+
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 02231edfc6e..322b1bee322 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
@@ -60,10 +60,10 @@ ALTER TABLE llx_commande MODIFY COLUMN date_livraison DATETIME;
ALTER TABLE llx_website ADD COLUMN position integer DEFAULT 0;
ALTER TABLE llx_establishment ADD COLUMN ref varchar(30);
-ALTER TABLE llx_establishment ADD COLUMN name varchar(128);
+ALTER TABLE llx_establishment ADD COLUMN label varchar(128);
UPDATE llx_establishment SET ref = rowid WHERE ref IS NULL;
ALTER TABLE llx_establishment MODIFY COLUMN ref varchar(30) NOT NULL;
-ALTER TABLE llx_establishment MODIFY COLUMN name varchar(128);
+ALTER TABLE llx_establishment MODIFY COLUMN label varchar(128);
INSERT INTO llx_const (name, entity, value, type, visible) VALUES ('PRODUCT_PRICE_BASE_TYPE', 0, 'HT', 'string', 0);
@@ -145,6 +145,7 @@ ALTER TABLE llx_recruitment_recruitmentjobposition_extrafields ADD INDEX idx_fk_
CREATE TABLE llx_recruitment_recruitmentcandidature(
-- BEGIN MODULEBUILDER FIELDS
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
+ entity integer NOT NULL DEFAULT 1,
fk_recruitmentjobposition INTEGER NULL,
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
description text,
@@ -163,10 +164,13 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
phone varchar(64),
remuneration_requested integer,
remuneration_proposed integer,
+ email_msgid varchar(255),
fk_recruitment_origin INTEGER NULL
-- END MODULEBUILDER FIELDS
) ENGINE=innodb;
+ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN entity integer NOT NULL DEFAULT 1;
+ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN email_msgid varchar(255);
ALTER TABLE llx_recruitment_recruitmentcandidature ADD COLUMN fk_recruitment_origin INTEGER NULL;
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_rowid (rowid);
@@ -174,8 +178,6 @@ ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_rec
ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_recruitment_recruitmentcandidature_fk_user_creat FOREIGN KEY (fk_user_creat) REFERENCES llx_user(rowid);
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_status (status);
-
-
create table llx_recruitment_recruitmentcandidature_extrafields
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
@@ -186,6 +188,7 @@ create table llx_recruitment_recruitmentcandidature_extrafields
ALTER TABLE llx_recruitment_recruitmentcandidature_extrafields ADD INDEX idx_fk_object(fk_object);
+ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
@@ -245,6 +248,8 @@ create table llx_c_recruitment_origin
)ENGINE=innodb;
+ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
+
ALTER TABLE llx_product MODIFY COLUMN seuil_stock_alerte float;
ALTER TABLE llx_product MODIFY COLUMN desiredstock float;
@@ -258,3 +263,22 @@ ALTER TABLE llx_actioncomm ADD COLUMN reply_to varchar(255);
ALTER TABLE llx_paiement ADD pos_change DOUBLE(24,8) DEFAULT 0 AFTER fk_export_compta;
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_CREATE','Contact address created','Executed when a contact is created','contact',50);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_SENTBYMAIL','Mails sent from third party card','Executed when you send email from contact adress card','contact',51);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('CONTACT_DELETE','Contact address deleted','Executed when a contact is deleted','contact',52);
+
+ALTER TABLE llx_ecm_directories CHANGE COLUMN date_m tms timestamp;
+ALTER TABLE llx_ecm_files CHANGE COLUMN date_m tms timestamp;
+
+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__(YourCandidatureAnswer)__ \n
\n__(Sincerely)__ __USER_SIGNATURE__',null, 0);
+
+ALTER TABLE llx_c_action_trigger MODIFY COLUMN code varchar(64) NOT NULL;
+
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_CREATE','Job created','Executed when a job is created','recruitment',7500);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_MODIFY','Job modified','Executed when a job is modified','recruitment',7502);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_SENTBYMAIL','Mails sent from job record','Executed when you send email from job record','recruitment',7504);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTJOBPOSITION_DELETE','Job deleted','Executed when a job is deleted','recruitment',7506);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_CREATE','Candidature created','Executed when a candidature is created','recruitment',7510);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_MODIFY','Candidature modified','Executed when a candidature is modified','recruitment',7512);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_SENTBYMAIL','Mails sent from candidature record','Executed when you send email from candidature record','recruitment',7514);
+insert into llx_c_action_trigger (code,label,description,elementtype,rang) values ('RECRUITMENTCANDIDATURE_DELETE','Candidature deleted','Executed when a candidature is deleted','recruitment',7516);
diff --git a/htdocs/install/mysql/tables/llx_c_action_trigger.sql b/htdocs/install/mysql/tables/llx_c_action_trigger.sql
index c29f13b9fd4..8f7450d0fe9 100644
--- a/htdocs/install/mysql/tables/llx_c_action_trigger.sql
+++ b/htdocs/install/mysql/tables/llx_c_action_trigger.sql
@@ -23,7 +23,7 @@ create table llx_c_action_trigger
(
rowid integer AUTO_INCREMENT PRIMARY KEY,
elementtype varchar(64) NOT NULL,
- code varchar(32) NOT NULL,
+ code varchar(64) NOT NULL,
label varchar(128) NOT NULL,
description varchar(255),
rang integer DEFAULT 0
diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.key.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.key.sql
new file mode 100644
index 00000000000..4c191193754
--- /dev/null
+++ b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.key.sql
@@ -0,0 +1,21 @@
+-- ============================================================================
+-- Copyright (C) 2020 John BOTELLA
+--
+-- 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
+-- the Free Software Foundation; either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see .
+--
+-- ============================================================================
+
+
+ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE( fk_product_attribute_combination, fk_price_level);
+
diff --git a/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql
index ae068b71ed0..70086f82068 100644
--- a/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql
+++ b/htdocs/install/mysql/tables/llx_product_attribute_combination_price_level.sql
@@ -25,4 +25,3 @@ CREATE TABLE llx_product_attribute_combination_price_level
variation_price_percentage INTEGER NULL
)ENGINE=innodb;
-ALTER TABLE llx_product_attribute_combination_price_level ADD UNIQUE( fk_product_attribute_combination, fk_price_level);
diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql
index 8f92832c2a3..93fb231dc35 100644
--- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql
+++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.key.sql
@@ -21,7 +21,7 @@ ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_recruitmen
ALTER TABLE llx_recruitment_recruitmentcandidature ADD INDEX idx_recruitment_recruitmentcandidature_status (status);
-- END MODULEBUILDER INDEXES
---ALTER TABLE llx_mymodule_myobject ADD UNIQUE INDEX uk_mymodule_myobject_fieldxy(fieldx, fieldy);
+ALTER TABLE llx_recruitment_recruitmentcandidature ADD UNIQUE INDEX uk_recruitmentcandidature_email_msgid(email_msgid);
---ALTER TABLE llx_mymodule_myobject ADD CONSTRAINT llx_mymodule_myobject_fk_field FOREIGN KEY (fk_field) REFERENCES llx_mymodule_myotherobject(rowid);
+--ALTER TABLE llx_recruitment_recruitmentcandidature ADD CONSTRAINT llx_mymodule_myobject_fk_field FOREIGN KEY (fk_field) REFERENCES llx_mymodule_myotherobject(rowid);
diff --git a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
index a635a11b8fe..924d80ba540 100644
--- a/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
+++ b/htdocs/install/mysql/tables/llx_recruitment_recruitmentcandidature.sql
@@ -17,8 +17,9 @@
CREATE TABLE llx_recruitment_recruitmentcandidature(
-- BEGIN MODULEBUILDER FIELDS
rowid integer AUTO_INCREMENT PRIMARY KEY NOT NULL,
- fk_recruitmentjobposition INTEGER NULL,
+ entity integer NOT NULL DEFAULT 1,
ref varchar(128) DEFAULT '(PROV)' NOT NULL,
+ fk_recruitmentjobposition INTEGER NULL,
description text,
note_public text,
note_private text,
@@ -35,6 +36,7 @@ CREATE TABLE llx_recruitment_recruitmentcandidature(
phone varchar(64),
remuneration_requested integer,
remuneration_proposed integer,
+ email_msgid varchar(255),
fk_recruitment_origin INTEGER NULL
-- END MODULEBUILDER FIELDS
) ENGINE=innodb;
diff --git a/htdocs/install/pgsql/functions/functions.sql b/htdocs/install/pgsql/functions/functions.sql
index 22c122a1164..309343b7789 100644
--- a/htdocs/install/pgsql/functions/functions.sql
+++ b/htdocs/install/pgsql/functions/functions.sql
@@ -102,6 +102,8 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_cronjob FOR EACH ROW
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_deplacement FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_don_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_files FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_element_resources FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_emailcollector_emailcollector FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_emailcollector_emailcollectoraction FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
@@ -150,6 +152,7 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_customer_pri
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_fournisseur_price FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price_by_qty FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_stock FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_projet FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_projet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
@@ -161,6 +164,10 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal_extrafields F
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propal_merge_pdf_product FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_propaldet_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_resource FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentjobposition FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentjobposition_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentcandidature FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
+CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_recruitment_recruitmentcandidature_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_address FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_societe_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
@@ -178,13 +185,5 @@ CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user FOR EACH ROW EX
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_user_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_usergroup FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_usergroup_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
-CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_product_price_by_qty FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_website FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_website_page FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
-CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_extrafields FOR EACH ROW EXECUTE PROCEDURE update_modified_column_tms();
-
-
--- Add triggers for timestamp fields named date_m
-CREATE OR REPLACE FUNCTION update_modified_column_date_m() RETURNS TRIGGER AS $$ BEGIN NEW.date_m = now(); RETURN NEW; END; $$ LANGUAGE plpgsql;
-CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_directories FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_m();
-CREATE TRIGGER update_customer_modtime BEFORE UPDATE ON llx_ecm_files FOR EACH ROW EXECUTE PROCEDURE update_modified_column_date_m();
diff --git a/htdocs/langs/am_ET/other.lang b/htdocs/langs/am_ET/other.lang
index 5dc70fa068f..ce26b5318ca 100644
--- a/htdocs/langs/am_ET/other.lang
+++ b/htdocs/langs/am_ET/other.lang
@@ -255,10 +255,7 @@ YourPasswordHasBeenReset=Your password has been reset successfully
ApplicantIpAddress=IP address of applicant
SMSSentTo=SMS sent to %s
MissingIds=Missing ids
-ThirdPartyCreatedByEmailCollector=Third party created by email collector from email MSGID %s
-ContactCreatedByEmailCollector=Contact/address created by email collector from email MSGID %s
-ProjectCreatedByEmailCollector=Project created by email collector from email MSGID %s
-TicketCreatedByEmailCollector=Ticket created by email collector from email MSGID %s
+RecordCreatedByEmailCollector=Record created by email collector from email MSGID %s
OpeningHoursFormatDesc=Use a - to separate opening and closing hours. Use a space to enter different ranges. Example: 8-12 14-18
##### Export #####
diff --git a/htdocs/langs/en_US/admin.lang b/htdocs/langs/en_US/admin.lang
index fbbdf81ff93..1daec4b0001 100644
--- a/htdocs/langs/en_US/admin.lang
+++ b/htdocs/langs/en_US/admin.lang
@@ -1992,7 +1992,7 @@ ImportSetup=Setup of module Import
InstanceUniqueID=Unique ID of the instance
SmallerThan=Smaller than
LargerThan=Larger than
-IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID is found into incoming email, the event will be automatically linked to the related objects.
+IfTrackingIDFoundEventWillBeLinked=Note that If a tracking ID of an object is found into incoming email, or if the email is an answer of an email aready collected and linked to an object, the event will be automatically linked to the known related object too.
WithGMailYouCanCreateADedicatedPassword=With a GMail account, if you enabled the 2 steps validation, it is recommanded to create a dedicated second password for the application instead of using your own account passsword from https://myaccount.google.com/.
EmailCollectorTargetDir=It may be a desired behaviour to move the email into another tag/directory when it was processed successfully. Just set name of directory here to use this feature (Do NOT use special characters in name). Note that you must also use a read/write login account.
EmailCollectorLoadThirdPartyHelp=You can use this action to use the email content to find and load an existing thirdparty in your database. The found (or created) thirdparty will be used for following actions that need it. In the parameter field you can use for example 'EXTRACT:BODY:Name:\s([^\s]*)' if you want to extract the name of the thirdparty from a string 'Name: name to find' found into the body.
diff --git a/htdocs/langs/en_US/agenda.lang b/htdocs/langs/en_US/agenda.lang
index 976b3f7acf2..d048a758996 100644
--- a/htdocs/langs/en_US/agenda.lang
+++ b/htdocs/langs/en_US/agenda.lang
@@ -86,6 +86,8 @@ ProposalDeleted=Proposal deleted
OrderDeleted=Order deleted
InvoiceDeleted=Invoice deleted
DraftInvoiceDeleted=Draft invoice deleted
+CONTACT_CREATEInDolibarr=Contact %s created
+CONTACT_DELETEInDolibarr=Contact %s deleted
PRODUCT_CREATEInDolibarr=Product %s created
PRODUCT_MODIFYInDolibarr=Product %s modified
PRODUCT_DELETEInDolibarr=Product %s deleted
diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang
index 69025458630..f4ee6768626 100644
--- a/htdocs/langs/en_US/boxes.lang
+++ b/htdocs/langs/en_US/boxes.lang
@@ -84,6 +84,7 @@ BoxTitleLastModifiedCustomerBills=Customer Invoices: last %s modified
BoxTitleLastModifiedCustomerOrders=Sales Orders: last %s modified
BoxTitleLastModifiedPropals=Latest %s modified proposals
BoxTitleLatestModifiedJobPositions=Latest %s modified jobs
+BoxTitleLatestModifiedCandidatures=Latest %s modified candidatures
ForCustomersInvoices=Customers invoices
ForCustomersOrders=Customers orders
ForProposals=Proposals
diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang
index 62f028b45e4..13a4581fc38 100644
--- a/htdocs/langs/en_US/errors.lang
+++ b/htdocs/langs/en_US/errors.lang
@@ -242,6 +242,7 @@ ErrorTooManyDifferentValueForSelectedGroupBy=Found too many different value (mor
ErrorReplaceStringEmpty=Error, the string to replace into is empty
ErrorProductNeedBatchNumber=Error, product '%s' need a lot/serial number
ErrorProductDoesNotNeedBatchNumber=Error, product '%s' does not accept a lot/serial number
+ErrorFailedToReadObject=Error, failed to read object of type %s
# Warnings
WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup.
WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user.
diff --git a/htdocs/langs/en_US/main.lang b/htdocs/langs/en_US/main.lang
index 1466b6389a9..186272da1b6 100644
--- a/htdocs/langs/en_US/main.lang
+++ b/htdocs/langs/en_US/main.lang
@@ -1077,4 +1077,8 @@ AmountMustBePositive=Amount must be positive
ByStatus=By status
InformationMessage=Information
ASAP=As Soon As Possible
-
\ No newline at end of file
+CREATEInDolibarr=Record %s create
+MODIFYInDolibarr=Record %s modified
+DELETEInDolibarr=Record %s deleted
+VALIDATEInDolibarr=Record %s validated
+APPROVEDInDolibarr=Record %s approved
diff --git a/htdocs/langs/en_US/mrp.lang b/htdocs/langs/en_US/mrp.lang
index faa8eb60cf4..74877a97297 100644
--- a/htdocs/langs/en_US/mrp.lang
+++ b/htdocs/langs/en_US/mrp.lang
@@ -1,5 +1,6 @@
Mrp=Manufacturing Orders
MO=Manufacturing Order
+MOs=Manufacturing orders
MRPDescription=Module to manage production and Manufacturing Orders (MO).
MRPArea=MRP Area
MrpSetupPage=Setup of module MRP
diff --git a/htdocs/langs/en_US/recruitment.lang b/htdocs/langs/en_US/recruitment.lang
index aa4f12c1263..73e9a7fa07f 100644
--- a/htdocs/langs/en_US/recruitment.lang
+++ b/htdocs/langs/en_US/recruitment.lang
@@ -61,4 +61,10 @@ RequestedRemuneration=Requested remuneration
ProposedRemuneration=Proposed remuneration
ContractProposed=Contract proposed
ContractSigned=Contract signed
-RecruitmentCandidature=Candidature
\ No newline at end of file
+RecruitmentCandidature=Candidature
+JobPositions=Job positions
+RecruitmentCandidatures=Candidatures
+InterviewToDo=Interview to do
+AnswerCandidature=Candidature answer
+YourCandidature=Your candidature
+YourCandidatureAnswerMessage=Thanks you for your candidature. ...
diff --git a/htdocs/langs/en_US/stocks.lang b/htdocs/langs/en_US/stocks.lang
index ce128bc5c91..81163e8d4b0 100644
--- a/htdocs/langs/en_US/stocks.lang
+++ b/htdocs/langs/en_US/stocks.lang
@@ -238,5 +238,5 @@ StockAtDatePastDesc=You can view here the stock (real stock) at a given date in
StockAtDateFutureDesc=You can view here the stock (virtual stock) at a given date in future
CurrentStock=Current stock
InventoryRealQtyHelp=Set value to 0 to reset qty Keep field empty, or remove line, to keep unchanged
-UpdateByScaningProductBarcode=Update by scaning product barcode
-UpdateByScaningLot=Update by scaning lot
+UpdateByScaningProductBarcode=Update by scan (product barcode)
+UpdateByScaningLot=Update by scan (lot|Serial barcode)
diff --git a/htdocs/langs/en_US/zapier.lang b/htdocs/langs/en_US/zapier.lang
index 6d6eda71313..c688a0c307f 100644
--- a/htdocs/langs/en_US/zapier.lang
+++ b/htdocs/langs/en_US/zapier.lang
@@ -26,3 +26,4 @@ ModuleZapierForDolibarrDesc = Zapier for Dolibarr module
# Admin page
#
ZapierForDolibarrSetup = Setup of Zapier for Dolibarr
+ZapierDescription=Interface with Zapier
\ No newline at end of file
diff --git a/htdocs/margin/lib/margins.lib.php b/htdocs/margin/lib/margins.lib.php
index fdfea1610bf..bf6447e8c21 100644
--- a/htdocs/margin/lib/margins.lib.php
+++ b/htdocs/margin/lib/margins.lib.php
@@ -44,9 +44,9 @@ function marges_admin_prepare_head()
// Entries must be declared in modules descriptor with line
// $this->tabs = array('entity:+tabname:Title:@mymodule:/mymodule/mypage.php?id=__ID__'); to add new tab
// $this->tabs = array('entity:-tabname); to remove a tab
- complete_head_from_modules($conf, $langs, '', $head, $h, 'margesadmin');
+ complete_head_from_modules($conf, $langs, null, $head, $h, 'margesadmin');
- complete_head_from_modules($conf, $langs, '', $head, $h, 'margesadmin', 'remove');
+ complete_head_from_modules($conf, $langs, null, $head, $h, 'margesadmin', 'remove');
return $head;
}
diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php
index 5a2e27e6bc6..3a64bc557ea 100644
--- a/htdocs/modulebuilder/template/class/myobject.class.php
+++ b/htdocs/modulebuilder/template/class/myobject.class.php
@@ -32,6 +32,11 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/commonobject.class.php';
*/
class MyObject extends CommonObject
{
+ /**
+ * @var string ID of module.
+ */
+ public $module = 'mymodule';
+
/**
* @var string ID to identify managed object.
*/
diff --git a/htdocs/modulebuilder/template/myobject_card.php b/htdocs/modulebuilder/template/myobject_card.php
index a85f84a50ba..dfa79e499bc 100644
--- a/htdocs/modulebuilder/template/myobject_card.php
+++ b/htdocs/modulebuilder/template/myobject_card.php
@@ -157,7 +157,7 @@ if (empty($reshook))
if ($action == 'set_thirdparty' && $permissiontoadd)
{
- $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, 'MYOBJECT_MODIFY');
+ $object->setValueFrom('fk_soc', GETPOST('fk_soc', 'int'), '', '', 'date', '', $user, $triggermodname);
}
if ($action == 'classin' && $permissiontoadd)
{
@@ -165,7 +165,7 @@ if (empty($reshook))
}
// Actions to send emails
- $triggersendname = 'MYOBJECT_SENTBYMAIL';
+ $triggersendname = 'MYMODULE_MYOBJECT_SENTBYMAIL';
$autocopy = 'MAIN_MAIL_AUTOCOPY_MYOBJECT_TO';
$trackid = 'myobject'.$object->id;
include DOL_DOCUMENT_ROOT.'/core/actions_sendmails.inc.php';
diff --git a/htdocs/multicurrency/class/multicurrency.class.php b/htdocs/multicurrency/class/multicurrency.class.php
index 8acd4430e47..7626db8082a 100644
--- a/htdocs/multicurrency/class/multicurrency.class.php
+++ b/htdocs/multicurrency/class/multicurrency.class.php
@@ -548,7 +548,7 @@ class MultiCurrency extends CommonObject
*
* @param int $fk_facture id of facture
* @param double $amount amount to convert
- * @param string $way dolibarr mean the amount is in dolibarr currency
+ * @param string $way 'dolibarr' mean the amount is in dolibarr currency
* @param string $table facture or facture_fourn
* @return double amount converted
*/
@@ -558,8 +558,8 @@ class MultiCurrency extends CommonObject
if ($multicurrency_tx)
{
- if ($way == 'dolibarr') return $amount * $multicurrency_tx;
- else return $amount / $multicurrency_tx;
+ if ($way == 'dolibarr') return price2num($amount * $multicurrency_tx, 'MU');
+ else return price2num($amount / $multicurrency_tx, 'MU');
} else return $amount;
}
diff --git a/htdocs/opensurvey/fonctions.php b/htdocs/opensurvey/fonctions.php
index 635fc3ceb5c..7be560cca28 100644
--- a/htdocs/opensurvey/fonctions.php
+++ b/htdocs/opensurvey/fonctions.php
@@ -90,7 +90,6 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $
print "\n";
// Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo)
- $width = 0;
// Define logo and logosmall
$logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
@@ -102,12 +101,10 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
- $width = 150;
} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
- $width = 150;
}
// Output html code for logo
@@ -116,7 +113,6 @@ function llxHeaderSurvey($title, $head = "", $disablejs = 0, $disablehead = 0, $
print '
';
print '
';
print '';
print '
';
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
diff --git a/htdocs/projet/class/project.class.php b/htdocs/projet/class/project.class.php
index 07846951acf..2c5f0a1ddb8 100644
--- a/htdocs/projet/class/project.class.php
+++ b/htdocs/projet/class/project.class.php
@@ -469,11 +469,13 @@ class Project extends CommonObject
/**
* Get object from database
*
- * @param int $id Id of object to load
- * @param string $ref Ref of project
- * @return int >0 if OK, 0 if not found, <0 if KO
+ * @param int $id Id of object to load
+ * @param string $ref Ref of project
+ * @param string $ref_ext Ref ext of project
+ * @param string $email_msgid Email msgid
+ * @return int >0 if OK, 0 if not found, <0 if KO
*/
- public function fetch($id, $ref = '')
+ public function fetch($id, $ref = '', $ref_ext = '', $email_msgid = '')
{
global $conf;
@@ -485,11 +487,16 @@ class Project extends CommonObject
$sql .= " FROM ".MAIN_DB_PREFIX."projet";
if (!empty($id))
{
- $sql .= " WHERE rowid=".$id;
- } elseif (!empty($ref))
- {
- $sql .= " WHERE ref='".$this->db->escape($ref)."'";
- $sql .= " AND entity IN (".getEntity('project').")";
+ $sql .= " WHERE rowid = ".$id;
+ } else {
+ $sql .= " WHERE entity IN (".getEntity('project').")";
+ if (! empty($ref)) {
+ $sql .= " AND ref = '".$this->db->escape($ref)."'";
+ } elseif (! empty($ref_ext)) {
+ $sql .= " AND ref_ext = '".$this->db->escape($ref_ext)."'";
+ } else {
+ $sql .= " AND email_msgid = '".$this->db->escape($email_msgid)."'";
+ }
}
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
diff --git a/htdocs/public/members/new.php b/htdocs/public/members/new.php
index 7eb45f008e6..501fccc6ed3 100644
--- a/htdocs/public/members/new.php
+++ b/htdocs/public/members/new.php
@@ -100,21 +100,17 @@ function llxHeaderVierge($title, $head = "", $disablejs = 0, $disablehead = 0, $
print '';
// Define urllogo
- $width = 0;
$urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png';
if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/thumbs/'.$mysoc->logo_small);
- $width = 150;
} elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&modulepart=mycompany&file='.urlencode('logos/'.$mysoc->logo);
- $width = 150;
} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg'))
{
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
- $width = 150;
}
print '
'."\n";
// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
-$width = 0;
// Define logo and logosmall
$logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
@@ -171,12 +170,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
- $width = 150;
} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
- $width = 150;
}
// Output html code for logo
if ($urllogo)
@@ -184,7 +181,6 @@ if ($urllogo)
print '
';
print '
';
print '';
print '
';
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php
index b2931d4cc26..f7f632459d4 100644
--- a/htdocs/public/payment/newpayment.php
+++ b/htdocs/public/payment/newpayment.php
@@ -747,7 +747,6 @@ print "\n";
// Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo)
-$width = 0;
// Define logo and logosmall
$logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
@@ -762,12 +761,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
- $width = 150;
} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
- $width = 150;
}
// Output html code for logo
@@ -776,7 +773,6 @@ if ($urllogo)
print '
'."\n";
// Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo)
-$width = 0;
// Define logo and logosmall
$logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
@@ -222,12 +221,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
- $width = 150;
} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
- $width = 150;
}
// Output html code for logo
@@ -236,7 +233,6 @@ if ($urllogo)
print '
'."\n";
// Show logo (search order: logo defined by PAYMENT_LOGO_suffix, then PAYMENT_LOGO, then small company logo, large company logo, theme logo, common logo)
-$width = 0;
// Define logo and logosmall
$logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
@@ -162,12 +161,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
- $width = 150;
} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
- $width = 150;
}
// Output html code for logo
@@ -176,7 +173,6 @@ if ($urllogo)
print '
'."\n";
// Show logo (search order: logo defined by ONLINE_SIGN_LOGO_suffix, then ONLINE_SIGN_LOGO_, then small company logo, large company logo, theme logo, common logo)
-$width = 0;
// Define logo and logosmall
$logosmall = $mysoc->logo_small;
$logo = $mysoc->logo;
@@ -197,12 +196,10 @@ if (!empty($logosmall) && is_readable($conf->mycompany->dir_output.'/logos/thumb
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/thumbs/'.$logosmall);
- $width = 150;
} elseif (!empty($logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$logo))
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
$urllogofull = $dolibarr_main_url_root.'/viewimage.php?modulepart=mycompany&entity='.$conf->entity.'&file='.urlencode('logos/'.$logo);
- $width = 150;
}
// Output html code for logo
if ($urllogo)
@@ -210,7 +207,6 @@ if ($urllogo)
print '
';
print '
';
print '';
print '
';
if (empty($conf->global->MAIN_HIDE_POWERED_BY)) {
diff --git a/htdocs/recruitment/admin/candidature_extrafields.php b/htdocs/recruitment/admin/candidature_extrafields.php
new file mode 100644
index 00000000000..fb0eac86b5d
--- /dev/null
+++ b/htdocs/recruitment/admin/candidature_extrafields.php
@@ -0,0 +1,108 @@
+
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/recruitement/admin/candidature_extrafields.php
+ * \ingroup recruitment
+ * \brief Page to setup extra fields of Candidature
+ */
+
+require '../../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
+
+// Load translation files required by the page
+$langs->loadLangs(array('recruitement', 'admin'));
+
+$extrafields = new ExtraFields($db);
+$form = new Form($db);
+
+// List of supported format
+$tmptype2label = ExtraFields::$type2label;
+$type2label = array('');
+foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
+
+$action = GETPOST('action', 'alpha');
+$attrname = GETPOST('attrname', 'alpha');
+$elementtype = 'recruitment_recruitmentcandidature';
+
+if (!$user->admin) accessforbidden();
+
+
+/*
+ * Actions
+ */
+
+require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
+
+
+
+/*
+ * View
+ */
+
+
+llxHeader('', $langs->trans("RecruitmentSetup"), $help_url);
+
+
+$linkback = ''.$langs->trans("BackToModuleList").'';
+print load_fiche_titre($langs->trans("RecruitmentSetup"), $linkback, 'title_setup');
+
+
+$head = recruitmentAdminPrepareHead();
+
+dol_fiche_head($head, 'candidature_extrafields', '', -1, '');
+
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
+
+dol_fiche_end();
+
+
+// Buttons
+if ($action != 'create' && $action != 'edit')
+{
+ print '
";
+}
+
+
+/*
+ * Creation of an optional field
+ */
+if ($action == 'create')
+{
+ print ' ';
+ print load_fiche_titre($langs->trans('NewAttribute'));
+
+ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_add.tpl.php';
+}
+
+/*
+ * Edition of an optional field
+ */
+if ($action == 'edit' && !empty($attrname))
+{
+ print " ";
+ print load_fiche_titre($langs->trans("FieldEdition", $attrname));
+
+ require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_edit.tpl.php';
+}
+
+// End of page
+llxFooter();
+$db->close();
diff --git a/htdocs/recruitment/admin/jobposition_extrafields.php b/htdocs/recruitment/admin/jobposition_extrafields.php
new file mode 100644
index 00000000000..a0e9fd9283d
--- /dev/null
+++ b/htdocs/recruitment/admin/jobposition_extrafields.php
@@ -0,0 +1,108 @@
+
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file htdocs/recruitement/admin/jobposition_extrafields.php
+ * \ingroup recruitment
+ * \brief Page to setup extra fields of Candidature
+ */
+
+require '../../main.inc.php';
+require_once DOL_DOCUMENT_ROOT.'/recruitment/lib/recruitment.lib.php';
+require_once DOL_DOCUMENT_ROOT.'/core/class/extrafields.class.php';
+
+// Load translation files required by the page
+$langs->loadLangs(array('recruitement', 'admin'));
+
+$extrafields = new ExtraFields($db);
+$form = new Form($db);
+
+// List of supported format
+$tmptype2label = ExtraFields::$type2label;
+$type2label = array('');
+foreach ($tmptype2label as $key => $val) $type2label[$key] = $langs->transnoentitiesnoconv($val);
+
+$action = GETPOST('action', 'alpha');
+$attrname = GETPOST('attrname', 'alpha');
+$elementtype = 'recruitment_recruitmentjobposition';
+
+if (!$user->admin) accessforbidden();
+
+
+/*
+ * Actions
+ */
+
+require DOL_DOCUMENT_ROOT.'/core/actions_extrafields.inc.php';
+
+
+
+/*
+ * View
+ */
+
+
+llxHeader('', $langs->trans("RecruitmentSetup"), $help_url);
+
+
+$linkback = ''.$langs->trans("BackToModuleList").'';
+print load_fiche_titre($langs->trans("RecruitmentSetup"), $linkback, 'title_setup');
+
+
+$head = recruitmentAdminPrepareHead();
+
+dol_fiche_head($head, 'jobposition_extrafields', '', -1, '');
+
+require DOL_DOCUMENT_ROOT.'/core/tpl/admin_extrafields_view.tpl.php';
+
+dol_fiche_end();
+
+
+// Buttons
+if ($action != 'create' && $action != 'edit')
+{
+ print '
';
+
+ dol_fiche_end();
+
+ $modulepart = 'recruitment';
+ $permission = $user->rights->recruitment->recruitmentjobposition->write;
+ $permtoedit = $user->rights->recruitment->recruitmentjobposition->write;
+ $param = '&id='.$object->id;
+
+ $relativepathwithnofile = 'recruitmentcandidature/'.dol_sanitizeFileName($object->ref).'/';
+
+ include_once DOL_DOCUMENT_ROOT.'/core/tpl/document_actions_post_headers.tpl.php';
+} else {
+ accessforbidden('', 0, 1);
+}
+
+// End of page
+llxFooter();
+$db->close();
diff --git a/htdocs/recruitment/recruitmentcandidature_list.php b/htdocs/recruitment/recruitmentcandidature_list.php
index 62610ad96d8..8cf1bc9dc61 100644
--- a/htdocs/recruitment/recruitmentcandidature_list.php
+++ b/htdocs/recruitment/recruitmentcandidature_list.php
@@ -359,7 +359,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php';
// List of mass actions available
$arrayofmassactions = array(
- //'validate'=>$langs->trans("Validate"),
+ 'validate'=>$langs->trans("Validate"),
//'generate_doc'=>$langs->trans("ReGeneratePDF"),
//'builddoc'=>$langs->trans("PDFMerge"),
//'presend'=>$langs->trans("SendByMail"),
diff --git a/htdocs/recruitment/recruitmentcandidature_note.php b/htdocs/recruitment/recruitmentcandidature_note.php
new file mode 100644
index 00000000000..f6b710821ce
--- /dev/null
+++ b/htdocs/recruitment/recruitmentcandidature_note.php
@@ -0,0 +1,163 @@
+
+ * Copyright (C) ---Put here your own copyright and developer email---
+ *
+ * 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
+ * the Free Software Foundation; either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see .
+ */
+
+/**
+ * \file recruitmentcandidature_note.php
+ * \ingroup recruitment
+ * \brief Car with notes on RecruitmentCandidature
+ */
+
+// Load Dolibarr environment
+$res = 0;
+// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
+if (!$res && !empty($_SERVER["CONTEXT_DOCUMENT_ROOT"])) $res = @include $_SERVER["CONTEXT_DOCUMENT_ROOT"]."/main.inc.php";
+// Try main.inc.php into web root detected using web root calculated from SCRIPT_FILENAME
+$tmp = empty($_SERVER['SCRIPT_FILENAME']) ? '' : $_SERVER['SCRIPT_FILENAME']; $tmp2 = realpath(__FILE__); $i = strlen($tmp) - 1; $j = strlen($tmp2) - 1;
+while ($i > 0 && $j > 0 && isset($tmp[$i]) && isset($tmp2[$j]) && $tmp[$i] == $tmp2[$j]) { $i--; $j--; }
+if (!$res && $i > 0 && file_exists(substr($tmp, 0, ($i + 1))."/main.inc.php")) $res = @include substr($tmp, 0, ($i + 1))."/main.inc.php";
+if (!$res && $i > 0 && file_exists(dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php")) $res = @include dirname(substr($tmp, 0, ($i + 1)))."/main.inc.php";
+// Try main.inc.php using relative path
+if (!$res && file_exists("../main.inc.php")) $res = @include "../main.inc.php";
+if (!$res && file_exists("../../main.inc.php")) $res = @include "../../main.inc.php";
+if (!$res && file_exists("../../../main.inc.php")) $res = @include "../../../main.inc.php";
+if (!$res) die("Include of main fails");
+
+dol_include_once('/recruitment/class/recruitmentcandidature.class.php');
+dol_include_once('/recruitment/lib/recruitment_recruitmentcandidature.lib.php');
+
+// Load translation files required by the page
+$langs->loadLangs(array("recruitment", "companies"));
+
+// Get parameters
+$id = GETPOST('id', 'int');
+$ref = GETPOST('ref', 'alpha');
+$action = GETPOST('action', 'alpha');
+$cancel = GETPOST('cancel', 'aZ09');
+$backtopage = GETPOST('backtopage', 'alpha');
+
+// Initialize technical objects
+$object = new RecruitmentCandidature($db);
+$extrafields = new ExtraFields($db);
+$diroutputmassaction = $conf->recruitment->dir_output.'/temp/massgeneration/'.$user->id;
+$hookmanager->initHooks(array('recruitmentjobpositionnote', 'globalcard')); // Note that conf->hooks_modules contains array
+// Fetch optionals attributes and labels
+$extrafields->fetch_name_optionals_label($object->table_element);
+
+// Security check - Protection if external user
+//if ($user->socid > 0) accessforbidden();
+//if ($user->socid > 0) $socid = $user->socid;
+//$result = restrictedArea($user, 'recruitment', $id);
+
+// Load object
+include DOL_DOCUMENT_ROOT.'/core/actions_fetchobject.inc.php'; // Must be include, not include_once // Must be include, not include_once. Include fetch and fetch_thirdparty but not fetch_optionals
+if ($id > 0 || !empty($ref)) $upload_dir = $conf->recruitment->multidir_output[$object->entity]."/".$object->id;
+
+$permissionnote = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_setnotes.inc.php
+$permissiontoadd = $user->rights->recruitment->recruitmentjobposition->write; // Used by the include of actions_addupdatedelete.inc.php
+
+
+
+/*
+ * Actions
+ */
+
+include DOL_DOCUMENT_ROOT.'/core/actions_setnotes.inc.php'; // Must be include, not include_once
+
+
+/*
+ * View
+ */
+
+$form = new Form($db);
+
+//$help_url='EN:Customers_Orders|FR:Commandes_Clients|ES:Pedidos de clientes';
+$help_url = '';
+llxHeader('', $langs->trans('RecruitmentCandidature'), $help_url);
+
+if ($id > 0 || !empty($ref))
+{
+ $object->fetch_thirdparty();
+
+ $head = recruitmentCandidaturePrepareHead($object);
+
+ dol_fiche_head($head, 'note', $langs->trans("RecruitmentCandidature"), -1, $object->picto);
+
+ // Object card
+ // ------------------------------------------------------------
+ $linkback = ''.$langs->trans("BackToList").'';
+
+ $morehtmlref = '