Add more info to help debug
This commit is contained in:
parent
fde9a6667f
commit
fa5d96d562
@ -108,6 +108,11 @@ class AccountingAccount extends CommonObject
|
||||
*/
|
||||
public $account_category;
|
||||
|
||||
/**
|
||||
* @var int Label category account
|
||||
*/
|
||||
public $account_category_label;
|
||||
|
||||
/**
|
||||
* @var int Status
|
||||
*/
|
||||
@ -193,7 +198,8 @@ class AccountingAccount extends CommonObject
|
||||
$sql .= " AND a.fk_pcg_version = '".$this->db->escape($limittoachartaccount)."'";
|
||||
}
|
||||
|
||||
dol_syslog(get_class($this)."::fetch", LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::fetch id=".$id." account_number=".$account_number, LOG_DEBUG);
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) {
|
||||
$obj = $this->db->fetch_object($result);
|
||||
|
||||
@ -1834,6 +1834,7 @@ if ($id) {
|
||||
$class = '';
|
||||
$showfield = 1;
|
||||
$valuetoshow = empty($obj->{$value}) ? '' : $obj->{$value};
|
||||
$titletoshow = '';
|
||||
|
||||
if ($value == 'entity') {
|
||||
$withentity = $valuetoshow;
|
||||
@ -1965,6 +1966,11 @@ if ($id) {
|
||||
} elseif (in_array($value, array('recuperableonly'))) {
|
||||
$class = "center";
|
||||
} elseif ($value == 'accountancy_code' || $value == 'accountancy_code_sell' || $value == 'accountancy_code_buy') {
|
||||
if (!empty($conf->accounting->enabled)) {
|
||||
$tmpaccountingaccount = new AccountingAccount($db);
|
||||
$tmpaccountingaccount->fetch(0, $valuetoshow, 1);
|
||||
$titletoshow = $langs->transnoentitiesnoconv("Pcgtype").': '.$tmpaccountingaccount->pcg_type;
|
||||
}
|
||||
$valuetoshow = length_accountg($valuetoshow);
|
||||
} elseif ($value == 'fk_tva') {
|
||||
foreach ($form->cache_vatrates as $key => $Tab) {
|
||||
@ -2012,7 +2018,7 @@ if ($id) {
|
||||
}
|
||||
// Show value for field
|
||||
if ($showfield) {
|
||||
print '<!-- '. $value .' --><td class="'.$class.'">'.$valuetoshow.'</td>';
|
||||
print '<!-- '. $value .' --><td class="'.$class.'"'.($titletoshow ? ' title="'.dol_escape_htmltag($titletoshow).'"' : '').'>'.$valuetoshow.'</td>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user