Process Payroll and custom scripts on salary slip

I have a custom client side script for the salary slip form. The script modifies some fields’ values that get used to calculate things like gross pay. I’m assuming if I use the process payroll tool to generate payslips the script won’t be used. Is that accurate?

Thanks.

I’m in Canada and I’m interested in any topic here about payroll.

Hello,

Client Side Custom Scripts are executed when creating transaction using front end. If Salary Slips are being created from Process Payroll, then custom script will not be executed.

If custom script is for server side, then it will be executed when create Salary Slip from Process Payroll.

@gemlog1 welcome to erpnext community!

1 Like

thanks. I have my own (os) payroll source code for canada (except Quebec), so that’s why I’m so interested. I let it fall off for the past two years due to personal issues, but it’s easily updated and in python. Canada is fairly simple really. The UK is a nightmare. I tried once. Never again – and I was born in the UK.

Actually, it’s rather juvenile python code, because I chose it as a ‘previously solved problem’ in order to learn python about 15 yrs ago. I don’t know that I’ve really progressed very much as a python coder since then really, but the canadian government audited it every year until I stopped, so it was compliant. I’d love to update it and integrate it with erpnext. Just to spite simply/sage’s business model if nothing else! :wink: It’s a crime to charge so much for payroll changes each year when those actual code changes only take 5-6 hours (at most) twice a year. It’s also a crime (imo) to limit how many people can connect to a mysql/maria db server.

Those two things are the entirety of their business model: use double-entry accounting (free since its invention in Venice), use an open-source db, but cripple connections and charge for payroll updates. ErpNext does the first two already.

@gemlog1, run through the frappe tutorial.

Post any issues if you face, would love to help anything open source :smile:

Thanks for the info. I was just figuring out how to add attendance information to a salary slip, as well as implementing some sort of hacky way of doing hourly wages. Was pretty easy using client side scripting. My python skills are lacking, but transitioning hasn’t been too complicated.

1 Like

hi Kar_m,
Were you successful?

I’d say yes, but it’s more of a hack. Are you asking about hourly wages or how to add attendance information to a salary slip? Our setup right now is mostly hard coded. I had a difficult time figuring out how to design it as a feature.