Skip to content
Permalink
Browse files

Add width and height field.

Update length field name because reserved object property.
Fix product lot list
  • Loading branch information
fappels committed Mar 5, 2020
1 parent 6a48738 commit 1cad6ad3b9fcd96c52cbca87a0b9a8b80f443edc
Showing with 11 additions and 3 deletions.
  1. +11 −3 extdirect/class/ExtDirectProduct.class.php
@@ -279,8 +279,12 @@ public function readProduct(stdClass $param)
//measurements and units
$row->weight= $this->weight;
$row->weight_units= $this->weight_units;
$row->length= $this->length;
$row->product_length= $this->length; // length is ext direct reader reserved object element.
$row->length_units= $this->length_units;
$row->width= $this->width;
$row->width_units= $this->width_units;
$row->height= $this->height;
$row->height_units= $this->height_units;
$row->surface= $this->surface;
$row->surface_units= $this->surface_units;
$row->volume= $this->volume;
@@ -1366,8 +1370,12 @@ private function prepareFields($param)
//! Unites de mesure
$diff = ExtDirect::prepareField($diff, $param, $this, 'weight', 'weight');
$diff = ExtDirect::prepareField($diff, $param, $this, 'weight_units', 'weight_units');
$diff = ExtDirect::prepareField($diff, $param, $this, 'length', 'length');
$diff = ExtDirect::prepareField($diff, $param, $this, 'product_length', 'length');
$diff = ExtDirect::prepareField($diff, $param, $this, 'length_units', 'length_units');
$diff = ExtDirect::prepareField($diff, $param, $this, 'width', 'width');
$diff = ExtDirect::prepareField($diff, $param, $this, 'width_units', 'width_units');
$diff = ExtDirect::prepareField($diff, $param, $this, 'height', 'height');
$diff = ExtDirect::prepareField($diff, $param, $this, 'height_units', 'height_units');
$diff = ExtDirect::prepareField($diff, $param, $this, 'surface', 'surface');
$diff = ExtDirect::prepareField($diff, $param, $this, 'surface_units', 'surface_units');
$diff = ExtDirect::prepareField($diff, $param, $this, 'volume', 'volume');
@@ -1521,7 +1529,7 @@ public function fetchBatches(&$results,$row,$id,$warehouseId,$productStockId,$in
}
$batchesQty += $batch->qty;
}
} else if(isset($row->id)) {
} else if(isset($row->id) && !empty($productStockId)) {
// no batch
$num++;
$row->is_sub_product = false;

0 comments on commit 1cad6ad

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