yypsybs
2023-09-20 ac97b8878764d0e9e8e8e3c177e385864cee616c
_Main/BL/Type_CapacityAndSaleBudgeCompareItemRow/StaticMethod_CreateIfNotExist.qbl
@@ -3,15 +3,15 @@
StaticMethod CreateIfNotExist (
  ScenarioManager scenarioManager,
  String businessType,
  String orgCode
  String placeOfProductionOfArray
) as CapacityAndSaleBudgeCompareItemRow
{
  TextBody:
  [*
    // yypsybs Sep-18-2023 (created)
    value := select( scenarioManager, CapacityAndSaleBudgeCompareItemRow, row, row.BusinessType() = businessType and row.OrgCode() = orgCode );
    value := select( scenarioManager, CapacityAndSaleBudgeCompareItemRow, row, row.BusinessType() = businessType and row.PlaceOfProductionOfArray() = placeOfProductionOfArray );
    if( isnull( value ) ) {
      value := scenarioManager.CapacityAndSaleBudgeCompareItemRow( relnew, BusinessType := businessType, OrgCode := orgCode );
      value := scenarioManager.CapacityAndSaleBudgeCompareItemRow( relnew, BusinessType := businessType, PlaceOfProductionOfArray := placeOfProductionOfArray );
    } 
    return value;
  *]