Skip to content

General ledger details (030_1)

Browse code 030_1 (BrowseCode::GeneralLedgerDetails, “Grootboek (details)”): every transaction line with its details, such as the dimension names and types, the VAT code and the origin. It is the first version of 030_3, which has more fields; use 030_3 for new code.

Twinfield documentation: Browse data.

  • between('fin.trs.head.yearperiod', $from, $to): the period can only be a criterion. Use fin.trs.head.year and fin.trs.head.period as columns.
  • equal('fin.trs.head.status', 'normal'): provisional and final.
  • fin.trs.line.dim1type is the dimension type of the account, e.g. BAS or PNL; fin.trs.line.dim2type and dim3type tell what is in dim2 and dim3 (DEB, CRD, KPL, PRJ, …).
  • fin.trs.head.origin is how the transaction was made (e.g. import), with the display name in displayName().

Criteria: period, status, input date, change date and the three dimensions. See browse-definitions/030_1.xml and the browse data guide.

All fields of the browse definition (browse-definitions/030_1.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.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.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
$twinfield = Example::twinfield();
$year = (int) ($argv[1] ?? Example::lastYear($twinfield));
$query = $twinfield->browse(BrowseCode::GeneralLedgerDetails)
->columns(
'fin.trs.head.code',
'fin.trs.head.number',
'fin.trs.head.date',
'fin.trs.head.origin',
'fin.trs.line.dim1',
'fin.trs.line.dim1type',
'fin.trs.line.dim2',
'fin.trs.line.dim2type',
'fin.trs.line.debitcredit',
'fin.trs.line.valuesigned',
'fin.trs.line.vatcode',
)
->between('fin.trs.head.yearperiod', sprintf('%d/00', $year), sprintf('%d/55', $year))
->equal('fin.trs.head.status', 'normal');
$result = $query->get();
echo count($result), ' transaction line(s) in ', $year, PHP_EOL;
foreach ($result as $index => $row) {
$dim2 = $row->nullableString('fin.trs.line.dim2');
echo sprintf(
'[%d/%d] %s %d line %d, %s, %s: %s (%s) %s %s %s%s',
$index + 1,
count($result),
$row->string('fin.trs.head.code'),
$row->int('fin.trs.head.number'),
$row->transactionLine?->line,
$row->date('fin.trs.head.date')->format('Y-m-d'),
$row->displayName('fin.trs.head.origin') ?? $row->string('fin.trs.head.origin'),
$row->string('fin.trs.line.dim1'),
$row->string('fin.trs.line.dim1type'),
$dim2 === null ? '-' : $dim2 . ' (' . $row->string('fin.trs.line.dim2type') . ')',
$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'),
), PHP_EOL;
}
Terminal window
php examples/browse-data/030_1-general-ledger-details-v1/example.php # the last year
php examples/browse-data/030_1-general-ledger-details-v1/example.php 2025 # 2025

Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.

3 transaction line(s) in 2026
[1/3] VRK 202600001 line 1, 2026-01-15, Handmatig: 1300 (BAS) 1000 (DEB) debit 121.00
[2/3] VRK 202600001 line 2, 2026-01-15, Handmatig: 8000 (PNL) - credit -100.00 VAT VH
[3/3] INK 202600003 line 1, 2026-02-05, Importeren: 1600 (BAS) 2000 (CRD) credit -60.50

What 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.

Twinfield documentation: Browse data: Compose the browse request and send it.

$twinfield->browse(BrowseCode::GeneralLedgerDetails)
->columns(
'fin.trs.head.code',
'fin.trs.head.number',
'fin.trs.head.date',
'fin.trs.head.origin',
'fin.trs.line.dim1',
'fin.trs.line.dim1type',
'fin.trs.line.dim2',
'fin.trs.line.dim2type',
'fin.trs.line.debitcredit',
'fin.trs.line.valuesigned',
'fin.trs.line.vatcode',
)
->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_1" 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.origin</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.line.dim1</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.line.dim1type</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.line.dim2</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.line.dim2type</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.head.yearperiod</field>
<operator>between</operator>
<from>2026/00</from>
<to>2026/55</to>
</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="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.origin</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim1</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim1type</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim2</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim2type</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>
</th>
<tr>
<td>VRK</td>
<td>202600001</td>
<td name="15/01/2026">20260115</td>
<td name="Handmatig">manual</td>
<td>1300</td>
<td>BAS</td>
<td>1000</td>
<td>DEB</td>
<td name="Debet">debit</td>
<td>121.00</td>
<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="Handmatig">manual</td>
<td>8000</td>
<td>PNL</td>
<td/>
<td/>
<td name="Credit">credit</td>
<td>-100.00</td>
<td>VH</td>
<key>
<office>1000</office>
<code>VRK</code>
<number>202600001</number>
<line>2</line>
</key>
</tr>
<tr>
<td>INK</td>
<td>202600003</td>
<td name="05/02/2026">20260205</td>
<td name="Importeren">import</td>
<td>1600</td>
<td>BAS</td>
<td>2000</td>
<td>CRD</td>
<td name="Credit">credit</td>
<td>-60.50</td>
<td/>
<key>
<office>1000</office>
<code>INK</code>
<number>202600003</number>
<line>1</line>
</key>
</tr>
</browse>

View examples/browse-data/030_1-general-ledger-details-v1/example.php on GitHub.

Made by SolveBeam

Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.