diff --git a/ChangeLog b/ChangeLog index efc1be2c344..08aaaa4b6f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -19,6 +19,7 @@ Following changes may create regressions for some external modules, but were nec * Files for variables of themes were renamed from graph-color.php into theme_vars.inc.php to match naming convention of extension .inc.php for files to be included. * All methods set_draft() were renamed into setDraft(). +* Removed deprecated function function test_sql_and_script_inject that was replaced with testSqlAndScriptInject. ***** ChangeLog for 9.0.1 compared to 9.0.0 ***** diff --git a/dev/initdemo/mysqldump_dolibarr_4.0.0.sql b/dev/initdemo/mysqldump_dolibarr_4.0.0.sql index e8580cdff28..6363873d7c0 100644 --- a/dev/initdemo/mysqldump_dolibarr_4.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_4.0.0.sql @@ -7853,7 +7853,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_5.0.0.sql b/dev/initdemo/mysqldump_dolibarr_5.0.0.sql index 4c31fd25e8a..a66bd427499 100644 --- a/dev/initdemo/mysqldump_dolibarr_5.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_5.0.0.sql @@ -8260,7 +8260,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_6.0.0.sql b/dev/initdemo/mysqldump_dolibarr_6.0.0.sql index f0375a4b407..19cb46d0237 100644 --- a/dev/initdemo/mysqldump_dolibarr_6.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_6.0.0.sql @@ -8612,7 +8612,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_7.0.0.sql b/dev/initdemo/mysqldump_dolibarr_7.0.0.sql index bd5789f0a6b..363cc32670d 100644 --- a/dev/initdemo/mysqldump_dolibarr_7.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_7.0.0.sql @@ -9181,7 +9181,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_8.0.0.sql b/dev/initdemo/mysqldump_dolibarr_8.0.0.sql index 05a4814a7ef..b000b807930 100644 --- a/dev/initdemo/mysqldump_dolibarr_8.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_8.0.0.sql @@ -6360,7 +6360,7 @@ CREATE TABLE `llx_emailcollector_emailcollector` ( LOCK TABLES `llx_emailcollector_emailcollector` WRITE; /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` DISABLE KEYS */; -INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@gmail.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); +INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@example.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` ENABLE KEYS */; UNLOCK TABLES; @@ -12450,7 +12450,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2010-07-08 14:26:14','2016-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2010-07-08','Project leader','','','','','','','',NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2010-07-08 22:44:50','2010-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2010-07-08 22:59:02','2016-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2010-07-09 00:16:58','2010-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2011-08-01 02:41:26','2016-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2016-07-30 16:11:06','2016-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2016-07-30 16:13:03','2016-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','','',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2016-07-30 16:14:41','2016-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','','',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2016-07-30 16:26:22','2016-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','','ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','','ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','','Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/dev/initdemo/mysqldump_dolibarr_9.0.0.sql b/dev/initdemo/mysqldump_dolibarr_9.0.0.sql index 61201d931e3..c3d5fcd9e73 100644 --- a/dev/initdemo/mysqldump_dolibarr_9.0.0.sql +++ b/dev/initdemo/mysqldump_dolibarr_9.0.0.sql @@ -6275,7 +6275,7 @@ CREATE TABLE `llx_emailcollector_emailcollector` ( LOCK TABLES `llx_emailcollector_emailcollector` WRITE; /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` DISABLE KEYS */; -INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@gmail.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); +INSERT INTO `llx_emailcollector_emailcollector` VALUES (1,1,'MyEmailCollector1','My email collector 1','aaa','imap.gmail.com','testldr10@example.com','testldr10-10','INBOX','','','aftercollect','2018-11-19 15:21:07','1 emails analyzed, 1 emails successfuly processed (for 3 record/actions done) by collector',NULL,NULL,'2018-10-31 18:08:05','2018-10-31 17:08:05',12,12,NULL,1,'OK',0); /*!40000 ALTER TABLE `llx_emailcollector_emailcollector` ENABLE KEYS */; UNLOCK TABLES; @@ -12388,7 +12388,7 @@ CREATE TABLE `llx_socpeople` ( LOCK TABLES `llx_socpeople` WRITE; /*!40000 ALTER TABLE `llx_socpeople` DISABLE KEYS */; -INSERT INTO `llx_socpeople` VALUES (1,'2012-07-08 14:26:14','2018-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2012-07-08','Project leader','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2012-07-08 22:44:50','2012-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2012-07-08 22:59:02','2018-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2012-07-09 00:16:58','2012-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2013-08-01 02:41:26','2018-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2018-07-30 16:11:06','2018-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2018-07-30 16:13:03','2018-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2018-07-30 16:14:41','2018-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2018-07-30 16:26:22','2018-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','eldy@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); +INSERT INTO `llx_socpeople` VALUES (1,'2012-07-08 14:26:14','2018-01-16 15:07:51',1,1,NULL,'MR','Indra','Mahala','','','',297,117,'2012-07-08','Project leader','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'Met during a congress at Dubai','',NULL,NULL,NULL,1),(2,'2012-07-08 22:44:50','2012-07-08 20:59:57',NULL,1,NULL,'MR','Freeman','Public','','','',200,11,NULL,'','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'A friend that is a free contact not linked to any company',NULL,NULL,NULL,NULL,1),(3,'2012-07-08 22:59:02','2018-01-22 17:30:07',NULL,1,NULL,'MR','Mywife','Nicy','','','',NULL,11,'1980-10-03','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,1,0,1,12,'This is a private contact','',NULL,NULL,NULL,1),(4,'2012-07-09 00:16:58','2012-07-08 22:16:58',6,1,NULL,'MR','Rotchield','Evan','','','',NULL,6,NULL,'Bank director','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,1,'The bank director',NULL,NULL,NULL,NULL,1),(6,'2013-08-01 02:41:26','2018-01-22 17:29:53',17,1,NULL,'','Bookkeeper','Bob','99 account street','123456','BigTown',NULL,4,NULL,'book keeper','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,0,0,1,12,'','',NULL,NULL,NULL,1),(7,'2018-07-30 16:11:06','2018-07-30 12:16:07',NULL,1,'','MR','Dad','','','','',NULL,14,'1967-09-04','','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(8,'2018-07-30 16:13:03','2018-07-30 12:15:58',NULL,1,'','MLE','Mom','','','','',NULL,14,NULL,'','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',1,0,12,12,'','',NULL,NULL,NULL,1),(9,'2018-07-30 16:14:41','2018-07-30 12:15:51',NULL,1,'','MR','Francky','','','89455','Virigia',NULL,205,'1980-07-09','Baker','555-98989898','','','','francky@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'',0,0,12,12,'','',NULL,NULL,NULL,1),(10,'2018-07-30 16:26:22','2018-07-30 12:52:38',10,1,'','MR','Eldy','','','33600','Pessac',NULL,1,'1972-10-10','Dolibarr project leader','','','','','demo@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.jpg',0,0,NULL,12,'','',NULL,NULL,NULL,1),(11,'2017-05-12 13:16:36','2017-05-12 09:18:20',11,1,'','MR','Smith','Laurent','45 Big road','897','Seattle',NULL,11,NULL,'Director','','','','','','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'ldestailleur_200x200.png',0,0,12,12,'','',NULL,NULL,NULL,1),(12,'2017-05-12 13:19:31','2017-05-12 09:19:42',11,1,'','MR','Einstein','','','','',NULL,11,NULL,'Genius','333444555','','','','genius@example.com','','',NULL,NULL,NULL,NULL,NULL,NULL,NULL,'Einstein.jpg',0,0,12,12,'','',NULL,NULL,NULL,1); /*!40000 ALTER TABLE `llx_socpeople` ENABLE KEYS */; UNLOCK TABLES; diff --git a/htdocs/comm/index.php b/htdocs/comm/index.php index e6fc5e95010..651d2c54ec7 100644 --- a/htdocs/comm/index.php +++ b/htdocs/comm/index.php @@ -159,12 +159,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) print '
'; print ''; print ''; - print ''; + print ''; if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -190,10 +191,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) $i++; $total += $obj->total_ht; } - if ($total>0) + if ($num > $nbofloop) { - - print '"; + print '"; + } + elseif ($total>0) + { + print '"; } } else @@ -245,7 +249,8 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -270,9 +275,13 @@ if (! empty($conf->supplier_proposal->enabled) && $user->rights->supplier_propos $i++; $total += $obj->total_ht; } - if ($total>0) + if ($num > $nbofloop) + { + print '"; + } + elseif ($total>0) { - print '"; + print '"; } } else @@ -322,9 +331,9 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { - $obj = $db->fetch_object($resql); print '"; + print '"; + } + elseif ($total>0) + { + print '"; } } else @@ -409,7 +421,8 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande if ($num > 0) { $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); @@ -440,10 +453,13 @@ if (! empty($conf->fournisseur->enabled) && $user->rights->fournisseur->commande $i++; $total += $obj->total_ttc; } - if ($total>0) + if ($num > $nbofloop) + { + print '"; + } + elseif ($total>0) { - - print '"; + print '"; } } else @@ -757,11 +773,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire) } if ($num > $nbofloop) { - print '"; + print '"; } elseif ($total>0) { - print '"; + print '"; } print "
'.$langs->trans("ProposalsDraft").($num?' '.$num.'':'').'
'.$langs->trans("ProposalsDraft").' '.$num.'
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'; $orderstatic->id=$obj->rowid; @@ -353,10 +362,13 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) $i++; $total += $obj->total_ttc; } - if ($total>0) + if ($num > $nbofloop) { - - print '
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("Total").''.price($total)."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total")."".price($total)." 
'.$langs->trans("Total")."".price($total)." 
"; print "

"; @@ -861,11 +877,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total")."".price($total)." "; + print ''.$langs->trans("Total")."".price($total)." "; } print ""; print "
"; diff --git a/htdocs/comm/propal/index.php b/htdocs/comm/propal/index.php index 2bc710394bb..e69dbbc8b6c 100644 --- a/htdocs/comm/propal/index.php +++ b/htdocs/comm/propal/index.php @@ -172,16 +172,18 @@ if (! empty($conf->propal->enabled)) $resql=$db->query($sql); if ($resql) { - print '
'; - print ''; - print ''; - print ''; - $langs->load("propal"); $num = $db->num_rows($resql); if ($num) { + print '
'; + print '
'.$langs->trans("DraftPropals").'
'; + print ''; + $langs->load("propal"); + print ''; + $i = 0; - while ($i < $num) + $nbofloop=min($num, (empty($conf->global->MAIN_MAXLIST_OVERLOAD)?500:$conf->global->MAIN_MAXLIST_OVERLOAD)); + while ($i < $nbofloop) { $obj = $db->fetch_object($resql); print ''; @@ -199,9 +201,17 @@ if (! empty($conf->propal->enabled)) print ''; $i++; } + if ($num > $nbofloop) + { + print '"; + } + elseif ($total>0) + { + print '"; + } + print "
'.$langs->trans("DraftPropals").' '.$num.'
'.$langs->trans("XMoreLines", ($num - $nbofloop))."
'.$langs->trans("Total").''.price($total)."
"; + print "

"; } - print ""; - print "
"; } } @@ -365,11 +375,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire) } if ($num > $nbofloop) { - print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; + print ''.$langs->trans("XMoreLines", ($num - $nbofloop)).""; } elseif ($total>0) { - print ''.$langs->trans("Total")."".price($total)." "; + print ''.$langs->trans("Total")."".price($total)." "; } print ""; print "
"; diff --git a/htdocs/compta/bank/bankentries_list.php b/htdocs/compta/bank/bankentries_list.php index ece5a6580de..68354d1961f 100644 --- a/htdocs/compta/bank/bankentries_list.php +++ b/htdocs/compta/bank/bankentries_list.php @@ -44,6 +44,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/sociales/class/chargesociales.class.php' require_once DOL_DOCUMENT_ROOT.'/compta/paiement/class/paiement.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/tva/class/tva.class.php'; require_once DOL_DOCUMENT_ROOT.'/compta/salaries/class/paymentsalary.class.php'; +require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/paymentvarious.class.php'; require_once DOL_DOCUMENT_ROOT.'/don/class/don.class.php'; require_once DOL_DOCUMENT_ROOT.'/expensereport/class/paymentexpensereport.class.php'; require_once DOL_DOCUMENT_ROOT.'/loan/class/loan.class.php'; @@ -374,6 +375,7 @@ $paymentstatic=new Paiement($db); $paymentsupplierstatic=new PaiementFourn($db); $paymentvatstatic=new TVA($db); $paymentsalstatic=new PaymentSalary($db); +$paymentvariousstatic=new PaymentVarious($db); $donstatic=new Don($db); $paymentexpensereportstatic=new PaymentExpenseReport($db); $bankstatic=new Account($db); @@ -1153,13 +1155,13 @@ if ($resql) if ($links[$key]['type']=='payment') { $paymentstatic->id=$links[$key]['url_id']; - $paymentstatic->ref=$links[$key]['url_id']; + $paymentstatic->ref=$links[$key]['url_id']; // FIXME This is id, not ref of payment print ' '.$paymentstatic->getNomUrl(2); } elseif ($links[$key]['type']=='payment_supplier') { $paymentsupplierstatic->id=$links[$key]['url_id']; - $paymentsupplierstatic->ref=$links[$key]['url_id']; + $paymentsupplierstatic->ref=$links[$key]['url_id']; // FIXME This is id, not ref of payment print ' '.$paymentsupplierstatic->getNomUrl(2); } elseif ($links[$key]['type']=='payment_sc') @@ -1199,6 +1201,12 @@ if ($resql) $paymentexpensereportstatic->ref=$links[$key]['url_id']; print ' '.$paymentexpensereportstatic->getNomUrl(2); } + elseif ($links[$key]['type']=='payment_various') + { + $paymentvariousstatic->id=$links[$key]['url_id']; + $paymentvariousstatic->ref=$links[$key]['url_id']; + print ' '.$paymentvariousstatic->getNomUrl(2); + } elseif ($links[$key]['type']=='banktransfert') { // Do not show link to transfer since there is no transfer card (avoid confusion). Can already be accessed from transaction detail. diff --git a/htdocs/compta/paiement/class/paiement.class.php b/htdocs/compta/paiement/class/paiement.class.php index 13b04854b9c..8b4bb12006b 100644 --- a/htdocs/compta/paiement/class/paiement.class.php +++ b/htdocs/compta/paiement/class/paiement.class.php @@ -1180,7 +1180,7 @@ class Paiement extends CommonObject $result=''; $label = ''.$langs->trans("ShowPayment").'
'; $label.= ''.$langs->trans("Ref").': '.$this->ref; - $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); + if ($this->datepaye ? $this->datepaye : $this->date) $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); if ($mode == 'withlistofinvoices') { $arraybill = $this->getBillsArray(); diff --git a/htdocs/compta/tva/class/tva.class.php b/htdocs/compta/tva/class/tva.class.php index b1f99275c93..55a94d685cc 100644 --- a/htdocs/compta/tva/class/tva.class.php +++ b/htdocs/compta/tva/class/tva.class.php @@ -694,16 +694,16 @@ class Tva extends CommonObject if (! empty($conf->dol_no_mouse_hover)) $notooltip=1; // Force disable tooltips $result=''; - $label=$langs->trans("ShowVatPayment").': '.$this->ref; + + $label = '' . $langs->trans("ShowVatPayment") . ''; + $label.= '
'; + $label.= '' . $langs->trans('Ref') . ': ' . $this->ref; $url = DOL_URL_ROOT.'/compta/tva/card.php?id='.$this->id; $linkclose=''; if (empty($notooltip)) { - - - if (! empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER)) { $label=$langs->trans("ShowMyObject"); diff --git a/htdocs/fourn/class/paiementfourn.class.php b/htdocs/fourn/class/paiementfourn.class.php index a5016822c66..45ad69f6c64 100644 --- a/htdocs/fourn/class/paiementfourn.class.php +++ b/htdocs/fourn/class/paiementfourn.class.php @@ -585,7 +585,7 @@ class PaiementFourn extends Paiement $label = ''.$langs->trans("ShowPayment").'
'; $label.= ''.$langs->trans("Ref").': '.$text; - $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); + if ($this->datepaye ? $this->datepaye : $this->date) $label.= '
'.$langs->trans("Date").': '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour'); $linkstart = ''; $linkend = ''; diff --git a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql index a7f5ca87c9a..4c65e9512a4 100644 --- a/htdocs/install/mysql/migration/9.0.0-10.0.0.sql +++ b/htdocs/install/mysql/migration/9.0.0-10.0.0.sql @@ -84,7 +84,7 @@ create table llx_mailing_unsubscribe ALTER TABLE llx_mailing_unsubscribe ADD UNIQUE uk_mailing_unsubscribe(email, entity, unsubscribegroup); ALTER TABLE llx_adherent ADD gender VARCHAR(10); -ALTER TABLE llx_subscription ADD fk_type integer(11); +ALTER TABLE llx_subscription ADD fk_type integer; -- Add url_id into unique index of bank_url ALTER TABLE llx_bank_url DROP INDEX uk_bank_url; @@ -96,7 +96,7 @@ ALTER TABLE llx_don ADD COLUMN fk_soc integer NULL; ALTER TABLE llx_payment_various ADD COLUMN subledger_account varchar(32); -ALTER TABLE llx_prelevement_facture_demande ADD COLUMN entity integer(11); +ALTER TABLE llx_prelevement_facture_demande ADD COLUMN entity integer; ALTER TABLE llx_prelevement_facture_demande ADD COLUMN sourcetype varchar(32); ALTER TABLE llx_prelevement_facture_demande ADD COLUMN ext_payment_id varchar(128) NULL; ALTER TABLE llx_prelevement_facture_demande ADD COLUMN ext_payment_site varchar(128) NULL; diff --git a/htdocs/main.inc.php b/htdocs/main.inc.php index a473f9a5abd..109d0f5f1fe 100644 --- a/htdocs/main.inc.php +++ b/htdocs/main.inc.php @@ -68,22 +68,6 @@ if (function_exists('get_magic_quotes_gpc')) // magic_quotes_* deprecated in PHP } } -// phpcs:disable PEAR.NamingConventions.ValidFunctionName.NotCamelCaps -/** - * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). - * - * @param string $val Value - * @param string $type 1=GET, 0=POST, 2=PHP_SELF, 3=GET without sql reserved keywords (the less tolerant test) - * @return int >0 if there is an injection, 0 if none - * @deprecated use testSqlAndScriptInject - * @see testSqlAndScriptInject($val, $type) - */ -function test_sql_and_script_inject($val, $type) -{ - // phpcs:enable - return testSqlAndScriptInject($val, $type); -} - /** * Security: SQL Injection and XSS Injection (scripts) protection (Filters on GET, POST, PHP_SELF). * diff --git a/htdocs/modulebuilder/template/class/myobject.class.php b/htdocs/modulebuilder/template/class/myobject.class.php index 57c5b923bae..3371beb97f8 100644 --- a/htdocs/modulebuilder/template/class/myobject.class.php +++ b/htdocs/modulebuilder/template/class/myobject.class.php @@ -139,12 +139,12 @@ class MyObject extends CommonObject public $status; /** - * @var string date_creation + * @var integer|string date_creation */ public $date_creation; /** - * @var string tms + * @var integer tms */ public $tms; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 8ffb6b38831..dc737e8968c 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -3,7 +3,7 @@ * Copyright (C) 2004-2015 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin * Copyright (C) 2012-2016 Juanjo Menent - * Copyright (C) 2015-2018 Alexandre Spangaro + * Copyright (C) 2015-2019 Alexandre Spangaro * Copyright (C) 2015 Marcos García * Copyright (C) 2016 Josep Lluís Amador * @@ -419,7 +419,7 @@ $listofreferent=array( 'name'=>"SocialContribution", 'title'=>"ListSocialContributionAssociatedProject", 'class'=>'ChargeSociales', - 'margin'=>'add', + 'margin'=>'minus', 'table'=>'chargesociales', 'datefieldname'=>'date_ech', 'disableamount'=>0, @@ -470,7 +470,7 @@ $listofreferent=array( 'datefieldname'=>'datev', 'margin'=>'minus', 'disableamount'=>0, - 'urlnew'=>DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&projectid='.$id.'&socid='.$socid, + 'urlnew'=>DOL_URL_ROOT.'/compta/bank/various_payment/card.php?action=create&projectid='.$id, 'lang'=>'banks', 'buttonnew'=>'AddVariousPayment', 'testnew'=>$user->rights->banque->modifier, @@ -600,11 +600,23 @@ foreach ($listofreferent as $key => $value) $element->fetch($idofelement); if ($idofelementuser) $elementuser->fetch($idofelementuser); - // Special cases + // Define if record must be used for total or not + $qualifiedfortotal=true; + if ($key == 'invoice') + { + if (! empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice, do not include into total + } + if ($key == 'propal') + { + if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal=false; // Refused proposal must not be included in total + } + if ($tablename != 'expensereport_det' && method_exists($element, 'fetch_thirdparty')) $element->fetch_thirdparty(); - if ($tablename == 'don' || $tablename == 'chargesociales') $total_ht_by_line=$element->amount; + + // Define $total_ht_by_line + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ht_by_line=$element->amount; + elseif ($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ht_by_line=$element->price*abs($element->qty); - elseif($tablename == 'fichinter') $total_ht_by_line=$element->getAmount(); elseif ($tablename == 'projet_task') { if ($idofelementuser) @@ -620,20 +632,9 @@ foreach ($listofreferent as $key => $value) } else $total_ht_by_line=$element->total_ht; - $qualifiedfortotal=true; - if ($key == 'invoice') - { - if (! empty($element->close_code) && $element->close_code == 'replaced') $qualifiedfortotal=false; // Replacement invoice, do not include into total - } - if ($key == 'propal') - { - if ($element->statut == Propal::STATUS_NOTSIGNED) $qualifiedfortotal=false; // Refused proposal must not be included in total - } - - if ($qualifiedfortotal) $total_ht = $total_ht + $total_ht_by_line; - - if ($tablename == 'don' || $tablename == 'chargesociales') $total_ttc_by_line=$element->amount; - elseif($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); + // Define $total_ttc_by_line + if ($tablename == 'don' || $tablename == 'chargesociales' || $tablename == 'payment_various' || $tablename == 'payment_salary') $total_ttc_by_line=$element->amount; + elseif ($tablename == 'fichinter') $total_ttc_by_line=$element->getAmount(); elseif ($tablename == 'stock_mouvement') $total_ttc_by_line=$element->price*abs($element->qty); elseif ($tablename == 'projet_task') { @@ -642,7 +643,22 @@ foreach ($listofreferent as $key => $value) } else $total_ttc_by_line=$element->total_ttc; - if ($qualifiedfortotal) $total_ttc = $total_ttc + $total_ttc_by_line; + // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + if ($tablename == 'payment_various') + { + if ($element->sens == 1) + { + $total_ht_by_line = -$total_ht_by_line; + $total_ttc_by_line = -$total_ttc_by_line; + } + } + + // Add total if we have to + if ($qualifiedfortotal) + { + $total_ht = $total_ht + $total_ht_by_line; + $total_ttc = $total_ttc + $total_ttc_by_line; + } } // Each element with at least one line is output @@ -653,23 +669,14 @@ foreach ($listofreferent as $key => $value) // Calculate margin if ($qualifiedforfinalprofit) { - if ($margin=="add") - { - $balance_ht+= $total_ht; - $balance_ttc+= $total_ttc; - } - else - { - $balance_ht-= $total_ht; - $balance_ttc-= $total_ttc; - } - - // Show $total_ht & $total_ttc -- add a minus when necessary - if ($margin!="add") + if ($margin != "add") { $total_ht = -$total_ht; $total_ttc = -$total_ttc; } + + $balance_ht += $total_ht; + $balance_ttc += $total_ttc; } print ''; @@ -851,8 +858,7 @@ foreach ($listofreferent as $key => $value) $expensereport->fetch($element->fk_expensereport); } - //print 'xxx'.$tablename; - //print $classname; + //print 'xxx'.$tablename.'yyy'.$classname; if ($breakline && $saved_third_id != $element->thirdparty->id) { @@ -1027,6 +1033,16 @@ foreach ($listofreferent as $key => $value) { $total_ht_by_line=$element->total_ht; } + + // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + if ($tablename == 'payment_various') + { + if ($element->sens == 0) + { + $total_ht_by_line = -$total_ht_by_line; + } + } + print ''; if ($othermessage) print $othermessage; if (isset($total_ht_by_line)) @@ -1064,6 +1080,16 @@ foreach ($listofreferent as $key => $value) { $total_ttc_by_line=$element->total_ttc; } + + // Change sign of $total_ht_by_line and $total_ttc_by_line for some cases + if ($tablename == 'payment_various') + { + if ($element->sens == 0) + { + $total_ttc_by_line = -$total_ttc_by_line; + } + } + print ''; if ($othermessage) print $othermessage; if (isset($total_ttc_by_line)) diff --git a/test/phpunit/CodingSqlTest.php b/test/phpunit/CodingSqlTest.php index 9c9655b1f5c..1e1d3d1a838 100644 --- a/test/phpunit/CodingSqlTest.php +++ b/test/phpunit/CodingSqlTest.php @@ -57,7 +57,7 @@ $conf->global->MAIN_DISABLE_ALL_MAILS=1; * @backupStaticAttributes enabled * @remarks backupGlobals must be disabled to have db,conf,user and lang not erased. */ -class CodingSqlTest extends PHPUnit_Framework_TestCase +class CodingSqlTest extends PHPUnit\Framework\TestCase { protected $savconf; protected $savuser; @@ -182,6 +182,10 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase print __METHOD__." Result for checking we don't have 'NUMERIC(' = ".$result."\n"; $this->assertTrue($result===false, 'Found NUMERIC( into '.$file.'. Bad.'); + $result=strpos($filecontent, 'integer('); + print __METHOD__." Result for checking we don't have 'integer(' = ".$result."\n"; + $this->assertTrue($result===false, 'Found value in parenthesis after the integer. It must be integer not integer(x) into '.$file.'. Bad.'); + if ($dir == DOL_DOCUMENT_ROOT.'/install/mysql/migration') { // Test for migration files only @@ -227,21 +231,21 @@ class CodingSqlTest extends PHPUnit_Framework_TestCase $langs=$this->savlangs; $db=$this->savdb; - $filesarray = scandir(DOL_DOCUMENT_ROOT.'/../dev/initdata'); + $filesarray = scandir(DOL_DOCUMENT_ROOT.'/../dev/initdemo'); foreach($filesarray as $key => $file) { if (! preg_match('/\.sql$/', $file)) continue; print 'Check sql file '.$file."\n"; - $filecontent=file_get_contents(DOL_DOCUMENT_ROOT.'/../dev/initdata/'.$file); + $filecontent=file_get_contents(DOL_DOCUMENT_ROOT.'/../dev/initdemo/'.$file); $result=strpos($filecontent, '@gmail.com'); print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; - $this->assertTrue($result===false, 'Found a bad key into file '.$file); + $this->assertTrue($result===false, 'Found a bad key @gmail into file '.$file); $result=strpos($filecontent, 'eldy@'); print __METHOD__." Result for checking we don't have personal data = ".$result."\n"; - $this->assertTrue($result===false, 'Found a bad key into file '.$file); + $this->assertTrue($result===false, 'Found a bad key eldy@ into file '.$file); } return;