Author Topic: Default customer  (Read 6128 times)

ptv1p3r

  • Newbie
  • *
  • Posts: 12
Default customer
« on: November 29, 2012, 04:10:56 am »
Hi guys,

Regarding customer selection i have a question :

In SambaPOS if no customer is selected for the ticket, when we settle the ticket, it stores in the database the customer id 0.

How can i create a default customer so that when we close tickets, if no special customer is selected, it will select the one i want ?

Thanks in advance

ptv1p3r

  • Newbie
  • *
  • Posts: 12
Re: Default customer
« Reply #1 on: November 30, 2012, 05:05:35 am »
Anyone ??

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Default customer
« Reply #2 on: November 30, 2012, 07:26:20 am »
This is not possible but executing "Update Ticket Account" action on "Ticket Created" rule might be a solution. That will assign same customer account to all tickets and you can change it when needed.

Why do you need such feature?

ptv1p3r

  • Newbie
  • *
  • Posts: 12
Re: Default customer
« Reply #3 on: November 30, 2012, 07:42:16 am »
Thanks emre i will try your solution...

In the EU (this case portugal) because of saft rules, for example, when you sell anything you have to supply the customer account number for tax purposes, and when there's no customer info (by one reason or another) you have to put a specific customer defined by state, in this case 'Final Consumer' in the name without address or account number, wich in turn when the accounting reports are delivered to the state, your data will be accepted.

You cannot simply create a ticket with no customer indication.

emre

  • SambaPOS Developer
  • Samba Team
  • Hero Member
  • *****
  • Posts: 1564
Re: Default customer
« Reply #4 on: November 30, 2012, 08:16:38 am »
Since it is a fixed data you don't need to assign a customer to be able to print that info. You might have other options. For example you can use ticket tags. Instead of choosing a customer you can use "Update Ticket Tag" action. We don't need to create ticket tags when we use them through actions.

For example create a new action, name it as "Set default customer info", action type will be "Update Ticket Tag", Tag Name will be "Customer Info" and finally enter what info you need into "Tag Value".

Create another action, name it as "Clear default customer info", action type and tag name will be the same. This time just input a single "space" in "Tag Value" area so it will clear that ticket tag.

On "Ticket Created" rule, execute "Set default customer info" action.
On "Customer Selected for Ticket" rule, execute "Clear default customer info" action.

In printer templates you can print that ticket with with {TICKETTAG:Customer Info}. For example

[Customer: {TICKETTAG:Customer Info}]

will only print "Customer:" suffix if a Customer Info exists. Square brackets does that.

-----------------
Another solution might be designing a separate ticket printing template and hardcode that info on ticket header. "Tag" column in printjobs is used to filter maps by Ticket Tags. For example if you enter "Default Customer" there and if there is a ticket tag named "Default Customer" in ticket that line will work. So you can have two maps on your "Print Bill" print job. One of them will be the default template and the other one will be the customer info hardcoded bill template. This template will contain a specific ticket tag and it will execute if that ticket tag exists.

Sorry I can't create a step by step tutorial atm but feel free to ask when you need.