# Action Constraint Help

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?

Finally please elaborate on the account transaction part at the end.

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

honestly I don’t know what I am doing =F
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

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 )

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

thanks for the tip.

‘[ ]’ != ‘0,00’ - works for me.

Maybe this is not the right decision to convert the number to text, but for me it works

F I believe is financial maybe but believe it turns to you set curancy decimals.
TN forces number but believe it will show the number as is without forcing decimals.

1 Like

Did you understand my comment about simplifying the formula?
You have duplicated calls to TN(’{REPORT ENTITY DETAILS:EC.Pay Rate percent of sale:(EN={ENTITY NAME})}’) which in the same event would return the same each time.
Also since I guess that refers to employee entity suprised you haven’t needed to specify entity type to avoid confusion with other entity types like table or customer.

1 Like

whoa… that was a hard read haha

1 Like

You have duplicated calls to TN(’{REPORT ENTITY DETAILS:EC.Pay Rate percent of sale:(EN={ENTITY NAME})}’)

yes, that’s right.

need to optimize the expression.

whoa… that was a hard read haha

I dont understand what your trying to do. Are you running a restaurant or something other? Ive never heard of this before.

How can one employee be empl1 and empl2? Again can you explain what your business type is and why you need this? It might help us understand.

probably on his rosta he has this to show the workload of the day and assigns 1 employee to both.

If he put Area1 Area2, mightve been easier to understand.

In the UK chefs are commonly known to do a Split Shift, this would make an employee clock out and clock in again on the same day.

Happens a lot in other industries here too

1 Like

Ok I am still a little confused with what we are trying to achieve though.

Sorry I was just chiming in, i have no idea either? I thought i was replying to @emre timepunch post

1 Like

I was guessing it was commission.

everything is already working, but I try to explain.
I have a restaurant
where there are several cooking streams:
sushi, pizza, meat, bar.
each employee only works on his own stream.
There are many workers, for example, there are 10 sushi-workers.
up to 4 sushi-workers work on shift at the same time.
and they are paid a salary on the number of prepared dishes.
but not always the sushi worker works the whole shift, he can work for several hours (not all works period), or work a few hours, go on a break, then continue again…

for this, I add to each check the sushi-workers who work on the dish, as well as count of sushi-workers in shift (at the moment).

the calculation salary formula looks like this:
X/Y/100*Z= employee salary
X = order price
Y = count of workers in shift
Z = percent salary (for each employee is different, depending on the experience etc.).

1 Like

Oh wow ive never heard of that very interesting. Also very complicated. How do you know what they did?

1 Like

wow, thats a crazy way of earning money. Good for the company owner but no guarantee for the worker!

I guess thats the norm there?

from that you wouldnt? its worked out on whole sales for the shift

1 Like

if honestly the workers themselves want to work like that, since they receive double or triple salaries for holidays and under heavy workload (versus hourly pay)