From d9aaf3e4d36461fb5547c6b4c04b08906bc42237 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 19 Oct 2022 22:02:04 +0200 Subject: [PATCH 01/11] ajax.php Add price --- htdocs/takepos/ajax/ajax.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/ajax/ajax.php b/htdocs/takepos/ajax/ajax.php index 1ee27c51f8b..671ef27ba96 100644 --- a/htdocs/takepos/ajax/ajax.php +++ b/htdocs/takepos/ajax/ajax.php @@ -84,6 +84,7 @@ if ($action == 'getProducts') { } unset($prod->fields); unset($prod->db); + $prod->price_formated=price(price2num($prod->price, 'MU'), 1, $langs, 1, -1, -1, $conf->currency); $res[] = $prod; } } @@ -301,7 +302,7 @@ if ($action == 'getProducts') { 'object' => 'product', 'img' => $ig, 'qty' => 1, - //'price_formated' => price(price2num($obj->price, 'MU'), 1, $langs, 1, -1, -1, $conf->currency) + 'price_formated' => price(price2num($obj->price, 'MU'), 1, $langs, 1, -1, -1, $conf->currency) ); // Add entries to row from hooks $parameters=array(); From bdc979eaadfe75c46f727e5643a557424456960b Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 19 Oct 2022 22:03:26 +0200 Subject: [PATCH 02/11] pos.css.php Add price --- htdocs/takepos/css/pos.css.php | 18 ++++-------------- 1 file changed, 4 insertions(+), 14 deletions(-) diff --git a/htdocs/takepos/css/pos.css.php b/htdocs/takepos/css/pos.css.php index ed968ea6f4e..f4a130dc5f1 100644 --- a/htdocs/takepos/css/pos.css.php +++ b/htdocs/takepos/css/pos.css.php @@ -826,10 +826,6 @@ div#moreinfo, div#infowarehouse { clear: both; } -.div5 .price { - display: none; -} - .div5 .imgadd { display: none; } @@ -925,18 +921,12 @@ div#moreinfo, div#infowarehouse { .div5 .arrow .centerinmiddle { transform: translate(0, 0); } - - .div5 .price { - font-size: 14px; - margin-left: auto; - margin-right: 30px; - padding-right: 10px; - font-weight: bold; - color: #ff6d6d; - display: flex; - } .div5 .imgadd { display: flex; } + + div.wrapper2{ + height:10%; + } } \ No newline at end of file From 6b1e4dbf6b83c3c34065f381118edd092ccc4364 Mon Sep 17 00:00:00 2001 From: andreubisquerra Date: Wed, 19 Oct 2022 22:05:01 +0200 Subject: [PATCH 03/11] Index Add price --- htdocs/takepos/index.php | 3 --- 1 file changed, 3 deletions(-) diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 7443c380b9a..8be5a97e465 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -1375,9 +1375,6 @@ if (!empty($conf->global->TAKEPOS_WEIGHING_SCALE)) {
-
-
-
...
From 72d163b896faa17bfd6f2130c6e40c2a26ec69d9 Mon Sep 17 00:00:00 2001 From: melina Date: Thu, 20 Oct 2022 16:21:31 +0200 Subject: [PATCH 04/11] Added hidden constant and modified edit on reference --- htdocs/product/card.php | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 8eac47207cd..8ddef85682a 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1866,7 +1866,13 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print ''; // Ref - print ''; + if (!empty($conf->global->MAIN_PRODUCT_REF_NOT_EDITABLE)) { + print ''; + } + else { + print ''; + } + // Label print ''; From b048d95cc82243b411a3478680a99d4d52e7312f Mon Sep 17 00:00:00 2001 From: stickler-ci Date: Thu, 20 Oct 2022 16:09:26 +0000 Subject: [PATCH 05/11] Fixing style errors. --- htdocs/product/card.php | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 8ddef85682a..e8edb5d1d8b 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1866,13 +1866,12 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Label").'
'; // Ref - if (!empty($conf->global->MAIN_PRODUCT_REF_NOT_EDITABLE)) { + if (!empty($conf->global->MAIN_PRODUCT_REF_NOT_EDITABLE)) { print ''; - } - else { + } else { print ''; } - + // Label print ''; From 8b61fd5c1a1ee5c6464c426c1a1644f4b93c23ad Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Fri, 21 Oct 2022 00:31:31 +0200 Subject: [PATCH 06/11] Lang --- htdocs/langs/en_US/cron.lang | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/langs/en_US/cron.lang b/htdocs/langs/en_US/cron.lang index 9705f8823b0..021de63de05 100644 --- a/htdocs/langs/en_US/cron.lang +++ b/htdocs/langs/en_US/cron.lang @@ -84,6 +84,7 @@ MakeLocalDatabaseDumpShort=Local database backup MakeLocalDatabaseDump=Create a local database dump. Parameters are: compression ('gz' or 'bz' or 'none'), backup type ('mysql', 'pgsql', 'auto'), 1, 'auto' or filename to build, number of backup files to keep MakeSendLocalDatabaseDumpShort=Send local database backup MakeSendLocalDatabaseDump=Send local database backup by email. Parameters are: to, from, subject, message, filename (Name of file sent), filter ('sql' for backup of database only) +BackupIsTooLargeSend=Sorry, last backup file is too large to be send by email WarningCronDelayed=Attention, for performance purpose, whatever is next date of execution of enabled jobs, your jobs may be delayed to a maximum of %s hours, before being run. DATAPOLICYJob=Data cleaner and anonymizer JobXMustBeEnabled=Job %s must be enabled From 0e5f01dd13fec2a74c2905c457132ad99dc8a80a Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Fri, 21 Oct 2022 00:33:04 +0200 Subject: [PATCH 07/11] Add param --- htdocs/core/class/utils.class.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index 9a330c7aba5..daaebd09ecf 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -1237,9 +1237,10 @@ class Utils * @param string $message Message * @param string $filename List of files to attach (full path of filename on file system) * @param string $filter Filter file send + * @param string $sizelimit Limit size to send file * @return int 0 if OK, < 0 if KO (this function is used also by cron so only 0 is OK) */ - public function sendBackup($sendto = '', $from = '', $subject = '', $message = '', $filename = '', $filter = '') + public function sendBackup($sendto = '', $from = '', $subject = '', $message = '', $filename = '', $filter = '', $sizelimit = 100000000) { global $conf, $langs; From 1db5ab30a944aa41718a1540234a0c8a48960234 Mon Sep 17 00:00:00 2001 From: Anthony Berton Date: Fri, 21 Oct 2022 00:34:52 +0200 Subject: [PATCH 08/11] Link download file in mail --- htdocs/core/class/utils.class.php | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/htdocs/core/class/utils.class.php b/htdocs/core/class/utils.class.php index daaebd09ecf..1d3df8191a6 100644 --- a/htdocs/core/class/utils.class.php +++ b/htdocs/core/class/utils.class.php @@ -1298,9 +1298,13 @@ class Utils } if ($filepath) { - if ($filesize > 100000000) { - $output = 'Sorry, last backup file is too large to be send by email'; - $error++; + if ($filesize > $sizelimit) { + $message .= '
'.$langs->trans("BackupIsTooLargeSend"); + $documenturl = $dolibarr_main_url_root.'/document.php?modulepart=systemtools&atachement=1&file=backup/'.urlencode($filename[0]); + $message .= '
Lien de téléchargement'; + $filepath = ''; + $mimetype = ''; + $filename = ''; } } else { $output = 'No backup file found'; From a96a623c0ee9af7b074d9a1cb842d52424784720 Mon Sep 17 00:00:00 2001 From: Regis Houssin Date: Fri, 21 Oct 2022 06:48:33 +0200 Subject: [PATCH 09/11] FIX remove unused code for avoid error --- htdocs/core/class/translate.class.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/class/translate.class.php b/htdocs/core/class/translate.class.php index 5bfdbc7e0f1..394f328ccdf 100644 --- a/htdocs/core/class/translate.class.php +++ b/htdocs/core/class/translate.class.php @@ -721,9 +721,9 @@ class Translate return $str; } else { - if ($key[0] == '$') { + /*if ($key[0] == '$') { return dol_eval($key, 1, 1, '1'); - } + }*/ return $this->getTradFromKey($key); } } From 4a3a72245f00b6b9a0f6eba2049f4adc74f2b5ef Mon Sep 17 00:00:00 2001 From: Francis Appels Date: Wed, 19 Oct 2022 12:16:44 +0200 Subject: [PATCH 10/11] Use shared entity on supplier order create --- htdocs/fourn/class/fournisseur.commande.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/fourn/class/fournisseur.commande.class.php b/htdocs/fourn/class/fournisseur.commande.class.php index 9e59dbceda6..c535ad14b72 100644 --- a/htdocs/fourn/class/fournisseur.commande.class.php +++ b/htdocs/fourn/class/fournisseur.commande.class.php @@ -1398,7 +1398,7 @@ class CommandeFournisseur extends CommonOrder $sql .= ", '".$this->db->escape($this->ref_supplier)."'"; $sql .= ", '".$this->db->escape($this->note_private)."'"; $sql .= ", '".$this->db->escape($this->note_public)."'"; - $sql .= ", ".((int) $conf->entity); + $sql .= ", ".setEntity($this); $sql .= ", ".((int) $this->socid); $sql .= ", ".($this->fk_project > 0 ? ((int) $this->fk_project) : "null"); $sql .= ", '".$this->db->idate($date)."'"; From cd9984cd3e3cc380fdb69a935b397f1f12d6b20f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 24 Oct 2022 19:19:41 +0200 Subject: [PATCH 11/11] Update card.php --- htdocs/product/card.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index e8edb5d1d8b..7c51da5d02a 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -1866,10 +1866,10 @@ if (is_object($objcanvas) && $objcanvas->displayCanvasExists($action)) { print '
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Label").'
'; // Ref - if (!empty($conf->global->MAIN_PRODUCT_REF_NOT_EDITABLE)) { - print ''; - } else { + if (empty($conf->global->MAIN_PRODUCT_REF_NOT_EDITABLE)) { print ''; + } else { + print ''; }
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'
'.$langs->trans("Ref").'