Skip to content

Annual report multicurrency (060)

Browse code 060 (BrowseCode::AnnualReportTotalsMulticurrency, “Annual Report MC”): totals per general ledger account and currency, summed by Twinfield. Each row has the amount in the currency of the transaction and in the base currency of the company.

Twinfield documentation: Browse data.

  • fin.trs.head.curcode with fin.trs.line.valuesigned: the total in the currency of the transactions; fin.trs.line.basevaluesigned is the same total in the base currency.
  • fin.trs.line.debitcredit as column gives separate totals for debit and credit.
  • equal('fin.trs.head.balanceregimeprompt', $regime): the regime is required; Twinfield uses Generic when you leave it out. fin.trs.head.reportingstructure can be a criterion as well.
  • The rows are totals: $row->transactionLine is null.

Criteria: period, status, general ledger account, regime and reporting structure. See browse-definitions/060.xml and the browse data guide.

All fields of the browse definition (browse-definitions/060.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.yearperiod Jaar/periode (JJJJ/PP) string no between
fin.trs.head.year Jaar long yes
fin.trs.head.period Periode long yes
fin.trs.line.dim1type Type string yes
fin.trs.line.dim1 Grootboekrek. string yes between
fin.trs.line.dim1name Grootboekrek.naam string yes
fin.trs.head.curcode Valuta 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.head.status Status special: draft, temporary, final, inuse, normal yes equal (proposed normal)
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.head.balanceregimeprompt Regime special: Generic, Commercial, Economic, Fiscal no equal (proposed Generic)
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.head.reportingstructure Rapportagestructuur string no equal
$twinfield = Example::twinfield();
$year = (int) ($argv[1] ?? Example::lastYear($twinfield));
$regime = Regime::from($argv[2] ?? 'Generic');
$query = $twinfield->browse(BrowseCode::AnnualReportTotalsMulticurrency)
->columns(
'fin.trs.line.dim1',
'fin.trs.line.dim1name',
'fin.trs.head.curcode',
'fin.trs.line.debitcredit',
'fin.trs.line.valuesigned',
'fin.trs.line.basevaluesigned',
)
->between('fin.trs.head.yearperiod', sprintf('%d/00', $year), sprintf('%d/55', $year))
->equal('fin.trs.head.status', 'final')
->equal('fin.trs.head.balanceregimeprompt', $regime);
$result = $query->get();
echo count($result), ' total(s) per account and currency in ', $year, ', regime ', $regime->value, PHP_EOL;
foreach ($result as $index => $row) {
echo sprintf(
'[%d/%d] %s %s %s: %s %s (base %s)',
$index + 1,
count($result),
$row->string('fin.trs.line.dim1'),
$row->nullableString('fin.trs.line.dim1name') ?? '',
$row->string('fin.trs.line.debitcredit'),
$row->string('fin.trs.head.curcode'),
$row->amount('fin.trs.line.valuesigned'),
$row->amount('fin.trs.line.basevaluesigned'),
), PHP_EOL;
}
Terminal window
php examples/browse-data/060-annual-report-multicurrency/example.php # the last year, generic regime

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

3 total(s) per account and currency in 2026, regime Generic
[1/3] 1300 Debiteuren debit: EUR 242.00 (base 242.00)
[2/3] 1300 Debiteuren debit: USD 500.00 (base 462.50)
[3/3] 8000 Omzet credit: USD -500.00 (base -462.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::AnnualReportTotalsMulticurrency)
->columns(
'fin.trs.line.dim1',
'fin.trs.line.dim1name',
'fin.trs.head.curcode',
'fin.trs.line.debitcredit',
'fin.trs.line.valuesigned',
'fin.trs.line.basevaluesigned',
)
->between('fin.trs.head.yearperiod', '2026/00', '2026/55')
->equal('fin.trs.head.status', 'final')
->equal('fin.trs.head.balanceregimeprompt', Regime::Generic)
->get();

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

<columns code="060" optimize="true">
<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.head.curcode</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.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.status</field>
<operator>equal</operator>
<from>final</from>
</column>
<column>
<field>fin.trs.head.balanceregimeprompt</field>
<operator>equal</operator>
<from>Generic</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.line.dim1</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim1name</td>
<td label="" hideforuser="false" type="String">fin.trs.head.curcode</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="Value">fin.trs.line.basevaluesigned</td>
</th>
<tr>
<td>1300</td>
<td>Debiteuren</td>
<td>EUR</td>
<td name="Debet">debit</td>
<td>242.00</td>
<td>242.00</td>
<key>
<office>1000</office>
</key>
</tr>
<tr>
<td>1300</td>
<td>Debiteuren</td>
<td>USD</td>
<td name="Debet">debit</td>
<td>500.00</td>
<td>462.50</td>
<key>
<office>1000</office>
</key>
</tr>
<tr>
<td>8000</td>
<td>Omzet</td>
<td>USD</td>
<td name="Credit">credit</td>
<td>-500.00</td>
<td>-462.50</td>
<key>
<office>1000</office>
</key>
</tr>
</browse>

View examples/browse-data/060-annual-report-multicurrency/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.