webERP Forum
Sales Commission system - Printable Version

+- webERP Forum (
+-- Forum: webERP Discussion (/forumdisplay.php?fid=1)
+--- Forum: Development Discussion & Specification (/forumdisplay.php?fid=10)
+--- Thread: Sales Commission system (/showthread.php?tid=8159)

Sales Commission system - falkoner - 04-29-2018 07:25 PM

As mentioned in another thread I have been employed to produce a comprehensive sales person commission system for a company in Germany to replace the existing functionality which is somewhere between minimal and not existing.

I have written a first draft specification here:

I would be happy to bring this into webERP (even though one of the admins still thinks it's funny to spread lies about me and refuses to allow me the write to reply) if there is sufficient interest. Also if anybody has any suggestions/comments on this specification please feel free to share them.


RE: Sales Commission system - phil - 05-01-2018 08:27 AM

Sounds good ... :-)

RE: Sales Commission system - VortecCPI - 05-05-2018 10:30 PM

I wrote a report to manage commissions based upon the existing commission table.

The problem with commission is that it varies drastically depending upon context.

RE: Sales Commission system - falkoner - 05-05-2018 11:37 PM

(05-05-2018 10:30 PM)VortecCPI Wrote:  The problem with commission is that it varies drastically depending upon context.

I agree Paul, I am trying to make my system as flexible as possible to cover as many scenarios as possible whilst still fulfilling my customers specifications. It should also be easily improved upon to cover other scenarios by others as they need it. However I am aware it will never do everything that everybody wants.

I have nearly completed the code, and details in the spec have changed as I write the code so I will update the wiki when I get a moment.

I would be interested in any comments or suggestions you have,


RE: Sales Commission system - VortecCPI - 05-06-2018 02:33 AM


Here is how ours works: Salesman gets 10% if customer has been on board for less than 12 months. After that period salesman gets 2%.

Hopefully this fits in your solution...


RE: Sales Commission system - phil - 05-06-2018 07:08 AM

Yes tricky to please all comers with this. Commission based on GPmakessome sense rather than sales.
Also tiered commission rates, different rates for different areas or specificcustomers can easily become complex

RE: Sales Commission system - falkoner - 05-08-2018 05:52 PM

Ok, while sitting in the garden over the bank holiday weekend enjoying the record breaking temperatures I have been thinking about this. What I have done is to move the CalculateCommission() function to it's own includes/CommissionCalculations.php file, and then moved the logic of the calculation to separate functions, so CalculateCommission() for the stock category specific commission as per my customers spec now becomes just calls to these functions. I have written a function as well doing the commission on length of time customer has been buying (as per Paul's post) and anybody can easily write their own functions as per their needs and simply call them from the CalculateCommission() function.

This modular approach makes it infinitely flexible with just a small amount of programming.


RE: Sales Commission system - VortecCPI - 05-09-2018 08:57 PM

I spoke with one of my customers using ECi M1 ERP and they said commission is so complicated it can only be done externally. ECi M1 ERP is used as the input data but all work to compute output data is done in Excel Workbooks.

I really like the idea of having functions in a separate module.

RE: Sales Commission system - falkoner - 05-30-2018 12:25 AM

We have this functionality running on our customers test environment. I have updated the wiki specifications with the changes we have done as per above, and also included some screenshots of the functionality working.