Skip to content

Commit

Permalink
Merge pull request #9937 from aspangaro/9.0_FEC
Browse files Browse the repository at this point in the history
Debug asset module
  • Loading branch information
eldy committed Nov 5, 2018
2 parents ce25c66 + 8d8023b commit 6b89bc4
Show file tree
Hide file tree
Showing 3 changed files with 55 additions and 254 deletions.
13 changes: 8 additions & 5 deletions htdocs/asset/class/asset_type.class.php
Expand Up @@ -42,7 +42,7 @@ class AssetType extends CommonObject
/**
* @var string String with name of icon for myobject. Must be the part after the 'object_' into object_myobject.png
*/
public $picto = 'group';
public $picto = 'invoice';

/**
* 0=No test on entity, 1=Test with field entity, 2=Test with link by societe
Expand All @@ -51,9 +51,9 @@ class AssetType extends CommonObject
public $ismultientitymanaged = 1;

/**
* @var string Asset type label
*/
public $label;
* @var string Asset type label
*/
public $label;

/** @var string Accountancy code asset */
public $accountancy_code_asset;
Expand Down Expand Up @@ -107,12 +107,14 @@ function create($user,$notrigger=0)
$sql.= ", accountancy_code_asset";
$sql.= ", accountancy_code_depreciation_asset";
$sql.= ", accountancy_code_depreciation_expense";
$sql.= ", note";
$sql.= ", entity";
$sql.= ") VALUES (";
$sql.= "'".$this->db->escape($this->label)."'";
$sql.= ", '".$this->db->escape($this->accountancy_code_asset)."'";
$sql.= ", '".$this->db->escape($this->accountancy_code_depreciation_asset)."'";
$sql.= ", '".$this->db->escape($this->accountancy_code_depreciation_expense)."'";
$sql.= ", '".$this->db->escape($this->note)."'";
$sql.= ", ".$conf->entity;
$sql.= ")";

Expand Down Expand Up @@ -179,7 +181,8 @@ function update($user,$notrigger=0)
$sql.= "label = '".$this->db->escape($this->label) ."',";
$sql.= "accountancy_code_asset = '".$this->db->escape($this->accountancy_code_asset)."',";
$sql.= "accountancy_code_depreciation_asset = '".$this->db->escape($this->accountancy_code_depreciation_asset)."',";
$sql.= "accountancy_code_depreciation_expense = '".$this->db->escape($this->accountancy_code_depreciation_expense)."'";
$sql.= "accountancy_code_depreciation_expense = '".$this->db->escape($this->accountancy_code_depreciation_expense)."',";
$sql.= "note = '".$this->db->escape($this->note) ."'";
$sql.= " WHERE rowid =".$this->id;

$result = $this->db->query($sql);
Expand Down

0 comments on commit 6b89bc4

Please sign in to comment.