lazhen
2025-01-09 8afe90b633046db39042aada36b88193062f8cff
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Quintiq file version 2.0
#parent: #root
Method UISetLabelLotSize (
  Boolean isInit,
  UnitOfMeasure_MP uomScrValue
) id:Method_DialogCreateEditPISPSpecification_UISetLabelLotSize
{
  #keys: '[135040.0.226033806]'
  Body:
  [*
    // Set labels lot size for different uom selection.
    // ***uomScreenValue has to be an argument because getting it inside this method directly causing error (via DropDownListUOM.Data())
    /*
    //todo!! set UOM warning image
    //few limitation faced now, hence, skip this features:
    //1. No 'image' component available to be used (Quintiq NB171804 )
    //
    */
    
    pisp     := DataHolderDialogData.Data().WrappedInstance();
    pispspec := guard( pisp.PISPSpecification(), null( PISPSpecification ) );
    
    hasuom := guard( pispspec.HasUnitOfMeasure(), false );
    uom    := ifexpr( hasuom, 
                      pisp.UnitOfMeasure_MP(), 
                      pisp.Product_MP().UnitOfMeasure_MP() );
    
    uomDataValue   := guard( uom.Name(), "" );
    uomScreenValue := guard( uomScrValue.Name(), "" );
    uomValue := ifexpr( isInit,
                        uomDataValue,
                        uomScreenValue );
    EditFieldInputLotSizeUOM.Label( Translations::MP_Designer_DialogCreateEditPISPSpecificationWeb_SetLabelInputLotSize( uomValue ) );
  *]
}