Timeclock Implementation Requirements - Discussion

I have no clue ive tried it on and off I cannot tell that it does anything. The reports your seeing is with it set to True. I am going to assume its for future stuff?

I thought this could be useful in the [CustomData] field, so that I wouldnā€™t need to parse it out of the [Entities] Table, but it doesnā€™t work :frowning: ā€¦ a ZERO (0) was logged instead. Maybe I need the updated versionā€¦

[=TN('{ENTITY DATA:Employee:Salary}')]

Strings work though, you could use values like ManualPunch, AutoPunch, LunchPunch, FruitPunch, etc.

Something I see often when people are refering to States is they see States listed in settingsā€¦ and they see State Name in rulesā€¦ The State Name never matches the Statesā€¦ so this throws people off. The best way I can explain it isā€¦ the Group Code of the States that you define from Settings/States is the State Name inside rules. The States are in essenseā€¦ States of the Group Codeā€¦ so for example lets say you have Time Clock Status abreviated to TCStatus for simplicityā€¦ Lets say you want 2 states of TCStatus 1. PunchIn 2. PunchOut you would make 2 States from Settings/States

  1. PunchIn with Group code TCStatus
  2. PunchOut with Group code TCStatus

GroupCode can mean many thingsā€¦ this is just 1 part of it that I can tell. You do not have to define states in Settings/States unless you specifically want colors assignedā€¦ And perhaps logging (Though this may work without defining them as well)

More than likely the true reason for GroupCode is for reporting.

I see where the confusion comes fromā€¦ itā€™s because of the label Name above each of these Statesā€¦

There is a lot of function that can be improved by using States if you understand how to use them. I have been really improving my system lately.

1 Like

There is a Tutorial on States by @emre somewhere here, but it doesnā€™t state a whole lot (lol).

Iā€™ve played with them a bit, but Iā€™m scared to use them with my limited understanding, because (as youā€™ve mentioned) they can really cause things to go completely whacky if you donā€™t use them properly.

Iā€™m going to try your implementation, Iā€™m sure Iā€™ll learn something from it.

1 Like

If you want to really mess with them without risking destroying the systemā€¦ do not mess with the built in statesā€¦ do not use Status or Available for exampleā€¦

Here is an example of where I am using a state currently. This state I did not create using settings/states I let the rules define it because I do not track colors or reportingā€¦

I have a State Name called PStatus short for Payment Statusā€¦ the way I am using it is to give me a system that tracks when Cash, or Credit is usedā€¦ so I can recall it laterā€¦ without using Ticket Tagsā€¦

So how did I set this state upā€¦ I let the Action define itā€¦ I just typed in PStatus for State Name and defined a variable for Stateā€¦ the rule defines what State will be.

Here is how I am using it:

Payment processed ruleā€¦ when Cash is used it changes PStatus to Cash Stateā€¦ if Credit is used it changes PStatus to Credit Stateā€¦

Why do I need thisā€¦ for refundsā€¦ when I start a refund it can check what state PStatus is in so it knows how to record payment for the Refund correctly, cash or credit.

Finally you may be wondering well you can do that with ticket tags as well so whats the differenceā€¦ to that I will say: I can define the State to be invisible to everyone but Adminsā€¦ It is a process afterallā€¦ Ticket tags would be visible to everyone.

One more fInally lol: If you want the State to be visible to employees you can define it in settings/states and check the Show on Ticket option.

I will be using this method for my To Go and Eat In and go away from using Ticket Tag.

The issue with this is when multiple Payment Types are used on the same Ticket. That is why I use Ticket Tags.

I solve that as well by using PStatus=Multi Currency I handle it by assigning a Ticket Tag when the state is changed to Multi Currency the tag records Payment and amountsā€¦ it reads that to determine how to pay for the refund ticket and then it removes the ticket tag after payment processed.

The way it works isā€¦ PStatus is set on Payment Pocessedā€¦ I put constraint of Remaining Amount Equals 0 for Cash and Credit payment typesā€¦ (Two Separate rules) and TICKET STATE:PStatus Not Equals Multi Currency.

I have PStatus=Multi Currency set if Remaining Amount Greater 0. For all payment typesā€¦

So this will settle with PStatus of Cash or Credit if they are the ONLY ones used and remaining = 0ā€¦ or it will automatically change to Multi Currency if it is split up and processed.

Anyway sorry for going so off topicā€¦ but it is kind of related as we are talking about logging States. This can be used to enhance what I just described by logging a Date payments were made.

2 Likes

@Jesse, can you add to your setup (above) screenshots for the Automation Command(s), Action(s) and Rule(s) for:

Update Entity State

1 Like

Yes I am eating lunch I will update it shortly. EDIT: Look closely @QMcKay They are there. I did not actually define any automation commands I let the rules define them.

I did forget to post the Update Entity action so here it is:

I am going to write it up as a tutorial I just have been kind of busy today.

And the load entity action:

What I did is make my employee Users named the same as the Employee Entitiesā€¦ this ties it to login of SambaPOS. The way I made Pin work is I made PIN a custom field for Entity Type Employees and I type their User Login pin here.

I am packaging it up as a database tools fileā€¦ Also writing a formal tutorial.

For testingā€¦ this is just a rough compilationā€¦ I did not finish cleaning it up or polishing it out yet. It should work tho for you to study.

Time Clock.zip (2.7 KB)

You need to create your employee entities and use a custom field called PIN and enter the user pin here.

EDIT: Updated the file please download again if you had already downloaded before you saw this msgā€¦I forgot to put Employee Entity type.

EDIT: I can not export Task Type yet so You need to create a Task Type called Time Clock for the Task Type Editor in TIme Clock screen to work.

Later tonight I will upload a cleaner version. I kind of hacked this together to test

@emre the table structure looks great. Unless @QMcKay sees something I dontā€¦ I think this works quite well.

1 Like

Looks fine to me too. Works well so far.

2 Likes

What can I say. You both made a hard development task easy as implementing a calculator :slight_smile: I couldnā€™t believe what great features weā€™ve recently added. In fact it is really a little bit hard for me to document every possibilities but Iā€™ll try to add all key features. Iā€™ll also need your ideas about documentation.

Iā€™ve deleted uploads under this topic and released a fresh one. I hope youā€™ll like new features.

3 Likes

Can someone remind me again what the proper syntax is for an Action Constraint? I want to make this type of test to decide whether or not to execute the Actionā€¦

[:State]=='PunchIn' || [:State]=='PunchOut'

@QMcKay State value should also be in quotes.

Thanks @emre - that seems to work.

Iā€™m trying to figure a way to only Log PunchIn and PunchOut while still updating State (colors) between the following:

PunchIn
PunchOut
PunchBreak
PunchLunch
PunchWhatever

Because honestly I donā€™t care about logging Break or Lunchā€¦ PunchIn and PunchOut are the only ones important enough to Log.

Tomorrow is another dayā€¦

@QMcKay What if you tell it what State is start and what state is endā€¦ so it only looks for those statesā€¦ instead of [:StateStart] do PunchIn

1 Like