PHP код:
Query query = new Query();
QueryBuildDataSource qbds;
QueryBuildRange bankQBR;
QueryBuildRange custQBR;
;
qbds = query.addDataSource(tablenum(BankAccountTrans));
qbds = qbds.addDataSource(tablenum(CustTrans));
qbds.addLink(fieldnum(CustTrans,Voucher),fieldnum(BankAccountTrans,Voucher));
qbds.joinmode(JoinMode::ExistsJoin);
C Уважением,
Георгий