Skip to content

Asset transactions (301)

Browse code 301 (BrowseCode::AssetTransactions, “Activakaart”): the transaction lines booked on fixed assets (dimension 3), such as the purchase and the depreciation. 302_1 has the depreciation settings of the assets as well.

Twinfield documentation: Browse data.

  • fin.trs.line.dim3 is the fixed asset, dim1 the general ledger account and dim2 the cost centre.
  • between('fin.trs.line.dim3', $asset, $asset): one asset.
  • The status is not a criterion in 301: you get all transactions, also drafts (number -1).

Criteria: period, the three dimensions, day book and number. See browse-definitions/301.xml and the browse data guide.

All fields of the browse definition (browse-definitions/301.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.line.dim1 Grootboek string yes between
fin.trs.line.dim1name Naam string yes
fin.trs.line.dim2 Kostenplaats string yes between
fin.trs.line.dim2name Naam string yes
fin.trs.line.dim3 Activum string yes between
fin.trs.line.dim3name Naam string yes
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.line.valuesigned Bedrag value no
fin.trs.line.basevaluesigned Euro value yes
fin.trs.head.status Status special: draft, temporary, final, inuse, normal no
$twinfield = Example::twinfield();
$year = (int) ($argv[1] ?? Example::lastYear($twinfield));
$asset = $argv[2] ?? null;
$query = $twinfield->browse(BrowseCode::AssetTransactions)
->columns(
'fin.trs.line.dim3',
'fin.trs.line.dim3name',
'fin.trs.head.code',
'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));
if ($asset !== null) {
$query = $query->between('fin.trs.line.dim3', $asset, $asset);
}
$result = $query->get();
echo count($result), ' asset line(s) in ', $year, $asset === null ? '' : ' of asset ' . $asset, PHP_EOL;
foreach ($result as $index => $row) {
echo sprintf(
'[%d/%d] %s %s, %s %d: %s %s %s',
$index + 1,
count($result),
$row->string('fin.trs.line.dim3'),
$row->nullableString('fin.trs.line.dim3name') ?? '',
$row->string('fin.trs.head.code'),
$row->int('fin.trs.head.number'),
$row->string('fin.trs.line.dim1'),
$row->nullableString('fin.trs.line.dim1name') ?? '',
$row->amount('fin.trs.line.basevaluesigned'),
), PHP_EOL;
}
Terminal window
php examples/browse-data/301-asset-transactions/example.php # the last year
php examples/browse-data/301-asset-transactions/example.php 2026 A0001 # asset A0001 in 2026

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

2 asset line(s) in 2026
[1/2] A0001 Laptop, INK 202600009: 0200 Inventaris 1500.00
[2/2] A0001 Laptop, ACTIVA 202600001: 0209 Afschrijving inventaris -41.67

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::AssetTransactions)
->columns(
'fin.trs.line.dim3',
'fin.trs.line.dim3name',
'fin.trs.head.code',
'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')
->get();

The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:

<columns code="301" optimize="true">
<column>
<field>fin.trs.line.dim3</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.line.dim3name</field>
<visible>true</visible>
</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.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>
</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.line.dim3</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim3name</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.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>A0001</td>
<td>Laptop</td>
<td>INK</td>
<td>202600009</td>
<td>0200</td>
<td>Inventaris</td>
<td>1500.00</td>
<key>
<office>1000</office>
<code>INK</code>
<number>202600009</number>
<line>2</line>
</key>
</tr>
<tr>
<td>A0001</td>
<td>Laptop</td>
<td>ACTIVA</td>
<td>202600001</td>
<td>0209</td>
<td>Afschrijving inventaris</td>
<td>-41.67</td>
<key>
<office>1000</office>
<code>ACTIVA</code>
<number>202600001</number>
<line>2</line>
</key>
</tr>
</browse>

View examples/browse-data/301-asset-transactions/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.