When I have the <b>LedgerJournalTransDaily form open</b> (or any
other LedgerJournaTrans* form) showing some journal lines and I want
to make a specific select showing all open journals and its
transactions with specified accout and its type as standard or
offset sides <b>the select does not go into journals other than the
one that is shown by LedgerJournalTrans form </b>.
System: Windows 2000
Application: Axapta 2.5 SP4 MP4
DataBase SQL 2000 SP3a
I'm not sure if I described it clearly, let me show a following job:
-->
static void Test(Args _args)
{
LedgerJournalTable ledgerJournalTable;
LedgerJournalTrans ledgerJournalTrans, ledgerJournalTrans2;
tmpLedgerBalanceControl tmpLedgerBalanceControlLocal;
AmountMST amountMST;
AmountMST amountDebit;
AmountMST amountCredit;
CurrencyCode companyCurrency = Companyinfo::find
().currencyCode;
TaxDirection taxDirection;
AmountMST taxAmount;
TaxVoucherService taxVoucherService;
LedgerSide taxSide;
AccountNum taxAccount;
LedgerJournalACType_ taxAccountType;
tmpLedgerBalanceControl tmpLedgerBalanceControlLocal2;
boolean taxFlag;
AccountNum _account;
LedgerJournalACType _accType;
;
// HERE SPECIFY ACCOUNT AND ACCOUNT TYPE
_account = '10100';
_accType = LedgerJournalACType::Bank;
while select ledgerJournalTable
order by journalNum
where ledgerJournalTable.posted == false
{
ledgerJournalTrans.clear();
info("1. "+ledgerJournalTable.JournalNum
+" "+_account+" "+strfmt("%1",_accType));
while select sum(amountCurCredit), sum(amountCurDebit)
from ledgerJournalTrans
index hint NumVoucherIdx
group by journalNum, company, accountType,
accountNum,
offsetCompany, offsetAccountType,
offsetAccount,
currencyCode, exchRate, exchRateSecond,
triangulation
where ledgerJournalTrans.journalNum ==
ledgerJournalTable.journalNum
&& ((ledgerJournalTrans.accountNum ==
_account && ledgerJournalTrans.AccountType == _accType)
|| (ledgerJournalTrans.OffsetAccount ==
_account && ledgerJournalTrans.OffsetAccountType == _accType))
{
info("--- "+ledgerJournalTrans.JournalNum);
}
info("2. "+ledgerJournalTable.JournalNum
+" "+_account+" "+strfmt("%1",_accType));
ledgerJournalTrans2.clear();
while select ledgerJournalTrans2
where ledgerJournalTrans2.JournalNum ==
ledgerJournalTable.JournalNum &&
(((ledgerJournalTrans2.OffsetAccount == _account &&
ledgerJournalTrans2.OffsetAccountType == _accType) ||
(ledgerJournalTrans2.AccountNum == _account &&
ledgerJournalTrans2.AccountType == _accType)))
{
info("--- "+ledgerJournalTrans2.JournalNum);
}
}
}
<--
If I have e.g. journal J1 and journal J2, both having some lines
with account 10100 as offset account and I have a form open on
Journal J2, and I run this Job the inner loop will show only the
lines from J2 and not from J1.
I think it is some chacjing problem, when a form is open it blocks
the cache and it cannot be prunned.
LedgerJournalTrans cachelookup property is set to found but I also
tried with None or EntireTable and it also did not work.
I also tried to do Dictionary::dataFlush(); before thirst while -
also with no result.
Deas anyone have an idea about this?
Best Regards,
Sebastian Widz
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/development-axapta/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.

