| Quintiq file version 2.0 | 
| #parent: #root | 
| Function CalcParentUnitPeriodConversionFactor | 
| { | 
|   TextBody: | 
|   [* | 
|     // vmpm Feb-27-2017 (created) | 
|     value := 1.0; | 
|      | 
|     parentuom := this.ParentOfUnitDimension(); | 
|      | 
|     if( not isnull( parentuom ) | 
|         and parentuom.Unit().HasUnitOfMeasure() | 
|         and this.Unit().HasUnitOfMeasure() ) | 
|     { | 
|       value := guard( this.Unit().UnitOfMeasure_MP().GetConversionFactor( parentuom.Unit().UnitOfMeasure_MP(), | 
|                                                                           null( Product_MP ) ), | 
|                                                                           1.0 ); | 
|     } | 
|      | 
|     this.ParentUnitPeriodConversionFactor( value ); | 
|   *] | 
| } |