|
![]() |
#1 |
Участник
|
вот так работает сцуко быстро
X++: static void DK_vendSaldoByProfiles(Args _args) { VendLedgerAccounts vendLedgerAccounts; VendTrans vendTrans; VendTable vendTable; Amount bablosDeb; Amount bablosCred; TransDate transDate; ; transDate = 30\09\2007; while select vendTable group by VendGroup join sum (amountMst) from vendTrans group by AccountNum where vendTrans.TransDate <= transDate && vendTrans.AccountNum == vendTable.AccountNum join vendLedgerAccounts where vendLedgerAccounts.SumAccount == "60.02.0001" && vendLedgerAccounts.PostingProfile == vendTrans.PostingProfile && ( ( vendLedgerAccounts.AccountCode == TableGroupAll::Table && vendLedgerAccounts.Num == vendTrans.AccountNum ) || ( vendLedgerAccounts.AccountCode == TableGroupAll::GroupId && vendLedgerAccounts.Num == vendTable.VendGroup ) || ( vendLedgerAccounts.AccountCode == TableGroupAll::All ) ) { if (vendTrans.AmountMST > 0) bablosDeb += vendTrans.AmountMST; else bablosCred += vendTrans.AmountMST; } info(strfmt("%1 %2 ", bablosDeb, bablosCred)); } даже должен условно правильный результат дать Последний раз редактировалось UNRW; 05.12.2007 в 11:57. |
|