dlc dluo are inverted

This commit is contained in:
Frédéric FRANCE 2022-05-16 11:06:21 +02:00 committed by GitHub
parent 7a361a3bde
commit e6c103733e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -352,8 +352,10 @@ if (empty($reshook)) {
} }
$qty = "qtyl".$i; $qty = "qtyl".$i;
$comment = "comment".$i; $comment = "comment".$i;
$eatby = "dlc".$i; // EATBY <-> DLUO see productbatch.class.php
$sellby = "dluo".$i; // SELLBY <-> DLC
$eatby = "dluo".$i;
$sellby = "dlc".$i;
$batch = "batch".$i; $batch = "batch".$i;
$cost_price = "cost_price".$i; $cost_price = "cost_price".$i;
@ -628,9 +630,11 @@ if (empty($reshook)) {
$batch = "batch".$line_id; $batch = "batch".$line_id;
$dlc = "dlc".$line_id; $dlc = "dlc".$line_id;
$dluo = "dluo".$line_id; $dluo = "dluo".$line_id;
$eatby = GETPOST($dlc, 'alpha'); // EATBY <-> DLUO
$eatby = GETPOST($dluo, 'alpha');
$eatbydate = str_replace('/', '-', $eatby); $eatbydate = str_replace('/', '-', $eatby);
$sellby = GETPOST($dluo, 'alpha'); // SELLBY <-> DLC
$sellby = GETPOST($dlc, 'alpha');
$sellbydate = str_replace('/', '-', $sellby); $sellbydate = str_replace('/', '-', $sellby);
$line->batch = GETPOST($batch, 'alpha'); $line->batch = GETPOST($batch, 'alpha');
$line->eatby = strtotime($eatbydate); $line->eatby = strtotime($eatbydate);
@ -641,8 +645,7 @@ if (empty($reshook)) {
setEventMessages($line->error, $line->errors, 'errors'); setEventMessages($line->error, $line->errors, 'errors');
$error++; $error++;
} }
} else // Product no predefined } else { // Product no predefined
{
$qty = "qtyl".$line_id; $qty = "qtyl".$line_id;
$line->id = $line_id; $line->id = $line_id;
$line->qty = GETPOST($qty, 'int'); $line->qty = GETPOST($qty, 'int');