|
![]() |
#1 |
Участник
|
Может так кто поможет?
Правильно ли следущее?
X++: VendTrans checkVendTrans() { VendLedgerAccounts vendLedgerAccounts; ; while select vendTrans where vendTrans.TransDate <= toDate { select firstOnly SumAccount from vendLedgerAccounts where vendLedgerAccounts.PostingProfile == vendTrans.PostingProfile && vendLedgerAccounts.AccountCode == TableGroupAll::Table && vendLedgerAccounts.Num == vendTrans.AccountNum; if (! vendLedgerAccounts.SumAccount) { select firstOnly SumAccount from vendLedgerAccounts where vendLedgerAccounts.PostingProfile == vendTrans.PostingProfile && vendLedgerAccounts.AccountCode == TableGroupAll::GroupId && vendLedgerAccounts.Num == VendTable::find(vendTrans.AccountNum).VendGroup; } if (! vendLedgerAccounts.SumAccount) { select firstOnly SumAccount from vendLedgerAccounts where vendLedgerAccounts.PostingProfile == vendTrans.PostingProfile && vendLedgerAccounts.AccountCode == TableGroupAll::All && vendLedgerAccounts.SumAccount == accountNum; } if (vendLedgerAccounts.SumAccount == accountNum) amountMST += vendTrans.AmountMST; } return vendTrans; }
__________________
Бывает, что человек молчит, когда ничего не знает о данном предмете, но чаще – когда знает о нем все. (Джордж Бернард Шоу) Последний раз редактировалось Silence; 04.12.2007 в 16:55. |
|