so currently the delivery system i setup is already up and running and in production mode. just little things that caught my attention while using it for the pass few days regarding printing.
i added the excute print job action to the rule “before ticket closing” to have it print automatically for the delivery system i set up following the guide. problem with that is that when i finish the order it prints one copy than if select a driver it prints another copy and another one when i settle it at night. in theory i would only want two copys. is it possible to have it not print when a driver is selected.
I’m assuming it happens because when a driver is selected it opens the ticket than close it again which triggers the print action.
No choosing a driver won’t trigger ticket close events. Before ticket closing works every time you close your ticket and if rule constraints did not configured properly it can trigger printing on every ticket closing event.
okey how would you go about setting up the constraint? Under “Ticket Closing” event the only available constraint i see are “TicketId”, “TicketTypeName”, “RemainingAmount” and “TotalAmount” which i think i cant use to constraint it to not print.
On Custom Package Delivery System tutorial I’ve demonstrated how to add additional state to delivery tickets for tracking delivery status. Each “delivery status change” triggers “Ticket State Changed” rule so you can print delivery ticket at the time you assign deliverer. It may seem complex at first but understanding state tracking will help you perfectly customize SambaPOS for your work flows. I recommend this approach.
Another workaround might be creating a rule for handling “Ticket Entity Changed” event. It triggers every time you assign an entity to a ticket and you can create a constraint by choosing entity type as deliverer.
You can also create constraints for Before Ticket Closing rule by using printer templates. Check my answer for more info.