Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

No output bookeeping/list.php with custom list #32717

Open
bluethumb opened this issue Jan 19, 2025 · 0 comments
Open

No output bookeeping/list.php with custom list #32717

bluethumb opened this issue Jan 19, 2025 · 0 comments
Labels
Bug This is a bug (something does not work as expected)

Comments

@bluethumb
Copy link

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

@bluethumb bluethumb added the Bug This is a bug (something does not work as expected) label Jan 19, 2025
@bluethumb bluethumb changed the title No output bookeeping/list.php No output bookeeping/list.php with custom list Jan 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug This is a bug (something does not work as expected)
Projects
None yet
Development

No branches or pull requests

1 participant