Skip to content

Commit

Permalink
Merge branch '10.0' of git@github.com:Dolibarr/dolibarr.git into develop
Browse files Browse the repository at this point in the history
Conflicts:
	htdocs/core/class/commonobject.class.php
  • Loading branch information
eldy committed Aug 3, 2019
2 parents acf8314 + 25ee539 commit 5b2ca3b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion htdocs/core/class/commonobject.class.php
Expand Up @@ -2054,6 +2054,7 @@ public function setPaymentTerms($id)
}
}


/**
* Change the retained warranty payments terms
*
Expand Down Expand Up @@ -7390,7 +7391,7 @@ public function fetchCommon($id, $ref = null, $morewhere = '')
if (!empty($id)) $sql.= ' WHERE rowid = '.$id;
elseif (!empty($ref)) $sql.= " WHERE ref = ".$this->quote($ref, $this->fields['ref']);
else $sql.=' WHERE 1 = 1'; // usage with empty id and empty ref is very rare
if (empty($id) && $this->ismultientitymanaged == 1) $sql.=' AND entity IN ('.getEntity($this->table_element).')';
if (empty($id) && isset($this->ismultientitymanaged) && $this->ismultientitymanaged == 1) $sql.=' AND entity IN ('.getEntity($this->table_element).')';
if ($morewhere) $sql.= $morewhere;
$sql.=' LIMIT 1'; // This is a fetch, to be sure to get only one record

Expand Down
2 changes: 1 addition & 1 deletion htdocs/modulebuilder/template/class/myobject.class.php
Expand Up @@ -60,7 +60,7 @@ class MyObject extends CommonObject

const STATUS_DRAFT = 0;
const STATUS_VALIDATED = 1;
const STATUS_DISABLED = 9;
const STATUS_CANCELED = 9;


/**
Expand Down
4 changes: 2 additions & 2 deletions htdocs/modulebuilder/template/myobject_list.php
Expand Up @@ -135,7 +135,7 @@
foreach($object->fields as $key => $val)
{
// If $val['visible']==0, then we never show the field
if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>$val['enabled'], 'position'=>$val['position']);
if (! empty($val['visible'])) $arrayfields['t.'.$key]=array('label'=>$val['label'], 'checked'=>(($val['visible']<0)?0:1), 'enabled'=>($val['enabled'] && ($val['visible'] != 3)), 'position'=>$val['position']);
}
// Extra fields
if (is_array($extrafields->attributes[$object->table_element]['label']) && count($extrafields->attributes[$object->table_element]['label']) > 0)
Expand Down Expand Up @@ -493,7 +493,7 @@ function init_myfunc()
if (in_array($val['type'], array('timestamp'))) $cssforfield.=($cssforfield?' ':'').'nowrap';
elseif ($key == 'ref') $cssforfield.=($cssforfield?' ':'').'nowrap';

if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price'))) $cssforfield.=($cssforfield?' ':'').'right';
if (in_array($val['type'], array('double(24,8)', 'double(6,3)', 'integer', 'real', 'price')) && $key != 'status') $cssforfield.=($cssforfield?' ':'').'right';

if (! empty($arrayfields['t.'.$key]['checked']))
{
Expand Down

0 comments on commit 5b2ca3b

Please sign in to comment.