Hide Salary Component from payslip

I want to include in calculations (salary component), hide on payslip.Please advise if I should be including a hide button on salary component doctype.

Hello @Saditi ,

If you want to hide this in the print, then create a custom print format for salary slip.

After creating the print format click on Edit format option.

It will show you the related fields in the salary slip document.

Then click on the select columns either under earning table or deductions.

Here you can hide any field by unchecking it and then click on update.

Then make this print format as default.

Hope this helps.


Thanks for replying @Sujay,
Actually I want a checkbox in Salary component doctype, so when I click on the box, that particular component will get hidden from salary slip…
Looking forward for your reply.

You can enable ‚ÄúStatistical Component‚ÄĚ for those which you are using for calculations. Also note that you should use this in combination with ‚ÄúDo not include in total‚ÄĚ flag which will omit the value from the earning / deduction total.

Hope this helps, thanks

Thank for replying @akurungadam ,

Using ‚ÄúDo Not Include in Total‚ÄĚ is half solution to my problem as I cannot use ‚ÄúStatistical Component‚ÄĚ because it does not show components while making salary slip also‚Ķ

I just want to hide component from salary slip now.

can you explain

you want to hide component right then it should be hidden

The ‚Äúdo not include in total‚ÄĚ check is in salary_slip file on line 721, I am unable to solve your problem.


If you use ‚ÄúDo not include in total‚ÄĚ, it will not hide the salary component, only that particular component will not be added in the gross total.

@Saditi - This is not a standard feature in ERPNext, although if you have resources then you can contribute.

Hope this helps.


1 Like