Merge https://github.com/Dolibarr/dolibarr into develop
This commit is contained in:
commit
042cceb8f8
@ -15,8 +15,9 @@ PHP libraries:
|
||||
AdoDb-Date 0.36 Modified BSD License Yes Date convertion (not into rpm package)
|
||||
ChromePHP 4.1.0 Apache Software License 2.0 Yes Return server log to chrome browser console
|
||||
CKEditor 4.6.2 LGPL-2.1+ Yes Editor WYSIWYG
|
||||
PHPDebugBar 1.15.0 MIT License Yes Used only by the module "debugbar" for developers
|
||||
EvalMath 1.0 BSD Yes Safe math expressions evaluation
|
||||
Escpos-php MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
Escpos-php ? MIT License Yes Thermal receipt printer library, for use with ESC/POS compatible printers
|
||||
GeoIP 1.4 LGPL-2.1+ Yes Sample code to make geoip convert (not into deb package)
|
||||
Mobiledetect 2.8.17 MIT License Yes Detect mobile devices browsers
|
||||
NuSoap 0.9.5 LGPL 2.1+ Yes Library to develop SOAP Web services (not into rpm and deb package)
|
||||
@ -24,9 +25,12 @@ PEAR Mail_MIME 1.8.9 BSD Yes
|
||||
odtPHP 1.0.1 GPL-2+ Yes Library to build/edit ODT files
|
||||
ParseDown 1.6 MIT License Yes Markdown parser
|
||||
PHPExcel 1.8.1 LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
PHPSpreadSheet ? LGPL-2.1+ Yes Read/Write XLS files, read ODS files
|
||||
php-iban 1.4.7 LGPL-3+ Yes Parse and validate IBAN (and IIBAN) bank account information in PHP
|
||||
PHPoAuthLib 0.8.2 MIT License Yes Library to provide oauth1 and oauth2 to different service
|
||||
PHPPrintIPP 1.3 GPL-2+ Yes Library to send print IPP requests
|
||||
PSR/Logs 1.0 Library for logs (used by DebugBar)
|
||||
PSR/simple-cache Library for cache (used by PHPSpreadSheet)
|
||||
Restler 3.0.0RC6 LGPL-3+ Yes Library to develop REST Web services (+ swagger-ui js lib into dir explorer)
|
||||
TCPDF 6.2.25 LGPL-3+ Yes PDF generation
|
||||
TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes FPDI replacement
|
||||
|
||||
@ -18,6 +18,8 @@ Following changes may create regressions for some external modules, but were nec
|
||||
* Deprecated function img_phone as been removed. You can use img_picto(..., 'call|call_out') instead.;
|
||||
* 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 *****
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -60,7 +60,7 @@ $accountingcategory = new AccountancyCategory($db);
|
||||
|
||||
// si ajout de comptes
|
||||
if (! empty($selectcpt)) {
|
||||
$cpts = array ();
|
||||
$cpts = array();
|
||||
foreach ($selectcpt as $selectedoption) {
|
||||
if (! array_key_exists($selectedoption, $cpts))
|
||||
$cpts[$selectedoption] = "'" . $selectedoption . "'";
|
||||
@ -71,13 +71,13 @@ if (! empty($selectcpt)) {
|
||||
if ($return<0) {
|
||||
setEventMessages($langs->trans('errors'), $accountingcategory->errors, 'errors');
|
||||
} else {
|
||||
setEventMessages($langs->trans('SetupSaved'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('RecordModifiedSuccessfully'), null, 'mesgs');
|
||||
}
|
||||
}
|
||||
if ($action == 'delete') {
|
||||
if ($cpt_id) {
|
||||
if ($accountingcategory->deleteCptCat($cpt_id)) {
|
||||
setEventMessages($langs->trans('CategoryDeleted'), null, 'mesgs');
|
||||
setEventMessages($langs->trans('AccountRemovedFromGroup'), null, 'mesgs');
|
||||
} else {
|
||||
setEventMessages($langs->trans('errors'), null, 'errors');
|
||||
}
|
||||
@ -173,8 +173,9 @@ if ($action == 'display' || $action == 'delete') {
|
||||
print '<td>' . $cpt->label . '</td>';
|
||||
print '<td class="right">';
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?action=delete&account_category=" . $cat_id . "&cptid=" . $cpt->rowid."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
print "</td>";
|
||||
print "</tr>\n";
|
||||
}
|
||||
|
||||
@ -65,6 +65,8 @@ $accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
||||
$btn_changeaccount = GETPOST('changeaccount', 'alpha');
|
||||
$btn_changetype = GETPOST('changetype', 'alpha');
|
||||
|
||||
if (empty($accounting_product_mode)) $accounting_product_mode='ACCOUNTANCY_SELL';
|
||||
|
||||
$limit = GETPOST('limit', 'int')?GETPOST('limit', 'int'):(empty($conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION)?$conf->liste_limit:$conf->global->ACCOUNTING_LIMIT_LIST_VENTILATION);
|
||||
$sortfield = GETPOST("sortfield", 'alpha');
|
||||
$sortorder = GETPOST("sortorder", 'alpha');
|
||||
@ -112,8 +114,6 @@ if ($action == 'update') {
|
||||
'ACCOUNTANCY_BUY'
|
||||
);
|
||||
|
||||
$accounting_product_mode = GETPOST('accounting_product_mode', 'alpha');
|
||||
|
||||
if (in_array($accounting_product_mode, $accounting_product_modes)) {
|
||||
|
||||
if (! dolibarr_set_const($db, 'ACCOUNTING_PRODUCT_MODE', $accounting_product_mode, 'chaine', 0, '', $conf->entity)) {
|
||||
|
||||
@ -38,7 +38,7 @@ class AccountancyCategory // extends CommonObject
|
||||
|
||||
/**
|
||||
* @var string Error string
|
||||
* @see errors
|
||||
* @see $errors
|
||||
*/
|
||||
public $error;
|
||||
|
||||
@ -63,7 +63,7 @@ class AccountancyCategory // extends CommonObject
|
||||
public $id;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var string Accountancy code
|
||||
*/
|
||||
public $code;
|
||||
|
||||
@ -73,7 +73,7 @@ class AccountancyCategory // extends CommonObject
|
||||
public $label;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var string Accountancy range account
|
||||
*/
|
||||
public $range_account;
|
||||
|
||||
@ -83,37 +83,37 @@ class AccountancyCategory // extends CommonObject
|
||||
public $sens;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var int Category type of accountancy
|
||||
*/
|
||||
public $category_type;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var string Formula
|
||||
*/
|
||||
public $formula;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var int Position
|
||||
*/
|
||||
public $position;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var int country id
|
||||
*/
|
||||
public $fk_country;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var int Is active
|
||||
*/
|
||||
public $active;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var array Lines cptbk
|
||||
*/
|
||||
public $lines_cptbk;
|
||||
|
||||
/**
|
||||
* @var mixed Sample property 1
|
||||
* @var array Lines display
|
||||
*/
|
||||
public $lines_display;
|
||||
|
||||
@ -151,12 +151,12 @@ class AccountancyCategory // extends CommonObject
|
||||
if (isset($this->code)) $this->code=trim($this->code);
|
||||
if (isset($this->label)) $this->label=trim($this->label);
|
||||
if (isset($this->range_account)) $this->range_account=trim($this->range_account);
|
||||
if (isset($this->sens)) $this->sens=trim($this->sens);
|
||||
if (isset($this->category_type)) $this->category_type=trim($this->category_type);
|
||||
if (isset($this->sens)) $this->sens = (int) $this->sens;
|
||||
if (isset($this->category_type)) $this->category_type = (int) $this->category_type;
|
||||
if (isset($this->formula)) $this->formula=trim($this->formula);
|
||||
if (isset($this->position)) $this->position=trim($this->position);
|
||||
if (isset($this->fk_country)) $this->fk_country=trim($this->fk_country);
|
||||
if (isset($this->active)) $this->active=trim($this->active);
|
||||
if (isset($this->position)) $this->position = (int) $this->position;
|
||||
if (isset($this->fk_country)) $this->fk_country = (int) $this->fk_country;
|
||||
if (isset($this->active)) $this->active = (int) $this->active;
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
@ -308,12 +308,12 @@ class AccountancyCategory // extends CommonObject
|
||||
if (isset($this->code)) $this->code=trim($this->code);
|
||||
if (isset($this->label)) $this->label=trim($this->label);
|
||||
if (isset($this->range_account)) $this->range_account=trim($this->range_account);
|
||||
if (isset($this->sens)) $this->sens=trim($this->sens);
|
||||
if (isset($this->category_type)) $this->category_type=trim($this->category_type);
|
||||
if (isset($this->sens)) $this->sens = (int) $this->sens;
|
||||
if (isset($this->category_type)) $this->category_type = (int) $this->category_type;
|
||||
if (isset($this->formula)) $this->formula=trim($this->formula);
|
||||
if (isset($this->position)) $this->position=trim($this->position);
|
||||
if (isset($this->fk_country)) $this->fk_country=trim($this->fk_country);
|
||||
if (isset($this->active)) $this->active=trim($this->active);
|
||||
if (isset($this->position)) $this->position = (int) $this->position;
|
||||
if (isset($this->fk_country)) $this->fk_country = (int) $this->fk_country;
|
||||
if (isset($this->active)) $this->active = (int) $this->active;
|
||||
|
||||
|
||||
// Check parameters
|
||||
@ -338,8 +338,8 @@ class AccountancyCategory // extends CommonObject
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
//if (! $error)
|
||||
//{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action call a trigger.
|
||||
//if (! $notrigger)
|
||||
@ -351,7 +351,7 @@ class AccountancyCategory // extends CommonObject
|
||||
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// // End call triggers
|
||||
//}
|
||||
}
|
||||
//}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
@ -393,8 +393,8 @@ class AccountancyCategory // extends CommonObject
|
||||
$resql = $this->db->query($sql);
|
||||
if (! $resql) { $error++; $this->errors[]="Error ".$this->db->lasterror(); }
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
//if (! $error)
|
||||
//{
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action call a trigger.
|
||||
//if (! $notrigger)
|
||||
@ -406,7 +406,7 @@ class AccountancyCategory // extends CommonObject
|
||||
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// // End call triggers
|
||||
//}
|
||||
}
|
||||
//}
|
||||
|
||||
// Commit or rollback
|
||||
if ($error)
|
||||
@ -514,7 +514,7 @@ class AccountancyCategory // extends CommonObject
|
||||
/**
|
||||
* Function to select accounting category of an accounting account present in chart of accounts
|
||||
*
|
||||
* @param int $id Id category
|
||||
* @param int $id Id of category to know which account to exclude
|
||||
*
|
||||
* @return int <0 if KO, 0 if not found, >0 if OK
|
||||
*/
|
||||
@ -569,12 +569,13 @@ class AccountancyCategory // extends CommonObject
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/accounting.lib.php';
|
||||
|
||||
$sql = "SELECT aa.rowid,aa.account_number ";
|
||||
$sql = "SELECT aa.rowid, aa.account_number";
|
||||
$sql .= " FROM " . MAIN_DB_PREFIX . "accounting_account as aa";
|
||||
$sql .= " INNER JOIN " . MAIN_DB_PREFIX . "accounting_system as asy ON aa.fk_pcg_version = asy.pcg_version";
|
||||
$sql .= " AND asy.rowid = " . $conf->global->CHARTOFACCOUNTS;
|
||||
$sql .= " AND aa.active = 1";
|
||||
$sql .= " AND aa.entity = " . $conf->entity;
|
||||
$sql .= " ORDER BY LENGTH(aa.account_number) DESC;"; // LENGTH is ok with mysql and postgresql
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
@ -587,10 +588,16 @@ class AccountancyCategory // extends CommonObject
|
||||
return -1;
|
||||
}
|
||||
|
||||
while ( $obj = $this->db->fetch_object($resql))
|
||||
$accountincptsadded=array();
|
||||
while ($obj = $this->db->fetch_object($resql))
|
||||
{
|
||||
if (array_key_exists(length_accountg($obj->account_number), $cpts))
|
||||
$account_number_formated=length_accountg($obj->account_number);
|
||||
if (! empty($accountincptsadded[$account_number_formated])) continue;
|
||||
|
||||
if (array_key_exists($account_number_formated, $cpts))
|
||||
{
|
||||
$accountincptsadded[$account_number_formated]=1;
|
||||
// We found an account number that is in list $cpts of account to add
|
||||
$sql = "UPDATE " . MAIN_DB_PREFIX . "accounting_account";
|
||||
$sql .= " SET fk_accounting_category=" . $id_cat;
|
||||
$sql .= " WHERE rowid=".$obj->rowid;
|
||||
|
||||
@ -31,20 +31,15 @@
|
||||
* \brief Class accountancy export
|
||||
*/
|
||||
|
||||
/**
|
||||
* Class AccountancyExport
|
||||
*
|
||||
* Manage the different format accountancy export
|
||||
*/
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT . '/core/lib/functions.lib.php';
|
||||
|
||||
/**
|
||||
* Manage the different format accountancy export
|
||||
*/
|
||||
class AccountancyExport
|
||||
{
|
||||
/**
|
||||
* Type of export. Defined by $conf->global->ACCOUNTING_EXPORT_MODELCSV
|
||||
*/
|
||||
public static $EXPORT_TYPE_NORMAL = 1; // CSV
|
||||
// Type of export. Used into $conf->global->ACCOUNTING_EXPORT_MODELCSV
|
||||
public static $EXPORT_TYPE_NORMAL = 1; // CSV
|
||||
public static $EXPORT_TYPE_CONFIGURABLE = 10; // CSV
|
||||
public static $EXPORT_TYPE_CEGID = 2;
|
||||
public static $EXPORT_TYPE_COALA = 3;
|
||||
|
||||
@ -64,13 +64,13 @@ if ($conf->accounting->enabled)
|
||||
|
||||
// STEPS
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("AccountingJournals").'</strong>'.'</a>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescJournalSetup", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/journals_list.php?id=35">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("AccountingJournals").'</strong>'.'</a>');
|
||||
print "<br>\n";
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Pcg_version").'</strong>'.'</a>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChartModel", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/accountmodel.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Pcg_version").'</strong>'.'</a>');
|
||||
print "<br>\n";
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>'.'</a>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescChart", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/account.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("Chartofaccounts").'</strong>'.'</a>');
|
||||
print "<br>\n";
|
||||
|
||||
print "<br>\n";
|
||||
@ -79,20 +79,20 @@ if ($conf->accounting->enabled)
|
||||
print "<br>\n";
|
||||
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>'.'</a>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDefault", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/defaultaccounts.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>'.'</a>');
|
||||
print "<br>\n";
|
||||
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong>'.'</a>')."\n";
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBank", $step, '<a href="'.DOL_URL_ROOT.'/compta/bank/list.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuBankAccounts").'</strong>'.'</a>')."\n";
|
||||
print "<br>\n";
|
||||
|
||||
$step++;
|
||||
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>'.'</a>';
|
||||
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=10&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuVatAccounts").'</strong>'.'</a>';
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescVat", $step, $textlink);
|
||||
print "<br>\n";
|
||||
if (! empty($conf->tax->enabled))
|
||||
{
|
||||
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup").'-'.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>'.'</a>';
|
||||
$textlink = '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=7&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuTaxAccounts").'</strong>'.'</a>';
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescContrib", $step, $textlink);
|
||||
print "<br>\n";
|
||||
@ -100,7 +100,7 @@ if ($conf->accounting->enabled)
|
||||
/*if (! empty($conf->salaries->enabled))
|
||||
{
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSal", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
// htdocs/admin/salaries.php
|
||||
print "<br>\n";
|
||||
print "<br>\n";
|
||||
@ -108,36 +108,37 @@ if ($conf->accounting->enabled)
|
||||
if (! empty($conf->expensereport->enabled)) // TODO Move this in the default account page because this is only one accounting account per purpose, not several.
|
||||
{
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>'.'</a>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescExpenseReport", $step, '<a href="'.DOL_URL_ROOT.'/admin/dict.php?id=17&from=accountancy">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuExpenseReportAccounts").'</strong>'.'</a>');
|
||||
print "<br>\n";
|
||||
}
|
||||
/*
|
||||
if (! empty($conf->loan->enabled))
|
||||
{
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").'-'.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescLoan", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuSpecialExpenses").' - '.$langs->transnoentitiesnoconv("Loans").'</strong> '.$langs->transnoentitiesnoconv("or").' <strong>'.$langs->transnoentitiesnoconv("MenuFinancial").'-'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print "<br>\n";
|
||||
}
|
||||
if (! empty($conf->don->enabled))
|
||||
{
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescDonation", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print "<br>\n";
|
||||
}
|
||||
if (! empty($conf->adherents->enabled))
|
||||
{
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescSubscription", $step, '<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("MenuDefaultAccounts").'</strong>');
|
||||
print "<br>\n";
|
||||
}*/
|
||||
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy").'-'.$langs->transnoentitiesnoconv("Setup")."-".$langs->transnoentitiesnoconv("ProductsBinding").'</strong>'.'</a>');
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescProd", $step, '<a href="'.DOL_URL_ROOT.'/accountancy/admin/productaccount.php">'.'<strong>'.$langs->transnoentitiesnoconv("Setup").' - '.$langs->transnoentitiesnoconv("ProductsBinding").'</strong>'.'</a>');
|
||||
print "<br>\n";
|
||||
|
||||
|
||||
print '<br>';
|
||||
|
||||
// Step A - E
|
||||
|
||||
print "<br>\n";
|
||||
print load_fiche_titre('<span class="fa fa-calendar"></span> '.$langs->trans("AccountancyAreaDescActionFreq"), '', '');
|
||||
@ -148,22 +149,22 @@ if ($conf->accounting->enabled)
|
||||
$langs->loadLangs(array('bills', 'trips'));
|
||||
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), '<a href="'.DOL_URL_ROOT.'/accountancy/customer/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>'.'</a>')."\n";
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsCustomers"), '<a href="'.DOL_URL_ROOT.'/accountancy/customer/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("CustomersVentilation").'</strong>'.'</a>')."\n";
|
||||
print "<br>\n";
|
||||
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>'.'</a>')."\n";
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("BillsSuppliers"), '<a href="'.DOL_URL_ROOT.'/accountancy/supplier/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("SuppliersVentilation").'</strong>'.'</a>')."\n";
|
||||
print "<br>\n";
|
||||
|
||||
if (! empty($conf->expensereport->enabled) || ! empty($conf->deplacement->enabled))
|
||||
{
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), '<a href="'.DOL_URL_ROOT.'/accountancy/expensereport/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("MenuAccountancy")."-".$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>'.'</a>')."\n";
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescBind", chr(64+$step), $langs->transnoentitiesnoconv("ExpenseReports"), '<a href="'.DOL_URL_ROOT.'/accountancy/expensereport/index.php">'.'<strong>'.$langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("ExpenseReportsVentilation").'</strong>'.'</a>')."\n";
|
||||
print "<br>\n";
|
||||
}
|
||||
|
||||
$step++;
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("Journalization"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n";
|
||||
print img_picto('', 'puce').' '.$langs->trans("AccountancyAreaDescWriteRecords", chr(64+$step), $langs->transnoentitiesnoconv("TransferInAccounting").' - '.$langs->transnoentitiesnoconv("RegistrationInAccounting"), $langs->transnoentitiesnoconv("WriteBookKeeping"))."\n";
|
||||
print "<br>\n";
|
||||
|
||||
$step++;
|
||||
|
||||
@ -587,7 +587,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
dol_syslog(get_class($this)."::update update member", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
if ($resql)
|
||||
@ -1866,7 +1866,7 @@ class Adherent extends CommonObject
|
||||
|
||||
$error=0;
|
||||
|
||||
// Check paramaters
|
||||
// Check parameters
|
||||
if ($this->statut == 0)
|
||||
{
|
||||
dol_syslog(get_class($this)."::resiliate statut of member does not allow this", LOG_WARNING);
|
||||
@ -2149,7 +2149,7 @@ class Adherent extends CommonObject
|
||||
* @param int $statut Id statut
|
||||
* @param int $need_subscription 1 if member type need subscription, 0 otherwise
|
||||
* @param int $date_end_subscription Date fin adhesion
|
||||
* @param int $mode 0=libelle long, 1=libelle court, 2=Picto + Libelle court, 3=Picto, 4=Picto + Libelle long, 5=Libelle court + Picto
|
||||
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=Short label + Picto, 6=Long label + Picto
|
||||
* @return string Label
|
||||
*/
|
||||
public function LibStatut($statut, $need_subscription, $date_end_subscription, $mode = 0)
|
||||
@ -2209,7 +2209,7 @@ class Adherent extends CommonObject
|
||||
}
|
||||
elseif ($mode == 5)
|
||||
{
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0');
|
||||
if ($statut == -1) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusDraftShort").'</span> '.img_picto($langs->trans('MemberStatusDraft'), 'statut0');
|
||||
elseif ($statut >= 1) {
|
||||
if (! $date_end_subscription) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveShort").' </span>'.img_picto($langs->trans('MemberStatusActive'), 'statut1');
|
||||
elseif ($date_end_subscription < time()) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveLateShort").' </span>'.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3');
|
||||
@ -2219,13 +2219,13 @@ class Adherent extends CommonObject
|
||||
}
|
||||
elseif ($mode == 6)
|
||||
{
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0');
|
||||
if ($statut == -1) return $langs->trans("MemberStatusDraft").' '.img_picto($langs->trans('MemberStatusDraft'), 'statut0');
|
||||
if ($statut >= 1) {
|
||||
if (! $date_end_subscription) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActive").' </span>'.img_picto($langs->trans('MemberStatusActive'), 'statut1');
|
||||
elseif ($date_end_subscription < time()) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusActiveLate").' </span>'.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3');
|
||||
else return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusPaid").' </span>'.img_picto($langs->trans('MemberStatusPaid'), 'statut4');
|
||||
if (! $date_end_subscription) return $langs->trans("MemberStatusActive").' '.img_picto($langs->trans('MemberStatusActive'), 'statut1');
|
||||
elseif ($date_end_subscription < time()) return $langs->trans("MemberStatusActiveLate").' '.img_picto($langs->trans('MemberStatusActiveLate'), 'statut3');
|
||||
else return $langs->trans("MemberStatusPaid").' '.img_picto($langs->trans('MemberStatusPaid'), 'statut4');
|
||||
}
|
||||
if ($statut == 0) return '<span class="hideonsmartphone">'.$langs->trans("MemberStatusResiliated").' </span>'.img_picto($langs->trans('MemberStatusResiliated'), 'statut5');
|
||||
if ($statut == 0) return $langs->trans("MemberStatusResiliated").' '.img_picto($langs->trans('MemberStatusResiliated'), 'statut5');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -436,23 +436,23 @@ if (! empty($conf->global->MAIN_SHOW_TECHNICAL_ID))
|
||||
if (! empty($arrayfields['d.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.civility']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth25" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).'"></td>';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_civility" value="'.dol_escape_htmltag($search_civility).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.firstname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_firstname" value="'.dol_escape_htmltag($search_firstname).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.lastname']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_lastname" value="'.dol_escape_htmltag($search_lastname).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.gender']['checked']))
|
||||
{
|
||||
@ -464,12 +464,12 @@ if (! empty($arrayfields['d.gender']['checked']))
|
||||
if (! empty($arrayfields['d.company']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_company" value="'.dol_escape_htmltag($search_company).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.login']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_login" value="'.dol_escape_htmltag($search_login).'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.morphy']['checked']))
|
||||
{
|
||||
@ -487,24 +487,24 @@ if (! empty($arrayfields['t.libelle']['checked']))
|
||||
if (! empty($arrayfields['d.address']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_address" value="'.$search_address.'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_address" value="'.$search_address.'"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.zip']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_zip" value="'.$search_zip.'"></td>';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_zip" value="'.$search_zip.'"></td>';
|
||||
}
|
||||
if (! empty($arrayfields['d.town']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_town" value="'.$search_town.'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_town" value="'.$search_town.'"></td>';
|
||||
}
|
||||
// State
|
||||
if (! empty($arrayfields['state.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat searchstring maxwidth50" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
||||
print '<input class="flat searchstring maxwidth75imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Country
|
||||
@ -518,7 +518,7 @@ if (! empty($arrayfields['country.code_iso']['checked']))
|
||||
if (! empty($arrayfields['d.phone']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_phone" value="'.$search_phone.'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_phone" value="'.$search_phone.'"></td>';
|
||||
}
|
||||
// Phone perso
|
||||
if (! empty($arrayfields['d.phone_perso']['checked']))
|
||||
@ -530,13 +530,13 @@ if (! empty($arrayfields['d.phone_perso']['checked']))
|
||||
if (! empty($arrayfields['d.phone_mobile']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_phone_mobile" value="'.$search_phone_mobile.'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_phone_mobile" value="'.$search_phone_mobile.'"></td>';
|
||||
}
|
||||
// Email
|
||||
if (! empty($arrayfields['d.email']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat maxwidth50" type="text" name="search_email" value="'.$search_email.'"></td>';
|
||||
print '<input class="flat maxwidth75imp" type="text" name="search_email" value="'.$search_email.'"></td>';
|
||||
}
|
||||
|
||||
if (! empty($arrayfields['d.datefin']['checked']))
|
||||
|
||||
104
htdocs/admin/debugbar.php
Normal file
104
htdocs/admin/debugbar.php
Normal file
@ -0,0 +1,104 @@
|
||||
<?php
|
||||
/* Copyright (C) 2005-2012 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2013 Juanjo Menent <jmenent@2byte.es>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/admin/debugbar.php
|
||||
* \ingroup debugbar
|
||||
* \brief Setup page for debugbar module
|
||||
*/
|
||||
|
||||
require '../main.inc.php';
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/admin.lib.php';
|
||||
|
||||
global $conf;
|
||||
|
||||
if (!$user->admin) accessforbidden();
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->loadLangs(array("admin","other"));
|
||||
|
||||
$error=0;
|
||||
$action = GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
*/
|
||||
|
||||
// Set modes
|
||||
if ($action == 'set')
|
||||
{
|
||||
$db->begin();
|
||||
|
||||
$result = dolibarr_set_const($db, "DEBUGBAR_LOGS_LINES_NUMBER", GETPOST('DEBUGBAR_LOGS_LINES_NUMBER', 'int'), 'chaine', 0, '', 0);
|
||||
if ($result < 0)
|
||||
{
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error)
|
||||
{
|
||||
$db->commit();
|
||||
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
|
||||
}
|
||||
else
|
||||
{
|
||||
$db->rollback();
|
||||
setEventMessages($error, $errors, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* View
|
||||
*/
|
||||
|
||||
llxHeader();
|
||||
|
||||
$form=new Form($db);
|
||||
|
||||
$linkback='<a href="'.DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1">'.$langs->trans("BackToModuleList").'</a>';
|
||||
print load_fiche_titre($langs->trans("DebugBarSetup"), $linkback, 'title_setup');
|
||||
print '<br>';
|
||||
|
||||
//print load_fiche_titre($langs->trans("DebugBar"));
|
||||
|
||||
// Level
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="set">';
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Parameter").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td class="right"><input type="submit" class="button" '.$option.' value="'.$langs->trans("Modify").'"></td>';
|
||||
print "</tr>\n";
|
||||
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DEBUGBAR_LOGS_LINES_NUMBER").'</td>';
|
||||
print '<td colspan="2"><input type="text" class="flat" name="DEBUGBAR_LOGS_LINES_NUMBER" value="'.(empty($conf->global->DEBUGBAR_LOGS_LINES_NUMBER) ? 250 : $conf->global->DEBUGBAR_LOGS_LINES_NUMBER).'">'; // This slow seriously output
|
||||
print ' '.$langs->trans("WarningValueHigherSlowsDramaticalyOutput");
|
||||
print '</td></tr>';
|
||||
|
||||
print '</table>';
|
||||
print "</form>\n";
|
||||
|
||||
// End of page
|
||||
llxFooter();
|
||||
$db->close();
|
||||
@ -77,8 +77,7 @@ if ($action == 'updateMask')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen')
|
||||
elseif ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module', 'alpha');
|
||||
|
||||
@ -122,7 +121,6 @@ else if ($action == 'specimen')
|
||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
@ -137,7 +135,6 @@ elseif ($action == 'del')
|
||||
if ($conf->global->FACTURE_ADDON_PDF == "$value") dolibarr_del_const($db, 'FACTURE_ADDON_PDF', $conf->entity);
|
||||
}
|
||||
}
|
||||
|
||||
// Set default model
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
@ -155,7 +152,6 @@ elseif ($action == 'setdoc')
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
}
|
||||
|
||||
elseif ($action == 'setmod')
|
||||
{
|
||||
// TODO Verifier si module numerotation choisi peut etre active
|
||||
@ -163,8 +159,7 @@ elseif ($action == 'setmod')
|
||||
|
||||
dolibarr_set_const($db, "FACTURE_ADDON", $value, 'chaine', 0, '', $conf->entity);
|
||||
}
|
||||
|
||||
else if ($action == 'setribchq')
|
||||
elseif ($action == 'setribchq')
|
||||
{
|
||||
$rib = GETPOST('rib', 'alpha');
|
||||
$chq = GETPOST('chq', 'alpha');
|
||||
@ -183,8 +178,7 @@ else if ($action == 'setribchq')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_FACTURE_DRAFT_WATERMARK')
|
||||
elseif ($action == 'set_FACTURE_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft = GETPOST('FACTURE_DRAFT_WATERMARK', 'alpha');
|
||||
|
||||
@ -202,7 +196,7 @@ else if ($action == 'set_FACTURE_DRAFT_WATERMARK')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_INVOICE_FREE_TEXT')
|
||||
elseif ($action == 'set_INVOICE_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('INVOICE_FREE_TEXT', 'none'); // No alpha here, we want exact string
|
||||
|
||||
@ -219,8 +213,7 @@ else if ($action == 'set_INVOICE_FREE_TEXT')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setforcedate')
|
||||
elseif ($action == 'setforcedate')
|
||||
{
|
||||
$forcedate = GETPOST('forcedate', 'alpha');
|
||||
|
||||
@ -237,8 +230,7 @@ else if ($action == 'setforcedate')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setDefaultPDFModulesByType')
|
||||
elseif ($action == 'setDefaultPDFModulesByType')
|
||||
{
|
||||
$invoicetypemodels = GETPOST('invoicetypemodels');
|
||||
|
||||
|
||||
@ -139,7 +139,7 @@ if ($action == 'update')
|
||||
|
||||
dolibarr_set_const($db, "MAIN_SIZE_LISTE_LIMIT", $_POST["main_size_liste_limit"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_SIZE_SHORTLIST_LIMIT", $_POST["main_size_shortliste_limit"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["main_disable_javascript"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DISABLE_JAVASCRIPT", $_POST["MAIN_DISABLE_JAVASCRIPT"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_BUTTON_HIDE_UNAUTHORIZED", $_POST["MAIN_BUTTON_HIDE_UNAUTHORIZED"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_START_WEEK", $_POST["MAIN_START_WEEK"], 'chaine', 0, '', $conf->entity);
|
||||
dolibarr_set_const($db, "MAIN_DEFAULT_WORKING_DAYS", $_POST["MAIN_DEFAULT_WORKING_DAYS"], 'chaine', 0, '', $conf->entity);
|
||||
@ -259,11 +259,18 @@ if ($action == 'edit') // Edit
|
||||
print '<br>';
|
||||
|
||||
// Other
|
||||
print '<table summary="edit" class="noborder" width="100%">';
|
||||
print '<table summary="otherparameters" class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr><td>'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print $form->selectyesno('MAIN_DISABLE_JAVASCRIPT', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// Max size of lists
|
||||
print '<tr><td>'.$langs->trans("DefaultMaxSizeList").'</td><td><input class="flat" name="main_size_liste_limit" size="4" value="' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '"></td>';
|
||||
print '<td width="20"> </td>';
|
||||
@ -283,13 +290,6 @@ if ($action == 'edit') // Edit
|
||||
print '</tr>';
|
||||
*/
|
||||
|
||||
// Disable javascript and ajax
|
||||
print '<tr><td>'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print $form->selectyesno('main_disable_javascript', isset($conf->global->MAIN_DISABLE_JAVASCRIPT)?$conf->global->MAIN_DISABLE_JAVASCRIPT:0, 1);
|
||||
print '</td>';
|
||||
print '<td width="20"> </td>';
|
||||
print '</tr>';
|
||||
|
||||
// First day for weeks
|
||||
print '<tr><td class="titlefield">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print $formother->select_dayofweek((isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'), 'MAIN_START_WEEK', 0);
|
||||
@ -468,17 +468,21 @@ else // Show
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td class="titlefield">'.$langs->trans("Parameters").'</td><td>'.$langs->trans("Value").'</td></tr>';
|
||||
|
||||
// Disable javascript/ajax
|
||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT);
|
||||
print ' <span class="opacitymedium"> - '.$langs->trans("DisableJavascriptNote").'</span>';
|
||||
print "</td>";
|
||||
print "</tr>";
|
||||
|
||||
// Max size of lists
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeList").'</td><td>' . $conf->global->MAIN_SIZE_LISTE_LIMIT . '</td>';
|
||||
print "</tr>";
|
||||
|
||||
// Max size of short lists
|
||||
print '<tr class="oddeven"><td>'.$langs->trans("DefaultMaxSizeShortList").'</td><td>' . $conf->global->MAIN_SIZE_SHORTLIST_LIMIT . '</td>';
|
||||
print "</tr>";
|
||||
|
||||
// Disable javascript/ajax
|
||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("DisableJavascript").'</td><td>';
|
||||
print yn($conf->global->MAIN_DISABLE_JAVASCRIPT)."</td>";
|
||||
print "</tr>";
|
||||
|
||||
// First day for weeks
|
||||
print '<tr class="oddeven"><td class="titlefield">'.$langs->trans("WeekStartOnDay").'</td><td>';
|
||||
print $langs->trans("Day".(isset($conf->global->MAIN_START_WEEK)?$conf->global->MAIN_START_WEEK:'1'));
|
||||
|
||||
@ -173,7 +173,7 @@ if ($action == 'specimen')
|
||||
}
|
||||
|
||||
// Set default model
|
||||
else if ($action == 'setdoc')
|
||||
elseif ($action == 'setdoc')
|
||||
{
|
||||
if (dolibarr_set_const($db, "PAYMENTORDER_ADDON_PDF",$value,'chaine',0,'',$conf->entity))
|
||||
{
|
||||
|
||||
@ -69,8 +69,7 @@ if ($action == 'updateMask')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'specimen')
|
||||
elseif ($action == 'specimen')
|
||||
{
|
||||
$modele=GETPOST('module', 'alpha');
|
||||
|
||||
@ -114,14 +113,13 @@ else if ($action == 'specimen')
|
||||
dol_syslog($langs->trans("ErrorModuleNotFound"), LOG_ERR);
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setribchq')
|
||||
elseif ($action == 'setribchq')
|
||||
{
|
||||
$rib = GETPOST('rib','alpha');
|
||||
$chq = GETPOST('chq','alpha');
|
||||
$rib = GETPOST('rib', 'alpha');
|
||||
$chq = GETPOST('chq', 'alpha');
|
||||
|
||||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER",$rib,'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER",$chq,'chaine',0,'',$conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_RIB_NUMBER", $rib, 'chaine', 0, '', $conf->entity);
|
||||
$res = dolibarr_set_const($db, "FACTURE_CHQ_NUMBER", $chq, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
if (! $res > 0) $error++;
|
||||
|
||||
@ -134,8 +132,7 @@ else if ($action == 'setribchq')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_PROPALE_DRAFT_WATERMARK')
|
||||
elseif ($action == 'set_PROPALE_DRAFT_WATERMARK')
|
||||
{
|
||||
$draft = GETPOST('PROPALE_DRAFT_WATERMARK', 'alpha');
|
||||
|
||||
@ -151,8 +148,7 @@ else if ($action == 'set_PROPALE_DRAFT_WATERMARK')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_PROPOSAL_FREE_TEXT')
|
||||
elseif ($action == 'set_PROPOSAL_FREE_TEXT')
|
||||
{
|
||||
$freetext = GETPOST('PROPOSAL_FREE_TEXT', 'none'); // No alpha here, we want exact string
|
||||
|
||||
@ -169,8 +165,7 @@ else if ($action == 'set_PROPOSAL_FREE_TEXT')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'setdefaultduration')
|
||||
elseif ($action == 'setdefaultduration')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "PROPALE_VALIDITY_DURATION", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@ -186,7 +181,7 @@ else if ($action == 'setdefaultduration')
|
||||
}
|
||||
}
|
||||
|
||||
else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
|
||||
elseif ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
|
||||
{
|
||||
$res = dolibarr_set_const($db, "BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL", $value, 'chaine', 0, '', $conf->entity);
|
||||
|
||||
@ -201,13 +196,11 @@ else if ($action == 'set_BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL')
|
||||
setEventMessages($langs->trans("Error"), null, 'errors');
|
||||
}
|
||||
}
|
||||
|
||||
// Activate a model
|
||||
else if ($action == 'set')
|
||||
elseif ($action == 'set')
|
||||
{
|
||||
$ret = addDocumentModel($value, $type, $label, $scandir);
|
||||
}
|
||||
|
||||
elseif ($action == 'del')
|
||||
{
|
||||
$ret = delDocumentModel($value, $type);
|
||||
@ -476,7 +469,7 @@ foreach ($dirmodels as $reldir)
|
||||
print '</td>';
|
||||
|
||||
// Info
|
||||
$htmltooltip = ''.$langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip = $langs->trans("Name").': '.$module->name;
|
||||
$htmltooltip.='<br>'.$langs->trans("Type").': '.($module->type?$module->type:$langs->trans("Unknown"));
|
||||
if ($module->type == 'pdf')
|
||||
{
|
||||
@ -526,7 +519,7 @@ print '</table>';
|
||||
if (empty($conf->facture->enabled))
|
||||
{
|
||||
print '<br>';
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"),'','');
|
||||
print load_fiche_titre($langs->trans("SuggestedPaymentModesIfNotDefinedInProposal"), '', '');
|
||||
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="POST">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'" />';
|
||||
@ -608,7 +601,7 @@ if (empty($conf->facture->enabled))
|
||||
|
||||
print '<option value="'.$row[0].'"';
|
||||
print $conf->global->FACTURE_CHQ_NUMBER == $row[0] ? ' selected':'';
|
||||
print '>'.$langs->trans("OwnerOfBankAccount",$row[1]).'</option>';
|
||||
print '>'.$langs->trans("OwnerOfBankAccount", $row[1]).'</option>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -269,7 +269,7 @@ print '<br>'."\n\n";
|
||||
print load_fiche_titre($langs->trans("SyslogLevel"));
|
||||
|
||||
// Level
|
||||
print '<form action="syslog.php" method="post">';
|
||||
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="action" value="setlevel">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2013-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -70,6 +70,18 @@ else
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
// Module debugbar
|
||||
print '<br>';
|
||||
print '<strong>'.$langs->trans("DebugBar").'</strong>: ';
|
||||
$test=empty($conf->debugbar->enabled);
|
||||
if ($test) print img_picto('', 'tick.png').' '.$langs->trans("NotInstalled");
|
||||
else
|
||||
{
|
||||
print img_picto('', 'warning').' '.$langs->trans("DebugBarModuleActivated");
|
||||
//print ' '.$langs->trans("MoreInformation").' <a href="'.DOL_URL_ROOT.'/admin/system/xdebug.php'.'">XDebug admin page</a>';
|
||||
}
|
||||
print '<br>';
|
||||
|
||||
// Applicative cache
|
||||
print '<br>';
|
||||
print '<strong>'.$langs->trans("ApplicativeCache").'</strong>: ';
|
||||
|
||||
@ -387,7 +387,7 @@ $parameters=array('arrayfields'=>$arrayfields);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListOption', $parameters, $object); // Note that $action and $object may have been modified by hook
|
||||
print $hookmanager->resPrint;
|
||||
// Action column
|
||||
print '<td class="liste_titre" align="right">';
|
||||
print '<td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -509,7 +509,7 @@ if (isset($totalarray['pos']))
|
||||
while ($i < $totalarray['nbfield'])
|
||||
{
|
||||
$i++;
|
||||
if (! empty($totalarray['pos'][$i])) print '<td align="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
if (! empty($totalarray['pos'][$i])) print '<td class="right">'.price($totalarray['val'][$totalarray['pos'][$i]]).'</td>';
|
||||
else
|
||||
{
|
||||
if ($i == 1)
|
||||
|
||||
@ -70,6 +70,7 @@ class BOM extends CommonObject
|
||||
* 'label' the translation key.
|
||||
* 'enabled' is a condition when the field must be managed.
|
||||
* 'visible' says if field is visible in list (Examples: 0=Not visible, 1=Visible on list and create/update/view forms, 2=Visible on list only, 3=Visible on create/update/view form only (not list), 4=Visible on list and update/view form only (not create). Using a negative value means field is not shown by default on list but can be selected for viewing)
|
||||
* 'noteditable' says if field is not editable (1 or 0)
|
||||
* 'notnull' is set to 1 if not null in database. Set to -1 if we must set data to null if empty ('' or 0).
|
||||
* 'default' is a default value for creation (can still be replaced by the global setup of default values)
|
||||
* 'index' if we want an index in database.
|
||||
@ -90,7 +91,7 @@ class BOM extends CommonObject
|
||||
*/
|
||||
public $fields=array(
|
||||
'rowid' => array('type'=>'integer', 'label'=>'TechnicalID', 'enabled'=>1, 'visible'=>-1, 'position'=>1, 'notnull'=>1, 'index'=>1, 'comment'=>"Id",),
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',),
|
||||
'ref' => array('type'=>'varchar(128)', 'label'=>'Ref', 'enabled'=>1, 'noteditable'=>1, 'visible'=>4, 'position'=>10, 'notnull'=>1, 'default'=>'(PROV)', 'index'=>1, 'searchall'=>1, 'comment'=>"Reference of BOM", 'showoncombobox'=>'1',),
|
||||
'label' => array('type'=>'varchar(255)', 'label'=>'Label', 'enabled'=>1, 'visible'=>1, 'position'=>30, 'notnull'=>1, 'searchall'=>1, 'showoncombobox'=>'1',),
|
||||
'description' => array('type'=>'text', 'label'=>'Description', 'enabled'=>1, 'visible'=>-1, 'position'=>60, 'notnull'=>-1,),
|
||||
'note_public' => array('type'=>'html', 'label'=>'NotePublic', 'enabled'=>1, 'visible'=>-1, 'position'=>61, 'notnull'=>-1,),
|
||||
@ -103,7 +104,7 @@ class BOM extends CommonObject
|
||||
'fk_user_valid' => array('type'=>'integer', 'label'=>'UserValidation', 'enabled'=>1, 'visible'=>-2, 'position'=>512, 'notnull'=>0,),
|
||||
'import_key' => array('type'=>'varchar(14)', 'label'=>'ImportId', 'enabled'=>1, 'visible'=>-2, 'position'=>1000, 'notnull'=>-1,),
|
||||
'fk_product' => array('type'=>'integer:Product:product/class/product.class.php', 'label'=>'Product', 'enabled'=>1, 'visible'=>1, 'position'=>50, 'notnull'=>1, 'index'=>1, 'help'=>'ProductBOMHelp'),
|
||||
'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1',),
|
||||
'qty' => array('type'=>'real', 'label'=>'Quantity', 'enabled'=>1, 'visible'=>1, 'default'=>1, 'position'=>55, 'notnull'=>1, 'isameasure'=>'1', 'css'=>'maxwidth75imp'),
|
||||
'status' => array('type'=>'integer', 'label'=>'Status', 'enabled'=>1, 'visible'=>2, 'position'=>1000, 'notnull'=>1, 'default'=>0, 'index'=>1, 'arrayofkeyval'=>array('0'=>'Draft', '1'=>'Enabled', '-1'=>'Disabled')),
|
||||
);
|
||||
public $rowid;
|
||||
@ -289,6 +290,24 @@ class BOM extends CommonObject
|
||||
$this->lines=array();
|
||||
|
||||
// Load lines with object BOMLine
|
||||
$sql = 'SELECT rowid, fk_product, description, qty, rank WHERE fk_bom = '.$this->id;
|
||||
|
||||
$resql=$this->db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$obj = $this->db->fetch_object($resql);
|
||||
if ($obj)
|
||||
{
|
||||
$newline = new BOMLine($this->db);
|
||||
$newline->id = $obj->rowid;
|
||||
$newline->fk_product = $obj->fk_product;
|
||||
$newline->description = $obj->description;
|
||||
$newline->qty = $obj->qty;
|
||||
$newline->rank = $obj->rank;
|
||||
|
||||
$this->lines[] = $newline;
|
||||
}
|
||||
}
|
||||
|
||||
return count($this->lines)?1:0;
|
||||
}
|
||||
@ -397,6 +416,62 @@ class BOM extends CommonObject
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Returns the reference to the following non used BOM depending on the active numbering module
|
||||
* defined into BOM_ADDON
|
||||
*
|
||||
* @param Product $prod Object product
|
||||
* @return string BOM free reference
|
||||
*/
|
||||
public function getNextNumRef($prod)
|
||||
{
|
||||
global $langs, $conf;
|
||||
$langs->load("mrp");
|
||||
|
||||
if (! empty($conf->global->BOM_ADDON))
|
||||
{
|
||||
$mybool=false;
|
||||
|
||||
$file = $conf->global->BOM_ADDON.".php";
|
||||
$classname = $conf->global->BOM_ADDON;
|
||||
|
||||
// Include file with class
|
||||
$dirmodels=array_merge(array('/'), (array) $conf->modules_parts['models']);
|
||||
foreach ($dirmodels as $reldir)
|
||||
{
|
||||
$dir = dol_buildpath($reldir."core/modules/bom/");
|
||||
|
||||
// Load file with numbering class (if found)
|
||||
$mybool|=@include_once $dir.$file;
|
||||
}
|
||||
|
||||
if ($mybool === false)
|
||||
{
|
||||
dol_print_error('', "Failed to include file ".$file);
|
||||
return '';
|
||||
}
|
||||
|
||||
$obj = new $classname();
|
||||
$numref = $obj->getNextValue($prod, $this);
|
||||
|
||||
if ($numref != "")
|
||||
{
|
||||
return $numref;
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->error=$obj->error;
|
||||
//dol_print_error($this->db,get_class($this)."::getNextNumRef ".$obj->error);
|
||||
return "";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("Error")." ".$langs->trans("Error_BOM_ADDON_NotDefined");
|
||||
return "";
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Validate bom
|
||||
*
|
||||
@ -433,7 +508,8 @@ class BOM extends CommonObject
|
||||
// Define new ref
|
||||
if (! $error && (preg_match('/^[\(]?PROV/i', $this->ref) || empty($this->ref))) // empty should not happened, but when it occurs, the test save life
|
||||
{
|
||||
$num = $this->getNextNumRef();
|
||||
$this->fetch_product();
|
||||
$num = $this->getNextNumRef($this->product);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -520,7 +596,6 @@ class BOM extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Set draft status
|
||||
*
|
||||
@ -529,7 +604,6 @@ class BOM extends CommonObject
|
||||
*/
|
||||
public function setDraft($user)
|
||||
{
|
||||
//phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
$error=0;
|
||||
@ -889,36 +963,6 @@ class BOMLine extends CommonObject
|
||||
// END MODULEBUILDER PROPERTIES
|
||||
|
||||
|
||||
|
||||
// If this object has a subtable with lines
|
||||
|
||||
/**
|
||||
* @var int Name of subtable line
|
||||
*/
|
||||
//public $table_element_line = 'bomlinedet';
|
||||
|
||||
/**
|
||||
* @var int Field with ID of parent key if this field has a parent
|
||||
*/
|
||||
//public $fk_element = 'fk_bomline';
|
||||
|
||||
/**
|
||||
* @var int Name of subtable class that manage subtable lines
|
||||
*/
|
||||
//public $class_element_line = 'BillOfMaterialsLineline';
|
||||
|
||||
/**
|
||||
* @var array Array of child tables (child tables to delete before deleting a record)
|
||||
*/
|
||||
//protected $childtables=array('bomlinedet');
|
||||
|
||||
/**
|
||||
* @var BillOfMaterialsLineLine[] Array of subtable lines
|
||||
*/
|
||||
//public $lines = array();
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -1351,35 +1395,4 @@ class BOMLine extends CommonObject
|
||||
{
|
||||
$this->initAsSpecimenCommon();
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Action executed by scheduler
|
||||
* CAN BE A CRON TASK. In such a case, parameters come from the schedule job setup field 'Parameters'
|
||||
*
|
||||
* @return int 0 if OK, <>0 if KO (this function is used also by cron so only 0 is OK)
|
||||
*/
|
||||
//public function doScheduledJob($param1, $param2, ...)
|
||||
public function doScheduledJob()
|
||||
{
|
||||
global $conf, $langs;
|
||||
|
||||
//$conf->global->SYSLOG_FILE = 'DOL_DATA_ROOT/dolibarr_mydedicatedlofile.log';
|
||||
|
||||
$error = 0;
|
||||
$this->output = '';
|
||||
$this->error='';
|
||||
|
||||
dol_syslog(__METHOD__, LOG_DEBUG);
|
||||
|
||||
$now = dol_now();
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
// ...
|
||||
|
||||
$this->db->commit();
|
||||
|
||||
return $error;
|
||||
}
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@ if (!$user->admin)
|
||||
accessforbidden();
|
||||
|
||||
// Load translation files required by the page
|
||||
$langs->load("categories");
|
||||
$langs->loadLangs(array("categories","admin"));
|
||||
|
||||
$action=GETPOST('action', 'aZ09');
|
||||
|
||||
|
||||
@ -909,7 +909,7 @@ class Categorie extends CommonObject
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Return childs of a category
|
||||
* Return direct childs id of a category into an array
|
||||
*
|
||||
* @return array|int <0 KO, array ok
|
||||
*/
|
||||
@ -922,7 +922,7 @@ class Categorie extends CommonObject
|
||||
$res = $this->db->query($sql);
|
||||
if ($res)
|
||||
{
|
||||
$cats = array ();
|
||||
$cats = array();
|
||||
while ($rec = $this->db->fetch_array($res))
|
||||
{
|
||||
$cat = new Categorie($this->db);
|
||||
@ -940,16 +940,14 @@ class Categorie extends CommonObject
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Load this->motherof that is array(id_son=>id_parent, ...)
|
||||
* Load the array this->motherof that is array(id_son=>id_parent, ...)
|
||||
*
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
protected function load_motherof()
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf;
|
||||
|
||||
$this->motherof=array();
|
||||
$this->motherof=array();
|
||||
|
||||
// Load array[child]=parent
|
||||
$sql = "SELECT fk_parent as id_parent, rowid as id_son";
|
||||
@ -985,12 +983,12 @@ class Categorie extends CommonObject
|
||||
* fulllabel = nom avec chemin complet de la categorie
|
||||
* fullpath = chemin complet compose des id
|
||||
*
|
||||
* @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member') or (0, 1, 2, ...).
|
||||
* @param int $markafterid Removed all categories including the leaf $markafterid in category tree.
|
||||
*
|
||||
* @return array|int Array of categories. this->cats and this->motherof are set, -1 on error
|
||||
* @param string $type Type of categories ('customer', 'supplier', 'contact', 'product', 'member') or (0, 1, 2, ...).
|
||||
* @param int $markafterid Removed all categories including the leaf $markafterid in category tree.
|
||||
* @param int $keeponlyifinleafid Keep only of category is inside the leaf starting with this id.
|
||||
* @return array|int Array of categories. this->cats and this->motherof are set, -1 on error
|
||||
*/
|
||||
public function get_full_arbo($type, $markafterid = 0)
|
||||
public function get_full_arbo($type, $markafterid = 0, $keeponlyifinleafid = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf, $langs;
|
||||
@ -1007,9 +1005,9 @@ class Categorie extends CommonObject
|
||||
$sql = "SELECT DISTINCT c.rowid, c.label, c.description, c.color, c.fk_parent, c.visible"; // Distinct reduce pb with old tables with duplicates
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= ", t.label as label_trans, t.description as description_trans";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."categorie as c";
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$current_lang."'";
|
||||
if (! empty($conf->global->MAIN_MULTILANGS)) $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."categorie_lang as t ON t.fk_category=c.rowid AND t.lang='".$this->db->escape($current_lang)."'";
|
||||
$sql .= " WHERE c.entity IN (" . getEntity('category') . ")";
|
||||
$sql .= " AND c.type = " . $type;
|
||||
$sql .= " AND c.type = " . (int) $type;
|
||||
|
||||
dol_syslog(get_class($this)."::get_full_arbo get category list", LOG_DEBUG);
|
||||
$resql = $this->db->query($sql);
|
||||
@ -1059,6 +1057,27 @@ class Categorie extends CommonObject
|
||||
}
|
||||
}
|
||||
}
|
||||
// Exclude leaf including $markafterid from tree
|
||||
if ($keeponlyifinleafid)
|
||||
{
|
||||
//print "Look to discard category ".$keeponlyifinleafid."\n";
|
||||
$keyfilter1='^'.$keeponlyifinleafid.'$';
|
||||
$keyfilter2='_'.$keeponlyifinleafid.'$';
|
||||
$keyfilter3='^'.$keeponlyifinleafid.'_';
|
||||
$keyfilter4='_'.$keeponlyifinleafid.'_';
|
||||
foreach($this->cats as $key => $val)
|
||||
{
|
||||
if (preg_match('/'.$keyfilter1.'/', $val['fullpath']) || preg_match('/'.$keyfilter2.'/', $val['fullpath'])
|
||||
|| preg_match('/'.$keyfilter3.'/', $val['fullpath']) || preg_match('/'.$keyfilter4.'/', $val['fullpath']))
|
||||
{
|
||||
// We keep
|
||||
}
|
||||
else
|
||||
{
|
||||
unset($this->cats[$key]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::get_full_arbo dol_sort_array", LOG_DEBUG);
|
||||
$this->cats=dol_sort_array($this->cats, 'fulllabel', 'asc', true, false);
|
||||
@ -1070,7 +1089,8 @@ class Categorie extends CommonObject
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel
|
||||
* For category id_categ and its childs available in this->cats, define property fullpath and fulllabel.
|
||||
* This function is a memory scan only from $this->cats and $this->motherof, no database access must be done here.
|
||||
*
|
||||
* @param int $id_categ id_categ entry to update
|
||||
* @param int $protection Deep counter to avoid infinite loop
|
||||
@ -1174,6 +1194,19 @@ class Categorie extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Returns the top level categories (which are not child)
|
||||
*
|
||||
* @param int $type Type of category (0, 1, ...)
|
||||
* @return array
|
||||
*/
|
||||
public function get_main_categories($type = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->get_all_categories($type, true);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Check if no category with same label already exists for this cat's parent or root and for this cat's type
|
||||
@ -1225,18 +1258,6 @@ class Categorie extends CommonObject
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Returns the top level categories (which are not girls)
|
||||
*
|
||||
* @param int $type Type of category (0, 1, ...)
|
||||
* @return array
|
||||
*/
|
||||
public function get_main_categories($type = null)
|
||||
{
|
||||
// phpcs:enable
|
||||
return $this->get_all_categories($type, true);
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
|
||||
@ -218,66 +218,70 @@ if ($object->id)
|
||||
$pdir = get_exdir($object->id, 2, 0, 0, $object, 'category') . $object->id ."/photos/";
|
||||
$dir = $upload_dir.'/'.$pdir;
|
||||
|
||||
print '<br>';
|
||||
print '<table width="100%" valign="top" align="center">';
|
||||
$listofphoto = $object->liste_photos($dir);
|
||||
|
||||
foreach ($object->liste_photos($dir) as $key => $obj)
|
||||
if (is_array($listofphoto) && count($listofphoto))
|
||||
{
|
||||
$nbphoto++;
|
||||
print '<br>';
|
||||
print '<table width="100%" valign="top" align="center">';
|
||||
|
||||
foreach ($listofphoto as $key => $obj)
|
||||
{
|
||||
$nbphoto++;
|
||||
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '<tr align=center valign=middle border=1>';
|
||||
if ($nbbyrow) print '<td width="'.ceil(100/$nbbyrow).'%" class="photo">';
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 1)) print '<tr align=center valign=middle border=1>';
|
||||
if ($nbbyrow) print '<td width="'.ceil(100/$nbbyrow).'%" class="photo">';
|
||||
|
||||
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$obj['photo']).'" alt="Taille origine" target="_blank">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$obj['photo']).'" alt="Taille origine" target="_blank">';
|
||||
|
||||
// Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
|
||||
if ($obj['photo_vignette'])
|
||||
{
|
||||
$filename=$obj['photo_vignette'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename=$obj['photo'];
|
||||
}
|
||||
// Si fichier vignette disponible, on l'utilise, sinon on utilise photo origine
|
||||
if ($obj['photo_vignette'])
|
||||
{
|
||||
$filename=$obj['photo_vignette'];
|
||||
}
|
||||
else
|
||||
{
|
||||
$filename=$obj['photo'];
|
||||
}
|
||||
|
||||
// Nom affiche
|
||||
$viewfilename=$obj['photo'];
|
||||
// Nom affiche
|
||||
$viewfilename=$obj['photo'];
|
||||
|
||||
// Taille de l'image
|
||||
$object->get_image_size($dir.$filename);
|
||||
$imgWidth = ($object->imgWidth < $maxWidth) ? $object->imgWidth : $maxWidth;
|
||||
$imgHeight = ($object->imgHeight < $maxHeight) ? $object->imgHeight : $maxHeight;
|
||||
// Taille de l'image
|
||||
$object->get_image_size($dir.$filename);
|
||||
$imgWidth = ($object->imgWidth < $maxWidth) ? $object->imgWidth : $maxWidth;
|
||||
$imgHeight = ($object->imgHeight < $maxHeight) ? $object->imgHeight : $maxHeight;
|
||||
|
||||
print '<img border="0" width="'.$imgWidth.'" height="'.$imgHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename).'">';
|
||||
print '<img border="0" width="'.$imgWidth.'" height="'.$imgHeight.'" src="'.DOL_URL_ROOT.'/viewimage.php?modulepart=category&entity='.$object->entity.'&file='.urlencode($pdir.$filename).'">';
|
||||
|
||||
print '</a>';
|
||||
print '<br>'.$viewfilename;
|
||||
print '<br>';
|
||||
print '</a>';
|
||||
print '<br>'.$viewfilename;
|
||||
print '<br>';
|
||||
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
}
|
||||
if ($user->rights->categorie->creer)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">';
|
||||
print img_delete().'</a>';
|
||||
}
|
||||
if ($nbbyrow) print '</td>';
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print '</tr>';
|
||||
// On propose la generation de la vignette si elle n'existe pas et si la taille est superieure aux limites
|
||||
if (!$obj['photo_vignette'] && preg_match('/(\.bmp|\.gif|\.jpg|\.jpeg|\.png)$/i', $obj['photo']) && ($object->imgWidth > $maxWidth || $object->imgHeight > $maxHeight))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=addthumb&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">'.img_picto($langs->trans('GenerateThumb'), 'refresh').' </a>';
|
||||
}
|
||||
if ($user->rights->categorie->creer)
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&type='.$type.'&file='.urlencode($pdir.$viewfilename).'">';
|
||||
print img_delete().'</a>';
|
||||
}
|
||||
if ($nbbyrow) print '</td>';
|
||||
if ($nbbyrow && ($nbphoto % $nbbyrow == 0)) print '</tr>';
|
||||
}
|
||||
|
||||
// Ferme tableau
|
||||
while ($nbphoto % $nbbyrow)
|
||||
{
|
||||
print '<td width="'.ceil(100/$nbbyrow).'%"> </td>';
|
||||
$nbphoto++;
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
}
|
||||
|
||||
// Ferme tableau
|
||||
while ($nbphoto % $nbbyrow)
|
||||
{
|
||||
print '<td width="'.ceil(100/$nbbyrow).'%"> </td>';
|
||||
$nbphoto++;
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
if ($nbphoto < 1)
|
||||
{
|
||||
print '<div class="opacitymedium">'.$langs->trans("NoPhotoYet")."</div>";
|
||||
|
||||
@ -313,7 +313,7 @@ else
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("NoSubCat")."</td></tr>";
|
||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("NoSubCat").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -342,10 +342,9 @@ if ($type == Categorie::TYPE_PRODUCT)
|
||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||
print '<input type="hidden" name="action" value="addintocategory">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td width="40%">';
|
||||
print '<tr class="liste_titre"><td>';
|
||||
print $langs->trans("AddProductServiceIntoCategory").' ';
|
||||
print $form->select_produits('', 'elemid', '', 0, 0, -1, 2, '', 1);
|
||||
print '</td><td>';
|
||||
print '<input type="submit" class="button" value="'.$langs->trans("ClassifyInCategory").'"></td>';
|
||||
print '</tr>';
|
||||
print '</table>';
|
||||
@ -354,7 +353,7 @@ if ($type == Categorie::TYPE_PRODUCT)
|
||||
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("ProductsAndServices")." (".count($prods).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="3">'.$langs->trans("ProductsAndServices").' <span class="badge">'.count($prods).'</span></td></tr>'."\n";
|
||||
|
||||
if (count($prods) > 0)
|
||||
{
|
||||
@ -376,8 +375,9 @@ if ($type == Categorie::TYPE_PRODUCT)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$prod->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
@ -385,7 +385,7 @@ if ($type == Categorie::TYPE_PRODUCT)
|
||||
}
|
||||
else
|
||||
{
|
||||
print "<tr ".$bc[false].'><td colspan="2" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProduct")."</td></tr>";
|
||||
print '<tr class="oddeven"><td colspan="2" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProduct").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -402,7 +402,7 @@ if ($type == Categorie::TYPE_SUPPLIER)
|
||||
{
|
||||
print "<br>";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Suppliers")." (".count($socs).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Suppliers").' <span class="badge">'.count($socs)."</span></td></tr>\n";
|
||||
|
||||
if (count($socs) > 0)
|
||||
{
|
||||
@ -423,8 +423,9 @@ if ($type == Categorie::TYPE_SUPPLIER)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
|
||||
@ -433,7 +434,7 @@ if ($type == Categorie::TYPE_SUPPLIER)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoSupplier").'</td></tr>';
|
||||
print '<tr class="oddeven"><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoSupplier").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -450,7 +451,7 @@ if($type == Categorie::TYPE_CUSTOMER)
|
||||
{
|
||||
print "<br>";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Customers")." (".count($socs).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Customers").' <span class="badge">'.count($socs).'</span></td></tr>'."\n";
|
||||
|
||||
if (count($socs) > 0)
|
||||
{
|
||||
@ -476,8 +477,9 @@ if($type == Categorie::TYPE_CUSTOMER)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$soc->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
@ -485,7 +487,7 @@ if($type == Categorie::TYPE_CUSTOMER)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoCustomer").'</td></tr>';
|
||||
print '<tr class="oddeven"><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoCustomer").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -505,7 +507,7 @@ if ($type == Categorie::TYPE_MEMBER)
|
||||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Member")." (".count($prods).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Member").' <span class="badge">'.count($prods).'</span></td></tr>'."\n";
|
||||
|
||||
if (count($prods) > 0)
|
||||
{
|
||||
@ -529,15 +531,16 @@ if ($type == Categorie::TYPE_MEMBER)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$member->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoMember").'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoMember").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -555,7 +558,7 @@ if ($type == Categorie::TYPE_CONTACT)
|
||||
{
|
||||
print "<br>";
|
||||
print '<table class="noborder" width="100%">'."\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Contact")." (".count($contacts).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="2">'.$langs->trans("Contact").' <span class="badge">'.count($contacts).'</span></td></tr>'."\n";
|
||||
|
||||
if (count($contacts) > 0)
|
||||
{
|
||||
@ -579,8 +582,9 @@ if ($type == Categorie::TYPE_CONTACT)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$contact->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print '</td>';
|
||||
print "</tr>\n";
|
||||
@ -588,7 +592,7 @@ if ($type == Categorie::TYPE_CONTACT)
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[false].'><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoContact").'</td></tr>';
|
||||
print '<tr class="oddeven"><td class="opacitymedium">'.$langs->trans("ThisCategoryHasNoContact").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -608,7 +612,7 @@ if ($type == Categorie::TYPE_ACCOUNT)
|
||||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Account")." (".count($accounts).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Account").' <span class="badge">'.count($accounts).'</span></td></tr>'."\n";
|
||||
|
||||
if (count($accounts) > 0)
|
||||
{
|
||||
@ -631,15 +635,16 @@ if ($type == Categorie::TYPE_ACCOUNT)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$account->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoAccount").'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoAccount").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
@ -659,7 +664,7 @@ if ($type == Categorie::TYPE_PROJECT)
|
||||
{
|
||||
print "<br>";
|
||||
print "<table class='noborder' width='100%'>\n";
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Project")." (".count($projects).")</td></tr>\n";
|
||||
print '<tr class="liste_titre"><td colspan="4">'.$langs->trans("Project").' <span class="badge">'.count($projects).'</span></td></tr>'."\n";
|
||||
|
||||
if (count($projects) > 0)
|
||||
{
|
||||
@ -682,15 +687,16 @@ if ($type == Categorie::TYPE_PROJECT)
|
||||
if ($permission)
|
||||
{
|
||||
print "<a href= '".$_SERVER['PHP_SELF']."?".(empty($socid)?'id':'socid')."=".$object->id."&type=".$typeid."&removeelem=".$project->id."'>";
|
||||
print img_delete($langs->trans("DeleteFromCat")).' ';
|
||||
print $langs->trans("DeleteFromCat")."</a>";
|
||||
print $langs->trans("DeleteFromCat");
|
||||
print img_picto($langs->trans("DeleteFromCat"), 'unlink');
|
||||
print "</a>";
|
||||
}
|
||||
print "</tr>\n";
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr '.$bc[false].'><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProject").'</td></tr>';
|
||||
print '<tr class="oddeven"><td colspan="3" class="opacitymedium">'.$langs->trans("ThisCategoryHasNoProject").'</td></tr>';
|
||||
}
|
||||
print "</table>\n";
|
||||
}
|
||||
|
||||
@ -1392,6 +1392,8 @@ class ActionComm extends CommonObject
|
||||
*/
|
||||
public function build_exportfile($format, $type, $cachedelay, $filename, $filters)
|
||||
{
|
||||
global $hookmanager;
|
||||
|
||||
// phpcs:enable
|
||||
global $conf,$langs,$dolibarr_main_url_root,$mysoc;
|
||||
|
||||
@ -1457,6 +1459,11 @@ class ActionComm extends CommonObject
|
||||
$sql.= " FROM (".MAIN_DB_PREFIX."c_actioncomm as c, ".MAIN_DB_PREFIX."actioncomm as a)";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_author"; // Link to get author of event for export
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."societe as s on s.rowid = a.fk_soc";
|
||||
|
||||
$parameters=array('filters' => $filters);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListFrom', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
|
||||
// We must filter on assignement table
|
||||
if ($filters['logint']) $sql.=", ".MAIN_DB_PREFIX."actioncomm_resources as ar";
|
||||
$sql.= " WHERE a.fk_action=c.id";
|
||||
@ -1502,7 +1509,13 @@ class ActionComm extends CommonObject
|
||||
elseif ($result < 0 || $condition == '=') $sql.= " AND ar.fk_element = 0";
|
||||
}
|
||||
}
|
||||
|
||||
$sql.= " AND a.datep IS NOT NULL"; // To exclude corrupted events and avoid errors in lightning/sunbird import
|
||||
|
||||
$parameters=array('filters' => $filters);
|
||||
$reshook=$hookmanager->executeHooks('printFieldListWhere', $parameters); // Note that $action and $object may have been modified by hook
|
||||
$sql.=$hookmanager->resPrint;
|
||||
|
||||
$sql.= " ORDER by datep";
|
||||
//print $sql;exit;
|
||||
|
||||
|
||||
@ -7,7 +7,7 @@
|
||||
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
|
||||
* Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2013 Alexandre Spangaro <aspangaro@open-dsi.fr>
|
||||
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
@ -386,7 +386,7 @@ if ($object->id > 0)
|
||||
print '<tr><td class="nowrap">';
|
||||
print '<table width="100%" class="nobordernopadding"><tr><td class="nowrap">';
|
||||
print $langs->trans("CustomerRelativeDiscountShort");
|
||||
print '<td><td align="right">';
|
||||
print '<td><td class="right">';
|
||||
if ($user->rights->societe->creer && !$user->societe_id > 0)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remise.php?id='.$object->id.'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
@ -400,7 +400,7 @@ if ($object->id > 0)
|
||||
print '<table width="100%" class="nobordernopadding">';
|
||||
print '<tr><td class="nowrap">';
|
||||
print $langs->trans("CustomerAbsoluteDiscountShort");
|
||||
print '<td><td align="right">';
|
||||
print '<td><td class="right">';
|
||||
if ($user->rights->societe->creer && !$user->societe_id > 0)
|
||||
{
|
||||
print '<a href="'.DOL_URL_ROOT.'/comm/remx.php?id='.$object->id.'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?socid='.$object->id).'">'.img_edit($langs->trans("Modify")).'</a>';
|
||||
|
||||
@ -159,12 +159,13 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").($num?' <span class="badge">'.$num.'</span>':'').'</th></tr>';
|
||||
print '<th colspan="3">'.$langs->trans("ProposalsDraft").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></th></tr>';
|
||||
|
||||
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 '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="2" class="right">'.$langs->trans("Total").'</td><td class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
}
|
||||
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 '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
}
|
||||
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 '<tr class="oddeven"><td class="nowrap">';
|
||||
$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 '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
}
|
||||
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 '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
|
||||
print '<tr class="liste_total"><td>'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td colspan="2" class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -757,11 +773,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propal->lire)
|
||||
}
|
||||
if ($num > $nbofloop)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="5" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print "</div><br>";
|
||||
@ -861,11 +877,11 @@ if (! empty($conf->commande->enabled) && $user->rights->commande->lire)
|
||||
}
|
||||
if ($num > $nbofloop)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="5" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td class=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print "</div><br>";
|
||||
|
||||
@ -790,7 +790,7 @@ if (empty($reshook))
|
||||
// Go back to draft
|
||||
if ($action == 'modif' && $usercancreate)
|
||||
{
|
||||
$object->set_draft($user);
|
||||
$object->setDraft($user);
|
||||
|
||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||
{
|
||||
|
||||
@ -593,7 +593,7 @@ class Proposals extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->propal->set_draft(DolibarrApiAccess::$user);
|
||||
$result = $this->propal->setDraft(DolibarrApiAccess::$user);
|
||||
if ($result == 0) {
|
||||
throw new RestException(304, 'Nothing done. May be object is already draft');
|
||||
}
|
||||
|
||||
@ -2605,7 +2605,7 @@ class Propal extends CommonObject
|
||||
* @param int $notrigger 1=Does not execute triggers, 0= execute triggers
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function set_draft($user, $notrigger = 0)
|
||||
public function setDraft($user, $notrigger = 0)
|
||||
{
|
||||
// phpcs:enable
|
||||
$error=0;
|
||||
|
||||
@ -129,7 +129,7 @@ elseif ($action == 'deletecontact' && $user->rights->propale->creer)
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if ($action == 'setaddress' && $user->rights->propale->creer)
|
||||
elseif ($action == 'setaddress' && $user->rights->propale->creer)
|
||||
{
|
||||
$result=$object->setDeliveryAddress($_POST['fk_address']);
|
||||
if ($result < 0) dol_print_error($db,$object->error);
|
||||
|
||||
@ -172,16 +172,18 @@ if (! empty($conf->propal->enabled))
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="2">'.$langs->trans("DraftPropals").'</td></tr>';
|
||||
$langs->load("propal");
|
||||
$num = $db->num_rows($resql);
|
||||
if ($num)
|
||||
{
|
||||
print '<div class="div-table-responsive-no-min">';
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
$langs->load("propal");
|
||||
print '<td colspan="2">'.$langs->trans("DraftPropals").' <a href="'.DOL_URL_ROOT.'/comm/propal/list.php?viewstatut=0"><span class="badge">'.$num.'</span></a></td></tr>';
|
||||
|
||||
$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 '<tr class="oddeven">';
|
||||
@ -199,9 +201,17 @@ if (! empty($conf->propal->enabled))
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
if ($num > $nbofloop)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="2" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td class="right">'.$langs->trans("Total").'</td><td class="right">'.price($total)."</td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print "</div><br>";
|
||||
}
|
||||
print "</table>";
|
||||
print "</div><br>";
|
||||
}
|
||||
}
|
||||
|
||||
@ -365,11 +375,11 @@ if (! empty($conf->propal->enabled) && $user->rights->propale->lire)
|
||||
}
|
||||
if ($num > $nbofloop)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="5">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="5" class="right">'.$langs->trans("XMoreLines", ($num - $nbofloop))."</td></tr>";
|
||||
}
|
||||
elseif ($total>0)
|
||||
{
|
||||
print '<tr class="liste_total"><td colspan="3">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
print '<tr class="liste_total"><td colspan="3" class="right">'.$langs->trans("Total")."</td><td align=\"right\">".price($total)."</td><td> </td></tr>";
|
||||
}
|
||||
print "</table>";
|
||||
print "</div><br>";
|
||||
|
||||
@ -1219,7 +1219,7 @@ if (empty($reshook))
|
||||
}
|
||||
|
||||
if (! $error) {
|
||||
$result = $object->set_draft($user, $idwarehouse);
|
||||
$result = $object->setDraft($user, $idwarehouse);
|
||||
if ($result >= 0)
|
||||
{
|
||||
// Define output language
|
||||
|
||||
@ -770,7 +770,7 @@ class Orders extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->commande->set_draft(DolibarrApiAccess::$user, $idwarehouse);
|
||||
$result = $this->commande->setDraft(DolibarrApiAccess::$user, $idwarehouse);
|
||||
if ($result == 0) {
|
||||
throw new RestException(304, 'Nothing done. May be object is already closed');
|
||||
}
|
||||
|
||||
@ -479,7 +479,7 @@ class Commande extends CommonOrder
|
||||
* @param int $idwarehouse Warehouse ID to use for stock change (Used only if option STOCK_CALCULATE_ON_VALIDATE_ORDER is on)
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function set_draft($user, $idwarehouse = -1)
|
||||
public function setDraft($user, $idwarehouse = -1)
|
||||
{
|
||||
//phpcs:enable
|
||||
global $conf,$langs;
|
||||
@ -1635,7 +1635,7 @@ class Commande extends CommonOrder
|
||||
$sql.= ', c.date_livraison';
|
||||
$sql.= ', c.fk_shipping_method';
|
||||
$sql.= ', c.fk_warehouse';
|
||||
$sql.= ', c.fk_projet, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed';
|
||||
$sql.= ', c.fk_projet as fk_project, c.remise_percent, c.remise, c.remise_absolue, c.source, c.facture as billed';
|
||||
$sql.= ', c.note_private, c.note_public, c.ref_client, c.ref_ext, c.ref_int, c.model_pdf, c.last_main_doc, c.fk_delivery_address, c.extraparams';
|
||||
$sql.= ', c.fk_incoterms, c.location_incoterms';
|
||||
$sql.= ", c.fk_multicurrency, c.multicurrency_code, c.multicurrency_tx, c.multicurrency_total_ht, c.multicurrency_total_tva, c.multicurrency_total_ttc";
|
||||
@ -1696,7 +1696,7 @@ class Commande extends CommonOrder
|
||||
$this->note = $obj->note_private; // deprecated
|
||||
$this->note_private = $obj->note_private;
|
||||
$this->note_public = $obj->note_public;
|
||||
$this->fk_project = $obj->fk_projet;
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->modelpdf = $obj->model_pdf;
|
||||
$this->last_main_doc = $obj->last_main_doc;
|
||||
$this->mode_reglement_id = $obj->fk_mode_reglement;
|
||||
@ -3466,7 +3466,7 @@ class Commande extends CommonOrder
|
||||
$statusType='';
|
||||
$mode = 0;
|
||||
}
|
||||
|
||||
|
||||
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
|
||||
@ -107,7 +107,7 @@ elseif ($action == 'deletecontact' && $user->rights->commande->creer)
|
||||
}
|
||||
}
|
||||
/*
|
||||
else if ($action == 'setaddress' && $user->rights->commande->creer)
|
||||
elseif ($action == 'setaddress' && $user->rights->commande->creer)
|
||||
{
|
||||
$object->fetch($id);
|
||||
$result=$object->setDeliveryAddress($_POST['fk_address']);
|
||||
|
||||
@ -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.
|
||||
|
||||
@ -621,7 +621,7 @@ if (empty($reshook))
|
||||
{
|
||||
if (! empty($conf->global->INVOICE_CAN_ALWAYS_BE_EDITED) || ($resteapayer == $object->total_ttc && empty($object->paye)))
|
||||
{
|
||||
$result=$object->set_draft($user, $idwarehouse);
|
||||
$result=$object->setDraft($user, $idwarehouse);
|
||||
if ($result<0) setEventMessages($object->error, $object->errors, 'errors');
|
||||
|
||||
// Define output language
|
||||
@ -1320,6 +1320,8 @@ if (empty($reshook))
|
||||
|
||||
foreach ($amountdeposit as $tva => $amount)
|
||||
{
|
||||
if (empty($amount)) continue;
|
||||
|
||||
$arraylist = array('amount' => 'FixAmount','variable' => 'VarAmount');
|
||||
$descline = $langs->trans('Deposit');
|
||||
//$descline.= ' - '.$langs->trans($arraylist[$typeamount]);
|
||||
|
||||
@ -745,7 +745,7 @@ class Invoices extends DolibarrApi
|
||||
throw new RestException(401, 'Access not allowed for login '.DolibarrApiAccess::$user->login);
|
||||
}
|
||||
|
||||
$result = $this->invoice->set_draft(DolibarrApiAccess::$user, $idwarehouse);
|
||||
$result = $this->invoice->setDraft(DolibarrApiAccess::$user, $idwarehouse);
|
||||
if ($result == 0) {
|
||||
throw new RestException(304, 'Nothing done.');
|
||||
}
|
||||
|
||||
@ -381,7 +381,7 @@ class FactureRec extends CommonInvoice
|
||||
$sql.= ', f.date_lim_reglement as dlr';
|
||||
$sql.= ', f.note_private, f.note_public, f.fk_user_author';
|
||||
$sql.= ', f.modelpdf';
|
||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet';
|
||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project';
|
||||
$sql.= ', f.fk_account';
|
||||
$sql.= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.usenewprice, f.auto_validate';
|
||||
$sql.= ', f.generate_pdf';
|
||||
@ -438,7 +438,7 @@ class FactureRec extends CommonInvoice
|
||||
$this->cond_reglement_code = $obj->cond_reglement_code;
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
|
||||
$this->fk_project = $obj->fk_projet;
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->fk_account = $obj->fk_account;
|
||||
$this->fk_facture_source = $obj->fk_facture_source;
|
||||
$this->note_private = $obj->note_private;
|
||||
|
||||
@ -1321,7 +1321,7 @@ class Facture extends CommonInvoice
|
||||
$sql.= ', f.tms as datem';
|
||||
$sql.= ', f.note_private, f.note_public, f.fk_statut, f.paye, f.close_code, f.close_note, f.fk_user_author, f.fk_user_valid, f.model_pdf, f.last_main_doc';
|
||||
$sql.= ', f.fk_facture_source';
|
||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet, f.extraparams';
|
||||
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement, f.fk_projet as fk_project, f.extraparams';
|
||||
$sql.= ', f.situation_cycle_ref, f.situation_counter, f.situation_final';
|
||||
$sql.= ', f.fk_account';
|
||||
$sql.= ", f.fk_multicurrency, f.multicurrency_code, f.multicurrency_tx, f.multicurrency_total_ht, f.multicurrency_total_tva, f.multicurrency_total_ttc";
|
||||
@ -1386,7 +1386,7 @@ class Facture extends CommonInvoice
|
||||
$this->cond_reglement = $obj->cond_reglement_libelle;
|
||||
$this->cond_reglement_doc = $obj->cond_reglement_libelle_doc;
|
||||
$this->fk_account = ($obj->fk_account>0)?$obj->fk_account:null;
|
||||
$this->fk_project = $obj->fk_projet;
|
||||
$this->fk_project = $obj->fk_project;
|
||||
$this->fk_facture_source = $obj->fk_facture_source;
|
||||
$this->note = $obj->note_private; // deprecated
|
||||
$this->note_private = $obj->note_private;
|
||||
@ -2537,7 +2537,7 @@ class Facture extends CommonInvoice
|
||||
* @param int $idwarehouse Id warehouse to use for stock change.
|
||||
* @return int <0 if KO, >0 if OK
|
||||
*/
|
||||
public function set_draft($user, $idwarehouse = -1)
|
||||
public function setDraft($user, $idwarehouse = -1)
|
||||
{
|
||||
// phpcs:enable
|
||||
global $conf,$langs;
|
||||
|
||||
@ -687,14 +687,14 @@ if ($resql)
|
||||
if (! empty($arrayfields['f.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre" align="left">';
|
||||
print '<input class="flat" size="6" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_ref" value="'.dol_escape_htmltag($search_ref).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Ref customer
|
||||
if (! empty($arrayfields['f.ref_client']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="6" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_refcustomer" value="'.dol_escape_htmltag($search_refcustomer).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Type
|
||||
@ -737,22 +737,22 @@ if ($resql)
|
||||
// Project
|
||||
if (! empty($arrayfields['p.ref']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_project" value="'.$search_project.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat maxwidth50imp" type="text" name="search_project" value="'.$search_project.'"></td>';
|
||||
}
|
||||
// Thirpdarty
|
||||
if (! empty($arrayfields['s.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_societe" value="'.$search_societe.'"></td>';
|
||||
print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_societe" value="'.$search_societe.'"></td>';
|
||||
}
|
||||
// Town
|
||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="6" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
|
||||
if (! empty($arrayfields['s.town']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth75imp" type="text" name="search_town" value="'.dol_escape_htmltag($search_town).'"></td>';
|
||||
// Zip
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat" type="text" size="4" name="search_zip" value="'.dol_escape_htmltag($search_zip).'"></td>';
|
||||
if (! empty($arrayfields['s.zip']['checked'])) print '<td class="liste_titre"><input class="flat maxwidth50imp" type="text" name="search_zip" value="'.dol_escape_htmltag($search_zip).'"></td>';
|
||||
// State
|
||||
if (! empty($arrayfields['state.nom']['checked']))
|
||||
{
|
||||
print '<td class="liste_titre">';
|
||||
print '<input class="flat" size="4" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
||||
print '<input class="flat maxwidth50imp" type="text" name="search_state" value="'.dol_escape_htmltag($search_state).'">';
|
||||
print '</td>';
|
||||
}
|
||||
// Country
|
||||
@ -780,35 +780,35 @@ if ($resql)
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_montant_ht" value="'.dol_escape_htmltag($search_montant_ht).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_vat']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_montant_vat" value="'.dol_escape_htmltag($search_montant_vat).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax1']['checked']))
|
||||
{
|
||||
// Localtax1
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax1" value="'.$search_montant_localtax1.'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_montant_localtax1" value="'.$search_montant_localtax1.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_localtax2']['checked']))
|
||||
{
|
||||
// Localtax2
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_localtax2" value="'.$search_montant_localtax2.'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_montant_localtax2" value="'.$search_montant_localtax2.'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['f.total_ttc']['checked']))
|
||||
{
|
||||
// Amount
|
||||
print '<td class="liste_titre right">';
|
||||
print '<input class="flat" type="text" size="5" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '<input class="flat" type="text" size="4" name="search_montant_ttc" value="'.dol_escape_htmltag($search_montant_ttc).'">';
|
||||
print '</td>';
|
||||
}
|
||||
if (! empty($arrayfields['dynamount_payed']['checked']))
|
||||
|
||||
@ -1180,7 +1180,7 @@ class Paiement extends CommonObject
|
||||
$result='';
|
||||
$label = '<u>'.$langs->trans("ShowPayment").'</u><br>';
|
||||
$label.= '<strong>'.$langs->trans("Ref").':</strong> '.$this->ref;
|
||||
$label.= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour');
|
||||
if ($this->datepaye ? $this->datepaye : $this->date) $label.= '<br><strong>'.$langs->trans("Date").':</strong> '.dol_print_date($this->datepaye ? $this->datepaye : $this->date, 'dayhour');
|
||||
if ($mode == 'withlistofinvoices')
|
||||
{
|
||||
$arraybill = $this->getBillsArray();
|
||||
|
||||
@ -288,13 +288,13 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
$j=1;
|
||||
$sommes = array();
|
||||
$totPerAccount = array();
|
||||
if (!is_array($cats) && $cats<0) {
|
||||
setEventMessages(null,$AccCat->errors,'errors');
|
||||
if (! is_array($cats) && $cats < 0) {
|
||||
setEventMessages(null, $AccCat->errors, 'errors');
|
||||
} elseif (is_array($cats) && count($cats)>0) {
|
||||
foreach ($cats as $cat) // Loop on each group
|
||||
{
|
||||
if (!empty($cat['category_type'])) // category calculed
|
||||
{
|
||||
foreach ($cats as $cat) {
|
||||
// Loop on each group
|
||||
if (!empty($cat['category_type'])) {
|
||||
// category calculed
|
||||
// When we enter here, $sommes was filled by group of accounts
|
||||
|
||||
$formula = $cat['formula'];
|
||||
@ -315,7 +315,6 @@ elseif ($modecompta=="BOOKKEEPING")
|
||||
$vars[$code] = $det['NP'];
|
||||
}
|
||||
|
||||
|
||||
$result = strtr($formula, $vars);
|
||||
|
||||
//var_dump($result);
|
||||
|
||||
@ -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 = '<u>' . $langs->trans("ShowVatPayment") . '</u>';
|
||||
$label.= '<br>';
|
||||
$label.= '<b>' . $langs->trans('Ref') . ':</b> ' . $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");
|
||||
|
||||
@ -1911,21 +1911,21 @@ else
|
||||
// Si pas encore active
|
||||
if (! $objp->date_debut_reelle) {
|
||||
print $langs->trans("DateStartReal").': ';
|
||||
if ($objp->date_debut_reelle) print dol_print_date($objp->date_debut_reelle, 'day');
|
||||
if ($objp->date_debut_reelle) print dol_print_date($db->jdate($objp->date_debut_reelle), 'day');
|
||||
else print $langs->trans("ContractStatusNotRunning");
|
||||
}
|
||||
// Si active et en cours
|
||||
if ($objp->date_debut_reelle && ! $objp->date_fin_reelle) {
|
||||
print $langs->trans("DateStartReal").': ';
|
||||
print dol_print_date($objp->date_debut_reelle, 'day');
|
||||
print dol_print_date($db->jdate($objp->date_debut_reelle), 'day');
|
||||
}
|
||||
// Si desactive
|
||||
if ($objp->date_debut_reelle && $objp->date_fin_reelle) {
|
||||
print $langs->trans("DateStartReal").': ';
|
||||
print dol_print_date($objp->date_debut_reelle, 'day');
|
||||
print dol_print_date($db->jdate($objp->date_debut_reelle), 'day');
|
||||
print ' - ';
|
||||
print $langs->trans("DateEndReal").': ';
|
||||
print dol_print_date($objp->date_fin_reelle, 'day');
|
||||
print dol_print_date($db->jdate($objp->date_fin_reelle), 'day');
|
||||
}
|
||||
if (! empty($objp->comment)) print " - ".$objp->comment;
|
||||
print '</td>';
|
||||
|
||||
162
htdocs/core/boxes/box_birthdays.php
Normal file
162
htdocs/core/boxes/box_birthdays.php
Normal file
@ -0,0 +1,162 @@
|
||||
<?php
|
||||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2009 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015 Frederic France <frederic.france@free.fr>
|
||||
*
|
||||
* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \file htdocs/core/boxes/box_birthdays.php
|
||||
* \ingroup user
|
||||
* \brief Box for user birthdays
|
||||
*/
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/boxes/modules_boxes.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to manage the box to show user birthdays
|
||||
*/
|
||||
class box_birthdays extends ModeleBoxes
|
||||
{
|
||||
public $boxcode="birthdays";
|
||||
public $boximg="object_user";
|
||||
public $boxlabel="BoxBirthdays";
|
||||
public $depends = array("user");
|
||||
|
||||
/**
|
||||
* @var DoliDB Database handler.
|
||||
*/
|
||||
public $db;
|
||||
|
||||
public $enabled = 1;
|
||||
|
||||
public $info_box_head = array();
|
||||
public $info_box_contents = array();
|
||||
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
* @param string $param More parameters
|
||||
*/
|
||||
public function __construct($db, $param = '')
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
$this->db = $db;
|
||||
|
||||
$this->hidden = ! ($user->rights->user->user->lire && empty($user->socid));
|
||||
}
|
||||
|
||||
/**
|
||||
* Load data for box to show them later
|
||||
*
|
||||
* @param int $max Maximum number of records to load
|
||||
* @return void
|
||||
*/
|
||||
public function loadBox($max = 20)
|
||||
{
|
||||
global $user, $langs, $db, $conf;
|
||||
$langs->load("boxes");
|
||||
|
||||
$this->max=$max;
|
||||
|
||||
include_once DOL_DOCUMENT_ROOT.'/user/class/user.class.php';
|
||||
$userstatic=new User($db);
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleUserBirthdaysOfMonth"));
|
||||
|
||||
if ($user->rights->user->user->lire)
|
||||
{
|
||||
$sql = "SELECT u.rowid, u.firstname, u.lastname";
|
||||
$sql.= ", u.birth";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE u.entity IN (".getEntity('user').")";
|
||||
$sql.= " AND MONTH(u.birth) = ".date('m');
|
||||
$sql.= " ORDER BY u.birth ASC";
|
||||
$sql.= $db->plimit($max, 0);
|
||||
|
||||
dol_syslog(get_class($this)."::loadBox", LOG_DEBUG);
|
||||
$result = $db->query($sql);
|
||||
if ($result)
|
||||
{
|
||||
$num = $db->num_rows($result);
|
||||
|
||||
$line = 0;
|
||||
while ($line < $num)
|
||||
{
|
||||
$objp = $db->fetch_object($result);
|
||||
$userstatic->id = $objp->rowid;
|
||||
$userstatic->firstname = $objp->firstname;
|
||||
$userstatic->lastname = $objp->lastname;
|
||||
$userstatic->email = $objp->email;
|
||||
$dateb=$db->jdate($objp->birth);
|
||||
$age = date('Y', dol_now()) - date('Y', $dateb);
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => '',
|
||||
'text' => $userstatic->getNomUrl(1),
|
||||
'asis' => 1,
|
||||
);
|
||||
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right"',
|
||||
'text' => dol_print_date($dateb, "day") . ' - ' . $age . ' ' . $langs->trans('DurationYears')
|
||||
);
|
||||
|
||||
/*$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right" width="18"',
|
||||
'text' => $userstatic->LibStatut($objp->status, 3)
|
||||
);*/
|
||||
|
||||
$line++;
|
||||
}
|
||||
|
||||
if ($num==0) $this->info_box_contents[$line][0] = array('td' => 'class="center"','text'=>$langs->trans("NoRecordedUsers"));
|
||||
|
||||
$db->free($result);
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => '',
|
||||
'maxlength'=>500,
|
||||
'text' => ($db->error().' sql='.$sql)
|
||||
);
|
||||
}
|
||||
}
|
||||
else {
|
||||
$this->info_box_contents[0][0] = array(
|
||||
'td' => 'class="nohover opacitymedium left"',
|
||||
'text' => $langs->trans("ReadPermissionNotAllowed")
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* Method to show box
|
||||
*
|
||||
* @param array $head Array with properties of box title
|
||||
* @param array $contents Array with properties of box lines
|
||||
* @param int $nooutput No print, only return string
|
||||
* @return string
|
||||
*/
|
||||
public function showBox($head = null, $contents = null, $nooutput = 0)
|
||||
{
|
||||
return parent::showBox($this->info_box_head, $this->info_box_contents, $nooutput);
|
||||
}
|
||||
}
|
||||
@ -128,10 +128,6 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
);
|
||||
|
||||
|
||||
$paramtitle=$langs->transnoentitiesnoconv("Products").'/'.$langs->transnoentitiesnoconv("Services");
|
||||
if (empty($conf->produit->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Services");
|
||||
if (empty($conf->service->enabled)) $paramtitle=$langs->transnoentitiesnoconv("Products");
|
||||
|
||||
$socid=empty($user->societe_id)?0:$user->societe_id;
|
||||
$userid=0; // No filter on user creation
|
||||
|
||||
@ -190,7 +186,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
$px1->SetCssPrefix("cssboxes");
|
||||
//$px1->mode='depth';
|
||||
$px1->SetType(array('pie'));
|
||||
$px1->SetTitle($langs->trans("BoxProductDistributionFor", $paramtitle, $langs->transnoentitiesnoconv("Invoices")));
|
||||
$px1->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Invoices")));
|
||||
$px1->combine = 0.05;
|
||||
|
||||
$px1->draw($filenamenb, $fileurlnb);
|
||||
@ -250,7 +246,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
$px2->SetCssPrefix("cssboxes");
|
||||
//$px2->mode='depth';
|
||||
$px2->SetType(array('pie'));
|
||||
$px2->SetTitle($langs->trans("BoxProductDistributionFor", $paramtitle, $langs->transnoentitiesnoconv("Proposals")));
|
||||
$px2->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Proposals")));
|
||||
$px2->combine = 0.05;
|
||||
|
||||
$px2->draw($filenamenb, $fileurlnb);
|
||||
@ -311,7 +307,7 @@ class box_graph_product_distribution extends ModeleBoxes
|
||||
$px3->SetCssPrefix("cssboxes");
|
||||
//$px3->mode='depth';
|
||||
$px3->SetType(array('pie'));
|
||||
$px3->SetTitle($langs->trans("BoxProductDistributionFor", $paramtitle, $langs->transnoentitiesnoconv("Orders")));
|
||||
$px3->SetTitle($langs->trans("ForObject", $langs->transnoentitiesnoconv("Orders")));
|
||||
$px3->combine = 0.05;
|
||||
|
||||
$px3->draw($filenamenb, $fileurlnb);
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/*
|
||||
/* Copyright (C) 2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -472,26 +472,26 @@ abstract class CommonInvoice extends CommonObject
|
||||
$statusType='status0';
|
||||
$prefix='Short';
|
||||
if (! $paye){
|
||||
if ($status == 0){
|
||||
if ($status == 0) {
|
||||
$labelstatut = $langs->trans('BillStatusDraft');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusDraft');
|
||||
}
|
||||
elseif (($status == 3 || $status == 2) && $alreadypaid <= 0){
|
||||
elseif (($status == 3 || $status == 2) && $alreadypaid <= 0) {
|
||||
$labelstatut = $langs->trans('BillStatusClosedUnpaid');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedUnpaid');
|
||||
$statusType='status5';
|
||||
}
|
||||
elseif (($status == 3 || $status == 2) && $alreadypaid > 0){
|
||||
elseif (($status == 3 || $status == 2) && $alreadypaid > 0) {
|
||||
$labelstatut = $langs->trans('BillStatusClosedPaidPartially');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusClosedPaidPartially');
|
||||
$statusType='status9';
|
||||
}
|
||||
elseif ($alreadypaid <= 0){
|
||||
elseif ($alreadypaid <= 0) {
|
||||
$labelstatut = $langs->trans('BillStatusNotPaid');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusNotPaid');
|
||||
$statusType='status1';
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$labelstatut = $langs->trans('BillStatusStarted');
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusStarted');
|
||||
$statusType='status3';
|
||||
@ -500,7 +500,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
else
|
||||
{
|
||||
$statusType='status6';
|
||||
|
||||
|
||||
if ($type == self::TYPE_CREDIT_NOTE){
|
||||
$labelstatut = $langs->trans('BillStatusPaidBackOrConverted'); // credit note
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusPaidBackOrConverted'); // credit note
|
||||
@ -514,8 +514,8 @@ abstract class CommonInvoice extends CommonObject
|
||||
$labelstatutShort = $langs->trans('Bill'.$prefix.'StatusPaid');
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
return dolGetStatus($labelstatut, $labelstatutShort, '', $statusType, $mode);
|
||||
}
|
||||
|
||||
@ -525,7 +525,7 @@ abstract class CommonInvoice extends CommonObject
|
||||
* conditions de reglements de la facture et date de facturation.
|
||||
*
|
||||
* @param integer $cond_reglement Condition of payment (code or id) to use. If 0, we use current condition.
|
||||
* @return date Date limite de reglement si ok, <0 si ko
|
||||
* @return integer Date limite de reglement si ok, <0 si ko
|
||||
*/
|
||||
public function calculate_date_lim_reglement($cond_reglement = 0)
|
||||
{
|
||||
|
||||
@ -5373,7 +5373,7 @@ abstract class CommonObject
|
||||
* @param string $moreparam To add more parameters on html input tag
|
||||
* @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
* @param string|int $morecss Value for css to define style/length of field. May also be a numeric.
|
||||
* @param string|int $morecss Value for css to define style/length of field. May also be a numeric.
|
||||
* @return string
|
||||
*/
|
||||
public function showInputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = 0)
|
||||
@ -5427,7 +5427,7 @@ abstract class CommonObject
|
||||
|
||||
$langfile=$this->fields[$key]['langfile'];
|
||||
$list=$this->fields[$key]['list'];
|
||||
$hidden=abs($this->fields[$key]['visible'])!=1?1:0;
|
||||
$hidden=(in_array(abs($this->fields[$key]['visible']), array(0,2)) ? 1 : 0);
|
||||
|
||||
$objectid = $this->id;
|
||||
|
||||
@ -5439,12 +5439,12 @@ abstract class CommonObject
|
||||
}
|
||||
|
||||
|
||||
// Use in priority showsize from parameters, then $val['css'] then autodefine
|
||||
// Set value of $morecss. For this, we use in priority showsize from parameters, then $val['css'] then autodefine
|
||||
if (empty($morecss) && ! empty($val['css']))
|
||||
{
|
||||
$showsize = $val['css'];
|
||||
$morecss = $val['css'];
|
||||
}
|
||||
if (empty($morecss))
|
||||
elseif (empty($morecss))
|
||||
{
|
||||
if ($type == 'date')
|
||||
{
|
||||
@ -5500,6 +5500,10 @@ abstract class CommonObject
|
||||
$newsize=$tmp[0];
|
||||
$out='<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" maxlength="'.$newsize.'" value="'.dol_escape_htmltag($value).'"'.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif (in_array($type, array('real')))
|
||||
{
|
||||
$out='<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" value="'.dol_escape_htmltag($value).'"'.($moreparam?$moreparam:'').'>';
|
||||
}
|
||||
elseif (preg_match('/varchar/', $type))
|
||||
{
|
||||
$out='<input type="text" class="flat '.$morecss.' maxwidthonsmartphone" name="'.$keyprefix.$key.$keysuffix.'" id="'.$keyprefix.$key.$keysuffix.'" maxlength="'.$size.'" value="'.dol_escape_htmltag($value).'"'.($moreparam?$moreparam:'').'>';
|
||||
@ -5939,14 +5943,14 @@ abstract class CommonObject
|
||||
if(! empty($value)) {
|
||||
foreach($value as $option) {
|
||||
$out.= '<span><a class="'.dol_escape_htmltag($keyprefix.$key.$keysuffix).'_del" href="javascript:;"><span class="fa fa-minus-circle valignmiddle"></span></a> ';
|
||||
$out.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', $option, $moreparam, '', '', $showsize).'<br></span>';
|
||||
$out.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', $option, $moreparam, '', '', $morecss).'<br></span>';
|
||||
}
|
||||
}
|
||||
|
||||
$out.= '<a id="'.dol_escape_htmltag($keyprefix.$key.$keysuffix).'_add" href="javascript:;"><span class="fa fa-plus-circle valignmiddle"></span></a>';
|
||||
|
||||
$newInput = '<span><a class="'.dol_escape_htmltag($keyprefix.$key.$keysuffix).'_del" href="javascript:;"><span class="fa fa-minus-circle valignmiddle"></span></a> ';
|
||||
$newInput.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', '', $moreparam, '', '', $showsize).'<br></span>';
|
||||
$newInput.= $this->showInputField($newval, $keyprefix.$key.$keysuffix.'[]', '', $moreparam, '', '', $morecss).'<br></span>';
|
||||
|
||||
if(! empty($conf->use_javascript_ajax)) {
|
||||
$out.= '
|
||||
@ -5983,10 +5987,10 @@ abstract class CommonObject
|
||||
* @param string $moreparam To add more parametes on html input tag
|
||||
* @param string $keysuffix Prefix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
* @param string $keyprefix Suffix string to add into name and id of field (can be used to avoid duplicate names)
|
||||
* @param mixed $showsize Value for css to define size. May also be a numeric.
|
||||
* @param mixed $morecss Value for css to define size. May also be a numeric.
|
||||
* @return string
|
||||
*/
|
||||
public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $showsize = 0)
|
||||
public function showOutputField($val, $key, $value, $moreparam = '', $keysuffix = '', $keyprefix = '', $morecss = '')
|
||||
{
|
||||
global $conf,$langs,$form;
|
||||
|
||||
@ -6037,45 +6041,41 @@ abstract class CommonObject
|
||||
$value = dol_eval($computed, 1, 0);
|
||||
}
|
||||
|
||||
if (empty($showsize))
|
||||
if (empty($morecss))
|
||||
{
|
||||
if ($type == 'date')
|
||||
{
|
||||
//$showsize=10;
|
||||
$showsize = 'minwidth100imp';
|
||||
$morecss = 'minwidth100imp';
|
||||
}
|
||||
elseif ($type == 'datetime')
|
||||
{
|
||||
//$showsize=19;
|
||||
$showsize = 'minwidth200imp';
|
||||
$morecss = 'minwidth200imp';
|
||||
}
|
||||
elseif (in_array($type, array('int','double','price')))
|
||||
{
|
||||
//$showsize=10;
|
||||
$showsize = 'maxwidth75';
|
||||
$morecss = 'maxwidth75';
|
||||
}
|
||||
elseif ($type == 'url')
|
||||
{
|
||||
$showsize='minwidth400';
|
||||
$morecss='minwidth400';
|
||||
}
|
||||
elseif ($type == 'boolean')
|
||||
{
|
||||
$showsize='';
|
||||
$morecss='';
|
||||
}
|
||||
else
|
||||
{
|
||||
if (round($size) < 12)
|
||||
{
|
||||
$showsize = 'minwidth100';
|
||||
$morecss = 'minwidth100';
|
||||
}
|
||||
elseif (round($size) <= 48)
|
||||
{
|
||||
$showsize = 'minwidth200';
|
||||
$morecss = 'minwidth200';
|
||||
}
|
||||
else
|
||||
{
|
||||
//$showsize=48;
|
||||
$showsize = 'minwidth400';
|
||||
$morecss = 'minwidth400';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -93,29 +93,22 @@ class CUnits // extends CommonObject
|
||||
if (isset($this->unit_type)) $this->active=trim($this->unit_type);
|
||||
if (isset($this->active)) $this->active=trim($this->active);
|
||||
|
||||
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
// Insert request
|
||||
$sql = "INSERT INTO ".MAIN_DB_PREFIX."c_units(";
|
||||
|
||||
$sql.= "rowid,";
|
||||
$sql.= "code,";
|
||||
$sql.= "label,";
|
||||
$sql.= "short_label,";
|
||||
$sql.= "unit_type";
|
||||
|
||||
|
||||
$sql.= ") VALUES (";
|
||||
|
||||
$sql.= " ".(! isset($this->id)?'NULL':"'".$this->db->escape($this->id)."'").",";
|
||||
$sql.= " ".(! isset($this->code)?'NULL':"'".$this->db->escape($this->code)."'").",";
|
||||
$sql.= " ".(! isset($this->label)?'NULL':"'".$this->db->escape($this->label)."'").",";
|
||||
$sql.= " ".(! isset($this->short_label)?'NULL':"'".$this->db->escape($this->short_label)."'").",";
|
||||
$sql.= " ".(! isset($this->unit_type)?'NULL':"'".$this->db->escape($this->unit_type)."'");
|
||||
|
||||
$sql.= ")";
|
||||
|
||||
$this->db->begin();
|
||||
@ -187,7 +180,6 @@ class CUnits // extends CommonObject
|
||||
if ($unit_type) $sql_where[]= " t.unit_type = '".$this->db->escape($unit_type)."'";
|
||||
if ($code) $sql_where[]= " t.code = '".$this->db->escape($code)."'";
|
||||
if ($short_label) $sql_where[]= " t.short_label = '".$this->db->escape($short_label)."'";
|
||||
|
||||
if (count($sql_where)>0) {
|
||||
$sql.=' WHERE '. implode(' AND ', $sql_where);
|
||||
}
|
||||
@ -322,7 +314,6 @@ class CUnits // extends CommonObject
|
||||
if (isset($this->unit_type)) $this->libelle=trim($this->unit_type);
|
||||
if (isset($this->active)) $this->active=trim($this->active);
|
||||
|
||||
|
||||
// Check parameters
|
||||
// Put here code to add control on parameters values
|
||||
|
||||
|
||||
@ -2636,6 +2636,7 @@ class Form
|
||||
$sql.= " pfp.ref_fourn, pfp.rowid as idprodfournprice, pfp.price as fprice, pfp.quantity, pfp.remise_percent, pfp.remise, pfp.unitprice,";
|
||||
$sql.= " pfp.fk_supplier_price_expression, pfp.fk_product, pfp.tva_tx, pfp.fk_soc, s.nom as name,";
|
||||
$sql.= " pfp.supplier_reputation";
|
||||
if (! empty($conf->barcode->enabled)) $sql.= " ,pfp.barcode";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."product as p";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."product_fournisseur_price as pfp ON p.rowid = pfp.fk_product";
|
||||
if ($socid) $sql.= " AND pfp.fk_soc = ".$socid;
|
||||
@ -2660,7 +2661,10 @@ class Form
|
||||
$i++;
|
||||
}
|
||||
if (count($scrit) > 1) $sql.=")";
|
||||
if (! empty($conf->barcode->enabled)) $sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
|
||||
if (! empty($conf->barcode->enabled)){
|
||||
$sql.= " OR p.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
|
||||
$sql.= " OR pfp.barcode LIKE '".$this->db->escape($prefix.$filterkey)."%'";
|
||||
}
|
||||
$sql.=')';
|
||||
}
|
||||
$sql.= " ORDER BY pfp.ref_fourn DESC, pfp.quantity ASC";
|
||||
@ -2780,6 +2784,11 @@ class Form
|
||||
$opt .= " - ".dol_trunc($objp->name, 8);
|
||||
$outval.=" - ".dol_trunc($objp->name, 8);
|
||||
}
|
||||
if (! empty($conf->barcode->enabled) && !empty($objp->barcode))
|
||||
{
|
||||
$opt .= " - ".$objp->barcode;
|
||||
$outval.=" - ".$objp->barcode;
|
||||
}
|
||||
if ($objp->supplier_reputation)
|
||||
{
|
||||
//TODO dictionary
|
||||
@ -3796,7 +3805,7 @@ class Form
|
||||
* @param int $excludeafterid Exclude all categories after this leaf in category tree.
|
||||
* @param int $outputmode 0=HTML select string, 1=Array
|
||||
* @return string
|
||||
* @see select_categories
|
||||
* @see select_categories()
|
||||
*/
|
||||
public function select_all_categories($type, $selected = '', $htmlname = "parent", $maxlength = 64, $excludeafterid = 0, $outputmode = 0)
|
||||
{
|
||||
@ -3907,7 +3916,7 @@ class Form
|
||||
* print '});'."\n";
|
||||
* print '</script>'."\n";
|
||||
*
|
||||
* @param string $page Url of page to call if confirmation is OK. Can contains paramaters (param 'action' and 'confirm' will be reformated)
|
||||
* @param string $page Url of page to call if confirmation is OK. Can contains parameters (param 'action' and 'confirm' will be reformated)
|
||||
* @param string $title Title
|
||||
* @param string $question Question
|
||||
* @param string $action Action
|
||||
|
||||
@ -152,7 +152,7 @@ class FormFile
|
||||
$out .= (!empty($accept)?' accept="'.$accept.'"':' accept=""');
|
||||
$out .= '>';
|
||||
$out .= ' ';
|
||||
$out .= '<input type="submit" class="button" name="sendit" value="'.$langs->trans("Upload").'"';
|
||||
$out .= '<input type="submit" class="button reposition" name="sendit" value="'.$langs->trans("Upload").'"';
|
||||
$out .= (empty($conf->global->MAIN_UPLOAD_DOC) || empty($perm)?' disabled':'');
|
||||
$out .= '>';
|
||||
|
||||
|
||||
@ -78,7 +78,7 @@ class FormMail extends Form
|
||||
/**
|
||||
* @var int
|
||||
* @deprecated Fill withto with array before calling method.
|
||||
* @see withto
|
||||
* @see $withto
|
||||
*/
|
||||
public $withtosocid;
|
||||
|
||||
@ -1056,12 +1056,12 @@ class FormMail extends Form
|
||||
//if (! $this->errorstomail) $this->errorstomail=$this->frommail;
|
||||
$errorstomail = (! empty($conf->global->MAIN_MAIL_ERRORS_TO) ? $conf->global->MAIN_MAIL_ERRORS_TO : $this->errorstomail);
|
||||
if ($this->witherrorstoreadonly) {
|
||||
$out.= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>';
|
||||
$out = '<input type="hidden" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />';
|
||||
$out= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>';
|
||||
$out.= '<input type="hidden" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />';
|
||||
$out.= $errorstomail;
|
||||
$out.= "</td></tr>\n";
|
||||
} else {
|
||||
$out.= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>';
|
||||
$out= '<tr><td>'.$langs->trans("MailErrorsTo").'</td><td>';
|
||||
$out.= '<input size="30" id="errorstomail" name="errorstomail" value="'.$errorstomail.'" />';
|
||||
$out.= "</td></tr>\n";
|
||||
}
|
||||
@ -1317,7 +1317,7 @@ class FormMail extends Form
|
||||
* @param CommonObject $object Object to use
|
||||
* @param Translate $outputlangs Object lang
|
||||
* @return void
|
||||
* @see getCommonSubstitutionArray
|
||||
* @see getCommonSubstitutionArray()
|
||||
*/
|
||||
public function setSubstitFromObject($object, $outputlangs)
|
||||
{
|
||||
|
||||
@ -572,7 +572,7 @@ class Utils
|
||||
*/
|
||||
public function generateDoc($module)
|
||||
{
|
||||
global $conf, $langs;
|
||||
global $conf, $langs, $user;
|
||||
global $dirins;
|
||||
|
||||
$error = 0;
|
||||
@ -634,6 +634,19 @@ class Utils
|
||||
return -1;
|
||||
}
|
||||
|
||||
// Copy some files into temp directory, so instruction include::ChangeLog.md[] will works inside the asciidoc file.
|
||||
dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', 0, 1);
|
||||
dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', 0, 1);
|
||||
|
||||
// Replace into README.md and ChangeLog.md (in case they are included into documentation with tag __README__ or __CHANGELOG__)
|
||||
$arrayreplacement=array();
|
||||
$arrayreplacement['/^#\s.*/m']=''; // Remove first level of title into .md files
|
||||
$arrayreplacement['/^#/m']='##'; // Add on # to increase level
|
||||
|
||||
dolReplaceInFile($dirofmoduletmp.'/README.md', $arrayreplacement, '', 0, 0, 1);
|
||||
dolReplaceInFile($dirofmoduletmp.'/ChangeLog.md', $arrayreplacement, '', 0, 0, 1);
|
||||
|
||||
|
||||
$destfile=$dirofmoduletmp.'/'.$FILENAMEASCII;
|
||||
|
||||
$fhandle = fopen($destfile, 'w+');
|
||||
@ -666,25 +679,36 @@ class Utils
|
||||
$i++;
|
||||
}
|
||||
|
||||
fwrite($fhandle, "\n\n\n== DATA SPECIFICATIONS...\n\n");
|
||||
|
||||
// TODO
|
||||
fwrite($fhandle, "TODO...");
|
||||
|
||||
|
||||
fwrite($fhandle, "\n\n\n== CHANGELOG...\n\n");
|
||||
|
||||
// TODO
|
||||
fwrite($fhandle, "TODO...");
|
||||
|
||||
|
||||
|
||||
fclose($fhandle);
|
||||
}
|
||||
|
||||
// Copy some files into temp directory
|
||||
dol_copy($dirofmodule.'/README.md', $dirofmoduletmp.'/README.md', 0, 1);
|
||||
dol_copy($dirofmodule.'/ChangeLog.md', $dirofmoduletmp.'/ChangeLog.md', 0, 1);
|
||||
$contentreadme=file_get_contents($dirofmoduletmp.'/README.md');
|
||||
$contentchangelog=file_get_contents($dirofmoduletmp.'/ChangeLog.md');
|
||||
|
||||
include DOL_DOCUMENT_ROOT.'/core/lib/parsemd.lib.php';
|
||||
|
||||
//var_dump($phpfileval['fullname']);
|
||||
$arrayreplacement=array(
|
||||
'mymodule'=>strtolower($modulename),
|
||||
'MyModule'=>$modulename,
|
||||
'MYMODULE'=>strtoupper($modulename),
|
||||
'My module'=>$modulename,
|
||||
'my module'=>$modulename,
|
||||
'Mon module'=>$modulename,
|
||||
'mon module'=>$modulename,
|
||||
'htdocs/modulebuilder/template'=>strtolower($modulename),
|
||||
'__MYCOMPANY_NAME__'=>$mysoc->name,
|
||||
'__KEYWORDS__'=>$modulename,
|
||||
'__USER_FULLNAME__'=>$user->getFullName($langs),
|
||||
'__USER_EMAIL__'=>$user->email,
|
||||
'__YYYY-MM-DD__'=>dol_print_date($now, 'dayrfc'),
|
||||
'---Put here your own copyright and developer email---'=>dol_print_date($now, 'dayrfc').' '.$user->getFullName($langs).($user->email?' <'.$user->email.'>':''),
|
||||
'__DATA_SPECIFICATION__'=>'Not yet available',
|
||||
'__README__'=>dolMd2Asciidoc($contentreadme),
|
||||
'__CHANGELOG__'=>dolMd2Asciidoc($contentchangelog),
|
||||
);
|
||||
|
||||
dolReplaceInFile($destfile, $arrayreplacement);
|
||||
}
|
||||
|
||||
// Launch doc generation
|
||||
$currentdir = getcwd();
|
||||
|
||||
@ -375,8 +375,7 @@ function ajax_combobox($htmlname, $events = array(), $minLengthToAutocomplete =
|
||||
{
|
||||
global $conf;
|
||||
|
||||
// select2 disabled for smartphones with standard browser.
|
||||
// TODO With select2 v4, it seems ok, except that responsive style on table become crazy when scrolling at end of array)
|
||||
// select2 can be disabled for smartphones
|
||||
if (! empty($conf->browser->layout) && $conf->browser->layout == 'phone' && ! empty($conf->global->MAIN_DISALLOW_SELECT2_WITH_SMARTPHONE)) return '';
|
||||
|
||||
if (! empty($conf->global->MAIN_DISABLE_AJAX_COMBOX)) return '';
|
||||
|
||||
@ -800,15 +800,15 @@ function show_projects($conf, $langs, $db, $object, $backtopage = '', $nocreatel
|
||||
}
|
||||
print '</td>';
|
||||
// Opp status
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
if ($obj->opp_status_code) print $langs->trans("OppStatus".$obj->opp_status_code);
|
||||
print '</td>';
|
||||
// Opp percent
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($obj->opp_percent) print price($obj->opp_percent, 1, '', 1, 0).'%';
|
||||
print '</td>';
|
||||
// Status
|
||||
print '<td align="right">'.$projecttmp->getLibStatut(5).'</td>';
|
||||
print '<td class="right">'.$projecttmp->getLibStatut(5).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
@ -887,7 +887,7 @@ function show_contacts($conf, $langs, $db, $object, $backtopage = '')
|
||||
't.name'=>array('label'=>"Name", 'checked'=>1, 'position'=>10),
|
||||
't.poste'=>array('label'=>"PostOrFunction", 'checked'=>1, 'position'=>20),
|
||||
't.address'=>array('label'=>(empty($conf->dol_optimize_smallscreen) ? $langs->trans("Address").' / '.$langs->trans("Phone").' / '.$langs->trans("Email") : $langs->trans("Address")), 'checked'=>1, 'position'=>30),
|
||||
't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>40, 'align'=>'center'),
|
||||
't.statut'=>array('label'=>"Status", 'checked'=>1, 'position'=>40, 'class'=>'center'),
|
||||
);
|
||||
// Extra fields
|
||||
if (is_array($extrafields->attributes[$contactstatic->table_element]['label']) && count($extrafields->attributes[$contactstatic->table_element]['label']))
|
||||
@ -1222,21 +1222,30 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
$numaction = 0 ;
|
||||
$now=dol_now('tzuser');
|
||||
|
||||
// Open DSI -- Fix order by -- Begin
|
||||
$sortfield_list = explode(',', $sortfield);
|
||||
$sortfield_label_list = array('a.id' => 'id', 'a.datep' => 'dp', 'a.percent' => 'percent');
|
||||
$sortfield_new_list = array();
|
||||
foreach ($sortfield_list as $sortfield_value) {
|
||||
$sortfield_new_list[] = $sortfield_label_list[trim($sortfield_value)];
|
||||
}
|
||||
$sortfield_new = implode(',', $sortfield_new_list);
|
||||
|
||||
if (! empty($conf->agenda->enabled))
|
||||
{
|
||||
// Recherche histo sur actioncomm
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql = "SELECT DISTINCT a.id, a.label,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT a.id, a.label,";
|
||||
}
|
||||
$sql.= " a.datep as dp,";
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql = "SELECT DISTINCT a.id, a.label as label,";
|
||||
}
|
||||
else
|
||||
{
|
||||
$sql = "SELECT a.id, a.label as label,";
|
||||
}
|
||||
$sql.= " a.datep as dp,";
|
||||
$sql.= " a.datep2 as dp2,";
|
||||
$sql.= " a.note, a.percent,";
|
||||
$sql.= " a.percent as percent, 'action' as type,";
|
||||
$sql.= " a.fk_element, a.elementtype,";
|
||||
$sql.= " a.fk_user_author, a.fk_contact,";
|
||||
$sql.= " a.fk_contact,";
|
||||
$sql.= " c.code as acode, c.libelle as alabel, c.picto as apicto,";
|
||||
$sql.= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname";
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= ", sp.lastname, sp.firstname";
|
||||
@ -1248,17 +1257,19 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."user as u on u.rowid = a.fk_user_action";
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."c_actioncomm as c ON a.fk_action = c.id";
|
||||
|
||||
$force_filter_contact = false;
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm";
|
||||
$sql.= " AND r.element_type = '" . $db->escape($objcon->table_element) . "' AND r.fk_element = " . $objcon->id;
|
||||
}
|
||||
$force_filter_contact = true;
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."actioncomm_resources as r ON a.id = r.fk_actioncomm";
|
||||
$sql.= " AND r.element_type = '" . $db->escape($objcon->table_element) . "' AND r.fk_element = " . $objcon->id;
|
||||
}
|
||||
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."socpeople as sp ON a.fk_contact = sp.rowid";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Dolresource') {
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er";
|
||||
$sql.= " ON er.resource_type = 'dolresource'";
|
||||
$sql.= " AND er.element_id = a.id";
|
||||
$sql.= " AND er.resource_id = ".$filterobj->id;
|
||||
$sql.= " INNER JOIN ".MAIN_DB_PREFIX."element_resources as er";
|
||||
$sql.= " ON er.resource_type = 'dolresource'";
|
||||
$sql.= " AND er.element_id = a.id";
|
||||
$sql.= " AND er.resource_id = ".$filterobj->id;
|
||||
}
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql.= ", ".MAIN_DB_PREFIX."adherent as m";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql.= ", ".MAIN_DB_PREFIX."commande_fournisseur as o";
|
||||
@ -1266,9 +1277,7 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql.= ", ".MAIN_DB_PREFIX."ticket as o";
|
||||
|
||||
$sql.= " WHERE a.entity IN (".getEntity('agenda').")";
|
||||
if (is_object($objcon) && $objcon->id) {
|
||||
$sql.= " AND a.fk_contact = ".$objcon->id;
|
||||
} else {
|
||||
if ($force_filter_contact === false) {
|
||||
if (is_object($filterobj) && in_array(get_class($filterobj), array('Societe', 'Client', 'Fournisseur')) && $filterobj->id) $sql.= " AND a.fk_soc = ".$filterobj->id;
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Project' && $filterobj->id) $sql.= " AND a.fk_project = ".$filterobj->id;
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent')
|
||||
@ -1316,69 +1325,6 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||
elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||
if (is_array($filters) && $filters['search_agenda_label']) $sql.= natural_search('a.label', $filters['search_agenda_label']);
|
||||
|
||||
//TODO Add limit in nb of results
|
||||
$sql.= $db->order($sortfield, $sortorder);
|
||||
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
$contactaction = new ActionComm($db);
|
||||
$contactaction->id=$obj->id;
|
||||
$result = $contactaction->fetchResources();
|
||||
if ($result<0) {
|
||||
dol_print_error($db);
|
||||
setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors');
|
||||
}
|
||||
|
||||
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||
//elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||
$tododone='';
|
||||
if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone='todo';
|
||||
|
||||
$histo[$numaction]=array(
|
||||
'type'=>'action',
|
||||
'tododone'=>$tododone,
|
||||
'id'=>$obj->id,
|
||||
'datestart'=>$db->jdate($obj->dp),
|
||||
'dateend'=>$db->jdate($obj->dp2),
|
||||
'note'=>$obj->label,
|
||||
'percent'=>$obj->percent,
|
||||
|
||||
'userid'=>$obj->user_id,
|
||||
'login'=>$obj->user_login,
|
||||
'userfirstname'=>$obj->user_firstname,
|
||||
'userlastname'=>$obj->user_lastname,
|
||||
'userphoto'=>$obj->user_photo,
|
||||
|
||||
'contact_id'=>$obj->fk_contact,
|
||||
'socpeopleassigned' => $contactaction->socpeopleassigned,
|
||||
'lastname'=>$obj->lastname,
|
||||
'firstname'=>$obj->firstname,
|
||||
'fk_element'=>$obj->fk_element,
|
||||
'elementtype'=>$obj->elementtype,
|
||||
// Type of event
|
||||
'acode'=>$obj->acode,
|
||||
'alabel'=>$obj->alabel,
|
||||
'libelle'=>$obj->alabel, // deprecated
|
||||
'apicto'=>$obj->apicto
|
||||
);
|
||||
|
||||
$numaction++;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
}
|
||||
|
||||
// Add also event from emailings. TODO This should be replaced by an automatic event ? May be it's too much for very large emailing.
|
||||
@ -1387,52 +1333,108 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
|
||||
{
|
||||
$langs->load("mails");
|
||||
|
||||
$sql = "SELECT m.rowid as id, mc.date_envoi as da, m.titre as note, '100' as percentage,";
|
||||
$sql.= " 'AC_EMAILING' as acode,";
|
||||
$sql.= " u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql.= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email.
|
||||
$sql.= " AND mc.statut = 1";
|
||||
$sql.= " AND u.rowid = m.fk_user_valid";
|
||||
$sql.= " AND mc.fk_mailing=m.rowid";
|
||||
$sql.= " ORDER BY mc.date_envoi DESC, m.rowid DESC";
|
||||
$sql2 = "SELECT m.rowid as id, m.titre as label, mc.date_envoi as dp, mc.date_envoi as dp2, '100' as percent, 'mailing' as type";
|
||||
$sql2.= ", '' as fk_element, '' as elementtype, '' as contact_id";
|
||||
$sql2.= ", 'AC_EMAILING' as acode, '' as alabel, '' as apicto";
|
||||
$sql2.= ", u.rowid as user_id, u.login as user_login, u.photo as user_photo, u.firstname as user_firstname, u.lastname as user_lastname"; // User that valid action
|
||||
if (is_object($filterobj) && get_class($filterobj) == 'Societe') $sql2.= ", '' as lastname, '' as firstname";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Adherent') $sql2.= ", '' as lastname, '' as firstname";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'CommandeFournisseur') $sql2.= ", '' as ref";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Product') $sql2.= ", '' as ref";
|
||||
elseif (is_object($filterobj) && get_class($filterobj) == 'Ticket') $sql2.= ", '' as ref";
|
||||
$sql2.= " FROM ".MAIN_DB_PREFIX."mailing as m, ".MAIN_DB_PREFIX."mailing_cibles as mc, ".MAIN_DB_PREFIX."user as u";
|
||||
$sql2.= " WHERE mc.email = '".$db->escape($objcon->email)."'"; // Search is done on email.
|
||||
$sql2.= " AND mc.statut = 1";
|
||||
$sql2.= " AND u.rowid = m.fk_user_valid";
|
||||
$sql2.= " AND mc.fk_mailing=m.rowid";
|
||||
}
|
||||
|
||||
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
if (!empty($sql) && !empty($sql2)) {
|
||||
$sql = $sql . " UNION " . $sql2;
|
||||
} else if (empty($sql) && !empty($sql2)) {
|
||||
$sql = $sql2;
|
||||
}
|
||||
//TODO Add limit in nb of results
|
||||
$sql.= $db->order($sortfield_new, $sortorder);
|
||||
dol_syslog("company.lib::show_actions_done", LOG_DEBUG);
|
||||
$resql=$db->query($sql);
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$i = 0 ;
|
||||
$num = $db->num_rows($resql);
|
||||
$obj = $db->fetch_object($resql);
|
||||
|
||||
if ($obj->type == 'action') {
|
||||
$contactaction = new ActionComm($db);
|
||||
$contactaction->id=$obj->id;
|
||||
$result = $contactaction->fetchResources();
|
||||
if ($result<0) {
|
||||
dol_print_error($db);
|
||||
setEventMessage("company.lib::show_actions_done Error fetch ressource", 'errors');
|
||||
}
|
||||
|
||||
//if ($donetodo == 'todo') $sql.= " AND ((a.percent >= 0 AND a.percent < 100) OR (a.percent = -1 AND a.datep > '".$db->idate($now)."'))";
|
||||
//elseif ($donetodo == 'done') $sql.= " AND (a.percent = 100 OR (a.percent = -1 AND a.datep <= '".$db->idate($now)."'))";
|
||||
$tododone='';
|
||||
if (($obj->percent >= 0 and $obj->percent < 100) || ($obj->percent == -1 && $obj->datep > $now)) $tododone='todo';
|
||||
|
||||
while ($i < $num)
|
||||
{
|
||||
$obj = $db->fetch_object($resql);
|
||||
$histo[$numaction]=array(
|
||||
'type'=>'mailing',
|
||||
'tododone'=>'done',
|
||||
'id'=>$obj->id,
|
||||
'datestart'=>$db->jdate($obj->da),
|
||||
'dateend'=>$db->jdate($obj->da),
|
||||
'note'=>$obj->note,
|
||||
'percent'=>$obj->percentage,
|
||||
'acode'=>$obj->acode,
|
||||
'type'=>$obj->type,
|
||||
'tododone'=>$tododone,
|
||||
'id'=>$obj->id,
|
||||
'datestart'=>$db->jdate($obj->dp),
|
||||
'dateend'=>$db->jdate($obj->dp2),
|
||||
'note'=>$obj->label,
|
||||
'percent'=>$obj->percent,
|
||||
|
||||
'userid'=>$obj->user_id,
|
||||
'login'=>$obj->user_login,
|
||||
'userfirstname'=>$obj->user_firstname,
|
||||
'userlastname'=>$obj->user_lastname,
|
||||
'userphoto'=>$obj->user_photo
|
||||
);
|
||||
$numaction++;
|
||||
$i++;
|
||||
'userid'=>$obj->user_id,
|
||||
'login'=>$obj->user_login,
|
||||
'userfirstname'=>$obj->user_firstname,
|
||||
'userlastname'=>$obj->user_lastname,
|
||||
'userphoto'=>$obj->user_photo,
|
||||
|
||||
'contact_id'=>$obj->fk_contact,
|
||||
'socpeopleassigned' => $contactaction->socpeopleassigned,
|
||||
'lastname'=>$obj->lastname,
|
||||
'firstname'=>$obj->firstname,
|
||||
'fk_element'=>$obj->fk_element,
|
||||
'elementtype'=>$obj->elementtype,
|
||||
// Type of event
|
||||
'acode'=>$obj->acode,
|
||||
'alabel'=>$obj->alabel,
|
||||
'libelle'=>$obj->alabel, // deprecated
|
||||
'apicto'=>$obj->apicto
|
||||
);
|
||||
} else {
|
||||
$histo[$numaction]=array(
|
||||
'type'=>$obj->type,
|
||||
'tododone'=>'done',
|
||||
'id'=>$obj->id,
|
||||
'datestart'=>$db->jdate($obj->dp),
|
||||
'dateend'=>$db->jdate($obj->dp2),
|
||||
'note'=>$obj->label,
|
||||
'percent'=>$obj->percent,
|
||||
'acode'=>$obj->acode,
|
||||
|
||||
'userid'=>$obj->user_id,
|
||||
'login'=>$obj->user_login,
|
||||
'userfirstname'=>$obj->user_firstname,
|
||||
'userlastname'=>$obj->user_lastname,
|
||||
'userphoto'=>$obj->user_photo
|
||||
);
|
||||
}
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
|
||||
$numaction++;
|
||||
$i++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
dol_print_error($db);
|
||||
}
|
||||
|
||||
if (! empty($conf->agenda->enabled) || (! empty($conf->mailing->enabled) && ! empty($objcon->email)))
|
||||
{
|
||||
|
||||
@ -64,7 +64,7 @@ function show_skin($fuser, $edit = 0)
|
||||
|
||||
// Title
|
||||
print '<tr class="liste_titre"><th width="35%">'.$langs->trans("DefaultSkin").'</th>';
|
||||
print '<th align="right">';
|
||||
print '<th class="right">';
|
||||
$url='http://ckeditor.com/addons/skins/all';
|
||||
/*print '<a href="'.$url.'" target="_blank">';
|
||||
print $langs->trans('DownloadMoreSkins');
|
||||
@ -84,7 +84,7 @@ function show_skin($fuser, $edit = 0)
|
||||
//
|
||||
print '<tr class="oddeven"><td colspan="'.$colspan.'">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td><div align="center">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
|
||||
|
||||
$i=0;
|
||||
foreach($dirskins as $dir)
|
||||
|
||||
@ -583,19 +583,20 @@ function dol_filemtime($pathoffile)
|
||||
/**
|
||||
* Make replacement of strings into a file.
|
||||
*
|
||||
* @param string $srcfile Source file (can't be a directory)
|
||||
* @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...)
|
||||
* @param string $destfile Destination file (can't be a directory). If empty, will be same than source file.
|
||||
* @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666'
|
||||
* @param int $indexdatabase 1=index new file into database.
|
||||
* @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK
|
||||
* @see dol_copy() dolReplaceRegExInFile()
|
||||
* @param string $srcfile Source file (can't be a directory)
|
||||
* @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...)
|
||||
* @param string $destfile Destination file (can't be a directory). If empty, will be same than source file.
|
||||
* @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666'
|
||||
* @param int $indexdatabase 1=index new file into database.
|
||||
* @param int $arrayreplacementisregex 1=Array of replacement is regex
|
||||
* @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK
|
||||
* @see dol_copy()
|
||||
*/
|
||||
function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0)
|
||||
function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0, $arrayreplacementisregex = 0)
|
||||
{
|
||||
global $conf;
|
||||
|
||||
dol_syslog("files.lib.php::dolReplaceInFile srcfile=".$srcfile." destfile=".$destfile." newmask=".$newmask." indexdatabase=".$indexdatabase);
|
||||
dol_syslog("files.lib.php::dolReplaceInFile srcfile=".$srcfile." destfile=".$destfile." newmask=".$newmask." indexdatabase=".$indexdatabase." arrayreplacementisregex=".$arrayreplacementisregex);
|
||||
|
||||
if (empty($srcfile)) return -1;
|
||||
if (empty($destfile)) $destfile=$srcfile;
|
||||
@ -626,7 +627,17 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask
|
||||
// Create $newpathoftmpdestfile from $newpathofsrcfile
|
||||
$content = file_get_contents($newpathofsrcfile, 'r');
|
||||
|
||||
$content = make_substitutions($content, $arrayreplacement, null);
|
||||
if (empty($arrayreplacementisregex))
|
||||
{
|
||||
$content = make_substitutions($content, $arrayreplacement, null);
|
||||
}
|
||||
else
|
||||
{
|
||||
foreach ($arrayreplacement as $key => $value)
|
||||
{
|
||||
$content = preg_replace($key, $value, $content);
|
||||
}
|
||||
}
|
||||
|
||||
file_put_contents($newpathoftmpdestfile, $content);
|
||||
@chmod($newpathoftmpdestfile, octdec($newmask));
|
||||
@ -650,21 +661,6 @@ function dolReplaceInFile($srcfile, $arrayreplacement, $destfile = '', $newmask
|
||||
return 1;
|
||||
}
|
||||
|
||||
/**
|
||||
* Make replacement of strings into a file.
|
||||
*
|
||||
* @param string $srcfile Source file (can't be a directory)
|
||||
* @param array $arrayreplacement Array with strings to replace. Example: array('valuebefore'=>'valueafter', ...)
|
||||
* @param string $destfile Destination file (can't be a directory). If empty, will be same than source file.
|
||||
* @param int $newmask Mask for new file (0 by default means $conf->global->MAIN_UMASK). Example: '0666'
|
||||
* @param int $indexdatabase Index new file into database.
|
||||
* @return int <0 if error, 0 if nothing done (dest file already exists), >0 if OK
|
||||
* @see dol_copy() dolReplaceInFile()
|
||||
*/
|
||||
function dolReplaceRegExInFile($srcfile, $arrayreplacement, $destfile = '', $newmask = 0, $indexdatabase = 0)
|
||||
{
|
||||
// TODO
|
||||
}
|
||||
|
||||
/**
|
||||
* Copy a file to another file.
|
||||
|
||||
@ -437,7 +437,7 @@ function GETPOST($paramname, $check = 'none', $method = 0, $filter = null, $opti
|
||||
}
|
||||
}
|
||||
|
||||
// Substitution variables for GETPOST (used to get final url with variable parameters or final default value with variable paramaters)
|
||||
// Substitution variables for GETPOST (used to get final url with variable parameters or final default value with variable parameters)
|
||||
// Example of variables: __DAY__, __MONTH__, __YEAR__, __MYCOMPANY_COUNTRY_ID__, __USER_ID__, ...
|
||||
// We do this only if var is a GET. If it is a POST, may be we want to post the text with vars as the setup text.
|
||||
if (! is_array($out) && empty($_POST[$paramname]) && empty($noreplace))
|
||||
@ -923,7 +923,7 @@ function dol_escape_js($stringtoescape, $mode = 0, $noescapebackslashn = 0)
|
||||
*
|
||||
* @param string $stringtoescape String to escape
|
||||
* @param int $keepb 1=Preserve b tags (otherwise, remove them)
|
||||
* @param int $keepn 1=Preserve \r\n strings (otherwise, replace them with escaped value)
|
||||
* @param int $keepn 1=Preserve \r\n strings (otherwise, replace them with escaped value). Set to 1 when escaping for a <textarea>.
|
||||
* @return string Escaped string
|
||||
* @see dol_string_nohtmltag(), dol_string_nospecial(), dol_string_unaccent()
|
||||
*/
|
||||
@ -1480,20 +1480,20 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
||||
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlstatus.=ajax_object_onoff($object, 'status', 'tosell', 'ProductStatusOnSell', 'ProductStatusNotOnSell');
|
||||
} else {
|
||||
$morehtmlstatus.='<span class="statusrefsell">'.$object->getLibStatut(5, 0).'</span>';
|
||||
$morehtmlstatus.='<span class="statusrefsell">'.$object->getLibStatut(6, 0).'</span>';
|
||||
}
|
||||
$morehtmlstatus.=' ';
|
||||
//$morehtmlstatus.=$langs->trans("Status").' ('.$langs->trans("Buy").') ';
|
||||
if (! empty($conf->use_javascript_ajax) && $user->rights->produit->creer && ! empty($conf->global->MAIN_DIRECT_STATUS_UPDATE)) {
|
||||
$morehtmlstatus.=ajax_object_onoff($object, 'status_buy', 'tobuy', 'ProductStatusOnBuy', 'ProductStatusNotOnBuy');
|
||||
} else {
|
||||
$morehtmlstatus.='<span class="statusrefbuy">'.$object->getLibStatut(5, 1).'</span>';
|
||||
$morehtmlstatus.='<span class="statusrefbuy">'.$object->getLibStatut(6, 1).'</span>';
|
||||
}
|
||||
}
|
||||
elseif (in_array($object->element, array('facture', 'invoice', 'invoice_supplier', 'chargesociales', 'loan')))
|
||||
{
|
||||
$tmptxt=$object->getLibStatut(6, $object->totalpaye);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5, $object->totalpaye);
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
elseif ($object->element == 'contrat' || $object->element == 'contract')
|
||||
@ -1516,7 +1516,7 @@ function dol_banner_tab($object, $paramid, $morehtml = '', $shownav = 1, $fieldi
|
||||
}
|
||||
else { // Generic case
|
||||
$tmptxt=$object->getLibStatut(6);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3) || $conf->browser->layout=='phone') $tmptxt=$object->getLibStatut(5);
|
||||
if (empty($tmptxt) || $tmptxt == $object->getLibStatut(3)) $tmptxt=$object->getLibStatut(5);
|
||||
$morehtmlstatus.=$tmptxt;
|
||||
}
|
||||
|
||||
@ -2951,7 +2951,7 @@ function dol_trunc($string, $size = 40, $trunc = 'right', $stringencoding = 'UTF
|
||||
* @param string $alt Force alt for bind people
|
||||
* @param string $morecss Add more class css on img tag (For example 'myclascss'). Work only if $moreatt is empty.
|
||||
* @return string Return img tag
|
||||
* @see #img_object, #img_picto_common
|
||||
* @see img_object(), img_picto_common()
|
||||
*/
|
||||
function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $srconly = 0, $notitle = 0, $alt = '', $morecss = '')
|
||||
{
|
||||
@ -2981,7 +2981,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
|
||||
if (empty($srconly) && in_array($pictowithoutext, array(
|
||||
'bank', 'close_title', 'delete', 'edit', 'ellipsis-h', 'filter', 'grip', 'grip_title', 'list', 'listlight', 'note', 'off', 'on', 'play', 'playdisabled', 'printer', 'resize',
|
||||
'note', 'setup', 'sign-out', 'split', 'switch_off', 'switch_on', 'unlink', 'uparrow', '1downarrow', '1uparrow', '1leftarrow', '1rightarrow',
|
||||
'jabber','skype','twitter','facebook','linkedin'
|
||||
'jabber','skype','twitter','facebook','linkedin',
|
||||
'chevron-left','chevron-right','chevron-down','chevron-top'
|
||||
)
|
||||
)) {
|
||||
$fa='fa';
|
||||
@ -4193,7 +4194,7 @@ function print_barre_liste($titre, $page, $file, $options = '', $sortfield = '',
|
||||
*
|
||||
* @param int $page Number of page
|
||||
* @param string $file Page URL (in most cases provided with $_SERVER["PHP_SELF"])
|
||||
* @param string $options Other url paramaters to propagate ("" by default, may include sortfield and sortorder)
|
||||
* @param string $options Other url parameters to propagate ("" by default, may include sortfield and sortorder)
|
||||
* @param integer $nextpage Do we show a next page button
|
||||
* @param string $betweenarrows HTML content to show between arrows. MUST contains '<li> </li>' tags or '<li><span> </span></li>'.
|
||||
* @param string $afterarrows HTML content to show after arrows. Must NOT contains '<li> </li>' tags.
|
||||
@ -7171,7 +7172,7 @@ function printCommonFooter($zone = 'private')
|
||||
else print "\n".'<!-- Common footer for public page -->'."\n";
|
||||
|
||||
// A div to store page_y POST parameter so we can read it using javascript
|
||||
print "\n<!-- A div to store page_y POST paramater -->\n";
|
||||
print "\n<!-- A div to store page_y POST parameter -->\n";
|
||||
print '<div id="page_y" style="display: none;">'.$_POST['page_y'].'</div>'."\n";
|
||||
|
||||
$parameters=array();
|
||||
@ -7190,11 +7191,11 @@ function printCommonFooter($zone = 'private')
|
||||
{
|
||||
print "\n";
|
||||
print '/* JS CODE TO ENABLE to manage handler to switch left menu page (menuhider) */'."\n";
|
||||
print 'jQuery(".menuhider").click(function() {';
|
||||
print 'jQuery(".menuhider").click(function(event) {';
|
||||
print ' if(!$( "body" ).hasClass( "sidebar-collapse" )){ event.preventDefault(); }'."\n";
|
||||
print ' console.log("We click on .menuhider");'."\n";
|
||||
//print " $('.side-nav').animate({width:'toggle'},200);\n"; // OK with eldy theme but not with md
|
||||
print " $('.side-nav').toggle()\n";
|
||||
print " $('.login_block').toggle()\n";
|
||||
print ' $("body").toggleClass("sidebar-collapse")'."\n";
|
||||
print ' $(".login_block").toggle()'."\n";
|
||||
print '});'."\n";
|
||||
}
|
||||
|
||||
@ -8017,8 +8018,8 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
// use status with images
|
||||
elseif (empty($conf->global->MAIN_STATUS_USES_CSS)){
|
||||
$return = '';
|
||||
$htmlLabel = '<span class="hideonsmartphone">'.(!empty($html)?$html:$statusLabel).'</span>';
|
||||
$htmlLabelShort = '<span class="hideonsmartphone">'.(!empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel)).'</span>';
|
||||
$htmlLabel = (in_array($displayMode, array(1,2,5))?'<span class="hideonsmartphone">':'').(!empty($html)?$html:$statusLabel).(in_array($displayMode, array(1,2,5))?'</span>':'');
|
||||
$htmlLabelShort = (in_array($displayMode, array(1,2,5))?'<span class="hideonsmartphone">':'').(!empty($html)?$html:(!empty($statusLabelShort)?$statusLabelShort:$statusLabel)).(in_array($displayMode, array(1,2,5))?'</span>':'');
|
||||
|
||||
if(!empty($statusImg[$statusType])){
|
||||
$htmlImg = img_picto($statusLabel, $statusImg[$statusType]);
|
||||
@ -8046,13 +8047,13 @@ function dolGetStatus($statusLabel = '', $statusLabelShort = '', $html = '', $st
|
||||
elseif (!empty($conf->global->MAIN_STATUS_USES_CSS) && !empty($displayMode)) {
|
||||
$statusLabelShort = !empty($statusLabelShort)?$statusLabelShort:$statusLabel;
|
||||
|
||||
if($displayMode == 3){
|
||||
if ($displayMode == 3) {
|
||||
$return = dolGetBadge($statusLabel, '', $statusType, 'dot');
|
||||
}
|
||||
elseif($displayMode === 5){
|
||||
elseif ($displayMode === 5) {
|
||||
$return = dolGetBadge($statusLabelShort, $html, $statusType);
|
||||
}
|
||||
else{
|
||||
else {
|
||||
$return = dolGetBadge($statusLabel, $html, $statusType);
|
||||
}
|
||||
}
|
||||
|
||||
@ -2183,7 +2183,7 @@ function colorArrayToHex($arraycolor, $colorifnotfound = '888888')
|
||||
*
|
||||
* @param string $stringcolor String with hex (FFFFFF) or comma RGB ('255,255,255')
|
||||
* @param array $colorifnotfound Color code array to return if entry not defined
|
||||
* @return string RGB hex value (without # before). For example: FF00FF
|
||||
* @return array RGB hex value (without # before). For example: FF00FF
|
||||
* @see colorArrayToHex()
|
||||
*/
|
||||
function colorStringToArray($stringcolor, $colorifnotfound = array(88,88,88))
|
||||
@ -2274,7 +2274,7 @@ function colorLighten($hex, $percent)
|
||||
* @param string $hex color in hex
|
||||
* @param float $alpha 0 to 1
|
||||
* @param bool $returnArray set to 1 to return an array instead of string
|
||||
* @return string
|
||||
* @return string|array
|
||||
*/
|
||||
function colorHexToRgb($hex, $alpha = false, $returnArray = false)
|
||||
{
|
||||
|
||||
@ -1,7 +1,6 @@
|
||||
<?php
|
||||
/*
|
||||
* Copyright (C) 2009-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
/* Copyright (C) 2009-2013 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
|
||||
@ -53,3 +53,35 @@ function dolMd2Html($content, $parser = 'parsedown', $replaceimagepath = null)
|
||||
|
||||
return $content;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function to parse MD content into ASCIIDOC
|
||||
*
|
||||
* @param string $content MD content
|
||||
* @param string $parser 'dolibarr'
|
||||
* @param string $replaceimagepath Replace path to image with another path. Exemple: ('doc/'=>'xxx/aaa/')
|
||||
* @return string Parsed content
|
||||
*/
|
||||
function dolMd2Asciidoc($content, $parser = 'dolibarr', $replaceimagepath = null)
|
||||
{
|
||||
if (is_array($replaceimagepath))
|
||||
{
|
||||
foreach($replaceimagepath as $key => $val)
|
||||
{
|
||||
$keytoreplace = ']('.$key;
|
||||
$valafter = ']('.$val;
|
||||
$content = preg_replace('/'.preg_quote($keytoreplace, '/').'/m', $valafter, $content);
|
||||
}
|
||||
}
|
||||
//if ($parser == 'dolibarr')
|
||||
//{
|
||||
$content = preg_replace('/<!--.*-->/msU', '', $content);
|
||||
//}
|
||||
//else
|
||||
//{
|
||||
// $content = $content;
|
||||
//}
|
||||
|
||||
return $content;
|
||||
}
|
||||
@ -324,10 +324,10 @@ function show_stats_for_company($product, $socid)
|
||||
$nblines = 0;
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td align="left" width="25%">'.$langs->trans("Referers").'</td>';
|
||||
print '<td align="right" width="25%">'.$langs->trans("NbOfThirdParties").'</td>';
|
||||
print '<td align="right" width="25%">'.$langs->trans("NbOfObjectReferers").'</td>';
|
||||
print '<td align="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
|
||||
print '<td class="left" width="25%">'.$langs->trans("Referers").'</td>';
|
||||
print '<td class="right" width="25%">'.$langs->trans("NbOfThirdParties").'</td>';
|
||||
print '<td class="right" width="25%">'.$langs->trans("NbOfObjectReferers").'</td>';
|
||||
print '<td class="right" width="25%">'.$langs->trans("TotalQuantity").'</td>';
|
||||
print '</tr>';
|
||||
|
||||
// Customer proposals
|
||||
@ -339,11 +339,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("propal");
|
||||
print '<tr><td>';
|
||||
print '<a href="propal.php?id='.$product->id.'">'.img_object('', 'propal').' '.$langs->trans("Proposals").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_propale['customers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_propale['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_propale['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -357,11 +357,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("propal");
|
||||
print '<tr><td>';
|
||||
print '<a href="supplier_proposal.php?id='.$product->id.'">'.img_object('', 'propal').' '.$langs->trans("SupplierProposals").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_proposal_supplier['suppliers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_proposal_supplier['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_proposal_supplier['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -375,11 +375,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("orders");
|
||||
print '<tr><td>';
|
||||
print '<a href="commande.php?id='.$product->id.'">'.img_object('', 'order').' '.$langs->trans("CustomersOrders").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_commande['customers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_commande['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_commande['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -393,11 +393,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("orders");
|
||||
print '<tr><td>';
|
||||
print '<a href="commande_fournisseur.php?id='.$product->id.'">'.img_object('', 'order').' '.$langs->trans("SuppliersOrders").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_commande_fournisseur['suppliers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_commande_fournisseur['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_commande_fournisseur['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -411,11 +411,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("bills");
|
||||
print '<tr><td>';
|
||||
print '<a href="facture.php?id='.$product->id.'">'.img_object('', 'bill').' '.$langs->trans("CustomersInvoices").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_facture['customers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_facture['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_facture['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -429,11 +429,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("bills");
|
||||
print '<tr><td>';
|
||||
print '<a href="facture_fournisseur.php?id='.$product->id.'">'.img_object('', 'bill').' '.$langs->trans("SuppliersInvoices").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_facture_fournisseur['suppliers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_facture_fournisseur['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_facture_fournisseur['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
@ -448,11 +448,11 @@ function show_stats_for_company($product, $socid)
|
||||
$langs->load("contracts");
|
||||
print '<tr><td>';
|
||||
print '<a href="contrat.php?id='.$product->id.'">'.img_object('', 'contract').' '.$langs->trans("Contracts").'</a>';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_contrat['customers'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_contrat['nb'];
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $product->stats_contrat['qty'];
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
|
||||
@ -489,12 +489,12 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print "</td>\n";
|
||||
|
||||
// Date start
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($lines[$i]->date_start, 'dayhour');
|
||||
print '</td>';
|
||||
|
||||
// Date end
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
$taskstatic->projectstatus = $lines[$i]->projectstatus;
|
||||
$taskstatic->progress = $lines[$i]->progress;
|
||||
$taskstatic->fk_statut = $lines[$i]->status;
|
||||
@ -509,7 +509,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
if (! empty($conf->global->PROJECT_TIMES_SPENT_FORMAT)) $timespentoutputformat=$conf->global->PROJECT_TIME_SPENT_FORMAT;
|
||||
|
||||
// Planned Workload (in working hours)
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
$fullhour=convertSecondToTime($lines[$i]->planned_workload, $plannedworkloadoutputformat);
|
||||
$workingdelay=convertSecondToTime($lines[$i]->planned_workload, 'all', 86400, 7); // TODO Replace 86400 and 7 to take account working hours per day and working day per weeks
|
||||
if ($lines[$i]->planned_workload != '')
|
||||
@ -522,7 +522,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print '</td>';
|
||||
|
||||
// Time spent
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($showlineingray) print '<i>';
|
||||
else print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?id='.$lines[$i]->id.($showproject?'':'&withproject=1').'">';
|
||||
if ($lines[$i]->duration) print convertSecondToTime($lines[$i]->duration, $timespentoutputformat);
|
||||
@ -532,7 +532,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print '</td>';
|
||||
|
||||
// Progress calculated (Note: ->duration is time spent)
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($lines[$i]->planned_workload || $lines[$i]->duration)
|
||||
{
|
||||
if ($lines[$i]->planned_workload) print round(100 * $lines[$i]->duration / $lines[$i]->planned_workload, 2).' %';
|
||||
@ -541,7 +541,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print '</td>';
|
||||
|
||||
// Progress declared
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($lines[$i]->progress != '')
|
||||
{
|
||||
print $lines[$i]->progress.' %';
|
||||
@ -572,7 +572,7 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
// Tick to drag and drop
|
||||
if ($addordertick)
|
||||
{
|
||||
print '<td align="center" class="tdlineupdown hideonsmartphone"> </td>';
|
||||
print '<td class="tdlineupdown hideonsmartphone center"> </td>';
|
||||
}
|
||||
|
||||
print "</tr>\n";
|
||||
@ -605,15 +605,15 @@ function projectLinesa(&$inc, $parent, &$lines, &$level, $var, $showproject, &$t
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td></td>';
|
||||
print '<td align="right" class="nowrap liste_total">';
|
||||
print '<td class="nowrap liste_total right">';
|
||||
print convertSecondToTime($total_projectlinesa_planned, 'allhourmin');
|
||||
print '</td>';
|
||||
print '<td align="right" class="nowrap liste_total">';
|
||||
print '<td class="nowrap liste_total right">';
|
||||
if ($projectidfortotallink > 0) print '<a href="'.DOL_URL_ROOT.'/projet/tasks/time.php?projectid='.$projectidfortotallink.($showproject?'':'&withproject=1').'">';
|
||||
print convertSecondToTime($total_projectlinesa_spent, 'allhourmin');
|
||||
if ($projectidfortotallink > 0) print '</a>';
|
||||
print '</td>';
|
||||
print '<td align="right" class="nowrap liste_total">';
|
||||
print '<td class="nowrap liste_total right">';
|
||||
if ($total_projectlinesa_planned) print round(100 * $total_projectlinesa_spent / $total_projectlinesa_planned, 2).' %';
|
||||
print '</td>';
|
||||
print '<td></td>';
|
||||
@ -773,7 +773,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
print "</td>\n";
|
||||
|
||||
// Date
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print dol_print_date($lines[$i]->timespent_datehour, 'day');
|
||||
print '</td>';
|
||||
|
||||
@ -794,7 +794,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
}
|
||||
|
||||
// Hour
|
||||
print '<td class="nowrap" align="center">';
|
||||
print '<td class="nowrap center">';
|
||||
print dol_print_date($lines[$i]->timespent_datehour, 'hour');
|
||||
print '</td>';
|
||||
|
||||
@ -804,7 +804,7 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
elseif (! $isavailable[$preselectedday]['afternoon']) $cssonholiday.='onholidayafternoon ';
|
||||
|
||||
// Duration
|
||||
print '<td align="center" class="duration'.($cssonholiday?' '.$cssonholiday:'').'">';
|
||||
print '<td class="duration'.($cssonholiday?' '.$cssonholiday:'').' center">';
|
||||
|
||||
$dayWorkLoad = $lines[$i]->timespent_duration;
|
||||
$totalforeachline[$preselectedday]+=$lines[$i]->timespent_duration;
|
||||
@ -825,14 +825,14 @@ function projectLinesPerAction(&$inc, $parent, $fuser, $lines, &$level, &$projec
|
||||
print '</td>';
|
||||
|
||||
// Note
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<textarea name="'.$lines[$i]->id.'note" rows="'.ROWS_2.'" id="'.$lines[$i]->id.'note"'.($disabledtask?' disabled="disabled"':'').'>';
|
||||
print $lines[$i]->timespent_note;
|
||||
print '</textarea>';
|
||||
print '</td>';
|
||||
|
||||
// Warning
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
/*if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('',$langs->trans("UserIsNotContactOfProject"));
|
||||
else if ($disabledtask)
|
||||
{
|
||||
@ -1001,18 +1001,18 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print "</td>\n";
|
||||
|
||||
// Planned Workload
|
||||
print '<td align="right" class="leftborder plannedworkload">';
|
||||
print '<td class="leftborder plannedworkload right">';
|
||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin');
|
||||
else print '--:--';
|
||||
print '</td>';
|
||||
|
||||
// Progress declared %
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $formother->select_percent($lines[$i]->progress, $lines[$i]->id . 'progress');
|
||||
print '</td>';
|
||||
|
||||
// Time spent by everybody
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user
|
||||
if ($lines[$i]->duration)
|
||||
{
|
||||
@ -1024,7 +1024,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print "</td>\n";
|
||||
|
||||
// Time spent by user
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
$tmptimespent=$taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
else print '--:--';
|
||||
@ -1047,7 +1047,7 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
}
|
||||
|
||||
// Form to add new time
|
||||
print '<td class="nowrap leftborder" align="center">';
|
||||
print '<td class="nowrap leftborder center">';
|
||||
$tableCell = $form->selectDate($preselectedday, $lines[$i]->id, 1, 1, 2, "addtime", 0, 0, $disabledtask);
|
||||
print $tableCell;
|
||||
print '</td>';
|
||||
@ -1097,13 +1097,13 @@ function projectLinesPerDay(&$inc, $parent, $fuser, $lines, &$level, &$projectsr
|
||||
print '</td>';
|
||||
|
||||
// Note
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print '<textarea name="'.$lines[$i]->id.'note" rows="'.ROWS_2.'" id="'.$lines[$i]->id.'note"'.($disabledtask?' disabled="disabled"':'').'>';
|
||||
print '</textarea>';
|
||||
print '</td>';
|
||||
|
||||
// Warning
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject"));
|
||||
elseif ($disabledtask)
|
||||
{
|
||||
@ -1291,18 +1291,18 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
print "</td>\n";
|
||||
|
||||
// Planned Workload
|
||||
print '<td align="right" class="leftborder plannedworkload">';
|
||||
print '<td class="leftborder plannedworkload right">';
|
||||
if ($lines[$i]->planned_workload) print convertSecondToTime($lines[$i]->planned_workload, 'allhourmin');
|
||||
else print '--:--';
|
||||
print '</td>';
|
||||
|
||||
// Progress declared %
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print $formother->select_percent($lines[$i]->progress, $lines[$i]->id . 'progress');
|
||||
print '</td>';
|
||||
|
||||
// Time spent by everybody
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
// $lines[$i]->duration is a denormalised field = summ of time spent by everybody for task. What we need is time consummed by user
|
||||
if ($lines[$i]->duration)
|
||||
{
|
||||
@ -1314,7 +1314,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
print "</td>\n";
|
||||
|
||||
// Time spent by user
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
$tmptimespent=$taskstatic->getSummaryOfTimeSpent($fuser->id);
|
||||
if ($tmptimespent['total_duration']) print convertSecondToTime($tmptimespent['total_duration'], 'allhourmin');
|
||||
else print '--:--';
|
||||
@ -1381,7 +1381,7 @@ function projectLinesPerWeek(&$inc, $firstdaytoshow, $fuser, $parent, $lines, &$
|
||||
}
|
||||
|
||||
// Warning
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ((! $lines[$i]->public) && $disabledproject) print $form->textwithpicto('', $langs->trans("UserIsNotContactOfProject"));
|
||||
elseif ($disabledtask)
|
||||
{
|
||||
@ -1629,36 +1629,36 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
print '</td>';
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if ($objp->opp_amount) print price($objp->opp_amount, 0, '', 1, -1, -1, $conf->currency);
|
||||
print '</td>';
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
$code = dol_getIdFromCode($db, $objp->opp_status, 'c_lead_status', 'rowid', 'code');
|
||||
if ($code) print $langs->trans("OppStatus".$code);
|
||||
print '</td>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<td align="right">'.$objp->nb.'</td>';
|
||||
print '<td class="right">'.$objp->nb.'</td>';
|
||||
|
||||
$plannedworkload=$objp->planned_workload;
|
||||
$total_plannedworkload+=$plannedworkload;
|
||||
if (! in_array('plannedworkload', $hiddenfields))
|
||||
{
|
||||
print '<td align="right">'.($plannedworkload?convertSecondToTime($plannedworkload):'').'</td>';
|
||||
print '<td class="right">'.($plannedworkload?convertSecondToTime($plannedworkload):'').'</td>';
|
||||
}
|
||||
if (! in_array('declaredprogress', $hiddenfields))
|
||||
{
|
||||
$declaredprogressworkload=$objp->declared_progess_workload;
|
||||
$total_declaredprogressworkload+=$declaredprogressworkload;
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
//print $objp->planned_workload.'-'.$objp->declared_progess_workload."<br>";
|
||||
print ($plannedworkload?round(100*$declaredprogressworkload/$plannedworkload, 0).'%':'');
|
||||
print '</td>';
|
||||
}
|
||||
}
|
||||
|
||||
print '<td align="right">'.$projectstatic->getLibStatut(3).'</td>';
|
||||
print '<td class="right">'.$projectstatic->getLibStatut(3).'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$total_task = $total_task + $objp->nb;
|
||||
@ -1673,14 +1673,14 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
print '<td colspan="2">'.$langs->trans("Total")."</td>";
|
||||
if (! empty($conf->global->PROJECT_USE_OPPORTUNITIES))
|
||||
{
|
||||
print '<td class="liste_total" align="right">'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||
print '<td class="liste_total" align="right">'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).'</td>';
|
||||
print '<td class="liste_total right">'.price($total_opp_amount, 0, '', 1, -1, -1, $conf->currency).'</td>';
|
||||
print '<td class="liste_total right">'.$form->textwithpicto(price($ponderated_opp_amount, 0, '', 1, -1, -1, $conf->currency), $langs->trans("OpportunityPonderatedAmountDesc"), 1).'</td>';
|
||||
}
|
||||
if (empty($conf->global->PROJECT_HIDE_TASKS))
|
||||
{
|
||||
print '<td class="liste_total" align="right">'.$total_task.'</td>';
|
||||
if (! in_array('plannedworkload', $hiddenfields)) print '<td class="liste_total" align="right">'.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').'</td>';
|
||||
if (! in_array('declaredprogress', $hiddenfields)) print '<td class="liste_total" align="right">'.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload, 0).'%':'').'</td>';
|
||||
print '<td class="liste_total right">'.$total_task.'</td>';
|
||||
if (! in_array('plannedworkload', $hiddenfields)) print '<td class="liste_total right">'.($total_plannedworkload?convertSecondToTime($total_plannedworkload):'').'</td>';
|
||||
if (! in_array('declaredprogress', $hiddenfields)) print '<td class="liste_total right">'.($total_plannedworkload?round(100*$total_declaredprogressworkload/$total_plannedworkload, 0).'%':'').'</td>';
|
||||
}
|
||||
print '<td class="liste_total"></td>';
|
||||
print '</tr>';
|
||||
@ -1702,7 +1702,7 @@ function print_projecttasks_array($db, $form, $socid, $projectsListId, $mytasks
|
||||
print '<table width="100%">';
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("Year").'</td>';
|
||||
print '<td style="text-align:right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.$project_year_filter.'"/>';
|
||||
print '<td class="right"><input type="text" size="4" class="flat" name="project_year_filter" value="'.$project_year_filter.'"/>';
|
||||
print "</tr>\n";
|
||||
print '</table></form>';
|
||||
}
|
||||
|
||||
@ -451,13 +451,13 @@ function checkUserAccessToObject($user, $featuresarray, $objectid = 0, $tableand
|
||||
if ($feature == 'project') $feature='projet';
|
||||
if ($feature == 'task') $feature='projet_task';
|
||||
|
||||
$check = array('adherent','banque','don','user','usergroup','product','produit','service','produit|service','categorie','resource'); // Test on entity only (Objects with no link to company)
|
||||
$check = array('adherent','banque','don','user','usergroup','product','produit','service','produit|service','categorie','resource','expensereport','holiday'); // Test on entity only (Objects with no link to company)
|
||||
$checksoc = array('societe'); // Test for societe object
|
||||
$checkother = array('contact','agenda'); // Test on entity and link to third party. Allowed if link is empty (Ex: contacts...).
|
||||
$checkproject = array('projet','project'); // Test for project object
|
||||
$checktask = array('projet_task');
|
||||
$nocheck = array('barcode','stock'); // No test
|
||||
$checkdefault = 'all other not already defined'; // Test on entity and link to third party. Not allowed if link is empty (Ex: invoice, orders...).
|
||||
//$checkdefault = 'all other not already defined'; // Test on entity and link to third party. Not allowed if link is empty (Ex: invoice, orders...).
|
||||
|
||||
// If dbtablename not defined, we use same name for table than module name
|
||||
if (empty($dbtablename))
|
||||
|
||||
@ -220,9 +220,9 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
|
||||
//print '<td class="left">'.$langs->trans("QtyOrdered").'</td>';
|
||||
print '<td class="left">'.$langs->trans("SendingSheet").'</td>';
|
||||
print '<td class="left">'.$langs->trans("Description").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td align="center">'.$langs->trans("DateDeliveryPlanned").'</td>';
|
||||
print '<td align="center">'.$langs->trans("QtyPreparedOrShipped").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateCreation").'</td>';
|
||||
print '<td class="center">'.$langs->trans("DateDeliveryPlanned").'</td>';
|
||||
print '<td class="center">'.$langs->trans("QtyPreparedOrShipped").'</td>';
|
||||
if (! empty($conf->stock->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("Warehouse").'</td>';
|
||||
@ -236,8 +236,8 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
|
||||
if (! empty($conf->livraison_bon->enabled))
|
||||
{
|
||||
print '<td>'.$langs->trans("DeliveryOrder").'</td>';
|
||||
//print '<td align="center">'.$langs->trans("QtyReceived").'</td>';
|
||||
print '<td align="right">'.$langs->trans("DeliveryDate").'</td>';
|
||||
//print '<td class="center">'.$langs->trans("QtyReceived").'</td>';
|
||||
print '<td class="right">'.$langs->trans("DeliveryDate").'</td>';
|
||||
}
|
||||
print "</tr>\n";
|
||||
|
||||
@ -248,7 +248,7 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
|
||||
print '<tr class="oddeven">';
|
||||
|
||||
// Sending id
|
||||
print '<td align="left" class="nowrap">';
|
||||
print '<td class="nowrap left">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/expedition/card.php?id='.$objp->expedition_id.'">'.img_object($langs->trans("ShowSending"), 'sending').' '.$objp->exp_ref.'<a>';
|
||||
print '</td>';
|
||||
|
||||
@ -324,16 +324,16 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
|
||||
print "</td>\n";
|
||||
}
|
||||
|
||||
//print '<td align="center">'.$objp->qty_asked.'</td>';
|
||||
//print '<td class="center">'.$objp->qty_asked.'</td>';
|
||||
|
||||
// Date creation
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($objp->date_creation), 'day').'</td>';
|
||||
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->date_creation), 'day').'</td>';
|
||||
|
||||
// Date shipping creation
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
|
||||
print '<td class="nowrap center">'.dol_print_date($db->jdate($objp->date_delivery), 'day').'</td>';
|
||||
|
||||
// Qty shipped
|
||||
print '<td align="center">'.$objp->qty_shipped.'</td>';
|
||||
print '<td class="center">'.$objp->qty_shipped.'</td>';
|
||||
|
||||
// Warehouse
|
||||
if (! empty($conf->stock->enabled))
|
||||
@ -403,13 +403,13 @@ function show_list_sending_receive($origin, $origin_id, $filter = '')
|
||||
//print '<a href="'.DOL_URL_ROOT.'/livraison/card.php?id='.$livraison_id.'">'.img_object($langs->trans("ShowReceiving"),'sending').' '.$objp->livraison_ref.'<a>';
|
||||
print '</td>';
|
||||
// Qty received
|
||||
//print '<td align="center">';
|
||||
//print '<td class="center">';
|
||||
// TODO No solution for the moment to link a line det of receipt with a line det of shipping,
|
||||
// so no way to know the qty received for this line of shipping.
|
||||
//print $langs->trans("FeatureNotYetAvailable");
|
||||
//print '</td>';
|
||||
// Date shipping real
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
print dol_print_date($receiving->date_delivery, 'day');
|
||||
print '</td>';
|
||||
}
|
||||
|
||||
@ -171,7 +171,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
||||
print '<strong> ';
|
||||
print $tab[$x]['title'];
|
||||
print ' (fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $tab[$x]['buttons'];
|
||||
print '</td></tr></table>';
|
||||
}
|
||||
@ -207,7 +207,7 @@ function tree_recur($tab, $pere, $rang, $iddivjstree = 'iddivjstree', $donoreset
|
||||
print $tab[$x]['title'];
|
||||
print '</a></strong>';
|
||||
print ' (mainmenu='.$tab[$x]['mainmenu'].' leftmenu='.$tab[$x]['leftmenu'].' - fk_mainmenu='.$tab[$x]['fk_mainmenu'].' fk_leftmenu='.$tab[$x]['fk_leftmenu'].')';
|
||||
print '</td><td align="right">';
|
||||
print '</td><td class="right">';
|
||||
print $tab[$x]['buttons'];
|
||||
print '</td></tr></table>';
|
||||
}
|
||||
|
||||
@ -343,14 +343,14 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr>';
|
||||
print '<td>'.$langs->trans("DefaultSkin").'</td>';
|
||||
print '<td>'.$conf->global->MAIN_THEME.'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input id="check_MAIN_THEME" name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td class="nowrap left" width="20%"><input id="check_MAIN_THEME" name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td> </td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<tr class="liste_titre"><th class="titlefield">'.$langs->trans("DefaultSkin").'</th>';
|
||||
print '<th align="right">';
|
||||
print '<th class="right">';
|
||||
$url='https://www.dolistore.com/lang-en/4-skins';
|
||||
if (preg_match('/fr/i', $langs->defaultlang)) $url='https://www.dolistore.com/fr/4-themes';
|
||||
//if (preg_match('/es/i',$langs->defaultlang)) $url='http://www.dolistore.com/lang-es/4-themes';
|
||||
@ -372,7 +372,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
|
||||
print '<tr><td colspan="'.$colspan.'">';
|
||||
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td><div align="center">';
|
||||
print '<table class="nobordernopadding" width="100%"><tr><td><div class="center">';
|
||||
|
||||
$i=0;
|
||||
foreach($dirthemes as $dir)
|
||||
@ -432,7 +432,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuDisableImages").'</td>';
|
||||
print '<td>'.($conf->global->THEME_TOPMENU_DISABLE_IMAGE?$conf->global->THEME_TOPMENU_DISABLE_IMAGE:$langs->trans("Default")).'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_TOPMENU_DISABLE_IMAGE" id="check_THEME_TOPMENU_DISABLE_IMAGE" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
|
||||
print '<td class="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_TOPMENU_DISABLE_IMAGE" id="check_THEME_TOPMENU_DISABLE_IMAGE" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -477,7 +477,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
|
||||
print '<td class="nowrap left" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -524,7 +524,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TOPMENU_BACK1:$langs->trans("Default")).'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
|
||||
print '<td class="nowrap left" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TOPMENU_BACK1" id="check_THEME_ELDY_TOPMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -573,7 +573,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_VERMENU_BACK1:$langs->trans("Default")).'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_VERMENU_BACK1" id="check_THEME_ELDY_VERMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
|
||||
print '<td class="nowrap left" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_VERMENU_BACK1" id="check_THEME_ELDY_VERMENU_BACK1" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TOPMENU_BACK1)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -763,7 +763,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("TopMenuBackgroundColor").'</td>';
|
||||
print '<td>'.($conf->global->THEME_ELDY_TOPMENU_BACK1?$conf->global->THEME_ELDY_TEXTLINK:$langs->trans("Default")).'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TEXTLINK" id="check_THEME_ELDY_TEXTLINK" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
|
||||
print '<td class="nowrap left" width="20%"><input '.$bc[$var].' name="check_THEME_ELDY_TEXTLINK" id="check_THEME_ELDY_TEXTLINK" type="checkbox" '.(! empty($object->conf->THEME_ELDY_TEXTLINK)?" checked":"");
|
||||
print (empty($dolibarr_main_demo) && $edit)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
@ -814,7 +814,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
|
||||
print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td class="nowrap left" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';
|
||||
@ -857,7 +857,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("HighlightLinesOnMouseHover").'</td>';
|
||||
print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER" disabled="disabled" type="checkbox" '.($conf->global->THEME_ELDY_USE_HOVER?" checked":"").'></td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td class="nowrap left" width="20%"><input '.$bc[$var].' name="check_MAIN_THEME"'.($edit?'':' disabled').' type="checkbox" '.($selected_theme?" checked":"").'> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td><input '.$bc[$var].' name="check_THEME_ELDY_USE_HOVER"'.($edit?'':' disabled="disabled"').' type="checkbox" '.($hoverdisabled?"":" checked").'>';
|
||||
print ' ('.$langs->trans("NotSupportedByAllThemes").', '.$langs->trans("PressF5AfterChangingThis").')';
|
||||
print '</td>';
|
||||
@ -898,6 +898,7 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
// Use MAIN_OPTIMIZEFORTEXTBROWSER
|
||||
if ($foruserprofile)
|
||||
{
|
||||
//$default=yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
|
||||
$default=$langs->trans('No');
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
|
||||
@ -918,14 +919,32 @@ function show_theme($fuser, $edit = 0, $foruserprofile = false)
|
||||
if (empty($fuser->conf->MAIN_OPTIMIZEFORTEXTBROWSER)) print ' ('.$langs->trans("ForcedByGlobalSetup").')';
|
||||
}
|
||||
}
|
||||
print ' ('.$langs->trans("Default").': <strong>'.yn(0).'</strong>) ';
|
||||
print ' ('.$langs->trans("Default").': <strong>'.$default.'</strong>) ';
|
||||
print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
// TODO
|
||||
/*var_dump($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
|
||||
$default=$langs->trans('No');
|
||||
print '<tr class="oddeven">';
|
||||
print '<td>'.$langs->trans("MAIN_OPTIMIZEFORTEXTBROWSER").'</td>';
|
||||
print '<td colspan="'.($colspan-1).'">';
|
||||
if ($edit)
|
||||
{
|
||||
print $form->selectyesno('MAIN_OPTIMIZEFORTEXTBROWSER', $conf->global->MAIN_OPTIMIZEFORTEXTBROWSER, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
print yn($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER);
|
||||
}
|
||||
print ' ('.$langs->trans("Default").': <strong>'.$default.'</strong>) ';
|
||||
print $form->textwithpicto('', $langs->trans("MAIN_OPTIMIZEFORTEXTBROWSERDesc"));
|
||||
print '</span>';
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
*/
|
||||
}
|
||||
|
||||
print '</table>';
|
||||
|
||||
@ -275,7 +275,7 @@
|
||||
|
||||
<table width="100%">
|
||||
<tr align="center">
|
||||
<td align="right">
|
||||
<td class="right">
|
||||
<table width="27%" border="0" cellspacing="0" cellpadding="1">
|
||||
<tr><td align="center">Date et signature<br><br></td></tr>
|
||||
<tr><td>
|
||||
|
||||
@ -84,9 +84,9 @@ class mod_arctic extends ModeleNumRefFicheinter
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskvalue" value="'.$conf->global->FICHINTER_ARTIC_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskvalue" value="'.$conf->global->FICHINTER_ARTIC_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -82,8 +82,8 @@ class mod_holiday_immaculate extends ModelNumRefHolidays
|
||||
$tooltip.=$langs->trans("GenericMaskCodes5");
|
||||
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskholiday" value="'.$conf->global->HOLIDAY_IMMACULATE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskholiday" value="'.$conf->global->HOLIDAY_IMMACULATE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
@ -83,9 +83,9 @@ class mod_livraison_saphir extends ModeleNumRefDeliveryOrder
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdelivery" value="'.$conf->global->LIVRAISON_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdelivery" value="'.$conf->global->LIVRAISON_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@
|
||||
* \defgroup dav Module dav
|
||||
* \brief dav module descriptor.
|
||||
*
|
||||
* \file htdocs/dav/core/modules/modDav.class.php
|
||||
* \file htdocs/core/modules/modDav.class.php
|
||||
* \ingroup dav
|
||||
* \brief Description and activation file for module dav
|
||||
*/
|
||||
|
||||
134
htdocs/core/modules/modDebugBar.class.php
Normal file
134
htdocs/core/modules/modDebugBar.class.php
Normal file
@ -0,0 +1,134 @@
|
||||
<?php
|
||||
/* 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 <http://www.gnu.org/licenses/>.
|
||||
*/
|
||||
|
||||
/**
|
||||
* \defgroup debugbar Debug bar
|
||||
* \brief debugbar module descriptor.
|
||||
*
|
||||
* \file htdocs/core/modules/modDebugBar.class.php
|
||||
* \ingroup debugbar
|
||||
* \brief Description and activation file for module debugbar
|
||||
*/
|
||||
include_once DOL_DOCUMENT_ROOT .'/core/modules/DolibarrModules.class.php';
|
||||
|
||||
|
||||
/**
|
||||
* Class to describe and enable module
|
||||
*/
|
||||
class modDebugBar extends DolibarrModules
|
||||
{
|
||||
|
||||
/**
|
||||
* Constructor. Define names, constants, directories, boxes, permissions
|
||||
*
|
||||
* @param DoliDB $db Database handler
|
||||
*/
|
||||
public function __construct($db)
|
||||
{
|
||||
$this->db = $db;
|
||||
|
||||
$this->numero = 43;
|
||||
|
||||
$this->rights_class = 'debugbar';
|
||||
|
||||
$this->family = "base";
|
||||
$this->module_position = '75';
|
||||
|
||||
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
|
||||
$this->name = preg_replace('/^mod/i', '', get_class($this));
|
||||
$this->description = "A tool for developper adding a debug bar in your browser.";
|
||||
// Possible values for version are: 'development', 'experimental', 'dolibarr' or version
|
||||
$this->version = 'dolibarr';
|
||||
$this->const_name = 'MAIN_MODULE_'.strtoupper($this->name);
|
||||
$this->picto='technic';
|
||||
|
||||
$this->module_parts = array(
|
||||
// Set here all hooks context managed by module. To find available hook context, make a "grep -r '>initHooks(' *" on source code. You can also set hook context 'all'
|
||||
'hooks' => array(
|
||||
'data' => array(
|
||||
'main',
|
||||
'login',
|
||||
),
|
||||
'entity' => '0',
|
||||
),
|
||||
// Set this to 1 if feature of module are opened to external users
|
||||
'moduleforexternal' => 0,
|
||||
);
|
||||
|
||||
// Data directories to create when module is enabled
|
||||
$this->dirs = array();
|
||||
|
||||
// Dependencies
|
||||
$this->depends = array(); // May be used for product or service or third party module
|
||||
$this->requiredby = array();
|
||||
|
||||
// Config pages
|
||||
$this->config_page_url = array("debugbar.php");
|
||||
|
||||
// Constants
|
||||
// Example: $this->const=array(0=>array('MYMODULE_MYNEWCONST1','chaine','myvalue','This is a constant to add',0),
|
||||
// 1=>array('MYMODULE_MYNEWCONST2','chaine','myvalue','This is another constant to add',0) );
|
||||
$this->const = array(
|
||||
0 => array('DEBUGBAR_LOGS_LINES_NUMBER', 'chaine', '100', 'Number of log lines to show in debug bar', 1)
|
||||
);
|
||||
|
||||
// Boxes
|
||||
$this->boxes = array();
|
||||
|
||||
// Permissions
|
||||
$this->rights = array();
|
||||
|
||||
$this->rights[1][0] = 430; // id de la permission
|
||||
$this->rights[1][1] = 'Use Debug Bar'; // libelle de la permission
|
||||
$this->rights[1][2] = 'u'; // type de la permission (deprecie a ce jour)
|
||||
$this->rights[1][3] = 1; // La permission est-elle une permission par defaut
|
||||
$this->rights[1][4] = 'read';
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Function called when module is enabled.
|
||||
* The init function add constants, boxes, permissions and menus (defined in constructor) into Dolibarr database.
|
||||
* It also creates data directories.
|
||||
*
|
||||
* @param string $options Options when enabling module ('', 'noboxes')
|
||||
* @return int 1 if OK, 0 if KO
|
||||
*/
|
||||
public function init($options = '')
|
||||
{
|
||||
// Permissions
|
||||
$this->remove($options);
|
||||
|
||||
$sql = array(
|
||||
);
|
||||
|
||||
return $this->_init($sql, $options);
|
||||
}
|
||||
|
||||
/**
|
||||
* Function called after module configuration.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function loadSettings()
|
||||
{
|
||||
$this->addPermission("use", "UseDebugBar", "u");
|
||||
|
||||
$this->enableHooks(array(
|
||||
'main',
|
||||
'login'
|
||||
));
|
||||
}
|
||||
}
|
||||
@ -78,6 +78,7 @@ class modUser extends DolibarrModules
|
||||
// Boxes
|
||||
$this->boxes = array(
|
||||
0=>array('file'=>'box_lastlogin.php','enabledbydefaulton'=>'Home'),
|
||||
1=>array('file'=>'box_birthdays.php','enabledbydefaulton'=>'Home')
|
||||
);
|
||||
|
||||
// Permissions
|
||||
|
||||
@ -82,9 +82,9 @@ class mod_payment_ant extends ModeleNumRefPayments
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskpayment" value="'.$conf->global->PAYMENT_ANT_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskpayment" value="'.$conf->global->PAYMENT_ANT_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -113,15 +113,15 @@ class mod_codeproduct_elephant extends ModeleProductCode
|
||||
|
||||
// Parametrage du prefix customers
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("ProductCodeModel").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value1" value="'.(! empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT:'').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value1" value="'.(! empty($conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT)?$conf->global->PRODUCT_ELEPHANT_MASK_PRODUCT:'').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"'.$disabled.'></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"'.$disabled.'></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
// Parametrage du prefix suppliers
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("ServiceCodeModel").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value2" value="'.(! empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)?$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE:'').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value2" value="'.(! empty($conf->global->PRODUCT_ELEPHANT_MASK_SERVICE)?$conf->global->PRODUCT_ELEPHANT_MASK_SERVICE:'').'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
$texte.= '</table>';
|
||||
|
||||
@ -83,9 +83,9 @@ class mod_project_universal extends ModeleNumRefProjects
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskproject" value="'.$conf->global->PROJECT_UNIVERSAL_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskproject" value="'.$conf->global->PROJECT_UNIVERSAL_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -83,9 +83,9 @@ class mod_task_universal extends ModeleNumRefTask
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="masktask" value="'.$conf->global->PROJECT_TASK_UNIVERSAL_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="masktask" value="'.$conf->global->PROJECT_TASK_UNIVERSAL_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -85,9 +85,9 @@ class mod_propale_saphir extends ModeleNumRefPropales
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskpropal" value="'.$conf->global->PROPALE_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskpropal" value="'.$conf->global->PROPALE_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -60,8 +60,8 @@ class mod_reception_moonstone extends ModelNumRefReception
|
||||
$tooltip.=$langs->trans("GenericMaskCodes5");
|
||||
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreception" value="'.$conf->global->RECEPTION_MOONSTONE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreception" value="'.$conf->global->RECEPTION_MOONSTONE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '</tr>';
|
||||
$texte.= '</table>';
|
||||
$texte.= '</form>';
|
||||
|
||||
@ -114,15 +114,15 @@ class mod_codeclient_elephant extends ModeleThirdPartyCode
|
||||
|
||||
// Parametrage du prefix customers
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("CustomerCodeModel").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value1" value="'.$conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER.'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value1" value="'.$conf->global->COMPANY_ELEPHANT_MASK_CUSTOMER.'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"'.$disabled.'></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"'.$disabled.'></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
// Parametrage du prefix suppliers
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("SupplierCodeModel").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value2" value="'.$conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER.'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="value2" value="'.$conf->global->COMPANY_ELEPHANT_MASK_SUPPLIER.'"'.$disabled.'>', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
$texte.= '</table>';
|
||||
|
||||
@ -93,28 +93,28 @@ class mod_facture_fournisseur_tulip extends ModeleNumRefSuppliersInvoices
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceStandard").')';
|
||||
$texte.= ':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskinvoice" value="'.$conf->global->SUPPLIER_INVOICE_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
// Parametrage du prefix des avoirs
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceAvoir").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskcredit" value="'.$conf->global->SUPPLIER_CREDIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
if ($conf->global->MAIN_FEATURE_LEVEL >= 2)
|
||||
{
|
||||
// Parametrage du prefix des replacement
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceReplacement").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskreplacement" value="'.$conf->global->SUPPLIER_REPLACEMENT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
// Parametrage du prefix des acomptes
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").' ('.$langs->trans("InvoiceDeposit").'):</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskdeposit" value="'.$conf->global->SUPPLIER_DEPOSIT_TULIP_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '</tr>';
|
||||
}
|
||||
|
||||
|
||||
@ -85,9 +85,9 @@ class mod_commande_fournisseur_orchidee extends ModeleNumRefSuppliersOrders
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskorder" value="'.$conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="maskorder" value="'.$conf->global->COMMANDE_FOURNISSEUR_ORCHIDEE_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -82,9 +82,9 @@ class mod_supplier_payment_brodator extends ModeleNumRefSupplierPayments
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="masksupplierpayment" value="'.$conf->global->SUPPLIER_PAYMENT_BRODATOR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="masksupplierpayment" value="'.$conf->global->SUPPLIER_PAYMENT_BRODATOR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -85,9 +85,9 @@ class mod_supplier_proposal_saphir extends ModeleNumRefSupplierProposal
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte.= '<tr><td>'.$langs->trans("Mask").':</td>';
|
||||
$texte.= '<td align="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="masksupplier_proposal" value="'.$conf->global->SUPPLIER_PROPOSAL_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
$texte.= '<td class="right">'.$form->textwithpicto('<input type="text" class="flat" size="24" name="masksupplier_proposal" value="'.$conf->global->SUPPLIER_PROPOSAL_SAPHIR_MASK.'">', $tooltip, 1, 1).'</td>';
|
||||
|
||||
$texte.= '<td align="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
$texte.= '<td class="left" rowspan="2"> <input type="submit" class="button" value="'.$langs->trans("Modify").'" name="Button"></td>';
|
||||
|
||||
$texte.= '</tr>';
|
||||
|
||||
|
||||
@ -81,9 +81,9 @@ class mod_ticket_universal extends ModeleNumRefTicket
|
||||
|
||||
// Parametrage du prefix
|
||||
$texte .= '<tr><td>' . $langs->trans("Mask") . ':</td>';
|
||||
$texte .= '<td align="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskticket" value="' . $conf->global->TICKET_UNIVERSAL_MASK . '">', $tooltip, 1, 1) . '</td>';
|
||||
$texte .= '<td class="right">' . $form->textwithpicto('<input type="text" class="flat" size="24" name="maskticket" value="' . $conf->global->TICKET_UNIVERSAL_MASK . '">', $tooltip, 1, 1) . '</td>';
|
||||
|
||||
$texte .= '<td align="left" rowspan="2"> <input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button"></td>';
|
||||
$texte .= '<td class="left" rowspan="2"> <input type="submit" class="button" value="' . $langs->trans("Modify") . '" name="Button"></td>';
|
||||
|
||||
$texte .= '</tr>';
|
||||
|
||||
|
||||
@ -1,5 +1,5 @@
|
||||
<?php
|
||||
/* Copyright (C) 2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
/* Copyright (C) 2017-2019 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
*
|
||||
* 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
|
||||
@ -55,7 +55,8 @@ foreach($object->fields as $key => $val)
|
||||
elseif ($val['type'] == 'text' || $val['type'] == 'html') $value = GETPOSTISSET($key)?GETPOST($key, 'none'):$object->$key;
|
||||
else $value = GETPOSTISSET($key)?GETPOST($key, 'alpha'):$object->$key;
|
||||
//var_dump($val.' '.$key.' '.$value);
|
||||
print $object->showInputField($val, $key, $value, '', '', '', 0);
|
||||
if ($val['noteditable']) print $object->showOutputField($val, $key, $value, '', '', '', 0);
|
||||
else print $object->showInputField($val, $key, $value, '', '', '', 0);
|
||||
print '</td>';
|
||||
print '</tr>';
|
||||
}
|
||||
|
||||
@ -52,7 +52,7 @@ if (in_array($modulepart, array('product', 'produit', 'societe', 'user', 'ticket
|
||||
if ($action == 'delete')
|
||||
{
|
||||
$langs->load("companies"); // Need for string DeleteFile+ConfirmDeleteFiles
|
||||
print $form->formconfirm(
|
||||
print $form->formconfirm(
|
||||
$_SERVER["PHP_SELF"] . '?id=' . $object->id . '&urlfile=' . urlencode(GETPOST("urlfile")) . '&linkid=' . GETPOST('linkid', 'int') . (empty($param)?'':$param),
|
||||
$langs->trans('DeleteFile'),
|
||||
$langs->trans('ConfirmDeleteFile'),
|
||||
|
||||
@ -278,6 +278,21 @@ else {
|
||||
}
|
||||
|
||||
$form->select_produits_fournisseurs($object->socid, GETPOST('idprodfournprice'), 'idprodfournprice', '', '', $ajaxoptions, 1, $alsoproductwithnosupplierprice, 'maxwidth300');
|
||||
?>
|
||||
<script type="text/javascript">
|
||||
|
||||
$(document).ready(function(){
|
||||
|
||||
$(document).on('keypress',function(e) {
|
||||
if ($('input:focus').length == 0) {
|
||||
$('#idprodfournprice').select2('open');
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
</script>
|
||||
<?php
|
||||
}
|
||||
echo '<input type="hidden" name="pbq" id="pbq" value="">';
|
||||
echo '</span>';
|
||||
|
||||
@ -67,7 +67,13 @@ class Cronjob extends CommonObject
|
||||
public $md5params;
|
||||
public $module_name;
|
||||
public $priority;
|
||||
/**
|
||||
* @var string|int Date for last job execution
|
||||
*/
|
||||
public $datelastrun='';
|
||||
/**
|
||||
* @var string|int Date for next job execution
|
||||
*/
|
||||
public $datenextrun='';
|
||||
public $dateend='';
|
||||
public $datestart='';
|
||||
@ -1220,7 +1226,7 @@ class Cronjob extends CommonObject
|
||||
$result=$user->fetch('', $userlogin);
|
||||
if ($result<0)
|
||||
{
|
||||
$this->error="User Error:".$user->error;
|
||||
$this->error="User Error : ".$user->error;
|
||||
dol_syslog(get_class($this)."::reprogram_jobs ".$this->error, LOG_ERR);
|
||||
return -1;
|
||||
}
|
||||
|
||||
@ -394,7 +394,7 @@ print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre"> </td>';
|
||||
print '<td class="liste_titre" align="center">';
|
||||
print $form->selectarray('search_status', array('0'=>$langs->trans("Disabled"), '1'=>$langs->trans("Enabled"), '-2'=>$langs->trans("EnabledAndDisabled"), '2'=>$langs->trans("Archived")), $search_status, 1);
|
||||
print '</td><td class="liste_titre" align="right">';
|
||||
print '</td><td class="liste_titre right">';
|
||||
$searchpicto=$form->showFilterButtons();
|
||||
print $searchpicto;
|
||||
print '</td>';
|
||||
@ -505,11 +505,11 @@ if ($num > 0)
|
||||
if(!empty($obj->dateend)) {print dol_print_date($db->jdate($obj->dateend), 'dayhour');}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if (!empty($obj->maxrun)) {print $obj->maxrun;}
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
print '<td class="right">';
|
||||
if (!empty($obj->nbrun)) {print $obj->nbrun;} else {print '0';}
|
||||
print '</td>';
|
||||
|
||||
@ -554,11 +554,11 @@ if ($num > 0)
|
||||
print '</td>';
|
||||
|
||||
// Status
|
||||
print '<td align="center">';
|
||||
print '<td class="center">';
|
||||
print $object->getLibStatut(3);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right" class="nowraponall">';
|
||||
print '<td class="nowraponall right">';
|
||||
|
||||
$backtourl = urlencode($_SERVER["PHP_SELF"].'?'.$param.($sortfield?'&sortfield='.$sortfield:'').($sortorder?'&sortorder='.$sortorder:''));
|
||||
if ($user->rights->cron->create)
|
||||
|
||||
88
htdocs/debugbar/class/DataCollector/DolConfigCollector.php
Normal file
88
htdocs/debugbar/class/DataCollector/DolConfigCollector.php
Normal file
@ -0,0 +1,88 @@
|
||||
<?php
|
||||
|
||||
use \DebugBar\DataCollector\ConfigCollector;
|
||||
|
||||
/**
|
||||
* DolConfigCollector class
|
||||
*/
|
||||
|
||||
class DolConfigCollector extends ConfigCollector
|
||||
{
|
||||
/**
|
||||
* Return widget settings
|
||||
*
|
||||
* @return array Array
|
||||
*/
|
||||
public function getWidgets()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
return array(
|
||||
$langs->transnoentities('Config') => array(
|
||||
"icon" => "gear",
|
||||
"widget" => "PhpDebugBar.Widgets.VariableListWidget",
|
||||
"map" => $this->getName(),
|
||||
"default" => "{}"
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Return collected data
|
||||
*
|
||||
* @return array Array
|
||||
*/
|
||||
public function collect()
|
||||
{
|
||||
$this->data = $this->getConfig();
|
||||
|
||||
return parent::collect();
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns an array with config data
|
||||
*
|
||||
* @return array Array of config
|
||||
*/
|
||||
protected function getConfig()
|
||||
{
|
||||
global $conf, $user;
|
||||
|
||||
// Get constants
|
||||
$const = get_defined_constants(true);
|
||||
|
||||
$config = array(
|
||||
'Dolibarr' => array(
|
||||
'const' => $const['user'],
|
||||
'$conf' => $this->objectToArray($conf),
|
||||
'$user' => $this->objectToArray($user)
|
||||
),
|
||||
'PHP' => array(
|
||||
'version' => PHP_VERSION,
|
||||
'interface' => PHP_SAPI,
|
||||
'os' => PHP_OS
|
||||
)
|
||||
);
|
||||
|
||||
return $config;
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
/**
|
||||
* Convert an object to array
|
||||
*
|
||||
* @param mixed $obj Object
|
||||
* @return array Array
|
||||
*/
|
||||
protected function objectToArray($obj)
|
||||
{
|
||||
// phpcs:enable
|
||||
$_arr = is_object($obj) ? get_object_vars($obj) : $obj;
|
||||
foreach ($_arr as $key => $val) {
|
||||
$val = (is_array($val) || is_object($val)) ? $this->objectToArray($val) : $val;
|
||||
$arr[$key] = $val;
|
||||
}
|
||||
|
||||
return $arr;
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,35 @@
|
||||
<?php
|
||||
|
||||
use \DebugBar\DataCollector\ExceptionsCollector;
|
||||
|
||||
/**
|
||||
* DolExceptionsCollector class
|
||||
*/
|
||||
|
||||
class DolExceptionsCollector extends ExceptionsCollector
|
||||
{
|
||||
/**
|
||||
* Return widget settings
|
||||
*
|
||||
* @return array Array
|
||||
*/
|
||||
public function getWidgets()
|
||||
{
|
||||
global $langs;
|
||||
|
||||
$title = $langs->transnoentities('Exceptions');
|
||||
|
||||
return array(
|
||||
"$title" => array(
|
||||
'icon' => 'bug',
|
||||
'widget' => 'PhpDebugBar.Widgets.ExceptionsWidget',
|
||||
'map' => 'exceptions.exceptions',
|
||||
'default' => '[]'
|
||||
),
|
||||
"$title:badge" => array(
|
||||
'map' => 'exceptions.count',
|
||||
'default' => 'null'
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user