Time & Expenses billing details (660_1)
Browse code 660_1 (BrowseCode::TimeAndExpensesBillingDetails, “Uren en onkosten (Facturatiedetails)”): the Time & Expenses entries with the invoice proposal and the invoice they were billed on, and the proposed quantity and amount.
Twinfield documentation: Browse data.
ivb.trs.head.numberis the invoice proposal,inv.trs.head.numberthe invoice; both are numbers and empty when the entry is not billed yet.ivb.trs.line.source: what the line bills, e.g.time,expenses,quantitiesorpostponed.ivb.trs.line.valueis the proposed amount,teq.trs.line.valueextthe external value of the entry.- 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 and activity. See browse-definitions/660_1.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/660_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 | |
ivb.trs.head.number |
Voorstelnr. | long | yes | |
ivb.trs.head.description |
Omschrijving | string | yes | |
ivb.trs.line.source |
Regeltype | special: margin, financial, time, expenses, quantities, postponed |
yes | |
inv.trs.head.number |
Factuurnr. | long | 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.curcode |
Valuta | string | yes | |
teq.trs.line.quantity |
Aantallen | decimal | yes | |
teq.trs.line.valueint |
Bedrag intern | value | yes | |
teq.trs.line.valueext |
Bedrag extern | value | yes | |
ivb.trs.line.quantity |
Aantallen voorgesteld | decimal | yes | |
ivb.trs.line.value |
Bedrag voorgesteld | 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::TimeAndExpensesBillingDetails) ->columns( 'teq.trs.head.date', 'teq.trs.head.customer', 'teq.trs.head.project1', 'ivb.trs.head.number', 'ivb.trs.line.source', 'inv.trs.head.number', 'teq.trs.line.valueext', 'ivb.trs.line.value', ) ->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) { $proposal = $row->nullableString('ivb.trs.head.number'); $invoice = $row->nullableString('inv.trs.head.number');
echo sprintf( '[%d/%d] %s customer %s project %s: %s, value %s, proposed %s%s%s', $index + 1, count($result), $row->date('teq.trs.head.date')->format('Y-m-d'), $row->nullableString('teq.trs.head.customer') ?? '-', $row->string('teq.trs.head.project1'), $row->string('ivb.trs.line.source'), $row->amount('teq.trs.line.valueext'), $row->amount('ivb.trs.line.value'), $proposal === null ? '' : ', proposal ' . $proposal, $invoice === null ? ', not invoiced' : ', invoice ' . $invoice, ), PHP_EOL;}php examples/browse-data/660_1-time-and-expenses-billing-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 customer 1000 project P0001: time, value 570.00, proposed 570.00, proposal 14, invoice 2026015[2/2] 2026-03-03 customer 1000 project P0001: expenses, value 45.00, proposed 45.00, proposal 14, not invoicedWhat 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::TimeAndExpensesBillingDetails) ->columns( 'teq.trs.head.date', 'teq.trs.head.customer', 'teq.trs.head.project1', 'ivb.trs.head.number', 'ivb.trs.line.source', 'inv.trs.head.number', 'teq.trs.line.valueext', 'ivb.trs.line.value', ) ->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="660_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.customer</field> <visible>true</visible> </column> <column> <field>teq.trs.head.project1</field> <visible>true</visible> </column> <column> <field>ivb.trs.head.number</field> <visible>true</visible> </column> <column> <field>ivb.trs.line.source</field> <visible>true</visible> </column> <column> <field>inv.trs.head.number</field> <visible>true</visible> </column> <column> <field>teq.trs.line.valueext</field> <visible>true</visible> </column> <column> <field>ivb.trs.line.value</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.customer</td> <td label="" hideforuser="false" type="String">teq.trs.head.project1</td> <td label="" hideforuser="false" type="Number">ivb.trs.head.number</td> <td label="" hideforuser="false" type="String">ivb.trs.line.source</td> <td label="" hideforuser="false" type="Number">inv.trs.head.number</td> <td label="" hideforuser="false" type="Value">teq.trs.line.valueext</td> <td label="" hideforuser="false" type="Value">ivb.trs.line.value</td> </th> <tr> <td name="02/03/2026">20260302</td> <td>1000</td> <td>P0001</td> <td>14</td> <td name="Tijd">time</td> <td>2026015</td> <td>570.00</td> <td>570.00</td> <key> <office>1000</office> </key> </tr> <tr> <td name="03/03/2026">20260303</td> <td>1000</td> <td>P0001</td> <td>14</td> <td name="Onkosten">expenses</td> <td/> <td>45.00</td> <td>45.00</td> <key> <office>1000</office> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/660_1-time-and-expenses-billing-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.