Quintiq file version 2.0 #parent: #root Method EnableDisableComponent ( Boolean isbatchedit ) id:Method_DialogCreateEditInventorySupply_EnableDisableComponent { #keys: '[105706.1.439166160]' Body: [* // Enable disable components if( isbatchedit ) { SelectionProduct.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( 'stocking point' ) ); SelectionStockingPoint.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( 'product' ) ); GUIDateTimeSelectorDate.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( 'start date' ) ); GUIDateTimeSelectorManufacturedDate.DisableWithUserFeedback( Translations::MP_Designer_DisableSelectorForBatchEdit( 'manufactured date' ) ); } else { product := SelectionProduct.Data(); hasshelflife := guard( product.HasShelfLife() or product.HasMaturation(), false ); GUIDateTimeSelectorManufacturedDate.Enabled( hasshelflife ); data := Dialog.Data(); // set default to inventory supply date if ( hasshelflife and not isnull( data ) and data.ManufacturedDate().IsInfinite() ) { Dialog.Data().ManufacturedDate( data.Date() ); } } EditorQuantity.Enabled( not isbatchedit or( isbatchedit and CheckBoxBatchEditQuantity.Checked() ) ); EditorDescription.Enabled( not isbatchedit or( isbatchedit and CheckBoxBatchEditDescription.Checked() ) ); *] }