@@ -26,7 +26,10 @@ def test_recurring_additional_salary(self):
2626 emp_id = make_employee ("test_additional@salary.com" )
2727 frappe .db .set_value ("Employee" , emp_id , "relieving_date" , add_days (nowdate (), 1800 ))
2828 salary_structure = make_salary_structure (
29- "Test Salary Structure Additional Salary" , "Monthly" , employee = emp_id
29+ "Test Salary Structure Additional Salary" ,
30+ "Monthly" ,
31+ employee = emp_id ,
32+ from_date = add_days (nowdate (), - 50 ),
3033 )
3134 add_sal = get_additional_salary (emp_id )
3235
@@ -44,7 +47,10 @@ def test_disabled_recurring_additional_salary(self):
4447 emp_id = make_employee ("test_additional@salary.com" )
4548
4649 salary_structure = make_salary_structure (
47- "Test Salary Structure Additional Salary" , "Monthly" , employee = emp_id
50+ "Test Salary Structure Additional Salary" ,
51+ "Monthly" ,
52+ employee = emp_id ,
53+ from_date = add_days (nowdate (), - 50 ),
4854 )
4955 add_sal = get_additional_salary (emp_id )
5056 ss = make_employee_salary_slip (emp_id , "Monthly" , salary_structure = salary_structure .name )
@@ -149,8 +155,13 @@ def _get_tds_component(doc) -> dict:
149155
150156 def test_validate_duplicate_or_overlapping_additional_salary (self ):
151157 emp_id = make_employee ("test_additional@salary.com" )
152- make_salary_structure ("Test Salary Structure Additional Salary" , "Monthly" , employee = emp_id )
153158 date = nowdate ()
159+ make_salary_structure (
160+ "Test Salary Structure Additional Salary" ,
161+ "Monthly" ,
162+ employee = emp_id ,
163+ from_date = add_days (date , - 50 ),
164+ )
154165 get_additional_salary (emp_id , overwrite_salary_structure = 1 )
155166 additional_salary_doc = frappe .get_doc (
156167 {
0 commit comments