fix: manually generated salary slips overwritten by structure amount (#31711)

This commit is contained in:
Rucha Mahabal
2022-07-27 12:44:26 +05:30
committed by GitHub
parent 4f023757de
commit 32c1bb61de

View File

@@ -632,7 +632,11 @@ class SalarySlip(TransactionBase):
continue
amount = self.eval_condition_and_formula(struct_row, data)
if amount is not None and struct_row.statistical_component == 0:
if (
amount
or (struct_row.amount_based_on_formula and amount is not None)
and struct_row.statistical_component == 0
):
self.update_component_row(struct_row, amount, component_type, data=data)
def get_data_for_eval(self):