From 232f20100706b9d93c5e081f670d7daf44b892fd Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Sun, 23 Feb 2020 17:02:08 +0100 Subject: [PATCH 01/96] 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 02/96] 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 03/96] 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 04/96] 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 05/96] 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 06/96] 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 07/96] 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 08/96] 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 09/96] 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 10/96] 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 11/96] 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 a2dca42965f1f64c6d32699bd7302d1863b71d7e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 2 Dec 2020 18:55:55 +0100 Subject: [PATCH 12/96] 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 13/96] 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 14/96] 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 15/96] 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 16/96] 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 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 17/96] 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 3d21a00f2ba289bc5d6876c951e5ce79ae873e9d Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 11:03:02 +0100 Subject: [PATCH 18/96] 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 748630eb2590588bd853d62d777cd2a6ca13f63e Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 3 Dec 2020 11:15:06 +0100 Subject: [PATCH 19/96] 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 20/96] 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 21/96] 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 22/96] 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 23/96] 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 24/96] 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 25/96] 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 .= '