Salary based on timesheet and piece rate

I have started using erpnext this year and the biggest issue i have seen when it comes to payroll is salary based on time sheet where the issue is:

  1. You cant have normal hours and overtime calculated from time sheet if both of the components have different rates, I believe in most Jurisdictions the law requires different rates for overtime. My suggestion would be very simple on the time sheet have two fields, one for normal hours and the other for overtime, if the total hours exceeds a certain number then the extra hours are recorded as overtime. and have the salary structure account for this.

The other issue is you cant record number of pieces an employee produces and base your salary on this. In manufacturing a lot of employees are paid using this model…

Lastly there is no way to advance salary to an employee and have the advance deduct at the end of the month.

if ERPNEXT implements this it will the perfect erp there is, but this is just my opinion i’m open for any suggestion.