General ledger details (030_3)
Browse code 030_3 (BrowseCode::GeneralLedgerDetailsV3, “Grootboek (details) (v3)”): every transaction line with all its details, such as the relation, VAT code, user and change date. This is the browse code Twinfield advises for a shadow database. 030_1 and 030_2 are older versions with fewer fields.
Twinfield documentation: Browse data.
between('fin.trs.head.yearperiod', $from, $to)withPeriodvalues: a range of periods. In 030_3 the period can only be a criterion: as column it gives a server error. Usefin.trs.head.yearandfin.trs.head.periodas columns instead.equal('fin.trs.head.status', 'normal'): provisional and final. Without it you also get drafts, with number-1.equal('fin.trs.head.code', $dayBook): one day book, e.g.VRK.$row->transactionLine: the day book, number and line number of the row, e.g. to read the whole transaction with$row->transactionLine->transaction().fin.trs.head.modifiedis the last change of the transaction, aDatetimein UTC:dateTime().
Criteria: period, status, input date, change date, the three dimensions, regime and reporting structure. 030_3 ignores sort fields. See browse-definitions/030_3.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/030_3.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.office |
Administratie | string | yes | |
fin.trs.head.officename |
Adm.naam | string | yes | |
fin.trs.head.year |
Jaar | long | yes | |
fin.trs.head.period |
Periode | long | yes | |
fin.trs.head.yearperiod |
Jaar/periode (JJJJ/PP) | string | no | between |
fin.trs.head.code |
Dagboek | string | yes | |
fin.trs.head.number |
Boekingsnummer | decimal | yes | |
fin.trs.head.status |
Status | special: draft, temporary, final, inuse, normal |
yes | equal (proposed normal) |
fin.trs.head.date |
Boekdatum | date | yes | |
fin.trs.head.curcode |
Valuta | string | yes | |
fin.trs.head.relation |
Relatie | string | yes | |
fin.trs.head.relationname |
Relatienaam | string | yes | |
fin.trs.head.inpdate |
Invoerdatum | datetime | yes | between |
fin.trs.head.modified |
Wijzigingsdatum | datetime | no | between |
fin.trs.head.username |
Gebruikersnaam | string | yes | |
fin.trs.line.dim1 |
Grootboekrek. | string | yes | between |
fin.trs.line.dim1name |
Grootboekrek.naam | string | yes | |
fin.trs.line.dim1type |
Dimensietype 1 | string | yes | |
fin.trs.line.dim2 |
Kpl./rel. | string | yes | between |
fin.trs.line.dim2name |
Kpl.-/rel.naam | string | yes | |
fin.trs.line.dim2type |
Dimensietype 2 | string | yes | |
fin.trs.line.dim3 |
Act./proj. | string | yes | between |
fin.trs.line.dim3name |
Act.-/proj.naam | string | yes | |
fin.trs.line.dim3type |
Dimensietype 3 | string | yes | |
fin.trs.line.valuesigned |
Bedrag | value | yes | |
fin.trs.line.basevaluesigned |
Basisbedrag | value | yes | |
fin.trs.line.repvaluesigned |
Rapportagebedrag | value | yes | |
fin.trs.line.debitcredit |
D/C | special: credit, debit |
yes | |
fin.trs.line.vatcode |
Btw-code | string | yes | |
fin.trs.line.vatbasevaluesigned |
Btw-bedrag | value | yes | |
fin.trs.line.quantity |
Aantal | decimal | yes | |
fin.trs.line.chequenumber |
Cheque | string | yes | |
fin.trs.line.description |
Omschrijving | string | yes | |
fin.trs.line.invnumber |
Factuurnummer | string | yes | |
fin.trs.line.dim1group1 |
Groep 1 | string | yes | |
fin.trs.line.dim1group1name |
Groepnaam 1 | string | yes | |
fin.trs.line.dim1group2 |
Groep 2 | string | yes | |
fin.trs.line.dim1group2name |
Groepnaam 2 | string | yes | |
fin.trs.line.dim1group3 |
Groep 3 | string | yes | |
fin.trs.line.dim1group3name |
Groepnaam 3 | string | yes | |
fin.trs.line.dim1group4 |
Groep 4 | string | yes | |
fin.trs.line.dim1group4name |
Groepnaam 4 | string | yes | |
fin.trs.line.dim1group5 |
Groep 5 | string | yes | |
fin.trs.line.dim1group5name |
Groepnaam 5 | string | yes | |
fin.trs.line.freetext1 |
Vrij tekstveld 1 | string | yes | |
fin.trs.line.freetext2 |
Vrij tekstveld 2 | string | yes | |
fin.trs.line.freetext3 |
Vrij tekstveld 3 | string | yes | |
fin.trs.head.origin |
Boekingsoorsprong | special | yes | |
fin.trs.mng.type |
transactie type groep | string | yes | |
fin.trs.head.regime |
Regime | special: Generic, Commercial, Economic, Fiscal |
yes | equal |
fin.trs.head.reportingstructure |
Rapportagestructuur | string | no | equal |
$twinfield = Example::twinfield();
$year = Example::lastYear($twinfield);$from = Period::fromString($argv[1] ?? $year . '/00');$to = Period::fromString($argv[2] ?? $year . '/55');$dayBook = $argv[3] ?? null;
$query = $twinfield->browse(BrowseCode::GeneralLedgerDetailsV3) ->columns( 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.head.date', 'fin.trs.head.status', 'fin.trs.head.relation', 'fin.trs.head.username', 'fin.trs.head.modified', 'fin.trs.line.dim1', 'fin.trs.line.dim2', 'fin.trs.line.debitcredit', 'fin.trs.line.valuesigned', 'fin.trs.line.vatcode', 'fin.trs.line.description', ) ->between('fin.trs.head.yearperiod', $from, $to) ->equal('fin.trs.head.status', 'normal');
if ($dayBook !== null) { $query = $query->equal('fin.trs.head.code', $dayBook);}
$result = $query->get();
echo count($result), ' transaction line(s) in ', $from, ' to ', $to;echo $dayBook === null ? '' : ' of day book ' . $dayBook, PHP_EOL;
foreach ($result as $index => $row) { $line = $row->transactionLine;
echo rtrim(sprintf( '[%d/%d] %s %d line %d, %s, %s: %s %s %s %s%s, changed %s by %s %s', $index + 1, count($result), $line?->dayBook, $line?->number, $line?->line, $row->date('fin.trs.head.date')->format('Y-m-d'), $row->string('fin.trs.head.status'), $row->string('fin.trs.line.dim1'), $row->nullableString('fin.trs.line.dim2') ?? '-', $row->string('fin.trs.line.debitcredit'), $row->amount('fin.trs.line.valuesigned'), $row->nullableString('fin.trs.line.vatcode') === null ? '' : ' VAT ' . $row->string('fin.trs.line.vatcode'), $row->dateTime('fin.trs.head.modified')->format('Y-m-d H:i'), $row->nullableString('fin.trs.head.username') ?? '-', $row->nullableString('fin.trs.line.description') ?? '', )), PHP_EOL;}php examples/browse-data/030_3-general-ledger-details/example.php # the last yearphp examples/browse-data/030_3-general-ledger-details/example.php 2025/01 2025/03 VRK # day book VRK, periods 1 to 3Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
16 transaction line(s) in 2025/00 to 2025/55[1/16] INK 202500001 line 1, 2025-02-08, final: 16000 2005 credit -111.74, changed 2026-11-03 13:06 by Jan de Vries Factuur 151568[2/16] INK 202500001 line 2, 2025-02-08, final: 46035 - debit 111.74, changed 2026-11-03 13:06 by Jan de Vries Factuur 151568[3/16] INK 202500002 line 1, 2025-02-24, final: 16000 2005 credit -362.62, changed 2025-02-25 15:32 by Piet de Boer[4/16] INK 202500002 line 2, 2025-02-24, final: 46035 - debit 362.62, changed 2025-02-25 15:32 by Piet de Boer[5/16] INK 202500003 line 1, 2025-02-25, final: 16000 2007 debit 76.13, changed 2025-02-25 17:51 by Anna K. Factuur 466151…[16/16] MEMO 202500003 line 2, 2025-09-01, final: 16005 - credit -17.50, changed 2026-11-03 13:06 by Jan de Vries Test op 16/09/2025What 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::GeneralLedgerDetailsV3) ->columns( 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.head.date', 'fin.trs.head.status', 'fin.trs.head.relation', 'fin.trs.head.username', 'fin.trs.head.modified', 'fin.trs.line.dim1', 'fin.trs.line.dim2', 'fin.trs.line.debitcredit', 'fin.trs.line.valuesigned', 'fin.trs.line.vatcode', 'fin.trs.line.description', ) ->between('fin.trs.head.yearperiod', '2026/00', '2026/55') ->equal('fin.trs.head.status', 'normal') ->get();The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:
<columns code="030_3" optimize="true"> <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.date</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.head.relation</field> <visible>true</visible> </column> <column> <field>fin.trs.head.username</field> <visible>true</visible> </column> <column> <field>fin.trs.head.modified</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim1</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim2</field> <visible>true</visible> </column> <column> <field>fin.trs.line.debitcredit</field> <visible>true</visible> </column> <column> <field>fin.trs.line.valuesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.line.vatcode</field> <visible>true</visible> </column> <column> <field>fin.trs.line.description</field> <visible>true</visible> </column> <column> <field>fin.trs.head.yearperiod</field> <operator>between</operator> <from>2026/00</from> <to>2026/55</to> </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.code</td> <td label="" hideforuser="false" type="Decimal">fin.trs.head.number</td> <td label="" hideforuser="false" type="Date">fin.trs.head.date</td> <td label="" hideforuser="false" type="String">fin.trs.head.status</td> <td label="" hideforuser="false" type="String">fin.trs.head.relation</td> <td label="" hideforuser="false" type="String">fin.trs.head.username</td> <td label="" hideforuser="false" type="Datetime">fin.trs.head.modified</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim1</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim2</td> <td label="" hideforuser="false" type="String">fin.trs.line.debitcredit</td> <td label="" hideforuser="false" type="Value">fin.trs.line.valuesigned</td> <td label="" hideforuser="false" type="String">fin.trs.line.vatcode</td> <td label="" hideforuser="false" type="String">fin.trs.line.description</td> </th> <tr> <td>VRK</td> <td>202600001</td> <td name="15/01/2026">20260115</td> <td name="Definitief">final</td> <td>1000</td> <td>Example user</td> <td name="15/01/2026 10:15:30">20260115101530</td> <td>1300</td> <td>1000</td> <td name="Debet">debit</td> <td>121.00</td> <td/> <td>Invoice 2026-0001</td> <key> <office>1000</office> <code>VRK</code> <number>202600001</number> <line>1</line> </key> </tr> <tr> <td>VRK</td> <td>202600001</td> <td name="15/01/2026">20260115</td> <td name="Definitief">final</td> <td>1000</td> <td>Example user</td> <td name="15/01/2026 10:15:30">20260115101530</td> <td>8000</td> <td/> <td name="Credit">credit</td> <td>-100.00</td> <td>VH</td> <td>Invoice 2026-0001</td> <key> <office>1000</office> <code>VRK</code> <number>202600001</number> <line>2</line> </key> </tr> <tr> <td>VRK</td> <td>202600001</td> <td name="15/01/2026">20260115</td> <td name="Definitief">final</td> <td>1000</td> <td>Example user</td> <td name="15/01/2026 10:15:30">20260115101530</td> <td>1510</td> <td/> <td name="Credit">credit</td> <td>-21.00</td> <td>VH</td> <td>Invoice 2026-0001</td> <key> <office>1000</office> <code>VRK</code> <number>202600001</number> <line>3</line> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/030_3-general-ledger-details/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.