A formula calculating a statistical salary component in HRMS v16.52.0 not working

I just upgraded Frappe HRMS from v16.17.1 to v16.52.0. Salary slip generation which was working fine for the last one year is now not calculating a couple of statistical components based on a formula. For eg. one formula is “2083 if ((B + DA) > 25000) else round((B + DA) * 0.0833)” where B=Basic and DA=Dearness Allowance. The result is now 0. I tried creating a new component with the same details and created a new Salary structure and amended the assignment but the result was the same. Is this a known problem or am I missing something here? Any help will be greatly appreciated.

I forgot to add above that the above problem is happening to new employees for whom I had to create Salary structures /assignments. For the older employees the components are calculating fine.

You may want to check to make sure the formula is reflected in the new Salary Structure doc. Find the statistical component, click the pencil icon, expand Condition and formula. Also, double-check to make sure DA is present and defined in the new salary structure doc.

To troubleshoot, you could simplify those statistical components that are incorrect zeros and change them to a constant number, like “1” and test to see if it is non-zero. Then add your “B” variable with some simple, non-conditional arithmetic, test it and make sure it calculates correctly. Then try adding your DA variable back in with non-conditional arithmetic and make sure it calculates correctly. Then try adding your conditional statement back in. Basically, start with the simplest possible formula and add the complexity back in one step at a time to see where it breaks to narrow it down.