List cash books
Lists the code and name of all cash books of the company, or of those matching a pattern.
cashBooks()->search() searches with the Finder type BNK and option banktype=1, so bank books are left out. all() goes through all pages for you. The search has the same methods as the activity search: inCode(), inName(), modifiedSince(), limit() and offset().
Each result is a CashBookSummary with code and name. Use get() for the short name and ledger account (see Read cash book).
$twinfield = Example::twinfield();
foreach ($twinfield->cashBooks()->search($argv[1] ?? '*')->all() as $cashBook) { echo $cashBook->code, ' ', $cashBook->name, PHP_EOL;}php examples/cash-books/list-cash-books/example.phpphp examples/cash-books/list-cash-books/example.php 'K*'KAS KasVRK_1 Verkopen pinSource
Section titled “Source”View examples/cash-books/list-cash-books/example.php on GitHub.
Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.