chenqinghong
2024-05-07 3ec06a830367465068963156dcc1d8e522571c13
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
Quintiq file version 2.0
#parent: #root
StaticMethod DisplayQuantityToProcessValue (
  output String feedback_o,
  PeriodTask_MP periodtask,
  Real quantity
) remote
{
  Description: 'Show the quantity to process for lot size according to quantity to process of unit in the application.'
  TextBody:
  [*
    // soh yee Jun-24-2013 (created)
    
    qtp := periodtask.Process_MP().AsProcess_MP().QuantityToProcess();
    qtpfeedback := Translations::MP_GlobalParameters_OperationInputs();
    decimal := periodtask.Process_MP().AsProcess_MP().MacroPlan().GlobalParameters_MP().NumberOfDecimals();
    
    if( qtp = GlobalParameters_MP::GetQTProcessOut() ) //output with by-product
    {
      qtpfeedback := Translations::MP_GlobalParameters_OperationOutputs();
    }
    
    feedback_o := Translations::MP_PeriodTask_MP_SetQuantityToProcessValue( qtpfeedback, quantity.Round( decimal ) )
                  + String::NewLine();
  *]
}