Time & Expenses details (650_1)
Browse code 650_1 (BrowseCode::TimeAndExpensesDetails, “Uren en onkosten (Details)”): every Time & Expenses entry with the user, customer, project, activity and status, and the hours, expenses and quantities, billable and not billable.
Twinfield documentation: Browse data.
betweenDates('teq.trs.head.date', $from, $to): entries in a date range.teq.trs.head.yearperiod(year and month,2026/03) andyearweek(2026/12) are criteria only.teq.trs.head.status:entered,proposed,authorised,rejected,inuseorjournalised; can be a criterion.teq.trs.line.timeare the billable hours,time_nbthe hours that are not billable; the same forexpenseandquantity.- Time & Expenses is a separate module of Twinfield: a company without it gives no rows.
Criteria: year/month, year/week, date, user, cost centre of the user, hour code, authoriser, customer, project, cost centre of the project, activity and status. See browse-definitions/650_1.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/650_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 | |
teq.trs.head.year |
Jaar | long | yes | |
teq.trs.head.period |
Periode | long | yes | |
teq.trs.head.week |
Week | long | yes | |
teq.trs.head.yearperiod |
Jaar/maand (JJJJ/MM) | string | no | between |
teq.trs.head.yearweek |
Jaar/week (JJJJ/WW) | string | no | between |
teq.trs.head.date |
Datum | date | yes | between |
teq.trs.head.user |
Gebruiker | string | yes | between |
teq.trs.head.username |
Gebruikersnaam | string | yes | |
teq.trs.head.usercostcentre |
Kostenplaatsgebruiker | string | yes | between |
teq.trs.head.usercostcentrename |
Naam kostenplaatsgebruiker | string | yes | |
teq.trs.head.code |
Urencode | string | yes | between |
teq.trs.head.authoriser |
Autorisator | string | yes | between |
teq.trs.head.authorisername |
Naam autorisator | string | yes | |
teq.trs.head.customer |
Klant | string | yes | between |
teq.trs.head.customername |
Klantnaam | string | yes | |
teq.trs.head.project1 |
Project | string | yes | between |
teq.trs.head.project1name |
Projectnaam | string | yes | |
teq.trs.head.project1costcentre |
Projectkostenplaats | string | yes | between |
teq.trs.head.project1costcentrename |
Project kostenplaatsnaam | string | yes | |
teq.trs.head.project2 |
Activiteit | string | yes | between |
teq.trs.head.project2name |
Activiteitsnaam | string | yes | |
teq.trs.head.status |
Urenstatus | special: entered, proposed, authorised, rejected, inuse, journalised |
yes | equal |
teq.trs.head.curcode |
Valuta | string | yes | |
teq.trs.line.time |
Uren | decimal | yes | |
teq.trs.line.timevalueint |
Uren intern | value | yes | |
teq.trs.line.timevalueext |
Uren extern | value | yes | |
teq.trs.line.time_nb |
Uren niet facturabel | decimal | yes | |
teq.trs.line.timevalueint_nb |
Uren intern niet facturabel | value | yes | |
teq.trs.line.timevalueext_nb |
Uren extern niet facturabel | value | yes | |
teq.trs.line.expense |
Onkosten | value | yes | |
teq.trs.line.expense_nb |
Onkosten niet facturabel | value | yes | |
teq.trs.line.quantity |
Aantallen | decimal | yes | |
teq.trs.line.qtyvalueint |
Aantallen intern | value | yes | |
teq.trs.line.qtyvalueext |
Aantallen extern | value | yes | |
teq.trs.line.quantity_nb |
Aantallen niet facturabel | decimal | yes | |
teq.trs.line.qtyvalueint_nb |
Aantallen intern niet facturabel | value | yes | |
teq.trs.line.qtyvalueext_nb |
Aantallen extern niet facturabel | value | yes | |
teq.trs.line.description |
Omschrijving | string | yes |
$twinfield = Example::twinfield();
$year = (int) ($argv[1] ?? Example::lastYear($twinfield));$from = new DateTimeImmutable($year . '-01-01');$to = new DateTimeImmutable($year . '-12-31');
$query = $twinfield->browse(BrowseCode::TimeAndExpensesDetails) ->columns( 'teq.trs.head.date', 'teq.trs.head.user', 'teq.trs.head.customer', 'teq.trs.head.project1', 'teq.trs.head.project2', 'teq.trs.head.status', 'teq.trs.line.time', 'teq.trs.line.time_nb', 'teq.trs.line.expense', 'teq.trs.line.description', ) ->betweenDates('teq.trs.head.date', $from, $to);
$result = $query->get();
echo count($result), ' row(s) from ', $from->format('Y-m-d'), ' to ', $to->format('Y-m-d'), PHP_EOL;
foreach ($result as $index => $row) { echo rtrim(sprintf( '[%d/%d] %s %s, customer %s, project %s activity %s (%s): %s h, %s h not billable, expenses %s %s', $index + 1, count($result), $row->date('teq.trs.head.date')->format('Y-m-d'), $row->string('teq.trs.head.user'), $row->nullableString('teq.trs.head.customer') ?? '-', $row->string('teq.trs.head.project1'), $row->nullableString('teq.trs.head.project2') ?? '-', $row->string('teq.trs.head.status'), $row->nullableDecimal('teq.trs.line.time') ?? '0', $row->nullableDecimal('teq.trs.line.time_nb') ?? '0', $row->amount('teq.trs.line.expense'), $row->nullableString('teq.trs.line.description') ?? '', )), PHP_EOL;}php examples/browse-data/650_1-time-and-expenses-details/example.php # the last yearAdd TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
2 row(s) from 2026-01-01 to 2026-12-31[1/2] 2026-03-02 EXAMPLE, customer 1000, project P0001 activity A100 (authorised): 6 h, 0 h not billable, expenses 0.00 Design workshop[2/2] 2026-03-03 EXAMPLE, customer 1000, project P0001 activity A200 (entered): 0 h, 1.5 h not billable, expenses 45.00 TravelWhat 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::TimeAndExpensesDetails) ->columns( 'teq.trs.head.date', 'teq.trs.head.user', 'teq.trs.head.customer', 'teq.trs.head.project1', 'teq.trs.head.project2', 'teq.trs.head.status', 'teq.trs.line.time', 'teq.trs.line.time_nb', 'teq.trs.line.expense', 'teq.trs.line.description', ) ->betweenDates('teq.trs.head.date', new DateTimeImmutable('2026-01-01'), new DateTimeImmutable('2026-03-31')) ->get();The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:
<columns code="650_1" optimize="true"> <column> <field>teq.trs.head.date</field> <visible>true</visible> <operator>between</operator> <from>20260101</from> <to>20260331</to> </column> <column> <field>teq.trs.head.user</field> <visible>true</visible> </column> <column> <field>teq.trs.head.customer</field> <visible>true</visible> </column> <column> <field>teq.trs.head.project1</field> <visible>true</visible> </column> <column> <field>teq.trs.head.project2</field> <visible>true</visible> </column> <column> <field>teq.trs.head.status</field> <visible>true</visible> </column> <column> <field>teq.trs.line.time</field> <visible>true</visible> </column> <column> <field>teq.trs.line.time_nb</field> <visible>true</visible> </column> <column> <field>teq.trs.line.expense</field> <visible>true</visible> </column> <column> <field>teq.trs.line.description</field> <visible>true</visible> </column></columns>Twinfield answers with this XML in ProcessXmlStringResult:
<browse result="1" first="1" last="2" total="2"> <th> <td label="" hideforuser="false" type="Date">teq.trs.head.date</td> <td label="" hideforuser="false" type="String">teq.trs.head.user</td> <td label="" hideforuser="false" type="String">teq.trs.head.customer</td> <td label="" hideforuser="false" type="String">teq.trs.head.project1</td> <td label="" hideforuser="false" type="String">teq.trs.head.project2</td> <td label="" hideforuser="false" type="String">teq.trs.head.status</td> <td label="" hideforuser="false" type="Decimal">teq.trs.line.time</td> <td label="" hideforuser="false" type="Decimal">teq.trs.line.time_nb</td> <td label="" hideforuser="false" type="Value">teq.trs.line.expense</td> <td label="" hideforuser="false" type="String">teq.trs.line.description</td> </th> <tr> <td name="02/03/2026">20260302</td> <td>EXAMPLE</td> <td>1000</td> <td>P0001</td> <td>A100</td> <td name="Geautoriseerd">authorised</td> <td>6</td> <td>0</td> <td>0.00</td> <td>Design workshop</td> <key> <office>1000</office> </key> </tr> <tr> <td name="03/03/2026">20260303</td> <td>EXAMPLE</td> <td>1000</td> <td>P0001</td> <td>A200</td> <td name="Ingevoerd">entered</td> <td>0</td> <td>1.5</td> <td>45.00</td> <td>Travel</td> <key> <office>1000</office> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/650_1-time-and-expenses-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.