Странное дело, немного модифицировал метод inti, что бы добавить выбор складских журналов и ...
Именно журналы не показываются, а закупки и заказы видны.
Не пойму в чем дело.
PHP код:
public void init()
{
Query query;
QueryBuildDataSource qbds_InventTrans;
QueryBuildDataSource qbds_SalesTable;
QueryBuildDataSource qbds_PurchTable;
QueryBuildDataSource qbds_InventJournalTable;
;
super();
Query = new Query();
qbds_InventTrans = Query.addDataSource(tablenum(InventTrans),"_InventTrans");
qbds_PurchTable = qbds_InventTrans.addDataSource(tablenum(PurchTable),"_PurchTable");
qbds_PurchTable.joinMode(JoinMode::ExistsJoin);
qbds_PurchTable.fetchMode(0);
qbds_PurchTable.relations(false);
qbds_SalesTable = qbds_InventTrans.addDataSource(tablenum(SalesTable),"_SalesTable");
qbds_SalesTable.joinMode(JoinMode::ExistsJoin);
qbds_SalesTable.fetchMode(0);
qbds_InventTrans.relations(false);
qbds_InventJournalTable = qbds_InventTrans.addDataSource(tablenum(InventJournalTable),"_InventJournalTable");
qbds_InventJournalTable.joinMode(JoinMode::ExistsJoin);
qbds_InventJournalTable.fetchMode(0);
qbds_InventTrans.relations(false);
qbds_InventJournalTable.addRange(fieldnum(InventJournalTable,JournalId)).value("( (_InventTrans.TransRefId == _SalesTable.SalesId) ||" +
" (_InventTrans.TransRefId == _PurchTable.PurchId) ||" +
" (_InventTrans.TransRefId == _InventJournalTable.JournalId) )");
this.query(Query);
// Info(this.query().dataSourceNo(1).tostring());
// SELECT * FROM InventTrans EXISTS JOIN * FROM PurchTable EXISTS JOIN * FROM SalesTable EXISTS JOIN * FROM InventJournalTable WHERE ((( (_InventTrans.TransRefId == _SalesTable.SalesId) || (_InventTrans.TransRefId == _PurchTable.PurchId) || (_InventTrans.TransRefId == _InventJournalTable.JournalId) )))
}