Аналогично
PHP код:
static void testMatchingFieldsByQuery(Args _args)
{
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildRange qbrQty;
QueryRun queryRun;
InventJournalTrans inventJournalTrans;
InventJournalTable inventJournalTable = InventJournalTable::find('075221_090');
;
qbds = query.addDataSource(tableNum(InventJournalTrans),"InventJournalTrans");
qbds.addRange(fieldNum(InventJournalTrans,JournalId)).value(inventJournalTable.JournalId);
qbds.addRange(fieldNum(InventJournalTrans,IncompleteDelivery)).value(queryValue(NoYes::No));
qbrQty = qbds.addRange(fieldNum(InventJournalTrans, Qty));
qbrQty.value("(-1*inventJournalTrans.Qty < inventJournalTrans.QtyRegistered)");
queryRun = new queryRun(query);
while (queryRun.next())
{
inventJournalTrans = queryRun.get(tableNum(InventJournalTrans));
info(inventJournalTrans.ItemId);
}
}