Skip to content

Suppliers (230_2)

Browse code 230_2 (BrowseCode::SuppliersV2, “Crediteuren (v2)”): the transaction lines of suppliers, like 230_1, with the payment run, the open amount in the currency of the transaction and the change date of the line as criteria.

Twinfield documentation: Browse data.

  • fin.trs.line.payrun: the payment run the line is in, empty when it is not in one.
  • betweenDateTimes('fin.trs.line.modified', $since, $now): the lines that changed in that time, e.g. because they were paid.
  • fin.trs.line.openvaluesigned is the open amount in the currency of the transaction and can be a criterion.

Criteria: period, day book, status, change date of the transaction and of the line, general ledger account, supplier, amount, open amount and payment status. See browse-definitions/230_2.xml and the browse data guide.

All fields of the browse definition (browse-definitions/230_2.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 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 Betaalnummer 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
fin.trs.head.typecategory Dagboekcategorie string yes
$twinfield = Example::twinfield();
$year = Example::lastYear($twinfield);
$query = $twinfield->browse(BrowseCode::SuppliersV2)
->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.openvaluesigned',
'fin.trs.line.matchstatus',
'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;
foreach ($result as $index => $row) {
$due = $row->nullableDate('fin.trs.line.datedue');
$run = $row->nullableString('fin.trs.line.payrun');
echo sprintf(
'[%d/%d] %s %s, %s %d invoice %s, due %s: open %s%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.openvaluesigned'),
$run === null ? ', not in a payment run' : ', payment run ' . $run,
), PHP_EOL;
}
Terminal window
php examples/browse-data/230_2-suppliers-v2/example.php # all open items

Add 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: open -60.50, payment run 7
[2/2] 2001 Second supplier, INK 202600006 invoice 2026/114, due 2026-04-11: open -145.20, not in a payment run

What 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.

Twinfield documentation: Browse data: Compose the browse request and send it.

$twinfield->browse(BrowseCode::SuppliersV2)
->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.openvaluesigned',
'fin.trs.line.matchstatus',
'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="230_2" 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.openvaluesigned</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.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>
</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.openvaluesigned</td>
<td label="" hideforuser="false" type="String">fin.trs.line.matchstatus</td>
<td label="" hideforuser="false" type="String">fin.trs.line.payrun</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 name="Beschikbaar">available</td>
<td>7</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 name="Beschikbaar">available</td>
<td/>
<key>
<office>1000</office>
<code>INK</code>
<number>202600006</number>
<line>1</line>
</key>
</tr>
</browse>

View examples/browse-data/230_2-suppliers-v2/example.php on GitHub.

Made by SolveBeam

Twinfield and Wolters Kluwer are trademarks of Wolters Kluwer. Their names and logos are used only to refer to their products.