Suppliers (230_1)
Browse code 230_1 (BrowseCode::Suppliers, “Crediteuren”): the transaction lines of suppliers with their payment status and due date. 200 has fewer fields; 230_2 has more criteria.
Twinfield documentation: Browse data.
equal('fin.trs.line.matchstatus', 'available'): open items, the invoices still to pay.matchedgives the paid items.- Amounts of supplier invoices are negative (credit).
like('fin.trs.head.code', 'INK*'): the day book is alikecriterion in 230_1.
Criteria: period, day book, status, general ledger account, supplier and payment status. See browse-definitions/230_1.xml and the browse data guide.
Fields
Section titled “Fields”All fields of the browse definition (browse-definitions/230_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.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 |
Betaalnummer | 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);$supplier = $argv[1] ?? null;
$query = $twinfield->browse(BrowseCode::Suppliers) ->columns( '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.basevaluesigned', 'fin.trs.line.openbasevaluesigned', 'fin.trs.line.matchstatus', ) ->between('fin.trs.head.yearperiod', '2000/00', sprintf('%d/55', $year)) ->equal('fin.trs.head.status', 'normal') ->equal('fin.trs.line.matchstatus', 'available');
if ($supplier !== null) { $query = $query->between('fin.trs.line.dim2', $supplier, $supplier);}
$result = $query->get();
echo count($result), ' open item(s)', $supplier === null ? '' : ' of supplier ' . $supplier, PHP_EOL;
$open = Amount::zero();
foreach ($result as $index => $row) { $due = $row->nullableDate('fin.trs.line.datedue'); $open = $open->plus($row->amount('fin.trs.line.openbasevaluesigned'));
echo sprintf( '[%d/%d] %s %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->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;}
echo 'Total open: ', $open, PHP_EOL;php examples/browse-data/230_1-suppliers/example.php # all open itemsphp examples/browse-data/230_1-suppliers/example.php 2000 # the open items of supplier 2000Add TWINFIELD_DEBUG=1 to see the SOAP requests and responses.
2 open item(s)[1/2] 2000 Example supplier, INK 202600003 invoice F-8812, due 2026-03-07: -60.50, open -60.50[2/2] 2001 Second supplier, INK 202600006 invoice 2026/114, due 2026-04-11: -145.20, open -45.20Total open: -105.70What 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::Suppliers) ->columns( '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.basevaluesigned', 'fin.trs.line.openbasevaluesigned', 'fin.trs.line.matchstatus', ) ->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="230_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.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.line.matchstatus</field> <visible>true</visible> <operator>equal</operator> <from>available</from> </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></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="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> <td label="" hideforuser="false" type="String">fin.trs.line.matchstatus</td> </th> <tr> <td>2000</td> <td>Example supplier</td> <td>INK</td> <td>202600003</td> <td>F-8812</td> <td name="07/03/2026">20260307</td> <td>-60.50</td> <td>-60.50</td> <td name="Beschikbaar">available</td> <key> <office>1000</office> <code>INK</code> <number>202600003</number> <line>1</line> </key> </tr> <tr> <td>2001</td> <td>Second supplier</td> <td>INK</td> <td>202600006</td> <td>2026/114</td> <td name="11/04/2026">20260411</td> <td>-145.20</td> <td>-45.20</td> <td name="Beschikbaar">available</td> <key> <office>1000</office> <code>INK</code> <number>202600006</number> <line>1</line> </key> </tr></browse>Source
Section titled “Source”View examples/browse-data/230_1-suppliers/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.