Home > Back-end >  The implementation of the custom formula
The implementation of the custom formula

Time:10-14

Salary system of how to implement custom formula, for two days, no real gain ah, I am using Delphi SQL, that were under the source to provide
Like a lot of people don't,

CodePudding user response:

Said with F1BOOK, said he wrote a interpreter, seek along while have no source to reference,

CodePudding user response:

In order to realize the function of the probably is: perfect attendance=basic wage table. Basic salary * IF (time sheets. Late & gt;=2 | | (time sheets. Leave. Type=="personal leave" & amp; & Time sheets. Leave. Times==1), (0, IF late time sheets.==1 | | (time sheets. Leave. Type=="personal leave" & amp; & Time sheets. Leave. Times==0.5), 0.5, 1))

CodePudding user response:

Write a parser for the function itself is unnecessary, automatically generates SQL, so simple, direct use of SQL syntax and computing functions,

CodePudding user response:

If only for a client, written in a stored procedure directly.
If you want to gm, have to write a formula for an interpreter and conditions.

CodePudding user response:

I have a own written in Delphi, custom formula formula can customize a number of projects, and each project can be generated by different projects according to different conditions, if interested can contact me, email: [email protected]
Define a take-home salary, for example, in the formula can be written as: if (number of days to work & gt;=21, take-home salary, basic base salary * (number of days to work/21), basic salary and work days is a project,
This custom formula after the test is successful, and there are a dozen function support, but can increase the multiple functions

CodePudding user response:

Ah, indeed,,

CodePudding user response:

Personal think salary system is the core of the formula design of the engine, engine design to ok if formula, any complicated wage calculation are no problem! Such as sales commission the building Lord, our company is more complex, according to you to complete performance, define different commission ratio, such as more than 300000 commission is three points, more than 500000, 300000 part 3 points, 50-30=200000 is five points, the other is the point of a commission, to capture our formula engine you, I hope it can help the building Lord.

Blog related introduction addresses

CodePudding user response:

Directly using a script is best

CodePudding user response:

Things that integral download ~ ~

CodePudding user response:

refer to the original poster lijucheng8 response:
in the wage system of how to implement custom formula, for two days, no real gain ah, I am using Delphi SQL, is the source to provide good,
Don't like people much,

Salary system is the general custom formula I also in learning,

I saw some commercial software, put forward to discuss, one of the methods, they divide three parts

Part 1 is the result of the influence that table that field

Part 2 is a condition, that is, to meet what condition, such as
English: if ever=1
English: if quanqin=1
Part 3 is expression, that is, to the assignment


Then compiled into English, the result of the above can be converted into SQL statements, can also be converted into a programming statements, and out of your payroll,

  • Related