Customers (130_1)
Browse code 130_1 (BrowseCode::Customers, “Debiteuren”): the transaction lines of customers with their payment status, due date and the credit limit of the customer. 100 has fewer fields; 130_2 and 130_3 have more criteria.
Twinfield documentation: Browse data.
equal('fin.trs.line.matchstatus', 'available'): open items.matchedgives the paid items,proposedthe items in a payment proposal.fin.trs.head.customer.creditlimitis the credit limit of the customer, anAmount.like('fin.trs.head.code', 'VRK*'): the day book is alikecriterion in 130_1.between('fin.trs.head.yearperiod', '2000/00', …): open items can be old, so start early.
Criteria: period, day book, status, general ledger account, customer and payment status. See browse-definitions/130_1.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/130_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 | |
fin.trs.head.year |
Jaar | long | yes | |
fin.trs.head.period |
Periode | long | yes | |
fin.trs.head.yearperiod |
Jaar/periode (JJJJ/PP) | string | no | between |
fin.trs.head.code |
Dagboek | string | yes | like |
fin.trs.head.shortname |
Dagboeknaam | string | yes | |
fin.trs.head.number |
Boekingsnummer | decimal | yes | |
fin.trs.head.status |
Status | special: draft, temporary, final, inuse, normal |
yes | equal (proposed normal) |
fin.trs.head.date |
Boekdatum | date | yes | |
fin.trs.line.datedue |
Vervaldatum | date | yes | |
fin.trs.line.invnumber |
Factuurnummer | string | yes | |
fin.trs.head.curcode |
Valuta | string | yes | |
fin.trs.head.customer.respuser |
Kredietbeheerder | string | yes | |
fin.trs.head.customer.respusername |
Naam kredietbeheerder | string | yes | |
fin.trs.head.customer.creditlimit |
Kredietlimiet | value | yes | |
fin.trs.head.modified |
Wijzigingsdatum boeking | datetime | yes | |
fin.trs.line.dim1 |
Grootboekrek. | string | yes | between |
fin.trs.line.dim1name |
Grootboekrek.naam | string | yes | |
fin.trs.line.dim2 |
Kpl./rel. | string | yes | between |
fin.trs.line.dim2name |
Kpl.-/rel.naam | 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.openbasevaluesigned |
Openstaand bedrag | value | yes | |
fin.trs.line.matchstatus |
Betaalstatus | special: notmatchable, available, proposed, matched |
yes | equal |
fin.trs.line.matchdate |
Betaaldatum | date | yes | |
fin.trs.line.matchnumber |
Afletternummer | string | yes | |
fin.trs.line.payrun |
Incassonummer | string | yes | |
fin.trs.line.modified |
Wijzigingsdatum | datetime | yes | |
fin.trs.line.freetext1 |
Vrij tekstveld 1 | string | yes | |
fin.trs.line.freetext2 |
Vrij tekstveld 2 | string | yes | |
fin.trs.line.freetext3 |
Vrij tekstveld 3 | string | yes |
$twinfield = Example::twinfield();
$year = Example::lastYear($twinfield);$customer = $argv[1] ?? null;
$query = $twinfield->browse(BrowseCode::Customers) ->columns( 'fin.trs.line.dim2', 'fin.trs.line.dim2name', 'fin.trs.head.customer.creditlimit', 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.line.invnumber', 'fin.trs.line.datedue', 'fin.trs.line.basevaluesigned', 'fin.trs.line.openbasevaluesigned', ) ->between('fin.trs.head.yearperiod', '2000/00', sprintf('%d/55', $year)) ->equal('fin.trs.head.status', 'normal') ->equal('fin.trs.line.matchstatus', 'available');
if ($customer !== null) { $query = $query->between('fin.trs.line.dim2', $customer, $customer);}
$result = $query->get();
echo count($result), ' open item(s)', $customer === null ? '' : ' of customer ' . $customer, PHP_EOL;
foreach ($result as $index => $row) { $due = $row->nullableDate('fin.trs.line.datedue');
echo sprintf( '[%d/%d] %s %s (credit limit %s), %s %d invoice %s, due %s: %s, open %s', $index + 1, count($result), $row->string('fin.trs.line.dim2'), $row->nullableString('fin.trs.line.dim2name') ?? '', $row->amount('fin.trs.head.customer.creditlimit'), $row->string('fin.trs.head.code'), $row->int('fin.trs.head.number'), $row->nullableString('fin.trs.line.invnumber') ?? '-', $due === null ? '-' : $due->format('Y-m-d'), $row->amount('fin.trs.line.basevaluesigned'), $row->amount('fin.trs.line.openbasevaluesigned'), ), PHP_EOL;}php examples/browse-data/130_1-customers/example.php # all open itemsphp examples/browse-data/130_1-customers/example.php 1000 # the open items of customer 1000Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
2 open item(s)[1/2] 1000 Example customer (credit limit 5000.00), VRK 202600002 invoice 2026-0002, due 2026-03-03: 242.00, open 242.00[2/2] 1001 Second customer (credit limit 0.00), VRK 202600005 invoice 2026-0005, due 2026-04-09: 60.50, open 30.25What 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::Customers) ->columns( 'fin.trs.line.dim2', 'fin.trs.line.dim2name', 'fin.trs.head.customer.creditlimit', 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.line.invnumber', 'fin.trs.line.datedue', 'fin.trs.line.basevaluesigned', 'fin.trs.line.openbasevaluesigned', ) ->between('fin.trs.head.yearperiod', '2000/00', '2026/55') ->equal('fin.trs.head.status', 'normal') ->equal('fin.trs.line.matchstatus', 'available') ->get();The SDK sends this XML as xmlRequest of ProcessXmlString to processxml.asmx:
<columns code="130_1" optimize="true"> <column> <field>fin.trs.line.dim2</field> <visible>true</visible> </column> <column> <field>fin.trs.line.dim2name</field> <visible>true</visible> </column> <column> <field>fin.trs.head.customer.creditlimit</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.invnumber</field> <visible>true</visible> </column> <column> <field>fin.trs.line.datedue</field> <visible>true</visible> </column> <column> <field>fin.trs.line.basevaluesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.line.openbasevaluesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.head.yearperiod</field> <operator>between</operator> <from>2000/00</from> <to>2026/55</to> </column> <column> <field>fin.trs.head.status</field> <operator>equal</operator> <from>normal</from> </column> <column> <field>fin.trs.line.matchstatus</field> <operator>equal</operator> <from>available</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.dim2</td> <td label="" hideforuser="false" type="String">fin.trs.line.dim2name</td> <td label="" hideforuser="false" type="Value">fin.trs.head.customer.creditlimit</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.invnumber</td> <td label="" hideforuser="false" type="Date">fin.trs.line.datedue</td> <td label="" hideforuser="false" type="Value">fin.trs.line.basevaluesigned</td> <td label="" hideforuser="false" type="Value">fin.trs.line.openbasevaluesigned</td> </th> <tr> <td>1000</td> <td>Example customer</td> <td>5000.00</td> <td>VRK</td> <td>202600002</td> <td>2026-0002</td> <td name="03/03/2026">20260303</td> <td>242.00</td> <td>242.00</td> <key> <office>1000</office> <code>VRK</code> <number>202600002</number> <line>1</line> </key> </tr> <tr> <td>1001</td> <td>Second customer</td> <td>0.00</td> <td>VRK</td> <td>202600005</td> <td>2026-0005</td> <td name="09/04/2026">20260409</td> <td>60.50</td> <td>30.25</td> <key> <office>1000</office> <code>VRK</code> <number>202600005</number> <line>1</line> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/130_1-customers/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.