Skip to content
Permalink
Browse files

Fix do not read product as a lot product when lot module disabled.

  • Loading branch information
fappels committed Feb 20, 2020
1 parent 191305c commit 52034fd3e857ba3368fb9fd5df64e73d012ed030
Showing with 3 additions and 3 deletions.
  1. +2 −2 extdirect/class/ExtDirectCommande.class.php
  2. +1 −1 extdirect/class/ExtDirectProduct.class.php
@@ -980,7 +980,7 @@ public function readOrderLine(stdClass $params)
}
$row->unit_id = $line->fk_unit;
// split orderlines by batch
$row->has_batch = $myprod->status_batch;
if (! empty($conf->productbatch->enabled)) $row->has_batch = $myprod->status_batch;
$row->is_sub_product = false;
if (empty($conf->productbatch->enabled) || empty($line_warehouse_id)) {
array_push($results, $row);
@@ -1043,7 +1043,7 @@ public function readOrderLine(stdClass $params)
}
$row->unit_id = $line->fk_unit;
// split orderlines by batch
$row->has_batch = $myprod->status_batch;
if (! empty($conf->productbatch->enabled)) $row->has_batch = $myprod->status_batch;
$row->is_sub_product = false;
if (empty($conf->productbatch->enabled)) {
array_push($results, $row);
@@ -182,7 +182,7 @@ public function readProduct(stdClass $param)
$row->localtax2_tx = $this->localtax2_tx;

// batch managed product
$row->has_batch = $this->status_batch;
if (!empty($conf->productbatch->enabled)) $row->has_batch = $this->status_batch;

//! Stock
if (isset($warehouse) && $warehouse != ExtDirectFormProduct::ALLWAREHOUSE_ID) {

0 comments on commit 52034fd

Please sign in to comment.
You can’t perform that action at this time.