forked from Wavyzz/dolibarr
Merge branch '19.0' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -259,7 +259,9 @@ if ($action == 'dispatch' && $permissiontoreceive) {
|
||||
}
|
||||
|
||||
// We ask to move a qty
|
||||
if (GETPOST($qty) != 0) {
|
||||
$qtytomove = (float) price2num(GETPOST($qty, 'alphanohtml'));
|
||||
$puformove = (float) price2num(GETPOST($pu, 'alphanohtml'));
|
||||
if ($qtytomove != 0) {
|
||||
if (!(GETPOST($ent, 'int') > 0)) {
|
||||
dol_syslog('No dispatch for line '.$key.' as no warehouse was chosen.');
|
||||
$text = $langs->transnoentities('Warehouse').', '.$langs->transnoentities('Line').' '.($numline);
|
||||
@@ -268,7 +270,7 @@ if ($action == 'dispatch' && $permissiontoreceive) {
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$result = $object->dispatchProduct($user, GETPOST($prod, 'int'), GETPOST($qty), GETPOST($ent, 'int'), GETPOST($pu), GETPOST('comment'), '', '', '', GETPOST($fk_commandefourndet, 'int'), $notrigger);
|
||||
$result = $object->dispatchProduct($user, GETPOSTINT($prod), $qtytomove, GETPOSTINT($ent), $puformove, GETPOST('comment'), '', '', '', GETPOST($fk_commandefourndet, 'int'), $notrigger);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
@@ -327,7 +329,9 @@ if ($action == 'dispatch' && $permissiontoreceive) {
|
||||
}
|
||||
|
||||
// We ask to move a qty
|
||||
if (GETPOST($qty) > 0) {
|
||||
$qtytomove = (float) price2num(GETPOST($qty, 'alphanohtml'));
|
||||
$puformove = (float) price2num(GETPOST($pu, 'alphanohtml'));
|
||||
if ($qtytomove > 0) {
|
||||
$productId = GETPOSTINT($prod);
|
||||
|
||||
if (!(GETPOST($ent, 'int') > 0)) {
|
||||
@@ -345,7 +349,7 @@ if ($action == 'dispatch' && $permissiontoreceive) {
|
||||
}
|
||||
|
||||
if (!$error) {
|
||||
$result = $object->dispatchProduct($user, $productId, GETPOST($qty), GETPOST($ent, 'int'), GETPOST($pu), GETPOST('comment'), $dDLUO, $dDLC, GETPOST($lot, 'alpha'), GETPOST($fk_commandefourndet, 'int'), $notrigger);
|
||||
$result = $object->dispatchProduct($user, $productId, $qtytomove, GETPOSTINT($ent), $puformove, GETPOST('comment'), $dDLUO, $dDLC, GETPOST($lot, 'alpha'), GETPOST($fk_commandefourndet, 'int'), $notrigger);
|
||||
if ($result < 0) {
|
||||
setEventMessages($object->error, $object->errors, 'errors');
|
||||
$error++;
|
||||
|
||||
Reference in New Issue
Block a user