Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable metering option from IPH commercial models. #1943

Merged
merged 2 commits into from
Dec 9, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion deploy/runtime/defaults/MSLF IPH_Commercial.json
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great - Buy all / Sell all and allowing hourly/subhourly buy rates
image

"ur_monthly_fixed_charge": 0.0,
"ur_monthly_min_charge": 0.0,
"ur_name": "",
Expand Down
2 changes: 1 addition & 1 deletion deploy/runtime/defaults/MSLF IPH_Single Owner.json
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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": "",
Expand Down
16 changes: 14 additions & 2 deletions deploy/runtime/startup.lk
Original file line number Diff line number Diff line change
Expand Up @@ -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'});
Expand Down Expand Up @@ -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'});
Expand Down
2 changes: 1 addition & 1 deletion deploy/runtime/ui/Utility Rate - Energy Charge.json
Original file line number Diff line number Diff line change
Expand Up @@ -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;",
Expand Down
32 changes: 23 additions & 9 deletions deploy/runtime/ui/Utility Rate - Flat.json
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down Expand Up @@ -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}",
Expand All @@ -1771,19 +1785,19 @@
"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",
"\tenable( 'ur_nb_credit_expire', eme==3 );\r",
"\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}",
Expand Down Expand Up @@ -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",
Expand Down
Loading