Bom : Display workstation of line
This commit is contained in:
parent
fde16f42c9
commit
dd5c61d9f2
@ -171,7 +171,7 @@ if (empty($reshook)) {
|
|||||||
$efficiency = price2num(GETPOST('efficiency', 'alpha'));
|
$efficiency = price2num(GETPOST('efficiency', 'alpha'));
|
||||||
$fk_unit = GETPOST('fk_unit', 'alphanohtml');
|
$fk_unit = GETPOST('fk_unit', 'alphanohtml');
|
||||||
|
|
||||||
if(!empty($idprod)){
|
if(!empty($idprod) && $conf->workstation->enabled){
|
||||||
$product = new Product($db);
|
$product = new Product($db);
|
||||||
$res = $product->fetch($idprod);
|
$res = $product->fetch($idprod);
|
||||||
if($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation;
|
if($res > 0 && $product->type == Product::TYPE_SERVICE) $fk_default_workstation = $product->fk_default_workstation;
|
||||||
|
|||||||
@ -158,9 +158,10 @@ if ($filtertype != 1) {
|
|||||||
// Work station
|
// Work station
|
||||||
if (isModEnabled('workstation')) {
|
if (isModEnabled('workstation')) {
|
||||||
$workstation = new Workstation($object->db);
|
$workstation = new Workstation($object->db);
|
||||||
$res = $workstation->fetch($tmpproduct->fk_default_workstation);
|
$fk_default_workstation = (!empty($line->fk_default_workstation)) ? $line->fk_default_workstation : $tmpproduct->fk_default_workstation;
|
||||||
|
$res = $workstation->fetch($fk_default_workstation);
|
||||||
|
|
||||||
print '<td class="linecolunit nowrap right">';
|
print '<td class="linecolworkstation nowrap right">';
|
||||||
$coldisplay++;
|
$coldisplay++;
|
||||||
if ($res > 0) echo $workstation->getNomUrl();
|
if ($res > 0) echo $workstation->getNomUrl();
|
||||||
print '</td>';
|
print '</td>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user