Development of ERPNext Extension: Salaries based on hour-rate

348 views
Skip to first unread message

Pavel Ivanov

unread,
May 14, 2013, 11:11:54 AM5/14/13
to erpnext-dev...@googlegroups.com

Hello, ERPNext Community!

We are going to use ERPNext in our company.
We like it's usability features, code quality and we see this web-application very promising.

=== Extension overview ===

For beginning we will implement new functionality for salary slip calculation, because our employee's salary depends on time which they spent on tasks. For implementation of specified features pull request will be performed to erpnext project repository.

Technical requirements of extension:

  • Salary calculated each month
  • Formula:
    • earned = (time spent * hourly rate) + bonuses + fixed salary parts
    • company_expenses = earned * wire_commission
  • It should be possible to store data about employee's working hours. Also system should provide tools for import these data.
  • It should be possible to store data about employee's hourly rates.
  • Manager helper: Before (or after) salary slip generation system should show notifications in these cases:
    • In the previous month employee has working hours, but doesn't have it in the current month (Did he forget to fill report?)
    • In the previous month employee has twice more hours than in the current month (Did he forget to fill report?)
  • After salary slip creation it should be possible to do following things:
    • Add rating of employee's work.
    • Add brief description of employee's work.
    • Add bonuses to employee's salary.

=== Milestone 1. Implementation Details and Questions ===

Milestone 1.
Brief of Suggested development plan:

  1. Add new *DocType*, suggestion is to call it "Working Hours". It will store all entries with data for salary calculation:
    1. Date
    2. Time spent (Represented in hours)
    3. Short description of work
    4. Project name (Optional)
    5. Feature number and name  (Optional)
  2. Add corresponding items to the GUI: 
    1. Working hours list (CRUD operations for "Working Hours" DocType)
  3. Implement tool for import data to this DocType. Finally Import should be available in 2 modes:
    1. Import from CSV documents (Using native ERPNext module, current milestone)
    2. Import from Redmine connector (next milestone)
  4. Add new *DocType*, suggestion is to call it "Hourly Rates". It will store all entries with hourly rates of employees.
    1. Rate
    2. FromDate
    3. ToDate
  5. Add corresponding items to the GUI:
    1. Hourly rates list (CRUD operations for "Hourly Rates" DocType)
  6. Update salary slip calculation algorithm.
At the current moment we are reviewing erpnext structure and trying to design detailed and most proper plan of implementation process.
I would like to ask members of erpnext team and experienced community members to review suggested brief and verify if it fits erpnext principles?
We will appreciate any kind of suggestions or notices.

Thank you

Rushabh Mehta

unread,
May 15, 2013, 12:36:57 AM5/15/13
to erpnext-dev...@googlegroups.com
Pavel,

Welcome to the community :)

Replies below:

On 14-May-2013, at 8:41 PM, Pavel Ivanov <ivp...@gmail.com> wrote:

Hello, ERPNext Community!

We are going to use ERPNext in our company.
We like it's usability features, code quality and we see this web-application very promising.


Thank you :)

=== Extension overview ===

For beginning we will implement new functionality for salary slip calculation, because our employee's salary depends on time which they spent on tasks. For implementation of specified features pull request will be performed to erpnext project repository.

Great - this will really help us. We can also publicly acknowledge your contributions :)

Technical requirements of extension:


  • Salary calculated each month
  • Formula:
    • earned = (time spent * hourly rate) + bonuses + fixed salary parts
    • company_expenses = earned * wire_commission
This should be done using a custom script as rules may wary per organization
  • It should be possible to store data about employee's working hours. Also system should provide tools for import these data.
Are they fixed or flexible? If they are fixed, then they could be added in the "Salary Structure", if not they can be updated from "Time Log" records
  • It should be possible to store data about employee's hourly rates.
Salary Structure may be a good place to store this.
  • Manager helper: Before (or after) salary slip generation system should show notifications in these cases:
    • In the previous month employee has working hours, but doesn't have it in the current month (Did he forget to fill report?)
    • In the previous month employee has twice more hours than in the current month (Did he forget to fill report?)
Again in the Salary structure, we can maintain a percentage of deviation allowed. If the deviation is more then, there should be some validation.
  • After salary slip creation it should be possible to do following things:
    • Add rating of employee's work.
That can be done in the Appraisal
    • Add brief description of employee's work.
Salary Structure / Appraisal
    • Add bonuses to employee's salary.

=== Milestone 1. Implementation Details and Questions ===

Milestone 1.
Brief of Suggested development plan:

  1. Add new *DocType*, suggestion is to call it "Working Hours". It will store all entries with data for salary calculation:
    1. Date
    2. Time spent (Represented in hours)
    3. Short description of work
    4. Project name (Optional)
    5. Feature number and name  (Optional)
This is similar to Time Log - can you merge the two? Feature number can be "Task" or "Item" or "Serial Number"
  1. Add corresponding items to the GUI: 
    1. Working hours list (CRUD operations for "Working Hours" DocType)
  2. Implement tool for import data to this DocType. Finally Import should be available in 2 modes:
    1. Import from CSV documents (Using native ERPNext module, current milestone)
    2. Import from Redmine connector (next milestone)
  3. Add new *DocType*, suggestion is to call it "Hourly Rates". It will store all entries with hourly rates of employees.
    1. Rate
    2. FromDate
    3. ToDate
Maybe this could be in Salary Structure itself, if the rates change, then a new Salary Structure can be created.
  1. Add corresponding items to the GUI:
    1. Hourly rates list (CRUD operations for "Hourly Rates" DocType)
  2. Update salary slip calculation algorithm.
At the current moment we are reviewing erpnext structure and trying to design detailed and most proper plan of implementation process.
I would like to ask members of erpnext team and experienced community members to review suggested brief and verify if it fits erpnext principles?
We will appreciate any kind of suggestions or notices.

You can try fitting in the existing structure first. If there are reasons it cannot be fitted, then we can create new DocTypes -- usually creating a DocType should be the last resort since it adds a new layer of abstraction / complexity in the design.


Thank you




--
You received this message because you are subscribed to the Google Groups "ERPNext Developer Forum" group.
To unsubscribe from this group and stop receiving emails from it, send an email to erpnext-developer...@googlegroups.com.
To post to this group, send email to erpnext-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/erpnext-developer-forum/4b6eb9ea-3d01-4271-be25-79fc8f82fbb0%40googlegroups.com?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Reply all
Reply to author
Forward
0 new messages