I’m trying to get the monthly sales made by an Employee/Sales Person/User through his userid/email. I then want to use that data in a doctype and Salary Structure to create a formula for the generation of Salaries for an Employee segment (eg. Employee Grade) based on custom rules based on his monthly sale
Example:
If the monthly sales are> 30,000 for an employee, Salary = 10,000.
If the monthly sales are> 70,000 for an employee, Salary = 20,000 + 50% of Salary
If the monthly sales are> 1,00,000 for an employee, Salary = 30,000 + 45% of Salary
Is that somehow possible in ERPNext? I’m trying but I haven’t been able to figure it out yet. Any guidance on what could be done? I really need this feature.
Every Invoice has a table called Sales Team. You’ll need to ensure that Employee features in that Table. In that way you can get the confirmed invoices by querying that particular table. Later using this list of submitted invoices, you can get the total sales (just add up the net total or whatever total you wish to consider)
Thanks for your kind response. I’m using Version 11 (Would like to go to 12 but no official OVAs are available yet).
I’ve tried that and I was able to get total sales by an employee using a report. But I wish to use that total sales amount (say 50,000) in a Doctype and salary structure formula.
This feature is not readily available in ERPNext. You can add incentive using “Additional Salary Component” feature. You will have to create Additional Salary at the month end, so that it’s added in the Employee’s Salary Slip for that month. https://erpnext.com/docs/user/manual/en/human-resources/additional-salary