21.01.2020, 13:45 | #11 |
Участник
|
Оптимизировал немного кастомный код в плане как производительности, так и удобочитаемости
X++: public Boolean ppoContainerActive(InventDimGroupId _dimGroup) { // > Modified by ---------- ----- (-------@----------------.com), 01-21-2020, zzz_CHG0033895_SFWrkCtrAssignToWasteCode InventDimSetup inventDimSetup; select firstonly RecId from inventDimSetup where inventDimSetup.DimGroupId == _dimGroup && inventDimSetup.Active && inventDimSetup.DimFieldId == fieldnum(InventDim, AFCInventContainerId); return inventDimSetup.RecId != 0; // < Modified by ---------- ----- (-------@----------------.com), 01-21-2020, zzz_CHG0033895_SFWrkCtrAssignToWasteCode //InventDimGroup inventDimGroup; //InventDimSetup inventDimSetup; //Boolean doContainer; //; // //inventDimGroup = InventDimGroup::find(_dimGroup); //while select inventDimSetup where inventDimSetup.dimGroupId == _dimGroup //{ // if (inventDimSetup.Active == NoYes::Yes) // { // if (inventDimSetup.DimFieldId == fieldnum(InventDim, afcInventContainerId)) // { // doContainer = true; // } // } //} // //return doContainer; // < Modified by ---------- ----- (-------@----------------.com), 01-21-2020, zzz_CHG0033895_SFWrkCtrAssignToWasteCode }
__________________
// no comments |
|
|
За это сообщение автора поблагодарили: S.Kuskov (2). |