|
05.06.2007, 10:22 | #1 |
Участник
|
Вчера наткнулся в методе Classes\InventAdjustPost\updateTotal на очень удививший меня код.
X++: protected void updateTotal() { InventSettlement inventSettlement; InventTrans inventTrans; ProjLedger projLedger; while select forcePlaceHolders forceSelectOrder sum(costAmountadjustment) from inventSettlement index hint DateVoucherIdx group by itemId,balanceSheetPosting,balanceSheetAccount,operationsPosting,operationsAccount,dimension where inventSettlement.transDate == transDate && inventSettlement.voucher == voucher && inventSettlement.costAmountAdjustment != 0 && inventSettlement.InventTransCurrency_RU == inventTransCurrency && inventSettlement.posted == NoYes::No join inventTrans index hint recId group projId,projAdjustRefId,inventTransId where inventTrans.RecId == inventSettlement.TransRecId { if (correspondenceEnable) { this.updateMap_RU(inventSettlement,inventTrans); } else { projLedger = this.newProjLedger_RU(inventTrans.ProjId, inventTrans.InventTransId, inventTrans.ProjAdjustRefId); this.updateTrans(inventSettlement, ledgerVoucher,projLedger); } } this.updateTrans_RU(); } Это вообще нормально?? |
|