Cash transactions (400)
Browse code 400 (BrowseCode::CashTransactions, “Kasstaat”): the transaction lines of one cash book per statement, with the start and closing balance of the statement.
Twinfield documentation: Browse data.
equal('fin.trs.head.bankcode', $book): the cash book is required. Without it Twinfield answers with a server error. The criterion is not a column: usefin.trs.head.code.fin.trs.head.stmnumberis the statement number,startvalueandclosevaluethe balance before and after the statement.equal('fin.trs.head.status', 'normal'): provisional and final. Without it you also get the drafts, with number-1.fin.trs.line.currencydateis the value date of the line.
Criteria: period, cash book, number, statement number, general ledger account, amount and status. See browse-definitions/400.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/400.xml), with the label for a Dutch user, the data type and the values of a field with a fixed list (browsefields.xml). A field that is not visible is meant as criterion: asking for it as column can give a server error. Twinfield does not apply the proposed values: send every criterion you need.
| Field | Label | Type | Visible | Criterion |
|---|---|---|---|---|
fin.trs.head.yearperiod |
Periode | string | yes | between (proposed $DEFAULT$ … $DEFAULT$) |
fin.trs.head.bankcode |
Kasboek | special | no | equal |
fin.trs.head.code |
Dagboek | string | yes | |
fin.trs.head.shortname |
Naam | string | yes | |
fin.trs.head.number |
Boekst.nr. | decimal | yes | between |
fin.trs.head.stmnumber |
Kasstaatnr. | long | yes | between |
fin.trs.line.dim1 |
Grootboek | string | yes | equal |
fin.trs.line.dim1name |
Naam | string | yes | |
fin.trs.head.curcode |
Valuta | string | no | |
fin.trs.line.valuesigned |
Bedrag | value | no | |
fin.trs.line.basevaluesigned |
Euro | value | yes | between |
fin.trs.line.repvaluesigned |
– | value | no | |
fin.trs.head.startvalue |
Vorig saldo | value | yes | |
fin.trs.head.closevalue |
Eindsaldo | value | yes | |
fin.trs.line.currencydate |
Val.datum | date | yes | |
fin.trs.head.status |
Status | special: draft, temporary, final, inuse, normal |
yes | equal (proposed normal) |
fin.trs.head.banktype |
Banktype | special: bank, cashbook |
no |
$twinfield = Example::twinfield();
$book = $argv[1] ?? 'KAS';$year = (int) ($argv[2] ?? Example::lastYear($twinfield));
$query = $twinfield->browse(BrowseCode::CashTransactions) ->columns( 'fin.trs.head.code', 'fin.trs.head.stmnumber', 'fin.trs.head.startvalue', 'fin.trs.head.closevalue', 'fin.trs.head.number', 'fin.trs.line.dim1', 'fin.trs.line.dim1name', 'fin.trs.line.basevaluesigned', ) ->between('fin.trs.head.yearperiod', sprintf('%d/00', $year), sprintf('%d/55', $year)) ->equal('fin.trs.head.bankcode', $book) ->equal('fin.trs.head.status', 'normal');
$result = $query->get();
echo count($result), ' line(s) of cash book ', $book, ' in ', $year, PHP_EOL;
foreach ($result as $index => $row) { echo sprintf( '[%d/%d] %s statement %d (%s to %s), %d line %d: %s %s %s', $index + 1, count($result), $row->string('fin.trs.head.code'), $row->int('fin.trs.head.stmnumber'), $row->amount('fin.trs.head.startvalue'), $row->amount('fin.trs.head.closevalue'), $row->int('fin.trs.head.number'), $row->transactionLine?->line, $row->string('fin.trs.line.dim1'), $row->nullableString('fin.trs.line.dim1name') ?? '', $row->amount('fin.trs.line.basevaluesigned'), ), PHP_EOL;}php examples/browse-data/400-cash-transactions/example.php # cash book KAS, the last yearphp examples/browse-data/400-cash-transactions/example.php KAS2 2026 # cash book KAS2 in 2026Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
2 line(s) of cash book KAS in 2026[1/2] KAS statement 12 (250.00 to 219.75), 202600012 line 1: 1000 Kas -30.25[2/2] KAS statement 12 (250.00 to 219.75), 202600012 line 2: 4500 Kantoorkosten 25.00What the SDK sends to Twinfield and what Twinfield sends back, for a call like the one in this example. The responses come from the tests, with example data.
Compose the browse request and send it
Section titled “Compose the browse request and send it”Twinfield documentation: Browse data: Compose the browse request and send it.
$twinfield->browse(BrowseCode::CashTransactions) ->columns( 'fin.trs.head.code', 'fin.trs.head.stmnumber', 'fin.trs.head.startvalue', 'fin.trs.head.closevalue', 'fin.trs.head.number', 'fin.trs.line.dim1', 'fin.trs.line.dim1name', 'fin.trs.line.basevaluesigned', ) ->between('fin.trs.head.yearperiod', '2026/00', '2026/55') ->equal('fin.trs.head.bankcode', 'KAS') ->equal('fin.trs.head.status', 'normal') ->get();The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:
<columns code="400" optimize="true"> <column> <field>fin.trs.head.code</field> <visible>true</visible> </column> <column> <field>fin.trs.head.stmnumber</field> <visible>true</visible> </column> <column> <field>fin.trs.head.startvalue</field> <visible>true</visible> </column> <column> <field>fin.trs.head.closevalue</field> <visible>true</visible> </column> <column> <field>fin.trs.head.number</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim1</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim1name</field> <visible>true</visible> </column> <column> <field>fin.trs.line.basevaluesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.head.yearperiod</field> <operator>between</operator> <from>2026/00</from> <to>2026/55</to> </column> <column> <field>fin.trs.head.bankcode</field> <operator>equal</operator> <from>KAS</from> </column> <column> <field>fin.trs.head.status</field> <operator>equal</operator> <from>normal</from> </column></columns>Twinfield answers with this XML in ProcessXmlStringResult:
<browse result="1" first="1" last="2" total="2"> <th> <td label="" hideforuser="false" type="String">fin.trs.head.code</td> <td label="" hideforuser="false" type="Number">fin.trs.head.stmnumber</td> <td label="" hideforuser="false" type="Value">fin.trs.head.startvalue</td> <td label="" hideforuser="false" type="Value">fin.trs.head.closevalue</td> <td label="" hideforuser="false" type="Decimal">fin.trs.head.number</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim1</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim1name</td> <td label="" hideforuser="false" type="Value">fin.trs.line.basevaluesigned</td> </th> <tr> <td>KAS</td> <td>12</td> <td>250.00</td> <td>219.75</td> <td>202600012</td> <td>1000</td> <td>Kas</td> <td>-30.25</td> <key> <office>1000</office> <code>KAS</code> <number>202600012</number> <line>1</line> </key> </tr> <tr> <td>KAS</td> <td>12</td> <td>250.00</td> <td>219.75</td> <td>202600012</td> <td>4500</td> <td>Kantoorkosten</td> <td>25.00</td> <key> <office>1000</office> <code>KAS</code> <number>202600012</number> <line>2</line> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/400-cash-transactions/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.