Download Unicenta - How to reset the register to zero

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Extensible Storage Engine wikipedia , lookup

Clusterpoint wikipedia , lookup

Object-relational impedance mismatch wikipedia , lookup

Relational model wikipedia , lookup

Null (SQL) wikipedia , lookup

Database model wikipedia , lookup

Transcript
Unicenta - How to reset the register to
zero
The easiest way. Create a new database and point Unicenta to it.
For this manual I used:




Unicenta V3.70
MySQL
HeidiSQL
Unicenta oPOS faq_guide.pdf
Within Unicenta make sure that there are no “Layaways”
Make sure you have a full backup of the uniCenta database. I’m not responsible for data lose.
All the scripts are attached with numbers every number represent the row in this document
1
Open Heidi SQL and connect to the
database server.
Double click on the database name
that you use for uniCenta.
2
On the top you will notice one of
the tabs called Query. Click on it.
3
If you have been testing and
configuring uniCenta oPOS and you
want to remove all the receipts you
DELETE FROM TICKETLINES;
DELETE FROM TAXLINES;
DELETE FROM TICKETS;
created but maintaining the master
data: Products, categories,... Copy
and paste the code on the right in
to the Query field
4
It will look like this
5
In one of the ribbons you find a
arrow. Pointing to the right. It is the
play button to execute the Query
Click the play button
In the lower part you will find if the
query resulted successfully.
6
7
8
9
10
If you want also reset the receipt
number counters, for MySQL:
(Keep in mind uniCenta ticket count
always start at 2)
Remove the old Query and replace
it with the new Query and press
the play button
The following is optional
If you want also delete products
and categories, execute:
This should be enough for uniCenta
v3.56, but for uniCenta v3.70 you
have removed too much.
So the basic product/category
needs to be recreated.
DELETE
DELETE
DELETE
DELETE
DELETE
UPDATE
FROM PAYMENTS;
FROM RECEIPTS;
FROM SHAREDTICKETS;
FROM STOCKDIARY;
FROM CLOSEDCASH;
STOCKCURRENT SET UNITS = 0;
UPDATE
UPDATE
UPDATE
UPDATE
TICKETSNUM SET ID = 0;
TICKETSNUM_REFUND SET ID = 0;
TICKETSNUM_PAYMENT SET ID = 0;
PICKUP_NUMBER SET ID = 0;
DELETE FROM STOCKCURRENT;
DELETE FROM PRODUCTS_COM;
DELETE FROM PRODUCTS_CAT;
DELETE FROM PRODUCTS;
DELETE FROM CATEGORIES;
ALTER TABLE `products`
DROP FOREIGN KEY `PRODUCTS_TAXCAT_FK`;
ALTER TABLE `products`
DROP FOREIGN KEY `PRODUCTS_FK_1`;
INSERT INTO `categories` (`ID`, `NAME`,
`PARENTID`, `IMAGE`, `TEXTTIP`,
`CATSHOWNAME`) VALUES
('000', 'Category Standard', NULL, NULL,
NULL, 1);
INSERT INTO `products` (`ID`, `REFERENCE`,
`CODE`, `CODETYPE`, `NAME`, `PRICEBUY`,
`PRICESELL`, `CATEGORY`, `TAXCAT`,
`ATTRIBUTESET_ID`, `STOCKCOST`,
`STOCKVOLUME`, `IMAGE`, `ISCOM`, `ISSCALE`,
`ISKITCHEN`, `PRINTKB`, `SENDSTATUS`,
`ISSERVICE`, `ATTRIBUTES`, `DISPLAY`,
`ISVPRICE`, `ISVERPATRIB`, `TEXTTIP`,
`WARRANTY`) VALUES
('xxx999_999xxx_x9x9x9', 'xxx999',
'xxx999', NULL, '***', 0, 0, '000', '001',
NULL, NULL, NULL, NULL, b'0', b'0', b'0',
b'0', b'0', b'1', NULL, '', 0, 0, '', 0);
INSERT INTO `products_cat` (`PRODUCT`,
`CATORDER`) VALUES
('xxx999_999xxx_x9x9x9', NULL);
ALTER TABLE `products`
ADD CONSTRAINT `PRODUCTS_TAXCAT_FK`
FOREIGN KEY (`TAXCAT`) REFERENCES
`taxcategories` (`ID`);
11
Also V3.70 supports the feature to
see the number of lines removed
from the tickets and the number of
times when the drawer is opened
without sale
ALTER TABLE `products`
ADD CONSTRAINT `PRODUCTS_FK_1` FOREIGN
KEY (`CATEGORY`) REFERENCES `categories`
(`ID`);
DELETE FROM LINEREMOVED;
DELETE FROM DRAWEROPEND;
Attachments:





Unicenta - How to reset the register to zero - sql03.txt
Unicenta - How to reset the register to zero - sql07.txt
Unicenta - How to reset the register to zero - sql09.txt
Unicenta - How to reset the register to zero - sql10.txt
Unicenta - How to reset the register to zero - sql11.txt