HR: statistical_component when enabled does keep the record until next Employee

Hi all,
If you have statistical_component selected and you need that component value for another calculation the value will not be set when looking for the next component if the same component_type or different.
As example:
SB = 1333
SC(statistical_component variable) = 1000
tax = SC * 0.03 (will return ZERO because the SC will be created before but when comes to this component on the Data list is ZERO).
I have done a fix but still need to fix the Statistical components from the List of Earnings and Deductions…
My temp fix from " def eval_condition_and_formula(self, d, data): ":
if amount:
#Helkyds
if d.statistical_component == 1:
component_type = ‘earnings’ if frappe.get_doc(‘Salary Component’,d.salary_component).type == ‘Earning’ else ‘deductions’
print('componenttype ',component_type)
print('self._salary_structure_doc ',self._salary_structure_doc.name)
_salary_structure_doc = frappe.get_doc(‘Salary Structure’, self._salary_structure_doc.name)

				for struct_row in self._salary_structure_doc.get(component_type):
					#amount = self.eval_condition_and_formula(struct_row, data)
					print('update_component_row')
					print(struct_row.abbr)
					print(component_type)
					if struct_row.abbr == d.abbr:
						if amount and struct_row.statistical_component == 1:
							self.update_component_row(struct_row, amount, component_type)

			####				
			data[d.abbr] = amount

A feedback from the group from someone having the same issue would be good.
Thanks