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
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.
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.