Customers (130_3)
Browse code 130_3 (BrowseCode::CustomersV3, “Debiteuren (v3)”): the transaction lines of customers, like 130_2, with the credit manager of the customer, the collection run and the day book category. Use it for the open items per credit manager.
Twinfield documentation: Browse data.
fin.trs.head.customer.respuserandrespusername: the credit manager of the customer.fin.trs.line.payrun: the collection run the line is in, empty when it is not in one.like('fin.trs.head.typecategory', 'SALESINVOICE'): the day book category is alikecriterion, e.g. only sales invoices.equal('fin.trs.line.matchstatus', 'available'): open items.
Criteria: period, day book category, day book, status, change date of the transaction and of the line, general ledger account, customer, amount, open amount and payment status. See browse-definitions/130_3.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/130_3.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.typecategory |
Dagboekcategorie | string | yes | like |
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 | no | between |
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 | between |
fin.trs.line.basevaluesigned |
Basisbedrag | value | yes | |
fin.trs.line.repvaluesigned |
Rapportagebedrag | value | yes | |
fin.trs.line.openvaluesigned |
Open amount transaction value | value | yes | between |
fin.trs.line.openbasevaluesigned |
Open amount base value | 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 | between |
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 | |
fin.trs.line.description |
Omschrijving | string | yes | |
fin.trs.head.inpdate |
Invoerdatum | datetime | yes |
$twinfield = Example::twinfield();
$year = Example::lastYear($twinfield);
$query = $twinfield->browse(BrowseCode::CustomersV3) ->columns( 'fin.trs.head.customer.respuser', 'fin.trs.head.customer.respusername', 'fin.trs.line.dim2', 'fin.trs.line.dim2name', 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.line.invnumber', 'fin.trs.line.datedue', 'fin.trs.line.openbasevaluesigned', 'fin.trs.line.payrun', ) ->between('fin.trs.head.yearperiod', '2000/00', sprintf('%d/55', $year)) ->equal('fin.trs.head.status', 'normal') ->equal('fin.trs.line.matchstatus', 'available');
$result = $query->get();
echo count($result), ' open item(s)', PHP_EOL;
$perManager = [];
foreach ($result as $index => $row) { $manager = $row->nullableString('fin.trs.head.customer.respusername') ?? 'no credit manager'; $due = $row->nullableDate('fin.trs.line.datedue'); $open = $row->amount('fin.trs.line.openbasevaluesigned'); $perManager[$manager] = ($perManager[$manager] ?? Amount::zero())->plus($open); $run = $row->nullableString('fin.trs.line.payrun');
echo sprintf( '[%d/%d] %s: %s %s, %s %d invoice %s, due %s: open %s%s', $index + 1, count($result), $manager, $row->string('fin.trs.line.dim2'), $row->nullableString('fin.trs.line.dim2name') ?? '', $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'), $open, $run === null ? '' : ', collection run ' . $run, ), PHP_EOL;}
foreach ($perManager as $manager => $open) { echo 'Open for ', $manager, ': ', $open, PHP_EOL;}php examples/browse-data/130_3-customers-v3/example.php # all open itemsAdd TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
2 open item(s)[1/2] Example user: 1000 Example customer, VRK 202600002 invoice 2026-0002, due 2026-03-03: open 242.00, collection run 12[2/2] no credit manager: 1001 Second customer, VRK 202600005 invoice 2026-0005, due 2026-04-09: open 30.25Open for Example user: 242.00Open for no credit manager: 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::CustomersV3) ->columns( 'fin.trs.head.customer.respuser', 'fin.trs.head.customer.respusername', 'fin.trs.line.dim2', 'fin.trs.line.dim2name', 'fin.trs.head.code', 'fin.trs.head.number', 'fin.trs.line.invnumber', 'fin.trs.line.datedue', 'fin.trs.line.openbasevaluesigned', 'fin.trs.line.payrun', ) ->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_3" optimize="true"> <column> <field>fin.trs.head.customer.respuser</field> <visible>true</visible> </column> <column> <field>fin.trs.head.customer.respusername</field> <visible>true</visible> </column> <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.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.openbasevaluesigned</field> <visible>true</visible> </column> <column> <field>fin.trs.line.payrun</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.head.customer.respuser</td> <td label="" hideforuser="false" type="String">fin.trs.head.customer.respusername</td> <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="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.openbasevaluesigned</td> <td label="" hideforuser="false" type="String">fin.trs.line.payrun</td> </th> <tr> <td>EXAMPLE</td> <td>Example user</td> <td>1000</td> <td>Example customer</td> <td>VRK</td> <td>202600002</td> <td>2026-0002</td> <td name="03/03/2026">20260303</td> <td>242.00</td> <td>12</td> <key> <office>1000</office> <code>VRK</code> <number>202600002</number> <line>1</line> </key> </tr> <tr> <td/> <td/> <td>1001</td> <td>Second customer</td> <td>VRK</td> <td>202600005</td> <td>2026-0005</td> <td name="09/04/2026">20260409</td> <td>30.25</td> <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_3-customers-v3/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.