From dc562be441721147d965c5eb231804b9840c0892 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 Sep 2020 20:02:19 +0200 Subject: [PATCH 01/17] Prepare 12.0.3 --- ChangeLog | 48 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/ChangeLog b/ChangeLog index 6ee67b86faa..e908a78b498 100644 --- a/ChangeLog +++ b/ChangeLog @@ -2,6 +2,54 @@ English Dolibarr ChangeLog -------------------------------------------------------------- +***** ChangeLog for 12.0.3 compared to 12.0.2 ***** +FIX: 10.0 - when the mime file name is different from the filesystem n… +FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename +FIX: 11.0 - expenses lines overlapping the total amounts frame +FIX: 12.0 - round value of virtual stock on product stock reassort list +FIX: #14469 +FIX: #14474 Error when deleting +FIX: #14530 +FIX: #14703 +FIX: - Accountancy balance Error SQL on entity +FIX: Bad number of subscription (forgotten when member was resiliated) +FIX: bad route url to delete subproduct with API +FIX: Category for suplements not saved +FIX: Compatibility with modules without document generation +FIX: cron load lang +FIX: Cron load lang +FIX: CSS +FIX: Error management. Do no try to approve PO if validation fails. +FIX: expenses lines overlapping the frame for total amounts. +FIX: Filter in "billed" of orders was not saved +FIX: infinite fetch object linked loop +FIX: Intervention lose html tags when updating +FIX: JS CRASH - bad usage of moreparam +FIX: lang fr retained warranty +FIX: look and feel v12 +FIX: Look and feel v12: First tab must be name of object +FIX: missing entity check +FIX: missing param for hook +FIX: Missing transaction on PO actions +FIX: MySql Strict mode +FIX: param entity in html form file +FIX: Problems on FEC format +FIX: round stock value on product list +FIX: - Send mail from contact : select mail model +FIX: set sales representatives on create company card +FIX: Setup of stock increase/decrease +FIX: sign of amount with credit note and multicurrencies +FIX: Static property called as non static +FIX: task leftmenu +FIX: title button attribute id empty +FIX: unit price divided by quantity when accepting supplier price pro… +FIX: unit price divided by quantity when accepting supplier price proposal +FIX: Update extrafields on line only if it is supported +FIX: Update line of BOM +FIX: using decimal on stock correction +FIX: Visualization rights correction on last modified contacts box +FIX: Wrong redirection +FIX: Yogosha report 4425 (backport) ***** ChangeLog for 12.0.2 compared to 12.0.1 ***** FIX: computation of the bottom margin of returns NaN because body is not loaded yet From 83bb3bdb00b6bfa327e18dda0a5cadcbfe860982 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sun, 20 Sep 2020 20:03:18 +0200 Subject: [PATCH 02/17] 12.0.3 --- ChangeLog | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index e908a78b498..e7abb3f7cd6 100644 --- a/ChangeLog +++ b/ChangeLog @@ -3,7 +3,6 @@ English Dolibarr ChangeLog -------------------------------------------------------------- ***** ChangeLog for 12.0.3 compared to 12.0.2 ***** -FIX: 10.0 - when the mime file name is different from the filesystem n… FIX: 10.0 - when the mime file name is different from the filesystem name, the attachment name should be the mime filename FIX: 11.0 - expenses lines overlapping the total amounts frame FIX: 12.0 - round value of virtual stock on product stock reassort list @@ -16,7 +15,6 @@ FIX: Bad number of subscription (forgotten when member was resiliated) FIX: bad route url to delete subproduct with API FIX: Category for suplements not saved FIX: Compatibility with modules without document generation -FIX: cron load lang FIX: Cron load lang FIX: CSS FIX: Error management. Do no try to approve PO if validation fails. @@ -24,9 +22,8 @@ FIX: expenses lines overlapping the frame for total amounts. FIX: Filter in "billed" of orders was not saved FIX: infinite fetch object linked loop FIX: Intervention lose html tags when updating -FIX: JS CRASH - bad usage of moreparam +FIX: JS CRASH - bad usage of moreparam FIX: lang fr retained warranty -FIX: look and feel v12 FIX: Look and feel v12: First tab must be name of object FIX: missing entity check FIX: missing param for hook @@ -42,7 +39,6 @@ FIX: sign of amount with credit note and multicurrencies FIX: Static property called as non static FIX: task leftmenu FIX: title button attribute id empty -FIX: unit price divided by quantity when accepting supplier price pro… FIX: unit price divided by quantity when accepting supplier price proposal FIX: Update extrafields on line only if it is supported FIX: Update line of BOM From c596f80fd554909cd6f512cff0eba10d9cb76d75 Mon Sep 17 00:00:00 2001 From: "jove@bisquerra.com" Date: Sun, 20 Sep 2020 23:29:59 +0200 Subject: [PATCH 03/17] NEW Show available stock in TakePOS --- htdocs/takepos/invoice.php | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 3ab9f91c9ff..397ff291ec5 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1065,7 +1065,29 @@ if ($placeid > 0) $htmlforlines .= ''; $htmlforlines .= ''.vatrate($line->remise_percent, true).''; - $htmlforlines .= ''.$line->qty.''; + $htmlforlines .= ''; + if (!empty($conf->stock->enabled)) + { + $constantforkey = 'CASHDESK_ID_WAREHOUSE'.$_SESSION["takeposterminal"]; + $sql = "SELECT e.rowid, e.ref, e.lieu, e.fk_parent, e.statut, ps.reel, ps.rowid as product_stock_id, p.pmp"; + $sql .= " FROM ".MAIN_DB_PREFIX."entrepot as e,"; + $sql .= " ".MAIN_DB_PREFIX."product_stock as ps"; + $sql .= " LEFT JOIN ".MAIN_DB_PREFIX."product as p ON p.rowid = ps.fk_product"; + $sql .= " WHERE ps.reel != 0"; + $sql .= " AND ps.fk_entrepot = ".$conf->global->$constantforkey; + $sql .= " AND e.entity IN (".getEntity('stock').")"; + $sql .= " AND ps.fk_product = ".$line->fk_product; + $resql = $db->query($sql); + if ($resql) { + $obj = $db->fetch_object($resql); + $stock_real = price2num($obj->reel, 'MS'); + if ($line->qty>$stock_real) $htmlforlines .= ""; + $htmlforlines .= $line->qty.' ('.$langs->trans("Of").' '.$stock_real.')'; + if ($line->qty>$stock_real) $htmlforlines .= ""; + } + } + else $htmlforlines .= $line->qty; + $htmlforlines .= ''; $htmlforlines .= ''.price($line->total_ttc).''; } $htmlforlines .= ''."\n"; From 3ca379c9e631da75fe21a51ce174f0b44bc7d217 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Mon, 21 Sep 2020 12:16:22 +0200 Subject: [PATCH 04/17] FIX Restore multiselect (selection of prospect level) Conflicts: htdocs/core/class/html.form.class.php --- htdocs/core/class/html.form.class.php | 5 +- htdocs/core/lib/functions.lib.php | 2 +- .../multiselect/jquery.multi-select.js | 360 ++++++++++++++++++ .../multiselect/jquery.multi-select.min.js | 9 + htdocs/main.inc.php | 4 + htdocs/theme/eldy/global.inc.php | 15 +- htdocs/theme/md/style.css.php | 4 + 7 files changed, 386 insertions(+), 13 deletions(-) create mode 100644 htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js create mode 100644 htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.min.js diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php index be3c1c669ba..2a95dd4cd20 100644 --- a/htdocs/core/class/html.form.class.php +++ b/htdocs/core/class/html.form.class.php @@ -6681,8 +6681,7 @@ class Form templateSelection: formatSelection /* For 4.0 */ }); });'."\n"; - } - elseif ($addjscombo == 2) + } elseif ($addjscombo == 2 && ! defined('DISABLE_MULTISELECT')) { // Add other js lib // TODO external lib multiselect/jquery.multi-select.js must have been loaded to use this multiselect plugin @@ -7400,7 +7399,7 @@ class Form } //if ($conf->browser->layout == 'phone') $ret.='
'; - $ret .= '
'; + $ret .= '
'; // For thirdparty, contact, user, member, the ref is the id, so we show something else if ($object->element == 'societe') diff --git a/htdocs/core/lib/functions.lib.php b/htdocs/core/lib/functions.lib.php index 1a47d634299..cffaf820482 100644 --- a/htdocs/core/lib/functions.lib.php +++ b/htdocs/core/lib/functions.lib.php @@ -1325,7 +1325,7 @@ function dol_get_fiche_head($links = array(), $active = '', $title = '', $notab { $left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left'); $right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right'); - + $tabsname = str_replace("@", "", $picto); $out .= '
'; $out .= ''.$langs->trans("More").'... ('.$nbintab.')'; diff --git a/htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js b/htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js new file mode 100644 index 00000000000..ee62d1f588d --- /dev/null +++ b/htdocs/includes/jquery/plugins/multiselect/jquery.multi-select.js @@ -0,0 +1,360 @@ +// jquery.multi-select.js +// by mySociety +// https://github.com/mysociety/jquery-multi-select + +;(function($) { + + "use strict"; + + var pluginName = "multiSelect", + defaults = { + 'containerHTML': '
', + 'menuHTML': '
', + 'buttonHTML': '', + 'menuItemsHTML': '
', + 'menuItemHTML': '