Skip to content

Commit

Permalink
Fix do not read product as a lot product when lot module disabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
fappels committed Feb 20, 2020
1 parent 191305c commit 52034fd
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions extdirect/class/ExtDirectCommande.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion extdirect/class/ExtDirectProduct.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 52034fd

Please sign in to comment.