I was following up on an old article a few years back, hoping to get some help.
I was following the simplest tutorial, and unable to get the dice rolling, the output is always an executed print bill… showing all the variables. Clearly I’m doing something wrong. Or that when I close a ticket, the information is not passed onto the database, and all I get is the Customer Invoice showing all the variables and not the actual content of the last receipt.
I was following JTRTech Last Receipt…
I am just going to outline what I believe i’ve done… but being able to print the last receipt would be awesome instead of jump into account, searching for the table and printing.
As to JTR instruction,
Setup a rule to log the last paid ticket
Create a rule called “Print Last Bill Log Last Ticket ID”
Event Name: Ticket Closing
Execute rule if Matches
Remaining Amount equals 0
Total Amount Greater than 0
Action:
Update Program Setting
Setting Name: LASTBILL_{:CURRENTTERMINAL}
Setting Value: [:TicketId]
Create Automation Command: Print Last Bill
setting mapping to Status=
Create Action:
Action Name:Execute Print Last Bill
Action Type: Execute Print Job
Print Job Name: Print Bill
Print Ticket: True
TicketIds:[:Ticket ID]
Create Rule
Rule Name: Print Last Bill Button
Event Name: Automation Command Executed
Automation Command Name Equals Print Last Bill
Select ACtions: Execute Print Last Bill
TicketID: {SETTING:LASTBILL_{:CURRENTTERMINAL}}
This wasn’t in the instruction but reading other Last Receipt tutorials, it talks about the Upgrade Program Settings, which i have created in Actions.
Action Name: Log Last Ticket ID
Action Type: Update Program Setting
As I have no experience on how to configure all this… I’m just trying to do the basic tutorials on what i need from sambapos. So what ever is written in the tutorials i type it word for word. So if i’m filling it in … incorrectly… I was just following the tutorial.
Check in database program settings table to see that the setting is getting updated with ticket id as expected.
Or as a show message using the program setting to display value.
Sounds like ticket id is missing/not being passed to the print action so no ticket data going into template.
Sounds like the same issue I had. It turned out that I had copied a refresh ticket action that had a blank field for ticket Id (thus resetting the ‘store last ticket Id’ to 0.
Thanks JTR again for responding so soon, I’ll check that out first.
Thanks Muzzargh, i did see your post, and im running on default settings, so i don’t think mine is as advanced as yours, as i didn’t see any refresh thing you posted, so i thought my beginner setup wouldn’t relate.
Cheers guys, i’ll check it out hopefully … It’s an easy one … i get the concept… but putting it in action seems like… i need to learn… to not just push buttons… but to configure them… one step at a time…
I even tried to follow the instructions to this one… didn’t work either… hopefully you guys can tell me where to look … how to check if data is being stored… i’m running on trial at home (version5.3.4)… doing the simulations first before deploying this little feature.
Can you share all of the screens you’ve configured? It’s likely a simple mistake. All this does is set a program variable and then it’s recalled to print the ticket.
No, there is a program settings table which is where local=false settings are saved.
I use non local even though its prime setup for just using local as like to be able to easily check the settings in dB to see where issue might be.
The alternative is like I said to use a popup or show message action to display the {Setting:xxx} value being returned.
As said its a simple setup so likely just a simple mistake somewhere.
It’s suddenly working, the only thing that may have fixed it i can only assume was i did a reboot on the system last night… i guess doesn’t matter as long as its working…
So strange… but thanks all that responded… really appreciate how the sambapos community support works… you go to sleep… and you wake up with a ton of responses… cheers!