hellow, im trying to reset the ticket number following this emre method:
but…it doesnt reset the number generator…im using sambapos in spanish…i have also try to set the "where name = " to my column table name that is is spanish but it also doesnt work…any idea why?
Or any other method please
Yes you can use database tools.
Open [MyDocuments]\SambaPOS4\Database Tasks folder.
Create a new file and name it as [CBL]Reset Ticket Number Generator.sql . Be sure it’s extension is .sql
why do you want to know the why??? it is relevant??? because ive started doind some testing with a client and now that we have finish the testing we want to start the number ticket from 1…
dont want to sound rude…just…we want to start now that we got all the right recipes etc etc we want to start selling…and to do so we need to start that ticket number from 1…
He askes because just resetting number on its own is very bad idea as will cause duplicates unless all transnational data is also cleared (not your setup and products etc but the testing tickets and orders etc.
Which is why the database tools script that can be run direct within samba was suggested. Its a paid module in v4 on the market screen but you can install and run the script in trial mode then uninstall afterwards to get rid of the activation popups for the module.
there will no be duplicates because as you said i will use “clear all transaction data”…but…please is there a way to accomplish that ticket number ressetting?? i didnt understand what paid module you suggested me¿¿?? im using v5 last version…
Your posting in a V4 question which is why I said that.
Clear database tasks is in database tools available by default in v5 and it should reset the ticket number.
Yes it is relevant I want to help you but I will not help someone accidentally break their system. Doing this can break your system to where it is almost not usable if you start getting duplicate tickets it will lead to constant crashing etc. I have no way to know what you are trying to do with this other than guess. I wanted to make sure you were not going to accidentally break your system because most people that ask this just want a simple resetting ticket number.
First clear all transactions then run this query.
Backup your database in case I gave you wrong syntax and the world explodes… not really but backup anyway…
Run this in MSSMS. DBCC CHECKIDENT (TICKETS, reseed, 1)
This will reseed that entire table. He wants to start from scratch right? Numerators get reset when you run the clear transactions tool so I was thinking this is misunderstanding? Maybe he meant ticket id all along?