Merge branch '16.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
b3fb15652d
@ -789,6 +789,7 @@ if ($action == 'create') {
|
||||
print $langs->trans("CorrectStock");
|
||||
print "</a></td>";
|
||||
}
|
||||
|
||||
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||
if ($i == 0) {
|
||||
$units = $productstatic->fk_unit;
|
||||
@ -796,11 +797,13 @@ if ($action == 'create') {
|
||||
$sameunits = false;
|
||||
}
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
$i++;
|
||||
}
|
||||
$db->free($resql);
|
||||
|
||||
// Total
|
||||
print '<tr class="liste_total"><td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>';
|
||||
print '<td class="liste_total right">';
|
||||
$valtoshow = price2num($totalunit, 'MS');
|
||||
@ -818,9 +821,15 @@ if ($action == 'create') {
|
||||
print '<td class="liste_total"> </td>';
|
||||
print '<td class="liste_total right">'.price(price2num($totalvaluesell, 'MT')).'</td>';
|
||||
}
|
||||
print '<td class="liste_total"> </td>';
|
||||
print '<td class="liste_total"> </td>';
|
||||
print '<td class="liste_total"> </td>';
|
||||
|
||||
if ($user->rights->stock->mouvement->creer) {
|
||||
print '<td class="liste_total"> </td>';
|
||||
}
|
||||
|
||||
if ($user->rights->stock->creer) {
|
||||
print '<td class="liste_total"> </td>';
|
||||
}
|
||||
|
||||
print '</tr>';
|
||||
} else {
|
||||
dol_print_error($db);
|
||||
|
||||
@ -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;
|
||||
|
||||
|
||||
@ -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);
|
||||
|
||||
@ -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;
|
||||
}
|
||||
|
||||
|
||||
@ -1688,7 +1688,7 @@ if (($action == "valid" || $action == "history") && $invoice->type != Facture::T
|
||||
|
||||
if ($action == "search") {
|
||||
print '<center>
|
||||
<input type="text" id="search" class="input-search-takepos" name="search" onkeyup="Search2();" style="width: 80%; font-size: 150%;" placeholder="'.dol_escape_htmltag($langs->trans('Search')).'">
|
||||
<input type="text" id="search" class="input-search-takepos" name="search" onkeyup="Search2(\'\', null);" style="width: 80%; font-size: 150%;" placeholder="'.dol_escape_htmltag($langs->trans('Search')).'">
|
||||
</center>';
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user