diff --git a/htdocs/product/stock/card.php b/htdocs/product/stock/card.php index 095eaee313f..81fcb2db701 100644 --- a/htdocs/product/stock/card.php +++ b/htdocs/product/stock/card.php @@ -789,6 +789,7 @@ if ($action == 'create') { print $langs->trans("CorrectStock"); print ""; } + if (!empty($conf->global->PRODUCT_USE_UNITS)) { if ($i == 0) { $units = $productstatic->fk_unit; @@ -796,11 +797,13 @@ if ($action == 'create') { $sameunits = false; } } + print ""; $i++; } $db->free($resql); + // Total print ''.$langs->trans("Total").''; print ''; $valtoshow = price2num($totalunit, 'MS'); @@ -818,9 +821,15 @@ if ($action == 'create') { print ' '; print ''.price(price2num($totalvaluesell, 'MT')).''; } - print ' '; - print ' '; - print ' '; + + if ($user->rights->stock->mouvement->creer) { + print ' '; + } + + if ($user->rights->stock->creer) { + print ' '; + } + print ''; } else { dol_print_error($db); diff --git a/htdocs/reception/card.php b/htdocs/reception/card.php index 9afa6ec57d8..9fdae4e0cc7 100644 --- a/htdocs/reception/card.php +++ b/htdocs/reception/card.php @@ -358,6 +358,7 @@ if (empty($reshook)) { $batch = "batch".$i; $cost_price = "cost_price".$i; + //if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && getDolGlobalString('RECEPTION_GETS_ALL_ORDER_PRODUCTS')) || (GETPOST($qty, 'int') < 0 && getDolGlobalString('RECEPTION_ALLOW_NEGATIVE_QTY'))) { if (GETPOST($qty, 'int') > 0 || (GETPOST($qty, 'int') == 0 && $conf->global->RECEPTION_GETS_ALL_ORDER_PRODUCTS)) { $ent = "entl".$i; diff --git a/htdocs/reception/class/reception.class.php b/htdocs/reception/class/reception.class.php index 1abfb49fb4c..ebb50154eda 100644 --- a/htdocs/reception/class/reception.class.php +++ b/htdocs/reception/class/reception.class.php @@ -571,7 +571,7 @@ class Reception extends CommonObject $qty = $obj->qty; - if ($qty <= 0) { + if ($qty == 0 || ($qty < 0 && !getDolGlobalInt('RECEPTION_ALLOW_NEGATIVE_QTY'))) { continue; } dol_syslog(get_class($this)."::valid movement index ".$i." ed.rowid=".$obj->rowid." edb.rowid=".$obj->edbrowid); diff --git a/htdocs/takepos/index.php b/htdocs/takepos/index.php index 17c4f14060c..dc2bd8b684a 100644 --- a/htdocs/takepos/index.php +++ b/htdocs/takepos/index.php @@ -583,8 +583,9 @@ function New() { /** * Search products * - * @param {int} keyCodeForEnter Key code for "enter" - * return {void} + * @param string keyCodeForEnter Key code for "enter" or '' if not + * @param int moreorless ?? + * return void */ function Search2(keyCodeForEnter, moreorless) { var eventKeyCode = window.event.keyCode; @@ -599,6 +600,8 @@ function Search2(keyCodeForEnter, moreorless) { search_start = $('#search_start_'+moreorless).val(); } + console.log("search_term="+search_term); + if (search_term == '') { $("[id^=prowatermark]").html(""); $("[id^=prodesc]").text(""); @@ -612,7 +615,7 @@ function Search2(keyCodeForEnter, moreorless) { } var search = false; - if (keyCodeForEnter != '' || eventKeyCode == keyCodeForEnter) { + if (keyCodeForEnter == '' || eventKeyCode == keyCodeForEnter) { search = true; } diff --git a/htdocs/takepos/invoice.php b/htdocs/takepos/invoice.php index 47af7d16260..8712b350b03 100644 --- a/htdocs/takepos/invoice.php +++ b/htdocs/takepos/invoice.php @@ -1688,7 +1688,7 @@ if (($action == "valid" || $action == "history") && $invoice->type != Facture::T if ($action == "search") { print '
- +
'; }