General ledger transactions (000)
Browse code 000 (BrowseCode::GeneralLedgerTransactions, “Grootboekkaart”): the transaction lines per general ledger account, as on the general ledger card in Twinfield. Use it to show the lines of one account; for a full copy of all transaction lines use 030_3.
Twinfield documentation: Browse data.
columns(…): unlike in 030_3,fin.trs.head.yearperiodcan be a column here. The amount in the base currency isfin.trs.line.basevaluesigned(negative for credit).between('fin.trs.head.yearperiod', '2025/00', '2025/55'): a whole year, from the opening balance (period 0) to the year end (55).equal('fin.trs.head.status', 'normal'): provisional and final transactions. Without it you also get drafts.between('fin.trs.line.dim1', $account, $account): one general ledger account.sortBy(): 000 sorts on up to three fields; here by account, period and number (newest first). Not every browse code sorts: 030_3 ignores it.displayName('fin.trs.head.status')gives the status as Twinfield shows it, in the language of the user.
Criteria: period, day book, number, status, general ledger account, amount and regime (fin.trs.head.browseregime). See browse-definitions/000.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/000.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.code |
Dagboek | string | yes | equal |
fin.trs.head.shortname |
Naam | string | yes | |
fin.trs.head.number |
Boekst.nr. | decimal | yes | between |
fin.trs.head.status |
Status | special: draft, temporary, final, inuse, normal |
yes | equal (proposed normal) |
fin.trs.line.dim1 |
Grootboek | string | yes | between |
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.line.description |
Omschrijving | string | yes | |
fin.trs.head.browseregime |
Regime | special: Generic, Commercial, Economic, Fiscal |
yes | equal |
$twinfield = Example::twinfield();
$year = (int) ($argv[1] ?? Example::lastYear($twinfield));$account = $argv[2] ?? null;
$query = $twinfield->browse(BrowseCode::GeneralLedgerTransactions) ->columns( 'fin.trs.head.yearperiod', 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.head.status', 'fin.trs.line.dim1', 'fin.trs.line.basevaluesigned', 'fin.trs.line.description', ) ->between('fin.trs.head.yearperiod', sprintf('%d/00', $year), sprintf('%d/55', $year)) ->equal('fin.trs.head.status', 'normal') ->sortBy('fin.trs.line.dim1') ->sortBy('fin.trs.head.yearperiod') ->sortBy('fin.trs.head.number', SortOrder::Descending);
if ($account !== null) { $query = $query->between('fin.trs.line.dim1', $account, $account);}
$result = $query->get();
echo count($result), ' transaction line(s) in ', $year, $account === null ? '' : ' on account ' . $account, PHP_EOL;
foreach ($result as $index => $row) { echo rtrim(sprintf( '[%d/%d] %s %s %s %d (%s) %s %s', $index + 1, count($result), $row->period('fin.trs.head.yearperiod'), $row->string('fin.trs.line.dim1'), $row->string('fin.trs.head.code'), $row->int('fin.trs.head.number'), $row->displayName('fin.trs.head.status') ?? $row->string('fin.trs.head.status'), $row->amount('fin.trs.line.basevaluesigned'), $row->nullableString('fin.trs.line.description') ?? '', )), PHP_EOL;}php examples/browse-data/000-general-ledger-transactions/example.php # the last yearphp examples/browse-data/000-general-ledger-transactions/example.php 2025 8000 # account 8000 in 2025Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
16 transaction line(s) in 2025[1/16] 2025/09 10100 MEMO 202500003 (Definitief) 17.50 Test op 16/09/2025[2/16] 2025/06 10101 MEMO 202500002 (Definitief) -2503.00 Journaalpost nr. 2, Testregel 3[3/16] 2025/02 16000 INK 202500003 (Definitief) 76.13 Factuur 466151[4/16] 2025/02 16000 INK 202500002 (Definitief) -362.62[5/16] 2025/02 16000 INK 202500001 (Definitief) -111.74 Factuur 151568…[15/16] 2025/02 77004 INK 202500003 (Definitief) -324.14 Factuur 466151[16/16] 2025/06 86090 MEMO 202500002 (Definitief) 601.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::GeneralLedgerTransactions) ->columns( 'fin.trs.head.yearperiod', 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.head.status', 'fin.trs.line.dim1', 'fin.trs.line.basevaluesigned', 'fin.trs.line.description', ) ->between('fin.trs.head.yearperiod', '2026/00', '2026/55') ->equal('fin.trs.head.status', 'normal') ->sortBy('fin.trs.line.dim1') ->sortBy('fin.trs.head.yearperiod') ->sortBy('fin.trs.head.number', SortOrder::Descending) ->get();The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:
<columns code="000" optimize="true"> <sort> <field order="ascending">fin.trs.line.dim1</field> <field order="ascending">fin.trs.head.yearperiod</field> <field order="descending">fin.trs.head.number</field> </sort> <column> <field>fin.trs.head.yearperiod</field> <visible>true</visible> <operator>between</operator> <from>2026/00</from> <to>2026/55</to> </column> <column> <field>fin.trs.head.code</field> <visible>true</visible> </column> <column> <field>fin.trs.head.number</field> <visible>true</visible> </column> <column> <field>fin.trs.head.status</field> <visible>true</visible> <operator>equal</operator> <from>normal</from> </column> <column> <field>fin.trs.line.dim1</field> <visible>true</visible> </column> <column> <field>fin.trs.line.basevaluesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.line.description</field> <visible>true</visible> </column></columns>Twinfield answers with this XML in ProcessXmlStringResult:
<browse result="1" first="1" last="3" total="3"> <th> <td label="" hideforuser="false" type="String">fin.trs.head.yearperiod</td> <td label="" hideforuser="false" type="String">fin.trs.head.code</td> <td label="" hideforuser="false" type="Decimal">fin.trs.head.number</td> <td label="" hideforuser="false" type="String">fin.trs.head.status</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim1</td> <td label="" hideforuser="false" type="Value">fin.trs.line.basevaluesigned</td> <td label="" hideforuser="false" type="String">fin.trs.line.description</td> </th> <tr> <td>2026/01</td> <td>VRK</td> <td>202600001</td> <td name="Definitief">final</td> <td>1300</td> <td>121.00</td> <td>Invoice 2026-0001</td> <key> <office>1000</office> <code>VRK</code> <number>202600001</number> <line>1</line> </key> </tr> <tr> <td>2026/02</td> <td>BNK</td> <td>202600004</td> <td name="Concept">temporary</td> <td>1300</td> <td>-121.00</td> <td>Payment invoice 2026-0001</td> <key> <office>1000</office> <code>BNK</code> <number>202600004</number> <line>2</line> </key> </tr> <tr> <td>2026/01</td> <td>VRK</td> <td>202600001</td> <td name="Definitief">final</td> <td>8000</td> <td>-100.00</td> <td>Invoice 2026-0001</td> <key> <office>1000</office> <code>VRK</code> <number>202600001</number> <line>2</line> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/000-general-ledger-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.