25.09.2010, 15:19 | #1 |
----------------
|
CustVendSettle просмотр кода
DAX 2009 RU 5
просматривал код и возникли вопросы - метод settleNow строка 552 и далее X++: if (!areDebitsDone && custVendTransDebit.AmountCur != 0) { //find the offset to the custVendTransDebet still open select firstonly custVendTransCredit order by RecId desc where custVendTransCredit.RecId == custVendTransDebit.OffsetRecId; this.setStillOpenValues(custVendTransDebit, custVendTransOpenDebit.RecId, specTransDebit.Balance01, custVendTransCredit.Dimension, debitTransState); } if (!areCreditsDone && custVendTransCredit.AmountCur != 0) { this.setStillOpenValues(custVendTransCredit, custVendTransOpenCredit.RecId, specTransCredit.Balance01, custVendTransCredit.Dimension, debitTransState); // ??? } - метод processStillOpenTransactions Делается цикл по еще открытым проводкам. X++: for (currentIndex = stillOpenIndex; currentIndex > 0; currentIndex--) { // Find over/under amount for the company currentCompany = stillOpenCompany[stillOpenIndex]; changecompany(currentCompany) { // There can be multiple transactions per company in the index, but we only want to // process each company once for over/under taxes. Will use set called companiesWithTaxProccesed // and if company is already in the set this is indication that taxes where already calculated // and shouldn't be calculated again. if (companiesWithTaxProcessed.in(currentCompany)) { calcTaxForCompany = false; } else ... - метод processStillOpenTransactions объявлена переменная isCrossCompany. Единственный раз ее значение меняется в цикле по проводкам. То есть, с какого-то момента все последуюшие проводки обрабатывются с признаком isCrossCompany = true, независимо от данных в самих проводках. Это такая задумка или недодумка? Последний раз редактировалось Wamr; 25.09.2010 в 15:51. |
|
|
За это сообщение автора поблагодарили: kashperuk (5), Logger (3), ziva (2), MikeR (4), gl00mie (5). |
Теги |
ax2009, ax2012, custvendsettle, баг, сопоставление |
|
|