Hourly Payroll Calculation


i just wondering where i can found list of available hooks ?

and can i overide erpnext method using hooks , for example i want to change payroll system from daily to be hourly


the default hooks.py file has most of the available hooks commented.

For building core functionality, you should fork erpnext. You can add the option in HR Settings.

Hi Metha,

thanks, so the hooks is just, on_submit,on_update,on_cancel,validate ? i see that in doctype hooks in erpnext/hooks.py

permission_query_conditions,has_permission what was that for?

for the feature i would like to try to build the hourly payroll system i planned to add custom filed in HR payroll , so i can define the hourly rate for each of the employee , but is this possible ?
for now i assume that i should create on_update on salary slip doc_type that i need to add the ammount of sallary

anyway i want to clarify , is the hooks called after or before erpnext core function?..or it is overide it?


Hooks are available on all document events and are called after the event.

For your functionality, you should build the feature inside ERPNext.

But i cant do that right?

because i think hourly payrolls is not happens in standard companies , it is just in my case, how you suggest i should do?

because what im lacking is the hourly payroll system and multi currency (im wating that in v5 , hope it can be used soon)


You should make it in standard product as an option.

If payroll is by hours, then calculate from time logs.

but inmy case there is severalpoint forthe payroll calcualtion:
each employee has:

  1. monthly payment or base payment
  2. hourly payment
  3. overtime hourly payment
  4. overtime dinner
  5. attendance bonus (this is monthly and we need to deduct this value as the employee is not present )

if im going to separate this with using time logs, than i need to do the job twice?
and actually im using the time log for manufacturing costing now, so its kinda strage to use it too payroll too

how is it?


You can have different type of time logs. But your call!