12.04.2014, 09:41 | #1 |
Участник
|
Как вернуть одну строку для одного журнала?
Query legerJournalTableQuery = new Query();
QueryBuildDataSource legerJournalTableDS,legerJournalTransDS; ; legerJournalTableDS = legerJournalTableQuery.addDataSource(tablenum(LedgerJournalTable)); legerJournalTableDS.addRange(fieldnum(LedgerJournalTable,postedDate)); legerJournalTableDS.addRange(fieldnum(LedgerJournalTable,posted)).value(queryvalue(NoYes::Yes)); legerJournalTableDS.addRange(fieldnum(LedgerJournalTable,journalName)); legerJournalTableDS.addRange(fieldId2Ext(fieldnum(LedgerJournalTable,Dimension),4)); legerJournalTableDS.addRange(fieldnum(LedgerJournalTable,offsetAccountType)).value(queryvalue(LedgerJournalACType::Bank)); legerJournalTableDS.orderMode(orderMode::OrderBy); legerJournalTableDS.addSortField(fieldNum(LedgerJournalTable,PostedDate)); legerJournalTableDS.addSortField(fieldNum(LedgerJournalTable,OffsetAccount), SortOrder:escending); legerJournalTransDS = legerJournalTableDS.addDataSource(tablenum(LedgerJournalTrans)); legerJournalTransDS.relations(true); legerJournalTransDS.addRange(fieldnum(LedgerJournalTrans,TransDate)); |
|