|
21.11.2014, 16:14 | #1 |
Участник
|
Цитата:
Сообщение от Ruff
AX2009, AX2012, sys слой:
X++: final class TaxSalesInvoice extends Tax { SalesCalcTax salesFormLetter; ... } Аналогичные объявления в классах TaxSales, TaxPurch, TaxPurchInvoice, может еще где-то... Наверно я чего-то не догоняю, но эта невинная "шутка" стоила битого часа впустую потерянного времени Вон в самом \Classes\ClassFactory\queryRunClass написали : X++: public QueryRun queryRunClass(Args _args) { SysQueryRun ret; ret = new SysQueryRun(_args); return ret; } Версия - любая. |
|
|
За это сообщение автора поблагодарили: macklakov (1), AraraT® (4), Товарищ ♂uatr (1). |
15.12.2014, 10:38 | #2 |
Модератор
|
\Forms\EmplAdvLineCreate_RU\Data Sources\EmplTrans\Methods\init
X++: qbdsTransCredit.addRange(fieldNum(EmplTrans_RU, AmountCur)).value("@GLS111254");
__________________
-ТСЯ или -ТЬСЯ ? |
|
03.04.2015, 14:45 | #3 |
Moderator
|
DAX2012 (проверялось для DAX2012R3CU8, но было и раньше). Из непонятных соображений, разработчики запретили маркировку складских проводок по номенклатуре со стандартной себестоимостью. (Новым вариантом стандартной, а не fixed receipt price). В методе tmpInventTransMark:: packTmpMark(), который собственно и строит временную таблицу кандидатов на маркировку, есть следующий замечательный код:
X++: includeAll = inventTable.modelGroup().inventModelType().isSettled(); InventDimGroupSetup::newInventTable(inventTable).inventDimParmActiveFinancialInventory(inventDimParmFinancial); while select forceplaceholders inventTrans where inventTrans.ValueOpen == InventTransOpen::Yes && inventTrans.TransChildType == InventTransChildType::None && inventTrans.PackingSlipReturned == NoYes::No && (inventTrans.MarkingRefInventTransOrigin || includeAll) && (!inventTrans.MarkingRefInventTransOrigin || inventTrans.MarkingRefInventTransOrigin == _inventTransOrigin.RecId // marked with reference || inventTrans.InventTransOrigin == _inventTransOrigin.RecId) // is reference itself join inventTransOrigin where inventTransOrigin.ItemId == _inventTransOrigin.ItemId && inventTransOrigin.RecId == inventTrans.InventTransOrigin #inventDimExistsJoin(inventTrans.inventDimId, inventDim, _inventDimCriteria, inventDimParmFinancial) Во первых, похоже что авторы кода забыли что маркировка используется не только для себестоимости, но и для резервирования в заказанных и манипуляций со сводным планом. (Собственно мы и налетели на эту проблему, после того как я консам посоветовал менять маркировку чтобы повлиять на покрытие в сводном плане). Во вторых - даже для рассчета себестоимости по модели стандартной себестоимости, маркировка безвредна. В момент вычисления мгновенной себестоимости списания, маркировка игнорируется; Закрытие и пересчет аналогично игнорируют номенклатуру со стандартной себестоимости. Ну и вообще - уже очень и очень давно напрашивается разделение маркировки для себестоимости и маркировки для сводного/планирования. |
|
03.04.2015, 14:53 | #4 |
Участник
|
Последнее надо бы на Connect и всем миром за это проголосовать.
__________________
Ivanhoe as is.. |
|
22.04.2015, 03:36 | #5 |
NavAx
|
DAX2012R3CU8, \Classes\SubledgerJournalizer\validateSubledgerJournalAccountEntry
X++: mainAccount = null; // consider adding a cache if (mainAccount == null) { ... }
__________________
Isn't it nice when things just work? |
|
22.04.2015, 10:46 | #6 |
Участник
|
AX3.0 SP4
Данный код при компиляции вызывает ошибку "Переполнение во внутреннем стеке компилятора". Помогает разбиение на несколько маленьких контейнеров, которые надо сложить между собой, чтобы получить большой контейнер. До 48 элементов компилятор проглатывает, на 49-м спотыкается. X++: //какие поля копировать из плательщика в филиалы static container fieldsToCopy() { ; return [ fieldNum(CustTable, INN_RU), fieldNum(CustTable, CodeOKDP_RU), fieldNum(CustTable, CodeOKPO_RU), fieldNum(CustTable, OKATO_RU), fieldNum(CustTable, KPP_RU), fieldNum(CustTable, GM_OKONH), fieldNum(CustTable, GM_SortIncorporatedId), fieldNum(CustTable, GM_Partner_Vend), fieldNum(CustTable, GM_Partner_Producer), fieldNum(CustTable, GM_Partner_Carrier), fieldNum(CustTable, GM_Partner_Cust), fieldNum(CustTable, GM_IsInventLocation), fieldNum(CustTable, CustItemGroupId), fieldNum(CustTable, GM_UnionPartnerPriceId), fieldNum(CustTable, GM_UnionStatusGroupId), fieldNum(CustTable, Address), fieldNum(CustTable, GM_ManagerCustomerId), fieldNum(CustTable, zBankAccountId), fieldNum(CustTable, zPrintAccount), fieldNum(CustTable, PaymTermId), fieldNum(CustTable, PaymDayId), fieldNum(CustTable, BankAccount), fieldNum(CustTable, TaxItemGroupPrepayment), fieldNum(CustTable, TaxGroupPrepayment), fieldNum(CustTable, PostingProfilePrepayment), fieldNum(CustTable, GM_VolumePurchId), fieldNum(CustTable, GM_PriorityCustomerId), fieldNum(CustTable, GM_CalcInventLocation), fieldNum(CustTable, GM_DeliveryType), fieldNum(CustTable, GM_IsVat), fieldNum(CustTable, GM_AddMarking), fieldNum(CustTable, GM_PrintCertificate), fieldNum(CustTable, zCFOId), fieldNum(CustTable, GM_FactureNotMake), fieldNum(CustTable, zPartnerStatus), fieldNum(CustTable, GM_VendNumNet), fieldNum(CustTable, zSalesPart), fieldNum(CustTable, zFactureCorrection), fieldNum(CustTable, zFactureAutoPrintChanged), fieldNum(CustTable, zFactureNotAutoPrintReturnChanged), fieldNum(CustTable, zFactureKeepVersions), fieldNum(CustTable, zInventPalletTypeCust), fieldNum(CustTable, zCPPCheckEnable), fieldNum(CustTable, zOGRN), fieldNum(CustTable, zRegistrationDate), fieldNum(CustTable, zRegistrationPlace), fieldNum(CustTable, zPrintReturnForClient), fieldNum(CustTable, Blocked), fieldNum(CustTable, zJunkByDeliveryPrice) ]; } Последний раз редактировалось Ace of Database; 22.04.2015 в 10:50. |
|
22.04.2015, 11:30 | #7 |
Участник
|
|
|
|
За это сообщение автора поблагодарили: mazzy (2), Ace of Database (1). |
14.05.2015, 14:23 | #8 |
Участник
|
AX 2012 R2 CU7, \Classes\LedgerUtils_RU\createLedgerTransStorno_RU
X++: /// Creates storno ledger transactions based on _transDate, _voucher parameters. public static void createLedgerTransStorno_RU( LedgerVoucherObject _voucherObject, TransDate _transDate, Voucher _voucher, TaxTransGeneralJournalAccountEntry _taxLinks = null, LedgerPostingType _ledgerPostingType = LedgerPostingType::None) // ... while select RecId from localSubledgerVoucherGeneralJournalEntry where localSubledgerVoucherGeneralJournalEntry.Voucher == _voucher && localSubledgerVoucherGeneralJournalEntry.VoucherDataAreaId == curext() && localSubledgerVoucherGeneralJournalEntry.AccountingDate == _transDate join RecId, PostingLayer, JournalCategory from localGeneralJournalEntry // ... _voucherObject.parmPostingLayer(localGeneralJournalEntry.PostingLayer); _voucherObject.parmJournalCategory(localGeneralJournalEntry.JournalCategory); _voucherObject.addTrans(ledgerVoucherTransObject); |
|
|
За это сообщение автора поблагодарили: Logger (3). |
05.06.2015, 05:41 | #9 |
Участник
|
Форма SysRecordInfo метод buildForm:
X++: ... showAllFieldsForm = new Form(); showAllFieldsForm.name('_ShowAllRecords_'+dictTable.name()); ... Правда на R3 уже починили. |
|
|
За это сообщение автора поблагодарили: S.Kuskov (2). |
23.06.2015, 00:52 | #10 |
Участник
|
Форма SystemDate метод init()
X++: ... //Handle security explicit as the form can be started from the status bar switch (sysDictMenu.rights()) { case AccessType::NoAccess: throw error("@SYS57330"); case AccessType::View: element.form().design().control(identifierstr(newdate)).allowEdit(false); break; } ... |
|
|
За это сообщение автора поблагодарили: Bergman (1). |
09.09.2015, 14:23 | #11 |
Молодой, подающий надежды
|
Ax2012 R3
Класс PriceDiscSmartRounding X++: boolean checkRoundingRuleOK()
{
boolean ok = true;
infolog.clear(0);
...
__________________
Кононов Пётр |
|
|
За это сообщение автора поблагодарили: gl00mie (3). |
03.07.2015, 17:07 | #12 |
Участник
|
AX 2012 R2 CU7, \Classes\InventCostItemDimSecCur_RU\updateReceiptAdjustmentTrans
X++: if (adjustment && (abs(adjustment) < inventClosing.MinTransferValue || (_receipt.CostAmountSecCurAdjustment_RU - _adjustmentLater == 0 && Currency::amount(_receipt.CostAmountSettledSecCur_RU / _receipt.QtySettled) == Currency::amount(costAmount / _receipt.QtySettled)))) { if (! this.financialOpenQty(_receipt)) { this.createErrorAdjustment(_receipt, -adjustment); } adjustment = 0; } |
|
03.07.2015, 21:46 | #13 |
Участник
|
WHSWorkExecuteDisplay*
как можно было купить такой код? :facepalm: |
|
|
За это сообщение автора поблагодарили: kashperuk (1). |
03.08.2015, 23:39 | #14 |
Участник
|
интересно, зачем могла понадобиться такая магия?
X++: #define.7(7) #define.8(8) #define.15(15) |
|
|
За это сообщение автора поблагодарили: S.Kuskov (2). |
03.08.2015, 23:49 | #15 |
Участник
|
|
|
02.09.2015, 17:23 | #16 |
Британский учённый
|
LogisticsAddresssCity
__________________
Людям физического труда для восстановления своих сил нужен 7-8 часовой ночной сон. Людям умственного труда нужно спать часов 9-10. Ну а программистов будить нельзя вообще. |
|
09.09.2015, 12:33 | #17 |
Участник
|
|
|
|
За это сообщение автора поблагодарили: Maxim Gorbunov (2). |
09.09.2015, 12:42 | #18 |
Британский учённый
|
Похоже, класс для взрослых
X++: class SysVersionControlInfo { #define.xxx('xxx') }
__________________
Людям физического труда для восстановления своих сил нужен 7-8 часовой ночной сон. Людям умственного труда нужно спать часов 9-10. Ну а программистов будить нельзя вообще. |
|
17.09.2015, 07:16 | #19 |
Участник
|
Может было уже 2012 RTM
class PriceDiscAdmCheckPost method run X++: warningsFound = this.checkJournal(_acceptWarnings); postJournal = (warningsFound && _acceptWarnings) || !infologLine(); X++: priceDiscAdmTrans.validateWrite(); if (oldValue != infolog.num()) { while (oldValue < infolog.num()) { oldValue++; priceDiscAdmTrans.Log = priceDiscAdmTrans.Log + infolog.text(oldValue)+'\n'; errorsFound = true; } } |
|
07.03.2016, 10:20 | #20 |
Участник
|
RunBaseBatch.prepareForRun
X++: ... // the following if statement tests if the control is an I/O type // control. It would be better if there was support of static methods // from the controls team to do this, but there isn't, so the test is inline if ( control is FormBuildButtonControl || control is FormBuildCheckBoxControl || control is FormBuildComboBoxControl || control is FormBuildCommandButtonControl || control is FormBuildDateControl || control is FormBuildDateTimeControl || control is FormBuildDropDialogButtonControl || control is FormBuildFilterPaneControl || control is FormBuildFunctionButtonControl || control is FormBuildGridControl || control is FormBuildGuidControl || control is FormBuildHTMLControl || control is FormBuildIntControl || control is FormBuildInt64Control || control is FormBuildListBoxControl || control is FormBuildListControl || control is FormBuildManagedHostControl || control is FormBuildMenuButtonControl || control is FormBuildProgressControl || control is FormBuildRadioControl || control is FormBuildRealControl || control is FormBuildReferenceGroupControl || control is FormBuildRichTextControl || control is FormBuildSegmentedEntryControl || control is FormBuildStaticTextControl || control is FormBuildStringControl || control is FormBuildTableControl || control is FormBuildTimeControl || control is FormBuildTreeControl) { return; } .... |
|