Fix negative reception was no more possible. Use hidden const to restore
This commit is contained in:
parent
060f7bf67c
commit
54c657e50c
@ -359,6 +359,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;
|
||||
|
||||
|
||||
@ -583,7 +583,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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user