From 232f20100706b9d93c5e081f670d7daf44b892fd Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Sun, 23 Feb 2020 17:02:08 +0100 Subject: [PATCH 001/175] Merge remote-tracking branch 'Dolibarr/11.0' into 11 --- htdocs/compta/facture/class/facture.class.php | 9 +++++++++ htdocs/core/lib/pdf.lib.php | 2 +- htdocs/cron/class/cronjob.class.php | 4 ++-- .../framework/Luracast/Restler/AutoLoader.php | 8 +------- .../framework/Luracast/Restler/CommentParser.php | 12 ++++++------ .../framework/Luracast/Restler/Format/XmlFormat.php | 2 +- .../restler/framework/Luracast/Restler/Resources.php | 6 +++--- .../restler/framework/Luracast/Restler/Restler.php | 4 ++-- .../restler/framework/Luracast/Restler/Routes.php | 6 +++--- .../restler/framework/Luracast/Restler/Scope.php | 2 +- .../restler/framework/Luracast/Restler/UI/Emmet.php | 4 ++-- htdocs/projet/element.php | 2 +- htdocs/theme/eldy/global.inc.php | 2 +- 13 files changed, 33 insertions(+), 30 deletions(-) diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index d4a7efd3cf4..99cc638c36f 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1156,6 +1156,14 @@ class Facture extends CommonInvoice $line->date_start = $object->lines[$i]->date_start; $line->date_end = $object->lines[$i]->date_end; + // Multicurrency + $line->fk_multicurrency = $object->lines[$i]->fk_multicurrency; + $line->multicurrency_code = $object->lines[$i]->multicurrency_code; + $line->multicurrency_subprice = $object->lines[$i]->multicurrency_subprice; + $line->multicurrency_total_ht = $object->lines[$i]->multicurrency_total_ht; + $line->multicurrency_total_tva = $object->lines[$i]->multicurrency_total_tva; + $line->multicurrency_total_ttc = $object->lines[$i]->multicurrency_total_ttc; + $line->fk_fournprice = $object->lines[$i]->fk_fournprice; $marginInfos = getMarginInfos($object->lines[$i]->subprice, $object->lines[$i]->remise_percent, $object->lines[$i]->tva_tx, $object->lines[$i]->localtax1_tx, $object->lines[$i]->localtax2_tx, $object->lines[$i]->fk_fournprice, $object->lines[$i]->pa_ht); $line->pa_ht = $marginInfos[0]; @@ -1170,6 +1178,7 @@ class Facture extends CommonInvoice $this->socid = $object->socid; $this->fk_project = $object->fk_project; + $this->fk_account = $object->fk_account; $this->cond_reglement_id = $object->cond_reglement_id; $this->mode_reglement_id = $object->mode_reglement_id; $this->availability_id = $object->availability_id; diff --git a/htdocs/core/lib/pdf.lib.php b/htdocs/core/lib/pdf.lib.php index a5ba08bb139..59035258c74 100644 --- a/htdocs/core/lib/pdf.lib.php +++ b/htdocs/core/lib/pdf.lib.php @@ -1401,7 +1401,7 @@ function pdf_getlinedesc($object, $i, $outputlangs, $hideref = 0, $hidedesc = 0, foreach ($tblcateg as $cate) { // Adding the descriptions if they are filled - $desccateg = $cate->add_description; + $desccateg = $cate->description; if ($desccateg) $libelleproduitservice .= '__N__'.$desccateg; } diff --git a/htdocs/cron/class/cronjob.class.php b/htdocs/cron/class/cronjob.class.php index 5cde792bbb5..6139f157f8a 100644 --- a/htdocs/cron/class/cronjob.class.php +++ b/htdocs/cron/class/cronjob.class.php @@ -1320,9 +1320,9 @@ class Cronjob extends CommonObject if ($processing) $moretext = ' ('.$langs->trans("Running").')'; elseif ($lastresult) $moretext .= ' ('.$langs->trans("Error").')'; - $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Draft').$moretext; + $this->labelStatus[self::STATUS_DISABLED] = $langs->trans('Disabled').$moretext; $this->labelStatus[self::STATUS_ENABLED] = $langs->trans('Enabled').$moretext; - $this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Draft'); + $this->labelStatusShort[self::STATUS_DISABLED] = $langs->trans('Disabled'); $this->labelStatusShort[self::STATUS_ENABLED] = $langs->trans('Enabled'); } diff --git a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php index eff8bb61f29..d8445fdc70c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/AutoLoader.php @@ -263,13 +263,7 @@ class AutoLoader * @return bool false unless className now exists */ private function loadLastResort($className, $loader = null) { - // @CHANGE LDR Add protection to avoid conflict with other autoloader - /*print 'Try to load '.$className."\n"; - if (in_array($className, array('Google_Client'))) - { - return false; - }*/ - $loaders = array_unique(static::$rogueLoaders); + $loaders = array_unique(static::$rogueLoaders); if (isset($loader)) { if (false === array_search($loader, $loaders)) static::$rogueLoaders[] = $loader; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php index e8248a385fa..2815f1f6c70 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/CommentParser.php @@ -159,7 +159,7 @@ class CommentParser $addNewline = true; } continue; - } elseif ($line{0} == '@') { + } elseif ($line[0] == '@') { $mode = 2; $newParam = true; } @@ -353,7 +353,7 @@ class CommentParser $data = $format->decode($str); } } else { // auto detect - if ($str{0} == '{') { + if ($str[0] == '{') { $d = json_decode($str, true); if (json_last_error() != JSON_ERROR_NONE) { throw new Exception('Error parsing embedded JSON data' @@ -445,7 +445,7 @@ class CommentParser { $r = array(); $email = end($value); - if ($email{0} == '<') { + if ($email[0] == '<') { $email = substr($email, 1, -1); array_pop($value); $r['email'] = $email; @@ -470,7 +470,7 @@ class CommentParser $data = array_shift($value); if (empty($data)) { $r['type'] = 'mixed'; - } elseif ($data{0} == '$') { + } elseif ($data[0] == '$') { $r['name'] = substr($data, 1); $r['type'] = 'mixed'; } else { @@ -478,7 +478,7 @@ class CommentParser $r['type'] = count($data) == 1 ? $data[0] : $data; $data = array_shift($value); - if (!empty($data) && $data{0} == '$') { + if (!empty($data) && $data[0] == '$') { $r['name'] = substr($data, 1); } } @@ -498,7 +498,7 @@ class CommentParser $data = array_shift($value); if (empty($data)) { $r['type'] = 'mixed'; - } elseif ($data{0} == '$') { + } elseif ($data[0] == '$') { $r['name'] = substr($data, 1); $r['type'] = 'mixed'; } else { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php index b51fa707a53..ceec32e4cb5 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Format/XmlFormat.php @@ -221,7 +221,7 @@ class XmlFormat extends Format $namespaces = $xml->getNamespaces(); if (count($namespaces)) { $p = strpos($data, $xml->getName()); - if ($p && $data{$p - 1} == ':') { + if ($p && $data[$p - 1] == ':') { $s = strpos($data, '<') + 1; $prefix = substr($data, $s, $p - $s - 1); static::$namespacedProperties[static::$rootName] = $prefix; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Resources.php b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php index 43e95fa02be..2986968a990 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Resources.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Resources.php @@ -198,7 +198,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi } elseif (false !== ($pos = strpos($id, '-v'))) { //$version = intval(substr($id, $pos + 2)); $id = substr($id, 0, $pos); - } elseif ($id{0} == 'v' && is_numeric($v = substr($id, 1))) { + } elseif ($id[0] == 'v' && is_numeric($v = substr($id, 1))) { $id = ''; //$version = $v; } elseif ($id == 'root' || $id == 'index') { @@ -233,7 +233,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi if ($tSlash) { if ($fLen != $tLen && !Text::beginsWith($fullPath, $target . '/')) continue; - } elseif ($fLen > $tLen + 1 && $fullPath{$tLen + 1} != '{' && !Text::beginsWith($fullPath, '{')) { + } elseif ($fLen > $tLen + 1 && $fullPath[$tLen + 1] != '{' && !Text::beginsWith($fullPath, '{')) { //when mapped to root exclude paths that have static parts //they are listed else where under that static part name continue; @@ -275,7 +275,7 @@ class Resources implements iUseAuthentication, iProvideMultiVersionApi if (count($parts) == 1 && $httpMethod == 'GET') { } else { for ($i = 0; $i < count($parts); $i++) { - if (strlen($parts[$i]) && $parts[$i]{0} == '{') { + if (strlen($parts[$i]) && $parts[$i][0] == '{') { $pos = $i - 1; break; } diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Restler.php b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php index c2e9b1acb73..fcb5388726c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Restler.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Restler.php @@ -533,7 +533,7 @@ class Restler extends EventDispatcher rtrim($path, '/') //remove trailing slash if found ); - if (Defaults::$useUrlBasedVersioning && strlen($path) && $path{0} == 'v') { + if (Defaults::$useUrlBasedVersioning && strlen($path) && $path[0] == 'v') { $version = intval(substr($path, 1)); if ($version && $version <= $this->apiVersion) { $this->requestedApiVersion = $version; @@ -1599,7 +1599,7 @@ class Restler extends EventDispatcher */ public function __get($name) { - if ($name{0} == '_') { + if ($name[0] == '_') { $hiddenProperty = substr($name, 1); if (isset($this->$hiddenProperty)) { return $this->$hiddenProperty; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Routes.php b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php index 73e78dc0039..999094dec4c 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Routes.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Routes.php @@ -87,7 +87,7 @@ class Routes foreach ($methods as $method) { $methodUrl = strtolower($method->getName()); //method name should not begin with _ - if ($methodUrl{0} == '_') { + if ($methodUrl[0] == '_') { continue; } $doc = $method->getDocComment(); @@ -330,7 +330,7 @@ class Routes if (!$type) { return 's'; } - switch ($type{0}) { + switch ($type[0]) { case 'i': case 'f': return 'n'; @@ -428,7 +428,7 @@ class Routes } $index = intval(substr($k, 1)); $details = $value[$httpMethod]['metadata']['param'][$index]; - if ($k{0} == 's' || strpos($k, static::pathVarTypeOf($v)) === 0) { + if ($k[0] == 's' || strpos($k, static::pathVarTypeOf($v)) === 0) { //remove the newlines $data[$details['name']] = trim($v, PHP_EOL); } else { diff --git a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php index 251262017c3..16ccdd33561 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/Scope.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/Scope.php @@ -203,7 +203,7 @@ class Scope $divider = '\\'; $qualified = false; - if ($className{0} == $divider) { + if ($className[0] == $divider) { $qualified = trim($className, $divider); } elseif (array_key_exists($className, $scope)) { $qualified = $scope[$className]; diff --git a/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php index abd4a3a73ba..435804b4469 100644 --- a/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php +++ b/htdocs/includes/restler/framework/Luracast/Restler/UI/Emmet.php @@ -356,7 +356,7 @@ class Emmet $pos = strpos($string, $f, $start); $tokens = array(); for ($i = $start; $i < $pos; $i++) { - $token = $string{$i}; + $token = $string[$i]; if (('#' == $token || '.' == $token) && (!empty($tokens) || $i == 0) ) { @@ -368,7 +368,7 @@ class Emmet $r[] = $f; } while (false != ($f = strtok(static::DELIMITERS))); for ($i = $pos; $i < strlen($string); $i++) { - $token = $string{$i}; + $token = $string[$i]; $r[] = $tokens[] = $token; } return $r; diff --git a/htdocs/projet/element.php b/htdocs/projet/element.php index 46cf12356c5..ffd083d2359 100644 --- a/htdocs/projet/element.php +++ b/htdocs/projet/element.php @@ -606,7 +606,7 @@ foreach ($listofreferent as $key => $value) $elementarray = $object->get_element_list($key, $tablename, $datefieldname, $dates, $datee, !empty($project_field)?$project_field:'fk_projet'); - if (count($elementarray)>0 && is_array($elementarray)) + if (is_array($elementarray) && count($elementarray) > 0) { $total_ht = 0; $total_ttc = 0; diff --git a/htdocs/theme/eldy/global.inc.php b/htdocs/theme/eldy/global.inc.php index fa4f751d6a6..2eebcb19a6b 100644 --- a/htdocs/theme/eldy/global.inc.php +++ b/htdocs/theme/eldy/global.inc.php @@ -1297,7 +1297,7 @@ div.fichetwothirdright { browser->layout == 'phone') { print "padding-bottom: 6px\n"; } ?> } div.fichetwothirdright div.ficheaddleft { - padding-left: 20px; + padding-: 20px; } div.fichehalfleft { browser->layout != 'phone') { print "float: ".$left.";\n"; } ?> From c7d886c918eb6b454017281396952800f76792db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 23 Nov 2020 23:25:09 +0100 Subject: [PATCH 002/175] fix status on tooltip in box last product --- htdocs/core/boxes/box_produits.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 38f9a73f57f..7f4b66f5f58 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -133,6 +133,8 @@ class box_produits extends ModeleBoxes $productstatic->type = $objp->fk_product_type; $productstatic->label = $objp->label; $productstatic->entity = $objp->entity; + $productstatic->status = $objp->tosell; + $productstatic->status_buy = $objp->tobuy; $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', From 69ea0ea791a4daa0e030aed894eae5b39eb37d80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20FRANCE?= Date: Mon, 23 Nov 2020 23:44:15 +0100 Subject: [PATCH 003/175] Update box_produits.php --- htdocs/core/boxes/box_produits.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/htdocs/core/boxes/box_produits.php b/htdocs/core/boxes/box_produits.php index 7f4b66f5f58..5b490ac32f4 100644 --- a/htdocs/core/boxes/box_produits.php +++ b/htdocs/core/boxes/box_produits.php @@ -87,6 +87,11 @@ class box_produits extends ModeleBoxes if ($user->rights->produit->lire || $user->rights->service->lire) { $sql = "SELECT p.rowid, p.label, p.ref, p.price, p.price_base_type, p.price_ttc, p.fk_product_type, p.tms, p.tosell, p.tobuy, p.fk_price_expression, p.entity"; + $sql .= ", p.accountancy_code_sell"; + $sql .= ", p.accountancy_code_sell_intra"; + $sql .= ", p.accountancy_code_sell_export"; + $sql .= ", p.accountancy_code_buy"; + $sql .= ', p.barcode'; $sql.= " FROM ".MAIN_DB_PREFIX."product as p"; $sql.= ' WHERE p.entity IN ('.getEntity($productstatic->element).')'; if (empty($user->rights->produit->lire)) $sql.=' AND p.fk_product_type != 0'; @@ -135,6 +140,11 @@ class box_produits extends ModeleBoxes $productstatic->entity = $objp->entity; $productstatic->status = $objp->tosell; $productstatic->status_buy = $objp->tobuy; + $productstatic->barcode = $objp->barcode; + $productstatic->accountancy_code_sell = $objp->accountancy_code_sell; + $productstatic->accountancy_code_sell_intra = $objp->accountancy_code_sell_intra; + $productstatic->accountancy_code_sell_export = $objp->accountancy_code_sell_export; + $productstatic->accountancy_code_buy = $objp->accountancy_code_buy; $this->info_box_contents[$line][] = array( 'td' => 'class="tdoverflowmax100 maxwidth100onsmartphone"', From 7788157b199a9c61397bb8fa582a14aa1040c2b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric?= <35066297+c3do@users.noreply.github.com> Date: Tue, 1 Dec 2020 16:55:43 +0100 Subject: [PATCH 004/175] API orders: Update demand reason on order update --- htdocs/commande/class/api_orders.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/commande/class/api_orders.class.php b/htdocs/commande/class/api_orders.class.php index 71a26eea698..2f4eb6ea996 100644 --- a/htdocs/commande/class/api_orders.class.php +++ b/htdocs/commande/class/api_orders.class.php @@ -623,6 +623,12 @@ class Orders extends DolibarrApi throw new RestException(400, 'Error while updating availability'); } + // Update demand reason + if (!empty($this->commande->demand_reason_id) && $this->commande->demand_reason_id > 0) { + if ($this->commande->demand_reason($this->commande->demand_reason_id) < 0) + throw new RestException(400, 'Error while updating demand reason'); + } + if ($this->commande->update(DolibarrApiAccess::$user) > 0) { return $this->get($id); From 3caf65ce6f9b9da799925aa52fd247252d20df55 Mon Sep 17 00:00:00 2001 From: Stephane Lesage Date: Tue, 1 Dec 2020 19:30:09 +0100 Subject: [PATCH 005/175] Create/Edit extra-field with multi-line text area for computed value --- htdocs/core/tpl/admin_extrafields_add.tpl.php | 7 +++++-- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index 6c25b5c07b5..fca100b2e07 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -180,11 +180,14 @@ $langs->load("modulebuilder"); trans("LanguageFile"); ?> + global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + + trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 191b4cf40c8..3af89dcede5 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -263,11 +263,14 @@ else trans("LanguageFile"); ?> + global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + + trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> From 1c4876b417d24e80aa380a7deaf179afc302aa5b Mon Sep 17 00:00:00 2001 From: Stephane Lesage Date: Tue, 1 Dec 2020 21:17:03 +0100 Subject: [PATCH 006/175] more transporters in llx_c_shipment_mode.sql --- htdocs/install/mysql/data/llx_c_shipment_mode.sql | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/htdocs/install/mysql/data/llx_c_shipment_mode.sql b/htdocs/install/mysql/data/llx_c_shipment_mode.sql index af3cf09f9f8..e5026f8d2f7 100644 --- a/htdocs/install/mysql/data/llx_c_shipment_mode.sql +++ b/htdocs/install/mysql/data/llx_c_shipment_mode.sql @@ -37,3 +37,9 @@ INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (6,'KIALA','KIALA','Relais Kiala','http://www.kiala.fr/tnt/delivery/{TRACKID}', 0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (7,'GLS','GLS','General Logistics Systems','https://gls-group.eu/FR/fr/suivi-colis?match={TRACKID}', 0); INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (8,'CHRONO','Chronopost','Chronopost','http://www.chronopost.fr/expedier/inputLTNumbersNoJahia.do?listeNumeros={TRACKID}', 0); +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (9,'INPERSON', 'In person at your site', NULL, NULL, 0, NULL), +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (10,'FEDEX', 'Fedex', NULL, 'https://www.fedex.com/apps/fedextrack/index.html?tracknumbers={TRACKID}', 0, NULL), +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (11,'TNT', 'TNT', NULL, 'https://www.tnt.com/express/fr_fr/site/outils-expedition/suivi.html?searchType=con&cons=={TRACKID}', 0, NULL), +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (12,'DHL', 'DHL', NULL, 'https://www.dhl.com/fr-fr/home/tracking/tracking-global-forwarding.html?submit=1&tracking-id={TRACKID}', 0, NULL), +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (13,'DPD', 'DPD', NULL, 'https://www.dpd.fr/trace/{TRACKID}', 0, NULL), +INSERT INTO llx_c_shipment_mode (rowid,code,libelle,description,tracking,active) VALUES (14,'MAINFREIGHT', 'Mainfreight', NULL, 'https://www.mainfreight.com/track?{TRACKID}', 0, NULL); From e19d0c9eeaeadd9c18b3fc39f3522c30db10a24f Mon Sep 17 00:00:00 2001 From: teleassist <30868208+teleassist@users.noreply.github.com> Date: Wed, 2 Dec 2020 09:07:24 +0100 Subject: [PATCH 007/175] Add translation Add translation for option TakeposNumpadForcePaymentLabels --- htdocs/langs/en_US/cashdesk.lang | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index 549646ab110..c0245790e76 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -122,4 +122,5 @@ GiftReceipt=Gift receipt ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first AllowDelayedPayment=Allow delayed payment PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts -WeighingScale=Weighing scale \ No newline at end of file +WeighingScale=Weighing scale +TakeposNumpadForcePaymentLabels=Show text with icons of payment buttons of numpad From 7e9a12a2f8bef1f6947522654e1470661844f054 Mon Sep 17 00:00:00 2001 From: teleassist <30868208+teleassist@users.noreply.github.com> Date: Wed, 2 Dec 2020 09:19:18 +0100 Subject: [PATCH 008/175] Add TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS Add option TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS to show labels at the bottom of payment icons of the numpad --- htdocs/takepos/admin/setup.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index 88911f10b7d..bd4c18bda0c 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -307,6 +307,13 @@ print ''; print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0); print "\n"; +// Numpad show labels for icons +print ''; +print $langs->trans('TakeposNumpadForcePaymentLabels'); +print ''; +print ajax_constantonoff("TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS", array(), $conf->entity, 0, 0, 1, 0); +print "\n"; + // Direct Payment print ''; print $langs->trans('DirectPaymentButton'); From 0730cab90fd9357477c6aebfd9728f0e5becc31b Mon Sep 17 00:00:00 2001 From: teleassist <30868208+teleassist@users.noreply.github.com> Date: Wed, 2 Dec 2020 09:38:30 +0100 Subject: [PATCH 009/175] Add class for icons labels --- htdocs/takepos/css/pos.css.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index 416980633ca..4b1f4c0bbb7 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -125,6 +125,10 @@ button.calcbutton2 { border-radius: 3px; } +button.calcbutton2 .iconwithlabel { + padding-bottom: 10px; +} + button.calcbutton3 { display: inline-block; position: relative; From dd2d5259de40db7803bdddf11c86b2b40f489d59 Mon Sep 17 00:00:00 2001 From: teleassist <30868208+teleassist@users.noreply.github.com> Date: Wed, 2 Dec 2020 09:46:53 +0100 Subject: [PATCH 010/175] Add icons labels for payment buttons Add labels to icons when TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS is set --- htdocs/takepos/pay.php | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index b0e745e2211..31acc4433c6 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -286,6 +286,7 @@ print ''; + if(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS)) $payLabel = ' iconwithlabel'; + print ''; } else { print ''; } @@ -309,6 +311,7 @@ print ''; + if(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS)) $payLabel = ' iconwithlabel'; + print ''; } else { $button = array_pop($action_buttons); print ''; @@ -333,6 +337,7 @@ print ''; + if(!empty($conf->global->TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS)) $payLabel = ' iconwithlabel'; + print ''; } else { $button = array_pop($action_buttons); print ''; From 87ee62c2ff8c503069f62b816c9b9d475d4599d6 Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Wed, 2 Dec 2020 08:54:33 +0000 Subject: [PATCH 011/175] Fixing style errors. --- htdocs/takepos/pay.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 31acc4433c6..89b936bef6c 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -298,7 +298,7 @@ print ''; } else { print ''; @@ -323,7 +323,7 @@ print ''; } else { $button = array_pop($action_buttons); @@ -349,7 +349,7 @@ print ''; } else { $button = array_pop($action_buttons); From c7a31b245815a1277853669ac7c2e788303ba73b Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Wed, 2 Dec 2020 14:42:56 +0100 Subject: [PATCH 012/175] new widget funnel of prospection --- .../core/boxes/box_funnel_of_prospection.php | 268 ++++++++++++++++++ htdocs/core/modules/modProjet.class.php | 2 + 2 files changed, 270 insertions(+) create mode 100644 htdocs/core/boxes/box_funnel_of_prospection.php diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php new file mode 100644 index 00000000000..6e63a80353c --- /dev/null +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -0,0 +1,268 @@ + + * Copyright (C) 2014 Marcos García + * Copyright (C) 2015 Frederic France + * Copyright (C) 2016 Juan José Menent + * Copyright (C) 2020 Pierre Ardoin + * + * This program is free software; you can redistribute it and/or modify + * it under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * (at your option) any later version. + * + * This program is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . + */ + +/** + * \file htdocs/core/boxes/box_funnel_of_prospection.php + * \ingroup projet + * \brief Module to show the funnel of prospection + */ +include_once DOL_DOCUMENT_ROOT . "/core/boxes/modules_boxes.php"; + +/** + * Class to manage the box to show last projet + */ +class box_funnel_of_prospection extends ModeleBoxes +{ + public $boxcode = "FunnelOfProspection"; + public $boximg = "object_projectpub"; + public $boxlabel = "BoxFunnelOfProspection"; + public $depends = array("projet"); + + /** + * @var DoliDB Database handler. + */ + public $db; + + public $param; + + 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 $user, $langs, $conf; + + // Load translation files required by the page + $langs->loadLangs(array('boxes', 'projects')); + + $this->db = $db; + + $this->hidden = !($user->rights->projet->lire); + } + + /** + * Load data for box to show them later + * + * @param int $max Maximum number of records to load + * @return void + */ + public function loadBox($max = 5) + { + global $conf; + include DOL_DOCUMENT_ROOT . '/theme/' . $conf->theme . '/theme_vars.inc.php'; + $listofoppstatus = array(); + $listofopplabel = array(); + $listofoppcode = array(); + $colorseriesstat = array(); + $sql = "SELECT cls.rowid, cls.code, cls.percent, cls.label"; + $sql .= " FROM " . MAIN_DB_PREFIX . "c_lead_status as cls"; + $sql .= " WHERE active=1"; + $resql = $this->db->query($sql); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + + while ($i < $num) { + $objp = $this->db->fetch_object($resql); + $listofoppstatus[$objp->rowid] = $objp->percent; + $listofopplabel[$objp->rowid] = $objp->label; + $listofoppcode[$objp->rowid] = $objp->code; + switch ($objp->code) { + case 'PROSP': + $colorseriesstat[$objp->rowid] = "-" . $badgeStatus0; + break; + case 'QUAL': + $colorseriesstat[$objp->rowid] = "-" . $badgeStatus1; + break; + case 'PROPO': + $colorseriesstat[$objp->rowid] = $badgeStatus1; + break; + case 'NEGO': + $colorseriesstat[$objp->rowid] = $badgeStatus4; + break; + case 'LOST': + $colorseriesstat[$objp->rowid] = $badgeStatus9; + break; + case 'WON': + $colorseriesstat[$objp->rowid] = $badgeStatus6; + break; + default: + $colorseriesstat[$objp->rowid] = $badgeStatus2; + break; + } + $i++; + } + } else dol_print_error($this->db); + + global $conf, $user, $langs; + + $this->max = $max; + + $this->info_box_head = array( + 'text' => $langs->trans("Statistics") . ' - ' . $langs->trans("OpportunitiesStatusForOpenedProjects"), + $max + ); + + if ($user->rights->projet->lire || !empty($conf->global->PROJECT_USE_OPPORTUNITIES)) { + $sql = "SELECT p.fk_opp_status as opp_status, cls.code, COUNT(p.rowid) as nb, SUM(p.opp_amount) as opp_amount, SUM(p.opp_amount * p.opp_percent) as ponderated_opp_amount"; + $sql .= " FROM " . MAIN_DB_PREFIX . "projet as p, " . MAIN_DB_PREFIX . "c_lead_status as cls"; + $sql .= " WHERE p.entity IN (" . getEntity('project') . ")"; + $sql .= " AND p.fk_opp_status = cls.rowid"; + $sql .= " AND p.fk_statut = 1"; // Opend projects only + $sql .= " GROUP BY p.fk_opp_status, cls.code"; + $resql = $this->db->query($sql); + + $form = new Form($ths->db); + if ($resql) { + $num = $this->db->num_rows($resql); + $i = 0; + + $totalnb = 0; + $totaloppnb = 0; + $totalamount = 0; + $ponderated_opp_amount = 0; + $valsnb = array(); + $valsamount = array(); + $dataseries = array(); + + while ($i < $num) { + $obj = $this->db->fetch_object($resql); + if ($obj) { + $valsnb[$obj->opp_status] = $obj->nb; + $valsamount[$obj->opp_status] = $obj->opp_amount; + $totalnb += $obj->nb; + if ($obj->opp_status) $totaloppnb += $obj->nb; + if (!in_array($obj->code, array('WON', 'LOST'))) { + $totalamount += $obj->opp_amount; + $ponderated_opp_amount += $obj->ponderated_opp_amount; + } + } + $i++; + } + $this->db->free($resql); + $ponderated_opp_amount = $ponderated_opp_amount / 100; + + $stringtoprint = ''; + $stringtoprint .= '
'; + $listofstatus = array_keys($listofoppstatus); + foreach ($listofstatus as $status) { + $labelStatus = ''; + + $code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code'); + if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code); + if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; + + $dataseries[] = array($labelStatus, (isset($valsamount[$status]) ? (float) $valsamount[$status] : 0)); + if (!$conf->use_javascript_ajax) { + $stringtoprint .= ''; + $stringtoprint .= '' . $labelStatus . ''; + $stringtoprint .= '' . price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency) . ''; + $stringtoprint .= "\n"; + } + } + if ($conf->use_javascript_ajax) { + include_once DOL_DOCUMENT_ROOT . '/core/class/dolgraph.class.php'; + $dolgraph = new DolGraph(); + $dolgraph->SetData($dataseries); + $dolgraph->SetDataColor(array_values($colorseriesstat)); + $dolgraph->setShowLegend(2); + $dolgraph->setShowPercent(1); + $dolgraph->SetType(array('pie')); + $dolgraph->SetHeight('200'); + $dolgraph->draw('idgraphstatus'); + $stringtoprint .= $dolgraph->show($totaloppnb ? 0 : 1); + } + $stringtoprint .= '
'; + + $line = 0; + $this->info_box_contents[$line][] = array( + 'tr' => 'class="nohover left "', + 'text' => '' + ); + $this->info_box_contents[$line][] = array( + 'tr' => 'class="nohover left "', + 'text' => '' + ); + $line++; + $this->info_box_contents[$line][] = array( + 'tr' => '', + 'td' => 'class="center nopaddingleftimp nopaddingrightimp" colspan="2"', + 'text' => $stringtoprint + ); + $line++; + $this->info_box_contents[$line][] = array( + 'tr' => 'class="oddeven"', + 'td' => 'class="left "', + 'maxlength' => 500, + 'text' => $langs->trans("OpportunityTotalAmount") . ' (' . $langs->trans("WonLostExcluded") . ')' + ); + $this->info_box_contents[$line][] = array( + 'tr' => 'class="oddeven"', + 'td' => 'class="right "', + 'maxlength' => 500, + 'text' => price($totalamount, 0, '', 1, -1, -1, $conf->currency) + ); + $line++; + $this->info_box_contents[$line][] = array( + 'tr' => 'class="oddeven"', + 'td' => 'class="left "', + 'maxlength' => 500, + 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount").' ('.$langs->trans("WonLostExcluded").')', $langs->trans("OpportunityPonderatedAmountDesc"), 1) + + ); + $this->info_box_contents[$line][] = array( + 'td' => 'class="right "', + 'maxlength' => 500, + 'text' => price(price2num($ponderated_opp_amount, 'MT'), 0, '', 1, -1, -1, $conf->currency) + ); + } else { + $this->info_box_contents[0][0] = array( + 'td' => 'class="center opacitymedium"', + 'text' => $langs->trans("NoRecordedCustomers") + ); + } + } else { + $this->info_box_contents[0][0] = array( + 'td' => '', + '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 $stringtoprint .=, 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); + } +} diff --git a/htdocs/core/modules/modProjet.class.php b/htdocs/core/modules/modProjet.class.php index af6398c7a6d..fcd3e2e1e22 100644 --- a/htdocs/core/modules/modProjet.class.php +++ b/htdocs/core/modules/modProjet.class.php @@ -146,6 +146,8 @@ class modProjet extends DolibarrModules $r++; $this->boxes[$r][1] = "box_validated_projects.php"; $r++; + $this->boxes[$r][1] = "box_funnel_of_prospection.php"; + $r++; // Permissions $this->rights = array(); From a2dca42965f1f64c6d32699bd7302d1863b71d7e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Dec 2020 18:55:55 +0100 Subject: [PATCH 013/175] Revert "Create/Edit extra-field with multi-line text area for computed value" --- htdocs/core/tpl/admin_extrafields_add.tpl.php | 7 ++----- htdocs/core/tpl/admin_extrafields_edit.tpl.php | 7 ++----- 2 files changed, 4 insertions(+), 10 deletions(-) diff --git a/htdocs/core/tpl/admin_extrafields_add.tpl.php b/htdocs/core/tpl/admin_extrafields_add.tpl.php index fca100b2e07..6c25b5c07b5 100644 --- a/htdocs/core/tpl/admin_extrafields_add.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_add.tpl.php @@ -180,14 +180,11 @@ $langs->load("modulebuilder"); trans("LanguageFile"); ?> - global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> - - trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> diff --git a/htdocs/core/tpl/admin_extrafields_edit.tpl.php b/htdocs/core/tpl/admin_extrafields_edit.tpl.php index 3af89dcede5..191b4cf40c8 100644 --- a/htdocs/core/tpl/admin_extrafields_edit.tpl.php +++ b/htdocs/core/tpl/admin_extrafields_edit.tpl.php @@ -263,14 +263,11 @@ else trans("LanguageFile"); ?> - global->MAIN_STORE_COMPUTED_EXTRAFIELDS)) { ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc"), 1, 'help', '', 0, 2, 'tooltipcompute'); ?> - textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> + textwithpicto($langs->trans("ComputedFormula"), $langs->trans("ComputedFormulaDesc")).$form->textwithpicto($langs->trans("Computedpersistent"), $langs->trans("ComputedpersistentDesc"), 1, 'warning'); ?> - - trans("DefaultValue").' ('.$langs->trans("Database").')'; ?> From bc1dc1e9f01aafb109858533c54c3a67578bf92a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Dec 2020 19:34:04 +0100 Subject: [PATCH 014/175] FIX #15590 manually --- htdocs/core/modules/modProduct.class.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/modProduct.class.php b/htdocs/core/modules/modProduct.class.php index 87f11decb5e..b029448cd58 100644 --- a/htdocs/core/modules/modProduct.class.php +++ b/htdocs/core/modules/modProduct.class.php @@ -194,7 +194,7 @@ class modProduct extends DolibarrModules ); if (is_object($mysoc) && $mysoc->useNPR()) $this->export_fields_array[$r]['p.recuperableonly'] = 'NPR'; if (!empty($conf->fournisseur->enabled) || !empty($conf->margin->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.cost_price'=>'CostPrice')); - if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); + if (!empty($conf->stock->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.tobatch'=>'ManageLotSerial', 'p.stock'=>'Stock', 'p.seuil_stock_alerte'=>'StockLimit', 'p.desiredstock'=>'DesiredStock', 'p.pmp'=>'PMPValue')); if (!empty($conf->barcode->enabled)) $this->export_fields_array[$r] = array_merge($this->export_fields_array[$r], array('p.barcode'=>'BarCode')); $keyforselect = 'product'; $keyforelement = 'product'; $keyforaliasextra = 'extra'; include DOL_DOCUMENT_ROOT.'/core/extrafieldsinexport.inc.php'; @@ -216,7 +216,7 @@ class modProduct extends DolibarrModules 'p.price_base_type'=>"Text", 'p.price'=>"Numeric", 'p.price_ttc'=>"Numeric", 'p.tva_tx'=>'Numeric', 'p.datec'=>'Date', 'p.tms'=>'Date' ); - if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); + if (!empty($conf->stock->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.tobatch'=>'Numeric', 'p.stock'=>'Numeric', 'p.seuil_stock_alerte'=>'Numeric', 'p.desiredstock'=>'Numeric', 'p.pmp'=>'Numeric', 'p.cost_price'=>'Numeric')); if (!empty($conf->barcode->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('p.barcode'=>'Text')); if (!empty($conf->fournisseur->enabled)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('s.nom'=>'Text', 'pf.ref_fourn'=>'Text', 'pf.unitprice'=>'Numeric', 'pf.quantity'=>'Numeric', 'pf.remise_percent'=>'Numeric', 'pf.delivery_time_days'=>'Numeric')); if (!empty($conf->global->MAIN_MULTILANGS)) $this->export_TypeFields_array[$r] = array_merge($this->export_TypeFields_array[$r], array('l.lang'=>'Text', 'l.label'=>'Text', 'l.description'=>'Text', 'l.note'=>'Text')); @@ -559,6 +559,7 @@ class modProduct extends DolibarrModules ); //clauses copied from import_fields_array if (!empty($conf->stock->enabled)) $import_sample = array_merge($import_sample, array( + 'p.tobatch'=>"0 (don't use) / 1 (use batch/serial number)", 'p.seuil_stock_alerte' => '', 'p.pmp' => '0', 'p.desiredstock' => '' From 17d5bb5cd450f659634dbf4e6e79d03a5cd9b8ea Mon Sep 17 00:00:00 2001 From: Florian Mortgat Date: Wed, 2 Dec 2020 22:25:08 +0100 Subject: [PATCH 015/175] FIX 12.0 - error when displaying lines on order after adding a line if both MAIN_MULTILANGS and MAIN_DISABLE_PDF_AUTOUPDATE are activated --- htdocs/commande/card.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 8ba4620b108..2c5157ff228 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -966,6 +966,8 @@ if (empty($reshook)) } $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); + } else { + $object->fetch_thirdparty(); } unset($_POST['prod_entry_mode']); From 62e3b5d214a0e559ecd0acf6c452969dcab9b1e6 Mon Sep 17 00:00:00 2001 From: teleassist Date: Thu, 3 Dec 2020 10:04:21 +0100 Subject: [PATCH 016/175] Revert "Add translation" This reverts commit e19d0c9eeaeadd9c18b3fc39f3522c30db10a24f. --- htdocs/langs/en_US/cashdesk.lang | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/htdocs/langs/en_US/cashdesk.lang b/htdocs/langs/en_US/cashdesk.lang index c0245790e76..549646ab110 100644 --- a/htdocs/langs/en_US/cashdesk.lang +++ b/htdocs/langs/en_US/cashdesk.lang @@ -122,5 +122,4 @@ GiftReceipt=Gift receipt ModuleReceiptPrinterMustBeEnabled=Module Receipt printer must have been enabled first AllowDelayedPayment=Allow delayed payment PrintPaymentMethodOnReceipts=Print payment method on tickets|receipts -WeighingScale=Weighing scale -TakeposNumpadForcePaymentLabels=Show text with icons of payment buttons of numpad +WeighingScale=Weighing scale \ No newline at end of file From 450b04c1ad14131d1185b1d230042ed453218349 Mon Sep 17 00:00:00 2001 From: teleassist Date: Thu, 3 Dec 2020 10:04:28 +0100 Subject: [PATCH 017/175] Revert "Add TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS" This reverts commit 7e9a12a2f8bef1f6947522654e1470661844f054. --- htdocs/takepos/admin/setup.php | 7 ------- 1 file changed, 7 deletions(-) diff --git a/htdocs/takepos/admin/setup.php b/htdocs/takepos/admin/setup.php index bd4c18bda0c..88911f10b7d 100644 --- a/htdocs/takepos/admin/setup.php +++ b/htdocs/takepos/admin/setup.php @@ -307,13 +307,6 @@ print ''; print ajax_constantonoff("TAKEPOS_NUMPAD_USE_PAYMENT_ICON", array(), $conf->entity, 0, 0, 1, 0); print "\n"; -// Numpad show labels for icons -print ''; -print $langs->trans('TakeposNumpadForcePaymentLabels'); -print ''; -print ajax_constantonoff("TAKEPOS_NUMPAD_FORCE_PAYMENT_ICONS_LABELS", array(), $conf->entity, 0, 0, 1, 0); -print "\n"; - // Direct Payment print ''; print $langs->trans('DirectPaymentButton'); From 032116b23511601561fce10f67f797dc543b576b Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Thu, 3 Dec 2020 10:11:16 +0100 Subject: [PATCH 018/175] changes to not diplay won and lost and add on migration --- .../core/boxes/box_funnel_of_prospection.php | 38 ++++++++----------- .../install/mysql/migration/12.0.0-13.0.0.sql | 3 +- htdocs/langs/en_US/boxes.lang | 1 + 3 files changed, 19 insertions(+), 23 deletions(-) diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php index 6e63a80353c..7062509a13b 100644 --- a/htdocs/core/boxes/box_funnel_of_prospection.php +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -33,7 +33,7 @@ class box_funnel_of_prospection extends ModeleBoxes { public $boxcode = "FunnelOfProspection"; public $boximg = "object_projectpub"; - public $boxlabel = "BoxFunnelOfProspection"; + public $boxlabel = "BoxTitleFunnelOfProspection"; public $depends = array("projet"); /** @@ -104,12 +104,6 @@ class box_funnel_of_prospection extends ModeleBoxes case 'NEGO': $colorseriesstat[$objp->rowid] = $badgeStatus4; break; - case 'LOST': - $colorseriesstat[$objp->rowid] = $badgeStatus9; - break; - case 'WON': - $colorseriesstat[$objp->rowid] = $badgeStatus6; - break; default: $colorseriesstat[$objp->rowid] = $badgeStatus2; break; @@ -133,6 +127,7 @@ class box_funnel_of_prospection extends ModeleBoxes $sql .= " WHERE p.entity IN (" . getEntity('project') . ")"; $sql .= " AND p.fk_opp_status = cls.rowid"; $sql .= " AND p.fk_statut = 1"; // Opend projects only + $sql .= " AND cls.code NOT IN ('WON', 'LOST')"; $sql .= " GROUP BY p.fk_opp_status, cls.code"; $resql = $this->db->query($sql); @@ -156,10 +151,8 @@ class box_funnel_of_prospection extends ModeleBoxes $valsamount[$obj->opp_status] = $obj->opp_amount; $totalnb += $obj->nb; if ($obj->opp_status) $totaloppnb += $obj->nb; - if (!in_array($obj->code, array('WON', 'LOST'))) { - $totalamount += $obj->opp_amount; - $ponderated_opp_amount += $obj->ponderated_opp_amount; - } + $totalamount += $obj->opp_amount; + $ponderated_opp_amount += $obj->ponderated_opp_amount; } $i++; } @@ -171,17 +164,18 @@ class box_funnel_of_prospection extends ModeleBoxes $listofstatus = array_keys($listofoppstatus); foreach ($listofstatus as $status) { $labelStatus = ''; + if ($status != 7 && $status != 6) { + $code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code'); + if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code); + if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; - $code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code'); - if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code); - if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; - - $dataseries[] = array($labelStatus, (isset($valsamount[$status]) ? (float) $valsamount[$status] : 0)); - if (!$conf->use_javascript_ajax) { - $stringtoprint .= ''; - $stringtoprint .= '' . $labelStatus . ''; - $stringtoprint .= '' . price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency) . ''; - $stringtoprint .= "\n"; + $dataseries[] = array($labelStatus, (isset($valsamount[$status]) ? (float) $valsamount[$status] : 0)); + if (!$conf->use_javascript_ajax) { + $stringtoprint .= ''; + $stringtoprint .= '' . $labelStatus . ''; + $stringtoprint .= '' . price((isset($valsamount[$status]) ? (float) $valsamount[$status] : 0), 0, '', 1, -1, -1, $conf->currency) . ''; + $stringtoprint .= "\n"; + } } } if ($conf->use_javascript_ajax) { @@ -231,7 +225,7 @@ class box_funnel_of_prospection extends ModeleBoxes 'tr' => 'class="oddeven"', 'td' => 'class="left "', 'maxlength' => 500, - 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount").' ('.$langs->trans("WonLostExcluded").')', $langs->trans("OpportunityPonderatedAmountDesc"), 1) + 'text' => $form->textwithpicto($langs->trans("OpportunityPonderatedAmount") . ' (' . $langs->trans("WonLostExcluded") . ')', $langs->trans("OpportunityPonderatedAmountDesc"), 1) ); $this->info_box_contents[$line][] = array( diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index 18802301e5a..7b5fc0aab22 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -439,7 +439,6 @@ INSERT INTO llx_c_product_nature (code, label, active) VALUES (1, 'Finished', 1) ALTER TABLE llx_product MODIFY COLUMN finished tinyint DEFAULT NULL; ALTER TABLE llx_product ADD CONSTRAINT fk_product_finished FOREIGN KEY (finished) REFERENCES llx_c_product_nature (code); - -- MIGRATION TO DO AFTER RENAMING AN OBJECT -- drop constraint @@ -542,3 +541,5 @@ CREATE TABLE llx_session( user_agent varchar(128) NULL )ENGINE=innodb; +INSERT INTO llx_boxes_def(file,entity) VALUES ('box_funnel_of_prospection.php',1); +INSERT INTO llx_boxes (box_id, position, box_order, maxline, params) VALUES ((SELECT b.rowid FROM llx_boxes_def as b WHERE file = 'box_funnel_of_prospection.php'), 0, 0, NULL, NULL); diff --git a/htdocs/langs/en_US/boxes.lang b/htdocs/langs/en_US/boxes.lang index 75f8eb14f49..40fdc11ba32 100644 --- a/htdocs/langs/en_US/boxes.lang +++ b/htdocs/langs/en_US/boxes.lang @@ -50,6 +50,7 @@ BoxTitleLastOutstandingBillReached=Latest %s customers with maximum outstanding BoxGlobalActivity=Global activity (invoices, proposals, orders) BoxGoodCustomers=Good customers BoxTitleGoodCustomers=%s Good customers +BoxTitleFunnelOfProspection=Amount of prospection by status FailedToRefreshDataInfoNotUpToDate=Failed to refresh RSS flux. Latest successful refresh date: %s LastRefreshDate=Latest refresh date NoRecordedBookmarks=No bookmarks defined. From f6adb6ae5530cda5e1e1910fbdf018de41defda7 Mon Sep 17 00:00:00 2001 From: teleassist <30868208+teleassist@users.noreply.github.com> Date: Thu, 3 Dec 2020 10:12:03 +0100 Subject: [PATCH 019/175] Update pay.php Always show labels with payment icons --- htdocs/takepos/pay.php | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index 89b936bef6c..ab621a964b5 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -286,7 +286,6 @@ print ''; + print ''; } else { print ''; } @@ -311,7 +309,6 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; @@ -337,7 +333,6 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; From e08f6aeb2be50bd115cee54cf0e17687613aa556 Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Thu, 3 Dec 2020 11:00:29 +0100 Subject: [PATCH 020/175] Fix #15383 --- htdocs/core/boxes/box_funnel_of_prospection.php | 13 +++++++++---- htdocs/install/mysql/migration/12.0.0-13.0.0.sql | 1 - 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php index 7062509a13b..fa65e696fa6 100644 --- a/htdocs/core/boxes/box_funnel_of_prospection.php +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -104,6 +104,9 @@ class box_funnel_of_prospection extends ModeleBoxes case 'NEGO': $colorseriesstat[$objp->rowid] = $badgeStatus4; break; + case 'WON': + $colorseriesstat[$objp->rowid] = $badgeStatus6; + break; default: $colorseriesstat[$objp->rowid] = $badgeStatus2; break; @@ -127,7 +130,7 @@ class box_funnel_of_prospection extends ModeleBoxes $sql .= " WHERE p.entity IN (" . getEntity('project') . ")"; $sql .= " AND p.fk_opp_status = cls.rowid"; $sql .= " AND p.fk_statut = 1"; // Opend projects only - $sql .= " AND cls.code NOT IN ('WON', 'LOST')"; + $sql .= " AND cls.code NOT IN ('LOST')"; $sql .= " GROUP BY p.fk_opp_status, cls.code"; $resql = $this->db->query($sql); @@ -151,8 +154,10 @@ class box_funnel_of_prospection extends ModeleBoxes $valsamount[$obj->opp_status] = $obj->opp_amount; $totalnb += $obj->nb; if ($obj->opp_status) $totaloppnb += $obj->nb; - $totalamount += $obj->opp_amount; - $ponderated_opp_amount += $obj->ponderated_opp_amount; + if (!in_array($obj->code, array('WON', 'LOST'))) { + $totalamount += $obj->opp_amount; + $ponderated_opp_amount += $obj->ponderated_opp_amount; + } } $i++; } @@ -164,7 +169,7 @@ class box_funnel_of_prospection extends ModeleBoxes $listofstatus = array_keys($listofoppstatus); foreach ($listofstatus as $status) { $labelStatus = ''; - if ($status != 7 && $status != 6) { + if ($status != 7) { $code = dol_getIdFromCode($this->db, $status, 'c_lead_status', 'rowid', 'code'); if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code); if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; diff --git a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql index fc8ac7ce102..5865a3e7919 100644 --- a/htdocs/install/mysql/migration/12.0.0-13.0.0.sql +++ b/htdocs/install/mysql/migration/12.0.0-13.0.0.sql @@ -544,7 +544,6 @@ CREATE TABLE llx_session( INSERT INTO llx_boxes_def(file,entity) VALUES ('box_funnel_of_prospection.php',1); -INSERT INTO llx_boxes (box_id, position, box_order, maxline, params) VALUES ((SELECT b.rowid FROM llx_boxes_def as b WHERE file = 'box_funnel_of_prospection.php'), 0, 0, NULL, NULL); INSERT INTO llx_boxes_def(file, entity) VALUES ('box_customers_outstanding_bill_reached.php', 1); From 3d21a00f2ba289bc5d6876c951e5ce79ae873e9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 11:03:02 +0100 Subject: [PATCH 021/175] Removed not working code --- htdocs/salaries/list.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/salaries/list.php b/htdocs/salaries/list.php index 135e2f53080..26477900be2 100644 --- a/htdocs/salaries/list.php +++ b/htdocs/salaries/list.php @@ -266,7 +266,7 @@ include DOL_DOCUMENT_ROOT.'/core/tpl/extrafields_list_search_param.tpl.php'; // List of mass actions available $arrayofmassactions = array( //'presend'=>$langs->trans("SendByMail"), - 'buildsepa'=>$langs->trans("BuildSepa"), + //'buildsepa'=>$langs->trans("BuildSepa"), // TODO ); //if ($permissiontodelete) $arrayofmassactions['predelete'] = ''.$langs->trans("Delete"); if (GETPOST('nomassaction', 'int') || in_array($massaction, array('presend', 'predelete'))) $arrayofmassactions = array(); From 28ac9764389ca5e6b68192181dc3367b534d91dd Mon Sep 17 00:00:00 2001 From: lmarcouiller Date: Thu, 3 Dec 2020 11:14:58 +0100 Subject: [PATCH 022/175] Show won on graph --- htdocs/core/boxes/box_funnel_of_prospection.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/boxes/box_funnel_of_prospection.php b/htdocs/core/boxes/box_funnel_of_prospection.php index fa65e696fa6..c4cebfcf68a 100644 --- a/htdocs/core/boxes/box_funnel_of_prospection.php +++ b/htdocs/core/boxes/box_funnel_of_prospection.php @@ -174,7 +174,7 @@ class box_funnel_of_prospection extends ModeleBoxes if ($code) $labelStatus = $langs->transnoentitiesnoconv("OppStatus" . $code); if (empty($labelStatus)) $labelStatus = $listofopplabel[$status]; - $dataseries[] = array($labelStatus, (isset($valsamount[$status]) ? (float) $valsamount[$status] : 0)); + $dataseries[] = array($labelStatus,(isset($valsamount[$status]) ? (float) $valsamount[$status] : 0)); if (!$conf->use_javascript_ajax) { $stringtoprint .= ''; $stringtoprint .= '' . $labelStatus . ''; @@ -188,6 +188,7 @@ class box_funnel_of_prospection extends ModeleBoxes $dolgraph = new DolGraph(); $dolgraph->SetData($dataseries); $dolgraph->SetDataColor(array_values($colorseriesstat)); + //$dolgraph->SetLegend(array('PROSP',$dataseries['PROSP'])); $dolgraph->setShowLegend(2); $dolgraph->setShowPercent(1); $dolgraph->SetType(array('pie')); From 748630eb2590588bd853d62d777cd2a6ca13f63e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 11:15:06 +0100 Subject: [PATCH 023/175] FIX Better error message when IMAP connection fails --- htdocs/admin/emailcollector_card.php | 15 --------------- 1 file changed, 15 deletions(-) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index fd3361515fb..11f5dcd3bc3 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -223,21 +223,6 @@ $help_url = "EN:Module_EMail_Collector|FR:Module_Collecteur_de_courrier_électro llxHeader('', 'EmailCollector', $help_url); -// Example : Adding jquery code -print ''; - // Part to create if ($action == 'create') { print load_fiche_titre($langs->trans("NewEmailCollector", $langs->transnoentitiesnoconv("EmailCollector"))); From 0fd865d8afb6b64fcfe8f926a2131ffba47c9fb5 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 11:16:02 +0100 Subject: [PATCH 024/175] FIX Better error message with IMAP when connection fails --- htdocs/admin/emailcollector_card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index 80161eaadc6..b7c7e4abca2 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -448,6 +448,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea if (!$connection) { $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; + $morehtml .= '
'.imap_last_error(); } else { From b324425db815d4a90a7f11c43d7f241a5b39c2e0 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 11:19:41 +0100 Subject: [PATCH 025/175] code comment --- htdocs/admin/emailcollector_card.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/admin/emailcollector_card.php b/htdocs/admin/emailcollector_card.php index b7c7e4abca2..07cd5be7b78 100644 --- a/htdocs/admin/emailcollector_card.php +++ b/htdocs/admin/emailcollector_card.php @@ -449,6 +449,7 @@ if ($object->id > 0 && (empty($action) || ($action != 'edit' && $action != 'crea { $morehtml .= 'Failed to open IMAP connection '.$connectstringsource; $morehtml .= '
'.imap_last_error(); + //var_dump(imap_errors()) } else { From 1ec3d4cfdf4699892ad61cb6cfedbe3b82a99492 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 13:19:35 +0100 Subject: [PATCH 026/175] CSS --- htdocs/admin/agenda_other.php | 2 +- htdocs/admin/bank.php | 2 +- htdocs/admin/bom.php | 2 +- htdocs/admin/commande.php | 2 +- htdocs/admin/contract.php | 2 +- htdocs/admin/delivery.php | 2 +- htdocs/admin/expedition.php | 2 +- htdocs/admin/expensereport.php | 2 +- htdocs/admin/facture.php | 2 +- htdocs/admin/fichinter.php | 2 +- htdocs/admin/holiday.php | 2 +- htdocs/admin/mrp.php | 2 +- htdocs/admin/paymentbybanktransfer.php | 2 +- htdocs/admin/prelevement.php | 2 +- htdocs/admin/propal.php | 2 +- htdocs/admin/reception_setup.php | 2 +- htdocs/admin/stock.php | 2 +- htdocs/admin/supplier_invoice.php | 2 +- htdocs/admin/supplier_order.php | 2 +- htdocs/admin/supplier_payment.php | 2 +- htdocs/admin/supplier_proposal.php | 2 +- htdocs/admin/user.php | 2 +- htdocs/admin/usergroup.php | 2 +- htdocs/core/lib/functions.lib.php | 17 +++++++++-------- .../expedition/doc/pdf_espadon.modules.php | 4 ++-- .../expedition/doc/pdf_merou.modules.php | 6 +++--- .../expedition/doc/pdf_rouget.modules.php | 4 ++-- htdocs/modulebuilder/template/admin/setup.php | 2 +- 28 files changed, 40 insertions(+), 39 deletions(-) diff --git a/htdocs/admin/agenda_other.php b/htdocs/admin/agenda_other.php index 2ffbf15d7ce..c1f77f4995e 100644 --- a/htdocs/admin/agenda_other.php +++ b/htdocs/admin/agenda_other.php @@ -292,7 +292,7 @@ if ($conf->global->MAIN_FEATURES_LEVEL >= 2) print $form->textwithpicto('', $htmltooltip, 1, 0); print ''; print ''; - print ''.img_object($langs->trans("Preview"), 'order').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; print ''; print "\n"; diff --git a/htdocs/admin/bank.php b/htdocs/admin/bank.php index 88babe27385..d21ffdb1630 100644 --- a/htdocs/admin/bank.php +++ b/htdocs/admin/bank.php @@ -391,7 +391,7 @@ foreach ($dirmodels as $reldir) { // Preview print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/bom.php b/htdocs/admin/bom.php index 19ca39c21f3..34c3af89c53 100644 --- a/htdocs/admin/bom.php +++ b/htdocs/admin/bom.php @@ -414,7 +414,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/commande.php b/htdocs/admin/commande.php index daf015f68eb..25a220e8e2d 100644 --- a/htdocs/admin/commande.php +++ b/htdocs/admin/commande.php @@ -484,7 +484,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/contract.php b/htdocs/admin/contract.php index 517a547cea6..b5e4c0ddf45 100644 --- a/htdocs/admin/contract.php +++ b/htdocs/admin/contract.php @@ -414,7 +414,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'contract').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/delivery.php b/htdocs/admin/delivery.php index 3707c395437..b1606268205 100644 --- a/htdocs/admin/delivery.php +++ b/htdocs/admin/delivery.php @@ -398,7 +398,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'sending').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/expedition.php b/htdocs/admin/expedition.php index 9e65af2d06c..9a09c62b818 100644 --- a/htdocs/admin/expedition.php +++ b/htdocs/admin/expedition.php @@ -415,7 +415,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'sending').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/expensereport.php b/htdocs/admin/expensereport.php index 8ffd4ab58c0..a93f5c3c608 100644 --- a/htdocs/admin/expensereport.php +++ b/htdocs/admin/expensereport.php @@ -411,7 +411,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'intervention').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/facture.php b/htdocs/admin/facture.php index 7da8044ee07..00dcb7c3180 100644 --- a/htdocs/admin/facture.php +++ b/htdocs/admin/facture.php @@ -549,7 +549,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/fichinter.php b/htdocs/admin/fichinter.php index 3d9e23cf61c..e3178d946a0 100644 --- a/htdocs/admin/fichinter.php +++ b/htdocs/admin/fichinter.php @@ -467,7 +467,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'intervention').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/holiday.php b/htdocs/admin/holiday.php index 9a3845ace5b..eca8319d661 100644 --- a/htdocs/admin/holiday.php +++ b/htdocs/admin/holiday.php @@ -426,7 +426,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'contract').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/mrp.php b/htdocs/admin/mrp.php index 36e5eaf1efc..af6210eee1f 100644 --- a/htdocs/admin/mrp.php +++ b/htdocs/admin/mrp.php @@ -415,7 +415,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/paymentbybanktransfer.php b/htdocs/admin/paymentbybanktransfer.php index 0ea8db95aec..cd0db2a1def 100644 --- a/htdocs/admin/paymentbybanktransfer.php +++ b/htdocs/admin/paymentbybanktransfer.php @@ -340,7 +340,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"),'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { diff --git a/htdocs/admin/prelevement.php b/htdocs/admin/prelevement.php index 97a45c77a42..72e116ab3a7 100644 --- a/htdocs/admin/prelevement.php +++ b/htdocs/admin/prelevement.php @@ -347,7 +347,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"),'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { diff --git a/htdocs/admin/propal.php b/htdocs/admin/propal.php index e88ed6a4864..78c22e7b397 100644 --- a/htdocs/admin/propal.php +++ b/htdocs/admin/propal.php @@ -444,7 +444,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/reception_setup.php b/htdocs/admin/reception_setup.php index c095994832d..5da0dd84630 100644 --- a/htdocs/admin/reception_setup.php +++ b/htdocs/admin/reception_setup.php @@ -424,7 +424,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'reception').''; + print 'scandir.'&label='.urlencode($module->name).'">'.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/stock.php b/htdocs/admin/stock.php index 134aeb663b4..031b0ef102f 100644 --- a/htdocs/admin/stock.php +++ b/htdocs/admin/stock.php @@ -638,7 +638,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/supplier_invoice.php b/htdocs/admin/supplier_invoice.php index 384deec0b62..8df357df07e 100644 --- a/htdocs/admin/supplier_invoice.php +++ b/htdocs/admin/supplier_invoice.php @@ -426,7 +426,7 @@ foreach ($dirmodels as $reldir) print $form->textwithpicto('', $htmltooltip, 1, 0); print ''; print ''; - print ''.img_object($langs->trans("Preview"), 'order').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; print ''; print "\n"; diff --git a/htdocs/admin/supplier_order.php b/htdocs/admin/supplier_order.php index 0125bb58fdb..e2433c5348b 100644 --- a/htdocs/admin/supplier_order.php +++ b/htdocs/admin/supplier_order.php @@ -439,7 +439,7 @@ foreach ($dirmodels as $reldir) print $form->textwithpicto('', $htmltooltip, 1, 0); print ''; print ''; - print ''.img_object($langs->trans("Preview"), 'order').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; print ''; print "\n"; diff --git a/htdocs/admin/supplier_payment.php b/htdocs/admin/supplier_payment.php index ab3093a02f7..3408496de31 100644 --- a/htdocs/admin/supplier_payment.php +++ b/htdocs/admin/supplier_payment.php @@ -412,7 +412,7 @@ foreach ($dirmodels as $reldir) print $form->textwithpicto('', $htmltooltip, 1, 0); print ''; print ''; - print ''.img_object($langs->trans("Preview"), 'order').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; print ''; print "\n"; diff --git a/htdocs/admin/supplier_proposal.php b/htdocs/admin/supplier_proposal.php index 77a78fe0aa8..0855a41cf8f 100644 --- a/htdocs/admin/supplier_proposal.php +++ b/htdocs/admin/supplier_proposal.php @@ -437,7 +437,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'bill').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/user.php b/htdocs/admin/user.php index ea39cc1dce9..ea6cdf2b6f8 100644 --- a/htdocs/admin/user.php +++ b/htdocs/admin/user.php @@ -312,7 +312,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'contract').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/admin/usergroup.php b/htdocs/admin/usergroup.php index dd12584b276..0725cc83f18 100644 --- a/htdocs/admin/usergroup.php +++ b/htdocs/admin/usergroup.php @@ -241,7 +241,7 @@ foreach ($dirmodels as $reldir) print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'contract').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 7523d2f5d77..1143766f451 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -3221,14 +3221,15 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'object_cash-register', 'object_company', 'object_contact', 'object_contract', 'object_donation', 'object_dynamicprice', 'object_globe', 'object_holiday', 'object_hrm', 'object_invoice', 'object_intervention', 'object_label', 'object_margin', 'object_money-bill-alt', 'object_multicurrency', 'object_order', 'object_payment', - 'object_lot', 'object_mrp', 'object_payment', 'object_product', 'object_propal', - 'object_other', 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', + 'object_lot', 'object_mrp', 'object_other', + 'object_payment', 'object_pdf', 'object_product', 'object_propal', + 'object_paragraph', 'object_poll', 'object_printer', 'object_project', 'object_projectpub', 'object_propal', 'object_resource', 'object_rss', 'object_projecttask', 'object_recruitmentjobposition', 'object_recruitmentcandidature', 'object_shipment', 'object_share-alt', 'object_supplier_invoice', 'object_supplier_invoicea', 'object_supplier_invoiced', 'object_supplier_order', 'object_supplier_proposal', 'object_service', 'object_stock', 'object_technic', 'object_ticket', 'object_trip', 'object_user', 'object_group', 'object_member', 'object_phoning', 'object_phoning_mobile', 'object_phoning_fax', 'object_email', 'object_website', 'off', 'on', 'order', - 'paiment', 'play', 'playdisabled', 'previous', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', + 'paiment', 'play', 'pdf', 'playdisabled', 'previous', 'poll', 'printer', 'product', 'propal', 'projecttask', 'stock', 'resize', 'service', 'stats', 'trip', 'setup', 'share-alt', 'sign-out', 'split', 'stripe-s', 'switch_off', 'switch_on', 'tools', 'unlink', 'uparrow', 'user', 'vcard', 'wrench', 'jabber', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'youtube', 'google-plus-g', 'whatsapp', 'chevron-left', 'chevron-right', 'chevron-down', 'chevron-top', 'commercial', 'companies', @@ -3240,18 +3241,18 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'title_setup', 'title_accountancy', 'title_bank', 'title_hrm', 'title_agenda' ) )) { + $pictowithouttext = str_replace('object_', '', $pictowithouttext); + $fakey = $pictowithouttext; $facolor = ''; $fasize = ''; $fa = 'fas'; - if (in_array($pictowithouttext, array('clock', 'object_generic', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) { + if (in_array($pictowithouttext, array('clock', 'generic', 'object_generic', 'pdf', 'note', 'off', 'on', 'object_bookmark', 'bookmark', 'vcard'))) { $fa = 'far'; } if (in_array($pictowithouttext, array('black-tie', 'skype', 'twitter', 'facebook', 'linkedin', 'instagram', 'snapchat', 'stripe-s', 'youtube', 'google-plus-g', 'whatsapp'))) { $fa = 'fab'; } - $pictowithouttext = str_replace('object_', '', $pictowithouttext); - $arrayconvpictotofa = array( 'account'=>'university', 'accountline'=>'receipt', 'accountancy'=>'money-check-alt', 'action'=>'calendar-alt', 'add'=>'plus-circle', 'address'=> 'address-book', 'bank_account'=>'university', 'bill'=>'file-invoice-dollar', 'billa'=>'file-excel', 'supplier_invoicea'=>'file-excel', 'billd'=>'file-medical', 'supplier_invoiced'=>'file-medical', 'bom'=>'cubes', @@ -3271,10 +3272,10 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $ 'intervention'=>'ambulance', 'invoice'=>'file-invoice-dollar', 'multicurrency'=>'dollar-sign', 'order'=>'file-invoice', 'error'=>'exclamation-triangle', 'warning'=>'exclamation-triangle', 'other'=>'square', - 'playdisabled'=>'play', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', + 'playdisabled'=>'play', 'pdf'=>'file-pdf', 'poll'=>'check-double', 'preview'=>'binoculars', 'project'=>'sitemap', 'projectpub'=>'sitemap', 'projecttask'=>'tasks', 'propal'=>'file-signature', + 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'recruitmentjobposition'=>'id-card-alt', 'recruitmentcandidature'=>'id-badge', 'resize'=>'crop', 'supplier_order'=>'dol-order_supplier', 'supplier_proposal'=>'file-signature', - 'payment'=>'money-check-alt', 'phoning'=>'phone', 'phoning_mobile'=>'mobile-alt', 'phoning_fax'=>'fax', 'previous'=>'arrow-alt-circle-left', 'printer'=>'print', 'product'=>'cube', 'service'=>'concierge-bell', 'refresh'=>'redo', 'resource'=>'laptop-house', 'shipment'=>'dolly', 'stock'=>'box-open', 'stats' => 'chart-bar', 'split'=>'code-branch', 'supplier_invoice'=>'file-invoice-dollar', 'technic'=>'cogs', 'ticket'=>'ticket-alt', 'title_setup'=>'tools', 'title_accountancy'=>'money-check-alt', 'title_bank'=>'university', 'title_hrm'=>'umbrella-beach', diff --git a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php index 5cdeaa693a7..165e83a8e87 100644 --- a/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_espadon.modules.php @@ -166,14 +166,14 @@ class pdf_espadon extends ModelePdfExpedition if (!empty($conf->global->MAIN_USE_FPDF)) $outputlangs->charset_output = 'ISO-8859-1'; // Load traductions files required by page - $outputlangs->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); + $outputlangs->loadLangs(array("main", "bills", "orders", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); global $outputlangsbis; $outputlangsbis = null; if (!empty($conf->global->PDF_USE_ALSO_LANGUAGE_CODE) && $outputlangs->defaultlang != $conf->global->PDF_USE_ALSO_LANGUAGE_CODE) { $outputlangsbis = new Translate('', $conf); $outputlangsbis->setDefaultLang($conf->global->PDF_USE_ALSO_LANGUAGE_CODE); - $outputlangsbis->loadLangs(array("main", "bills", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); + $outputlangsbis->loadLangs(array("main", "bills", "orders", "products", "dict", "companies", "propal", "deliveries", "sendings", "productbatch")); } $nblines = count($object->lines); diff --git a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php index f530121ec08..bad252bf799 100644 --- a/htdocs/core/modules/expedition/doc/pdf_merou.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_merou.modules.php @@ -453,7 +453,7 @@ class pdf_merou extends ModelePdfExpedition $default_font_size = pdf_getPDFFontSize($outputlangs); // Translations - $langs->loadLangs(array("main", "bills")); + $langs->loadLangs(array("main", "bills", "orders")); if (empty($hidetop)) { @@ -620,12 +620,12 @@ class pdf_merou extends ModelePdfExpedition $pdf->SetFont('', 'B', $default_font_size - 3); $pdf->SetTextColor(0, 0, 0); - $pdf->MultiCell(50, 8, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, 'day', false, $outputlangs, true), '', 'L'); + $pdf->MultiCell(70, 8, $outputlangs->transnoentities("DateDeliveryPlanned")." : ".dol_print_date($object->date_delivery, 'day', false, $outputlangs, true), '', 'L'); $pdf->SetXY($blSocX - 80, $blSocY + 20); $pdf->SetFont('', 'B', $default_font_size - 3); $pdf->SetTextColor(0, 0, 0); - $pdf->MultiCell(50, 8, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, '', 'L'); + $pdf->MultiCell(70, 8, $outputlangs->transnoentities("TrackingNumber")." : ".$object->tracking_number, '', 'L'); // Deliverer $pdf->SetXY($blSocX - 80, $blSocY + 23); diff --git a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php index a43c6aba352..6698495f983 100644 --- a/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php +++ b/htdocs/core/modules/expedition/doc/pdf_rouget.modules.php @@ -142,8 +142,8 @@ class pdf_rouget extends ModelePdfExpedition // Define position of columns $this->posxdesc = $this->marge_gauche + 1; - $this->posxweightvol = $this->page_largeur - $this->marge_droite - 78; - $this->posxqtyordered = $this->page_largeur - $this->marge_droite - 56; + $this->posxweightvol = $this->page_largeur - $this->marge_droite - 82; + $this->posxqtyordered = $this->page_largeur - $this->marge_droite - 60; $this->posxqtytoship = $this->page_largeur - $this->marge_droite - 28; $this->posxpuht = $this->page_largeur - $this->marge_droite; diff --git a/htdocs/modulebuilder/template/admin/setup.php b/htdocs/modulebuilder/template/admin/setup.php index c17f4a0095d..420eb13940d 100644 --- a/htdocs/modulebuilder/template/admin/setup.php +++ b/htdocs/modulebuilder/template/admin/setup.php @@ -495,7 +495,7 @@ foreach ($myTmpObjects as $myTmpObjectKey => $myTmpObjectArray) { print ''; if ($module->type == 'pdf') { - print ''.img_object($langs->trans("Preview"), 'generic').''; + print ''.img_object($langs->trans("Preview"), 'pdf').''; } else { print img_object($langs->trans("PreviewNotAvailable"), 'generic'); } From 068587fcee84f7016418ca4064243758a98010e4 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 14:30:07 +0100 Subject: [PATCH 027/175] Update card.php --- htdocs/commande/card.php | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 2c5157ff228..d9817dc38c3 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -953,7 +953,8 @@ if (empty($reshook)) if ($result > 0) { $ret = $object->fetch($object->id); // Reload to get new records - + $object->fetch_thirdparty(); + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language $outputlangs = $langs; @@ -966,8 +967,6 @@ if (empty($reshook)) } $object->generateDocument($object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref); - } else { - $object->fetch_thirdparty(); } unset($_POST['prod_entry_mode']); From 1f58b49aea03418c9e3bcd65db5a613a300a0ca9 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 14:31:39 +0100 Subject: [PATCH 028/175] No xml inside HTML --- htdocs/takepos/pay.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/takepos/pay.php b/htdocs/takepos/pay.php index ab621a964b5..0d80eeffbc0 100644 --- a/htdocs/takepos/pay.php +++ b/htdocs/takepos/pay.php @@ -297,7 +297,7 @@ print ''; + print ''; } else { print ''; } @@ -320,7 +320,7 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; @@ -344,7 +344,7 @@ print ''; + print ''; } else { $button = array_pop($action_buttons); print ''; From 5bd6d6f388c6cbfaa84500bdf33df99f271cca53 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 14:34:15 +0100 Subject: [PATCH 029/175] Look and feel v13 --- htdocs/comm/action/card.php | 4 ++-- htdocs/comm/action/index.php | 6 +++--- htdocs/compta/bank/card.php | 4 ++-- htdocs/core/class/extrafields.class.php | 4 ++-- htdocs/core/class/html.form.class.php | 8 ++++++-- htdocs/core/lib/functions.lib.php | 2 +- htdocs/margin/customerMargins.php | 2 +- htdocs/margin/productMargins.php | 2 +- htdocs/product/card.php | 4 ++-- htdocs/product/stock/card.php | 4 ++-- htdocs/theme/eldy/global.inc.php | 2 ++ htdocs/website/index.php | 2 +- 12 files changed, 25 insertions(+), 19 deletions(-) diff --git a/htdocs/comm/action/card.php b/htdocs/comm/action/card.php index 1a61a4a0c82..f26ad2a36e2 100644 --- a/htdocs/comm/action/card.php +++ b/htdocs/comm/action/card.php @@ -1104,7 +1104,7 @@ if ($action == 'create') // Categories print ''.$langs->trans("Categories").''; $cate_arbo = $form->select_all_categories(Categorie::TYPE_ACTIONCOMM, '', 'parent', 64, 0, 1); - print $form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'minwidth300 quatrevingtpercent', 0, 0); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, GETPOST('categories', 'array'), '', 0, 'minwidth300 quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } @@ -1578,7 +1578,7 @@ if ($id > 0) foreach ($cats as $cat) { $arrayselected[] = $cat->id; } - print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } diff --git a/htdocs/comm/action/index.php b/htdocs/comm/action/index.php index f540a8d6e4e..83b3c0514aa 100644 --- a/htdocs/comm/action/index.php +++ b/htdocs/comm/action/index.php @@ -1492,19 +1492,19 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa if ($nonew <= 0) { - print '
'; + print '
'."\n"; + print '
'."\n"; } if ($nonew < 0) diff --git a/htdocs/compta/bank/card.php b/htdocs/compta/bank/card.php index 813e0baa1b7..30e483fdfa9 100644 --- a/htdocs/compta/bank/card.php +++ b/htdocs/compta/bank/card.php @@ -407,7 +407,7 @@ if ($action == 'create') $arrayselected[] = $cat->id; } } - print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } @@ -904,7 +904,7 @@ if ($action == 'create') $arrayselected[] = $cat->id; } } - print $form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, '', 0, '100%'); + print img_picto('', 'category').$form->multiselectarray('categories', $cate_arbo, $arrayselected, '', 0, 'quatrevingtpercent widthcentpercentminusx', 0, 0); print ""; } diff --git a/htdocs/core/class/extrafields.class.php b/htdocs/core/class/extrafields.class.php index 87cee951170..d041aba45f4 100644 --- a/htdocs/core/class/extrafields.class.php +++ b/htdocs/core/class/extrafields.class.php @@ -1937,10 +1937,10 @@ class ExtraFields $out .= ''; } diff --git a/htdocs/stripe/admin/stripe.php b/htdocs/stripe/admin/stripe.php index 26d540e4093..c304a00ce3f 100644 --- a/htdocs/stripe/admin/stripe.php +++ b/htdocs/stripe/admin/stripe.php @@ -169,6 +169,7 @@ print ''.$langs->trans("StripeDesc")."
\n" print '
'; +print '
'; print ''; print ''; print ''; @@ -177,7 +178,7 @@ print ''; print "\n"; print ''; -print '
'.$langs->trans("AccountParameter").'
'; +print ''; print $langs->trans("StripeLiveEnabled").''; if ($conf->use_javascript_ajax) { print ajax_constantonoff('STRIPE_LIVE'); @@ -209,9 +210,9 @@ if (empty($conf->stripeconnect->enabled)) } print ''; print '   '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx'; - $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' '; + $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForTestWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php?test', 3); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinetestwebhookurl", 0); print '
'.$out; print '
'; @@ -278,9 +279,9 @@ if (empty($conf->stripeconnect->enabled)) } print ''; print '   '.$langs->trans("Example").': whsec_xxxxxxxxxxxxxxxxxxxxxxxx'; - $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' '; + $out = img_picto('', 'globe').' '.$langs->trans("ToOfferALinkForLiveWebhook").' '; $url = dol_buildpath('/public/stripe/ipn.php', 3); - $out .= ''; + $out .= ''; $out .= ajax_autoselect("onlinelivewebhookurl", 0); print '
'.$out; print '
'; @@ -321,13 +322,15 @@ if (empty($conf->stripeconnect->enabled)) print '
'; +print '
'; print '
'; +print '
'; print ''; print ''; -print ''; +print ''; print ''; print "\n"; @@ -339,11 +342,12 @@ print ''; print ''; print ''; @@ -437,6 +441,19 @@ print ''.$langs->trans("Example").': myemail@myserver.com, Payment service <myemail2@myserver2.com>'; print ''; +print '
'.$langs->trans("UsageParameter").''.$langs->trans("UsageParameter").''.$langs->trans("Value").'
'; print $langs->trans("StripeUserAccountForActions").''; -print $form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0); +print img_picto('', 'user').$form->select_dolusers($conf->global->STRIPE_USER_ACCOUNT_FOR_ACTIONS, 'STRIPE_USER_ACCOUNT_FOR_ACTIONS', 0); print '
'; print $langs->trans("BankAccount").''; +print img_picto('', 'bank_account').' '; $form->select_comptes($conf->global->STRIPE_BANK_ACCOUNT_FOR_PAYMENTS, 'STRIPE_BANK_ACCOUNT_FOR_PAYMENTS', 0, '', 1); print '
'; +print '
'; + +print '
'; + +print '
'; +print ''; + +print ''; +print ''; +print ''; +print "\n"; + // Payment token for URL print ''; print '
'.$langs->trans("UrlGenerationParameters").''.$langs->trans("Value").'
'; print $langs->trans("SecurityToken").''; @@ -461,6 +478,7 @@ if ($conf->use_javascript_ajax) { print '
'; +print '
'; print dol_get_fiche_end(); @@ -481,12 +499,14 @@ if (!empty($conf->use_javascript_ajax)) { print "\n".''; } From 4f826fae2641398d12fffea32570bea9634c7ff7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 12:15:59 +0100 Subject: [PATCH 143/175] Fix warnings --- htdocs/core/modules/modExpedition.class.php | 4 +-- htdocs/core/modules/modPropale.class.php | 4 +-- htdocs/exports/class/export.class.php | 34 ++++++++++++--------- test/phpunit/AllTests.php | 8 ++--- test/phpunit/ExportTest.php | 4 +-- test/phpunit/ImportTest.php | 2 +- test/phpunit/ScriptsTest.php | 14 ++++++++- 7 files changed, 43 insertions(+), 27 deletions(-) diff --git a/htdocs/core/modules/modExpedition.class.php b/htdocs/core/modules/modExpedition.class.php index 8d11989f02a..54fecd1a5af 100644 --- a/htdocs/core/modules/modExpedition.class.php +++ b/htdocs/core/modules/modExpedition.class.php @@ -291,7 +291,7 @@ class modExpedition extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'expedition as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'expedition_extrafields as extra ON c.rowid = extra.fk_object,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'societe as s'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_departements as d ON s.fk_departement = d.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'expeditiondet as ed'; @@ -306,7 +306,7 @@ class modExpedition extends DolibarrModules } $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = ed.fk_expedition AND ed.fk_origin_line = cd.rowid'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('expedition').')'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; } diff --git a/htdocs/core/modules/modPropale.class.php b/htdocs/core/modules/modPropale.class.php index f06496e781a..f1de32bd1a9 100644 --- a/htdocs/core/modules/modPropale.class.php +++ b/htdocs/core/modules/modPropale.class.php @@ -241,7 +241,7 @@ class modPropale extends DolibarrModules $this->export_sql_end[$r] = ' FROM '.MAIN_DB_PREFIX.'societe as s '; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_extrafields as extra4 ON s.rowid = extra4.fk_object'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'societe_commerciaux as sc ON sc.fk_soc = s.rowid'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'c_country as co ON s.fk_pays = co.rowid,'; $this->export_sql_end[$r] .= ' '.MAIN_DB_PREFIX.'propal as c'; $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'projet as pj ON c.fk_projet = pj.rowid'; @@ -254,7 +254,7 @@ class modPropale extends DolibarrModules $this->export_sql_end[$r] .= ' LEFT JOIN '.MAIN_DB_PREFIX.'product_extrafields as extra3 on p.rowid = extra3.fk_object'; $this->export_sql_end[$r] .= ' WHERE c.fk_soc = s.rowid AND c.rowid = cd.fk_propal'; $this->export_sql_end[$r] .= ' AND c.entity IN ('.getEntity('propal').')'; - if (!$user->rights->societe->client->voir) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; + if (empty($user->rights->societe->client->voir)) $this->export_sql_end[$r] .= ' AND sc.fk_user = '.$user->id; // Imports //-------- diff --git a/htdocs/exports/class/export.class.php b/htdocs/exports/class/export.class.php index cf63b85879c..3ecece7e886 100644 --- a/htdocs/exports/class/export.class.php +++ b/htdocs/exports/class/export.class.php @@ -35,6 +35,8 @@ class Export */ public $db; + public $error; + public $array_export_code = array(); // Tableau de "idmodule_numlot" public $array_export_module = array(); // Tableau de "nom de modules" public $array_export_label = array(); // Tableau de "libelle de lots" @@ -139,11 +141,10 @@ class Export { $perm = $val; //print_r("$perm[0]-$perm[1]-$perm[2]
"); - if (!empty($perm[2])) - { - $bool = $user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]}; + if (!empty($perm[2])) { + $bool = isset($user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]}) ? $user->rights->{$perm[0]}->{$perm[1]}->{$perm[2]} : false; } else { - $bool = $user->rights->{$perm[0]}->{$perm[1]}; + $bool = isset($user->rights->{$perm[0]}->{$perm[1]}) ? $user->rights->{$perm[0]}->{$perm[1]} : false; } if ($perm[0] == 'user' && $user->admin) $bool = true; if (!$bool) break; @@ -185,14 +186,14 @@ class Export // Tableau des operations speciales sur champ $this->array_export_special[$i] = (!empty($module->export_special_array[$r]) ? $module->export_special_array[$r] : ''); // Array of examples - $this->array_export_examplevalues[$i] = $module->export_examplevalues_array[$r]; + $this->array_export_examplevalues[$i] = (!empty($module->export_examplevalues_array[$r]) ? $module->export_examplevalues_array[$r] : null); // Array of help tooltips $this->array_export_help[$i] = (!empty($module->export_help_array[$r]) ? $module->export_help_array[$r] : ''); // Requete sql du dataset $this->array_export_sql_start[$i] = $module->export_sql_start[$r]; $this->array_export_sql_end[$i] = $module->export_sql_end[$r]; - $this->array_export_sql_order[$i] = $module->export_sql_order[$r]; + $this->array_export_sql_order[$i] = (!empty($module->export_sql_order[$r]) ? $module->export_sql_order[$r] : null); //$this->array_export_sql[$i]=$module->export_sql[$r]; dol_syslog(get_class($this)."::load_arrays loaded for module ".$modulename." with index ".$i.", dataset=".$module->export_code[$r].", nb of fields=".(!empty($module->export_fields_code[$r]) ?count($module->export_fields_code[$r]) : '')); @@ -580,9 +581,12 @@ class Export if ($resql) { //$this->array_export_label[$indice] - if ($conf->global->EXPORT_PREFIX_SPEC) + if (!empty($conf->global->EXPORT_PREFIX_SPEC)) { $filename = $conf->global->EXPORT_PREFIX_SPEC."_".$datatoexport; - else $filename = "export_".$datatoexport; + } + else { + $filename = "export_".$datatoexport; + } $filename .= '.'.$objmodel->getDriverExtension(); $dirname = $conf->export->dir_temp.'/'.$user->id; @@ -598,7 +602,7 @@ class Export $objmodel->write_header($outputlangs); // Genere ligne de titre - $objmodel->write_title($this->array_export_fields[$indice], $array_selected, $outputlangs, $this->array_export_TypeFields[$indice]); + $objmodel->write_title($this->array_export_fields[$indice], $array_selected, $outputlangs, isset($this->array_export_TypeFields[$indice]) ? $this->array_export_TypeFields[$indice] : null); while ($obj = $this->db->fetch_object($resql)) { @@ -651,18 +655,20 @@ class Export } $obj->$alias = $remaintopay; } else { - // TODO FIXME Export of compute field does not work. $obj containt $obj->alias_field and formulat will contains $obj->field + // TODO FIXME + // Export of compute field does not work. $obj contains $obj->alias_field and formula may contains $obj->field + // Also the formula may contains objects of class that are not loaded. $computestring = $this->array_export_special[$indice][$key]; - $tmp = dol_eval($computestring, 1, 0); - $obj->$alias = $tmp; + //$tmp = dol_eval($computestring, 1, 0); + //$obj->$alias = $tmp; - $this->error = "ERROPNOTSUPPORTED. Operation ".$this->array_export_special[$indice][$key]." not supported. Export of 'computed' extrafields is not yet supported, please remove field."; + $this->error = "ERROPNOTSUPPORTED. Operation ".$computestring." not supported. Export of 'computed' extrafields is not yet supported, please remove field."; return -1; } } } // end of special operation processing - $objmodel->write_record($array_selected, $obj, $outputlangs, $this->array_export_TypeFields[$indice]); + $objmodel->write_record($array_selected, $obj, $outputlangs, isset($this->array_export_TypeFields[$indice]) ? $this->array_export_TypeFields[$indice] : null); } // Genere en-tete diff --git a/test/phpunit/AllTests.php b/test/phpunit/AllTests.php index 0d195560d1c..163bf320075 100644 --- a/test/phpunit/AllTests.php +++ b/test/phpunit/AllTests.php @@ -242,11 +242,6 @@ class AllTests require_once dirname(__FILE__).'/ScriptsTest.php'; $suite->addTestSuite('ScriptsTest'); - require_once dirname(__FILE__).'/FormAdminTest.php'; - $suite->addTestSuite('FormAdminTest'); - require_once dirname(__FILE__).'/FormTest.php'; - $suite->addTestSuite('FormTest'); - require_once dirname(__FILE__).'/ModulesTest.php'; // At end because it's the longer $suite->addTestSuite('ModulesTest'); @@ -254,8 +249,11 @@ class AllTests // GUI require_once dirname(__FILE__).'/FormAdminTest.php'; $suite->addTestSuite('FormAdminTest'); + require_once dirname(__FILE__).'/FormTest.php'; + $suite->addTestSuite('FormTest'); + // Payment services require_once dirname(__FILE__).'/PaypalTest.php'; $suite->addTestSuite('PaypalTest'); require_once dirname(__FILE__).'/StripeTest.php'; diff --git a/test/phpunit/ExportTest.php b/test/phpunit/ExportTest.php index 2a3cb079baf..0f5b0bd82e3 100644 --- a/test/phpunit/ExportTest.php +++ b/test/phpunit/ExportTest.php @@ -149,7 +149,7 @@ class ExportTest extends PHPUnit\Framework\TestCase $file = "export_".$model.".modules.php"; $classname = "Export".$model; require_once $dir.$file; - $objmodel = new $classname($this->db); + $objmodel = new $classname($db); // First test without option USE_STRICT_CSV_RULES unset($conf->global->USE_STRICT_CSV_RULES); @@ -364,7 +364,7 @@ class ExportTest extends PHPUnit\Framework\TestCase $sql = ""; $result=$objexport->build_file($user, $model, $datatoexport, $array_selected, array(), $sql); $expectedresult = 1; - $this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed'); + $this->assertEquals($expectedresult, $result, "Call build_file() to export ".$exportfile.' failed: '.$objexport->error); $result=dol_is_file($exportfile); $this->assertTrue($result, 'File '.$exportfile.' not found'); } diff --git a/test/phpunit/ImportTest.php b/test/phpunit/ImportTest.php index ce689fda4a4..e9bf019740c 100644 --- a/test/phpunit/ImportTest.php +++ b/test/phpunit/ImportTest.php @@ -140,7 +140,7 @@ class ImportTest extends PHPUnit\Framework\TestCase // TODO // Run import on file and check the record with field "auto" are filled // according to option - + $this->assertEquals(0, 0); return true; } diff --git a/test/phpunit/ScriptsTest.php b/test/phpunit/ScriptsTest.php index 16884214418..82d1ee28e39 100644 --- a/test/phpunit/ScriptsTest.php +++ b/test/phpunit/ScriptsTest.php @@ -68,7 +68,7 @@ class ScriptsTest extends PHPUnit\Framework\TestCase * Constructor * We save global variables into local variables * - * @return SecurityTest + * @return ScriptsTest */ public function __construct() { @@ -152,6 +152,10 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $db=$this->savdb; $script=dirname(__FILE__).'/../../scripts/bank/export-bank-receipts.php BANKDUMMY RECEIPTDUMMY excel2007 lang=fr_FR'; + + $returnvar = 0; + $output = array(); + $result=exec($script, $output, $returnvar); print __METHOD__." result=".$result."\n"; @@ -187,6 +191,8 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $this->assertEquals($result,'Failed to find bank account with ref BANKDUMMY.'); $this->assertEquals($returnvar,255); */ + $this->assertEquals(0, 0); + return ''; } @@ -204,6 +210,9 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; + $returnvar = 0; + $output = array(); + $script=dirname(__FILE__).'/../../scripts/contracts/email_expire_services_to_customers.php test thirdparties'; $result=exec($script, $output, $returnvar); print __METHOD__." result=".$result."\n"; @@ -242,6 +251,9 @@ class ScriptsTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; + $returnvar = 0; + $output = array(); + $script=dirname(__FILE__).'/../../scripts/invoices/email_unpaid_invoices_to_customers.php test thirdparties'; $result=exec($script, $output, $returnvar); print __METHOD__." result=".$result."\n"; From ca2ce88bd2c0446a3025580121c5d5bf975b856a Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 13:29:56 +0100 Subject: [PATCH 144/175] Fix warning --- .../core/triggers/interface_50_modTicket_TicketEmail.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index 3743d044e44..f6157c38edc 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -132,8 +132,9 @@ class InterfaceTicketEmail extends DolibarrTriggers $langs->load('ticket'); // Send email to notification email - $sendto = $conf->global->TICKET_NOTIFICATION_EMAIL_TO; if (!empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) && empty($object->context['disableticketemail'])) { + $sendto = empty($conf->global->TICKET_NOTIFICATION_EMAIL_TO) ? '' : $conf->global->TICKET_NOTIFICATION_EMAIL_TO; + if ($sendto) { // Init to avoid errors $filepath = array(); From f21fc43e7efd730bca9d31e17371b1313a129759 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:25:49 +0100 Subject: [PATCH 145/175] Fix label of field --- htdocs/core/menus/standard/eldy.lib.php | 3 +- htdocs/user/card.php | 70 ++++++++++++------------- 2 files changed, 36 insertions(+), 37 deletions(-) diff --git a/htdocs/core/menus/standard/eldy.lib.php b/htdocs/core/menus/standard/eldy.lib.php index b103a309f59..c9a3ba48dab 100644 --- a/htdocs/core/menus/standard/eldy.lib.php +++ b/htdocs/core/menus/standard/eldy.lib.php @@ -360,10 +360,11 @@ function print_eldy_menu($db, $atarget, $type_user, &$tabMenu, &$menu, $noout = // HRM $tmpentry = array( - 'enabled'=>(!empty($conf->hrm->enabled) || !empty($conf->holiday->enabled) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)), + 'enabled'=>(!empty($conf->hrm->enabled) || (!empty($conf->holiday->enabled)) || !empty($conf->deplacement->enabled) || !empty($conf->expensereport->enabled) || !empty($conf->recruitment->enabled)), 'perms'=>(!empty($user->rights->hrm->employee->read) || !empty($user->rights->holiday->write) || !empty($user->rights->deplacement->lire) || !empty($user->rights->expensereport->lire) || !empty($user->rights->recruitment->recruitmentjobposition->read)), 'module'=>'hrm|holiday|deplacement|expensereport|recruitment' ); + $menu_arr[] = array( 'name' => 'HRM', 'link' => '/hrm/index.php?mainmenu=hrm&leftmenu=', diff --git a/htdocs/user/card.php b/htdocs/user/card.php index 8934d8d87ec..9d676c9423f 100644 --- a/htdocs/user/card.php +++ b/htdocs/user/card.php @@ -930,12 +930,6 @@ if ($action == 'create' || $action == 'adduserldap') print "\n"; } - // Type - print ''.$langs->trans("Type").''; - print ''; - print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); - print ''; - // Gender print ''.$langs->trans("Gender").''; print ''; @@ -983,6 +977,11 @@ if ($action == 'create' || $action == 'adduserldap') print "\n"; } + // External user + print ''.$langs->trans("ExternalUser").' ?'; + print ''; + print $form->textwithpicto($langs->trans("Internal"), $langs->trans("InternalExternalDesc"), 1, 'help', '', 0, 2); + print ''; print '
'; @@ -2196,36 +2195,6 @@ if ($action == 'create' || $action == 'adduserldap') print ''; } - // Type - print ''; - print ''; - // Gender print ''; print '\n"; } + // External user ? + print ''; + print ''; print '
'.$langs->trans("Type").''; - if ($user->id == $object->id || !$user->admin) - { - // Read mode - $type = $langs->trans("Internal"); - if ($object->socid) $type = $langs->trans("External"); - print $form->textwithpicto($type, $langs->trans("InternalExternalDesc")); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; - } else { - // Select mode - $type = 0; - if ($object->contact_id) $type = $object->contact_id; - - if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact - print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); - print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; - } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact - print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set - print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); - if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; - } else { // $object->socid is not > 0 here - print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set - print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); - } - } - print '
'.$langs->trans("Gender").''; @@ -2306,6 +2275,35 @@ if ($action == 'create' || $action == 'adduserldap') print "
'.$langs->trans("ExternalUser").' ?'; + if ($user->id == $object->id || !$user->admin) + { + // Read mode + $type = $langs->trans("Internal"); + if ($object->socid) $type = $langs->trans("External"); + print $form->textwithpicto($type, $langs->trans("InternalExternalDesc")); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } else { + // Select mode + $type = 0; + if ($object->contact_id) $type = $object->contact_id; + + if ($object->socid > 0 && !($object->contact_id > 0)) { // external user but no link to a contact + print img_picto('', 'company').$form->select_company($object->socid, 'socid', '', ' '); + print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } elseif ($object->socid > 0 && $object->contact_id > 0) { // external user with a link to a contact + print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, $object->contact_id, 'contactid', 1, '', '', 1, '', false, 1); + if ($object->ldap_sid) print ' ('.$langs->trans("DomainUser").')'; + } else { // $object->socid is not > 0 here + print img_picto('', 'company').$form->select_company(0, 'socid', '', ' '); // We keep thirdparty empty, contact is already set + print img_picto('', 'contact').$form->selectcontacts(0, 0, 'contactid', 1, '', '', 1, '', false, 1); + } + } + print '

'; From 2457d07d1a327edfdd8c645968d8effb306f7d05 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:29:51 +0100 Subject: [PATCH 146/175] Fix permission on creation of leave requests --- htdocs/holiday/card.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 11d3c70c4a8..3de5c2a5e19 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -148,11 +148,11 @@ if (empty($reshook)) $description = trim(GETPOST('description', 'restricthtml')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->creer)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->expensereport->writeall_advance))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->create)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { $error++; setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); } else { - if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->expensereport->writeall_advance)) { + if (empty($conf->global->MAIN_USE_ADVANCED_PERMS) || empty($user->rights->holiday->writeall_advance)) { if (!in_array($fuserid, $childids)) { $error++; setEventMessages($langs->trans("UserNotInHierachy"), null, 'errors'); From 936699786a208dd3d9d2ae5d1d8cc973ce454644 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:44:20 +0100 Subject: [PATCH 147/175] Fix translation --- htdocs/holiday/card.php | 2 +- htdocs/hrm/index.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 3de5c2a5e19..3899990b425 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -973,7 +973,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') $nb_type = $object->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; - $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ?price2num($nb_type) : 0).'
'; + $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ? price2num($nb_type) : 0).'
'; //$out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; } print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; diff --git a/htdocs/hrm/index.php b/htdocs/hrm/index.php index 3ec2a3b898f..f0bbb442acc 100644 --- a/htdocs/hrm/index.php +++ b/htdocs/hrm/index.php @@ -153,7 +153,7 @@ if (!empty($conf->holiday->enabled)) { $nb_type = $holiday->getCPforUser($user->id, $val['rowid']); $nb_holiday += $nb_type; - $out .= ' - '.$val['label'].': '.($nb_type ?price2num($nb_type) : 0).'
'; + $out .= ' - '.($langs->trans($val['code']) != $val['code'] ? $langs->trans($val['code']) : $val['label']).': '.($nb_type ? price2num($nb_type) : 0).'
'; } print $langs->trans('SoldeCPUser', round($nb_holiday, 5)).'
'; print $out; From e18035c0fc2541e43a51a596b1a4697346a1eadc Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 14:46:33 +0100 Subject: [PATCH 148/175] Fix bad permission on module holiday --- htdocs/holiday/card.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 3899990b425..500d678d357 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -148,7 +148,7 @@ if (empty($reshook)) $description = trim(GETPOST('description', 'restricthtml')); // Check that leave is for a user inside the hierarchy or advanced permission for all is set - if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->create)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { + if ((empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->write)) || (!empty($conf->global->MAIN_USE_ADVANCED_PERMS) && empty($user->rights->holiday->writeall_advance))) { $error++; setEventMessages($langs->trans("NotEnoughPermission"), null, 'errors'); } else { @@ -962,8 +962,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print ''."\n"; print ''."\n"; - if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) - { + if (empty($conf->global->HOLIDAY_HIDE_BALANCE)) { print dol_get_fiche_head('', '', '', -1); $out = ''; @@ -980,8 +979,7 @@ if ((empty($id) && empty($ref)) || $action == 'create' || $action == 'add') print $out; print dol_get_fiche_end(); - } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) - { + } elseif (!is_numeric($conf->global->HOLIDAY_HIDE_BALANCE)) { print $langs->trans($conf->global->HOLIDAY_HIDE_BALANCE).'
'; } From cc44ce7dddf31627c9ef52191799ff8f8f85df62 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 15:35:38 +0100 Subject: [PATCH 149/175] Fix warning --- .../core/triggers/interface_50_modTicket_TicketEmail.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php index f6157c38edc..7bb8988e18e 100644 --- a/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php +++ b/htdocs/core/triggers/interface_50_modTicket_TicketEmail.class.php @@ -247,7 +247,7 @@ class InterfaceTicketEmail extends DolibarrTriggers $message_customer .= '

'.$langs->trans('TicketNewEmailBodyInfosTrackUrlCustomer').' : '.$url_public_ticket.'

'; $message_customer .= '

'.$langs->trans('TicketEmailPleaseDoNotReplyToThisEmail').'

'; - $from = $conf->global->MAIN_INFO_SOCIETE_NOM.'<'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; + $from = (empty($conf->global->MAIN_INFO_SOCIETE_NOM) ? '' : $conf->global->MAIN_INFO_SOCIETE_NOM.' ').'<'.$conf->global->TICKET_NOTIFICATION_EMAIL_FROM.'>'; $replyto = $from; $trackid = 'tic'.$object->id; From e77413e1e4640286d9c34015839f8c18e5281c91 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 15:36:37 +0100 Subject: [PATCH 150/175] Fix warning --- htdocs/core/class/CMailFile.class.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/class/CMailFile.class.php b/htdocs/core/class/CMailFile.class.php index b2149cd187f..faf0a294dfe 100644 --- a/htdocs/core/class/CMailFile.class.php +++ b/htdocs/core/class/CMailFile.class.php @@ -242,6 +242,7 @@ class CMailFile { $this->html = $msg; + $findimg = 0; if (!empty($conf->global->MAIN_MAIL_ADD_INLINE_IMAGES_IF_IN_MEDIAS)) { $findimg = $this->findHtmlImages($dolibarr_main_data_root.'/medias'); From 3fb63e6a4b8846eb8a4353efccdbfd827cfc290b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 15:51:22 +0100 Subject: [PATCH 151/175] Look and feel v13 --- htdocs/admin/limits.php | 12 ++- htdocs/core/lib/admin.lib.php | 37 +++++---- htdocs/core/menus/standard/empty.php | 112 +++++++++------------------ 3 files changed, 64 insertions(+), 97 deletions(-) diff --git a/htdocs/admin/limits.php b/htdocs/admin/limits.php index 43c4cc84776..34da6f7d34e 100644 --- a/htdocs/admin/limits.php +++ b/htdocs/admin/limits.php @@ -100,9 +100,12 @@ if ($action == 'update') $form = new Form($db); -llxHeader(); +$title = $langs->trans("LimitsSetup"); +$help_url = ''; -print load_fiche_titre($langs->trans("LimitsSetup"), '', 'title_setup'); +llxHeader('', $title, $help_url); + +print load_fiche_titre($title, '', 'title_setup'); $aCurrencies = array($conf->currency); // Default currency always first position @@ -125,7 +128,8 @@ if (!empty($conf->multicurrency->enabled) && !empty($conf->global->MULTICURRENCY if (!empty($aCurrencies) && count($aCurrencies) > 1) { $head = multicurrencyLimitPrepareHead($aCurrencies); - print dol_get_fiche_head($head, $currencycode, '', -1, "multicurrency"); + + print dol_get_fiche_head($head, $currencycode, '', -1, ''); } } @@ -172,6 +176,7 @@ if ($action == 'edit') print ''; print '
'; } else { + print '
'; print '
'; print ''; @@ -191,6 +196,7 @@ if ($action == 'edit') print ''; print '
'.$langs->trans("Parameter").''.$langs->trans("Value").'
'.(isset($conf->global->$mainroundingruletot) ? $conf->global->$mainroundingruletot : $conf->global->MAIN_ROUNDING_RULE_TOT).'
'; + print ''; print '
'; print ''.$langs->trans("Modify").''; diff --git a/htdocs/core/lib/admin.lib.php b/htdocs/core/lib/admin.lib.php index b8cdf8cd085..704a4496d03 100644 --- a/htdocs/core/lib/admin.lib.php +++ b/htdocs/core/lib/admin.lib.php @@ -924,30 +924,33 @@ function purgeSessions($mysessionid) dol_syslog('admin.lib:purgeSessions mysessionid='.$mysessionid.' sessPath='.$sessPath); $error = 0; - $dh = @opendir(dol_osencode($sessPath)); - while (($file = @readdir($dh)) !== false) { - if ($file != "." && $file != "..") { - $fullpath = $sessPath.$file; - if (!@is_dir($fullpath)) { - $sessValues = file_get_contents($fullpath); // get raw session data - if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session - preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity - preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name - $tmp = explode('_', $file); - $idsess = $tmp[1]; - // We remove session if it's not ourself - if ($idsess != $mysessionid) { - $res = @unlink($fullpath); - if (!$res) { - $error++; + $dh = @opendir(dol_osencode($sessPath)); + if ($dh) { + while (($file = @readdir($dh)) !== false) { + if ($file != "." && $file != "..") { + $fullpath = $sessPath.$file; + if (!@is_dir($fullpath)) { + $sessValues = file_get_contents($fullpath); // get raw session data + + if (preg_match('/dol_login/i', $sessValues) && // limit to dolibarr session + preg_match('/dol_entity\|s:([0-9]+):"('.$conf->entity.')"/i', $sessValues) && // limit to current entity + preg_match('/dol_company\|s:([0-9]+):"('.$conf->global->MAIN_INFO_SOCIETE_NOM.')"/i', $sessValues)) { // limit to company name + $tmp = explode('_', $file); + $idsess = $tmp[1]; + // We remove session if it's not ourself + if ($idsess != $mysessionid) { + $res = @unlink($fullpath); + if (!$res) { + $error++; + } } } } } } + @closedir($dh); } - @closedir($dh); if (!$error) { return 1; diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index b3151e15748..213cd14e9b0 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -348,14 +348,29 @@ class MenuManager // ***** END ***** + $menu_array_before = array(); + $menu_array_after = array(); + // do not change code after this + $menu_array = $this->menu->liste; + if (is_array($menu_array_before)) { + $menu_array = array_merge($menu_array_before, $menu_array); + } + if (is_array($menu_array_after)) { + $menu_array = array_merge($menu_array, $menu_array_after); + } + //var_dump($menu_array);exit; + if (!is_array($menu_array)) { + return 0; + } + if (empty($noout)) { $alt = 0; $altok = 0; $blockvmenuopened = false; - $num = count($this->menu->liste); + $num = count($menu_array); for ($i = 0; $i < $num; $i++) { $alt++; - if (empty($this->menu->liste[$i]['level'])) { + if (empty($menu_array[$i]['level'])) { $altok++; $blockvmenuopened = true; $lastopened = true; @@ -375,55 +390,55 @@ class MenuManager // Add tabulation $tabstring = ''; - $tabul = ($this->menu->liste[$i]['level'] - 1); + $tabul = ($menu_array[$i]['level'] - 1); if ($tabul > 0) { for ($j = 0; $j < $tabul; $j++) { $tabstring .= '   '; } } - if ($this->menu->liste[$i]['level'] == 0) { - if ($this->menu->liste[$i]['enabled']) { - print ''."\n"; + if ($menu_array[$i]['level'] == 0) { + if ($menu_array[$i]['enabled']) { + print ''."\n"; } else { - print ''."\n"; + print ''."\n"; } print ''."\n"; } - if ($this->menu->liste[$i]['level'] > 0) { + if ($menu_array[$i]['level'] > 0) { $cssmenu = ''; - if ($this->menu->liste[$i]['url']) { - $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $this->menu->liste[$i]['url'])); + if ($menu_array[$i]['url']) { + $cssmenu = ' menu_contenu'.dol_string_nospecial(preg_replace('/\.php.*$/', '', $menu_array[$i]['url'])); } print ''."\n"; } // If next is a new block or end - if (empty($this->menu->liste[$i + 1]['level'])) { + if (empty($menu_array[$i + 1]['level'])) { print ''."\n"; print "
\n"; } @@ -436,66 +451,9 @@ class MenuManager if ($mode == 'jmobile') { $this->leftmenu = clone $this->menu; - unset($this->menu->liste); + unset($menu_array); } } - /* - if ($mode == 'jmobile') - { - $substitarray = getCommonSubstitutionArray($langs, 0, null, null); - - foreach($this->menu->liste as $key => $val) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' - { - print '
    '; - print '
  • '; - - $val['url'] = make_substitutions($val['url'], $substitarray); - - if ($val['enabled'] == 1) - { - $relurl=dol_buildpath($val['url'],1); - - print ''.$val['titre'].''."\n"; - // Search submenu fot this entry - $tmpmainmenu=$val['mainmenu']; - $tmpleftmenu='all'; - //$submenu=new Menu(); - //$res=print_left_eldy_menu($this->db,$this->menu_array,$this->menu_array_after,$this->tabMenu,$submenu,1,$tmpmainmenu,$tmpleftmenu, null, $this->type_user); - //$nexturl=dol_buildpath($submenu->liste[0]['url'],1); - $submenu=$this->leftmenu; - - $canonrelurl=preg_replace('/\?.*$/','',$relurl); - $canonnexturl=preg_replace('/\?.*$/','',$nexturl); - //var_dump($canonrelurl); - //var_dump($canonnexturl); - print '
      '; - if ($canonrelurl != $canonnexturl && ! in_array($val['mainmenu'],array('home','tools'))) - { - // We add sub entry - print '
    • '.$langs->trans("MainArea").'-'.$val['titre'].'
    • '."\n"; - } - foreach($submenu->liste as $key2 => $val2) // $val['url','titre','level','enabled'=0|1|2,'target','mainmenu','leftmenu' - { - $val2['url'] = make_substitutions($val2['url'], $substitarray); - - $relurl2=dol_buildpath($val2['url'],1); - //var_dump($val2); - print '
    • '.$val2['titre'].'
    • '."\n"; - } - //var_dump($submenu); - print '
    '; - } - if ($val['enabled'] == 2) - { - print ''.$val['titre'].''; - } - print '
  • '; - print '
'."\n"; - - break; // Only first menu entry (so home) - } - } - */ unset($this->menu); return $res; From ee0e8826076abd26aef3c7cd08878e9c6fe78894 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 16:15:47 +0100 Subject: [PATCH 152/175] Clear code --- htdocs/core/menus/standard/empty.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/htdocs/core/menus/standard/empty.php b/htdocs/core/menus/standard/empty.php index 213cd14e9b0..1ab7778bb01 100644 --- a/htdocs/core/menus/standard/empty.php +++ b/htdocs/core/menus/standard/empty.php @@ -32,10 +32,13 @@ class MenuManager public $type_user = 0; // Put 0 for internal users, 1 for external users public $atarget = ""; // To store default target to use onto links + public $name = "empty"; public $menu; public $menu_array_after; + public $tabMenu; + /** * Constructor @@ -60,6 +63,7 @@ class MenuManager public function loadMenu($forcemainmenu = '', $forceleftmenu = '') { // Do nothing + $this->tabMenu = array(); } From 7ad5a89a16ba069f18169de57026d46e8587a211 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 16:40:20 +0100 Subject: [PATCH 153/175] FIX A service email must always be sent using the service email --- htdocs/holiday/card.php | 19 +++++++++++++------ 1 file changed, 13 insertions(+), 6 deletions(-) diff --git a/htdocs/holiday/card.php b/htdocs/holiday/card.php index 500d678d357..4c88cdf53b3 100644 --- a/htdocs/holiday/card.php +++ b/htdocs/holiday/card.php @@ -403,7 +403,7 @@ if (empty($reshook)) { $object->fetch($id); - // Si brouillon et créateur + // If draft and owner of leave if ($object->statut == Holiday::STATUS_DRAFT && $cancreate) { $object->oldcopy = dol_clone($object); @@ -430,7 +430,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_user); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; @@ -441,6 +442,7 @@ if (empty($reshook)) // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message .= "\n"; + $message .= $langs->transnoentities("HolidaysToValidateBody")."\n"; $delayForRequest = $object->getConfCP('delayForRequest'); @@ -525,7 +527,7 @@ if (empty($reshook)) { $object->fetch($id); - // Si statut en attente de validation et valideur = utilisateur + // If status is waiting approval and approver is also user if ($object->statut == Holiday::STATUS_VALIDATED && $user->id == $object->fk_validator) { $object->oldcopy = dol_clone($object); @@ -582,7 +584,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_validator); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; @@ -593,6 +596,7 @@ if (empty($reshook)) // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message .= "\n"; + $message .= $langs->transnoentities("HolidaysValidatedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; $message .= "- ".$langs->transnoentitiesnoconv("ValidatedBy")." : ".dolGetFirstLastname($expediteur->firstname, $expediteur->lastname)."\n"; @@ -666,7 +670,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_validator); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; @@ -677,6 +682,7 @@ if (empty($reshook)) // Content $message = $langs->transnoentitiesnoconv("Hello")." ".$destinataire->firstname.",\n"; $message .= "\n"; + $message .= $langs->transnoentities("HolidaysRefusedBody", dol_print_date($object->date_debut, 'day'), dol_print_date($object->date_fin, 'day'))."\n"; $message .= GETPOST('detail_refuse', 'alpha')."\n\n"; @@ -813,7 +819,8 @@ if (empty($reshook)) // From $expediteur = new User($db); $expediteur->fetch($object->fk_user_cancel); - $emailFrom = $expediteur->email; + //$emailFrom = $expediteur->email; Email of user can be an email into another company. Sending will fails, we must use the generic email. + $emailFrom = $conf->global->MAIN_MAIL_EMAIL_FROM; // Subject $societeName = $conf->global->MAIN_INFO_SOCIETE_NOM; From 6e403e6ce0097af91ba420b2f679c6d55d3b5a52 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 18:29:14 +0100 Subject: [PATCH 154/175] Fix warnings --- htdocs/comm/propal/class/propal.class.php | 12 ++++++++++-- htdocs/core/class/commonobject.class.php | 2 +- test/phpunit/PropalTest.php | 6 +++--- 3 files changed, 14 insertions(+), 6 deletions(-) diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index c761f8b3321..dfbae271881 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1099,7 +1099,7 @@ class Propal extends CommonObject if ($this->id) { $this->ref = '(PROV'.$this->id.')'; - $sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".$this->id; + $sql = 'UPDATE '.MAIN_DB_PREFIX."propal SET ref='".$this->db->escape($this->ref)."' WHERE rowid=".((int) $this->id); dol_syslog(get_class($this)."::create", LOG_DEBUG); $resql = $this->db->query($sql); @@ -1111,7 +1111,7 @@ class Propal extends CommonObject } // Add object linked - if (!$error && $this->id && is_array($this->linked_objects) && !empty($this->linked_objects)) + if (!$error && $this->id && !empty($this->linked_objects) && is_array($this->linked_objects)) { foreach ($this->linked_objects as $origin => $tmp_origin_id) { @@ -3753,7 +3753,10 @@ class PropaleLigne extends CommonObjectLine public $product_type = Product::TYPE_PRODUCT; public $qty; + public $tva_tx; + public $vat_src_code; + public $subprice; public $remise_percent; public $fk_remise_except; @@ -3805,6 +3808,11 @@ class PropaleLigne extends CommonObjectLine * @see $product_label */ public $libelle; + /** + * @deprecated + * @see $product_label + */ + public $label; /** * Product label * @var string diff --git a/htdocs/core/class/commonobject.class.php b/htdocs/core/class/commonobject.class.php index 33ac1aba696..6ecdfb93bb5 100644 --- a/htdocs/core/class/commonobject.class.php +++ b/htdocs/core/class/commonobject.class.php @@ -3161,7 +3161,7 @@ abstract class CommonObject $this->multicurrency_total_ttc += isset($this->revenuestamp) ? ($this->revenuestamp * $multicurrency_tx) : 0; // Situations totals - if ($this->situation_cycle_ref && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE) + if (!empty($this->situation_cycle_ref) && $this->situation_counter > 1 && method_exists($this, 'get_prev_sits') && $this->type != $this::TYPE_CREDIT_NOTE) { $prev_sits = $this->get_prev_sits(); diff --git a/test/phpunit/PropalTest.php b/test/phpunit/PropalTest.php index 068fb53b052..ea678e8df34 100644 --- a/test/phpunit/PropalTest.php +++ b/test/phpunit/PropalTest.php @@ -190,11 +190,11 @@ class PropalTest extends PHPUnit\Framework\TestCase $langs=$this->savlangs; $db=$this->savdb; - $localobject->note_private='New note private after update'; - $result=$localobject->update($user); + $localobject->note_private = 'New note private after update'; + $result = $localobject->update($user); $this->assertLessThan($result, 0); - print __METHOD__." id=".$id." result=".$result."\n"; + print __METHOD__." id=".$localobject->id." result=".$result."\n"; return $localobject; } From 92b430495baaf679070c75a0fb772f514a58cab6 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 19:23:40 +0100 Subject: [PATCH 155/175] Stupid composer, the package that makes you lose your time. --- composer.json | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/composer.json b/composer.json index 9fede994525..dbc72b09bd1 100644 --- a/composer.json +++ b/composer.json @@ -1,6 +1,7 @@ { "name" : "dolibarr/dolibarr", "type" : "project", + "version": "999.999.999", "description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business", "keywords" : [ "erp", @@ -35,7 +36,7 @@ "nnnick/chartjs" : "^2.9", "stripe/stripe-php" : "6.43.1", "maximebf/debugbar" : "1.15.1", - "symfony/var-dumper": "3" + "symfony/var-dumper" : "3" }, "require-dev" : { "php-parallel-lint/php-parallel-lint" : "^0", @@ -59,4 +60,4 @@ "ext-zip" : "ODT, Excel and file compression support", "ext-xml" : "Excel support" } -} +} \ No newline at end of file From d8d5524766d8c4c68e058d6fc2ed8af319503d24 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 19:51:22 +0100 Subject: [PATCH 156/175] Update security file --- SECURITY.md | 3 +-- composer.json | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/SECURITY.md b/SECURITY.md index 56e1da679ed..77307516f73 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -12,8 +12,7 @@ This file contains some policies about the security reports on Dolibarr ERP CRM ## Reporting a Vulnerability -To report a vulnerability, please send an email to security@dolibarr.org -In most cases, after fixing the security, we make an answer by email to say the issue has been fixed. +To report a vulnerability, please use GitHub security advisory (alternatively send an email to security@dolibarr.org) ## Hunting vulnerabilities on Dolibarr diff --git a/composer.json b/composer.json index dbc72b09bd1..bd81e101cfc 100644 --- a/composer.json +++ b/composer.json @@ -1,7 +1,6 @@ { "name" : "dolibarr/dolibarr", "type" : "project", - "version": "999.999.999", "description" : "Dolibarr ERP & CRM is a modern and easy to use web software to manage your business", "keywords" : [ "erp", From 078e395bfb91154e5f4481c4403c019c5117af81 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:25:54 +0100 Subject: [PATCH 157/175] Fix gitignore --- htdocs/includes/mike42/escpos-php/.gitignore | 2 ++ htdocs/includes/mike42/escpos-php/autoload.php | 18 +++++++++--------- .../PrintConnectors/CupsPrintConnector.php | 2 +- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/htdocs/includes/mike42/escpos-php/.gitignore b/htdocs/includes/mike42/escpos-php/.gitignore index 8632f891ad4..e7dd4b6263a 100644 --- a/htdocs/includes/mike42/escpos-php/.gitignore +++ b/htdocs/includes/mike42/escpos-php/.gitignore @@ -14,3 +14,5 @@ vendor/ # other build files build/* *.phar +/example/ +/test/ diff --git a/htdocs/includes/mike42/escpos-php/autoload.php b/htdocs/includes/mike42/escpos-php/autoload.php index 47ed7d9e9c3..7779486b824 100644 --- a/htdocs/includes/mike42/escpos-php/autoload.php +++ b/htdocs/includes/mike42/escpos-php/autoload.php @@ -1,26 +1,26 @@ Date: Mon, 7 Dec 2020 20:33:13 +0100 Subject: [PATCH 158/175] Update lib --- htdocs/includes/symfony/var-dumper/.gitignore | 3 + .../includes/symfony/var-dumper/composer.json | 83 +++++++++---------- .../symfony/var-dumper/phpunit.xml.dist | 29 +++++++ 3 files changed, 72 insertions(+), 43 deletions(-) create mode 100644 htdocs/includes/symfony/var-dumper/.gitignore create mode 100644 htdocs/includes/symfony/var-dumper/phpunit.xml.dist diff --git a/htdocs/includes/symfony/var-dumper/.gitignore b/htdocs/includes/symfony/var-dumper/.gitignore new file mode 100644 index 00000000000..5414c2c655e --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/.gitignore @@ -0,0 +1,3 @@ +composer.lock +phpunit.xml +vendor/ diff --git a/htdocs/includes/symfony/var-dumper/composer.json b/htdocs/includes/symfony/var-dumper/composer.json index a90729b6bbe..05955f69430 100644 --- a/htdocs/includes/symfony/var-dumper/composer.json +++ b/htdocs/includes/symfony/var-dumper/composer.json @@ -1,44 +1,41 @@ { - "name" : "symfony/var-dumper", - "type" : "library", - "description" : "Symfony mechanism for exploring and dumping PHP variables", - "keywords" : [ - "dump", - "debug" - ], - "homepage" : "https://symfony.com", - "license" : "MIT", - "authors" : [{ - "name" : "Nicolas Grekas", - "email" : "p@tchwork.com" - }, { - "name" : "Symfony Community", - "homepage" : "https://symfony.com/contributors" - } - ], - "require" : { - "php" : ">=5.5.9", - "symfony/polyfill-mbstring" : "~1.0" - }, - "require-dev" : { - "twig/twig" : "~1.20|~2.0" - }, - "suggest" : {}, - "autoload" : { - "files" : [ - "Resources/functions/dump.php" - ], - "psr-4" : { - "Symfony\\Component\\VarDumper\\" : "" - }, - "exclude-from-classmap" : [ - "/Tests/" - ] - }, - "minimum-stability" : "dev", - "extra" : { - "branch-alias" : { - "dev-master" : "3.0-dev" - } - } -} \ No newline at end of file + "name": "symfony/var-dumper", + "type": "library", + "description": "Symfony mechanism for exploring and dumping PHP variables", + "keywords": ["dump", "debug"], + "homepage": "https://symfony.com", + "license": "MIT", + "authors": [ + { + "name": "Nicolas Grekas", + "email": "p@tchwork.com" + }, + { + "name": "Symfony Community", + "homepage": "https://symfony.com/contributors" + } + ], + "require": { + "php": ">=5.5.9", + "symfony/polyfill-mbstring": "~1.0" + }, + "require-dev": { + "twig/twig": "~1.20|~2.0" + }, + "suggest": { + "ext-symfony_debug": "" + }, + "autoload": { + "files": [ "Resources/functions/dump.php" ], + "psr-4": { "Symfony\\Component\\VarDumper\\": "" }, + "exclude-from-classmap": [ + "/Tests/" + ] + }, + "minimum-stability": "dev", + "extra": { + "branch-alias": { + "dev-master": "3.0-dev" + } + } +} diff --git a/htdocs/includes/symfony/var-dumper/phpunit.xml.dist b/htdocs/includes/symfony/var-dumper/phpunit.xml.dist new file mode 100644 index 00000000000..bb16a3a4ec0 --- /dev/null +++ b/htdocs/includes/symfony/var-dumper/phpunit.xml.dist @@ -0,0 +1,29 @@ + + + + + + + + + + ./Tests/ + + + + + + ./ + + ./Resources + ./Tests + ./vendor + + + + From d5b009a22a53303fced917cfaab81be5e0bb1d79 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:36:42 +0100 Subject: [PATCH 159/175] Add .gitignore --- htdocs/includes/tecnickcom/tcpdf/.gitignore | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 htdocs/includes/tecnickcom/tcpdf/.gitignore diff --git a/htdocs/includes/tecnickcom/tcpdf/.gitignore b/htdocs/includes/tecnickcom/tcpdf/.gitignore new file mode 100644 index 00000000000..56fd659871f --- /dev/null +++ b/htdocs/includes/tecnickcom/tcpdf/.gitignore @@ -0,0 +1,2 @@ +/examples/ +/tools/ \ No newline at end of file From bb217db31e6b9abb3aa25825516943425122a0c2 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:38:15 +0100 Subject: [PATCH 160/175] Ad .gitignore --- htdocs/includes/restler/framework/Luracast/Restler/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 htdocs/includes/restler/framework/Luracast/Restler/.gitignore diff --git a/htdocs/includes/restler/framework/Luracast/Restler/.gitignore b/htdocs/includes/restler/framework/Luracast/Restler/.gitignore new file mode 100644 index 00000000000..5fe55bc3882 --- /dev/null +++ b/htdocs/includes/restler/framework/Luracast/Restler/.gitignore @@ -0,0 +1 @@ +/Explorer/ From 644bac0b808285ca9093924709157d2f6141725b Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:39:59 +0100 Subject: [PATCH 161/175] Removed gitignore --- htdocs/includes/restler/framework/Luracast/Restler/.gitignore | 1 - 1 file changed, 1 deletion(-) delete mode 100644 htdocs/includes/restler/framework/Luracast/Restler/.gitignore diff --git a/htdocs/includes/restler/framework/Luracast/Restler/.gitignore b/htdocs/includes/restler/framework/Luracast/Restler/.gitignore deleted file mode 100644 index 5fe55bc3882..00000000000 --- a/htdocs/includes/restler/framework/Luracast/Restler/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/Explorer/ From 6abf1b6ac2139fc781593d73cc92a6fa2bec0956 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 20:59:07 +0100 Subject: [PATCH 162/175] Error message --- htdocs/api/admin/index.php | 3 ++- htdocs/langs/en_US/errors.lang | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/htdocs/api/admin/index.php b/htdocs/api/admin/index.php index b4ebb6cb30e..1d15d5b9e75 100644 --- a/htdocs/api/admin/index.php +++ b/htdocs/api/admin/index.php @@ -160,7 +160,8 @@ if (dol_is_dir(DOL_DOCUMENT_ROOT.'/includes/restler/framework/Luracast/Restler/e $url = DOL_MAIN_URL_ROOT.'/api/index.php/explorer'; print img_picto('', 'globe').' '.$url."
\n"; } else { - print $langs->trans("NotAvailableWithThisDistribution"); + $langs->load("errors"); + print info_admin($langs->trans("ErrorNotAvailableWithThisDistribution"), 0, 0, 'error'); } llxFooter(); diff --git a/htdocs/langs/en_US/errors.lang b/htdocs/langs/en_US/errors.lang index 2413e6d76ba..056c9240bd0 100644 --- a/htdocs/langs/en_US/errors.lang +++ b/htdocs/langs/en_US/errors.lang @@ -250,6 +250,7 @@ ErrorParameterMustBeEnabledToAllwoThisFeature=Error, parameter %s must be ErrorLoginDateValidity=Error, this login is outside the validity date range ErrorValueLength=Length of field '%s' must be higher than '%s' ErrorReservedKeyword=The word '%s' is a reserved keyword +ErrorNotAvailableWithThisDistribution=Not available with this distribution # Warnings WarningParamUploadMaxFileSizeHigherThanPostMaxSize=Your PHP parameter upload_max_filesize (%s) is higher than PHP parameter post_max_size (%s). This is not a consistent setup. WarningPasswordSetWithNoAccount=A password was set for this member. However, no user account was created. So this password is stored but can't be used to login to Dolibarr. It may be used by an external module/interface but if you don't need to define any login nor password for a member, you can disable option "Manage a login for each member" from Member module setup. If you need to manage a login but don't need any password, you can keep this field empty to avoid this warning. Note: Email can also be used as a login if the member is linked to a user. From f738c875d8257a63917c5cae9dc3062e6fa04973 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:10:10 +0100 Subject: [PATCH 163/175] Update gitignore --- composer.lock | 4 +- htdocs/includes/nnnick/chartjs/.gitignore | 7 ++- htdocs/includes/nnnick/chartjs/composer.json | 49 ++++++++++---------- 3 files changed, 32 insertions(+), 28 deletions(-) diff --git a/composer.lock b/composer.lock index 5afe0ca34f2..93226d8f2c8 100644 --- a/composer.lock +++ b/composer.lock @@ -217,7 +217,7 @@ }, { "name": "nnnick/chartjs", - "version": "v2.9.3", + "version": "v2.9.4", "source": { "type": "git", "url": "https://github.com/chartjs/Chart.js.git", @@ -315,7 +315,7 @@ "time": "2015-05-01T07:00:55+00:00" }, { - "name": "psr/log", + "name": "Psr/log", "version": "1.1.3", "source": { "type": "git", diff --git a/htdocs/includes/nnnick/chartjs/.gitignore b/htdocs/includes/nnnick/chartjs/.gitignore index 6a066b92f38..8a4a4294d61 100644 --- a/htdocs/includes/nnnick/chartjs/.gitignore +++ b/htdocs/includes/nnnick/chartjs/.gitignore @@ -1,8 +1,13 @@ +.github /_book /coverage /custom /dist -/docs/index.md +/docs +/samples +/scripts +/src +/test /gh-pages /jsdoc /node_modules diff --git a/htdocs/includes/nnnick/chartjs/composer.json b/htdocs/includes/nnnick/chartjs/composer.json index b332bb0f595..9df2b22fc50 100644 --- a/htdocs/includes/nnnick/chartjs/composer.json +++ b/htdocs/includes/nnnick/chartjs/composer.json @@ -1,26 +1,25 @@ { - "name": "nnnick/chartjs", - "type": "library", - "description": "Simple HTML5 charts using the canvas element.", - "keywords": [ - "chart", - "js" - ], - "homepage": "https://www.chartjs.org/", - "license": "MIT", - "authors": [ - { - "name": "NICK DOWNIE", - "email": "hello@nickdownie.com" - } - ], - "require": { - "php": ">=5.3.3" - }, - "minimum-stability": "stable", - "extra": { - "branch-alias": { - "release/2.0": "v2.0-dev" - } - } -} + "name" : "nnnick/chartjs", + "type" : "library", + "description" : "Simple HTML5 charts using the canvas element.", + "keywords" : [ + "chart", + "js" + ], + "homepage" : "https://www.chartjs.org/", + "license" : "MIT", + "authors" : [{ + "name" : "NICK DOWNIE", + "email" : "hello@nickdownie.com" + } + ], + "require" : { + "php" : ">=5.3.3" + }, + "minimum-stability" : "stable", + "extra" : { + "branch-alias" : { + "release/2.0" : "v2.0-dev" + } + } +} \ No newline at end of file From 4bc2e791a8b29aa7ac858a479b316747db41953e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:44:19 +0100 Subject: [PATCH 164/175] Update .gitignore --- htdocs/includes/mike42/escpos-php/.gitignore | 6 +----- package.json | 1 + 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/htdocs/includes/mike42/escpos-php/.gitignore b/htdocs/includes/mike42/escpos-php/.gitignore index e7dd4b6263a..2b6e1a8d17c 100644 --- a/htdocs/includes/mike42/escpos-php/.gitignore +++ b/htdocs/includes/mike42/escpos-php/.gitignore @@ -4,9 +4,7 @@ .buildpath # doxygen files -doc/html -doc/latex -doc/doxygen_sqlite3.db +doc # composer files vendor/ @@ -14,5 +12,3 @@ vendor/ # other build files build/* *.phar -/example/ -/test/ diff --git a/package.json b/package.json index 01d3a4300ee..56f8ced1d4b 100644 --- a/package.json +++ b/package.json @@ -8,6 +8,7 @@ "test:e2e": "node_modules/cucumber/bin/cucumber-js --require test/acceptance/index.js --require test/acceptance/setup.js --require test/acceptance/stepDefinitions -f node_modules/cucumber-pretty" }, "dependencies": { + "chart.js": "^2.9.4", "cucumber-pretty": "^6.0.0", "node-fetch": "^2.6.1" } From 796fe5cd8af0f23b9dc556ba92e5cd9d7c67cb0c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:47:57 +0100 Subject: [PATCH 165/175] Update .gitignore --- htdocs/includes/mobiledetect/mobiledetectlib/.gitignore | 1 + 1 file changed, 1 insertion(+) create mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/.gitignore diff --git a/htdocs/includes/mobiledetect/mobiledetectlib/.gitignore b/htdocs/includes/mobiledetect/mobiledetectlib/.gitignore new file mode 100644 index 00000000000..2f88269126d --- /dev/null +++ b/htdocs/includes/mobiledetect/mobiledetectlib/.gitignore @@ -0,0 +1 @@ +/docs From 85bb3fa909b4e18faecca48ce7d7f1e9c05c0aad Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 7 Dec 2020 21:57:29 +0100 Subject: [PATCH 166/175] Update chart.js to 2.9.4 --- COPYRIGHT | 2 +- build/makepack-dolibarr.pl | 31 +- composer.json | 2 +- composer.lock | 261 +- htdocs/includes/mike42/escpos-php/doc/FAQ.md | 142 - .../includes/mike42/escpos-php/doc/Makefile | 20 - .../mike42/escpos-php/doc/escpos.doxyfile | 2352 ----------------- .../mobiledetectlib/docs/CONTRIBUTING.md | 48 - .../mobiledetectlib/docs/HISTORY.md | 11 - .../mobiledetectlib/docs/ISSUE_TEMPLATE.md | 15 - .../mobiledetectlib/docs/KNOWN_LIMITATIONS.md | 12 - htdocs/includes/nnnick/chartjs/.travis.yml | 4 +- htdocs/includes/nnnick/chartjs/composer.json | 49 +- .../nnnick/chartjs/dist/Chart.bundle.js | 45 +- .../nnnick/chartjs/dist/Chart.bundle.min.js | 6 +- htdocs/includes/nnnick/chartjs/dist/Chart.js | 45 +- .../includes/nnnick/chartjs/dist/Chart.min.js | 6 +- .../includes/nnnick/chartjs/package-lock.json | 2 +- htdocs/includes/nnnick/chartjs/package.json | 2 +- 19 files changed, 180 insertions(+), 2875 deletions(-) delete mode 100644 htdocs/includes/mike42/escpos-php/doc/FAQ.md delete mode 100644 htdocs/includes/mike42/escpos-php/doc/Makefile delete mode 100644 htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/CONTRIBUTING.md delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/HISTORY.md delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/ISSUE_TEMPLATE.md delete mode 100644 htdocs/includes/mobiledetect/mobiledetectlib/docs/KNOWN_LIMITATIONS.md diff --git a/COPYRIGHT b/COPYRIGHT index d43f4d506f1..adf7d38c04b 100644 --- a/COPYRIGHT +++ b/COPYRIGHT @@ -39,7 +39,7 @@ TCPDI 1.0.0 LGPL-3+ / Apache 2.0 Yes JS libraries: Ace 1.4.8 BSD Yes JS library to get code syntaxique coloration in a textarea. -ChartJS 2.9.3 MIT License Yes JS library for graph +ChartJS 2.9.4 MIT License Yes JS library for graph jQuery 3.5.1 MIT License Yes JS library jQuery UI 1.12.1 GPL and MIT License Yes JS library plugin UI jQuery select2 4.0.13 GPL and Apache License Yes JS library plugin for sexier multiselect. Warning: 4.0.6+ create troubles without patching css diff --git a/build/makepack-dolibarr.pl b/build/makepack-dolibarr.pl index 314aaff7177..17a935f6234 100755 --- a/build/makepack-dolibarr.pl +++ b/build/makepack-dolibarr.pl @@ -581,23 +581,36 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/workstation*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/oblyon*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/themes/allscreen*`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; + # Removed other test files $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/public/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/Thumbs.db $BUILDROOT/$PROJECT/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/Thumbs.db $BUILDROOT/$PROJECT/*/*/*/*/Thumbs.db`; $ret=`rm -f $BUILDROOT/$PROJECT/.cvsignore $BUILDROOT/$PROJECT/*/.cvsignore $BUILDROOT/$PROJECT/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/.cvsignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.cvsignore`; $ret=`rm -f $BUILDROOT/$PROJECT/.gitignore $BUILDROOT/$PROJECT/*/.gitignore $BUILDROOT/$PROJECT/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/.gitignore $BUILDROOT/$PROJECT/*/*/*/*/*/*/.gitignore`; + + # Removed files installed by the awful composer $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/geoip/sample*.*`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/bin`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/adapters`; # Keep this removal in case we embed libraries $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/ckeditor/samples`; # Keep this removal in case we embed libraries $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/ckeditor/_source`; # _source must be kept into tarball for official debian, not for the rest - + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/composer`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/doctrine`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/multiselect/MIT-LICENSE.txt`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/jquery/plugins/select2/release.sh`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/doc`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/example`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/mike42/escpos-php/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/.gitmodules`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/mobiledetect/mobiledetectlib/docs`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/.github`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/docs`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/samples`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/scripts`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/src`; + $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nnnick/chartjs/test`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/lib/Mail`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/nusoap/samples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/parsedown/LICENSE.txt`; @@ -612,21 +625,17 @@ if ($nboftargetok) { $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/sabre/sabre/*/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/tests`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/stripe/LICENSE`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/dejavu-fonts-ttf-*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/freefont-*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/ae_fonts_*`; - $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/fonts/utils`; - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tcpdf/LICENSE.TXT`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/examples`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/dejavu-fonts-ttf-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/freefont-*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/ae_fonts_*`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/fonts/utils`; $ret=`rm -fr $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/LICENSE.TXT`; - + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/tecnickcom/tcpdf/tools`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/vendor`; + $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/webmozart`; $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/includes/autoload.php`; - - $ret=`rm -f $BUILDROOT/$PROJECT/htdocs/theme/common/octicons/LICENSE`; } # Build package for each target diff --git a/composer.json b/composer.json index bd81e101cfc..a943fbe0aa3 100644 --- a/composer.json +++ b/composer.json @@ -59,4 +59,4 @@ "ext-zip" : "ODT, Excel and file compression support", "ext-xml" : "Excel support" } -} \ No newline at end of file +} diff --git a/composer.lock b/composer.lock index 93226d8f2c8..e0462435f5e 100644 --- a/composer.lock +++ b/composer.lock @@ -6,6 +6,53 @@ ], "content-hash": "1dbd2d05cc0836acfca5988f29005cf2", "packages": [ + { + "name": "Psr/log", + "version": "1.1.3", + "source": { + "type": "git", + "url": "https://github.com/php-fig/log.git", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" + }, + "dist": { + "type": "zip", + "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", + "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", + "shasum": "" + }, + "require": { + "php": ">=5.3.0" + }, + "type": "library", + "extra": { + "branch-alias": { + "dev-master": "1.1.x-dev" + } + }, + "autoload": { + "psr-4": { + "Psr\\Log\\": "Psr/Log/" + } + }, + "notification-url": "https://packagist.org/downloads/", + "license": [ + "MIT" + ], + "authors": [ + { + "name": "PHP-FIG", + "homepage": "http://www.php-fig.org/" + } + ], + "description": "Common interface for logging libraries", + "homepage": "https://github.com/php-fig/log", + "keywords": [ + "log", + "psr", + "psr-3" + ], + "time": "2020-03-23T09:12:05+00:00" + }, { "name": "ckeditor/ckeditor", "version": "4.12.1", @@ -221,12 +268,12 @@ "source": { "type": "git", "url": "https://github.com/chartjs/Chart.js.git", - "reference": "06f73dc3590084b2c464bf08189c7aee2b6b92d2" + "reference": "9bd4cf82fda9f50a5fb50b72843e06ab88124278" }, "dist": { "type": "zip", - "url": "https://api.github.com/repos/chartjs/Chart.js/zipball/06f73dc3590084b2c464bf08189c7aee2b6b92d2", - "reference": "06f73dc3590084b2c464bf08189c7aee2b6b92d2", + "url": "https://api.github.com/repos/chartjs/Chart.js/zipball/9bd4cf82fda9f50a5fb50b72843e06ab88124278", + "reference": "9bd4cf82fda9f50a5fb50b72843e06ab88124278", "shasum": "" }, "require": { @@ -254,7 +301,11 @@ "JS", "chart" ], - "time": "2019-11-14T18:37:30+00:00" + "support": { + "issues": "https://github.com/chartjs/Chart.js/issues", + "source": "https://github.com/chartjs/Chart.js/tree/v2.9.4" + }, + "time": "2020-10-19T12:22:11+00:00" }, { "name": "phpoffice/phpexcel", @@ -314,53 +365,6 @@ "abandoned": "phpoffice/phpspreadsheet", "time": "2015-05-01T07:00:55+00:00" }, - { - "name": "Psr/log", - "version": "1.1.3", - "source": { - "type": "git", - "url": "https://github.com/php-fig/log.git", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/php-fig/log/zipball/0f73288fd15629204f9d42b7055f72dacbe811fc", - "reference": "0f73288fd15629204f9d42b7055f72dacbe811fc", - "shasum": "" - }, - "require": { - "php": ">=5.3.0" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.1.x-dev" - } - }, - "autoload": { - "psr-4": { - "Psr\\Log\\": "Psr/Log/" - } - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "PHP-FIG", - "homepage": "http://www.php-fig.org/" - } - ], - "description": "Common interface for logging libraries", - "homepage": "https://github.com/php-fig/log", - "keywords": [ - "log", - "psr", - "psr-3" - ], - "time": "2020-03-23T09:12:05+00:00" - }, { "name": "restler/framework", "version": "3.0.0-RC6", @@ -2037,159 +2041,6 @@ ], "time": "2019-08-06T08:03:45+00:00" }, - { - "name": "symfony/polyfill-php72", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php72.git", - "reference": "639447d008615574653fb3bc60d1986d7172eaae" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php72/zipball/639447d008615574653fb3bc60d1986d7172eaae", - "reference": "639447d008615574653fb3bc60d1986d7172eaae", - "shasum": "" - }, - "require": { - "php": ">=5.3.3" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php72\\": "" - }, - "files": [ - "bootstrap.php" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 7.2+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" - }, - { - "name": "symfony/polyfill-php80", - "version": "v1.18.1", - "source": { - "type": "git", - "url": "https://github.com/symfony/polyfill-php80.git", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981" - }, - "dist": { - "type": "zip", - "url": "https://api.github.com/repos/symfony/polyfill-php80/zipball/d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "reference": "d87d5766cbf48d72388a9f6b85f280c8ad51f981", - "shasum": "" - }, - "require": { - "php": ">=7.0.8" - }, - "type": "library", - "extra": { - "branch-alias": { - "dev-master": "1.18-dev" - }, - "thanks": { - "name": "symfony/polyfill", - "url": "https://github.com/symfony/polyfill" - } - }, - "autoload": { - "psr-4": { - "Symfony\\Polyfill\\Php80\\": "" - }, - "files": [ - "bootstrap.php" - ], - "classmap": [ - "Resources/stubs" - ] - }, - "notification-url": "https://packagist.org/downloads/", - "license": [ - "MIT" - ], - "authors": [ - { - "name": "Ion Bazan", - "email": "ion.bazan@gmail.com" - }, - { - "name": "Nicolas Grekas", - "email": "p@tchwork.com" - }, - { - "name": "Symfony Community", - "homepage": "https://symfony.com/contributors" - } - ], - "description": "Symfony polyfill backporting some PHP 8.0+ features to lower PHP versions", - "homepage": "https://symfony.com", - "keywords": [ - "compatibility", - "polyfill", - "portable", - "shim" - ], - "funding": [ - { - "url": "https://symfony.com/sponsor", - "type": "custom" - }, - { - "url": "https://github.com/fabpot", - "type": "github" - }, - { - "url": "https://tidelift.com/funding/github/packagist/symfony/symfony", - "type": "tidelift" - } - ], - "time": "2020-07-14T12:35:20+00:00" - }, { "name": "symfony/yaml", "version": "v3.4.32", @@ -2312,5 +2163,5 @@ "ext-curl": "*" }, "platform-dev": [], - "plugin-api-version": "1.1.0" + "plugin-api-version": "2.0.0" } diff --git a/htdocs/includes/mike42/escpos-php/doc/FAQ.md b/htdocs/includes/mike42/escpos-php/doc/FAQ.md deleted file mode 100644 index 6b7a6247bca..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/FAQ.md +++ /dev/null @@ -1,142 +0,0 @@ -# Frequently Asked Questions (FAQ) - -## Can I print to File Format X with this? - -If you are trying to generate XPS, PDF or DOCX or HTML files from PHP, then you are most likely in the wrong place. - -The purpose of this driver it to generate binary ESC/POS code, which is understood by many embedded thermal receipt and impact printers. - -## I have Printer X. Can I use this driver? - -If the printer understands ESC/POS, and you know how to get raw binary data to it, then yes. Otherwise, no. - -The [list of printers that are known to work](https://github.com/mike42/escpos-php/blob/development/README.md#printers) is crowd-sourced. We appreciate it when developers try out the driver, then [file information on the bug tracker](https://github.com/mike42/escpos-php/issues/new) with some information about which features worked on their model of printer. - -To see how well your printer works, first check that it supports ESC/POS, then begin by attempting to send the text "Hello World" to your printer on the command-line, from the computer that will run PHP. - -Once you solve this, [try to do the same from PHP](https://github.com/mike42/escpos-php/blob/development/README.md#basic-usage) using the default profile. Further details are in the [README](https://github.com/mike42/escpos-php/blob/development/README.md) file. - -## Can you add support for Printer X? - -Features vary between printers, so we collaborate on an ESC/POS printer compatibility database to collect known differences: [receipt-print-hq/escpos-printer-db](https://github.com/receipt-print-hq/escpos-printer-db). - -If you encounter garbage output when you try to print images or special characters, then please submit a test page and a link to vendor documentation to the `escpos-printer-db` project, so that support can be improved for future versions. - -## I have a printer that does not understand ESC/POS. Can I use this driver? - -No. The purpose of this driver it to generate binary ESC/POS code. If your printer doesn't understand that, then this code wont be much use to you. - -Some printers do have an emulation mode for ESC/POS. The vendor docs will tell if this is the case, and how to enable it. - -## Why do I get this error when I try to print? - -Start by testing that you can send text to your printer outside of escpos-php. The examples linked to in the README are commented with some commands to get you started. - -Generally, initial setup problems seem to have one of these causes: - -1. You are writing to the wrong place. Writing to `LPT1` does not output to parallel port on Linux, and `/dev/ttyS0` is not a serial printer on Windows. -2. The printer has not been set up to accept printing the way you expect. This means permissions on Linux, network printers being configured, and shared printers having user accounts and firewalls set up correctly on the print server. -3. Your printer actually doesn't work (rare but possible). - -To be clear, these are not escpos-php issues: No amount of PHP code can set up your printer for you. Instead, the driver relies on developers determining how their setup is going to work before using a connector to transport data to their printer. - -Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. You can try to use a PrintConnector now, based on your operating system and printer interface. A table is located in the README to help you select the right one. - -The connectors are- - -- `FilePrintConnector` and `NetworkPrintConnector` directly use files or network sockets. -- `WindowsPrintConnector` and `CupsPrintConnector` tie in with Windows and Unix system printing. -- `DummyPrintConnector` does not connect to a real printer, and can be used to save ESC/POS receipts to a database, for example. - -At this point, you might find that the way you would like to print is not supported by escpos-php. You can post your printing command as a feature request on the issue tracker. - -Lastly, you may run in to the final common trap: - -4. Your PHP is not running with the same sort of permissions as your login account. Again, no amount of PHP code can fix this. For example, on LAMP, your `www-data` user needs to be in the `lp` group, while on WAMP, `Local Service` account may run in to problems. SELinux and firewalls are also worth a look. - -When printing fails, you can expect a PHP Exception that explains what went wrong. They are all clues: - -- `Warning: copy(\\pc\printer): failed to open stream: Permission denied` -- `/dev/usb/lp0: Permission denied` -- `User name or password is incorrect` - -Ensure that while you are developing, you configure PHP to show error messages, so that you can see these problems. - -Please file a bug if you think that there is a specific situation which escpos-php could provide better error messages for. - -## Can I print over the network? - -Certainly, as long as your printer is available over the network. - -- `NetworkPrintConnector` will speak directly to an Ethernet-connected printer on port 9100. - -For USB or Serial printers, you need to install the printer on a computer and then share it, so that it becomes network-accessible. - -- `WindowsPrintConnector` will connect to Windows shared printers from Windows or Linux (Linux users will need Samba). -- `CupsPrintConnector` will connect to CUPS-shared printers from Linux or Mac. - -Always start by testing your shared printer setup outside of escpos-php. The examples linked to in the README are commented with some example commands to get you started. Typically, networks, firewalls and permissions need to be set up. - -Once you have a working command to send text to your printer (from the PHP server), you are ready to use escpos-php. - -If you have any issues at this stage, please ask on the issue tracker, and include the commands that you used to verify your setup. - -## Can I print from my server on the Internet? - -Since PHP is a server-side language, escpos-php is a server-side print library. The driver is able to transport data between a server and a printer in a few different ways, all of them server-side. For example, you may print to a USB printer *connected to the server running PHP*, or an Ethernet printer *on a network accessible to the server*. - -Many developers dream of having an application that is hosted on the public Internet, with POS terminals accessing it, and printing via a web browser. Because the webserver cannot see the printer in this sort of setup, a server-side print driver is not much use. - -Because of this, there are no cut-and-paste recipes available, but here are two top-level approaches you could take: - -1. Architect your application so that the server can see your printer -2. Use an application which runs client-side to deliver print data instead - -### Option 1: Allow the server to print - -Server-side printing is viable if the server can get to the printer. Here are some ways it could work: - -- Run your server on the LAN instead, and read the section above about printing over the network -- Set up a VPN so that your cloud-hosted server can also access the LAN -- Expose the printer via some other secure tunnel to the server, via SSH or TLS - -Please do your own research to determine how these may apply to your setup- the escpos-php issue tracker is not a place where you should be requesting network support. - -### Option 2: Use client software to print - -If you aren't able to set up some network infrastructure to implement the above, then you cannot use a server-side print driver. - -Here are some browser-based printing tools which you may like to consider instead. - -- Use system printing with a vendor driver, and some good `@media print` CSS -- [Chrome Raw Print](https://github.com/receipt-print-hq/chrome-raw-print) app -- [qz](https://qz.io/) -- [ePOS-Device SDK for JavaScript](https://reference.epson-biz.com/modules/ref_epos_device_js_en/index.php?content_id=139). Requires network interface card that supports ePOS (UB-E04/R04) - -Please direct queries about client-side printing products to the appropriate project. - -## Why is image printing slow? - -Three things tend to slow down the image processing: - -1. Slow PHP code -2. Data link -3. The printer itself - -First, ensure you have the Imagick plugin loaded. The driver will avoid a slower image processing implementation once you've got it. - -Next, connect over a faster interface. Serial printers have a low bit-rate, and the printer spends a lot of time waiting for data. If you have USB or Ethernet, then use it (note: storing graphics to the printer memory is not currently implemented). - -Lastly, the printer will go faster if you use less pixels. Since images are two-dimensional, scaling down by 50% removes 75% of the pixels. The driver can then print at a half the density, so that your lower resolution image appears the same size when printed. - -## How can I get the status of the printer? - -This feature is not implemented, but a solution for some Epson printers is planned. - -Only `FilePrintConnector` or `NetworkPrintConnector` will support reading from the printer, ensure that you migrate to those if you would like these features. - -## How do I produce this complex layout? - -ESC/POS "page mode" is not currently supported, which would allow some printers to render some more complex layouts natively - -Since the output is raster anyway, it is suggested that you render your output to an image and print that instead. The driver supports PDF printing via Imagick, and an example that uses `wkhtmltoimage` is available in the repository. diff --git a/htdocs/includes/mike42/escpos-php/doc/Makefile b/htdocs/includes/mike42/escpos-php/doc/Makefile deleted file mode 100644 index 4e01c2ac0a1..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/Makefile +++ /dev/null @@ -1,20 +0,0 @@ -html: escpos.doxyfile - # Compile - doxygen escpos.doxyfile - # Filter out warnings on README.md- doxygen cannot handle image links that - # are used there: [![Caption](https://example.com/target)](https://example.com/image) - sed -i '/README.md\:/d' warnings.log - # Show warnings log - cat warnings.log - # Return failure if there were any doc warnings - [ ! -s warnings.log ] - -latex: html - # Do nothing - -xml: html - xsltproc xml/combine.xslt xml/index.xml > all.xml - -clean: - rm --preserve-root -Rf html latex xml doxygen_sqlite3.db all.xml warnings.log - diff --git a/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile b/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile deleted file mode 100644 index 0c48656e15b..00000000000 --- a/htdocs/includes/mike42/escpos-php/doc/escpos.doxyfile +++ /dev/null @@ -1,2352 +0,0 @@ -# Doxyfile 1.8.8 - -# This file describes the settings to be used by the documentation system -# doxygen (www.doxygen.org) for a project. -# -# All text after a double hash (##) is considered a comment and is placed in -# front of the TAG it is preceding. -# -# All text after a single hash (#) is considered a comment and will be ignored. -# The format is: -# TAG = value [value, ...] -# For lists, items can also be appended using: -# TAG += value [value, ...] -# Values that contain spaces should be placed between quotes (\" \"). - -#--------------------------------------------------------------------------- -# Project related configuration options -#--------------------------------------------------------------------------- - -# This tag specifies the encoding used for all characters in the config file -# that follow. The default is UTF-8 which is also the encoding used for all text -# before the first occurrence of this tag. Doxygen uses libiconv (or the iconv -# built into libc) for the transcoding. See http://www.gnu.org/software/libiconv -# for the list of possible encodings. -# The default value is: UTF-8. - -DOXYFILE_ENCODING = UTF-8 - -# The PROJECT_NAME tag is a single word (or a sequence of words surrounded by -# double-quotes, unless you are using Doxywizard) that should identify the -# project for which the documentation is generated. This name is used in the -# title of most generated pages and in a few other places. -# The default value is: My Project. - -PROJECT_NAME = "escpos-php" - -# The PROJECT_NUMBER tag can be used to enter a project or revision number. This -# could be handy for archiving the generated documentation or if some version -# control system is used. - -PROJECT_NUMBER = - -# Using the PROJECT_BRIEF tag one can provide an optional one line description -# for a project that appears at the top of each page and should give viewer a -# quick idea about the purpose of the project. Keep the description short. - -PROJECT_BRIEF = - -# With the PROJECT_LOGO tag one can specify an logo or icon that is included in -# the documentation. The maximum height of the logo should not exceed 55 pixels -# and the maximum width should not exceed 200 pixels. Doxygen will copy the logo -# to the output directory. - -PROJECT_LOGO = ../example/resources/escpos-php-small.png - -# The OUTPUT_DIRECTORY tag is used to specify the (relative or absolute) path -# into which the generated documentation will be written. If a relative path is -# entered, it will be relative to the location where doxygen was started. If -# left blank the current directory will be used. - -OUTPUT_DIRECTORY = - -# If the CREATE_SUBDIRS tag is set to YES, then doxygen will create 4096 sub- -# directories (in 2 levels) under the output directory of each output format and -# will distribute the generated files over these directories. Enabling this -# option can be useful when feeding doxygen a huge amount of source files, where -# putting all generated files in the same directory would otherwise causes -# performance problems for the file system. -# The default value is: NO. - -CREATE_SUBDIRS = NO - -# If the ALLOW_UNICODE_NAMES tag is set to YES, doxygen will allow non-ASCII -# characters to appear in the names of generated files. If set to NO, non-ASCII -# characters will be escaped, for example _xE3_x81_x84 will be used for Unicode -# U+3044. -# The default value is: NO. - -ALLOW_UNICODE_NAMES = NO - -# The OUTPUT_LANGUAGE tag is used to specify the language in which all -# documentation generated by doxygen is written. Doxygen will use this -# information to generate all constant output in the proper language. -# Possible values are: Afrikaans, Arabic, Armenian, Brazilian, Catalan, Chinese, -# Chinese-Traditional, Croatian, Czech, Danish, Dutch, English (United States), -# Esperanto, Farsi (Persian), Finnish, French, German, Greek, Hungarian, -# Indonesian, Italian, Japanese, Japanese-en (Japanese with English messages), -# Korean, Korean-en (Korean with English messages), Latvian, Lithuanian, -# Macedonian, Norwegian, Persian (Farsi), Polish, Portuguese, Romanian, Russian, -# Serbian, Serbian-Cyrillic, Slovak, Slovene, Spanish, Swedish, Turkish, -# Ukrainian and Vietnamese. -# The default value is: English. - -OUTPUT_LANGUAGE = English - -# If the BRIEF_MEMBER_DESC tag is set to YES doxygen will include brief member -# descriptions after the members that are listed in the file and class -# documentation (similar to Javadoc). Set to NO to disable this. -# The default value is: YES. - -BRIEF_MEMBER_DESC = YES - -# If the REPEAT_BRIEF tag is set to YES doxygen will prepend the brief -# description of a member or function before the detailed description -# -# Note: If both HIDE_UNDOC_MEMBERS and BRIEF_MEMBER_DESC are set to NO, the -# brief descriptions will be completely suppressed. -# The default value is: YES. - -REPEAT_BRIEF = YES - -# This tag implements a quasi-intelligent brief description abbreviator that is -# used to form the text in various listings. Each string in this list, if found -# as the leading text of the brief description, will be stripped from the text -# and the result, after processing the whole list, is used as the annotated -# text. Otherwise, the brief description is used as-is. If left blank, the -# following values are used ($name is automatically replaced with the name of -# the entity):The $name class, The $name widget, The $name file, is, provides, -# specifies, contains, represents, a, an and the. - -ABBREVIATE_BRIEF = - -# If the ALWAYS_DETAILED_SEC and REPEAT_BRIEF tags are both set to YES then -# doxygen will generate a detailed section even if there is only a brief -# description. -# The default value is: NO. - -ALWAYS_DETAILED_SEC = NO - -# If the INLINE_INHERITED_MEMB tag is set to YES, doxygen will show all -# inherited members of a class in the documentation of that class as if those -# members were ordinary class members. Constructors, destructors and assignment -# operators of the base classes will not be shown. -# The default value is: NO. - -INLINE_INHERITED_MEMB = NO - -# If the FULL_PATH_NAMES tag is set to YES doxygen will prepend the full path -# before files name in the file list and in the header files. If set to NO the -# shortest path that makes the file name unique will be used -# The default value is: YES. - -FULL_PATH_NAMES = YES - -# The STRIP_FROM_PATH tag can be used to strip a user-defined part of the path. -# Stripping is only done if one of the specified strings matches the left-hand -# part of the path. The tag can be used to show relative paths in the file list. -# If left blank the directory from which doxygen is run is used as the path to -# strip. -# -# Note that you can specify absolute paths here, but also relative paths, which -# will be relative from the directory where doxygen is started. -# This tag requires that the tag FULL_PATH_NAMES is set to YES. - -STRIP_FROM_PATH = - -# The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the -# path mentioned in the documentation of a class, which tells the reader which -# header file to include in order to use a class. If left blank only the name of -# the header file containing the class definition is used. Otherwise one should -# specify the list of include paths that are normally passed to the compiler -# using the -I flag. - -STRIP_FROM_INC_PATH = - -# If the SHORT_NAMES tag is set to YES, doxygen will generate much shorter (but -# less readable) file names. This can be useful is your file systems doesn't -# support long names like on DOS, Mac, or CD-ROM. -# The default value is: NO. - -SHORT_NAMES = NO - -# If the JAVADOC_AUTOBRIEF tag is set to YES then doxygen will interpret the -# first line (until the first dot) of a Javadoc-style comment as the brief -# description. If set to NO, the Javadoc-style will behave just like regular Qt- -# style comments (thus requiring an explicit @brief command for a brief -# description.) -# The default value is: NO. - -JAVADOC_AUTOBRIEF = NO - -# If the QT_AUTOBRIEF tag is set to YES then doxygen will interpret the first -# line (until the first dot) of a Qt-style comment as the brief description. If -# set to NO, the Qt-style will behave just like regular Qt-style comments (thus -# requiring an explicit \brief command for a brief description.) -# The default value is: NO. - -QT_AUTOBRIEF = NO - -# The MULTILINE_CPP_IS_BRIEF tag can be set to YES to make doxygen treat a -# multi-line C++ special comment block (i.e. a block of //! or /// comments) as -# a brief description. This used to be the default behavior. The new default is -# to treat a multi-line C++ comment block as a detailed description. Set this -# tag to YES if you prefer the old behavior instead. -# -# Note that setting this tag to YES also means that rational rose comments are -# not recognized any more. -# The default value is: NO. - -MULTILINE_CPP_IS_BRIEF = NO - -# If the INHERIT_DOCS tag is set to YES then an undocumented member inherits the -# documentation from any documented member that it re-implements. -# The default value is: YES. - -INHERIT_DOCS = YES - -# If the SEPARATE_MEMBER_PAGES tag is set to YES, then doxygen will produce a -# new page for each member. If set to NO, the documentation of a member will be -# part of the file/class/namespace that contains it. -# The default value is: NO. - -SEPARATE_MEMBER_PAGES = NO - -# The TAB_SIZE tag can be used to set the number of spaces in a tab. Doxygen -# uses this value to replace tabs by spaces in code fragments. -# Minimum value: 1, maximum value: 16, default value: 4. - -TAB_SIZE = 4 - -# This tag can be used to specify a number of aliases that act as commands in -# the documentation. An alias has the form: -# name=value -# For example adding -# "sideeffect=@par Side Effects:\n" -# will allow you to put the command \sideeffect (or @sideeffect) in the -# documentation, which will result in a user-defined paragraph with heading -# "Side Effects:". You can put \n's in the value part of an alias to insert -# newlines. - -ALIASES = - -# This tag can be used to specify a number of word-keyword mappings (TCL only). -# A mapping has the form "name=value". For example adding "class=itcl::class" -# will allow you to use the command class in the itcl::class meaning. - -TCL_SUBST = - -# Set the OPTIMIZE_OUTPUT_FOR_C tag to YES if your project consists of C sources -# only. Doxygen will then generate output that is more tailored for C. For -# instance, some of the names that are used will be different. The list of all -# members will be omitted, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_FOR_C = NO - -# Set the OPTIMIZE_OUTPUT_JAVA tag to YES if your project consists of Java or -# Python sources only. Doxygen will then generate output that is more tailored -# for that language. For instance, namespaces will be presented as packages, -# qualified scopes will look different, etc. -# The default value is: NO. - -OPTIMIZE_OUTPUT_JAVA = NO - -# Set the OPTIMIZE_FOR_FORTRAN tag to YES if your project consists of Fortran -# sources. Doxygen will then generate output that is tailored for Fortran. -# The default value is: NO. - -OPTIMIZE_FOR_FORTRAN = NO - -# Set the OPTIMIZE_OUTPUT_VHDL tag to YES if your project consists of VHDL -# sources. Doxygen will then generate output that is tailored for VHDL. -# The default value is: NO. - -OPTIMIZE_OUTPUT_VHDL = NO - -# Doxygen selects the parser to use depending on the extension of the files it -# parses. With this tag you can assign which parser to use for a given -# extension. Doxygen has a built-in mapping, but you can override or extend it -# using this tag. The format is ext=language, where ext is a file extension, and -# language is one of the parsers supported by doxygen: IDL, Java, Javascript, -# C#, C, C++, D, PHP, Objective-C, Python, Fortran (fixed format Fortran: -# FortranFixed, free formatted Fortran: FortranFree, unknown formatted Fortran: -# Fortran. In the later case the parser tries to guess whether the code is fixed -# or free formatted code, this is the default for Fortran type files), VHDL. For -# instance to make doxygen treat .inc files as Fortran files (default is PHP), -# and .f files as C (default is Fortran), use: inc=Fortran f=C. -# -# Note For files without extension you can use no_extension as a placeholder. -# -# Note that for custom extensions you also need to set FILE_PATTERNS otherwise -# the files are not read by doxygen. - -EXTENSION_MAPPING = - -# If the MARKDOWN_SUPPORT tag is enabled then doxygen pre-processes all comments -# according to the Markdown format, which allows for more readable -# documentation. See http://daringfireball.net/projects/markdown/ for details. -# The output of markdown processing is further processed by doxygen, so you can -# mix doxygen, HTML, and XML commands with Markdown formatting. Disable only in -# case of backward compatibilities issues. -# The default value is: YES. - -MARKDOWN_SUPPORT = YES - -# When enabled doxygen tries to link words that correspond to documented -# classes, or namespaces to their corresponding documentation. Such a link can -# be prevented in individual cases by by putting a % sign in front of the word -# or globally by setting AUTOLINK_SUPPORT to NO. -# The default value is: YES. - -AUTOLINK_SUPPORT = YES - -# If you use STL classes (i.e. std::string, std::vector, etc.) but do not want -# to include (a tag file for) the STL sources as input, then you should set this -# tag to YES in order to let doxygen match functions declarations and -# definitions whose arguments contain STL classes (e.g. func(std::string); -# versus func(std::string) {}). This also make the inheritance and collaboration -# diagrams that involve STL classes more complete and accurate. -# The default value is: NO. - -BUILTIN_STL_SUPPORT = NO - -# If you use Microsoft's C++/CLI language, you should set this option to YES to -# enable parsing support. -# The default value is: NO. - -CPP_CLI_SUPPORT = NO - -# Set the SIP_SUPPORT tag to YES if your project consists of sip (see: -# http://www.riverbankcomputing.co.uk/software/sip/intro) sources only. Doxygen -# will parse them like normal C++ but will assume all classes use public instead -# of private inheritance when no explicit protection keyword is present. -# The default value is: NO. - -SIP_SUPPORT = NO - -# For Microsoft's IDL there are propget and propput attributes to indicate -# getter and setter methods for a property. Setting this option to YES will make -# doxygen to replace the get and set methods by a property in the documentation. -# This will only work if the methods are indeed getting or setting a simple -# type. If this is not the case, or you want to show the methods anyway, you -# should set this option to NO. -# The default value is: YES. - -IDL_PROPERTY_SUPPORT = YES - -# If member grouping is used in the documentation and the DISTRIBUTE_GROUP_DOC -# tag is set to YES, then doxygen will reuse the documentation of the first -# member in the group (if any) for the other members of the group. By default -# all members of a group must be documented explicitly. -# The default value is: NO. - -DISTRIBUTE_GROUP_DOC = NO - -# Set the SUBGROUPING tag to YES to allow class member groups of the same type -# (for instance a group of public functions) to be put as a subgroup of that -# type (e.g. under the Public Functions section). Set it to NO to prevent -# subgrouping. Alternatively, this can be done per class using the -# \nosubgrouping command. -# The default value is: YES. - -SUBGROUPING = YES - -# When the INLINE_GROUPED_CLASSES tag is set to YES, classes, structs and unions -# are shown inside the group in which they are included (e.g. using \ingroup) -# instead of on a separate page (for HTML and Man pages) or section (for LaTeX -# and RTF). -# -# Note that this feature does not work in combination with -# SEPARATE_MEMBER_PAGES. -# The default value is: NO. - -INLINE_GROUPED_CLASSES = NO - -# When the INLINE_SIMPLE_STRUCTS tag is set to YES, structs, classes, and unions -# with only public data fields or simple typedef fields will be shown inline in -# the documentation of the scope in which they are defined (i.e. file, -# namespace, or group documentation), provided this scope is documented. If set -# to NO, structs, classes, and unions are shown on a separate page (for HTML and -# Man pages) or section (for LaTeX and RTF). -# The default value is: NO. - -INLINE_SIMPLE_STRUCTS = NO - -# When TYPEDEF_HIDES_STRUCT tag is enabled, a typedef of a struct, union, or -# enum is documented as struct, union, or enum with the name of the typedef. So -# typedef struct TypeS {} TypeT, will appear in the documentation as a struct -# with name TypeT. When disabled the typedef will appear as a member of a file, -# namespace, or class. And the struct will be named TypeS. This can typically be -# useful for C code in case the coding convention dictates that all compound -# types are typedef'ed and only the typedef is referenced, never the tag name. -# The default value is: NO. - -TYPEDEF_HIDES_STRUCT = NO - -# The size of the symbol lookup cache can be set using LOOKUP_CACHE_SIZE. This -# cache is used to resolve symbols given their name and scope. Since this can be -# an expensive process and often the same symbol appears multiple times in the -# code, doxygen keeps a cache of pre-resolved symbols. If the cache is too small -# doxygen will become slower. If the cache is too large, memory is wasted. The -# cache size is given by this formula: 2^(16+LOOKUP_CACHE_SIZE). The valid range -# is 0..9, the default is 0, corresponding to a cache size of 2^16=65536 -# symbols. At the end of a run doxygen will report the cache usage and suggest -# the optimal cache size from a speed point of view. -# Minimum value: 0, maximum value: 9, default value: 0. - -LOOKUP_CACHE_SIZE = 0 - -#--------------------------------------------------------------------------- -# Build related configuration options -#--------------------------------------------------------------------------- - -# If the EXTRACT_ALL tag is set to YES doxygen will assume all entities in -# documentation are documented, even if no documentation was available. Private -# class members and static file members will be hidden unless the -# EXTRACT_PRIVATE respectively EXTRACT_STATIC tags are set to YES. -# Note: This will also disable the warnings about undocumented members that are -# normally produced when WARNINGS is set to YES. -# The default value is: NO. - -EXTRACT_ALL = NO - -# If the EXTRACT_PRIVATE tag is set to YES all private members of a class will -# be included in the documentation. -# The default value is: NO. - -EXTRACT_PRIVATE = NO - -# If the EXTRACT_PACKAGE tag is set to YES all members with package or internal -# scope will be included in the documentation. -# The default value is: NO. - -EXTRACT_PACKAGE = NO - -# If the EXTRACT_STATIC tag is set to YES all static members of a file will be -# included in the documentation. -# The default value is: NO. - -EXTRACT_STATIC = NO - -# If the EXTRACT_LOCAL_CLASSES tag is set to YES classes (and structs) defined -# locally in source files will be included in the documentation. If set to NO -# only classes defined in header files are included. Does not have any effect -# for Java sources. -# The default value is: YES. - -EXTRACT_LOCAL_CLASSES = YES - -# This flag is only useful for Objective-C code. When set to YES local methods, -# which are defined in the implementation section but not in the interface are -# included in the documentation. If set to NO only methods in the interface are -# included. -# The default value is: NO. - -EXTRACT_LOCAL_METHODS = NO - -# If this flag is set to YES, the members of anonymous namespaces will be -# extracted and appear in the documentation as a namespace called -# 'anonymous_namespace{file}', where file will be replaced with the base name of -# the file that contains the anonymous namespace. By default anonymous namespace -# are hidden. -# The default value is: NO. - -EXTRACT_ANON_NSPACES = NO - -# If the HIDE_UNDOC_MEMBERS tag is set to YES, doxygen will hide all -# undocumented members inside documented classes or files. If set to NO these -# members will be included in the various overviews, but no documentation -# section is generated. This option has no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_MEMBERS = NO - -# If the HIDE_UNDOC_CLASSES tag is set to YES, doxygen will hide all -# undocumented classes that are normally visible in the class hierarchy. If set -# to NO these classes will be included in the various overviews. This option has -# no effect if EXTRACT_ALL is enabled. -# The default value is: NO. - -HIDE_UNDOC_CLASSES = NO - -# If the HIDE_FRIEND_COMPOUNDS tag is set to YES, doxygen will hide all friend -# (class|struct|union) declarations. If set to NO these declarations will be -# included in the documentation. -# The default value is: NO. - -HIDE_FRIEND_COMPOUNDS = NO - -# If the HIDE_IN_BODY_DOCS tag is set to YES, doxygen will hide any -# documentation blocks found inside the body of a function. If set to NO these -# blocks will be appended to the function's detailed documentation block. -# The default value is: NO. - -HIDE_IN_BODY_DOCS = NO - -# The INTERNAL_DOCS tag determines if documentation that is typed after a -# \internal command is included. If the tag is set to NO then the documentation -# will be excluded. Set it to YES to include the internal documentation. -# The default value is: NO. - -INTERNAL_DOCS = NO - -# If the CASE_SENSE_NAMES tag is set to NO then doxygen will only generate file -# names in lower-case letters. If set to YES upper-case letters are also -# allowed. This is useful if you have classes or files whose names only differ -# in case and if your file system supports case sensitive file names. Windows -# and Mac users are advised to set this option to NO. -# The default value is: system dependent. - -CASE_SENSE_NAMES = YES - -# If the HIDE_SCOPE_NAMES tag is set to NO then doxygen will show members with -# their full class and namespace scopes in the documentation. If set to YES the -# scope will be hidden. -# The default value is: NO. - -HIDE_SCOPE_NAMES = NO - -# If the SHOW_INCLUDE_FILES tag is set to YES then doxygen will put a list of -# the files that are included by a file in the documentation of that file. -# The default value is: YES. - -SHOW_INCLUDE_FILES = YES - -# If the SHOW_GROUPED_MEMB_INC tag is set to YES then Doxygen will add for each -# grouped member an include statement to the documentation, telling the reader -# which file to include in order to use the member. -# The default value is: NO. - -SHOW_GROUPED_MEMB_INC = NO - -# If the FORCE_LOCAL_INCLUDES tag is set to YES then doxygen will list include -# files with double quotes in the documentation rather than with sharp brackets. -# The default value is: NO. - -FORCE_LOCAL_INCLUDES = NO - -# If the INLINE_INFO tag is set to YES then a tag [inline] is inserted in the -# documentation for inline members. -# The default value is: YES. - -INLINE_INFO = YES - -# If the SORT_MEMBER_DOCS tag is set to YES then doxygen will sort the -# (detailed) documentation of file and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. -# The default value is: YES. - -SORT_MEMBER_DOCS = YES - -# If the SORT_BRIEF_DOCS tag is set to YES then doxygen will sort the brief -# descriptions of file, namespace and class members alphabetically by member -# name. If set to NO the members will appear in declaration order. Note that -# this will also influence the order of the classes in the class list. -# The default value is: NO. - -SORT_BRIEF_DOCS = NO - -# If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the -# (brief and detailed) documentation of class members so that constructors and -# destructors are listed first. If set to NO the constructors will appear in the -# respective orders defined by SORT_BRIEF_DOCS and SORT_MEMBER_DOCS. -# Note: If SORT_BRIEF_DOCS is set to NO this option is ignored for sorting brief -# member documentation. -# Note: If SORT_MEMBER_DOCS is set to NO this option is ignored for sorting -# detailed member documentation. -# The default value is: NO. - -SORT_MEMBERS_CTORS_1ST = NO - -# If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy -# of group names into alphabetical order. If set to NO the group names will -# appear in their defined order. -# The default value is: NO. - -SORT_GROUP_NAMES = NO - -# If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by -# fully-qualified names, including namespaces. If set to NO, the class list will -# be sorted only by class name, not including the namespace part. -# Note: This option is not very useful if HIDE_SCOPE_NAMES is set to YES. -# Note: This option applies only to the class list, not to the alphabetical -# list. -# The default value is: NO. - -SORT_BY_SCOPE_NAME = NO - -# If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper -# type resolution of all parameters of a function it will reject a match between -# the prototype and the implementation of a member function even if there is -# only one candidate or it is obvious which candidate to choose by doing a -# simple string match. By disabling STRICT_PROTO_MATCHING doxygen will still -# accept a match between prototype and implementation in such cases. -# The default value is: NO. - -STRICT_PROTO_MATCHING = NO - -# The GENERATE_TODOLIST tag can be used to enable ( YES) or disable ( NO) the -# todo list. This list is created by putting \todo commands in the -# documentation. -# The default value is: YES. - -GENERATE_TODOLIST = YES - -# The GENERATE_TESTLIST tag can be used to enable ( YES) or disable ( NO) the -# test list. This list is created by putting \test commands in the -# documentation. -# The default value is: YES. - -GENERATE_TESTLIST = YES - -# The GENERATE_BUGLIST tag can be used to enable ( YES) or disable ( NO) the bug -# list. This list is created by putting \bug commands in the documentation. -# The default value is: YES. - -GENERATE_BUGLIST = YES - -# The GENERATE_DEPRECATEDLIST tag can be used to enable ( YES) or disable ( NO) -# the deprecated list. This list is created by putting \deprecated commands in -# the documentation. -# The default value is: YES. - -GENERATE_DEPRECATEDLIST= YES - -# The ENABLED_SECTIONS tag can be used to enable conditional documentation -# sections, marked by \if ... \endif and \cond -# ... \endcond blocks. - -ENABLED_SECTIONS = - -# The MAX_INITIALIZER_LINES tag determines the maximum number of lines that the -# initial value of a variable or macro / define can have for it to appear in the -# documentation. If the initializer consists of more lines than specified here -# it will be hidden. Use a value of 0 to hide initializers completely. The -# appearance of the value of individual variables and macros / defines can be -# controlled using \showinitializer or \hideinitializer command in the -# documentation regardless of this setting. -# Minimum value: 0, maximum value: 10000, default value: 30. - -MAX_INITIALIZER_LINES = 30 - -# Set the SHOW_USED_FILES tag to NO to disable the list of files generated at -# the bottom of the documentation of classes and structs. If set to YES the list -# will mention the files that were used to generate the documentation. -# The default value is: YES. - -SHOW_USED_FILES = YES - -# Set the SHOW_FILES tag to NO to disable the generation of the Files page. This -# will remove the Files entry from the Quick Index and from the Folder Tree View -# (if specified). -# The default value is: YES. - -SHOW_FILES = YES - -# Set the SHOW_NAMESPACES tag to NO to disable the generation of the Namespaces -# page. This will remove the Namespaces entry from the Quick Index and from the -# Folder Tree View (if specified). -# The default value is: YES. - -SHOW_NAMESPACES = YES - -# The FILE_VERSION_FILTER tag can be used to specify a program or script that -# doxygen should invoke to get the current version for each file (typically from -# the version control system). Doxygen will invoke the program by executing (via -# popen()) the command command input-file, where command is the value of the -# FILE_VERSION_FILTER tag, and input-file is the name of an input file provided -# by doxygen. Whatever the program writes to standard output is used as the file -# version. For an example see the documentation. - -FILE_VERSION_FILTER = - -# The LAYOUT_FILE tag can be used to specify a layout file which will be parsed -# by doxygen. The layout file controls the global structure of the generated -# output files in an output format independent way. To create the layout file -# that represents doxygen's defaults, run doxygen with the -l option. You can -# optionally specify a file name after the option, if omitted DoxygenLayout.xml -# will be used as the name of the layout file. -# -# Note that if you run doxygen from a directory containing a file called -# DoxygenLayout.xml, doxygen will parse it automatically even if the LAYOUT_FILE -# tag is left empty. - -LAYOUT_FILE = - -# The CITE_BIB_FILES tag can be used to specify one or more bib files containing -# the reference definitions. This must be a list of .bib files. The .bib -# extension is automatically appended if omitted. This requires the bibtex tool -# to be installed. See also http://en.wikipedia.org/wiki/BibTeX for more info. -# For LaTeX the style of the bibliography can be controlled using -# LATEX_BIB_STYLE. To use this feature you need bibtex and perl available in the -# search path. See also \cite for info how to create references. - -CITE_BIB_FILES = - -#--------------------------------------------------------------------------- -# Configuration options related to warning and progress messages -#--------------------------------------------------------------------------- - -# The QUIET tag can be used to turn on/off the messages that are generated to -# standard output by doxygen. If QUIET is set to YES this implies that the -# messages are off. -# The default value is: NO. - -QUIET = NO - -# The WARNINGS tag can be used to turn on/off the warning messages that are -# generated to standard error ( stderr) by doxygen. If WARNINGS is set to YES -# this implies that the warnings are on. -# -# Tip: Turn warnings on while writing the documentation. -# The default value is: YES. - -WARNINGS = YES - -# If the WARN_IF_UNDOCUMENTED tag is set to YES, then doxygen will generate -# warnings for undocumented members. If EXTRACT_ALL is set to YES then this flag -# will automatically be disabled. -# The default value is: YES. - -WARN_IF_UNDOCUMENTED = YES - -# If the WARN_IF_DOC_ERROR tag is set to YES, doxygen will generate warnings for -# potential errors in the documentation, such as not documenting some parameters -# in a documented function, or documenting parameters that don't exist or using -# markup commands wrongly. -# The default value is: YES. - -WARN_IF_DOC_ERROR = YES - -# This WARN_NO_PARAMDOC option can be enabled to get warnings for functions that -# are documented, but have no documentation for their parameters or return -# value. If set to NO doxygen will only warn about wrong or incomplete parameter -# documentation, but not about the absence of documentation. -# The default value is: NO. - -WARN_NO_PARAMDOC = NO - -# The WARN_FORMAT tag determines the format of the warning messages that doxygen -# can produce. The string should contain the $file, $line, and $text tags, which -# will be replaced by the file and line number from which the warning originated -# and the warning text. Optionally the format may contain $version, which will -# be replaced by the version of the file (if it could be obtained via -# FILE_VERSION_FILTER) -# The default value is: $file:$line: $text. - -WARN_FORMAT = "$file:$line: $text" - -# The WARN_LOGFILE tag can be used to specify a file to which warning and error -# messages should be written. If left blank the output is written to standard -# error (stderr). - -WARN_LOGFILE = warnings.log - -#--------------------------------------------------------------------------- -# Configuration options related to the input files -#--------------------------------------------------------------------------- - -# The INPUT tag is used to specify the files and/or directories that contain -# documented source files. You may enter file names like myfile.cpp or -# directories like /usr/src/myproject. Separate the files or directories with -# spaces. -# Note: If this tag is empty the current directory is searched. - -INPUT = ../src ../README.md ./ - -# This tag can be used to specify the character encoding of the source files -# that doxygen parses. Internally doxygen uses the UTF-8 encoding. Doxygen uses -# libiconv (or the iconv built into libc) for the transcoding. See the libiconv -# documentation (see: http://www.gnu.org/software/libiconv) for the list of -# possible encodings. -# The default value is: UTF-8. - -INPUT_ENCODING = UTF-8 - -# If the value of the INPUT tag contains directories, you can use the -# FILE_PATTERNS tag to specify one or more wildcard patterns (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank the -# following patterns are tested:*.c, *.cc, *.cxx, *.cpp, *.c++, *.java, *.ii, -# *.ixx, *.ipp, *.i++, *.inl, *.idl, *.ddl, *.odl, *.h, *.hh, *.hxx, *.hpp, -# *.h++, *.cs, *.d, *.php, *.php4, *.php5, *.phtml, *.inc, *.m, *.markdown, -# *.md, *.mm, *.dox, *.py, *.f90, *.f, *.for, *.tcl, *.vhd, *.vhdl, *.ucf, -# *.qsf, *.as and *.js. - -FILE_PATTERNS = *.php *.md - -# The RECURSIVE tag can be used to specify whether or not subdirectories should -# be searched for input files as well. -# The default value is: NO. - -RECURSIVE = YES - -# The EXCLUDE tag can be used to specify files and/or directories that should be -# excluded from the INPUT source files. This way you can easily exclude a -# subdirectory from a directory tree whose root is specified with the INPUT tag. -# -# Note that relative paths are relative to the directory from which doxygen is -# run. - -EXCLUDE = - -# The EXCLUDE_SYMLINKS tag can be used to select whether or not files or -# directories that are symbolic links (a Unix file system feature) are excluded -# from the input. -# The default value is: NO. - -EXCLUDE_SYMLINKS = NO - -# If the value of the INPUT tag contains directories, you can use the -# EXCLUDE_PATTERNS tag to specify one or more wildcard patterns to exclude -# certain files from those directories. -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories for example use the pattern */test/* - -EXCLUDE_PATTERNS = - -# The EXCLUDE_SYMBOLS tag can be used to specify one or more symbol names -# (namespaces, classes, functions, etc.) that should be excluded from the -# output. The symbol name can be a fully qualified name, a word, or if the -# wildcard * is used, a substring. Examples: ANamespace, AClass, -# AClass::ANamespace, ANamespace::*Test -# -# Note that the wildcards are matched against the file with absolute path, so to -# exclude all test directories use the pattern */test/* - -EXCLUDE_SYMBOLS = - -# The EXAMPLE_PATH tag can be used to specify one or more files or directories -# that contain example code fragments that are included (see the \include -# command). - -EXAMPLE_PATH = - -# If the value of the EXAMPLE_PATH tag contains directories, you can use the -# EXAMPLE_PATTERNS tag to specify one or more wildcard pattern (like *.cpp and -# *.h) to filter out the source-files in the directories. If left blank all -# files are included. - -EXAMPLE_PATTERNS = - -# If the EXAMPLE_RECURSIVE tag is set to YES then subdirectories will be -# searched for input files to be used with the \include or \dontinclude commands -# irrespective of the value of the RECURSIVE tag. -# The default value is: NO. - -EXAMPLE_RECURSIVE = NO - -# The IMAGE_PATH tag can be used to specify one or more files or directories -# that contain images that are to be included in the documentation (see the -# \image command). - -IMAGE_PATH = - -# The INPUT_FILTER tag can be used to specify a program that doxygen should -# invoke to filter for each input file. Doxygen will invoke the filter program -# by executing (via popen()) the command: -# -# -# -# where is the value of the INPUT_FILTER tag, and is the -# name of an input file. Doxygen will then use the output that the filter -# program writes to standard output. If FILTER_PATTERNS is specified, this tag -# will be ignored. -# -# Note that the filter must not add or remove lines; it is applied before the -# code is scanned, but not when the output code is generated. If lines are added -# or removed, the anchors will not be placed correctly. - -INPUT_FILTER = - -# The FILTER_PATTERNS tag can be used to specify filters on a per file pattern -# basis. Doxygen will compare the file name with each pattern and apply the -# filter if there is a match. The filters are a list of the form: pattern=filter -# (like *.cpp=my_cpp_filter). See INPUT_FILTER for further information on how -# filters are used. If the FILTER_PATTERNS tag is empty or if none of the -# patterns match the file name, INPUT_FILTER is applied. - -FILTER_PATTERNS = - -# If the FILTER_SOURCE_FILES tag is set to YES, the input filter (if set using -# INPUT_FILTER ) will also be used to filter the input files that are used for -# producing the source files to browse (i.e. when SOURCE_BROWSER is set to YES). -# The default value is: NO. - -FILTER_SOURCE_FILES = NO - -# The FILTER_SOURCE_PATTERNS tag can be used to specify source filters per file -# pattern. A pattern will override the setting for FILTER_PATTERN (if any) and -# it is also possible to disable source filtering for a specific pattern using -# *.ext= (so without naming a filter). -# This tag requires that the tag FILTER_SOURCE_FILES is set to YES. - -FILTER_SOURCE_PATTERNS = - -# If the USE_MDFILE_AS_MAINPAGE tag refers to the name of a markdown file that -# is part of the input, its contents will be placed on the main page -# (index.html). This can be useful if you have a project on for instance GitHub -# and want to reuse the introduction page also for the doxygen output. - -USE_MDFILE_AS_MAINPAGE = ../README.md - -#--------------------------------------------------------------------------- -# Configuration options related to source browsing -#--------------------------------------------------------------------------- - -# If the SOURCE_BROWSER tag is set to YES then a list of source files will be -# generated. Documented entities will be cross-referenced with these sources. -# -# Note: To get rid of all source code in the generated output, make sure that -# also VERBATIM_HEADERS is set to NO. -# The default value is: NO. - -SOURCE_BROWSER = NO - -# Setting the INLINE_SOURCES tag to YES will include the body of functions, -# classes and enums directly into the documentation. -# The default value is: NO. - -INLINE_SOURCES = NO - -# Setting the STRIP_CODE_COMMENTS tag to YES will instruct doxygen to hide any -# special comment blocks from generated source code fragments. Normal C, C++ and -# Fortran comments will always remain visible. -# The default value is: YES. - -STRIP_CODE_COMMENTS = YES - -# If the REFERENCED_BY_RELATION tag is set to YES then for each documented -# function all documented functions referencing it will be listed. -# The default value is: NO. - -REFERENCED_BY_RELATION = NO - -# If the REFERENCES_RELATION tag is set to YES then for each documented function -# all documented entities called/used by that function will be listed. -# The default value is: NO. - -REFERENCES_RELATION = NO - -# If the REFERENCES_LINK_SOURCE tag is set to YES and SOURCE_BROWSER tag is set -# to YES, then the hyperlinks from functions in REFERENCES_RELATION and -# REFERENCED_BY_RELATION lists will link to the source code. Otherwise they will -# link to the documentation. -# The default value is: YES. - -REFERENCES_LINK_SOURCE = YES - -# If SOURCE_TOOLTIPS is enabled (the default) then hovering a hyperlink in the -# source code will show a tooltip with additional information such as prototype, -# brief description and links to the definition and documentation. Since this -# will make the HTML file larger and loading of large files a bit slower, you -# can opt to disable this feature. -# The default value is: YES. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -SOURCE_TOOLTIPS = YES - -# If the USE_HTAGS tag is set to YES then the references to source code will -# point to the HTML generated by the htags(1) tool instead of doxygen built-in -# source browser. The htags tool is part of GNU's global source tagging system -# (see http://www.gnu.org/software/global/global.html). You will need version -# 4.8.6 or higher. -# -# To use it do the following: -# - Install the latest version of global -# - Enable SOURCE_BROWSER and USE_HTAGS in the config file -# - Make sure the INPUT points to the root of the source tree -# - Run doxygen as normal -# -# Doxygen will invoke htags (and that will in turn invoke gtags), so these -# tools must be available from the command line (i.e. in the search path). -# -# The result: instead of the source browser generated by doxygen, the links to -# source code will now point to the output of htags. -# The default value is: NO. -# This tag requires that the tag SOURCE_BROWSER is set to YES. - -USE_HTAGS = NO - -# If the VERBATIM_HEADERS tag is set the YES then doxygen will generate a -# verbatim copy of the header file for each class for which an include is -# specified. Set to NO to disable this. -# See also: Section \class. -# The default value is: YES. - -VERBATIM_HEADERS = YES - -# If the CLANG_ASSISTED_PARSING tag is set to YES, then doxygen will use the -# clang parser (see: http://clang.llvm.org/) for more accurate parsing at the -# cost of reduced performance. This can be particularly helpful with template -# rich C++ code for which doxygen's built-in parser lacks the necessary type -# information. -# Note: The availability of this option depends on whether or not doxygen was -# compiled with the --with-libclang option. -# The default value is: NO. - -CLANG_ASSISTED_PARSING = NO - -# If clang assisted parsing is enabled you can provide the compiler with command -# line options that you would normally use when invoking the compiler. Note that -# the include paths will already be set by doxygen for the files and directories -# specified with INPUT and INCLUDE_PATH. -# This tag requires that the tag CLANG_ASSISTED_PARSING is set to YES. - -CLANG_OPTIONS = - -#--------------------------------------------------------------------------- -# Configuration options related to the alphabetical class index -#--------------------------------------------------------------------------- - -# If the ALPHABETICAL_INDEX tag is set to YES, an alphabetical index of all -# compounds will be generated. Enable this if the project contains a lot of -# classes, structs, unions or interfaces. -# The default value is: YES. - -ALPHABETICAL_INDEX = YES - -# The COLS_IN_ALPHA_INDEX tag can be used to specify the number of columns in -# which the alphabetical index list will be split. -# Minimum value: 1, maximum value: 20, default value: 5. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -COLS_IN_ALPHA_INDEX = 5 - -# In case all classes in a project start with a common prefix, all classes will -# be put under the same header in the alphabetical index. The IGNORE_PREFIX tag -# can be used to specify a prefix (or a list of prefixes) that should be ignored -# while generating the index headers. -# This tag requires that the tag ALPHABETICAL_INDEX is set to YES. - -IGNORE_PREFIX = - -#--------------------------------------------------------------------------- -# Configuration options related to the HTML output -#--------------------------------------------------------------------------- - -# If the GENERATE_HTML tag is set to YES doxygen will generate HTML output -# The default value is: YES. - -GENERATE_HTML = YES - -# The HTML_OUTPUT tag is used to specify where the HTML docs will be put. If a -# relative path is entered the value of OUTPUT_DIRECTORY will be put in front of -# it. -# The default directory is: html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_OUTPUT = html - -# The HTML_FILE_EXTENSION tag can be used to specify the file extension for each -# generated HTML page (for example: .htm, .php, .asp). -# The default value is: .html. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FILE_EXTENSION = .html - -# The HTML_HEADER tag can be used to specify a user-defined HTML header file for -# each generated HTML page. If the tag is left blank doxygen will generate a -# standard header. -# -# To get valid HTML the header file that includes any scripts and style sheets -# that doxygen needs, which is dependent on the configuration options used (e.g. -# the setting GENERATE_TREEVIEW). It is highly recommended to start with a -# default header using -# doxygen -w html new_header.html new_footer.html new_stylesheet.css -# YourConfigFile -# and then modify the file new_header.html. See also section "Doxygen usage" -# for information on how to generate the default header that doxygen normally -# uses. -# Note: The header is subject to change so you typically have to regenerate the -# default header when upgrading to a newer version of doxygen. For a description -# of the possible markers and block names see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_HEADER = - -# The HTML_FOOTER tag can be used to specify a user-defined HTML footer for each -# generated HTML page. If the tag is left blank doxygen will generate a standard -# footer. See HTML_HEADER for more information on how to generate a default -# footer and what special commands can be used inside the footer. See also -# section "Doxygen usage" for information on how to generate the default footer -# that doxygen normally uses. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_FOOTER = - -# The HTML_STYLESHEET tag can be used to specify a user-defined cascading style -# sheet that is used by each HTML page. It can be used to fine-tune the look of -# the HTML output. If left blank doxygen will generate a default style sheet. -# See also section "Doxygen usage" for information on how to generate the style -# sheet that doxygen normally uses. -# Note: It is recommended to use HTML_EXTRA_STYLESHEET instead of this tag, as -# it is more robust and this tag (HTML_STYLESHEET) will in the future become -# obsolete. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_STYLESHEET = - -# The HTML_EXTRA_STYLESHEET tag can be used to specify additional user-defined -# cascading style sheets that are included after the standard style sheets -# created by doxygen. Using this option one can overrule certain style aspects. -# This is preferred over using HTML_STYLESHEET since it does not replace the -# standard style sheet and is therefor more robust against future updates. -# Doxygen will copy the style sheet files to the output directory. -# Note: The order of the extra stylesheet files is of importance (e.g. the last -# stylesheet in the list overrules the setting of the previous ones in the -# list). For an example see the documentation. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_STYLESHEET = - -# The HTML_EXTRA_FILES tag can be used to specify one or more extra images or -# other source files which should be copied to the HTML output directory. Note -# that these files will be copied to the base HTML output directory. Use the -# $relpath^ marker in the HTML_HEADER and/or HTML_FOOTER files to load these -# files. In the HTML_STYLESHEET file, use the file name only. Also note that the -# files will be copied as-is; there are no commands or markers available. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_EXTRA_FILES = - -# The HTML_COLORSTYLE_HUE tag controls the color of the HTML output. Doxygen -# will adjust the colors in the stylesheet and background images according to -# this color. Hue is specified as an angle on a colorwheel, see -# http://en.wikipedia.org/wiki/Hue for more information. For instance the value -# 0 represents red, 60 is yellow, 120 is green, 180 is cyan, 240 is blue, 300 -# purple, and 360 is red again. -# Minimum value: 0, maximum value: 359, default value: 220. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_HUE = 220 - -# The HTML_COLORSTYLE_SAT tag controls the purity (or saturation) of the colors -# in the HTML output. For a value of 0 the output will use grayscales only. A -# value of 255 will produce the most vivid colors. -# Minimum value: 0, maximum value: 255, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_SAT = 100 - -# The HTML_COLORSTYLE_GAMMA tag controls the gamma correction applied to the -# luminance component of the colors in the HTML output. Values below 100 -# gradually make the output lighter, whereas values above 100 make the output -# darker. The value divided by 100 is the actual gamma applied, so 80 represents -# a gamma of 0.8, The value 220 represents a gamma of 2.2, and 100 does not -# change the gamma. -# Minimum value: 40, maximum value: 240, default value: 80. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_COLORSTYLE_GAMMA = 80 - -# If the HTML_TIMESTAMP tag is set to YES then the footer of each generated HTML -# page will contain the date and time when the page was generated. Setting this -# to NO can help when comparing the output of multiple runs. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_TIMESTAMP = YES - -# If the HTML_DYNAMIC_SECTIONS tag is set to YES then the generated HTML -# documentation will contain sections that can be hidden and shown after the -# page has loaded. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_DYNAMIC_SECTIONS = NO - -# With HTML_INDEX_NUM_ENTRIES one can control the preferred number of entries -# shown in the various tree structured indices initially; the user can expand -# and collapse entries dynamically later on. Doxygen will expand the tree to -# such a level that at most the specified number of entries are visible (unless -# a fully collapsed tree already exceeds this amount). So setting the number of -# entries 1 will produce a full collapsed tree by default. 0 is a special value -# representing an infinite number of entries and will result in a full expanded -# tree by default. -# Minimum value: 0, maximum value: 9999, default value: 100. -# This tag requires that the tag GENERATE_HTML is set to YES. - -HTML_INDEX_NUM_ENTRIES = 100 - -# If the GENERATE_DOCSET tag is set to YES, additional index files will be -# generated that can be used as input for Apple's Xcode 3 integrated development -# environment (see: http://developer.apple.com/tools/xcode/), introduced with -# OSX 10.5 (Leopard). To create a documentation set, doxygen will generate a -# Makefile in the HTML output directory. Running make will produce the docset in -# that directory and running make install will install the docset in -# ~/Library/Developer/Shared/Documentation/DocSets so that Xcode will find it at -# startup. See http://developer.apple.com/tools/creatingdocsetswithdoxygen.html -# for more information. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_DOCSET = NO - -# This tag determines the name of the docset feed. A documentation feed provides -# an umbrella under which multiple documentation sets from a single provider -# (such as a company or product suite) can be grouped. -# The default value is: Doxygen generated docs. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_FEEDNAME = "Doxygen generated docs" - -# This tag specifies a string that should uniquely identify the documentation -# set bundle. This should be a reverse domain-name style string, e.g. -# com.mycompany.MyDocSet. Doxygen will append .docset to the name. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_BUNDLE_ID = org.doxygen.Project - -# The DOCSET_PUBLISHER_ID tag specifies a string that should uniquely identify -# the documentation publisher. This should be a reverse domain-name style -# string, e.g. com.mycompany.MyDocSet.documentation. -# The default value is: org.doxygen.Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_ID = org.doxygen.Publisher - -# The DOCSET_PUBLISHER_NAME tag identifies the documentation publisher. -# The default value is: Publisher. -# This tag requires that the tag GENERATE_DOCSET is set to YES. - -DOCSET_PUBLISHER_NAME = Publisher - -# If the GENERATE_HTMLHELP tag is set to YES then doxygen generates three -# additional HTML index files: index.hhp, index.hhc, and index.hhk. The -# index.hhp is a project file that can be read by Microsoft's HTML Help Workshop -# (see: http://www.microsoft.com/en-us/download/details.aspx?id=21138) on -# Windows. -# -# The HTML Help Workshop contains a compiler that can convert all HTML output -# generated by doxygen into a single compiled HTML file (.chm). Compiled HTML -# files are now used as the Windows 98 help format, and will replace the old -# Windows help format (.hlp) on all Windows platforms in the future. Compressed -# HTML files also contain an index, a table of contents, and you can search for -# words in the documentation. The HTML workshop also contains a viewer for -# compressed HTML files. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_HTMLHELP = NO - -# The CHM_FILE tag can be used to specify the file name of the resulting .chm -# file. You can add a path in front of the file if the result should not be -# written to the html output directory. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_FILE = - -# The HHC_LOCATION tag can be used to specify the location (absolute path -# including file name) of the HTML help compiler ( hhc.exe). If non-empty -# doxygen will try to run the HTML help compiler on the generated index.hhp. -# The file has to be specified with full path. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -HHC_LOCATION = - -# The GENERATE_CHI flag controls if a separate .chi index file is generated ( -# YES) or that it should be included in the master .chm file ( NO). -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -GENERATE_CHI = NO - -# The CHM_INDEX_ENCODING is used to encode HtmlHelp index ( hhk), content ( hhc) -# and project file content. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -CHM_INDEX_ENCODING = - -# The BINARY_TOC flag controls whether a binary table of contents is generated ( -# YES) or a normal table of contents ( NO) in the .chm file. Furthermore it -# enables the Previous and Next buttons. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -BINARY_TOC = NO - -# The TOC_EXPAND flag can be set to YES to add extra items for group members to -# the table of contents of the HTML help documentation and to the tree view. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTMLHELP is set to YES. - -TOC_EXPAND = NO - -# If the GENERATE_QHP tag is set to YES and both QHP_NAMESPACE and -# QHP_VIRTUAL_FOLDER are set, an additional index file will be generated that -# can be used as input for Qt's qhelpgenerator to generate a Qt Compressed Help -# (.qch) of the generated HTML documentation. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_QHP = NO - -# If the QHG_LOCATION tag is specified, the QCH_FILE tag can be used to specify -# the file name of the resulting .qch file. The path specified is relative to -# the HTML output folder. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QCH_FILE = - -# The QHP_NAMESPACE tag specifies the namespace to use when generating Qt Help -# Project output. For more information please see Qt Help Project / Namespace -# (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#namespace). -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_NAMESPACE = org.doxygen.Project - -# The QHP_VIRTUAL_FOLDER tag specifies the namespace to use when generating Qt -# Help Project output. For more information please see Qt Help Project / Virtual -# Folders (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#virtual- -# folders). -# The default value is: doc. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_VIRTUAL_FOLDER = doc - -# If the QHP_CUST_FILTER_NAME tag is set, it specifies the name of a custom -# filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_NAME = - -# The QHP_CUST_FILTER_ATTRS tag specifies the list of the attributes of the -# custom filter to add. For more information please see Qt Help Project / Custom -# Filters (see: http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom- -# filters). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_CUST_FILTER_ATTRS = - -# The QHP_SECT_FILTER_ATTRS tag specifies the list of the attributes this -# project's filter section matches. Qt Help Project / Filter Attributes (see: -# http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes). -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHP_SECT_FILTER_ATTRS = - -# The QHG_LOCATION tag can be used to specify the location of Qt's -# qhelpgenerator. If non-empty doxygen will try to run qhelpgenerator on the -# generated .qhp file. -# This tag requires that the tag GENERATE_QHP is set to YES. - -QHG_LOCATION = - -# If the GENERATE_ECLIPSEHELP tag is set to YES, additional index files will be -# generated, together with the HTML files, they form an Eclipse help plugin. To -# install this plugin and make it available under the help contents menu in -# Eclipse, the contents of the directory containing the HTML and XML files needs -# to be copied into the plugins directory of eclipse. The name of the directory -# within the plugins directory should be the same as the ECLIPSE_DOC_ID value. -# After copying Eclipse needs to be restarted before the help appears. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_ECLIPSEHELP = NO - -# A unique identifier for the Eclipse help plugin. When installing the plugin -# the directory name containing the HTML and XML files should also have this -# name. Each documentation set should have its own identifier. -# The default value is: org.doxygen.Project. -# This tag requires that the tag GENERATE_ECLIPSEHELP is set to YES. - -ECLIPSE_DOC_ID = org.doxygen.Project - -# If you want full control over the layout of the generated HTML pages it might -# be necessary to disable the index and replace it with your own. The -# DISABLE_INDEX tag can be used to turn on/off the condensed index (tabs) at top -# of each HTML page. A value of NO enables the index and the value YES disables -# it. Since the tabs in the index contain the same information as the navigation -# tree, you can set this option to YES if you also set GENERATE_TREEVIEW to YES. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -DISABLE_INDEX = NO - -# The GENERATE_TREEVIEW tag is used to specify whether a tree-like index -# structure should be generated to display hierarchical information. If the tag -# value is set to YES, a side panel will be generated containing a tree-like -# index structure (just like the one that is generated for HTML Help). For this -# to work a browser that supports JavaScript, DHTML, CSS and frames is required -# (i.e. any modern browser). Windows users are probably better off using the -# HTML help feature. Via custom stylesheets (see HTML_EXTRA_STYLESHEET) one can -# further fine-tune the look of the index. As an example, the default style -# sheet generated by doxygen has an example that shows how to put an image at -# the root of the tree instead of the PROJECT_NAME. Since the tree basically has -# the same information as the tab index, you could consider setting -# DISABLE_INDEX to YES when enabling this option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -GENERATE_TREEVIEW = NO - -# The ENUM_VALUES_PER_LINE tag can be used to set the number of enum values that -# doxygen will group on one line in the generated HTML documentation. -# -# Note that a value of 0 will completely suppress the enum values from appearing -# in the overview section. -# Minimum value: 0, maximum value: 20, default value: 4. -# This tag requires that the tag GENERATE_HTML is set to YES. - -ENUM_VALUES_PER_LINE = 4 - -# If the treeview is enabled (see GENERATE_TREEVIEW) then this tag can be used -# to set the initial width (in pixels) of the frame in which the tree is shown. -# Minimum value: 0, maximum value: 1500, default value: 250. -# This tag requires that the tag GENERATE_HTML is set to YES. - -TREEVIEW_WIDTH = 250 - -# When the EXT_LINKS_IN_WINDOW option is set to YES doxygen will open links to -# external symbols imported via tag files in a separate window. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -EXT_LINKS_IN_WINDOW = NO - -# Use this tag to change the font size of LaTeX formulas included as images in -# the HTML documentation. When you change the font size after a successful -# doxygen run you need to manually remove any form_*.png images from the HTML -# output directory to force them to be regenerated. -# Minimum value: 8, maximum value: 50, default value: 10. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_FONTSIZE = 10 - -# Use the FORMULA_TRANPARENT tag to determine whether or not the images -# generated for formulas are transparent PNGs. Transparent PNGs are not -# supported properly for IE 6.0, but are supported on all modern browsers. -# -# Note that when changing this option you need to delete any form_*.png files in -# the HTML output directory before the changes have effect. -# The default value is: YES. -# This tag requires that the tag GENERATE_HTML is set to YES. - -FORMULA_TRANSPARENT = YES - -# Enable the USE_MATHJAX option to render LaTeX formulas using MathJax (see -# http://www.mathjax.org) which uses client side Javascript for the rendering -# instead of using prerendered bitmaps. Use this if you do not have LaTeX -# installed or if you want to formulas look prettier in the HTML output. When -# enabled you may also need to install MathJax separately and configure the path -# to it using the MATHJAX_RELPATH option. -# The default value is: NO. -# This tag requires that the tag GENERATE_HTML is set to YES. - -USE_MATHJAX = NO - -# When MathJax is enabled you can set the default output format to be used for -# the MathJax output. See the MathJax site (see: -# http://docs.mathjax.org/en/latest/output.html) for more details. -# Possible values are: HTML-CSS (which is slower, but has the best -# compatibility), NativeMML (i.e. MathML) and SVG. -# The default value is: HTML-CSS. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_FORMAT = HTML-CSS - -# When MathJax is enabled you need to specify the location relative to the HTML -# output directory using the MATHJAX_RELPATH option. The destination directory -# should contain the MathJax.js script. For instance, if the mathjax directory -# is located at the same level as the HTML output directory, then -# MATHJAX_RELPATH should be ../mathjax. The default value points to the MathJax -# Content Delivery Network so you can quickly see the result without installing -# MathJax. However, it is strongly recommended to install a local copy of -# MathJax from http://www.mathjax.org before deployment. -# The default value is: http://cdn.mathjax.org/mathjax/latest. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_RELPATH = http://cdn.mathjax.org/mathjax/latest - -# The MATHJAX_EXTENSIONS tag can be used to specify one or more MathJax -# extension names that should be enabled during MathJax rendering. For example -# MATHJAX_EXTENSIONS = TeX/AMSmath TeX/AMSsymbols -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_EXTENSIONS = - -# The MATHJAX_CODEFILE tag can be used to specify a file with javascript pieces -# of code that will be used on startup of the MathJax code. See the MathJax site -# (see: http://docs.mathjax.org/en/latest/output.html) for more details. For an -# example see the documentation. -# This tag requires that the tag USE_MATHJAX is set to YES. - -MATHJAX_CODEFILE = - -# When the SEARCHENGINE tag is enabled doxygen will generate a search box for -# the HTML output. The underlying search engine uses javascript and DHTML and -# should work on any modern browser. Note that when using HTML help -# (GENERATE_HTMLHELP), Qt help (GENERATE_QHP), or docsets (GENERATE_DOCSET) -# there is already a search function so this one should typically be disabled. -# For large projects the javascript based search engine can be slow, then -# enabling SERVER_BASED_SEARCH may provide a better solution. It is possible to -# search using the keyboard; to jump to the search box use + S -# (what the is depends on the OS and browser, but it is typically -# , /