diff --git a/deploy/runtime/defaults/MSLF IPH_Commercial.json b/deploy/runtime/defaults/MSLF IPH_Commercial.json index 91f6af274..3bc0fa085 100644 --- a/deploy/runtime/defaults/MSLF IPH_Commercial.json +++ b/deploy/runtime/defaults/MSLF IPH_Commercial.json @@ -19995,7 +19995,7 @@ ], "ur_has_unused_items": 0.0, "ur_is_default": 0.0, - "ur_metering_option": 0.0, + "ur_metering_option": 4.0, "ur_monthly_fixed_charge": 0.0, "ur_monthly_min_charge": 0.0, "ur_name": "", diff --git a/deploy/runtime/defaults/MSLF IPH_Single Owner.json b/deploy/runtime/defaults/MSLF IPH_Single Owner.json index e48392a50..0cda3eb9b 100644 --- a/deploy/runtime/defaults/MSLF IPH_Single Owner.json +++ b/deploy/runtime/defaults/MSLF IPH_Single Owner.json @@ -11233,7 +11233,7 @@ ], "ur_has_unused_items": 0.0, "ur_is_default": 0.0, - "ur_metering_option": 0.0, + "ur_metering_option": 4.0, "ur_monthly_fixed_charge": 0.0, "ur_monthly_min_charge": 0.0, "ur_name": "", diff --git a/deploy/runtime/defaults/Physical Trough IPH_Single Owner.json b/deploy/runtime/defaults/Physical Trough IPH_Single Owner.json index d9585f01f..83671aea9 100644 --- a/deploy/runtime/defaults/Physical Trough IPH_Single Owner.json +++ b/deploy/runtime/defaults/Physical Trough IPH_Single Owner.json @@ -12833,7 +12833,7 @@ ], "ur_has_unused_items": 0.0, "ur_is_default": 0.0, - "ur_metering_option": 0.0, + "ur_metering_option": 4.0, "ur_monthly_fixed_charge": 0.0, "ur_monthly_min_charge": 0.0, "ur_name": "", diff --git a/deploy/runtime/startup.lk b/deploy/runtime/startup.lk index a755c18aa..ef5f2fbd7 100644 --- a/deploy/runtime/startup.lk +++ b/deploy/runtime/startup.lk @@ -1078,7 +1078,13 @@ addpage( [[ 'Financial Debt Min DSCR', { 'sidebar'='Financial Parameters','help'='fin_commercial'} ); addpage( [[ 'Financial Tax Credits IPH','Financial Cash Incentives IPH']], { 'sidebar'='Incentives', 'help'='incentives' } ); -setup_utility_rate(); +addpage( [[ 'Utility Rate - Flat', + { 'name'='Utility Rate - Description', 'caption'='Description and Applicability', 'collapsible'=true, 'collapsible_var'='ur_desc_is_shown', 'collapsed_by_default'=true }, + { 'name'='Utility Rate - Energy Charge', 'caption'='Energy Charges', 'collapsible'=true, 'collapsible_var'='ur_ec_is_shown', 'collapsed_by_default'=false }, + { 'name'='Utility Rate - Billing Demand', 'caption'='Billing Demand', 'collapsible'=true, 'collapsible_var'='ur_billing_demand_is_shown', 'collapsed_by_default'=true }, + { 'name'='Utility Rate - Demand Charge', 'caption'='Demand Charges', 'collapsible'=true, 'collapsible_var'='ur_dc_is_shown', 'collapsed_by_default'=false }, + { 'name'='Utility Rate - Unused', 'caption'='Unused Items', 'collapsible'=true, 'collapsible_var'='ur_unused_is_shown', 'collapsed_by_default'=true },]], + { 'sidebar'='Electricity Purchases', 'help'='electricity_purchases' } ); setup_elec_load_page( LOAD_SIMPLE ); addpage( [[ 'Thermal Rate IPH' ]], {'sidebar' = 'Thermal Rates','help' = 'thermal_rates'}); @@ -2357,7 +2363,13 @@ addpage( [[ 'Financial Debt Min DSCR', { 'sidebar'='Financial Parameters','help'='fin_commercial'} ); addpage( [[ 'Financial Tax Credits IPH','Financial Cash Incentives IPH']], { 'sidebar'='Incentives', 'help'='incentives' } ); -setup_utility_rate(); +addpage( [[ 'Utility Rate - Flat', + { 'name'='Utility Rate - Description', 'caption'='Description and Applicability', 'collapsible'=true, 'collapsible_var'='ur_desc_is_shown', 'collapsed_by_default'=true }, + { 'name'='Utility Rate - Energy Charge', 'caption'='Energy Charges', 'collapsible'=true, 'collapsible_var'='ur_ec_is_shown', 'collapsed_by_default'=false }, + { 'name'='Utility Rate - Billing Demand', 'caption'='Billing Demand', 'collapsible'=true, 'collapsible_var'='ur_billing_demand_is_shown', 'collapsed_by_default'=true }, + { 'name'='Utility Rate - Demand Charge', 'caption'='Demand Charges', 'collapsible'=true, 'collapsible_var'='ur_dc_is_shown', 'collapsed_by_default'=false }, + { 'name'='Utility Rate - Unused', 'caption'='Unused Items', 'collapsible'=true, 'collapsible_var'='ur_unused_is_shown', 'collapsed_by_default'=true },]], + { 'sidebar'='Electricity Purchases', 'help'='electricity_purchases' } ); setup_elec_load_page( LOAD_SIMPLE ); addpage( [[ 'Thermal Rate IPH' ]], {'sidebar' = 'Thermal Rates','help' = 'thermal_rates'}); diff --git a/deploy/runtime/ui/Utility Rate - Energy Charge.json b/deploy/runtime/ui/Utility Rate - Energy Charge.json index e3da99499..74006463a 100644 --- a/deploy/runtime/ui/Utility Rate - Energy Charge.json +++ b/deploy/runtime/ui/Utility Rate - Energy Charge.json @@ -1182,7 +1182,7 @@ "// can happen via LK script or URDB rate download", "function check_fom_sell_rates()", "{", - "\tif ( is_fom_bool() || is_merchant_plant() )", + "\tif ( is_fom_bool() || is_merchant_plant() || is_iph())", "\t{", "\t\tx = value('ur_ec_tou_mat');", "\t\tis_sell_rate = false;", diff --git a/deploy/runtime/ui/Utility Rate - Flat.json b/deploy/runtime/ui/Utility Rate - Flat.json index fc9394443..ea8447273 100644 --- a/deploy/runtime/ui/Utility Rate - Flat.json +++ b/deploy/runtime/ui/Utility Rate - Flat.json @@ -1712,6 +1712,20 @@ "\tis_mp = financing() == \"Merchant Plant\";", "\treturn (is_mp);", "}", + "\r", + "function is_iph()\r", + "{\r", + "\ttech = technology();\r", + "\tis_iph_bool = false;\r", + "\tif (tech == \"Physical Trough IPH\"\r", + "\t\t\t|| tech == \"MSPT IPH\"\r", + "\t\t\t|| tech == \"MSLF IPH\"\r", + "\t\t\t|| tech == \"DSGL IPH\")\r", + "\t{\r", + "\t\tis_iph_bool = true;\r", + "\t}\r", + "\treturn is_iph_bool;\r", + "}\r", "", "// set inputs on Utility Rate - Energy Charge form", "// based on values of inputs on Utility Rate - Flat form", @@ -1741,11 +1755,11 @@ "\t\t{", "\t\t\tproperty('ur_ec_tou_mat','ShowColumn',4);", "\t\t}", - "\t\tif (en_ts_sell || is_fom_bool() || is_merchant_plant() )", + "\t\tif (en_ts_sell || is_fom_bool() || is_merchant_plant() || is_iph())", "\t\t{", "\t\t\tproperty('ur_ec_tou_mat','HideColumn',5);", "\t\t}", - "\t\telseif ( !is_fom_bool() || !is_merchant_plant() )", + "\t\telseif ( !is_fom_bool() || !is_merchant_plant() || !is_iph())", "\t\t{", "\t\t\tproperty('ur_ec_tou_mat','ShowColumn',5);", "\t\t}", @@ -1771,10 +1785,10 @@ "function set_metering_billing_inputs()", "{\t", "\teme = value('ur_metering_option');", - "\tenable('ur_metering_option', !is_fom_bool() && !is_merchant_plant());", - "\tenable('ur_en_ts_sell_rate', !is_fom_bool() && !is_merchant_plant());", - "\tenable('ur_ts_sell_rate', !is_fom_bool() && !is_merchant_plant());", - "\tshow('lbl_metering_option',is_fom_bool() && !is_merchant_plant());", + "\tenable('ur_metering_option', !is_fom_bool() && !is_merchant_plant() && !is_iph());", + "\tenable('ur_en_ts_sell_rate', !is_fom_bool() && !is_merchant_plant() && !is_iph());", + "\tenable('ur_ts_sell_rate', !is_fom_bool() && !is_merchant_plant() && !is_iph());", + "\tshow('lbl_metering_option',is_fom_bool() && !is_merchant_plant() && is_iph());", "\tenable( 'ur_nm_yearend_sell_rate', eme==0 );", "\tenable( 'ur_nm_credit_rollover', eme==0 );", "\tenable( 'ur_nm_credit_month', eme==0 || eme==1 || eme==3 );\r", @@ -1782,8 +1796,8 @@ "\tenable( 'ur_nb_apply_credit_current_month', eme==3 );", "\tif (eme==2 || eme==3|| eme==4)", "\t{", - "\t\tenable( 'ur_en_ts_sell_rate', !is_fom_bool() && !is_merchant_plant() );", - "\t\tenable( 'ur_ts_sell_rate', value('ur_en_ts_sell_rate') && (!is_fom_bool() && !is_merchant_plant()) );", + "\t\tenable( 'ur_en_ts_sell_rate', !is_fom_bool() && !is_merchant_plant() && !is_iph() );", + "\t\tenable( 'ur_ts_sell_rate', value('ur_en_ts_sell_rate') && (!is_fom_bool() && !is_merchant_plant() && !is_iph()) );", "\t\tenable( 'ur_en_ts_buy_rate', true );", "\t\tenable( 'ur_ts_buy_rate', value('ur_en_ts_buy_rate') );", "\t}", @@ -1934,7 +1948,7 @@ "\tvalue ('ur_annual_min_charge', hash{'annual_min_charge'});", "\t", "\t// metering option", - "\tif ( !is_fom_bool() ) {value('ur_metering_option',hash{'metering_option'});\t}", + "\tif ( !is_fom_bool() && !is_iph()) {value('ur_metering_option',hash{'metering_option'});\t}", "\tvalue( 'ur_dc_enable', hash{'dc_enable'});", "\ton_change{'ur_dc_enable'}(); // invoke callback for ur_ec_enable to set up enable/disable of widgets", "\t",