Action Constraint Help

Цитата
What’s the =F achiving?

honestly I don’t know what I am doing =F :smile:
since I could not find a syntax tutorial.
I collected information bit by bit from other topics. until my setup started working.

Цитата
Next is what is actually happening? Guessing it’s a commission type calculation.
What’s with empl1 through 4? And why would it seem they are all on same rate or at least rate called from same entity?

I make a setting that automatically calculates the salary of employees depending on the percentage specified in their account, as well as the number of employees on the stream.

it goes like an add-on to Time Clock by QMcKay

when you add a new order to the order are added order state empl1 or empl2 or empl3 or empl4
which one to add depends on whether the previous one is busy (if empl1 != ‘’ add to empl2 etc.)
(4 is used as this is the maximum number of workers in the stream)
also added order state count he adds the number of workers on the stream(then to correctly calculate the salary because it is divided by the number of workers on the stream)

Even made himself a special sign so as not to miss anything when entering into Sambapos :smiley:

Why came out such a big formula?
in one day there may be a different number of employees depending on the workload, and the same employee can punchin and punchout several times a day, so the same employee can be both empl1 and empl2, etc.

as the payroll occurs at punchout and the worker can be several times punchin\punchout
-TN('{ACCOUNT TRANSACTION TOTAL:Нарахування зарплати (Payroll):{ENTITY NAME}}'))]
checks to not pay the salary again.

setting is ready and works at 99% (maybe when I write the tutorial :laughing: )

there is only one problem.
if employee punchin to work and earned nothing, and punchout (salary = 0), then instead of creating a transaction, shows standard transaction window