pub fn pay_in_force_for_level_and_step(&self, level: i32, step: i32) -> Option<&i32> {
        
        let payscale = self.pay_scales.iter().find(|p| p.level == level);

        let payscale = match payscale {
            Some(p) => p,
            None => return None
        };
        
        // get current date and structure for PartialOrd
        let today: DateTime<Local> = Local::now();
        let today: NaiveDate = NaiveDate::from_ymd(
            today.year(), 
            today.month(), 
            today.day());

        let target_rate = check_active_pay_rate(&payscale.rates_of_pay, today);

        let current_salary = target_rate.salary.get(step as usize -1);
        
        current_salary
    }
/// Directly returns the today's in force salary for a level and step within the group
/// without needing to access pay scales and rates of pay.
/// Accepts level and step as integers as arguments.
Directly returns the today's in force salary for a level and step within the group
without needing to access pay scales and rates of pay.
Accepts level and step as integers as arguments.
Directly returns the today ' s in force salary for a level and step within the group without needing to access pay scales and rates of pay . Accepts level and step as integers as arguments .
pub fn pay_in_force_for_level_and_step(&self, level: i32, step: i32) -> Option<&i32> {
        let payscale = self.pay_scales.iter().find(|p| p.level == level);
        let payscale = match payscale {
            Some(p) => p,
            None => return None
        };
        // get current date and structure for PartialOrd
        let today: DateTime<Local> = Local::now();
        let today: NaiveDate = NaiveDate::from_ymd(
            today.year(), 
            today.month(), 
            today.day());
        let target_rate = check_active_pay_rate(&payscale.rates_of_pay, today);
        let current_salary = target_rate.salary.get(step as usize -1);
        current_salary
    }
pub fn pay_in_force_for_level_and_step ( & self , level : i32 , step : i32 ) -> Option < & i32 > { let payscale = self . pay_scales . iter ( ) . find ( | p | p . level == level ) ; let payscale = match payscale { Some ( p ) => p , None => return None } ; // get current date and structure for PartialOrd let today : DateTime < Local > = Local :: now ( ) ; let today : NaiveDate = NaiveDate :: from_ymd ( today . year ( ) , today . month ( ) , today . day ( ) ) ; let target_rate = check_active_pay_rate ( & payscale . rates_of_pay , today ) ; let current_salary = target_rate . salary . get ( step as usize - 1 ) ; current_salary }
Directly returns the today's in force salary for a level and step within the group
without needing to access pay scales and rates of pay.
Directly returns the today ' s in force salary for a level and step within the group without needing to access pay scales and rates of pay .
&self
level
i32
step
i32