You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When use of custom list in bookkeeping , I get no output in accountancy/bookkeeping/list.php because all is delivered as llx_accounting_account.rowid and it want "account_number" from table. I made a hack that works :
} elseif ($key == 't.search_accounting_code_in' && !empty($value)) {
$value = $db->sanitize($value, 1);
$vals = explode(',' , $value);
foreach ($vals as $key => $val) {
if($val){
$sqlan = "SELECT account_number as an FROM " . MAIN_DB_PREFIX . "accounting_account as aa WHERE aa.rowid = " . $val ;
$acc = $db->query($sqlan) ;
if ($acc) {
$obj = $db->fetch_object($acc);
$accno .= "'" . $obj->an . "',";
}
}
}
$accno = substr_replace($accno, '', -1);
$sqlwhere[] = 't.numero_compte IN ('. $accno .')';
}
Could be made to a class function of accountingjournal.class.php !?
Dolibarr Version
21.0-beta
Environment PHP
8.3
Environment Database
mysqli
Steps to reproduce the behavior and expected behavior
No response
Attached files
No response
The text was updated successfully, but these errors were encountered:
Bug
When use of custom list in bookkeeping , I get no output in accountancy/bookkeeping/list.php because all is delivered as llx_accounting_account.rowid and it want "account_number" from table. I made a hack that works :
} elseif ($key == 't.search_accounting_code_in' && !empty($value)) {
$value = $db->sanitize($value, 1);
$vals = explode(',' , $value);
foreach ($vals as $key => $val) {
if($val){
$sqlan = "SELECT account_number as an FROM " . MAIN_DB_PREFIX . "accounting_account as aa WHERE aa.rowid = " . $val ;
$acc = $db->query($sqlan) ;
if ($acc) {
$obj = $db->fetch_object($acc);
$accno .= "'" . $obj->an . "',";
}
}
}
$accno = substr_replace($accno, '', -1);
$sqlwhere[] = 't.numero_compte IN ('. $accno .')';
}
Could be made to a class function of accountingjournal.class.php !?
Dolibarr Version
21.0-beta
Environment PHP
8.3
Environment Database
mysqli
Steps to reproduce the behavior and expected behavior
No response
Attached files
No response
The text was updated successfully, but these errors were encountered: