Skip to content

Commit ff9dd89

Browse files
Merge pull request #14 from California-Data-Collaborative/budgetFix
throws error if budget is in wrong order
2 parents 2508f2f + 5db1167 commit ff9dd89

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

R/rateParser.R

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@ add_rate_part_to_frame <- function(df, name, name_list, class_rate, cust_class){
9797
if(name=="commodity_charge"){
9898
stopif(!(("tier_starts" %in% names(df))), "object 'tier_starts' not found")
9999
stopif(!(("tier_prices" %in% names(df))), "object 'tier_prices' not found")
100+
stopif(!(("budget" %in% names(df)))&&rate_type=='Budget', "object 'budget' not found")
100101

101102
variable_bills <- df %>% group_by(tier_starts, tier_prices) %>%
102103
do(calculate_variable_bill(., rate_type)) %>%

0 commit comments

Comments
 (0)