Skip to content

Time & Expenses multicurrency (620)

Browse code 620 (BrowseCode::TimeAndExpensesMulticurrency, “Uren en onkosten (MC)”): totals of the general ledger per project, cost centre and account, in the currency of the transactions and in the base currency.

Twinfield documentation: Browse data.

  • Despite its name, 620 reads the general ledger (fin.trs.*), not the Time & Expenses entries: it gives the booked amounts per project (dim3).
  • fin.trs.head.curcode with fin.trs.line.valuesigned: the total in the currency of the transactions; basevaluesigned in the base currency.
  • The rows are totals: $row->transactionLine is null.

Criteria: period, the three dimensions and status. See browse-definitions/620.xml and the browse data guide.

All fields of the browse definition (browse-definitions/620.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.line.dim2 Kostenplaats string yes between
fin.trs.line.dim2name Kpl.-naam string yes
fin.trs.line.dim3 Project string yes between
fin.trs.line.dim3name Proj.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
$twinfield = Example::twinfield();
$year = (int) ($argv[1] ?? Example::lastYear($twinfield));
$query = $twinfield->browse(BrowseCode::TimeAndExpensesMulticurrency)
->columns(
'fin.trs.line.dim3',
'fin.trs.line.dim3name',
'fin.trs.line.dim2',
'fin.trs.line.dim1',
'fin.trs.head.curcode',
'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', 'normal');
$result = $query->get();
echo count($result), ' total(s) per project in ', $year, PHP_EOL;
foreach ($result as $index => $row) {
echo sprintf(
'[%d/%d] project %s %s, cost centre %s, account %s: %s %s (base %s)',
$index + 1,
count($result),
$row->nullableString('fin.trs.line.dim3') ?? '-',
$row->nullableString('fin.trs.line.dim3name') ?? '',
$row->nullableString('fin.trs.line.dim2') ?? '-',
$row->string('fin.trs.line.dim1'),
$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/620-time-and-expenses-multicurrency/example.php # the last year

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

2 total(s) per project in 2026
[1/2] project P0001 Example project, cost centre 00100, account 8000: EUR -1187.50 (base -1187.50)
[2/2] project P0001 Example project, cost centre 00100, account 8000: 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::TimeAndExpensesMulticurrency)
->columns(
'fin.trs.line.dim3',
'fin.trs.line.dim3name',
'fin.trs.line.dim2',
'fin.trs.line.dim1',
'fin.trs.head.curcode',
'fin.trs.line.valuesigned',
'fin.trs.line.basevaluesigned',
)
->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="620" 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.line.dim2</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.line.dim1</field>
<visible>true</visible>
</column>
<column>
<field>fin.trs.head.curcode</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>normal</from>
</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.line.dim2</td>
<td label="" hideforuser="false" type="String">fin.trs.line.dim1</td>
<td label="" hideforuser="false" type="String">fin.trs.head.curcode</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>P0001</td>
<td>Example project</td>
<td>00100</td>
<td>8000</td>
<td>EUR</td>
<td>-1187.50</td>
<td>-1187.50</td>
<key>
<office>1000</office>
</key>
</tr>
<tr>
<td>P0001</td>
<td>Example project</td>
<td>00100</td>
<td>8000</td>
<td>USD</td>
<td>-500.00</td>
<td>-462.50</td>
<key>
<office>1000</office>
</key>
</tr>
</browse>

View examples/browse-data/620-time-and-expenses-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.