forked from Wavyzz/dolibarr
Update objectline_edit.tpl.php
This commit is contained in:
committed by
GitHub
parent
7fb0eb5756
commit
312f11d7b3
@@ -189,15 +189,14 @@ $coldisplay++;
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<?php
|
<?php
|
||||||
if (!empty($conf->global->PRODUCT_USE_UNITS))
|
if (!empty($conf->global->PRODUCT_USE_UNITS)) {
|
||||||
{
|
|
||||||
$unit_type = false;
|
$unit_type = false;
|
||||||
// limit unit select to unit type
|
// limit unit select to unit type
|
||||||
if (!empty($line->fk_unit) && empty($conf->global->MAIN_EDIT_LINE_ALLOW_ALL_UNIT_TYPE)){
|
if (!empty($line->fk_unit) && empty($conf->global->MAIN_EDIT_LINE_ALLOW_ALL_UNIT_TYPE)) {
|
||||||
if (!class_exists('CUnits')) include_once DOL_DOCUMENT_ROOT . '/core/class/cunits.class.php';
|
include_once DOL_DOCUMENT_ROOT.'/core/class/cunits.class.php';
|
||||||
$cUnit = new CUnits($line->db);
|
$cUnit = new CUnits($line->db);
|
||||||
if ($cUnit->fetch($line->fk_unit) > 0){
|
if ($cUnit->fetch($line->fk_unit) > 0) {
|
||||||
if (!empty($cUnit->unit_type)){
|
if (!empty($cUnit->unit_type)) {
|
||||||
$unit_type = $cUnit->unit_type;
|
$unit_type = $cUnit->unit_type;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user