Show Salary Component with zero value

Hi,

By default in ERPNext, Salary Components with zero value are not shown in the Salary Slip. A number of organizations however prefer that some components appear in the Salary Slip even when they have zero value

Is there any way to set this currently?

Kind regards,

I have the same issue

I have created a Github issue here:

Kind regards,

Still no progress on this?

I have employees with one earning compnent and no deduction. I’d like to show income tax as zero rather than blank. Payslip doesn’t look complete:

You can do that in the Print Format no? Use an HTML/CSS Print format and you can do this fairly easily.

Hope this helps.

Thanks

Jay

Hi JayRam,

Not all users have a zero income tax deduction. Those with basic above a certain amount are not a problem as the income tax deduction will show.

The challenge is users below the IT threshold.

I understand. The HTML Print format can be designed in such a way that the Income Tax Deduction shows for all uses. If there is a value in the Salary Slip, that value is fetched and reported/printed. If there is no entry for Income Tax Deduction, this line item still shows in the PDF, Print Format, but shows with a 0 value.

Hope this helps.

Thanks

Jay

Thanks, I’ll explore this.

If you’re looking for a more structural approach, the relevant line in the code is here:

Removing the words amount and should print the component even if the value is zero. Better yet, you could create a setting in the component definition that would make printing if zero an option.