5.0 Source Code
Committing 5.0 Source Code
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
# To change this license header, choose License Headers in Project Properties.
|
||||
# To change this template file, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
label.ticketheader1=Header 1
|
||||
label.ticketheader2=Header 2
|
||||
label.ticketheader3=Header 3
|
||||
label.ticketheader4=Header 4
|
||||
label.ticketheader5=Header 5
|
||||
label.ticketheader6=Header 6
|
||||
label.ticketfooter1=Footer 1
|
||||
label.ticketfooter2=Footer 2
|
||||
label.ticketfooter3=Footer 3
|
||||
label.ticketfooter4=Footer 4
|
||||
label.ticketfooter5=Footer 5
|
||||
label.ticketfooter6=Footer 6
|
||||
# To change this license header, choose License Headers in Project Properties.
|
||||
# To change this template file, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
label.tktheader1=Header 1
|
||||
label.tktheader2=Header 2
|
||||
label.tktheader3=Header 3
|
||||
label.tktheader4=Header 4
|
||||
label.tktheader5=Header 5
|
||||
label.tktheader6=Header 6
|
||||
@@ -0,0 +1,4 @@
|
||||
# To change this license header, choose License Headers in Project Properties.
|
||||
# To change this template file, choose Tools | Templates
|
||||
# and open the template in the editor.
|
||||
|
||||
@@ -0,0 +1,699 @@
|
||||
|
||||
CREATE TABLE applications (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
version varchar(255) NOT NULL,
|
||||
instdate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attribute (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributeinstance (
|
||||
id varchar(255) NOT NULL,
|
||||
attributesetinstance_id varchar(255) NOT NULL,
|
||||
attribute_id varchar(255) NOT NULL,
|
||||
value varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributeset (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributesetinstance (
|
||||
id varchar(255) NOT NULL,
|
||||
attributeset_id varchar(255) NOT NULL,
|
||||
description varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributeuse (
|
||||
id varchar(255) NOT NULL,
|
||||
attributeset_id varchar(255) NOT NULL,
|
||||
attribute_id varchar(255) NOT NULL,
|
||||
lineno smallint default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributevalue (
|
||||
id varchar(255) NOT NULL,
|
||||
attribute_id varchar(255) NOT NULL,
|
||||
value varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE breaks (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
visible smallint NOT NULL default 1 ,
|
||||
notes varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE categories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
parentid varchar(255) default NULL,
|
||||
image blob default NULL,
|
||||
texttip varchar(255) default NULL,
|
||||
catshowname smallint NOT NULL default 1 ,
|
||||
catorder varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE closedcash (
|
||||
money varchar(255) NOT NULL,
|
||||
host varchar(255) NOT NULL,
|
||||
hostsequence smallint NOT NULL,
|
||||
datestart timestamp NOT NULL,
|
||||
dateend timestamp default NULL,
|
||||
nosales smallint NOT NULL default 0 ,
|
||||
PRIMARY KEY (money)
|
||||
);
|
||||
|
||||
CREATE TABLE csvimport (
|
||||
id varchar(255) NOT NULL,
|
||||
rownumber varchar(255) default NULL,
|
||||
csverror varchar(255) default NULL,
|
||||
reference varchar(255) default NULL,
|
||||
code varchar(255) default NULL,
|
||||
name varchar(255) default NULL,
|
||||
pricebuy double default NULL,
|
||||
pricesell double default NULL,
|
||||
previousbuy double default NULL,
|
||||
previoussell double default NULL,
|
||||
category varchar(255) default NULL,
|
||||
tax varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE customers (
|
||||
id varchar(255) NOT NULL,
|
||||
searchkey varchar(255) NOT NULL,
|
||||
taxid varchar(255) default NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
taxcategory varchar(255) default NULL,
|
||||
card varchar(255) default NULL,
|
||||
maxdebt double NOT NULL default 0 ,
|
||||
address varchar(255) default NULL,
|
||||
address2 varchar(255) default NULL,
|
||||
postal varchar(255) default NULL,
|
||||
city varchar(255) default NULL,
|
||||
region varchar(255) default NULL,
|
||||
country varchar(255) default NULL,
|
||||
firstname varchar(255) default NULL,
|
||||
lastname varchar(255) default NULL,
|
||||
email varchar(255) default NULL,
|
||||
phone varchar(255) default NULL,
|
||||
phone2 varchar(255) default NULL,
|
||||
fax varchar(255) default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
visible smallint NOT NULL default 1 ,
|
||||
curdate timestamp default NULL,
|
||||
curdebt double default 0 ,
|
||||
image blob default NULL,
|
||||
isvip smallint NOT NULL default 0 ,
|
||||
discount double default 0 ,
|
||||
memodate timestamp default CURRENT_TIMESTAMP ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE draweropened (
|
||||
opendate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
name varchar(255) default NULL,
|
||||
ticketid varchar(255) default NULL
|
||||
);
|
||||
|
||||
CREATE TABLE floors (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
image blob default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE leaves (
|
||||
id varchar(255) NOT NULL,
|
||||
pplid varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
startdate timestamp NOT NULL,
|
||||
enddate timestamp NOT NULL,
|
||||
notes varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE lineremoved (
|
||||
removeddate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
name varchar(255) default NULL,
|
||||
ticketid varchar(255) default NULL,
|
||||
productid varchar(255) default NULL,
|
||||
productname varchar(255) default NULL,
|
||||
units double NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE locations (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
address varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE moorers (
|
||||
vesselname varchar(255) default NULL,
|
||||
size smallint default NULL,
|
||||
days smallint default NULL,
|
||||
power smallint NOT NULL default 0
|
||||
);
|
||||
|
||||
CREATE TABLE orders (
|
||||
id INTEGER PRIMARY KEY GENERATED ALWAYS AS IDENTITY(Start with 1, Increment by 1),
|
||||
orderid varchar(50) DEFAULT NULL,
|
||||
qty smallint DEFAULT 1 ,
|
||||
details varchar(255) DEFAULT NULL,
|
||||
attributes varchar(255) DEFAULT NULL,
|
||||
notes varchar(255) DEFAULT NULL,
|
||||
ticketid varchar(50) DEFAULT NULL,
|
||||
ordertime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
displayid smallint DEFAULT 1 ,
|
||||
auxiliary smallint DEFAULT NULL,
|
||||
completetime timestamp DEFAULT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE payments (
|
||||
id varchar(255) NOT NULL,
|
||||
receipt varchar(255) NOT NULL,
|
||||
payment varchar(255) NOT NULL,
|
||||
total double NOT NULL default 0 ,
|
||||
tip double default 0 ,
|
||||
transid varchar(255) default NULL,
|
||||
isprocessed smallint default 0 ,
|
||||
returnmsg blob default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
tendered double default NULL,
|
||||
cardname varchar(255) default NULL,
|
||||
voucher varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE people (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
apppassword varchar(255) default NULL,
|
||||
card varchar(255) default NULL,
|
||||
role varchar(255) NOT NULL,
|
||||
visible smallint NOT NULL,
|
||||
image blob default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE pickup_number (
|
||||
id smallint NOT NULL default 0
|
||||
);
|
||||
|
||||
CREATE TABLE places (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
seats varchar(6) NOT NULL DEFAULT '1' ,
|
||||
x smallint NOT NULL,
|
||||
y smallint NOT NULL,
|
||||
floor varchar(255) NOT NULL,
|
||||
customer varchar(255) default NULL,
|
||||
waiter varchar(255) default NULL,
|
||||
ticketid varchar(255) default NULL,
|
||||
tablemoved smallint NOT NULL default 0 ,
|
||||
width smallint NOT NULL,
|
||||
height smallint NOT NULL,
|
||||
guests smallint DEFAULT 0,
|
||||
occupied timestamp DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE products (
|
||||
id varchar(255) NOT NULL,
|
||||
reference varchar(255) NOT NULL,
|
||||
code varchar(255) NOT NULL,
|
||||
codetype varchar(255) default NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
pricebuy double NOT NULL default 0 ,
|
||||
pricesell double NOT NULL default 0 ,
|
||||
category varchar(255) NOT NULL,
|
||||
taxcat varchar(255) NOT NULL,
|
||||
attributeset_id varchar(255) default NULL,
|
||||
stockcost double NOT NULL default 0 ,
|
||||
stockvolume double NOT NULL default 0 ,
|
||||
image blob default NULL,
|
||||
iscom smallint NOT NULL default 0 ,
|
||||
isscale smallint NOT NULL default 0 ,
|
||||
isconstant smallint NOT NULL default 0 ,
|
||||
printkb smallint NOT NULL default 0 ,
|
||||
sendstatus smallint NOT NULL default 0 ,
|
||||
isservice smallint NOT NULL default 0 ,
|
||||
attributes blob default NULL,
|
||||
display varchar(255) default NULL,
|
||||
isvprice smallint NOT NULL default 0 ,
|
||||
isverpatrib smallint NOT NULL default 0 ,
|
||||
texttip varchar(255) default NULL,
|
||||
warranty smallint NOT NULL default 0 ,
|
||||
stockunits double NOT NULL default 0 ,
|
||||
printto varchar(255) default '1' ,
|
||||
supplier varchar(255) default NULL,
|
||||
uom varchar(255) default '0' ,
|
||||
memodate timestamp default '2018-01-01 00:00:01' ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE products_bundle (
|
||||
id varchar(255) NOT NULL,
|
||||
product VARCHAR(255) NOT NULL,
|
||||
product_bundle VARCHAR(255) NOT NULL,
|
||||
quantity DOUBLE NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE products_cat (
|
||||
product varchar(255) NOT NULL,
|
||||
catorder smallint default NULL,
|
||||
PRIMARY KEY (product)
|
||||
);
|
||||
|
||||
CREATE TABLE products_com (
|
||||
id varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
product2 varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE receipts (
|
||||
id varchar(255) NOT NULL,
|
||||
money varchar(255) NOT NULL,
|
||||
datenew timestamp NOT NULL,
|
||||
attributes blob default NULL,
|
||||
person varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE reservation_customers (
|
||||
id varchar(255) NOT NULL,
|
||||
customer varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE reservations (
|
||||
id varchar(255) NOT NULL,
|
||||
created timestamp NOT NULL,
|
||||
datenew timestamp NOT NULL default '2018-01-01 00:00:00' ,
|
||||
title varchar(255) NOT NULL,
|
||||
chairs smallint NOT NULL,
|
||||
isdone smallint NOT NULL,
|
||||
description varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE resources (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
restype smallint NOT NULL,
|
||||
content blob default NULL,
|
||||
version varchar(10) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE roles (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
permissions blob default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE sharedtickets (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
content blob default NULL,
|
||||
appuser varchar(255) default NULL,
|
||||
pickupid smallint NOT NULL default 0 ,
|
||||
locked varchar(20) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE shift_breaks (
|
||||
id varchar(255) NOT NULL,
|
||||
shiftid varchar(255) NOT NULL,
|
||||
breakid varchar(255) NOT NULL,
|
||||
starttime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
endtime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE shifts (
|
||||
id varchar(255) NOT NULL,
|
||||
startshift timestamp NOT NULL,
|
||||
endshift timestamp default NULL,
|
||||
pplid varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE stockcurrent (
|
||||
location varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
attributesetinstance_id varchar(255) default NULL,
|
||||
units double NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE stockdiary (
|
||||
id varchar(255) NOT NULL,
|
||||
datenew timestamp NOT NULL,
|
||||
reason smallint NOT NULL,
|
||||
location varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
attributesetinstance_id varchar(255) default NULL,
|
||||
units double NOT NULL,
|
||||
price double NOT NULL,
|
||||
appuser varchar(255) default NULL,
|
||||
supplier varchar(255) default NULL,
|
||||
supplierdoc varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE stocklevel (
|
||||
id varchar(255) NOT NULL,
|
||||
location varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
stocksecurity double default NULL,
|
||||
stockmaximum double default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE suppliers (
|
||||
id varchar(255) NOT NULL,
|
||||
searchkey varchar(255) NOT NULL,
|
||||
taxid varchar(255) default NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
maxdebt double NOT NULL default 0 ,
|
||||
address varchar(255) default NULL,
|
||||
address2 varchar(255) default NULL,
|
||||
postal varchar(255) default NULL,
|
||||
city varchar(255) default NULL,
|
||||
region varchar(255) default NULL,
|
||||
country varchar(255) default NULL,
|
||||
firstname varchar(255) default NULL,
|
||||
lastname varchar(255) default NULL,
|
||||
email varchar(255) default NULL,
|
||||
phone varchar(255) default NULL,
|
||||
phone2 varchar(255) default NULL,
|
||||
fax varchar(255) default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
visible smallint NOT NULL default 1 ,
|
||||
curdate timestamp default NULL,
|
||||
curdebt double default 0 ,
|
||||
vatid varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxcategories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxcustcategories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxes (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
category varchar(255) NOT NULL,
|
||||
custcategory varchar(255) default NULL,
|
||||
parentid varchar(255) default NULL,
|
||||
rate double NOT NULL default 0 ,
|
||||
ratecascade smallint NOT NULL default 0 ,
|
||||
rateorder smallint default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxlines (
|
||||
id varchar(255) NOT NULL,
|
||||
receipt varchar(255) NOT NULL,
|
||||
taxid varchar(255) NOT NULL,
|
||||
base double NOT NULL default 0 ,
|
||||
amount double NOT NULL default 0 ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxsuppcategories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE thirdparties (
|
||||
id varchar(255) NOT NULL,
|
||||
cif varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
address varchar(255) default NULL,
|
||||
contactcomm varchar(255) default NULL,
|
||||
contactfact varchar(255) default NULL,
|
||||
payrule varchar(255) default NULL,
|
||||
faxnumber varchar(255) default NULL,
|
||||
phonenumber varchar(255) default NULL,
|
||||
mobilenumber varchar(255) default NULL,
|
||||
email varchar(255) default NULL,
|
||||
webpage varchar(255) default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ticketlines (
|
||||
ticket varchar(255) NOT NULL,
|
||||
line smallint NOT NULL,
|
||||
product varchar(255) default NULL,
|
||||
attributesetinstance_id varchar(255) default NULL,
|
||||
units double NOT NULL,
|
||||
price double NOT NULL,
|
||||
taxid varchar(255) NOT NULL,
|
||||
attributes blob default NULL,
|
||||
PRIMARY KEY (ticket , line)
|
||||
);
|
||||
|
||||
CREATE TABLE tickets (
|
||||
id varchar(255) NOT NULL,
|
||||
tickettype smallint NOT NULL default 0 ,
|
||||
ticketid smallint NOT NULL,
|
||||
person varchar(255) NOT NULL,
|
||||
customer varchar(255) default NULL,
|
||||
status smallint NOT NULL default 0 ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ticketsnum (
|
||||
id smallint NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ticketsnum_payment (
|
||||
id smallint NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ticketsnum_refund (
|
||||
id smallint NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE uom (
|
||||
id VARCHAR(255) NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE vouchers (
|
||||
id VARCHAR(100) NOT NULL,
|
||||
voucher_number VARCHAR(100) DEFAULT NULL,
|
||||
customer VARCHAR(100) DEFAULT NULL,
|
||||
amount DOUBLE DEFAULT NULL,
|
||||
status CHAR(1) DEFAULT 'A' ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
-- ADD roles
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('3', 'Guest role', $FILE{/com/unicenta/pos/templates/Role.Guest.xml} );
|
||||
|
||||
-- ADD people
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('0', 'Administrator', NULL, '0', 1, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('1', 'Manager', NULL, '1', 1, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('2', 'Employee', NULL, '2', 1, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('3', 'Guest', NULL, '3', 1, NULL);
|
||||
|
||||
-- ADD resources --
|
||||
-- SYSTEM
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('00', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('02', 'Cash.Close', 0, $FILE{/com/unicenta/pos/templates/Cash.Close.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('03', 'Customer.Created', 0, $FILE{/com/unicenta/pos/templates/customer.created.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('04', 'Customer.Deleted', 0, $FILE{/com/unicenta/pos/templates/customer.deleted.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('05', 'Customer.Updated', 0, $FILE{/com/unicenta/pos/templates/customer.updated.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('06', 'payment.cash', 0, $FILE{/com/unicenta/pos/templates/payment.cash.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('07', 'Ticket.Buttons', 0, $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('08', 'Ticket.Close', 0, $FILE{/com/unicenta/pos/templates/Ticket.Close.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('09', 'Ticket.Line', 0, $FILE{/com/unicenta/pos/templates/Ticket.Line.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('10', 'Window.Title', 0, $FILE{/com/unicenta/pos/templates/Window.Title.txt});
|
||||
|
||||
-- IMAGES
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('11', 'img.001', 1, $FILE{/com/unicenta/images/.01.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('12', 'img.002', 1, $FILE{/com/unicenta/images/.02.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('13', 'img.005', 1, $FILE{/com/unicenta/images/.05.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('14', 'img.010', 1, $FILE{/com/unicenta/images/.10.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('15', 'img.020', 1, $FILE{/com/unicenta/images/.20.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('16', 'img.025', 1, $FILE{/com/unicenta/images/.25.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('17', 'img.050', 1, $FILE{/com/unicenta/images/.50.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('18', 'img.1', 1, $FILE{/com/unicenta/images/1.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('19', 'img.2', 1, $FILE{/com/unicenta/images/2.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('20', 'img.5', 1, $FILE{/com/unicenta/images/5.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('21', 'img.10', 1, $FILE{/com/unicenta/images/10.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('22', 'img.20', 1, $FILE{/com/unicenta/images/20.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('23', 'img.50', 1, $FILE{/com/unicenta/images/50.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('24', 'img.100', 1, $FILE{/com/unicenta/images/100.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('25', 'img.200', 1, $FILE{/com/unicenta/images/200.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('26', 'img.500', 1, $FILE{/com/unicenta/images/500.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('27', 'img.1000', 1, $FILE{/com/unicenta/images/1000.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('28', 'img.cash', 1, $FILE{/com/unicenta/images/cash.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('29', 'img.cashdrawer', 1, $FILE{/com/unicenta/images/cashdrawer.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('30', 'img.discount', 1, $FILE{/com/unicenta/images/discount.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('31', 'img.discount_b', 1, $FILE{/com/unicenta/images/discount_b.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('32', 'img.heart', 1, $FILE{/com/unicenta/images/heart.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('33', 'img.keyboard_48', 1, $FILE{/com/unicenta/images/keyboard_48.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('34', 'img.kit_print', 1, $FILE{/com/unicenta/images/kit_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('35', 'img.no_photo', 1, $FILE{/com/unicenta/images/no_photo.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('36', 'img.refundit', 1, $FILE{/com/unicenta/images/refundit.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('37', 'img.run_script', 1, $FILE{/com/unicenta/images/run_script.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('38', 'img.ticket_print', 1, $FILE{/com/unicenta/images/ticket_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('40', 'Printer.Ticket.Logo', 1, $FILE{/com/unicenta/images/printer.ticket.logo.jpg});
|
||||
|
||||
-- PRINTER
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('41', 'Printer.CloseCash.Preview', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.Preview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('42', 'Printer.CloseCash', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('43', 'Printer.CustomerPaid', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('44', 'Printer.CustomerPaid2', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('45', 'Printer.FiscalTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.FiscalTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('46', 'Printer.Inventory', 0, $FILE{/com/unicenta/pos/templates/Printer.Inventory.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('47', 'Printer.OpenDrawer', 0, $FILE{/com/unicenta/pos/templates/Printer.OpenDrawer.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('48', 'Printer.PartialCash', 0, $FILE{/com/unicenta/pos/templates/Printer.PartialCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('49', 'Printer.PrintLastTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.PrintLastTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('50', 'Printer.Product', 0, $FILE{/com/unicenta/pos/templates/Printer.Product.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('52', 'Printer.ReprintTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.ReprintTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('53', 'Printer.Start', 0, $FILE{/com/unicenta/pos/templates/Printer.Start.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('54', 'Printer.Ticket.P1', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P1.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('55', 'Printer.Ticket.P2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('56', 'Printer.Ticket.P3', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P3.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('57', 'Printer.Ticket.P4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('58', 'Printer.Ticket.P5', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P5.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('59', 'Printer.Ticket.P6', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P6.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('60', 'Printer.Ticket', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('61', 'Printer.Ticket2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('62', 'Printer.TicketClose', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketClose.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('63', 'Printer.TicketLine', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('64', 'Printer.TicketNew', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('65', 'Printer.TicketPreview', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('66', 'Printer.Ticket_A4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket_A4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('67', 'Printer.TicketPreview_A4', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview_A4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('68', 'Printer.TicketRemote', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketRemote.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('69', 'Printer.TicketTotal', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketTotal.xml});
|
||||
|
||||
-- SCRIPTS
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('70', 'script.Keyboard', 0, $FILE{/com/unicenta/pos/templates/script.Keyboard.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('71', 'script.Linediscount', 0, $FILE{/com/unicenta/pos/templates/script.Linediscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('73', 'script.SendOrder', 0, $FILE{/com/unicenta/pos/templates/script.SendOrder.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('74', 'script.Totaldiscount', 0, $FILE{/com/unicenta/pos/templates/script.Totaldiscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('75', 'script.multibuy', 0, $FILE{/com/unicenta/pos/templates/script.multibuy.txt});
|
||||
|
||||
-- ADD CATEGORIES
|
||||
INSERT INTO categories(id, name) VALUES ('000', 'Category Standard');
|
||||
|
||||
-- ADD TAXCATEGORIES
|
||||
/* 002 added 31/01/2017 00:00:00. */
|
||||
INSERT INTO taxcategories(id, name) VALUES ('000', 'Tax Exempt');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('001', 'Tax Standard');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('002', 'Tax Other');
|
||||
|
||||
-- ADD TAXES
|
||||
/* 002 added 31/01/2017 00:00:00. */
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('000', 'Tax Exempt', '000', NULL, NULL, 0, 0, NULL);
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('001', 'Tax Standard', '001', NULL, NULL, 0.20, 0, NULL);
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('002', 'Tax Other', '002', NULL, NULL, 0, 0, NULL);
|
||||
|
||||
-- ADD PRODUCTS
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx999_999xxx_x9x9x9', 'xxx999', 'xxx999', 'Free Line entry', '000', '001', 1, '<html><center>Free Line entry', '1');
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx998_998xxx_x8x8x8', 'xxx998', 'xxx998', 'Service Charge', '000', '001', 1, '<html><center>Service Charge', '1');
|
||||
|
||||
-- ADD PRODUCTS_CAT
|
||||
INSERT INTO products_cat(product) VALUES ('xxx999_999xxx_x9x9x9');
|
||||
INSERT INTO products_cat(product) VALUES ('xxx998_998xxx_x8x8x8');
|
||||
|
||||
-- ADD LOCATION
|
||||
INSERT INTO locations(id, name, address) VALUES ('0','Location 1','Local');
|
||||
|
||||
-- ADD SUPPLIERS
|
||||
INSERT INTO suppliers(id, searchkey, name) VALUES ('0','unicenta','unicenta');
|
||||
|
||||
-- ADD UOM
|
||||
INSERT INTO uom(id, name) VALUES ('0','Each');
|
||||
|
||||
-- ADD FLOORS
|
||||
INSERT INTO floors(id, name, image) VALUES ('0', 'Restaurant floor', $FILE{/com/unicenta/images/paperboard960_600.png});
|
||||
|
||||
-- ADD PLACES
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('1', 'Table 1', 100, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('2', 'Table 2', 250, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('3', 'Table 3', 400, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('4', 'Table 4', 550, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('5', 'Table 5', 700, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('6', 'Table 6', 850, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('7', 'Table 7', 100, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('8', 'Table 8', 250, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('9', 'Table 9', 400, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('10', 'Table 10', 550, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('11', 'Table 11', 700, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('12', 'Table 12', 850, 150, '0', '1', 90, 45);
|
||||
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('13', 'Table 13', 100, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('14', 'Table 14', 250, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('15', 'Table 15', 400, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('16', 'Table 16', 550, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('17', 'Table 17', 700, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('18', 'Table 18', 850, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('19', 'Table 19', 100, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('20', 'Table 20', 250, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('21', 'Table 21', 400, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('22', 'Table 22', 550, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('23', 'Table 23', 700, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('24', 'Table 24', 850, 350, '0', '1', 90, 45);
|
||||
|
||||
-- ADD SHIFTS
|
||||
INSERT INTO shifts(id, startshift, endshift, pplid) VALUES ('0', '2018-01-01 00:00:00.001', '2018-01-01 00:00:00.002','0');
|
||||
|
||||
-- ADD BREAKS
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('0', 'Lunch Break', 1, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('1', 'Tea Break', 1, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('2', 'Mid Break', 1, NULL);
|
||||
|
||||
-- ADD SHIFT_BREAKS
|
||||
INSERT INTO shift_breaks(id, shiftid, breakid, starttime, endtime) VALUES ('0', '0', '0', '2018-01-01 00:00:00.003', '2018-01-01 00:00:00.004');
|
||||
|
||||
-- ADD SEQUENCES
|
||||
INSERT INTO pickup_number VALUES(1);
|
||||
INSERT INTO ticketsnum VALUES(1);
|
||||
INSERT INTO ticketsnum_refund VALUES(1);
|
||||
INSERT INTO ticketsnum_payment VALUES(1);
|
||||
|
||||
-- ADD APPLICATION VERSION
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,61 @@
|
||||
-- CLEAR THE DECKS
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
-- Switch OFF table foreign key relationships
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- RECREATE applications table
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
|
||||
-- SYSTEM
|
||||
DELETE FROM resources WHERE name = 'script.posapps';
|
||||
|
||||
|
||||
DELETE FROM resources WHERE id = '0';
|
||||
DELETE FROM resources WHERE id = '00';
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('00', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml} WHERE name = 'Ticket.Buttons';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml} WHERE name = 'Printer.Ticket';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Ticket.Close.xml} WHERE name = 'Ticket.Close';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Cash.Close.xml} WHERE name = 'Cash.Close';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/customer.created.xml} WHERE name = 'Customer.Created';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/customer.deleted.xml} WHERE name = 'Customer.Deleted';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/customer.updated.xml} WHERE name = 'Customer.Updated';
|
||||
COMMIT;
|
||||
|
||||
-- ROLES
|
||||
DELETE FROM roles WHERE id = '0';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
DELETE FROM roles WHERE id = '1';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
DELETE FROM roles WHERE id = '2';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
|
||||
|
||||
-- Switch ON table foreign key relationships
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,191 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2017 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 07/08/2016 08:00:00
|
||||
* Modified 10 Sept 2017
|
||||
* Called by Transfer for v4.4 after data complete
|
||||
*/
|
||||
|
||||
-- ----------------------------
|
||||
-- FOREIGN KEYS AND CONSTRAINTS
|
||||
-- ----------------------------
|
||||
set foreign_key_checks = 1;
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- Update foreign keys of attributeinstance
|
||||
ALTER TABLE `attributeinstance` ADD CONSTRAINT `attinst_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` );
|
||||
|
||||
ALTER TABLE `attributeinstance` ADD CONSTRAINT `attinst_set`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributesetinstance
|
||||
ALTER TABLE `attributesetinstance` ADD CONSTRAINT `attsetinst_set`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributeuse
|
||||
ALTER TABLE `attributeuse` ADD CONSTRAINT `attuse_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` );
|
||||
|
||||
ALTER TABLE `attributeuse` ADD CONSTRAINT `attuse_set`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributevalue
|
||||
ALTER TABLE `attributevalue` ADD CONSTRAINT `attval_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of categories
|
||||
ALTER TABLE `categories` ADD CONSTRAINT `categories_fk_1`
|
||||
FOREIGN KEY ( `parentid` ) REFERENCES `categories` ( `id` );
|
||||
|
||||
-- Update foreign keys of customers
|
||||
ALTER TABLE `customers` ADD CONSTRAINT `customers_taxcat`
|
||||
FOREIGN KEY ( `taxcategory` ) REFERENCES `taxcustcategories` ( `id` );
|
||||
|
||||
-- Update foreign keys of leaves
|
||||
ALTER TABLE `leaves` ADD CONSTRAINT `leaves_pplid`
|
||||
FOREIGN KEY ( `pplid` ) REFERENCES `people` ( `id` );
|
||||
|
||||
-- Update foreign keys of payments
|
||||
ALTER TABLE `payments` ADD CONSTRAINT `payments_fk_receipt`
|
||||
FOREIGN KEY ( `receipt` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
-- Update foreign keys of people
|
||||
ALTER TABLE `people` ADD CONSTRAINT `people_fk_1`
|
||||
FOREIGN KEY ( `role` ) REFERENCES `roles` ( `id` );
|
||||
|
||||
-- Update Indeces of products
|
||||
ALTER TABLE `products` ADD UNIQUE INDEX `products_inx_0` ( `reference` );
|
||||
ALTER TABLE `products` ADD UNIQUE INDEX `products_inx_1` ( `code` );
|
||||
ALTER TABLE `products` ADD INDEX `products_name_inx` ( `name` );
|
||||
-- Update foreign keys of products
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_attrset_fk`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` );
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_fk_1`
|
||||
FOREIGN KEY ( `category` ) REFERENCES `categories` ( `id` );
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_taxcat_fk`
|
||||
FOREIGN KEY ( `taxcat` ) REFERENCES `taxcategories` ( `id` );
|
||||
|
||||
-- Update foreign keys of product_bundle
|
||||
ALTER TABLE `products_bundle` ADD CONSTRAINT `products_bundle_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products`( `id` );
|
||||
|
||||
ALTER TABLE `products_bundle` ADD CONSTRAINT `products_bundle_fk_2`
|
||||
FOREIGN KEY ( `product_bundle` ) REFERENCES `products`( `id` );
|
||||
|
||||
-- Update foreign keys of products_cat
|
||||
ALTER TABLE `products_cat` ADD CONSTRAINT `products_cat_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of products_com
|
||||
ALTER TABLE `products_com` ADD CONSTRAINT `products_com_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `products_com` ADD CONSTRAINT `products_com_fk_2`
|
||||
FOREIGN KEY ( `product2` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of receipts
|
||||
ALTER TABLE `receipts` ADD CONSTRAINT `receipts_fk_money`
|
||||
FOREIGN KEY ( `money` ) REFERENCES `closedcash` ( `money` );
|
||||
|
||||
-- Update foreign keys of reservation_customers
|
||||
ALTER TABLE `reservation_customers` ADD CONSTRAINT `res_cust_fk_1`
|
||||
FOREIGN KEY ( `id` ) REFERENCES `reservations` ( `id` );
|
||||
|
||||
ALTER TABLE `reservation_customers` ADD CONSTRAINT `res_cust_fk_2`
|
||||
FOREIGN KEY ( `customer` ) REFERENCES `customers` ( `id` );
|
||||
|
||||
-- Update foreign keys of shift_breaks
|
||||
ALTER TABLE `shift_breaks` ADD CONSTRAINT `shift_breaks_breakid`
|
||||
FOREIGN KEY ( `breakid` ) REFERENCES `breaks` ( `id` );
|
||||
|
||||
ALTER TABLE `shift_breaks` ADD CONSTRAINT `shift_breaks_shiftid`
|
||||
FOREIGN KEY ( `shiftid` ) REFERENCES `shifts` ( `id` );
|
||||
|
||||
-- Update foreign keys of stockcurrent
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_fk_2`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
-- Update foreign keys of stockdiary
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_fk_2`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
-- Update foreign keys of stocklevel
|
||||
ALTER TABLE `stocklevel` ADD CONSTRAINT `stocklevel_location`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
ALTER TABLE `stocklevel` ADD CONSTRAINT `stocklevel_product`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of taxes
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_cat_fk`
|
||||
FOREIGN KEY ( `category` ) REFERENCES `taxcategories` ( `id` );
|
||||
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_custcat_fk`
|
||||
FOREIGN KEY ( `custcategory` ) REFERENCES `taxcustcategories` ( `id` );
|
||||
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_taxes_fk`
|
||||
FOREIGN KEY ( `parentid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
-- Update foreign keys of taxlines
|
||||
ALTER TABLE `taxlines` ADD CONSTRAINT `taxlines_receipt`
|
||||
FOREIGN KEY ( `receipt` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
ALTER TABLE `taxlines` ADD CONSTRAINT `taxlines_tax`
|
||||
FOREIGN KEY ( `taxid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
-- Update foreign keys of ticketlines
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_2`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_3`
|
||||
FOREIGN KEY ( `taxid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_ticket`
|
||||
FOREIGN KEY ( `ticket` ) REFERENCES `tickets` ( `id` );
|
||||
|
||||
-- Update foreign keys of tickets
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_customers_fk`
|
||||
FOREIGN KEY ( `customer` ) REFERENCES `customers` ( `id` );
|
||||
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_fk_2`
|
||||
FOREIGN KEY ( `person` ) REFERENCES `people` ( `id` );
|
||||
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_fk_id`
|
||||
FOREIGN KEY ( `id` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
-- *****************************************************************************
|
||||
@@ -0,0 +1,818 @@
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 23/07/2016 08:00:00
|
||||
*
|
||||
* Check DB tables.
|
||||
*/
|
||||
|
||||
/* Header line. Object: applications. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attribute. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attribute` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributeinstance. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributeinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) default NULL,
|
||||
KEY `attinst_att` ( `attribute_id` ),
|
||||
KEY `attinst_set` ( `attributesetinstance_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributeset. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributeset` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributesetinstance. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributesetinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
KEY `attsetinst_set` ( `attributeset_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributeuse. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributeuse` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`lineno` int(11) default NULL,
|
||||
KEY `attuse_att` ( `attribute_id` ),
|
||||
UNIQUE INDEX `attuse_line` ( `attributeset_id`, `lineno` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributevalue. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributevalue` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) default NULL,
|
||||
KEY `attval_att` ( `attribute_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: breaks. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`visible` tinyint(1) NOT NULL default '1',
|
||||
`notes` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: categories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `categories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`parentid` varchar(255) default NULL,
|
||||
`image` mediumblob default NULL,
|
||||
`texttip` varchar(255) default NULL,
|
||||
`catshowname` smallint(6) NOT NULL default '1',
|
||||
`catorder` varchar(255) default NULL,
|
||||
KEY `categories_fk_1` ( `parentid` ),
|
||||
UNIQUE INDEX `categories_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: closedcash. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `closedcash` (
|
||||
`money` varchar(255) NOT NULL,
|
||||
`host` varchar(255) NOT NULL,
|
||||
`hostsequence` int(11) NOT NULL,
|
||||
`datestart` datetime NOT NULL,
|
||||
`dateend` datetime default NULL,
|
||||
`nosales` int(11) NOT NULL default '0',
|
||||
KEY `closedcash_inx_1` ( `datestart` ),
|
||||
UNIQUE INDEX `closedcash_inx_seq` ( `host`, `hostsequence` ),
|
||||
PRIMARY KEY ( `money` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: csvimport. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `csvimport` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`rownumber` varchar(255) default NULL,
|
||||
`csverror` varchar(255) default NULL,
|
||||
`reference` varchar(255) default NULL,
|
||||
`code` varchar(255) default NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`pricebuy` double default NULL,
|
||||
`pricesell` double default NULL,
|
||||
`previousbuy` double default NULL,
|
||||
`previoussell` double default NULL,
|
||||
`category` varchar(255) default NULL,
|
||||
`tax` varchar(255) default NULL,
|
||||
`searchkey` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: customers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`taxcategory` varchar(255) default NULL,
|
||||
`card` varchar(255) default NULL,
|
||||
`maxdebt` double NOT NULL default '0',
|
||||
`address` varchar(255) default NULL,
|
||||
`address2` varchar(255) default NULL,
|
||||
`postal` varchar(255) default NULL,
|
||||
`city` varchar(255) default NULL,
|
||||
`region` varchar(255) default NULL,
|
||||
`country` varchar(255) default NULL,
|
||||
`firstname` varchar(255) default NULL,
|
||||
`lastname` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`phone` varchar(255) default NULL,
|
||||
`phone2` varchar(255) default NULL,
|
||||
`fax` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`visible` bit(1) NOT NULL default b'1',
|
||||
`curdate` datetime default NULL,
|
||||
`curdebt` double default '0',
|
||||
`image` mediumblob default NULL,
|
||||
`isvip` bit(1) NOT NULL default b'0',
|
||||
`discount` double default '0',
|
||||
`memodate` datetime default '1900-01-01 00:00:01',
|
||||
KEY `customers_card_inx` ( `card` ),
|
||||
KEY `customers_name_inx` ( `name` ),
|
||||
UNIQUE INDEX `customers_skey_inx` ( `searchkey` ),
|
||||
KEY `customers_taxcat` ( `taxcategory` ),
|
||||
KEY `customers_taxid_inx` ( `taxid` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: draweropened. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `draweropened` (
|
||||
`opendate` timestamp NOT NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: floors. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `floors` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`image` mediumblob default NULL,
|
||||
UNIQUE INDEX `floors_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: leaves. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `leaves` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`startdate` datetime NOT NULL,
|
||||
`enddate` datetime NOT NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
KEY `leaves_pplid` ( `pplid` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: lineremoved. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `lineremoved` (
|
||||
`removeddate` timestamp NOT NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL,
|
||||
`productid` varchar(255) default NULL,
|
||||
`productname` varchar(255) default NULL,
|
||||
`units` double NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: locations. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `locations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) default NULL,
|
||||
UNIQUE INDEX `locations_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: moorers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `moorers` (
|
||||
`vesselname` varchar(255) default NULL,
|
||||
`size` int(11) default NULL,
|
||||
`days` int(11) default NULL,
|
||||
`power` bit(1) NOT NULL default b'0'
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: orders. Script date: 01/01/2017 00:00:01. */
|
||||
CREATE TABLE IF NOT EXISTS `orders` (
|
||||
`id` int(11) NOT NULL,
|
||||
`orderid` varchar(50) DEFAULT NULL,
|
||||
`qty` int(11) DEFAULT '1',
|
||||
`details` varchar(255) DEFAULT NULL,
|
||||
`attributes` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(50) DEFAULT NULL,
|
||||
`ordertime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`displayid` int(11) DEFAULT '1',
|
||||
`auxiliary` int(11) DEFAULT NULL,
|
||||
`completetime` timestamp,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: payments. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `payments` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`payment` varchar(255) NOT NULL,
|
||||
`total` double NOT NULL default '0',
|
||||
`tip` double default '0',
|
||||
`transid` varchar(255) default NULL,
|
||||
`isprocessed` bit(1) default b'0',
|
||||
`returnmsg` mediumblob default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`tendered` double default NULL,
|
||||
`cardname` varchar(255) default NULL,
|
||||
`voucher` varchar(255) default NULL,
|
||||
KEY `payments_fk_receipt` ( `receipt` ),
|
||||
KEY `payments_inx_1` ( `payment` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: people. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `people` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`apppassword` varchar(255) default NULL,
|
||||
`card` varchar(255) default NULL,
|
||||
`role` varchar(255) NOT NULL,
|
||||
`visible` bit(1) NOT NULL,
|
||||
`image` mediumblob default NULL,
|
||||
KEY `people_card_inx` ( `card` ),
|
||||
KEY `people_fk_1` ( `role` ),
|
||||
UNIQUE INDEX `people_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: pickup_number. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `pickup_number` (
|
||||
`id` int(11) NOT NULL default '0'
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: places. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `places` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`x` int(11) NOT NULL,
|
||||
`y` int(11) NOT NULL,
|
||||
`floor` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) default NULL,
|
||||
`waiter` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL,
|
||||
`tablemoved` smallint(6) NOT NULL default '0',
|
||||
UNIQUE INDEX `places_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products. Script date: 02/04/2016 10:53:00. */
|
||||
CREATE TABLE IF NOT EXISTS `products` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`reference` varchar(255) NOT NULL,
|
||||
`code` varchar(255) NOT NULL,
|
||||
`codetype` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`pricebuy` double NOT NULL default '0',
|
||||
`pricesell` double NOT NULL default '0',
|
||||
`category` varchar(255) NOT NULL,
|
||||
`taxcat` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) default NULL,
|
||||
`stockcost` double NOT NULL default '0',
|
||||
`stockvolume` double NOT NULL default '0',
|
||||
`image` mediumblob default NULL,
|
||||
`iscom` bit(1) NOT NULL default b'0',
|
||||
`isscale` bit(1) NOT NULL default b'0',
|
||||
`isconstant` bit(1) NOT NULL default b'0',
|
||||
`printkb` bit(1) NOT NULL default b'0',
|
||||
`sendstatus` bit(1) NOT NULL default b'0',
|
||||
`isservice` bit(1) NOT NULL default b'0',
|
||||
`attributes` mediumblob default NULL,
|
||||
`display` varchar(255) default NULL,
|
||||
`isvprice` smallint(6) NOT NULL default '0',
|
||||
`isverpatrib` smallint(6) NOT NULL default '0',
|
||||
`texttip` varchar(255) default NULL,
|
||||
`warranty` smallint(6) NOT NULL default '0',
|
||||
`stockunits` double NOT NULL default '0',
|
||||
`printto` varchar(255) default '1',
|
||||
`supplier` varchar(255) default NULL,
|
||||
`uom` varchar(255) default '0',
|
||||
`memodate` datetime default '1900-01-01 00:00:01',
|
||||
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `products_attrset_fx` ( `attributeset_id` ),
|
||||
KEY `products_fk_1` ( `category` ),
|
||||
UNIQUE INDEX `products_inx_0` ( `reference` ),
|
||||
UNIQUE INDEX `products_inx_1` ( `code` ),
|
||||
INDEX `products_name_inx` ( `name` ),
|
||||
KEY `products_taxcat_fk` ( `taxcat` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products_cat. Script date: 11/05/2016 05:25:00. */
|
||||
CREATE TABLE IF NOT EXISTS `products_bundle` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` VARCHAR(255) NOT NULL,
|
||||
`product_bundle` VARCHAR(255) NOT NULL,
|
||||
`quantity` DOUBLE NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `pbundle_inx_prod` ( `product` , `product_bundle` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products_cat. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `products_cat` (
|
||||
`product` varchar(255) NOT NULL,
|
||||
`catorder` int(11) default NULL,
|
||||
PRIMARY KEY ( `product` ),
|
||||
KEY `products_cat_inx_1` ( `catorder` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products_com. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `products_com` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`product2` varchar(255) NOT NULL,
|
||||
UNIQUE INDEX `pcom_inx_prod` ( `product`, `product2` ),
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `products_com_fk_2` ( `product2` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: receipts. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `receipts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`money` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`attributes` mediumblob default NULL,
|
||||
`person` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `receipts_fk_money` ( `money` ),
|
||||
KEY `receipts_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: reservation_customers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `reservation_customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `res_cust_fk_2` ( `customer` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: reservations. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `reservations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`created` datetime NOT NULL,
|
||||
`datenew` datetime NOT NULL default '2016-01-01 00:00:00',
|
||||
`title` varchar(255) NOT NULL,
|
||||
`chairs` int(11) NOT NULL,
|
||||
`isdone` bit(1) NOT NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `reservations_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: resources. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `resources` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`restype` int(11) NOT NULL,
|
||||
`content` mediumblob default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `resources_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: roles. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `roles` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`permissions` mediumblob default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `roles_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: sharedtickets. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `sharedtickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`content` mediumblob default NULL,
|
||||
`appuser` varchar(255) default NULL,
|
||||
`pickupid` int(11) NOT NULL default '0',
|
||||
`locked` varchar(20) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: shift_breaks. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `shift_breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`shiftid` varchar(255) NOT NULL,
|
||||
`breakid` varchar(255) NOT NULL,
|
||||
`starttime` timestamp NOT NULL,
|
||||
`endtime` timestamp NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `shift_breaks_breakid` ( `breakid` ),
|
||||
KEY `shift_breaks_shiftid` ( `shiftid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: shifts. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `shifts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`startshift` datetime NOT NULL,
|
||||
`endshift` datetime default NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: stockcurrent. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `stockcurrent` (
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
KEY `stockcurrent_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `stockcurrent_fk_1` ( `product` ),
|
||||
UNIQUE INDEX `stockcurrent_inx` ( `location`, `product`, `attributesetinstance_id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: stockdiary. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `stockdiary` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`reason` int(11) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`appuser` varchar(255) default NULL,
|
||||
`supplier` varchar(255) default NULL,
|
||||
`supplierdoc` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `stockdiary_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `stockdiary_fk_1` ( `product` ),
|
||||
KEY `stockdiary_fk_2` ( `location` ),
|
||||
KEY `stockdiary_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: stocklevel. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `stocklevel` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`stocksecurity` double default NULL,
|
||||
`stockmaximum` double default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `stocklevel_location` ( `location` ),
|
||||
KEY `stocklevel_product` ( `product` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: suppliers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `suppliers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`maxdebt` double NOT NULL default '0',
|
||||
`address` varchar(255) default NULL,
|
||||
`address2` varchar(255) default NULL,
|
||||
`postal` varchar(255) default NULL,
|
||||
`city` varchar(255) default NULL,
|
||||
`region` varchar(255) default NULL,
|
||||
`country` varchar(255) default NULL,
|
||||
`firstname` varchar(255) default NULL,
|
||||
`lastname` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`phone` varchar(255) default NULL,
|
||||
`phone2` varchar(255) default NULL,
|
||||
`fax` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`visible` bit(1) NOT NULL default b'1',
|
||||
`curdate` datetime default NULL,
|
||||
`curdebt` double default '0',
|
||||
`vatid` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `suppliers_name_inx` ( `name` ),
|
||||
UNIQUE INDEX `suppliers_skey_inx` ( `searchkey` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxcategories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `taxcat_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxcustcategories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxcustcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `taxcustcat_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxes. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxes` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`category` varchar(255) NOT NULL,
|
||||
`custcategory` varchar(255) default NULL,
|
||||
`parentid` varchar(255) default NULL,
|
||||
`rate` double NOT NULL default '0',
|
||||
`ratecascade` bit(1) NOT NULL default b'0',
|
||||
`rateorder` int(11) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `taxes_cat_fk` ( `category` ),
|
||||
KEY `taxes_custcat_fk` ( `custcategory` ),
|
||||
UNIQUE INDEX `taxes_name_inx` ( `name` ),
|
||||
KEY `taxes_taxes_fk` ( `parentid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxlines. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxlines` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`base` double NOT NULL default '0',
|
||||
`amount` double NOT NULL default '0',
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `taxlines_receipt` ( `receipt` ),
|
||||
KEY `taxlines_tax` ( `taxid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxsuppcategories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxsuppcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: thirdparties. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `thirdparties` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`cif` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) default NULL,
|
||||
`contactcomm` varchar(255) default NULL,
|
||||
`contactfact` varchar(255) default NULL,
|
||||
`payrule` varchar(255) default NULL,
|
||||
`faxnumber` varchar(255) default NULL,
|
||||
`phonenumber` varchar(255) default NULL,
|
||||
`mobilenumber` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`webpage` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `thirdparties_cif_inx` ( `cif` ),
|
||||
UNIQUE INDEX `thirdparties_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketlines. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketlines` (
|
||||
`ticket` varchar(255) NOT NULL,
|
||||
`line` int(11) NOT NULL,
|
||||
`product` varchar(255) default NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`attributes` mediumblob default NULL,
|
||||
PRIMARY KEY ( `ticket`, `line` ),
|
||||
KEY `ticketlines_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `ticketlines_fk_2` ( `product` ),
|
||||
KEY `ticketlines_fk_3` ( `taxid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: tickets. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `tickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`tickettype` int(11) NOT NULL default '0',
|
||||
`ticketid` int(11) NOT NULL,
|
||||
`person` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) default NULL,
|
||||
`status` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `tickets_customers_fk` ( `customer` ),
|
||||
KEY `tickets_fk_2` ( `person` ),
|
||||
KEY `tickets_ticketid` ( `tickettype`, `ticketid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketsnum. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketsnum` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketsnum_payment. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketsnum_payment` (
|
||||
`id` int(11) NOT NULL auto_increment,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketsnum_refund. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketsnum_refund` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: uom. Script date: 30/09/2015 13:07:00. */
|
||||
CREATE TABLE IF NOT EXISTS `uom` (
|
||||
`id` VARCHAR(255) NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 30/09/2015 09:33:33. */
|
||||
CREATE TABLE IF NOT EXISTS `vouchers` (
|
||||
`id` VARCHAR(100) NOT NULL,
|
||||
`voucher_number` VARCHAR(100) DEFAULT NULL,
|
||||
`customer` VARCHAR(100) DEFAULT NULL,
|
||||
`amount` DOUBLE DEFAULT NULL,
|
||||
`status` CHAR(1) DEFAULT 'A',
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
-- ----------------------------
|
||||
-- FOREIGN KEYS AND CONSTRAINTS
|
||||
-- ----------------------------
|
||||
-- Update foreign keys of attributeinstance
|
||||
ALTER TABLE `attributeinstance` ADD CONSTRAINT `attinst_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` );
|
||||
|
||||
ALTER TABLE `attributeinstance` ADD CONSTRAINT `attinst_set`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributesetinstance
|
||||
ALTER TABLE `attributesetinstance` ADD CONSTRAINT `attsetinst_set`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributeuse
|
||||
ALTER TABLE `attributeuse` ADD CONSTRAINT `attuse_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` );
|
||||
|
||||
ALTER TABLE `attributeuse` ADD CONSTRAINT `attuse_set`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributevalue
|
||||
ALTER TABLE `attributevalue` ADD CONSTRAINT `attval_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of categories
|
||||
ALTER TABLE `categories` ADD CONSTRAINT `categories_fk_1`
|
||||
FOREIGN KEY ( `parentid` ) REFERENCES `categories` ( `id` );
|
||||
|
||||
-- Update foreign keys of customers
|
||||
ALTER TABLE `customers` ADD CONSTRAINT `customers_taxcat`
|
||||
FOREIGN KEY ( `taxcategory` ) REFERENCES `taxcustcategories` ( `id` );
|
||||
|
||||
-- Update foreign keys of leaves
|
||||
ALTER TABLE `leaves` ADD CONSTRAINT `leaves_pplid`
|
||||
FOREIGN KEY ( `pplid` ) REFERENCES `people` ( `id` );
|
||||
|
||||
-- Update foreign keys of payments
|
||||
ALTER TABLE `payments` ADD CONSTRAINT `payments_fk_receipt`
|
||||
FOREIGN KEY ( `receipt` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
-- Update foreign keys of people
|
||||
ALTER TABLE `people` ADD CONSTRAINT `people_fk_1`
|
||||
FOREIGN KEY ( `role` ) REFERENCES `roles` ( `id` );
|
||||
|
||||
-- Update foreign keys of products
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_attrset_fk`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` );
|
||||
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_fk_1`
|
||||
FOREIGN KEY ( `category` ) REFERENCES `categories` ( `id` );
|
||||
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_taxcat_fk`
|
||||
FOREIGN KEY ( `taxcat` ) REFERENCES `taxcategories` ( `id` );
|
||||
|
||||
-- Update foreign keys of product_bundle
|
||||
ALTER TABLE `products_bundle` ADD CONSTRAINT `products_bundle_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products`( `id` );
|
||||
|
||||
ALTER TABLE `products_bundle` ADD CONSTRAINT `products_bundle_fk_2`
|
||||
FOREIGN KEY ( `product_bundle` ) REFERENCES `products`( `id` );
|
||||
|
||||
-- Update foreign keys of products_cat
|
||||
ALTER TABLE `products_cat` ADD CONSTRAINT `products_cat_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of products_com
|
||||
ALTER TABLE `products_com` ADD CONSTRAINT `products_com_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `products_com` ADD CONSTRAINT `products_com_fk_2`
|
||||
FOREIGN KEY ( `product2` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of receipts
|
||||
ALTER TABLE `receipts` ADD CONSTRAINT `receipts_fk_money`
|
||||
FOREIGN KEY ( `money` ) REFERENCES `closedcash` ( `money` );
|
||||
|
||||
-- Update foreign keys of reservation_customers
|
||||
ALTER TABLE `reservation_customers` ADD CONSTRAINT `res_cust_fk_1`
|
||||
FOREIGN KEY ( `id` ) REFERENCES `reservations` ( `id` );
|
||||
|
||||
ALTER TABLE `reservation_customers` ADD CONSTRAINT `res_cust_fk_2`
|
||||
FOREIGN KEY ( `customer` ) REFERENCES `customers` ( `id` );
|
||||
|
||||
-- Update foreign keys of shift_breaks
|
||||
ALTER TABLE `shift_breaks` ADD CONSTRAINT `shift_breaks_breakid`
|
||||
FOREIGN KEY ( `breakid` ) REFERENCES `breaks` ( `id` );
|
||||
|
||||
ALTER TABLE `shift_breaks` ADD CONSTRAINT `shift_breaks_shiftid`
|
||||
FOREIGN KEY ( `shiftid` ) REFERENCES `shifts` ( `id` );
|
||||
|
||||
-- Update foreign keys of stockcurrent
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_fk_2`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
-- Update foreign keys of stockdiary
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_fk_2`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
-- Update foreign keys of stocklevel
|
||||
ALTER TABLE `stocklevel` ADD CONSTRAINT `stocklevel_location`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
ALTER TABLE `stocklevel` ADD CONSTRAINT `stocklevel_product`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of taxes
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_cat_fk`
|
||||
FOREIGN KEY ( `category` ) REFERENCES `taxcategories` ( `id` );
|
||||
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_custcat_fk`
|
||||
FOREIGN KEY ( `custcategory` ) REFERENCES `taxcustcategories` ( `id` );
|
||||
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_taxes_fk`
|
||||
FOREIGN KEY ( `parentid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
-- Update foreign keys of taxlines
|
||||
ALTER TABLE `taxlines` ADD CONSTRAINT `taxlines_receipt`
|
||||
FOREIGN KEY ( `receipt` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
ALTER TABLE `taxlines` ADD CONSTRAINT `taxlines_tax`
|
||||
FOREIGN KEY ( `taxid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
-- Update foreign keys of ticketlines
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_2`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_3`
|
||||
FOREIGN KEY ( `taxid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_ticket`
|
||||
FOREIGN KEY ( `ticket` ) REFERENCES `tickets` ( `id` );
|
||||
|
||||
-- Update foreign keys of tickets
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_customers_fk`
|
||||
FOREIGN KEY ( `customer` ) REFERENCES `customers` ( `id` );
|
||||
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_fk_2`
|
||||
FOREIGN KEY ( `person` ) REFERENCES `people` ( `id` );
|
||||
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_fk_id`
|
||||
FOREIGN KEY ( `id` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
-- *****************************************************************************
|
||||
@@ -0,0 +1,57 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2017 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 21/04/2017 08:00:00
|
||||
* Modified 21 Apr 2017 to lowercase
|
||||
* Called by Transfer for v4.2 after MySQL-create-transfer.sql
|
||||
*/
|
||||
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- drop default data
|
||||
delete from people where `id` not in ('0');
|
||||
delete from categories;
|
||||
delete from taxcategories;
|
||||
delete from taxcustcategories;
|
||||
delete from taxes;
|
||||
delete from locations;
|
||||
delete from floors;
|
||||
delete from places;
|
||||
delete from shifts;
|
||||
delete from breaks;
|
||||
delete from shift_breaks;
|
||||
delete from closedcash;
|
||||
delete from csvimport;
|
||||
-- delete from customers;
|
||||
delete FROM draweropened;
|
||||
delete FROM leaves;
|
||||
delete FROM lineremoved;
|
||||
delete FROM payments;
|
||||
delete FROM products_cat;
|
||||
delete FROM products_com;
|
||||
delete FROM products;
|
||||
delete FROM receipts;
|
||||
delete FROM roles;
|
||||
delete FROM stockcurrent;
|
||||
delete FROM stockdiary;
|
||||
delete FROM stocklevel;
|
||||
-- delete FROM suppliers;
|
||||
|
||||
set foreign_key_checks = 0;
|
||||
@@ -0,0 +1,45 @@
|
||||
|
||||
-- ADD STORED PROCEDURES
|
||||
|
||||
-- Example:
|
||||
-- call AddTblNotExist(Database(), 'atest');
|
||||
|
||||
CREATE PROCEDURE `AddTblNotExist`(
|
||||
IN dbName tinytext,
|
||||
IN tblName tinytext)
|
||||
begin
|
||||
IF NOT EXISTS (
|
||||
SELECT * FROM information_schema.TABLES
|
||||
WHERE table_name=tblName
|
||||
and table_schema=dbName
|
||||
)
|
||||
THEN
|
||||
set @ddl=CONCAT('CREATE TABLE ',dbName,'.',tblName);
|
||||
prepare stmt from @ddl;
|
||||
execute stmt;
|
||||
END IF;
|
||||
end
|
||||
|
||||
|
||||
-- Example:
|
||||
-- call AddColNotExist(Database(), 'atest', 'b', 'int unsigned not null default 1');
|
||||
|
||||
CREATE PROCEDURE `AddColNotExist`(
|
||||
IN dbName tinytext,
|
||||
IN tblName tinytext,
|
||||
IN fldName tinytext,
|
||||
IN fldDef text)
|
||||
begin
|
||||
IF NOT EXISTS (
|
||||
SELECT * FROM information_schema.COLUMNS
|
||||
WHERE column_name=fldName
|
||||
and table_name=tblName
|
||||
and table_schema=dbName
|
||||
)
|
||||
THEN
|
||||
set @ddl=CONCAT('ALTER TABLE ',dbName,'.',tblName,
|
||||
' ADD COLUMN ',fldName,' ',fldDef);
|
||||
prepare stmt from @ddl;
|
||||
execute stmt;
|
||||
END IF;
|
||||
end
|
||||
@@ -0,0 +1,666 @@
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 23/07/2016 08:00:00
|
||||
*
|
||||
* Create tables IF NOT EXISTS tablename.
|
||||
*/
|
||||
|
||||
-- DROP DATABASE IF EXISTS `unitest`;
|
||||
-- CREATE DATABASE IF NOT EXISTS `unitest`;
|
||||
-- USE `unitest`;
|
||||
|
||||
/* Header line. Object: applications. Script date: 23/07/2016 08:00:00 */
|
||||
-- RECREATE applications --
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
|
||||
/* Header line. Object: attribute. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attribute` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributeinstance. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributeinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) default NULL,
|
||||
KEY `attinst_att` ( `attribute_id` ),
|
||||
KEY `attinst_set` ( `attributesetinstance_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributeset. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributeset` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributesetinstance. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributesetinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
KEY `attsetinst_set` ( `attributeset_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributeuse. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributeuse` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`lineno` int(11) default NULL,
|
||||
KEY `attuse_att` ( `attribute_id` ),
|
||||
UNIQUE INDEX `attuse_line` ( `attributeset_id`, `lineno` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: attributevalue. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `attributevalue` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) default NULL,
|
||||
KEY `attval_att` ( `attribute_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: breaks. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`visible` tinyint(1) NOT NULL default '1',
|
||||
`notes` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: categories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `categories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`parentid` varchar(255) default NULL,
|
||||
`image` mediumblob default NULL,
|
||||
`texttip` varchar(255) default NULL,
|
||||
`catshowname` smallint(6) NOT NULL default '1',
|
||||
`catorder` varchar(255) default NULL,
|
||||
KEY `categories_fk_1` ( `parentid` ),
|
||||
UNIQUE INDEX `categories_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: closedcash. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `closedcash` (
|
||||
`money` varchar(255) NOT NULL,
|
||||
`host` varchar(255) NOT NULL,
|
||||
`hostsequence` int(11) NOT NULL,
|
||||
`datestart` datetime NOT NULL,
|
||||
`dateend` datetime default NULL,
|
||||
`nosales` int(11) NOT NULL default '0',
|
||||
KEY `closedcash_inx_1` ( `datestart` ),
|
||||
UNIQUE INDEX `closedcash_inx_seq` ( `host`, `hostsequence` ),
|
||||
PRIMARY KEY ( `money` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: csvimport. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `csvimport` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`rownumber` varchar(255) default NULL,
|
||||
`csverror` varchar(255) default NULL,
|
||||
`reference` varchar(255) default NULL,
|
||||
`code` varchar(255) default NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`pricebuy` double default NULL,
|
||||
`pricesell` double default NULL,
|
||||
`previousbuy` double default NULL,
|
||||
`previoussell` double default NULL,
|
||||
`category` varchar(255) default NULL,
|
||||
`tax` varchar(255) default NULL,
|
||||
`searchkey` varchar(255) default NULL
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: customers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`taxcategory` varchar(255) default NULL,
|
||||
`card` varchar(255) default NULL,
|
||||
`maxdebt` double NOT NULL default '0',
|
||||
`address` varchar(255) default NULL,
|
||||
`address2` varchar(255) default NULL,
|
||||
`postal` varchar(255) default NULL,
|
||||
`city` varchar(255) default NULL,
|
||||
`region` varchar(255) default NULL,
|
||||
`country` varchar(255) default NULL,
|
||||
`firstname` varchar(255) default NULL,
|
||||
`lastname` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`phone` varchar(255) default NULL,
|
||||
`phone2` varchar(255) default NULL,
|
||||
`fax` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`visible` bit(1) NOT NULL default b'1',
|
||||
`curdate` datetime default NULL,
|
||||
`curdebt` double default '0',
|
||||
`image` mediumblob default NULL,
|
||||
`isvip` bit(1) NOT NULL default b'0',
|
||||
`discount` double default '0',
|
||||
`memodate` datetime default NULL,
|
||||
KEY `customers_card_inx` ( `card` ),
|
||||
KEY `customers_name_inx` ( `name` ),
|
||||
UNIQUE INDEX `customers_skey_inx` ( `searchkey` ),
|
||||
KEY `customers_taxcat` ( `taxcategory` ),
|
||||
KEY `customers_taxid_inx` ( `taxid` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: draweropened. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `draweropened` (
|
||||
`opendate` timestamp NOT NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: floors. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `floors` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`image` mediumblob default NULL,
|
||||
UNIQUE INDEX `floors_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: leaves. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `leaves` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`startdate` datetime NOT NULL,
|
||||
`enddate` datetime NOT NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
KEY `leaves_pplid` ( `pplid` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: lineremoved. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `lineremoved` (
|
||||
`removeddate` timestamp NOT NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL,
|
||||
`productid` varchar(255) default NULL,
|
||||
`productname` varchar(255) default NULL,
|
||||
`units` double NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: locations. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `locations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) default NULL,
|
||||
UNIQUE INDEX `locations_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: moorers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `moorers` (
|
||||
`vesselname` varchar(255) default NULL,
|
||||
`size` int(11) default NULL,
|
||||
`days` int(11) default NULL,
|
||||
`power` bit(1) NOT NULL default b'0'
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: orders. Script date: 01/01/2017 00:00:01. */
|
||||
CREATE TABLE `orders` (
|
||||
`id` int(11) NOT NULL,
|
||||
`orderid` varchar(50) DEFAULT NULL,
|
||||
`qty` int(11) DEFAULT '1',
|
||||
`details` varchar(255) DEFAULT NULL,
|
||||
`attributes` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(50) DEFAULT NULL,
|
||||
`ordertime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`displayid` int(11) DEFAULT '1',
|
||||
`auxiliary` int(11) DEFAULT NULL,
|
||||
`completetime` timestamp,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: payments. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `payments` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`payment` varchar(255) NOT NULL,
|
||||
`total` double NOT NULL default '0',
|
||||
`tip` double default '0',
|
||||
`transid` varchar(255) default NULL,
|
||||
`isprocessed` bit(1) default b'0',
|
||||
`returnmsg` mediumblob default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`tendered` double default NULL,
|
||||
`cardname` varchar(255) default NULL,
|
||||
`voucher` varchar(255) default NULL,
|
||||
KEY `payments_fk_receipt` ( `receipt` ),
|
||||
KEY `payments_inx_1` ( `payment` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: people. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `people` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`apppassword` varchar(255) default NULL,
|
||||
`card` varchar(255) default NULL,
|
||||
`role` varchar(255) NOT NULL,
|
||||
`visible` bit(1) NOT NULL,
|
||||
`image` mediumblob default NULL,
|
||||
KEY `people_card_inx` ( `card` ),
|
||||
KEY `people_fk_1` ( `role` ),
|
||||
UNIQUE INDEX `people_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: pickup_number. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `pickup_number` (
|
||||
`id` int(11) NOT NULL default '0'
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: places. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `places` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`x` int(11) NOT NULL,
|
||||
`y` int(11) NOT NULL,
|
||||
`floor` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) default NULL,
|
||||
`waiter` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL,
|
||||
`tablemoved` smallint(6) NOT NULL default '0',
|
||||
UNIQUE INDEX `places_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products. Script date: 02/04/2016 10:53:00. */
|
||||
CREATE TABLE IF NOT EXISTS `products` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`reference` varchar(255) NOT NULL,
|
||||
`code` varchar(255) NOT NULL,
|
||||
`codetype` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`pricebuy` double NOT NULL default '0',
|
||||
`pricesell` double NOT NULL default '0',
|
||||
`category` varchar(255) NOT NULL,
|
||||
`taxcat` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) default NULL,
|
||||
`stockcost` double NOT NULL default '0',
|
||||
`stockvolume` double NOT NULL default '0',
|
||||
`image` mediumblob default NULL,
|
||||
`iscom` bit(1) NOT NULL default b'0',
|
||||
`isscale` bit(1) NOT NULL default b'0',
|
||||
`isconstant` bit(1) NOT NULL default b'0',
|
||||
`printkb` bit(1) NOT NULL default b'0',
|
||||
`sendstatus` bit(1) NOT NULL default b'0',
|
||||
`isservice` bit(1) NOT NULL default b'0',
|
||||
`attributes` mediumblob default NULL,
|
||||
`display` varchar(255) default NULL,
|
||||
`isvprice` smallint(6) NOT NULL default '0',
|
||||
`isverpatrib` smallint(6) NOT NULL default '0',
|
||||
`texttip` varchar(255) default NULL,
|
||||
`warranty` smallint(6) NOT NULL default '0',
|
||||
`stockunits` double NOT NULL default '0',
|
||||
`printto` varchar(255) default '1',
|
||||
`supplier` varchar(255) default NULL,
|
||||
`uom` varchar(255) default '0',
|
||||
`memodate` datetime default NULL,
|
||||
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `products_attrset_fx` ( `attributeset_id` ),
|
||||
KEY `products_fk_1` ( `category` ),
|
||||
UNIQUE INDEX `products_inx_0` ( `reference` ),
|
||||
UNIQUE INDEX `products_inx_1` ( `code` ),
|
||||
INDEX `products_name_inx` ( `name` ),
|
||||
KEY `products_taxcat_fk` ( `taxcat` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products_cat. Script date: 11/05/2016 05:25:00. */
|
||||
CREATE TABLE IF NOT EXISTS `products_bundle` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` VARCHAR(255) NOT NULL,
|
||||
`product_bundle` VARCHAR(255) NOT NULL,
|
||||
`quantity` DOUBLE NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `pbundle_inx_prod` ( `product` , `product_bundle` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products_cat. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `products_cat` (
|
||||
`product` varchar(255) NOT NULL,
|
||||
`catorder` int(11) default NULL,
|
||||
PRIMARY KEY ( `product` ),
|
||||
KEY `products_cat_inx_1` ( `catorder` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: products_com. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `products_com` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`product2` varchar(255) NOT NULL,
|
||||
UNIQUE INDEX `pcom_inx_prod` ( `product`, `product2` ),
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `products_com_fk_2` ( `product2` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: receipts. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `receipts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`money` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`attributes` mediumblob default NULL,
|
||||
`person` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `receipts_fk_money` ( `money` ),
|
||||
KEY `receipts_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: reservation_customers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `reservation_customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `res_cust_fk_2` ( `customer` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: reservations. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `reservations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`created` datetime NOT NULL,
|
||||
`datenew` datetime NOT NULL default '2015-01-01 00:00:00',
|
||||
`title` varchar(255) NOT NULL,
|
||||
`chairs` int(11) NOT NULL,
|
||||
`isdone` bit(1) NOT NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `reservations_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: resources. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `resources` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`restype` int(11) NOT NULL,
|
||||
`content` mediumblob default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `resources_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: roles. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `roles` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`permissions` mediumblob default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `roles_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: sharedtickets. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `sharedtickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`content` mediumblob default NULL,
|
||||
`appuser` varchar(255) default NULL,
|
||||
`pickupid` int(11) NOT NULL default '0',
|
||||
`locked` varchar(20) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: shift_breaks. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `shift_breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`shiftid` varchar(255) NOT NULL,
|
||||
`breakid` varchar(255) NOT NULL,
|
||||
`starttime` timestamp NOT NULL,
|
||||
`endtime` timestamp NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `shift_breaks_breakid` ( `breakid` ),
|
||||
KEY `shift_breaks_shiftid` ( `shiftid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: shifts. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `shifts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`startshift` datetime NOT NULL,
|
||||
`endshift` datetime default NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: stockcurrent. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `stockcurrent` (
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
KEY `stockcurrent_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `stockcurrent_fk_1` ( `product` ),
|
||||
UNIQUE INDEX `stockcurrent_inx` ( `location`, `product`, `attributesetinstance_id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: stockdiary. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `stockdiary` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`reason` int(11) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`appuser` varchar(255) default NULL,
|
||||
`supplier` varchar(255) default NULL,
|
||||
`supplierdoc` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `stockdiary_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `stockdiary_fk_1` ( `product` ),
|
||||
KEY `stockdiary_fk_2` ( `location` ),
|
||||
KEY `stockdiary_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: stocklevel. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `stocklevel` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`stocksecurity` double default NULL,
|
||||
`stockmaximum` double default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `stocklevel_location` ( `location` ),
|
||||
KEY `stocklevel_product` ( `product` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: suppliers. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `suppliers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`maxdebt` double NOT NULL default '0',
|
||||
`address` varchar(255) default NULL,
|
||||
`address2` varchar(255) default NULL,
|
||||
`postal` varchar(255) default NULL,
|
||||
`city` varchar(255) default NULL,
|
||||
`region` varchar(255) default NULL,
|
||||
`country` varchar(255) default NULL,
|
||||
`firstname` varchar(255) default NULL,
|
||||
`lastname` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`phone` varchar(255) default NULL,
|
||||
`phone2` varchar(255) default NULL,
|
||||
`fax` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`visible` bit(1) NOT NULL default b'1',
|
||||
`curdate` datetime default NULL,
|
||||
`curdebt` double default '0',
|
||||
`vatid` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `suppliers_name_inx` ( `name` ),
|
||||
UNIQUE INDEX `suppliers_skey_inx` ( `searchkey` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxcategories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `taxcat_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxcustcategories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxcustcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `taxcustcat_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxes. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxes` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`category` varchar(255) NOT NULL,
|
||||
`custcategory` varchar(255) default NULL,
|
||||
`parentid` varchar(255) default NULL,
|
||||
`rate` double NOT NULL default '0',
|
||||
`ratecascade` bit(1) NOT NULL default b'0',
|
||||
`rateorder` int(11) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `taxes_cat_fk` ( `category` ),
|
||||
KEY `taxes_custcat_fk` ( `custcategory` ),
|
||||
UNIQUE INDEX `taxes_name_inx` ( `name` ),
|
||||
KEY `taxes_taxes_fk` ( `parentid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxlines. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxlines` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`base` double NOT NULL default '0',
|
||||
`amount` double NOT NULL default '0',
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `taxlines_receipt` ( `receipt` ),
|
||||
KEY `taxlines_tax` ( `taxid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: taxsuppcategories. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `taxsuppcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: thirdparties. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `thirdparties` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`cif` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) default NULL,
|
||||
`contactcomm` varchar(255) default NULL,
|
||||
`contactfact` varchar(255) default NULL,
|
||||
`payrule` varchar(255) default NULL,
|
||||
`faxnumber` varchar(255) default NULL,
|
||||
`phonenumber` varchar(255) default NULL,
|
||||
`mobilenumber` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`webpage` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `thirdparties_cif_inx` ( `cif` ),
|
||||
UNIQUE INDEX `thirdparties_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketlines. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketlines` (
|
||||
`ticket` varchar(255) NOT NULL,
|
||||
`line` int(11) NOT NULL,
|
||||
`product` varchar(255) default NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`attributes` mediumblob default NULL,
|
||||
PRIMARY KEY ( `ticket`, `line` ),
|
||||
KEY `ticketlines_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `ticketlines_fk_2` ( `product` ),
|
||||
KEY `ticketlines_fk_3` ( `taxid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: tickets. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `tickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`tickettype` int(11) NOT NULL default '0',
|
||||
`ticketid` int(11) NOT NULL,
|
||||
`person` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) default NULL,
|
||||
`status` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `tickets_customers_fk` ( `customer` ),
|
||||
KEY `tickets_fk_2` ( `person` ),
|
||||
KEY `tickets_ticketid` ( `tickettype`, `ticketid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketsnum. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketsnum` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketsnum_payment. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketsnum_payment` (
|
||||
-- `id` int(11) NOT NULL auto_increment,
|
||||
`id` int(11) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: ticketsnum_refund. Script date: 23/07/2016 08:00:00 */
|
||||
CREATE TABLE IF NOT EXISTS `ticketsnum_refund` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: uom. Script date: 30/09/2015 13:07:00. */
|
||||
CREATE TABLE IF NOT EXISTS `uom` (
|
||||
`id` VARCHAR(255) NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 30/09/2015 09:33:33. */
|
||||
CREATE TABLE IF NOT EXISTS `vouchers` (
|
||||
`id` VARCHAR(100) NOT NULL,
|
||||
`voucher_number` VARCHAR(100) DEFAULT NULL,
|
||||
`customer` VARCHAR(100) DEFAULT NULL,
|
||||
`amount` DOUBLE DEFAULT NULL,
|
||||
`status` CHAR(1) DEFAULT 'A',
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
@@ -0,0 +1,978 @@
|
||||
/* Header line. Object: applications. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: attribute. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `attribute` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: attributeinstance. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `attributeinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) default NULL,
|
||||
KEY `attinst_att` ( `attribute_id` ),
|
||||
KEY `attinst_set` ( `attributesetinstance_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: attributeset. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `attributeset` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: attributesetinstance. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `attributesetinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
KEY `attsetinst_set` ( `attributeset_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: attributeuse. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `attributeuse` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`lineno` int(11) default NULL,
|
||||
KEY `attuse_att` ( `attribute_id` ),
|
||||
UNIQUE INDEX `attuse_line` ( `attributeset_id`, `lineno` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: attributevalue. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `attributevalue` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) default NULL,
|
||||
KEY `attval_att` ( `attribute_id` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: breaks. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`visible` tinyint(1) NOT NULL default '1',
|
||||
`notes` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: categories. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `categories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`parentid` varchar(255) default NULL,
|
||||
`image` mediumblob default NULL,
|
||||
`texttip` varchar(255) default NULL,
|
||||
`catshowname` smallint(6) NOT NULL default '1',
|
||||
`catorder` varchar(255) default NULL,
|
||||
KEY `categories_fk_1` ( `parentid` ),
|
||||
UNIQUE INDEX `categories_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: closedcash. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `closedcash` (
|
||||
`money` varchar(255) NOT NULL,
|
||||
`host` varchar(255) NOT NULL,
|
||||
`hostsequence` int(11) NOT NULL,
|
||||
`datestart` datetime NOT NULL,
|
||||
`dateend` datetime default NULL,
|
||||
`nosales` int(11) NOT NULL default '0',
|
||||
KEY `closedcash_inx_1` ( `datestart` ),
|
||||
UNIQUE INDEX `closedcash_inx_seq` ( `host`, `hostsequence` ),
|
||||
PRIMARY KEY ( `money` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: csvimport. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `csvimport` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`rownumber` varchar(255) default NULL,
|
||||
`csverror` varchar(255) default NULL,
|
||||
`reference` varchar(255) default NULL,
|
||||
`code` varchar(255) default NULL,
|
||||
`name` varchar(255) default NULL,
|
||||
`pricebuy` double default NULL,
|
||||
`pricesell` double default NULL,
|
||||
`previousbuy` double default NULL,
|
||||
`previoussell` double default NULL,
|
||||
`category` varchar(255) default NULL,
|
||||
`tax` varchar(255) default NULL,
|
||||
`searchkey` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: customers. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`taxcategory` varchar(255) default NULL,
|
||||
`card` varchar(255) default NULL,
|
||||
`maxdebt` double NOT NULL default '0',
|
||||
`address` varchar(255) default NULL,
|
||||
`address2` varchar(255) default NULL,
|
||||
`postal` varchar(255) default NULL,
|
||||
`city` varchar(255) default NULL,
|
||||
`region` varchar(255) default NULL,
|
||||
`country` varchar(255) default NULL,
|
||||
`firstname` varchar(255) default NULL,
|
||||
`lastname` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`phone` varchar(255) default NULL,
|
||||
`phone2` varchar(255) default NULL,
|
||||
`fax` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`visible` bit(1) NOT NULL default b'1',
|
||||
`curdate` datetime default NULL,
|
||||
`curdebt` double default '0',
|
||||
`image` mediumblob default NULL,
|
||||
`isvip` bit(1) NOT NULL default b'0',
|
||||
`discount` double default '0',
|
||||
`memodate` datetime default '2000-01-01 00:00:01',
|
||||
KEY `customers_card_inx` ( `card` ),
|
||||
KEY `customers_name_inx` ( `name` ),
|
||||
UNIQUE INDEX `customers_skey_inx` ( `searchkey` ),
|
||||
KEY `customers_taxcat` ( `taxcategory` ),
|
||||
KEY `customers_taxid_inx` ( `taxid` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: draweropened. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `draweropened` (
|
||||
`opendate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`name` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: floors. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `floors` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`image` mediumblob default NULL,
|
||||
UNIQUE INDEX `floors_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: leaves. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `leaves` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`startdate` datetime NOT NULL,
|
||||
`enddate` datetime NOT NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
KEY `leaves_pplid` ( `pplid` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: lineremoved. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `lineremoved` (
|
||||
`removeddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`name` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL,
|
||||
`productid` varchar(255) default NULL,
|
||||
`productname` varchar(255) default NULL,
|
||||
`units` double NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: locations. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `locations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) default NULL,
|
||||
UNIQUE INDEX `locations_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: moorers. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `moorers` (
|
||||
`vesselname` varchar(255) default NULL,
|
||||
`size` int(11) default NULL,
|
||||
`days` int(11) default NULL,
|
||||
`power` bit(1) NOT NULL default b'0'
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `orders` (
|
||||
`id` MEDIUMINT NOT NULL AUTO_INCREMENT,
|
||||
`orderid` varchar(50) DEFAULT NULL,
|
||||
`qty` int(11) DEFAULT '1',
|
||||
`details` varchar(255) DEFAULT NULL,
|
||||
`attributes` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(50) DEFAULT NULL,
|
||||
`ordertime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`displayid` int(11) DEFAULT '1',
|
||||
`auxiliary` int(11) DEFAULT NULL,
|
||||
`completetime` timestamp NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: payments. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `payments` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`payment` varchar(255) NOT NULL,
|
||||
`total` double NOT NULL default '0',
|
||||
`tip` double default '0',
|
||||
`transid` varchar(255) default NULL,
|
||||
`isprocessed` bit(1) default b'0',
|
||||
`returnmsg` mediumblob default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`tendered` double default NULL,
|
||||
`cardname` varchar(255) default NULL,
|
||||
`voucher` varchar(255) default NULL,
|
||||
KEY `payments_fk_receipt` ( `receipt` ),
|
||||
KEY `payments_inx_1` ( `payment` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: people. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `people` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`apppassword` varchar(255) default NULL,
|
||||
`card` varchar(255) default NULL,
|
||||
`role` varchar(255) NOT NULL,
|
||||
`visible` bit(1) NOT NULL,
|
||||
`image` mediumblob default NULL,
|
||||
KEY `people_card_inx` ( `card` ),
|
||||
KEY `people_fk_1` ( `role` ),
|
||||
UNIQUE INDEX `people_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: pickup_number. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `pickup_number` (
|
||||
`id` int(11) NOT NULL default '0'
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: places. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `places` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`seats` varchar(6) NOT NULL DEFAULT '1',
|
||||
`x` int(11) NOT NULL,
|
||||
`y` int(11) NOT NULL,
|
||||
`floor` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) default NULL,
|
||||
`waiter` varchar(255) default NULL,
|
||||
`ticketid` varchar(255) default NULL,
|
||||
`tablemoved` smallint(6) NOT NULL default '0',
|
||||
`width` int(11) NOT NULL,
|
||||
`height` int(11) NOT NULL,
|
||||
`guests` int(11) DEFAULT 0,
|
||||
`occupied` datetime DEFAULT NULL,
|
||||
UNIQUE INDEX `places_name_inx` ( `name` ),
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: products. Script date: 02/04/2016 10:53:00. */
|
||||
CREATE TABLE `products` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`reference` varchar(255) NOT NULL,
|
||||
`code` varchar(255) NOT NULL,
|
||||
`codetype` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`pricebuy` double NOT NULL default '0',
|
||||
`pricesell` double NOT NULL default '0',
|
||||
`category` varchar(255) NOT NULL,
|
||||
`taxcat` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) default NULL,
|
||||
`stockcost` double NOT NULL default '0',
|
||||
`stockvolume` double NOT NULL default '0',
|
||||
`image` mediumblob default NULL,
|
||||
`iscom` bit(1) NOT NULL default b'0',
|
||||
`isscale` bit(1) NOT NULL default b'0',
|
||||
`isconstant` bit(1) NOT NULL default b'0',
|
||||
`printkb` bit(1) NOT NULL default b'0',
|
||||
`sendstatus` bit(1) NOT NULL default b'0',
|
||||
`isservice` bit(1) NOT NULL default b'0',
|
||||
`attributes` mediumblob default NULL,
|
||||
`display` varchar(255) default NULL,
|
||||
`isvprice` smallint(6) NOT NULL default '0',
|
||||
`isverpatrib` smallint(6) NOT NULL default '0',
|
||||
`texttip` varchar(255) default NULL,
|
||||
`warranty` smallint(6) NOT NULL default '0',
|
||||
`stockunits` double NOT NULL default '0',
|
||||
`printto` varchar(255) default '1',
|
||||
`supplier` varchar(255) default NULL,
|
||||
`uom` varchar(255) default '0',
|
||||
`memodate` datetime default '2018-01-01 00:00:01',
|
||||
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `products_attrset_fx` ( `attributeset_id` ),
|
||||
KEY `products_fk_1` ( `category` ),
|
||||
UNIQUE INDEX `products_inx_0` ( `reference` ),
|
||||
UNIQUE INDEX `products_inx_1` ( `code` ),
|
||||
INDEX `products_name_inx` ( `name` ),
|
||||
KEY `products_taxcat_fk` ( `taxcat` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: products_cat. Script date: 11/05/2016 05:25:00. */
|
||||
CREATE TABLE `products_bundle` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` VARCHAR(255) NOT NULL,
|
||||
`product_bundle` VARCHAR(255) NOT NULL,
|
||||
`quantity` DOUBLE NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `pbundle_inx_prod` ( `product` , `product_bundle` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: products_cat. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `products_cat` (
|
||||
`product` varchar(255) NOT NULL,
|
||||
`catorder` int(11) default NULL,
|
||||
PRIMARY KEY ( `product` ),
|
||||
KEY `products_cat_inx_1` ( `catorder` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: products_com. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `products_com` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`product2` varchar(255) NOT NULL,
|
||||
UNIQUE INDEX `pcom_inx_prod` ( `product`, `product2` ),
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `products_com_fk_2` ( `product2` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: receipts. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `receipts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`money` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`attributes` mediumblob default NULL,
|
||||
`person` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `receipts_fk_money` ( `money` ),
|
||||
KEY `receipts_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: reservation_customers. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `reservation_customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `res_cust_fk_2` ( `customer` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: reservations. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `reservations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`created` datetime NOT NULL,
|
||||
`datenew` datetime NOT NULL default '2018-01-01 00:00:00',
|
||||
`title` varchar(255) NOT NULL,
|
||||
`chairs` int(11) NOT NULL,
|
||||
`isdone` bit(1) NOT NULL,
|
||||
`description` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `reservations_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: resources. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `resources` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`restype` int(11) NOT NULL,
|
||||
`content` mediumblob default NULL,
|
||||
`version` varchar(10) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `resources_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: roles. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `roles` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`permissions` mediumblob default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `roles_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: sharedtickets. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `sharedtickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`content` mediumblob default NULL,
|
||||
`appuser` varchar(255) default NULL,
|
||||
`pickupid` int(11) NOT NULL default '0',
|
||||
`locked` varchar(20) default NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: shift_breaks. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `shift_breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`shiftid` varchar(255) NOT NULL,
|
||||
`breakid` varchar(255) NOT NULL,
|
||||
`starttime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`endtime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `shift_breaks_breakid` ( `breakid` ),
|
||||
KEY `shift_breaks_shiftid` ( `shiftid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: shifts. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `shifts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`startshift` datetime NOT NULL,
|
||||
`endshift` datetime default NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: stockcurrent. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `stockcurrent` (
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
KEY `stockcurrent_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `stockcurrent_fk_1` ( `product` ),
|
||||
UNIQUE INDEX `stockcurrent_inx` ( `location`, `product`, `attributesetinstance_id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: stockdiary. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `stockdiary` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`reason` int(11) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`appuser` varchar(255) default NULL,
|
||||
`supplier` varchar(255) default NULL,
|
||||
`supplierdoc` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `stockdiary_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `stockdiary_fk_1` ( `product` ),
|
||||
KEY `stockdiary_fk_2` ( `location` ),
|
||||
KEY `stockdiary_inx_1` ( `datenew` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: stocklevel. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `stocklevel` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`stocksecurity` double default NULL,
|
||||
`stockmaximum` double default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `stocklevel_location` ( `location` ),
|
||||
KEY `stocklevel_product` ( `product` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: suppliers. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `suppliers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) default NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`maxdebt` double NOT NULL default '0',
|
||||
`address` varchar(255) default NULL,
|
||||
`address2` varchar(255) default NULL,
|
||||
`postal` varchar(255) default NULL,
|
||||
`city` varchar(255) default NULL,
|
||||
`region` varchar(255) default NULL,
|
||||
`country` varchar(255) default NULL,
|
||||
`firstname` varchar(255) default NULL,
|
||||
`lastname` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`phone` varchar(255) default NULL,
|
||||
`phone2` varchar(255) default NULL,
|
||||
`fax` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
`visible` bit(1) NOT NULL default b'1',
|
||||
`curdate` datetime default NULL,
|
||||
`curdebt` double default '0',
|
||||
`vatid` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `suppliers_name_inx` ( `name` ),
|
||||
UNIQUE INDEX `suppliers_skey_inx` ( `searchkey` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: taxcategories. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `taxcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `taxcat_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: taxcustcategories. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `taxcustcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `taxcustcat_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: taxes. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `taxes` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`category` varchar(255) NOT NULL,
|
||||
`custcategory` varchar(255) default NULL,
|
||||
`parentid` varchar(255) default NULL,
|
||||
`rate` double NOT NULL default '0',
|
||||
`ratecascade` bit(1) NOT NULL default b'0',
|
||||
`rateorder` int(11) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `taxes_cat_fk` ( `category` ),
|
||||
KEY `taxes_custcat_fk` ( `custcategory` ),
|
||||
UNIQUE INDEX `taxes_name_inx` ( `name` ),
|
||||
KEY `taxes_taxes_fk` ( `parentid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: taxlines. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `taxlines` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`base` double NOT NULL default '0',
|
||||
`amount` double NOT NULL default '0',
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `taxlines_receipt` ( `receipt` ),
|
||||
KEY `taxlines_tax` ( `taxid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: taxsuppcategories. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `taxsuppcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: thirdparties. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `thirdparties` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`cif` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) default NULL,
|
||||
`contactcomm` varchar(255) default NULL,
|
||||
`contactfact` varchar(255) default NULL,
|
||||
`payrule` varchar(255) default NULL,
|
||||
`faxnumber` varchar(255) default NULL,
|
||||
`phonenumber` varchar(255) default NULL,
|
||||
`mobilenumber` varchar(255) default NULL,
|
||||
`email` varchar(255) default NULL,
|
||||
`webpage` varchar(255) default NULL,
|
||||
`notes` varchar(255) default NULL,
|
||||
PRIMARY KEY ( `id` ),
|
||||
UNIQUE INDEX `thirdparties_cif_inx` ( `cif` ),
|
||||
UNIQUE INDEX `thirdparties_name_inx` ( `name` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: ticketlines. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `ticketlines` (
|
||||
`ticket` varchar(255) NOT NULL,
|
||||
`line` int(11) NOT NULL,
|
||||
`product` varchar(255) default NULL,
|
||||
`attributesetinstance_id` varchar(255) default NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`attributes` mediumblob default NULL,
|
||||
PRIMARY KEY ( `ticket`, `line` ),
|
||||
KEY `ticketlines_attsetinst` ( `attributesetinstance_id` ),
|
||||
KEY `ticketlines_fk_2` ( `product` ),
|
||||
KEY `ticketlines_fk_3` ( `taxid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: tickets. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `tickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`tickettype` int(11) NOT NULL default '0',
|
||||
`ticketid` int(11) NOT NULL,
|
||||
`person` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) default NULL,
|
||||
`status` int(11) NOT NULL default '0',
|
||||
PRIMARY KEY ( `id` ),
|
||||
KEY `tickets_customers_fk` ( `customer` ),
|
||||
KEY `tickets_fk_2` ( `person` ),
|
||||
KEY `tickets_ticketid` ( `tickettype`, `ticketid` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: ticketsnum. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `ticketsnum` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: ticketsnum_payment. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `ticketsnum_payment` (
|
||||
`id` int(11) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: ticketsnum_refund. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `ticketsnum_refund` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: uom. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `uom` (
|
||||
`id` VARCHAR(255) NOT NULL,
|
||||
`name` VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 23/01/2018 08:00:00 */
|
||||
CREATE TABLE `vouchers` (
|
||||
`id` VARCHAR(100) NOT NULL,
|
||||
`voucher_number` VARCHAR(100) DEFAULT NULL,
|
||||
`customer` VARCHAR(100) DEFAULT NULL,
|
||||
`amount` DOUBLE DEFAULT NULL,
|
||||
`status` CHAR(1) DEFAULT 'A',
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;
|
||||
|
||||
-- Update foreign keys of attributeinstance
|
||||
ALTER TABLE `attributeinstance` ADD CONSTRAINT `attinst_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` );
|
||||
|
||||
ALTER TABLE `attributeinstance` ADD CONSTRAINT `attinst_set`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributesetinstance
|
||||
ALTER TABLE `attributesetinstance` ADD CONSTRAINT `attsetinst_set`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributeuse
|
||||
ALTER TABLE `attributeuse` ADD CONSTRAINT `attuse_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` );
|
||||
|
||||
ALTER TABLE `attributeuse` ADD CONSTRAINT `attuse_set`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of attributevalue
|
||||
ALTER TABLE `attributevalue` ADD CONSTRAINT `attval_att`
|
||||
FOREIGN KEY ( `attribute_id` ) REFERENCES `attribute` ( `id` ) ON DELETE CASCADE;
|
||||
|
||||
-- Update foreign keys of categories
|
||||
ALTER TABLE `categories` ADD CONSTRAINT `categories_fk_1`
|
||||
FOREIGN KEY ( `parentid` ) REFERENCES `categories` ( `id` );
|
||||
|
||||
-- Update foreign keys of customers
|
||||
ALTER TABLE `customers` ADD CONSTRAINT `customers_taxcat`
|
||||
FOREIGN KEY ( `taxcategory` ) REFERENCES `taxcustcategories` ( `id` );
|
||||
|
||||
-- Update foreign keys of leaves
|
||||
ALTER TABLE `leaves` ADD CONSTRAINT `leaves_pplid`
|
||||
FOREIGN KEY ( `pplid` ) REFERENCES `people` ( `id` );
|
||||
|
||||
-- Update foreign keys of payments
|
||||
ALTER TABLE `payments` ADD CONSTRAINT `payments_fk_receipt`
|
||||
FOREIGN KEY ( `receipt` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
-- Update foreign keys of people
|
||||
ALTER TABLE `people` ADD CONSTRAINT `people_fk_1`
|
||||
FOREIGN KEY ( `role` ) REFERENCES `roles` ( `id` );
|
||||
|
||||
-- Update foreign keys of products
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_attrset_fk`
|
||||
FOREIGN KEY ( `attributeset_id` ) REFERENCES `attributeset` ( `id` );
|
||||
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_fk_1`
|
||||
FOREIGN KEY ( `category` ) REFERENCES `categories` ( `id` );
|
||||
|
||||
ALTER TABLE `products` ADD CONSTRAINT `products_taxcat_fk`
|
||||
FOREIGN KEY ( `taxcat` ) REFERENCES `taxcategories` ( `id` );
|
||||
|
||||
-- Update foreign keys of product_bundle
|
||||
ALTER TABLE `products_bundle` ADD CONSTRAINT `products_bundle_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products`( `id` );
|
||||
|
||||
ALTER TABLE `products_bundle` ADD CONSTRAINT `products_bundle_fk_2`
|
||||
FOREIGN KEY ( `product_bundle` ) REFERENCES `products`( `id` );
|
||||
|
||||
-- Update foreign keys of products_cat
|
||||
ALTER TABLE `products_cat` ADD CONSTRAINT `products_cat_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of products_com
|
||||
ALTER TABLE `products_com` ADD CONSTRAINT `products_com_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `products_com` ADD CONSTRAINT `products_com_fk_2`
|
||||
FOREIGN KEY ( `product2` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of receipts
|
||||
ALTER TABLE `receipts` ADD CONSTRAINT `receipts_fk_money`
|
||||
FOREIGN KEY ( `money` ) REFERENCES `closedcash` ( `money` );
|
||||
|
||||
-- Update foreign keys of reservation_customers
|
||||
ALTER TABLE `reservation_customers` ADD CONSTRAINT `res_cust_fk_1`
|
||||
FOREIGN KEY ( `id` ) REFERENCES `reservations` ( `id` );
|
||||
|
||||
ALTER TABLE `reservation_customers` ADD CONSTRAINT `res_cust_fk_2`
|
||||
FOREIGN KEY ( `customer` ) REFERENCES `customers` ( `id` );
|
||||
|
||||
-- Update foreign keys of shift_breaks
|
||||
ALTER TABLE `shift_breaks` ADD CONSTRAINT `shift_breaks_breakid`
|
||||
FOREIGN KEY ( `breakid` ) REFERENCES `breaks` ( `id` );
|
||||
|
||||
ALTER TABLE `shift_breaks` ADD CONSTRAINT `shift_breaks_shiftid`
|
||||
FOREIGN KEY ( `shiftid` ) REFERENCES `shifts` ( `id` );
|
||||
|
||||
-- Update foreign keys of stockcurrent
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `stockcurrent` ADD CONSTRAINT `stockcurrent_fk_2`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
-- Update foreign keys of stockdiary
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_fk_1`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `stockdiary` ADD CONSTRAINT `stockdiary_fk_2`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
-- Update foreign keys of stocklevel
|
||||
ALTER TABLE `stocklevel` ADD CONSTRAINT `stocklevel_location`
|
||||
FOREIGN KEY ( `location` ) REFERENCES `locations` ( `id` );
|
||||
|
||||
ALTER TABLE `stocklevel` ADD CONSTRAINT `stocklevel_product`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
-- Update foreign keys of taxes
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_cat_fk`
|
||||
FOREIGN KEY ( `category` ) REFERENCES `taxcategories` ( `id` );
|
||||
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_custcat_fk`
|
||||
FOREIGN KEY ( `custcategory` ) REFERENCES `taxcustcategories` ( `id` );
|
||||
|
||||
ALTER TABLE `taxes` ADD CONSTRAINT `taxes_taxes_fk`
|
||||
FOREIGN KEY ( `parentid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
-- Update foreign keys of taxlines
|
||||
ALTER TABLE `taxlines` ADD CONSTRAINT `taxlines_receipt`
|
||||
FOREIGN KEY ( `receipt` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
ALTER TABLE `taxlines` ADD CONSTRAINT `taxlines_tax`
|
||||
FOREIGN KEY ( `taxid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
-- Update foreign keys of ticketlines
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_attsetinst`
|
||||
FOREIGN KEY ( `attributesetinstance_id` ) REFERENCES `attributesetinstance` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_2`
|
||||
FOREIGN KEY ( `product` ) REFERENCES `products` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_3`
|
||||
FOREIGN KEY ( `taxid` ) REFERENCES `taxes` ( `id` );
|
||||
|
||||
ALTER TABLE `ticketlines` ADD CONSTRAINT `ticketlines_fk_ticket`
|
||||
FOREIGN KEY ( `ticket` ) REFERENCES `tickets` ( `id` );
|
||||
|
||||
-- Update foreign keys of tickets
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_customers_fk`
|
||||
FOREIGN KEY ( `customer` ) REFERENCES `customers` ( `id` );
|
||||
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_fk_2`
|
||||
FOREIGN KEY ( `person` ) REFERENCES `people` ( `id` );
|
||||
|
||||
ALTER TABLE `tickets` ADD CONSTRAINT `tickets_fk_id`
|
||||
FOREIGN KEY ( `id` ) REFERENCES `receipts` ( `id` );
|
||||
|
||||
-- *****************************************************************************
|
||||
|
||||
-- ADD roles
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('3', 'Guest role', $FILE{/com/unicenta/pos/templates/Role.Guest.xml} );
|
||||
|
||||
-- ADD people
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('0', 'Administrator', NULL, '0', TRUE, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('1', 'Manager', NULL, '1', TRUE, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('2', 'Employee', NULL, '2', TRUE, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('3', 'Guest', NULL, '3', TRUE, NULL);
|
||||
|
||||
-- ADD resources --
|
||||
-- SYSTEM
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('00', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('02', 'Cash.Close', 0, $FILE{/com/unicenta/pos/templates/Cash.Close.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('03', 'Customer.Created', 0, $FILE{/com/unicenta/pos/templates/customer.created.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('04', 'Customer.Deleted', 0, $FILE{/com/unicenta/pos/templates/customer.deleted.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('05', 'Customer.Updated', 0, $FILE{/com/unicenta/pos/templates/customer.updated.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('06', 'payment.cash', 0, $FILE{/com/unicenta/pos/templates/payment.cash.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('07', 'Ticket.Buttons', 0, $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('08', 'Ticket.Close', 0, $FILE{/com/unicenta/pos/templates/Ticket.Close.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('09', 'Ticket.Line', 0, $FILE{/com/unicenta/pos/templates/Ticket.Line.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('10', 'Window.Title', 0, $FILE{/com/unicenta/pos/templates/Window.Title.txt});
|
||||
|
||||
-- IMAGES
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('11', 'img.001', 1, $FILE{/com/unicenta/images/.01.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('12', 'img.002', 1, $FILE{/com/unicenta/images/.02.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('13', 'img.005', 1, $FILE{/com/unicenta/images/.05.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('14', 'img.010', 1, $FILE{/com/unicenta/images/.10.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('15', 'img.020', 1, $FILE{/com/unicenta/images/.20.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('16', 'img.025', 1, $FILE{/com/unicenta/images/.25.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('17', 'img.050', 1, $FILE{/com/unicenta/images/.50.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('18', 'img.1', 1, $FILE{/com/unicenta/images/1.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('19', 'img.2', 1, $FILE{/com/unicenta/images/2.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('20', 'img.5', 1, $FILE{/com/unicenta/images/5.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('21', 'img.10', 1, $FILE{/com/unicenta/images/10.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('22', 'img.20', 1, $FILE{/com/unicenta/images/20.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('23', 'img.50', 1, $FILE{/com/unicenta/images/50.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('24', 'img.100', 1, $FILE{/com/unicenta/images/100.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('25', 'img.200', 1, $FILE{/com/unicenta/images/200.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('26', 'img.500', 1, $FILE{/com/unicenta/images/500.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('27', 'img.1000', 1, $FILE{/com/unicenta/images/1000.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('28', 'img.cash', 1, $FILE{/com/unicenta/images/cash.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('29', 'img.cashdrawer', 1, $FILE{/com/unicenta/images/cashdrawer.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('30', 'img.discount', 1, $FILE{/com/unicenta/images/discount.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('31', 'img.discount_b', 1, $FILE{/com/unicenta/images/discount_b.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('32', 'img.heart', 1, $FILE{/com/unicenta/images/heart.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('33', 'img.keyboard_48', 1, $FILE{/com/unicenta/images/keyboard_48.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('34', 'img.kit_print', 1, $FILE{/com/unicenta/images/kit_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('35', 'img.no_photo', 1, $FILE{/com/unicenta/images/no_photo.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('36', 'img.refundit', 1, $FILE{/com/unicenta/images/refundit.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('37', 'img.run_script', 1, $FILE{/com/unicenta/images/run_script.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('38', 'img.ticket_print', 1, $FILE{/com/unicenta/images/ticket_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('40', 'Printer.Ticket.Logo', 1, $FILE{/com/unicenta/images/printer.ticket.logo.jpg});
|
||||
|
||||
-- PRINTER
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('41', 'Printer.CloseCash.Preview', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.Preview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('42', 'Printer.CloseCash', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('43', 'Printer.CustomerPaid', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('44', 'Printer.CustomerPaid2', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('45', 'Printer.FiscalTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.FiscalTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('46', 'Printer.Inventory', 0, $FILE{/com/unicenta/pos/templates/Printer.Inventory.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('47', 'Printer.OpenDrawer', 0, $FILE{/com/unicenta/pos/templates/Printer.OpenDrawer.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('48', 'Printer.PartialCash', 0, $FILE{/com/unicenta/pos/templates/Printer.PartialCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('49', 'Printer.PrintLastTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.PrintLastTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('50', 'Printer.Product', 0, $FILE{/com/unicenta/pos/templates/Printer.Product.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('52', 'Printer.ReprintTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.ReprintTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('53', 'Printer.Start', 0, $FILE{/com/unicenta/pos/templates/Printer.Start.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('54', 'Printer.Ticket.P1', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P1.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('55', 'Printer.Ticket.P2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('56', 'Printer.Ticket.P3', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P3.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('57', 'Printer.Ticket.P4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('58', 'Printer.Ticket.P5', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P5.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('59', 'Printer.Ticket.P6', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P6.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('60', 'Printer.Ticket', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('61', 'Printer.Ticket2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('62', 'Printer.TicketClose', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketClose.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('63', 'Printer.TicketLine', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('64', 'Printer.TicketNew', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('65', 'Printer.TicketPreview', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('66', 'Printer.Ticket_A4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket_A4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('67', 'Printer.TicketPreview_A4', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview_A4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('68', 'Printer.TicketRemote', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketRemote.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('69', 'Printer.TicketTotal', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketTotal.xml});
|
||||
|
||||
-- SCRIPTS
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('70', 'script.Keyboard', 0, $FILE{/com/unicenta/pos/templates/script.Keyboard.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('71', 'script.Linediscount', 0, $FILE{/com/unicenta/pos/templates/script.Linediscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('72', 'script.SendOrder', 0, $FILE{/com/unicenta/pos/templates/script.SendOrder.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('73', 'script.Totaldiscount', 0, $FILE{/com/unicenta/pos/templates/script.Totaldiscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('74', 'script.multibuy', 0, $FILE{/com/unicenta/pos/templates/script.multibuy.txt});
|
||||
|
||||
-- ADD CATEGORIES
|
||||
INSERT INTO categories(id, name) VALUES ('000', 'Category Standard');
|
||||
|
||||
-- ADD TAXCATEGORIES
|
||||
/* 002 added 31/01/2017 00:00:00. */
|
||||
INSERT INTO taxcategories(id, name) VALUES ('000', 'Tax Exempt');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('001', 'Tax Standard');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('002', 'Tax Other');
|
||||
|
||||
-- ADD TAXES
|
||||
/* 002 added 31/01/2017 00:00:00. */
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('000', 'Tax Exempt', '000', NULL, NULL, 0, FALSE, NULL);
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('001', 'Tax Standard', '001', NULL, NULL, 0.20, FALSE, NULL);
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('002', 'Tax Other', '002', NULL, NULL, 0, FALSE, NULL);
|
||||
|
||||
-- ADD PRODUCTS
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx999_999xxx_x9x9x9', 'xxx999', 'xxx999', 'Free Line entry', '000', '001', 1, '<html><center>Free Line entry', '1');
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx998_998xxx_x8x8x8', 'xxx998', 'xxx998', 'Service Charge', '000', '001', 1, '<html><center>Service Charge', '1');
|
||||
|
||||
-- ADD PRODUCTS_CAT
|
||||
INSERT INTO products_cat(product) VALUES ('xxx999_999xxx_x9x9x9');
|
||||
INSERT INTO products_cat(product) VALUES ('xxx998_998xxx_x8x8x8');
|
||||
|
||||
-- ADD LOCATION
|
||||
INSERT INTO locations(id, name, address) VALUES ('0','Location 1','Local');
|
||||
|
||||
-- ADD SUPPLIERS
|
||||
INSERT INTO suppliers(id, searchkey, name) VALUES ('0','uniCenta','uniCenta');
|
||||
|
||||
-- ADD UOM
|
||||
INSERT INTO uom(id, name) VALUES ('0','Each');
|
||||
|
||||
-- ADD FLOORS
|
||||
INSERT INTO floors(id, name, image) VALUES ('0', 'Restaurant floor', $FILE{/com/unicenta/images/paperboard960_600.png});
|
||||
|
||||
-- ADD PLACES
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('1', 'Table 1', 100, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('2', 'Table 2', 250, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('3', 'Table 3', 400, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('4', 'Table 4', 550, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('5', 'Table 5', 700, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('6', 'Table 6', 850, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('7', 'Table 7', 100, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('8', 'Table 8', 250, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('9', 'Table 9', 400, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('10', 'Table 10', 550, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('11', 'Table 11', 700, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('12', 'Table 12', 850, 150, '0', '1', 90, 45);
|
||||
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('13', 'Table 13', 100, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('14', 'Table 14', 250, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('15', 'Table 15', 400, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('16', 'Table 16', 550, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('17', 'Table 17', 700, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('18', 'Table 18', 850, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('19', 'Table 19', 100, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('20', 'Table 20', 250, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('21', 'Table 21', 400, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('22', 'Table 22', 550, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('23', 'Table 23', 700, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('24', 'Table 24', 850, 350, '0', '1', 90, 45);
|
||||
|
||||
-- ADD SHIFTS
|
||||
INSERT INTO shifts(id, startshift, endshift, pplid) VALUES ('0', '2018-01-01 00:00:00.001', '2018-01-01 00:00:00.002','0');
|
||||
|
||||
-- ADD BREAKS
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('0', 'Lunch Break', TRUE, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('1', 'Tea Break', TRUE, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('2', 'Mid Break', TRUE, NULL);
|
||||
|
||||
-- ADD SHIFT_BREAKS
|
||||
INSERT INTO shift_breaks(id, shiftid, breakid, starttime, endtime) VALUES ('0', '0', '0', '2018-01-01 00:00:00.003', '2018-01-01 00:00:00.004');
|
||||
|
||||
-- ADD SEQUENCES
|
||||
INSERT INTO pickup_number VALUES(1);
|
||||
INSERT INTO ticketsnum VALUES(1);
|
||||
INSERT INTO ticketsnum_refund VALUES(1);
|
||||
INSERT INTO ticketsnum_payment VALUES(1);
|
||||
|
||||
-- ADD APPLICATION VERSION
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,721 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2017 uniCenta
|
||||
-- http://sourceforge.net/projects/unicentaopos
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database create script for MySQL
|
||||
-- Copyright (c) 2009-2017 uniCenta
|
||||
-- v4.00
|
||||
|
||||
CREATE TABLE `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `roles` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`permissions` mediumblob,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `roles_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO ROLES(ID, NAME, PERMISSIONS) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
INSERT INTO ROLES(ID, NAME, PERMISSIONS) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
INSERT INTO ROLES(ID, NAME, PERMISSIONS) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
INSERT INTO ROLES(ID, NAME, PERMISSIONS) VALUES('3', 'Guest role', $FILE{/com/unicenta/pos/templates/Role.Guest.xml} );
|
||||
|
||||
CREATE TABLE `people` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`apppassword` varchar(255) DEFAULT NULL,
|
||||
`card` varchar(255) DEFAULT NULL,
|
||||
`role` varchar(255) NOT NULL,
|
||||
`visible` bit(1) NOT NULL,
|
||||
`image` mediumblob,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `people_name_inx` (`name`),
|
||||
KEY `people_fk_1` (`role`),
|
||||
KEY `people_card_inx` (`card`),
|
||||
CONSTRAINT `people_fk_1` FOREIGN KEY (`role`) REFERENCES `roles` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO PEOPLE(ID, NAME, APPPASSWORD, ROLE, VISIBLE, IMAGE) VALUES ('0', 'Administrator', NULL, '0', TRUE, NULL);
|
||||
INSERT INTO PEOPLE(ID, NAME, APPPASSWORD, ROLE, VISIBLE, IMAGE) VALUES ('1', 'Manager', NULL, '1', TRUE, NULL);
|
||||
INSERT INTO PEOPLE(ID, NAME, APPPASSWORD, ROLE, VISIBLE, IMAGE) VALUES ('2', 'Employee', NULL, '2', TRUE, NULL);
|
||||
INSERT INTO PEOPLE(ID, NAME, APPPASSWORD, ROLE, VISIBLE, IMAGE) VALUES ('3', 'Guest', NULL, '3', TRUE, NULL);
|
||||
|
||||
|
||||
CREATE TABLE `resources` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`restype` int(11) NOT NULL,
|
||||
`content` mediumblob,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `resources_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('0', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('1', 'coin.2', 1, $FILE{/com/unicenta/pos/templates/coin.2.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('2', 'coin.1', 1, $FILE{/com/unicenta/pos/templates/coin.1.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('3', 'coin.50', 1, $FILE{/com/unicenta/pos/templates/coin.50.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('4', 'coin.20', 1, $FILE{/com/unicenta/pos/templates/coin.20.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('5', 'coin.10', 1, $FILE{/com/unicenta/pos/templates/coin.10.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('6', 'coin.05', 1, $FILE{/com/unicenta/pos/templates/coin.05.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('7', 'coin.02', 1, $FILE{/com/unicenta/pos/templates/coin.02.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('8', 'coin.01', 1, $FILE{/com/unicenta/pos/templates/coin.01.png});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('9', 'img.cash', 1, $FILE{/com/unicenta/pos/templates/img.cash.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('10', 'img.cashdrawer', 1, $FILE{/com/unicenta/pos/templates/img.cashdrawer.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('11', 'img.discount', 1, $FILE{/com/unicenta/pos/templates/img.discount.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('12', 'img.empty', 1, $FILE{/com/unicenta/pos/templates/img.empty.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('13', 'img.heart', 1, $FILE{/com/unicenta/pos/templates/img.heart.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('14', 'img.no_photo', 1, $FILE{/com/unicenta/pos/templates/img.no_photo.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('15', 'img.kit_print', 1, $FILE{/com/unicenta/pos/templates/img.kit_print.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('16', 'img.refundit', 1, $FILE{/com/unicenta/pos/templates/img.refundit.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('17', 'img.run_script', 1, $FILE{/com/unicenta/pos/templates/img.run_script.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('18', 'img.ticket_print', 1, $FILE{/com/unicenta/pos/templates/img.ticket_print.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('19', 'img.user', 1, $FILE{/com/unicenta/pos/templates/img.user.png});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('20', 'note.50', 1, $FILE{/com/unicenta/pos/templates/note.50.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('21', 'note.20', 1, $FILE{/com/unicenta/pos/templates/note.20.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('22', 'note.10', 1, $FILE{/com/unicenta/pos/templates/note.10.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('23', 'note.5', 1, $FILE{/com/unicenta/pos/templates/note.5.png});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('24', 'payment.cash', 0, $FILE{/com/unicenta/pos/templates/payment.cash.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('25', 'Printer.CloseCash', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('26', 'Printer.CustomerPaid', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('27', 'Printer.CustomerPaid2', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid2.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('28', 'Printer.FiscalTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.FiscalTicket.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('29', 'Printer.Inventory', 0, $FILE{/com/unicenta/pos/templates/Printer.Inventory.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('30', 'Printer.OpenDrawer', 0, $FILE{/com/unicenta/pos/templates/Printer.OpenDrawer.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('31', 'Printer.PartialCash', 0, $FILE{/com/unicenta/pos/templates/Printer.PartialCash.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('32', 'Printer.Product', 0, $FILE{/com/unicenta/pos/templates/Printer.Product.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('33', 'Printer.Start', 0, $FILE{/com/unicenta/pos/templates/Printer.Start.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('34', 'Printer.Ticket', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('35', 'Printer.Ticket2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket2.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('36', 'Printer.TicketClose', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketClose.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('37', 'Printer.TicketRemote', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketRemote.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('38', 'Printer.TicketLine', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('39', 'Printer.TicketNew', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('40', 'Printer.TicketPreview', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('41', 'Printer.TicketTotal', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketTotal.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('42', 'Printer.Ticket.Logo', 1, $FILE{/com/unicenta/pos/templates/printer.ticket.logo.png});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('43', 'script.AddLineNote', 0, $FILE{/com/unicenta/pos/templates/script.AddLineNote.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('44', 'script.Event.Total', 0, $FILE{/com/unicenta/pos/templates/script.Event.Total.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('45', 'script.linediscount', 0, $FILE{/com/unicenta/pos/templates/script.linediscount.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('46', 'script.ReceiptConsolidate', 0, $FILE{/com/unicenta/pos/templates/script.ReceiptConsolidate.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('47', 'script.Refundit', 0, $FILE{/com/unicenta/pos/templates/script.Refundit.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('48', 'script.SendOrder', 0, $FILE{/com/unicenta/pos/templates/script.SendOrder.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('49', 'script.ServiceCharge', 0, $FILE{/com/unicenta/pos/templates/script.script.ServiceCharge.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('50', 'script.SetPerson', 0, $FILE{/com/unicenta/pos/templates/script.SetPerson.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('51', 'script.StockCurrentAdd', 0, $FILE{/com/unicenta/pos/templates/script.StockCurrentAdd.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('52', 'script.StockCurrentSet', 0, $FILE{/com/unicenta/pos/templates/script.StockCurrentSet.txt});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('53', 'script.totaldiscount', 0, $FILE{/com/unicenta/pos/templates/script.totaldiscount.txt});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('54', 'Ticket.Buttons', 0, $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('55', 'Ticket.Close', 0, $FILE{/com/unicenta/pos/templates/Ticket.Close.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('56', 'Ticket.Discount', 0, $FILE{/com/unicenta/pos/templates/Ticket.Discount.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('57', 'Ticket.Line', 0, $FILE{/com/unicenta/pos/templates/Ticket.Line.xml});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('58', 'Ticket.TicketLineTaxesIncluded', 0, $FILE{/com/unicenta/pos/templates/Ticket.TicketLineTaxesIncluded.xml});
|
||||
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('59', 'Window.Logo', 1, $FILE{/com/unicenta/pos/templates/window.logo.png});
|
||||
INSERT INTO RESOURCES(ID, NAME, RESTYPE, CONTENT) VALUES('60', 'Window.Title', 0, $FILE{/com/unicenta/pos/templates/Window.Title.txt});
|
||||
|
||||
CREATE TABLE `taxcustcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `taxcustcat_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`taxcategory` varchar(255) DEFAULT NULL,
|
||||
`card` varchar(255) DEFAULT NULL,
|
||||
`maxdebt` double NOT NULL DEFAULT '0',
|
||||
`address` varchar(255) DEFAULT NULL,
|
||||
`address2` varchar(255) DEFAULT NULL,
|
||||
`postal` varchar(255) DEFAULT NULL,
|
||||
`city` varchar(255) DEFAULT NULL,
|
||||
`region` varchar(255) DEFAULT NULL,
|
||||
`country` varchar(255) DEFAULT NULL,
|
||||
`firstname` varchar(255) DEFAULT NULL,
|
||||
`lastname` varchar(255) DEFAULT NULL,
|
||||
`email` varchar(255) DEFAULT NULL,
|
||||
`phone` varchar(255) DEFAULT NULL,
|
||||
`phone2` varchar(255) DEFAULT NULL,
|
||||
`fax` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`visible` bit(1) NOT NULL DEFAULT b'1',
|
||||
`curdate` datetime DEFAULT NULL,
|
||||
`curdebt` double DEFAULT '0',
|
||||
`image` mediumblob,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `customers_skey_inx` (`searchkey`),
|
||||
KEY `customers_taxcat` (`taxcategory`),
|
||||
KEY `customers_taxid_inx` (`taxid`),
|
||||
KEY `customers_name_inx` (`name`),
|
||||
KEY `customers_card_inx` (`card`),
|
||||
CONSTRAINT `customers_taxcat` FOREIGN KEY (`taxcategory`) REFERENCES `taxcustcategories` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `taxsuppcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `taxsuppcat_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `suppliers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`searchkey` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`taxcategory` varchar(255) DEFAULT NULL,
|
||||
`card` varchar(255) DEFAULT NULL,
|
||||
`maxdebt` double NOT NULL DEFAULT '0',
|
||||
`address` varchar(255) DEFAULT NULL,
|
||||
`address2` varchar(255) DEFAULT NULL,
|
||||
`postal` varchar(255) DEFAULT NULL,
|
||||
`city` varchar(255) DEFAULT NULL,
|
||||
`region` varchar(255) DEFAULT NULL,
|
||||
`country` varchar(255) DEFAULT NULL,
|
||||
`firstname` varchar(255) DEFAULT NULL,
|
||||
`lastname` varchar(255) DEFAULT NULL,
|
||||
`email` varchar(255) DEFAULT NULL,
|
||||
`phone` varchar(255) DEFAULT NULL,
|
||||
`phone2` varchar(255) DEFAULT NULL,
|
||||
`fax` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`visible` bit(1) NOT NULL DEFAULT b'1',
|
||||
`curdate` datetime DEFAULT NULL,
|
||||
`curdebt` double DEFAULT '0',
|
||||
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `suppliers_skey_inx` (`searchkey`),
|
||||
KEY `suppliers_taxcat` (`taxcategory`),
|
||||
KEY `suppliers_taxid_inx` (`taxid`),
|
||||
KEY `suppliers_name_inx` (`name`),
|
||||
CONSTRAINT `suppliers_taxcat` FOREIGN KEY (`taxcategory`) REFERENCES `taxsuppcategories` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `categories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`parentid` varchar(255) DEFAULT NULL,
|
||||
`image` mediumblob,
|
||||
`texttip` varchar(255) DEFAULT NULL,
|
||||
`catshowname` smallint(6) NOT NULL DEFAULT '1',
|
||||
`catorder` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `categories_name_inx` (`name`),
|
||||
KEY `categories_fk_1` (`parentid`),
|
||||
CONSTRAINT `categories_fk_1` FOREIGN KEY (`parentid`) REFERENCES `categories` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO CATEGORIES(ID, NAME) VALUES ('000', 'Category Standard');
|
||||
|
||||
CREATE TABLE `taxcategories` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `taxcat_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('000', 'Tax Exempt');
|
||||
INSERT INTO TAXCATEGORIES(ID, NAME) VALUES ('001', 'Tax Standard');
|
||||
|
||||
CREATE TABLE `taxes` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`category` varchar(255) NOT NULL,
|
||||
`custcategory` varchar(255) DEFAULT NULL,
|
||||
`parentid` varchar(255) DEFAULT NULL,
|
||||
`rate` double NOT NULL DEFAULT '0',
|
||||
`ratecascade` bit(1) NOT NULL DEFAULT b'0',
|
||||
`rateorder` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `taxes_name_inx` (`name`),
|
||||
KEY `taxes_cat_fk` (`category`),
|
||||
KEY `taxes_custcat_fk` (`custcategory`),
|
||||
KEY `taxes_taxes_fk` (`parentid`),
|
||||
CONSTRAINT `taxes_cat_fk` FOREIGN KEY (`category`) REFERENCES `taxcategories` (`id`),
|
||||
CONSTRAINT `taxes_custcat_fk` FOREIGN KEY (`custcategory`) REFERENCES `taxcustcategories` (`id`),
|
||||
CONSTRAINT `taxes_taxes_fk` FOREIGN KEY (`parentid`) REFERENCES `taxes` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO TAXES(ID, NAME, CATEGORY, CUSTCATEGORY, PARENTID, RATE, RATECASCADE, RATEORDER) VALUES ('000', 'Tax Exempt', '000', NULL, NULL, 0, FALSE, NULL);
|
||||
INSERT INTO TAXES(ID, NAME, CATEGORY, CUSTCATEGORY, PARENTID, RATE, RATECASCADE, RATEORDER) VALUES ('001', 'Tax Standard', '001', NULL, NULL, 0.20, FALSE, NULL);
|
||||
|
||||
CREATE TABLE `attribute` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `attributevalue` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `attval_att` (`attribute_id`),
|
||||
CONSTRAINT `attval_att` FOREIGN KEY (`attribute_id`) REFERENCES `attribute` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `attributeset` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `attributeuse` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`lineno` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `attuse_line` (`attributeset_id`,`lineno`),
|
||||
KEY `attuse_att` (`attribute_id`),
|
||||
CONSTRAINT `attuse_att` FOREIGN KEY (`attribute_id`) REFERENCES `attribute` (`id`),
|
||||
CONSTRAINT `attuse_set` FOREIGN KEY (`attributeset_id`) REFERENCES `attributeset` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `attributesetinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) NOT NULL,
|
||||
`description` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `attsetinst_set` (`attributeset_id`),
|
||||
CONSTRAINT `attsetinst_set` FOREIGN KEY (`attributeset_id`) REFERENCES `attributeset` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `attributeinstance` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) NOT NULL,
|
||||
`attribute_id` varchar(255) NOT NULL,
|
||||
`value` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `attinst_set` (`attributesetinstance_id`),
|
||||
KEY `attinst_att` (`attribute_id`),
|
||||
CONSTRAINT `attinst_att` FOREIGN KEY (`attribute_id`) REFERENCES `attribute` (`id`),
|
||||
CONSTRAINT `attinst_set` FOREIGN KEY (`attributesetinstance_id`) REFERENCES `attributesetinstance` (`id`) ON DELETE CASCADE
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `products` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`reference` varchar(255) NOT NULL,
|
||||
`code` varchar(255) NOT NULL,
|
||||
`codetype` varchar(255) DEFAULT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`pricebuy` double NOT NULL DEFAULT '0',
|
||||
`pricesell` double NOT NULL DEFAULT '0',
|
||||
`category` varchar(255) NOT NULL,
|
||||
`taxcat` varchar(255) NOT NULL,
|
||||
`attributeset_id` varchar(255) DEFAULT NULL,
|
||||
`stockcost` double DEFAULT NULL,
|
||||
`stockvolume` double DEFAULT NULL,
|
||||
`image` mediumblob,
|
||||
`iscom` bit(1) NOT NULL DEFAULT b'0',
|
||||
`isscale` bit(1) NOT NULL DEFAULT b'0',
|
||||
`isconstant` bit(1) NOT NULL DEFAULT b'0',
|
||||
`printkb` bit(1) NOT NULL DEFAULT b'0',
|
||||
`sendstatus` bit(1) NOT NULL DEFAULT b'0',
|
||||
`isservice` bit(1) NOT NULL DEFAULT b'0',
|
||||
`attributes` mediumblob,
|
||||
`display` varchar(255) DEFAULT NULL,
|
||||
`isvprice` smallint(6) NOT NULL DEFAULT '0',
|
||||
`isverpatrib` smallint(6) NOT NULL DEFAULT '0',
|
||||
`texttip` varchar(255) DEFAULT NULL,
|
||||
`warranty` smallint(6) NOT NULL DEFAULT '0',
|
||||
`stockunits` double NOT NULL DEFAULT '0',
|
||||
`printto` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `products_inx_0` (`reference`),
|
||||
UNIQUE KEY `products_inx_1` (`code`),
|
||||
UNIQUE KEY `products_name_inx` (`name`),
|
||||
KEY `products_fk_1` (`category`),
|
||||
KEY `products_taxcat_fk` (`taxcat`),
|
||||
KEY `products_attrset_fk` (`attributeset_id`),
|
||||
CONSTRAINT `products_attrset_fk` FOREIGN KEY (`attributeset_id`) REFERENCES `attributeset` (`id`),
|
||||
CONSTRAINT `products_fk_1` FOREIGN KEY (`category`) REFERENCES `categories` (`id`),
|
||||
CONSTRAINT `products_taxcat_fk` FOREIGN KEY (`taxcat`) REFERENCES `taxcategories` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO PRODUCTS(ID, REFERENCE, CODE, NAME, CATEGORY, TAXCAT, ISSERVICE)
|
||||
VALUES ('xxx999_999xxx_x9x9x9', 'xxx999', 'xxx999', '***', '000', '001', 1);
|
||||
INSERT INTO PRODUCTS(ID, REFERENCE, CODE, NAME, CATEGORY, TAXCAT, ISSERVICE)
|
||||
VALUES ('xxx998_998xxx_x8x8x8', 'xxx998', 'xxx998', '***', '000', '001', 1);
|
||||
|
||||
CREATE TABLE `products_cat` (
|
||||
`product` varchar(255) NOT NULL,
|
||||
`catorder` int(11) DEFAULT NULL,
|
||||
PRIMARY KEY (`product`),
|
||||
KEY `products_cat_inx_1` (`catorder`),
|
||||
CONSTRAINT `products_cat_fk_1` FOREIGN KEY (`product`) REFERENCES `products` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO PRODUCTS_CAT(PRODUCT) VALUES ('xxx999_999xxx_x9x9x9');
|
||||
INSERT INTO PRODUCTS_CAT(PRODUCT) VALUES ('xxx998_998xxx_x8x8x8');
|
||||
|
||||
CREATE TABLE `products_com` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`product2` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `pcom_inx_prod` (`product`,`product2`),
|
||||
KEY `products_com_fk_2` (`product2`),
|
||||
CONSTRAINT `products_com_fk_1` FOREIGN KEY (`product`) REFERENCES `products` (`id`),
|
||||
CONSTRAINT `products_com_fk_2` FOREIGN KEY (`product2`) REFERENCES `products` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `locations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `locations_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `stockdiary` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`reason` int(11) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) DEFAULT NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`appuser` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `stockdiary_fk_1` (`product`),
|
||||
KEY `stockdiary_attsetinst` (`attributesetinstance_id`),
|
||||
KEY `stockdiary_fk_2` (`location`),
|
||||
KEY `stockdiary_inx_1` (`datenew`),
|
||||
CONSTRAINT `stockdiary_attsetinst` FOREIGN KEY (`attributesetinstance_id`) REFERENCES `attributesetinstance` (`id`),
|
||||
CONSTRAINT `stockdiary_fk_1` FOREIGN KEY (`product`) REFERENCES `products` (`id`),
|
||||
CONSTRAINT `stockdiary_fk_2` FOREIGN KEY (`location`) REFERENCES `locations` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `stocklevel` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`stocksecurity` double DEFAULT NULL,
|
||||
`stockmaximum` double DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `stocklevel_product` (`product`),
|
||||
KEY `stocklevel_location` (`location`),
|
||||
CONSTRAINT `stocklevel_location` FOREIGN KEY (`location`) REFERENCES `locations` (`id`),
|
||||
CONSTRAINT `stocklevel_product` FOREIGN KEY (`product`) REFERENCES `products` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `stockcurrent` (
|
||||
`location` varchar(255) NOT NULL,
|
||||
`product` varchar(255) NOT NULL,
|
||||
`attributesetinstance_id` varchar(255) DEFAULT NULL,
|
||||
`units` double NOT NULL,
|
||||
UNIQUE KEY `stockcurrent_inx` (`location`,`product`,`attributesetinstance_id`),
|
||||
KEY `stockcurrent_fk_1` (`product`),
|
||||
KEY `stockcurrent_attsetinst` (`attributesetinstance_id`),
|
||||
CONSTRAINT `stockcurrent_attsetinst` FOREIGN KEY (`attributesetinstance_id`) REFERENCES `attributesetinstance` (`id`),
|
||||
CONSTRAINT `stockcurrent_fk_1` FOREIGN KEY (`product`) REFERENCES `products` (`id`),
|
||||
CONSTRAINT `stockcurrent_fk_2` FOREIGN KEY (`location`) REFERENCES `locations` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `closedcash` (
|
||||
`money` varchar(255) NOT NULL,
|
||||
`host` varchar(255) NOT NULL,
|
||||
`hostsequence` int(11) NOT NULL,
|
||||
`datestart` datetime NOT NULL,
|
||||
`dateend` datetime DEFAULT NULL,
|
||||
`nosales` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`money`),
|
||||
UNIQUE KEY `closedcash_inx_seq` (`host`,`hostsequence`),
|
||||
KEY `closedcash_inx_1` (`datestart`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `receipts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`money` varchar(255) NOT NULL,
|
||||
`datenew` datetime NOT NULL,
|
||||
`attributes` mediumblob,
|
||||
`person` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `receipts_fk_money` (`money`),
|
||||
KEY `receipts_inx_1` (`datenew`),
|
||||
CONSTRAINT `receipts_fk_money` FOREIGN KEY (`money`) REFERENCES `closedcash` (`money`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `tickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`tickettype` int(11) NOT NULL DEFAULT '0',
|
||||
`ticketid` int(11) NOT NULL,
|
||||
`person` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) DEFAULT NULL,
|
||||
`status` int(11) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `tickets_fk_2` (`person`),
|
||||
KEY `tickets_customers_fk` (`customer`),
|
||||
KEY `tickets_ticketid` (`tickettype`,`ticketid`),
|
||||
CONSTRAINT `tickets_customers_fk` FOREIGN KEY (`customer`) REFERENCES `customers` (`id`),
|
||||
CONSTRAINT `tickets_fk_2` FOREIGN KEY (`person`) REFERENCES `people` (`id`),
|
||||
CONSTRAINT `tickets_fk_id` FOREIGN KEY (`id`) REFERENCES `receipts` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `ticketsnum` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO TICKETSNUM VALUES(1);
|
||||
|
||||
|
||||
CREATE TABLE `ticketsnum_refund` (
|
||||
`id` int(11) NOT NULL
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO TICKETSNUM_REFUND VALUES(1);
|
||||
|
||||
CREATE TABLE `ticketsnum_payment` (
|
||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
|
||||
INSERT INTO TICKETSNUM_PAYMENT VALUES (DEFAULT);
|
||||
|
||||
CREATE TABLE `ticketlines` (
|
||||
`ticket` varchar(255) NOT NULL,
|
||||
`line` int(11) NOT NULL,
|
||||
`product` varchar(255) DEFAULT NULL,
|
||||
`attributesetinstance_id` varchar(255) DEFAULT NULL,
|
||||
`units` double NOT NULL,
|
||||
`price` double NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`attributes` mediumblob,
|
||||
PRIMARY KEY (`ticket`,`line`),
|
||||
KEY `ticketlines_fk_2` (`product`),
|
||||
KEY `ticketlines_attsetinst` (`attributesetinstance_id`),
|
||||
KEY `ticketlines_fk_3` (`taxid`),
|
||||
CONSTRAINT `ticketlines_attsetinst` FOREIGN KEY (`attributesetinstance_id`) REFERENCES `attributesetinstance` (`id`),
|
||||
CONSTRAINT `ticketlines_fk_2` FOREIGN KEY (`product`) REFERENCES `products` (`id`),
|
||||
CONSTRAINT `ticketlines_fk_3` FOREIGN KEY (`taxid`) REFERENCES `taxes` (`id`),
|
||||
CONSTRAINT `ticketlines_fk_ticket` FOREIGN KEY (`ticket`) REFERENCES `tickets` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `lineremoved` (
|
||||
`removeddate` timestamp NOT NULL DEFAULT current_timestamp,
|
||||
`name` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(255) DEFAULT NULL,
|
||||
`productid` varchar(255) DEFAULT NULL,
|
||||
`productname` varchar(255) DEFAULT NULL,
|
||||
`units` double NOT NULL
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `payments` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`payment` varchar(255) NOT NULL,
|
||||
`total` double NOT NULL DEFAULT '0',
|
||||
`tip` double DEFAULT '0',
|
||||
`transid` varchar(255) DEFAULT NULL,
|
||||
`isprocessed` bit(1) DEFAULT b'0',
|
||||
`returnmsg` mediumblob,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`tendered` double DEFAULT NULL,
|
||||
`cardname` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `payments_fk_receipt` (`receipt`),
|
||||
KEY `payments_inx_1` (`payment`),
|
||||
CONSTRAINT `payments_fk_receipt` FOREIGN KEY (`receipt`) REFERENCES `receipts` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `taxlines` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`receipt` varchar(255) NOT NULL,
|
||||
`taxid` varchar(255) NOT NULL,
|
||||
`base` double NOT NULL DEFAULT '0',
|
||||
`amount` double NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `taxlines_tax` (`taxid`),
|
||||
KEY `taxlines_receipt` (`receipt`),
|
||||
CONSTRAINT `taxlines_receipt` FOREIGN KEY (`receipt`) REFERENCES `receipts` (`id`),
|
||||
CONSTRAINT `taxlines_tax` FOREIGN KEY (`taxid`) REFERENCES `taxes` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `floors` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`image` mediumblob,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `floors_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO FLOORS(ID, NAME, IMAGE) VALUES ('0', 'Restaurant floor', $FILE{/com/unicenta/pos/templates/restaurant_floor.png});
|
||||
|
||||
CREATE TABLE `places` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`x` int(11) NOT NULL,
|
||||
`y` int(11) NOT NULL,
|
||||
`floor` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) DEFAULT NULL,
|
||||
`waiter` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(255) DEFAULT NULL,
|
||||
`tablemoved` smallint(6) NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `places_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('1', 'Table 1', 100, 50, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('2', 'Table 2', 250, 50, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('3', 'Table 3', 400, 50, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('4', 'Table 4', 550, 50, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('5', 'Table 5', 700, 50, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('6', 'Table 6', 850, 50, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('7', 'Table 7', 100, 150, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('8', 'Table 8', 250, 150, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('9', 'Table 9', 400, 150, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('10', 'Table 10', 550, 150, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('11', 'Table 11', 700, 150, '0');
|
||||
INSERT INTO PLACES(ID, NAME, X, Y, FLOOR) VALUES ('12', 'Table 12', 850, 150, '0');
|
||||
|
||||
CREATE TABLE `reservations` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`created` datetime NOT NULL,
|
||||
`datenew` datetime NOT NULL DEFAULT '2013-01-01 00:00:00',
|
||||
`title` varchar(255) NOT NULL,
|
||||
`chairs` int(11) NOT NULL,
|
||||
`isdone` bit(1) NOT NULL,
|
||||
`description` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `reservations_inx_1` (`datenew`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `reservation_customers` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`customer` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `res_cust_fk_2` (`customer`),
|
||||
CONSTRAINT `res_cust_fk_1` FOREIGN KEY (`id`) REFERENCES `reservations` (`id`),
|
||||
CONSTRAINT `res_cust_fk_2` FOREIGN KEY (`customer`) REFERENCES `customers` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `thirdparties` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`cif` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`address` varchar(255) DEFAULT NULL,
|
||||
`contactcomm` varchar(255) DEFAULT NULL,
|
||||
`contactfact` varchar(255) DEFAULT NULL,
|
||||
`payrule` varchar(255) DEFAULT NULL,
|
||||
`faxnumber` varchar(255) DEFAULT NULL,
|
||||
`phonenumber` varchar(255) DEFAULT NULL,
|
||||
`mobilenumber` varchar(255) DEFAULT NULL,
|
||||
`email` varchar(255) DEFAULT NULL,
|
||||
`webpage` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
UNIQUE KEY `thirdparties_cif_inx` (`cif`),
|
||||
UNIQUE KEY `thirdparties_name_inx` (`name`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `sharedtickets` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`content` mediumblob,
|
||||
`appuser` varchar(255) DEFAULT NULL,
|
||||
`pickupid` int(11) NOT NULL DEFAULT '0',
|
||||
`locked` varchar(20) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
-- Added for Employee Presence Management
|
||||
CREATE TABLE `shifts` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`startshift` datetime NOT NULL,
|
||||
`endshift` datetime DEFAULT NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO SHIFTS(ID, STARTSHIFT, ENDSHIFT, PPLID) VALUES ('0', '2017-01-01 00:00:00.001', '2017-01-01 00:00:00.002','0');
|
||||
|
||||
CREATE TABLE `leaves` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`pplid` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`startdate` datetime NOT NULL,
|
||||
`enddate` datetime NOT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `leaves_pplid` (`pplid`),
|
||||
CONSTRAINT `leaves_pplid` FOREIGN KEY (`pplid`) REFERENCES `people` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`visible` tinyint(1) NOT NULL DEFAULT '1',
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO BREAKS(ID, NAME, VISIBLE, NOTES) VALUES ('0', 'Lunch Break', TRUE, NULL);
|
||||
INSERT INTO BREAKS(ID, NAME, VISIBLE, NOTES) VALUES ('1', 'Tea Break', TRUE, NULL);
|
||||
INSERT INTO BREAKS(ID, NAME, VISIBLE, NOTES) VALUES ('2', 'Mid Break', TRUE, NULL);
|
||||
|
||||
CREATE TABLE `shift_breaks` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`shiftid` varchar(255) NOT NULL,
|
||||
`breakid` varchar(255) NOT NULL,
|
||||
`starttime` timestamp NOT NULL DEFAULT current_timestamp ON UPDATE current_timestamp,
|
||||
`endtime` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
|
||||
PRIMARY KEY (`id`),
|
||||
KEY `shift_breaks_breakid` (`breakid`),
|
||||
KEY `shift_breaks_shiftid` (`shiftid`),
|
||||
CONSTRAINT `shift_breaks_breakid` FOREIGN KEY (`breakid`) REFERENCES `breaks` (`id`),
|
||||
CONSTRAINT `shift_breaks_shiftid` FOREIGN KEY (`shiftid`) REFERENCES `shifts` (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO SHIFT_BREAKS(ID, SHIFTID, BREAKID, STARTTIME, ENDTIME) VALUES ('0', '0', '0', '2017-01-01 00:00:00.003', '2017-01-01 00:00:00.004');
|
||||
|
||||
CREATE TABLE `moorers` (
|
||||
`vesselname` varchar(255) DEFAULT NULL,
|
||||
`size` int(11) DEFAULT NULL,
|
||||
`days` int(11) DEFAULT NULL,
|
||||
`power` bit(1) NOT NULL DEFAULT b'0'
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `csvimport` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`rownumber` varchar(255) DEFAULT NULL,
|
||||
`csverror` varchar(255) DEFAULT NULL,
|
||||
`reference` varchar(1024) DEFAULT NULL,
|
||||
`code` varchar(1024) DEFAULT NULL,
|
||||
`name` varchar(1024) DEFAULT NULL,
|
||||
`pricebuy` double DEFAULT NULL,
|
||||
`pricesell` double DEFAULT NULL,
|
||||
`previousbuy` double DEFAULT NULL,
|
||||
`previoussell` double DEFAULT NULL,
|
||||
`category` varchar(255) DEFAULT NULL,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE `pickup_number` (
|
||||
`id` int(11) NOT NULL DEFAULT '0'
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
INSERT INTO PICKUP_NUMBER VALUES(1);
|
||||
|
||||
CREATE TABLE `draweropened` (
|
||||
`opendate` timestamp NOT NULL DEFAULT current_timestamp,
|
||||
`name` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(255) DEFAULT NULL
|
||||
) ENGINE=innodb DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,93 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2017 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 07/08/2016 08:00:00
|
||||
* Modified 10 Sept 2017
|
||||
* Called by Transfer for v4.4 after MySQL-create-transfer.sql
|
||||
*/
|
||||
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
alter table people drop foreign key people_fk_1;
|
||||
|
||||
alter table attributeinstance drop foreign key attinst_set;
|
||||
alter table attributeinstance drop foreign key attinst_att;
|
||||
alter table attributesetinstance drop foreign key attsetinst_set;
|
||||
alter table attributeuse drop foreign key attuse_set;
|
||||
alter table attributeuse drop foreign key attuse_att;
|
||||
alter table attributevalue drop foreign key attval_att;
|
||||
|
||||
alter table categories drop foreign key categories_fk_1;
|
||||
|
||||
alter table customers drop foreign key customers_taxcat;
|
||||
|
||||
alter table leaves drop foreign key leaves_pplid;
|
||||
|
||||
alter table payments drop foreign key payments_fk_receipt;
|
||||
|
||||
alter table products drop foreign key products_attrset_fk;
|
||||
alter table products drop foreign key products_taxcat_fk;
|
||||
alter table products drop foreign key products_fk_1;
|
||||
alter table products drop index products_inx_0;
|
||||
alter table products drop index products_inx_1;
|
||||
alter table products drop index products_name_inx;
|
||||
|
||||
alter table products_bundle drop foreign key products_bundle_fk_1;
|
||||
alter table products_bundle drop foreign key products_bundle_fk_2;
|
||||
|
||||
alter table products_cat drop foreign key products_cat_fk_1;
|
||||
|
||||
alter table products_com drop foreign key products_com_fk_1;
|
||||
alter table products_com drop foreign key products_com_fk_2;
|
||||
|
||||
alter table receipts drop foreign key receipts_fk_money;
|
||||
|
||||
alter table reservation_customers drop foreign key res_cust_fk_1;
|
||||
alter table reservation_customers drop foreign key res_cust_fk_2;
|
||||
|
||||
alter table shift_breaks drop foreign key shift_breaks_breakid;
|
||||
alter table shift_breaks drop foreign key shift_breaks_shiftid;
|
||||
|
||||
alter table stockcurrent drop foreign key stockcurrent_attsetinst;
|
||||
alter table stockcurrent drop foreign key stockcurrent_fk_1;
|
||||
alter table stockcurrent drop foreign key stockcurrent_fk_2;
|
||||
|
||||
alter table stockdiary drop foreign key stockdiary_attsetinst;
|
||||
alter table stockdiary drop foreign key stockdiary_fk_1;
|
||||
alter table stockdiary drop foreign key stockdiary_fk_2;
|
||||
|
||||
alter table stocklevel drop foreign key stocklevel_product;
|
||||
alter table stocklevel drop foreign key stocklevel_location;
|
||||
|
||||
alter table taxes drop foreign key taxes_cat_fk;
|
||||
alter table taxes drop foreign key taxes_custcat_fk;
|
||||
alter table taxes drop foreign key taxes_taxes_fk;
|
||||
|
||||
alter table taxlines drop foreign key taxlines_tax;
|
||||
alter table taxlines drop foreign key taxlines_receipt;
|
||||
|
||||
alter table ticketlines drop foreign key ticketlines_attsetinst;
|
||||
alter table ticketlines drop foreign key ticketlines_fk_ticket;
|
||||
alter table ticketlines drop foreign key ticketlines_fk_2;
|
||||
alter table ticketlines drop foreign key ticketlines_fk_3;
|
||||
|
||||
alter table tickets drop foreign key tickets_customers_fk;
|
||||
alter table tickets drop foreign key tickets_fk_2;
|
||||
alter table tickets drop foreign key tickets_fk_id;
|
||||
@@ -0,0 +1,434 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2017 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 28/07/2016 08:00:00
|
||||
*
|
||||
* Database upgrade script for MySQL
|
||||
* Normalise TABLENAME to tablename
|
||||
* lowercase is common to all platforms
|
||||
* Linux default is lowercase whereas windows and Mac accepts UPPER OR lowercase
|
||||
*/
|
||||
|
||||
--
|
||||
-- CLEAR THE DECKS
|
||||
-- Need to clear any unsettled sales as properties is serialized and so may not
|
||||
-- match the formats
|
||||
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
/* Alter table in target */
|
||||
-- ALTER TABLE APPLICATIONS RENAME `applications` ,
|
||||
-- DROP KEY PRIMARY, ADD PRIMARY KEY(`id`) ;
|
||||
ALTER TABLE APPLICATIONS RENAME `applications_tmp` ,
|
||||
DROP KEY PRIMARY
|
||||
ALTER TABLE `applications_tmp` RENAME `applications`,
|
||||
ADD PRIMARY KEY(`id`);
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ATTRIBUTE RENAME `attribute_tmp` ,
|
||||
DROP KEY `PRIMARY`;
|
||||
ALTER TABLE `attribute_tmp` RENAME `attribute`,
|
||||
ADD PRIMARY KEY (`id`);
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ATTRIBUTEINSTANCE RENAME `attributeinstance_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `ATTINST_ATT` ,
|
||||
DROP KEY `ATTINST_SET` ;
|
||||
ALTER TABLE `attributeinstance_tmp` RENAME `attributeinstance`,
|
||||
ADD PRIMARY KEY (`id`),
|
||||
ADD KEY `attinst_att`(`attribute_id`),
|
||||
ADD KEY `attinst_set`(`attributesetinstance_id`);
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ATTRIBUTESET RENAME `attributeset_tmp` ,
|
||||
DROP KEY `PRIMARY`;
|
||||
ALTER TABLE `attributeset_tmp` RENAME `attributeset` ,
|
||||
ADD PRIMARY KEY(`id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ATTRIBUTESETINSTANCE RENAME `attributesetinstance_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `ATTSETINST_SET` ;
|
||||
ALTER TABLE `attributesetinstance_tmp` RENAME `attributesetinstance` ,
|
||||
ADD PRIMARY KEY(`id`),
|
||||
ADD KEY `attsetinst_set`(`attributeset_id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ATTRIBUTEUSE RENAME `attributeuse_tmp` ,
|
||||
DROP KEY `PRIMARY` ,
|
||||
DROP KEY `ATTUSE_ATT` ,
|
||||
DROP KEY `ATTUSE_LINE` ;
|
||||
ALTER TABLE `attributeuse_tmp` RENAME `attributeuse` ,
|
||||
ADD PRIMARY KEY(`id`),
|
||||
ADD KEY `attuse_att`(`attribute_id`) ,
|
||||
ADD UNIQUE KEY `attuse_line`(`attributeset_id`,`lineno`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ATTRIBUTEVALUE RENAME `attributevalue_tmp` ,
|
||||
DROP KEY `PRIMARY` ,
|
||||
DROP KEY `ATTVAL_ATT` ;
|
||||
ALTER TABLE `attributevalue_tmp` RENAME `attributevalue` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `attval_att`(`attribute_id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE BREAKS RENAME `breaks_tmp` ,
|
||||
DROP KEY `PRIMARY` ;
|
||||
ALTER TABLE `breaks_tmp` RENAME `breaks` ,
|
||||
ADD PRIMARY KEY(`id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE CATEGORIES RENAME `categories_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `categories_fk_1` ,
|
||||
DROP KEY `CATEGORIES_NAME_INX` ;
|
||||
ALTER TABLE `categories_tmp` RENAME `categories` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `categories_fk_1`(`parentid`) ,
|
||||
ADD UNIQUE KEY `categories_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE CLOSEDCASH RENAME `closedcash_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `CLOSEDCASH_INX_1` ,
|
||||
DROP KEY `CLOSEDCASH_INX_SEQ` ;
|
||||
ALTER TABLE `closedcash_tmp` RENAME `closedcash` ,
|
||||
ADD PRIMARY KEY(`money`) ,
|
||||
ADD KEY `closedcash_inx_1`(`datestart`) ,
|
||||
ADD UNIQUE KEY `closedcash_inx_seq`(`host`,`hostsequence`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE CSVIMPORT RENAME `csvimport_tmp` ,
|
||||
DROP KEY `PRIMARY` ;
|
||||
ALTER TABLE `csvimport_tmp` RENAME `csvimport` ,
|
||||
ADD PRIMARY KEY(`id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE CUSTOMERS RENAME `customers_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `CUSTOMERS_CARD_INX` ,
|
||||
DROP KEY `CUSTOMERS_NAME_INX` ,
|
||||
DROP KEY `CUSTOMERS_SKEY_INX` ,
|
||||
DROP KEY `CUSTOMERS_TAXCAT` ,
|
||||
DROP KEY `CUSTOMERS_TAXID_INX` ;
|
||||
ALTER TABLE `customers_tmp` RENAME `customers` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `customers_card_inx`(`card`) ,
|
||||
ADD KEY `customers_name_inx`(`name`) ,
|
||||
ADD UNIQUE KEY `customers_skey_inx`(`searchkey`) ,
|
||||
ADD KEY `customers_taxcat`(`taxcategory`) ,
|
||||
ADD KEY `customers_taxid_inx`(`taxid`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE DRAWEROPENED RENAME `draweropened_tmp` ;
|
||||
ALTER TABLE `draweropened_tmp` RENAME `draweropened` ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE FLOORS RENAME `floors_tmp` ,
|
||||
DROP KEY `PRIMARY` ,
|
||||
DROP KEY `FLOORS_NAME_INX` ;
|
||||
ALTER TABLE `floors_tmp` RENAME `floors` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `floors_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE LEAVES RENAME `leaves_tmp` ,
|
||||
DROP KEY `PRIMARY` ,
|
||||
DROP KEY `lEAVES_PPLID` ;
|
||||
ALTER TABLE `leaves_tmp` RENAME `leaves` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `leaves_pplid`(`pplid`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE LINEREMOVED RENAME `lineremoved_tmp` ;
|
||||
ALTER TABLE `lineremoved_tmp` RENAME `lineremoved` ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE LOCATIONS RENAME `locations_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `LOCATIONS_NAME_INX` ;
|
||||
ALTER TABLE `locations_tmp` RENAME `locations` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `locations_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE MOORERS RENAME `moorers_tmp` ;
|
||||
ALTER TABLE `moorers_tmp` RENAME `moorers` ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE PAYMENTS RENAME `payments_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `PAYMENTS_FK_RECEIPT` ,
|
||||
DROP KEY `PAYMENTS_INX_1` ;
|
||||
ALTER TABLE `payments_tmp` RENAME `payments` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `payments_fk_receipt`(`receipt`) ,
|
||||
ADD KEY `payments_inx_1`(`payment`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE PEOPLE RENAME `people_tmp` ,
|
||||
DROP KEY `PRIMARY` ,
|
||||
DROP KEY `PEOPLE_CARD_INX` ,
|
||||
DROP KEY `PEOPLE_FK_1` ,
|
||||
DROP KEY `PEOPLE_NAME_INX` ;
|
||||
ALTER TABLE `people_tmp` RENAME `people` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `people_card_inx`(`card`) ,
|
||||
ADD KEY `people_fk_1`(`role`) ,
|
||||
ADD UNIQUE KEY `people_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE PLACES RENAME `places_tmp` ,
|
||||
DROP KEY `PRIMARY` ,
|
||||
DROP KEY `PLACES_NAME_INX` ;
|
||||
ALTER TABLE `places_tmp` RENAME `places` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `places_name_inx`(`name`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE PRODUCTS RENAME `products_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `PRODUCTS_ATTRSET_FK` ,
|
||||
DROP KEY `PRODUCTS_FK_1` ,
|
||||
DROP KEY `PRODUCTS_INX_0` ,
|
||||
DROP KEY `PRODUCTS_INX_1` ,
|
||||
DROP KEY `PRODUCTS_NAME_INX` ,
|
||||
DROP KEY `PRODUCTS_TAXCAT_FK` ;
|
||||
ALTER TABLE `products_tmp` RENAME `products` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `products_attrset_fx`(`attributeset_id`) ,
|
||||
ADD KEY `products_fk_1`(`category`) ,
|
||||
ADD UNIQUE KEY `products_inx_0`(`reference`) ,
|
||||
ADD UNIQUE KEY `products_inx_1`(`code`) ,
|
||||
ADD KEY `products_name_inx`(`name`) ,
|
||||
ADD KEY `products_taxcat_fk`(`taxcat`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE PRODUCTS_CAT RENAME `products_cat_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `PRODUCTS_CAT_INX_1` ;
|
||||
ALTER TABLE `products_cat_tmp` RENAME `products_cat` ,
|
||||
ADD PRIMARY KEY(`product`) ,
|
||||
ADD KEY `products_cat_inx_1`(`catorder`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE PRODUCTS_COM RENAME `products_com_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `PCOM_INX_PROD` ,
|
||||
DROP KEY `PRODUCTS_COM_FK_2` ;
|
||||
ALTER TABLE `products_com_tmp` RENAME `products_com` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `pcom_inx_prod`(`product`,`product2`) ,
|
||||
ADD KEY `products_com_fk_2`(`product2`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE RECEIPTS RENAME `receipts_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `RECEIPTS_FK_MONEY` ,
|
||||
DROP KEY `RECEIPTS_INX_1` ;
|
||||
ALTER TABLE `receipts_tmp` RENAME `receipts` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `receipts_fk_money`(`money`) ,
|
||||
ADD KEY `receipts_inx_1`(`datenew`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE RESERVATION_CUSTOMERS RENAME `reservation_customers_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `RES_CUST_FK_2` ;
|
||||
ALTER TABLE `reservation_customers_tmp` RENAME `reservation_customers` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `res_cust_fk_2`(`customer`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE RESERVATIONS RENAME `reservations_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `RESERVATIONS_INX_1` ;
|
||||
ALTER TABLE `reservations_tmp` RENAME `reservations` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `reservations_inx_1`(`datenew`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE RESOURCES RENAME `resources_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `RESOURCES_NAME_INX` ;
|
||||
ALTER TABLE `resources_tmp` RENAME `resources` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `resources_name_inx`(`name`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE ROLES RENAME `roles_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `ROLES_NAME_INX` ;
|
||||
ALTER TABLE `roles_tmp` RENAME `roles` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `roles_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE SHAREDTICKETS RENAME `sharedtickets_tmp` ,
|
||||
DROP KEY `PRIMARY` ;
|
||||
ALTER TABLE `sharedtickets_tmp` RENAME `sharedtickets` ,
|
||||
ADD PRIMARY KEY(`id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE SHIFT_BREAKS RENAME `shift_breaks_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `SHIFT_BREAKS_BREAKID` ,
|
||||
DROP KEY `SHIFT_BREAKS_SHIFTID` ;
|
||||
ALTER TABLE `shift_breaks_tmp` RENAME `shift_breaks` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `shift_breaks_breakid`(`breakid`) ,
|
||||
ADD KEY `shift_breaks_shiftid`(`shiftid`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE SHIFTS RENAME `shifts_tmp` ,
|
||||
DROP KEY `PRIMARY` ;
|
||||
ALTER TABLE `shifts_tmp` RENAME `shifts` ,
|
||||
ADD PRIMARY KEY(`id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE STOCKCURRENT RENAME `stockcurrent_tmp` ,
|
||||
DROP KEY `STOCKCURRENT_ATTSETINST` ,
|
||||
DROP KEY `STOCKCURRENT_FK_1` ,
|
||||
DROP KEY `STOCKCURRENT_INX` ;
|
||||
ALTER TABLE `stockcurrent_tmp` RENAME `stockcurrent` ,
|
||||
ADD KEY `stockcurrent_attsetinst`(`attributesetinstance_id`) ,
|
||||
ADD KEY `stockcurrent_fk_1`(`product`) ,
|
||||
ADD UNIQUE KEY `stockcurrent_inx`(`location`,`product`,`attributesetinstance_id`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE STOCKDIARY RENAME `stockdiary_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `STOCKDIARY_ATTSETINST` ,
|
||||
DROP KEY `STOCKDIARY_FK_1` ,
|
||||
DROP KEY `STOCKDIARY_FK_2` ,
|
||||
DROP KEY `STOCKDIARY_INX_1` ;
|
||||
ALTER TABLE `stockdiary_tmp` RENAME `stockdiary` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `stockdiary_fk_1`(`product`) ,
|
||||
ADD KEY `stockdiary_fk_2`(`location`) ,
|
||||
ADD KEY `stockdiary_attsetinst`(`attributesetinstance_id`) ,
|
||||
ADD KEY `stockdiary_inx_1`(`datenew`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE STOCKLEVEL RENAME `stocklevel_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `STOCKLEVEL_LOCATION` ,
|
||||
DROP KEY `STOCKLEVEL_PRODUCT` ;
|
||||
ALTER TABLE `stocklevel_tmp` RENAME `stocklevel` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `stocklevel_location`(`location`) ,
|
||||
ADD KEY `stocklevel_product`(`product`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TAXCATEGORIES RENAME `taxcategories_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `TAXCAT_NAME_INX` ;
|
||||
ALTER TABLE `taxcategories_tmp` RENAME `taxcategories` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `taxcat_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TAXCUSTCATEGORIES RENAME `taxcustcategories_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `TAXCUSTCAT_NAME_INX` ;
|
||||
ALTER TABLE `taxcustcategories_tmp` RENAME `taxcustcategories` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `taxcustcat_name_inx`(`name`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TAXES RENAME `taxes_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `TAXES_CAT_FK` ,
|
||||
DROP KEY `TAXES_CUSTCAT_FK` ,
|
||||
DROP KEY `TAXES_NAME_INX` ,
|
||||
DROP KEY `TAXES_TAXES_FK` ;
|
||||
ALTER TABLE `taxes_tmp` RENAME `taxes` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `taxes_cat_fk`(`category`) ,
|
||||
ADD KEY `taxes_custcat_fk`(`custcategory`) ,
|
||||
ADD UNIQUE KEY `taxes_name_inx`(`name`) ,
|
||||
ADD KEY `taxes_taxes_fk`(`parentid`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TAXLINES RENAME `taxlines_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `TAXLINES_RECEIPT` ,
|
||||
DROP KEY `TAXLINES_TAX` ;
|
||||
ALTER TABLE `taxlines_tmp` RENAME `taxlines` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `taxlines_receipt`(`receipt`) ,
|
||||
ADD KEY `taxlines_tax`(`taxid`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE THIRDPARTIES RENAME `thirdparties_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `THIRDPARTIES_CIF_INX` ,
|
||||
DROP KEY `THIRDPARTIES_NAME_INX` ;
|
||||
ALTER TABLE `thirdparties_tmp` RENAME `thirdparties` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD UNIQUE KEY `thirdparties_cif_inx`(`cif`) ,
|
||||
ADD UNIQUE KEY `thirdparties_name_inx`(`name`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TICKETLINES RENAME `ticketlines_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `TICKETLINES_ATTSETINST` ,
|
||||
DROP KEY `TICKETLINES_FK_2` ,
|
||||
DROP KEY `TICKETLINES_FK_3` ;
|
||||
ALTER TABLE `ticketlines_tmp` RENAME `ticketlines` ,
|
||||
ADD PRIMARY KEY(`ticket`,`line`) ,
|
||||
ADD KEY `ticketlines_attsetinst`(`attributesetinstance_id`) ,
|
||||
ADD KEY `ticketlines_fk_2`(`product`) ,
|
||||
ADD KEY `ticketlines_fk_3`(`taxid`) ;
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TICKETS RENAME `tickets_tmp` ,
|
||||
DROP KEY `PRIMARY`,
|
||||
DROP KEY `tickets_CUSTOMERS_FK` ,
|
||||
DROP KEY `tickets_FK_2` ,
|
||||
DROP KEY `tickets_TICKETID` ;
|
||||
ALTER TABLE `tickets_tmp` RENAME `tickets` ,
|
||||
ADD PRIMARY KEY(`id`) ,
|
||||
ADD KEY `tickets_customers_fk`(`customer`) ,
|
||||
ADD KEY `tickets_fk_2`(`person`) ,
|
||||
ADD KEY `tickets_ticketid`(`tickettype`,`ticketid`) ;
|
||||
|
||||
|
||||
/* Alter table in target */
|
||||
ALTER TABLE TICKETSNUM RENAME `ticketsnum_tmp` ;
|
||||
ALTER TABLE `ticketsnum_tmp` RENAME `ticketsnum` ;
|
||||
|
||||
ALTER TABLE TICKETSNUM_PAYMENT RENAME `ticketsnum_payment_tmp` ,
|
||||
DROP KEY `PRIMARY` ;
|
||||
ALTER TABLE `ticketsnum_payment_tmp` RENAME `ticketsnum_payment` ,
|
||||
ADD PRIMARY KEY(`id`) ;
|
||||
|
||||
ALTER TABLE TICKETSNUM_REFUND RENAME `ticketsnum_refund_tmp` ;
|
||||
ALTER TABLE `ticketsnum_refund_tmp` RENAME `ticketsnum_refund` ;
|
||||
@@ -0,0 +1,35 @@
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/*
|
||||
* Script created by Jack, uniCenta 20/11/2016 08:00:00
|
||||
*
|
||||
* Create ORDERS table for Remote Display
|
||||
*/
|
||||
|
||||
/* Header line. Object: orders. Script date: 01/01/2017 00:00:01. */
|
||||
CREATE TABLE IF NOT EXISTS `orders` (
|
||||
`id` int(11) NOT NULL,
|
||||
`orderid` varchar(50) DEFAULT NULL,
|
||||
`qty` int(11) DEFAULT '1',
|
||||
`details` varchar(255) DEFAULT NULL,
|
||||
`attributes` varchar(255) DEFAULT NULL,
|
||||
`notes` varchar(255) DEFAULT NULL,
|
||||
`ticketid` varchar(50) DEFAULT NULL,
|
||||
`ordertime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
`displayid` int(11) DEFAULT '1',
|
||||
`auxiliary` int(11) DEFAULT NULL,
|
||||
`completetime` timestamp,
|
||||
PRIMARY KEY (`id`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
@@ -0,0 +1,45 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2018 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database upgrade script for MySQL
|
||||
-- v4.5.1 - v4.5.2 17FEB2018
|
||||
|
||||
--
|
||||
-- CLEAR THE DECKS
|
||||
--
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
-- RECREATE applications --
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
DELETE FROM roles WHERE id = '0';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,38 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2018 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database upgrade script for MySQL
|
||||
-- v4.5.2 - v4.5.3 3MAR2018
|
||||
|
||||
--
|
||||
-- CLEAR THE DECKS
|
||||
--
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
-- RECREATE applications --
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,38 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2018 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database upgrade script for MySQL
|
||||
-- v4.5.3 - v4.5.4 9MAY2018
|
||||
|
||||
--
|
||||
-- CLEAR THE DECKS
|
||||
--
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
-- RECREATE applications --
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,54 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2018 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database upgrade script for MySQL
|
||||
-- v4.5 - v4.5.5 3JUNE2018
|
||||
|
||||
--
|
||||
-- CLEAR THE DECKS
|
||||
--
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- RECREATE applications --
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
-- SYSTEM
|
||||
DELETE FROM resources WHERE id = '00';
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('00', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
|
||||
-- COMMONS
|
||||
DELETE FROM roles WHERE id = '0';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
DELETE FROM roles WHERE id = '1';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
DELETE FROM roles WHERE id = '2';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,48 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (c) 2009-2018 uniCenta
|
||||
-- https://unicenta.com
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database upgrade script for MySQL
|
||||
-- v4.5 - v4.5.1 27JAN2018
|
||||
|
||||
--
|
||||
-- CLEAR THE DECKS
|
||||
--
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- RECREATE applications --
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
-- VERSIONS
|
||||
|
||||
-- COMMONS
|
||||
DELETE FROM roles WHERE id = '0';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,62 @@
|
||||
-- CLEAR THE DECKS
|
||||
DELETE FROM sharedtickets;
|
||||
|
||||
-- Switch OFF table foreign key relationships
|
||||
set foreign_key_checks = 0;
|
||||
|
||||
-- RECREATE applications table
|
||||
DROP TABLE `applications`;
|
||||
CREATE TABLE IF NOT EXISTS `applications` (
|
||||
`id` varchar(255) NOT NULL,
|
||||
`name` varchar(255) NOT NULL,
|
||||
`version` varchar(255) NOT NULL,
|
||||
`instdate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
|
||||
PRIMARY KEY ( `id` )
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT = Compact;
|
||||
|
||||
|
||||
-- SYSTEM
|
||||
DELETE FROM resources WHERE name = 'script.posapps';
|
||||
|
||||
|
||||
DELETE FROM resources WHERE id = '0';
|
||||
DELETE FROM resources WHERE id = '00';
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('00', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml} WHERE name = 'Ticket.Buttons';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml} WHERE name = 'Printer.Ticket';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Ticket.Close.xml} WHERE name = 'Ticket.Close';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/Cash.Close.xml} WHERE name = 'Cash.Close';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/customer.created.xml} WHERE name = 'Customer.Created';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/customer.deleted.xml} WHERE name = 'Customer.Deleted';
|
||||
COMMIT;
|
||||
|
||||
UPDATE resources SET content = $FILE{/com/unicenta/pos/templates/customer.updated.xml} WHERE name = 'Customer.Updated';
|
||||
COMMIT;
|
||||
|
||||
|
||||
-- ROLES
|
||||
DELETE FROM roles WHERE id = '0';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
DELETE FROM roles WHERE id = '1';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
DELETE FROM roles WHERE id = '2';
|
||||
INSERT INTO roles(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
|
||||
|
||||
-- Switch ON table foreign key relationships
|
||||
set foreign_key_checks = 1;
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
|
||||
COMMIT;
|
||||
@@ -0,0 +1,746 @@
|
||||
-- uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
-- Copyright (C) 2009-2017 uniCenta
|
||||
-- http://sourceforge.net/projects/unicentaopos
|
||||
--
|
||||
-- This file is part of uniCenta oPOS.
|
||||
--
|
||||
-- uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
-- it under the terms of the GNU General Public License as published by
|
||||
-- the Free Software Foundation, either version 3 of the License, or
|
||||
-- (at your option) any later version.
|
||||
--
|
||||
-- uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
-- GNU General Public License for more details.
|
||||
--
|
||||
-- You should have received a copy of the GNU General Public License
|
||||
-- along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-- Database create script for PostgreSQL
|
||||
-- v4.1.4
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE applications (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
version VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE roles (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
permissions BYTEA,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX ROLES_NAME_INX ON roles(name);
|
||||
INSERT INTO ROLES(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
INSERT INTO ROLES(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
INSERT INTO ROLES(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
INSERT INTO ROLES(id, name, permissions) VALUES('3', 'Guest role', $FILE{/com/unicenta/pos/templates/Role.Guest.xml} );
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE people (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
apppassword VARCHAR,
|
||||
card VARCHAR,
|
||||
role VARCHAR NOT NULL,
|
||||
visible BOOLEAN NOT NULL,
|
||||
image BYTEA,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT PEOPLE_FK_1 FOREIGN KEY (ROLE) REFERENCES roles(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX PEOPLE_NAME_INX ON people(name);
|
||||
CREATE INDEX PEOPLE_CARD_INX ON people(card);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('0', 'Administrator', NULL, '0', TRUE, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('1', 'Manager', NULL, '1', TRUE, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('2', 'Employee', NULL, '2', TRUE, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('3', 'Guest', NULL, '3', TRUE, NULL);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE resources (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
restype INTEGER NOT NULL,
|
||||
content BYTEA,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX RESOURCES_NAME_INX ON resources(name);
|
||||
|
||||
-- ADD resources --
|
||||
-- MENU
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('0', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
|
||||
-- IMAGES
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('1', 'coin.01', 1, $FILE{/com/unicenta/pos/templates/coin.01.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('2', 'coin.02', 1, $FILE{/com/unicenta/pos/templates/coin.02.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('3', 'coin.05', 1, $FILE{/com/unicenta/pos/templates/coin.05.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('4', 'coin.1', 1, $FILE{/com/unicenta/pos/templates/coin.1.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('5', 'coin.10', 1, $FILE{/com/unicenta/pos/templates/coin.10.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('6', 'coin.2', 1, $FILE{/com/unicenta/pos/templates/coin.2.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('7', 'coin.20', 1, $FILE{/com/unicenta/pos/templates/coin.20.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('8', 'coin.50', 1, $FILE{/com/unicenta/pos/templates/coin.50.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('9', 'img.cash', 1, $FILE{/com/unicenta/pos/templates/img.cash.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('10', 'img.cashdrawer', 1, $FILE{/com/unicenta/pos/templates/img.cashdrawer.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('11', 'img.discount', 1, $FILE{/com/unicenta/pos/templates/img.discount.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('12', 'img.discount_b', 1, $FILE{/com/unicenta/pos/templates/img.discount_b.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('13', 'img.empty', 1, $FILE{/com/unicenta/pos/templates/img.empty.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('14', 'img.heart', 1, $FILE{/com/unicenta/pos/templates/img.heart.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('15', 'img.keyboard_32', 1, $FILE{/com/unicenta/pos/templates/img.keyboard_32.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('16', 'img.kit_print', 1, $FILE{/com/unicenta/pos/templates/img.kit_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('17', 'img.no_photo', 1, $FILE{/com/unicenta/pos/templates/img.no_photo.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('18', 'img.refundit', 1, $FILE{/com/unicenta/pos/templates/img.refundit.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('19', 'img.run_script', 1, $FILE{/com/unicenta/pos/templates/img.run_script.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('20', 'img.ticket_print', 1, $FILE{/com/unicenta/pos/templates/img.ticket_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('21', 'img.user', 1, $FILE{/com/unicenta/pos/templates/img.user.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('22', 'note.50', 1, $FILE{/com/unicenta/pos/templates/note.50.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('23', 'note.20', 1, $FILE{/com/unicenta/pos/templates/note.20.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('24', 'note.10', 1, $FILE{/com/unicenta/pos/templates/note.10.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('25', 'note.5', 1, $FILE{/com/unicenta/pos/templates/note.5.png});
|
||||
|
||||
-- PRINTER
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('26', 'Printer.CloseCash.Preview', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.Preview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('27', 'Printer.CloseCash', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('28', 'Printer.CustomerPaid', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('29', 'Printer.CustomerPaid2', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('30', 'Printer.FiscalTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.FiscalTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('31', 'Printer.Inventory', 0, $FILE{/com/unicenta/pos/templates/Printer.Inventory.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('32', 'Printer.OpenDrawer', 0, $FILE{/com/unicenta/pos/templates/Printer.OpenDrawer.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('33', 'Printer.PartialCash', 0, $FILE{/com/unicenta/pos/templates/Printer.PartialCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('34', 'Printer.PrintLastTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.PrintLastTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('35', 'Printer.Product', 0, $FILE{/com/unicenta/pos/templates/Printer.Product.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('36', 'Printer.ReprintTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.ReprintTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('37', 'Printer.Start', 0, $FILE{/com/unicenta/pos/templates/Printer.Start.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('38', 'Printer.Ticket.P1', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P1.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('39', 'Printer.Ticket.P2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('40', 'Printer.Ticket.P3', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P3.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('41', 'Printer.Ticket.P4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('42', 'Printer.Ticket.P5', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P5.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('43', 'Printer.Ticket.P6', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P6.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('44', 'Printer.Ticket', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('45', 'Printer.Ticket2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('46', 'Printer.TicketClose', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketClose.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('47', 'Printer.TicketRemote', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketRemote.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('48', 'Printer.TicketLine', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('49', 'Printer.TicketNew', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('50', 'Printer.TicketPreview', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('51', 'Printer.TicketTotal', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketTotal.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('52', 'Printer.Ticket.Logo', 1, $FILE{/com/unicenta/pos/templates/printer.ticket.logo.png});
|
||||
|
||||
-- SCRIPTS
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('53', 'script.AddLineNote', 0, $FILE{/com/unicenta/pos/templates/script.AddLineNote.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('54', 'script.Event.Total', 0, $FILE{/com/unicenta/pos/templates/script.Event.Total.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('55', 'script.Keyboard', 0, $FILE{/com/unicenta/pos/templates/script.Keyboard.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('56', 'script.linediscount', 0, $FILE{/com/unicenta/pos/templates/script.linediscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('57', 'script.ReceiptConsolidate', 0, $FILE{/com/unicenta/pos/templates/script.ReceiptConsolidate.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('58', 'script.Refundit', 0, $FILE{/com/unicenta/pos/templates/script.Refundit.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('59', 'script.SendOrder', 0, $FILE{/com/unicenta/pos/templates/script.SendOrder.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('60', 'script.ServiceCharge', 0, $FILE{/com/unicenta/pos/templates/script.script.ServiceCharge.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('61', 'script.SetPerson', 0, $FILE{/com/unicenta/pos/templates/script.SetPerson.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('62', 'script.StockCurrentAdd', 0, $FILE{/com/unicenta/pos/templates/script.StockCurrentAdd.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('63', 'script.StockCurrentSet', 0, $FILE{/com/unicenta/pos/templates/script.StockCurrentSet.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('64', 'script.totaldiscount', 0, $FILE{/com/unicenta/pos/templates/script.totaldiscount.txt});
|
||||
|
||||
-- SYSTEM
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('65', 'payment.cash', 0, $FILE{/com/unicenta/pos/templates/payment.cash.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('66', 'ticket.addline', 0, $FILE{/com/unicenta/pos/templates/ticket.addline.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('67', 'ticket.change', 0, $FILE{/com/unicenta/pos/templates/ticket.change.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('68', 'Ticket.Buttons', 0, $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('69', 'Ticket.Close', 0, $FILE{/com/unicenta/pos/templates/Ticket.Close.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('70', 'Ticket.Discount', 0, $FILE{/com/unicenta/pos/templates/Ticket.Discount.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('71', 'Ticket.Line', 0, $FILE{/com/unicenta/pos/templates/Ticket.Line.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('72', 'ticket.removeline', 0, $FILE{/com/unicenta/pos/templates/ticket.removeline.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('73', 'ticket.setline', 0, $FILE{/com/unicenta/pos/templates/ticket.setline.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('74', 'Ticket.TicketLineTaxesIncluded', 0, $FILE{/com/unicenta/pos/templates/Ticket.TicketLineTaxesIncluded.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('75', 'Window.Logo', 1, $FILE{/com/unicenta/pos/templates/window.logo.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('76', 'Window.Title', 0, $FILE{/com/unicenta/pos/templates/Window.Title.txt});
|
||||
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE taxcustcategories (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX TAXCUSTCAT_NAME_INX ON taxcustcategories(name);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE CUSTOMERS (
|
||||
id varchar NOT NULL,
|
||||
searchkey varchar NOT NULL,
|
||||
taxid varchar default NULL,
|
||||
name varchar NOT NULL,
|
||||
taxcategory varchar default NULL,
|
||||
card varchar default NULL,
|
||||
maxdebt double precision default 0 NOT NULL,
|
||||
address varchar default NULL,
|
||||
address2 varchar default NULL,
|
||||
postal varchar default NULL,
|
||||
city varchar default NULL,
|
||||
region varchar default NULL,
|
||||
country varchar default NULL,
|
||||
firstname varchar default NULL,
|
||||
lastname varchar default NULL,
|
||||
email varchar default NULL,
|
||||
phone varchar default NULL,
|
||||
phone2 varchar default NULL,
|
||||
fax varchar default NULL,
|
||||
notes varchar default NULL,
|
||||
visible BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
curdate timestamp default NULL,
|
||||
curdebt double precision default 0,
|
||||
image bytea,
|
||||
isvip BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
discount double precision default 0 NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT CUSTOMERS_TAXCAT FOREIGN KEY (taxcategory) REFERENCES taxcustcategories(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX CUSTOMERS_SKEY_INX ON customers(searchkey);
|
||||
CREATE INDEX CUSTOMERS_TAXID_INX ON customers(taxid);
|
||||
CREATE INDEX CUSTOMERS_NAME_INX ON customers(name);
|
||||
CREATE INDEX CUSTOMERS_CARD_INX ON customers(card);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE categories (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
parentid VARCHAR,
|
||||
image BYTEA,
|
||||
texttip VARCHAR DEFAULT NULL,
|
||||
catshowname BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
catorder varchar default NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT categories_fk_1 FOREIGN KEY (parentid) REFERENCES categories(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX CATEGORIES_NAME_INX ON categories(name);
|
||||
INSERT INTO categories(id, name) VALUES ('000', 'Category Standard');
|
||||
INSERT INTO categories(id, name) VALUES ('xxx999', '***');
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE taxcategories (
|
||||
id varchar NOT NULL,
|
||||
name varchar NOT NULL,
|
||||
PRIMARY KEY ( id )
|
||||
);
|
||||
CREATE UNIQUE INDEX TAXCAT_NAME_INX ON taxcategories(name);
|
||||
INSERT INTO taxcategories(id, name) VALUES ('000', 'Tax Exempt');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('001', 'Tax Standard');
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE taxes (
|
||||
id varchar NOT NULL,
|
||||
name varchar NOT NULL,
|
||||
category varchar NOT NULL,
|
||||
custcategory varchar default NULL,
|
||||
parentid varchar default NULL,
|
||||
rate double precision default 0 NOT NULL,
|
||||
ratecascade BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
rateorder integer default NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT TAXES_CAT_FK FOREIGN KEY (category) REFERENCES taxcategories(id),
|
||||
CONSTRAINT TAXES_CUSTCAT_FK FOREIGN KEY (custcategory) REFERENCES taxcustcategories(id),
|
||||
CONSTRAINT TAXES_TAXES_FK FOREIGN KEY (parentid) REFERENCES taxes(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX TAXES_NAME_INX ON taxes(name);
|
||||
INSERT INTO TAXES(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('000', 'Tax Exempt', '000', NULL, NULL, 0, false, NULL);
|
||||
INSERT INTO TAXES(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('001', 'Tax Standard', '001', NULL, NULL, 0.10, false, NULL);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE attribute (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE attributevalue (
|
||||
id VARCHAR NOT NULL,
|
||||
attribute_id VARCHAR NOT NULL,
|
||||
value VARCHAR,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT attval_att FOREIGN KEY (attribute_id) REFERENCES attribute(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE attributeset (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE attributeuse (
|
||||
id VARCHAR NOT NULL,
|
||||
attributeset_id VARCHAR NOT NULL,
|
||||
attribute_id VARCHAR NOT NULL,
|
||||
lineno INTEGER,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT attuse_set FOREIGN KEY (attributeset_id) REFERENCES attributeset(id) ON DELETE CASCADE,
|
||||
CONSTRAINT attuse_att FOREIGN KEY (attribute_id) REFERENCES attribute(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX attuse_line ON attributeuse(attributeset_id, lineno);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE attributesetinstance (
|
||||
id VARCHAR NOT NULL,
|
||||
attributeset_ID VARCHAR NOT NULL,
|
||||
description VARCHAR,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT attsetinst_set FOREIGN KEY (attributeset_id) REFERENCES attributeset(id) ON DELETE CASCADE
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE attributeinstance (
|
||||
id VARCHAR NOT NULL,
|
||||
attributesetinstance_id VARCHAR NOT NULL,
|
||||
attribute_id VARCHAR NOT NULL,
|
||||
value VARCHAR,
|
||||
PRIMARY KEY (id),
|
||||
constraint attinst_set foreign key (attributesetinstance_id) references attributesetinstance(id) on delete cascade,
|
||||
constraint attinst_att foreign key (attribute_id) references attribute(id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE products (
|
||||
id varchar NOT NULL,
|
||||
reference varchar NOT NULL,
|
||||
code varchar NOT NULL,
|
||||
codetype varchar default NULL,
|
||||
name varchar NOT NULL,
|
||||
pricebuy double precision default 0 NOT NULL,
|
||||
pricesell double precision default 0 NOT NULL,
|
||||
category varchar NOT NULL,
|
||||
taxcat varchar NOT NULL,
|
||||
attributeset_id varchar default NULL,
|
||||
stockcost double precision default 0 NOT NULL,
|
||||
stockvolume double precision default 0 NOT NULL,
|
||||
image bytea default NULL,
|
||||
iscom BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
isscale BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
isconstant BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
printkb BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
sendstatus BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
isservice BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
attributes bytea default NULL,
|
||||
display varchar default NULL,
|
||||
isvprice BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
isverpatrib BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
texttip varchar default NULL,
|
||||
warranty BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
stockunits double precision default 0 NOT NULL,
|
||||
printto varchar default '1',
|
||||
supplier varchar default NULL,
|
||||
uom varchar default '0',
|
||||
PRIMARY KEY (ID),
|
||||
CONSTRAINT PRODUCTS_FK_1 FOREIGN KEY (category) REFERENCES categories(id),
|
||||
CONSTRAINT PRODUCTS_TAXCAT_FK FOREIGN KEY (taxcat) REFERENCES taxcategories(id),
|
||||
CONSTRAINT PRODUCTS_ATTRSET_FK FOREIGN KEY (attributeset_id) REFERENCES attributeset(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX PRODUCTS_INX_0 ON products(reference);
|
||||
CREATE UNIQUE INDEX PRODUCTS_INX_1 ON products(code);
|
||||
CREATE INDEX PRODUCTS_NAME_INX ON products(name);
|
||||
|
||||
-- ADD PRODUCTS
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx999_999xxx_x9x9x9', 'xxx999', 'xxx999', '***', '000', '001', false, '<html><center>***', '1');
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx998_998xxx_x8x8x8', 'xxx998', 'xxx998', '****', '000', '001', true, '<html><center>****', '1');
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE products_cat (
|
||||
product VARCHAR NOT NULL,
|
||||
catorder INTEGER,
|
||||
PRIMARY KEY (product),
|
||||
CONSTRAINT PRODUCTS_CAT_FK_1 FOREIGN KEY (product) REFERENCES products(id)
|
||||
);
|
||||
CREATE INDEX PRODUCTS_CAT_INX_1 ON products_cat(catorder);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE products_com (
|
||||
id VARCHAR NOT NULL,
|
||||
product VARCHAR NOT NULL,
|
||||
product2 VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT PRODUCTS_COM_FK_1 FOREIGN KEY (product) REFERENCES products(id),
|
||||
CONSTRAINT PRODUCTS_COM_FK_2 FOREIGN KEY (product2) REFERENCES products(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX PCOM_INX_PROD ON products_com(product, product2);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE locations (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
address VARCHAR,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX LOCATIONS_NAME_INX ON locations(name);
|
||||
INSERT INTO locations(id, name, address) VALUES('0', 'General', NULL);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE stockdiary (
|
||||
id varchar NOT NULL,
|
||||
datenew timestamp NOT NULL,
|
||||
reason integer NOT NULL,
|
||||
location varchar NOT NULL,
|
||||
product varchar NOT NULL,
|
||||
attributesetinstance_id varchar,
|
||||
units double precision default 0 NOT NULL,
|
||||
price double precision default 0 NOT NULL,
|
||||
appuser varchar,
|
||||
supplier varchar default NULL,
|
||||
supplierdoc varchar default NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT STOCKDIARY_FK_1 FOREIGN KEY (product) REFERENCES products(id),
|
||||
CONSTRAINT STOCKDIARY_ATTSETINST FOREIGN KEY (attributesetinstance_id) REFERENCES attributesetinstance(id),
|
||||
CONSTRAINT STOCKDIARY_FK_2 FOREIGN KEY (location) REFERENCES locations(id)
|
||||
);
|
||||
CREATE INDEX STOCKDIARY_INX_1 ON stockdiary(datenew);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE stocklevel (
|
||||
id varchar NOT NULL,
|
||||
location varchar NOT NULL,
|
||||
product varchar NOT NULL,
|
||||
stocksecurity double precision default 0 NOT NULL,
|
||||
stockmaximum double precision default 0 NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT STOCKLEVEL_PRODUCT FOREIGN KEY (product) REFERENCES products(id),
|
||||
CONSTRAINT STOCKLEVEL_LOCATION FOREIGN KEY (location) REFERENCES locations(id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE stockcurrent (
|
||||
location varchar NOT NULL,
|
||||
product varchar NOT NULL,
|
||||
attributesetinstance_id varchar default NULL,
|
||||
units double precision default 0 NOT NULL,
|
||||
CONSTRAINT STOCKCURRENT_FK_1 FOREIGN KEY (product) REFERENCES products(id),
|
||||
CONSTRAINT STOCKCURRENT_ATTSETINST FOREIGN KEY (attributesetinstance_id) REFERENCES attributesetinstance(id),
|
||||
CONSTRAINT STOCKCURRENT_FK_2 FOREIGN KEY (location) REFERENCES locations(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX STOCKCURRENT_INX ON stockcurrent(location, product, attributesetinstance_id);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE closedcash (
|
||||
money varchar NOT NULL,
|
||||
host varchar NOT NULL,
|
||||
hostsequence INTEGER NOT NULL,
|
||||
datestart TIMESTAMP NOT NULL,
|
||||
dateend TIMESTAMP,
|
||||
nosales INTEGER DEFAULT 0 NOT NULL,
|
||||
PRIMARY KEY(money)
|
||||
);
|
||||
CREATE INDEX CLOSEDCASH_INX_1 ON closedcash(datestart);
|
||||
CREATE UNIQUE INDEX CLOSEDCASH_INX_SEQ ON closedcash(host, hostsequence);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE RECEIPTS (
|
||||
id VARCHAR NOT NULL,
|
||||
MONEY VARCHAR NOT NULL,
|
||||
datenew TIMESTAMP NOT NULL,
|
||||
attributes BYTEA,
|
||||
person VARCHAR,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT RECEIPTS_FK_MONEY FOREIGN KEY (money) REFERENCES closedcash(money)
|
||||
);
|
||||
CREATE INDEX RECEIPTS_INX_1 ON receipts(datenew);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE tickets (
|
||||
id VARCHAR NOT NULL,
|
||||
tickettype INTEGER DEFAULT 0 NOT NULL,
|
||||
ticketid INTEGER NOT NULL,
|
||||
person VARCHAR NOT NULL,
|
||||
customer VARCHAR DEFAULT NULL,
|
||||
status INTEGER DEFAULT 0 NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT TICKETS_FK_ID FOREIGN KEY (id) REFERENCES receipts(id),
|
||||
CONSTRAINT TICKETS_FK_2 FOREIGN KEY (PERSON) REFERENCES people(id),
|
||||
CONSTRAINT TICKETS_CUSTOMERS_FK FOREIGN KEY (customer) REFERENCES customers(id)
|
||||
);
|
||||
CREATE INDEX TICKETS_TICKETID ON tickets(tickettype, ticketid);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE ticketlines (
|
||||
ticket VARCHAR NOT NULL,
|
||||
line INTEGER NOT NULL,
|
||||
product VARCHAR,
|
||||
attributesetinstance_id VARCHAR,
|
||||
units double precision default 0 NOT NULL,
|
||||
price double precision default 0 NOT NULL,
|
||||
taxid VARCHAR NOT NULL,
|
||||
attributes BYTEA,
|
||||
PRIMARY KEY (ticket, line),
|
||||
CONSTRAINT TICKETLINES_FK_TICKET FOREIGN KEY (ticket) REFERENCES tickets(id),
|
||||
CONSTRAINT TICKETLINES_FK_2 FOREIGN KEY (product) REFERENCES products(id),
|
||||
CONSTRAINT TICKETLINES_ATTSETINST FOREIGN KEY (attributesetinstance_id) REFERENCES attributesetinstance(id),
|
||||
CONSTRAINT TICKETLINES_FK_3 FOREIGN KEY (taxid) REFERENCES taxes(id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE lineremoved (
|
||||
removeddate TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
|
||||
name VARCHAR DEFAULT NULL,
|
||||
ticketid VARCHAR DEFAULT NULL,
|
||||
productid VARCHAR DEFAULT NULL,
|
||||
productname VARCHAR DEFAULT NULL,
|
||||
units double precision default 0 NOT NULL
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE payments (
|
||||
id varchar NOT NULL,
|
||||
receipt varchar NOT NULL,
|
||||
payment varchar NOT NULL,
|
||||
total double precision default 0 NOT NULL,
|
||||
tip double precision default 0 NOT NULL,
|
||||
transid varchar default NULL,
|
||||
isprocessed BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
returnmsg bytea default NULL,
|
||||
notes varchar default NULL,
|
||||
tendered double precision default 0 NOT NULL,
|
||||
cardname varchar default NULL,
|
||||
voucher varchar default NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT PAYMENTS_FK_RECEIPT FOREIGN KEY (receipt) REFERENCES receipts(id)
|
||||
);
|
||||
CREATE INDEX PAYMENTS_INX_1 ON payments(payment);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE taxlines (
|
||||
id VARCHAR NOT NULL,
|
||||
receipt VARCHAR NOT NULL,
|
||||
taxid VARCHAR NOT NULL,
|
||||
base double precision default 0 NOT NULL,
|
||||
amount double precision default 0 NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT TAXLINES_TAX FOREIGN KEY (taxid) REFERENCES taxes(id),
|
||||
CONSTRAINT TAXLINES_RECEIPT FOREIGN KEY (receipt) REFERENCES receipts(id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE floors (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
image BYTEA,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX FLOORS_NAME_INX ON floors(name);
|
||||
INSERT INTO floors(id, name, image) VALUES ('0', 'Restaurant floor', $FILE{/com/unicenta/pos/templates/restaurant_floor.png});
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE places (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
x INTEGER NOT NULL,
|
||||
y INTEGER NOT NULL,
|
||||
floor VARCHAR NOT NULL,
|
||||
customer VARCHAR,
|
||||
waiter VARCHAR,
|
||||
ticketid VARCHAR,
|
||||
tablemoved BOOLEAN NOT NULL DEFAULT FALSE,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT PLACES_FK_1 FOREIGN KEY (floor) REFERENCES floors(id)
|
||||
);
|
||||
CREATE UNIQUE INDEX PLACES_NAME_INX ON places(name);
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('1', 'Table 1', 80, 70, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('2', 'Table 2', 250, 75, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('3', 'Table 3', 400, 75, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('4', 'Table 4', 80, 200, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('5', 'Table 5', 260, 210, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('6', 'Table 6', 430, 210, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('7', 'Table 7', 80, 330, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('8', 'Table 8', 190, 350, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('9', 'Table 9', 295, 350, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('10', 'Table 10', 430, 345, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('11', 'Table 11', 550, 135, '0');
|
||||
INSERT INTO places(id, name, x, y, floor) VALUES ('12', 'Table 12', 550, 290, '0');
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE reservations (
|
||||
id VARCHAR NOT NULL,
|
||||
created TIMESTAMP NOT NULL,
|
||||
datenew TIMESTAMP DEFAULT '2016-01-01 00:00:00' NOT NULL,
|
||||
title VARCHAR NOT NULL,
|
||||
chairs INTEGER NOT NULL,
|
||||
isdone BOOLEAN NOT NULL,
|
||||
description VARCHAR,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE INDEX RESERVATIONS_INX_1 ON reservations(datenew);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE reservation_customers (
|
||||
id VARCHAR NOT NULL,
|
||||
customer VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT RES_CUST_FK_1 FOREIGN KEY (id) REFERENCES reservations(id),
|
||||
CONSTRAINT RES_CUST_FK_2 FOREIGN KEY (customer) REFERENCES customers(id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE thirdparties (
|
||||
id VARCHAR NOT NULL,
|
||||
cif VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
address VARCHAR,
|
||||
concatcomm VARCHAR,
|
||||
contactfact VARCHAR,
|
||||
payrule VARCHAR,
|
||||
faxnumber VARCHAR,
|
||||
phonenumber VARCHAR,
|
||||
mobilenumber VARCHAR,
|
||||
email VARCHAR,
|
||||
webpage VARCHAR,
|
||||
notes VARCHAR,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
CREATE UNIQUE INDEX THIRDPARTIES_CIF_INX ON thirdparties(cif);
|
||||
CREATE UNIQUE INDEX THIRDPARTIES_NAME_INX ON thirdparties(name);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE sharedtickets (
|
||||
id varchar NOT NULL,
|
||||
name varchar NOT NULL,
|
||||
content bytea default NULL,
|
||||
appuser varchar default NULL,
|
||||
pickupid integer NOT NULL default '0',
|
||||
locked varchar default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE shifts (
|
||||
id VARCHAR NOT NULL,
|
||||
startshift TIMESTAMP NOT NULL,
|
||||
endshift TIMESTAMP,
|
||||
pplid VARCHAR NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
INSERT INTO shifts(id, startshift, endshift, pplid) VALUES ('0', '2016-01-01 00:00:00.001', '2016-01-01 00:00:00.002','0');
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE leaves (
|
||||
id VARCHAR NOT NULL,
|
||||
pplid VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
startdate TIMESTAMP NOT NULL,
|
||||
enddate TIMESTAMP NOT NULL,
|
||||
notes VARCHAR,
|
||||
PRIMARY KEY (ID),
|
||||
CONSTRAINT lEAVES_PPLID FOREIGN KEY (pplid) REFERENCES people(id)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE breaks (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
notes VARCHAR,
|
||||
visible BOOLEAN NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('0', 'Lunch Break', TRUE, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('1', 'Tea Break', TRUE, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('2', 'Mid Break', TRUE, NULL);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE shift_breaks (
|
||||
id VARCHAR NOT NULL,
|
||||
shiftid VARCHAR NOT NULL,
|
||||
breakid VARCHAR NOT NULL,
|
||||
starttime TIMESTAMP NOT NULL,
|
||||
endtime TIMESTAMP,
|
||||
PRIMARY KEY (id),
|
||||
CONSTRAINT SHIFT_BREAKS_BREAKID FOREIGN KEY (breakid) REFERENCES breaks(id),
|
||||
CONSTRAINT SHIFT_BREAKS_SHIFTID FOREIGN KEY (shiftid) REFERENCES shifts(id)
|
||||
);
|
||||
INSERT INTO shift_breaks(id, shiftid, breakid, starttime, endtime) VALUES ('0', '0', '0', '2016-01-01 00:00:00.003', '2016-01-01 00:00:00.004');
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE moorers (
|
||||
vesselname VARCHAR,
|
||||
size INTEGER,
|
||||
days INTEGER,
|
||||
power BOOLEAN NOT NULL DEFAULT FALSE
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE csvimport (
|
||||
id VARCHAR NOT NULL,
|
||||
rownumber VARCHAR,
|
||||
csverror VARCHAR,
|
||||
reference VARCHAR,
|
||||
code VARCHAR,
|
||||
name VARCHAR,
|
||||
pricebuy double precision,
|
||||
pricesell double precision,
|
||||
previousbuy double precision,
|
||||
previoussell double precision,
|
||||
category VARCHAR,
|
||||
tax VARCHAR,
|
||||
searchkey VARCHAR,
|
||||
PRIMARY KEY (ID)
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE suppliers (
|
||||
id varchar NOT NULL,
|
||||
searchkey varchar NOT NULL,
|
||||
taxid varchar default NULL,
|
||||
name varchar NOT NULL,
|
||||
maxdebt double precision default 0 NOT NULL,
|
||||
address varchar default NULL,
|
||||
address2 varchar default NULL,
|
||||
postal varchar default NULL,
|
||||
city varchar default NULL,
|
||||
region varchar default NULL,
|
||||
country varchar default NULL,
|
||||
firstname varchar default NULL,
|
||||
lastname varchar default NULL,
|
||||
email varchar default NULL,
|
||||
phone varchar default NULL,
|
||||
phone2 varchar default NULL,
|
||||
fax varchar default NULL,
|
||||
notes varchar default NULL,
|
||||
visible BOOLEAN NOT NULL DEFAULT TRUE,
|
||||
curdate timestamp default NULL,
|
||||
curdebt double precision default 0,
|
||||
vatid varchar default NULL,
|
||||
PRIMARY KEY ( id )
|
||||
);
|
||||
CREATE UNIQUE INDEX SUPPLIERS_SKEY_INX ON suppliers(searchkey);
|
||||
CREATE INDEX SUPPLIERS_NAME_INX ON suppliers(name);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE uom (
|
||||
id VARCHAR NOT NULL,
|
||||
name VARCHAR NOT NULL,
|
||||
PRIMARY KEY ( id )
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE TABLE vouchers (
|
||||
id VARCHAR NOT NULL,
|
||||
voucher_number VARCHAR DEFAULT NULL,
|
||||
customer VARCHAR DEFAULT NULL,
|
||||
amount double precision default 0 NOT NULL,
|
||||
status CHAR(1) DEFAULT 'A',
|
||||
PRIMARY KEY ( id )
|
||||
);
|
||||
|
||||
/* Header line. Object: vouchers. Script date: 08/05/2016 18:00:00. */
|
||||
CREATE SEQUENCE ticketsnum START WITH 1;
|
||||
CREATE SEQUENCE ticketsnum_refund START WITH 1;
|
||||
CREATE SEQUENCE ticketsnum_payment START WITH 1;
|
||||
CREATE SEQUENCE pickup_number START WITH 1;
|
||||
|
||||
CREATE TABLE draweropened (
|
||||
opendate TIMESTAMP DEFAULT NOW(),
|
||||
name VARCHAR,
|
||||
ticketid VARCHAR
|
||||
);
|
||||
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,699 @@
|
||||
|
||||
CREATE TABLE applications (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
version varchar(255) NOT NULL,
|
||||
instdate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attribute (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributeinstance (
|
||||
id varchar(255) NOT NULL,
|
||||
attributesetinstance_id varchar(255) NOT NULL,
|
||||
attribute_id varchar(255) NOT NULL,
|
||||
value varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributeset (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributesetinstance (
|
||||
id varchar(255) NOT NULL,
|
||||
attributeset_id varchar(255) NOT NULL,
|
||||
description varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributeuse (
|
||||
id varchar(255) NOT NULL,
|
||||
attributeset_id varchar(255) NOT NULL,
|
||||
attribute_id varchar(255) NOT NULL,
|
||||
lineno int(11) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE attributevalue (
|
||||
id varchar(255) NOT NULL,
|
||||
attribute_id varchar(255) NOT NULL,
|
||||
value varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE breaks (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
visible tinyint(1) NOT NULL default 1 ,
|
||||
notes varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE categories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
parentid varchar(255) default NULL,
|
||||
image mediumblob default NULL,
|
||||
texttip varchar(255) default NULL,
|
||||
catshowname smallint(6) NOT NULL default 1 ,
|
||||
catorder varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE closedcash (
|
||||
money varchar(255) NOT NULL,
|
||||
host varchar(255) NOT NULL,
|
||||
hostsequence int(11) NOT NULL,
|
||||
datestart datetime NOT NULL,
|
||||
dateend datetime default NULL,
|
||||
nosales int(11) NOT NULL default 0 ,
|
||||
PRIMARY KEY (money)
|
||||
);
|
||||
|
||||
CREATE TABLE csvimport (
|
||||
id varchar(255) NOT NULL,
|
||||
rownumber varchar(255) default NULL,
|
||||
csverror varchar(255) default NULL,
|
||||
reference varchar(255) default NULL,
|
||||
code varchar(255) default NULL,
|
||||
name varchar(255) default NULL,
|
||||
pricebuy double default NULL,
|
||||
pricesell double default NULL,
|
||||
previousbuy double default NULL,
|
||||
previoussell double default NULL,
|
||||
category varchar(255) default NULL,
|
||||
tax varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE customers (
|
||||
id varchar(255) NOT NULL,
|
||||
searchkey varchar(255) NOT NULL,
|
||||
taxid varchar(255) default NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
taxcategory varchar(255) default NULL,
|
||||
card varchar(255) default NULL,
|
||||
maxdebt double NOT NULL default 0 ,
|
||||
address varchar(255) default NULL,
|
||||
address2 varchar(255) default NULL,
|
||||
postal varchar(255) default NULL,
|
||||
city varchar(255) default NULL,
|
||||
region varchar(255) default NULL,
|
||||
country varchar(255) default NULL,
|
||||
firstname varchar(255) default NULL,
|
||||
lastname varchar(255) default NULL,
|
||||
email varchar(255) default NULL,
|
||||
phone varchar(255) default NULL,
|
||||
phone2 varchar(255) default NULL,
|
||||
fax varchar(255) default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
visible int(1) NOT NULL default 1 ,
|
||||
curdate datetime default NULL,
|
||||
curdebt double default 0 ,
|
||||
image mediumblob default NULL,
|
||||
isvip int(1) NOT NULL default 0 ,
|
||||
discount double default 0 ,
|
||||
memodate datetime default CURRENT_TIMESTAMP ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE draweropened (
|
||||
opendate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
name varchar(255) default NULL,
|
||||
ticketid varchar(255) default NULL
|
||||
);
|
||||
|
||||
CREATE TABLE floors (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
image mediumblob default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE leaves (
|
||||
id varchar(255) NOT NULL,
|
||||
pplid varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
startdate datetime NOT NULL,
|
||||
enddate datetime NOT NULL,
|
||||
notes varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE lineremoved (
|
||||
removeddate timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
name varchar(255) default NULL,
|
||||
ticketid varchar(255) default NULL,
|
||||
productid varchar(255) default NULL,
|
||||
productname varchar(255) default NULL,
|
||||
units double NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE locations (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
address varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE moorers (
|
||||
vesselname varchar(255) default NULL,
|
||||
size int(11) default NULL,
|
||||
days int(11) default NULL,
|
||||
power int(1) NOT NULL default 0
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS orders (
|
||||
id INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT,
|
||||
orderid varchar(50) DEFAULT NULL,
|
||||
qty int(11) DEFAULT 1 ,
|
||||
details varchar(255) DEFAULT NULL,
|
||||
attributes varchar(255) DEFAULT NULL,
|
||||
notes varchar(255) DEFAULT NULL,
|
||||
ticketid varchar(50) DEFAULT NULL,
|
||||
ordertime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
displayid int(11) DEFAULT 1 ,
|
||||
auxiliary int(11) DEFAULT NULL,
|
||||
completetime timestamp NULL
|
||||
);
|
||||
|
||||
CREATE TABLE payments (
|
||||
id varchar(255) NOT NULL,
|
||||
receipt varchar(255) NOT NULL,
|
||||
payment varchar(255) NOT NULL,
|
||||
total double NOT NULL default 0 ,
|
||||
tip double default 0 ,
|
||||
transid varchar(255) default NULL,
|
||||
isprocessed int(1) default 0 ,
|
||||
returnmsg mediumblob default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
tendered double default NULL,
|
||||
cardname varchar(255) default NULL,
|
||||
voucher varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE people (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
apppassword varchar(255) default NULL,
|
||||
card varchar(255) default NULL,
|
||||
role varchar(255) NOT NULL,
|
||||
visible int(1) NOT NULL,
|
||||
image mediumblob default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE pickup_number (
|
||||
id int(11) NOT NULL default 0
|
||||
);
|
||||
|
||||
CREATE TABLE places (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
seats varchar(6) NOT NULL DEFAULT 1 ,
|
||||
x int(11) NOT NULL,
|
||||
y int(11) NOT NULL,
|
||||
floor varchar(255) NOT NULL,
|
||||
customer varchar(255) default NULL,
|
||||
waiter varchar(255) default NULL,
|
||||
ticketid varchar(255) default NULL,
|
||||
tablemoved smallint(6) NOT NULL default 0 ,
|
||||
width int(11) NOT NULL,
|
||||
height int(11) NOT NULL,
|
||||
guests int(11) DEFAULT 0,
|
||||
occupied datetime DEFAULT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE products (
|
||||
id varchar(255) NOT NULL,
|
||||
reference varchar(255) NOT NULL,
|
||||
code varchar(255) NOT NULL,
|
||||
codetype varchar(255) default NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
pricebuy double NOT NULL default 0 ,
|
||||
pricesell double NOT NULL default 0 ,
|
||||
category varchar(255) NOT NULL,
|
||||
taxcat varchar(255) NOT NULL,
|
||||
attributeset_id varchar(255) default NULL,
|
||||
stockcost double NOT NULL default 0 ,
|
||||
stockvolume double NOT NULL default 0 ,
|
||||
image mediumblob default NULL,
|
||||
iscom int(1) NOT NULL default 0 ,
|
||||
isscale int(1) NOT NULL default 0 ,
|
||||
isconstant smallint(1) NOT NULL default 0 ,
|
||||
printkb int(1) NOT NULL default 0 ,
|
||||
sendstatus int(1) NOT NULL default 0 ,
|
||||
isservice int(1) NOT NULL default 0 ,
|
||||
attributes mediumblob default NULL,
|
||||
display varchar(255) default NULL,
|
||||
isvprice smallint(6) NOT NULL default 0 ,
|
||||
isverpatrib smallint(6) NOT NULL default 0 ,
|
||||
texttip varchar(255) default NULL,
|
||||
warranty smallint(6) NOT NULL default 0 ,
|
||||
stockunits double NOT NULL default 0 ,
|
||||
printto varchar(255) default 1 ,
|
||||
supplier varchar(255) default NULL,
|
||||
uom varchar(255) default 0 ,
|
||||
memodate datetime default '2018-01-01 00:00:01' ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE products_bundle (
|
||||
id varchar(255) NOT NULL,
|
||||
product VARCHAR(255) NOT NULL,
|
||||
product_bundle VARCHAR(255) NOT NULL,
|
||||
quantity DOUBLE NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE products_cat (
|
||||
product varchar(255) NOT NULL,
|
||||
catorder int(11) default NULL,
|
||||
PRIMARY KEY (product)
|
||||
);
|
||||
|
||||
CREATE TABLE products_com (
|
||||
id varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
product2 varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE receipts (
|
||||
id varchar(255) NOT NULL,
|
||||
money varchar(255) NOT NULL,
|
||||
datenew datetime NOT NULL,
|
||||
attributes mediumblob default NULL,
|
||||
person varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE reservation_customers (
|
||||
id varchar(255) NOT NULL,
|
||||
customer varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE reservations (
|
||||
id varchar(255) NOT NULL,
|
||||
created datetime NOT NULL,
|
||||
datenew datetime NOT NULL default '2018-01-01 00:00:00' ,
|
||||
title varchar(255) NOT NULL,
|
||||
chairs int(11) NOT NULL,
|
||||
isdone int(1) NOT NULL,
|
||||
description varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE resources (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
restype int(11) NOT NULL,
|
||||
content mediumblob default NULL,
|
||||
version varchar(10) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE roles (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
permissions mediumblob default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE sharedtickets (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
content mediumblob default NULL,
|
||||
appuser varchar(255) default NULL,
|
||||
pickupid int(11) NOT NULL default 0 ,
|
||||
locked varchar(20) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE shift_breaks (
|
||||
id varchar(255) NOT NULL,
|
||||
shiftid varchar(255) NOT NULL,
|
||||
breakid varchar(255) NOT NULL,
|
||||
starttime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
endtime timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE shifts (
|
||||
id varchar(255) NOT NULL,
|
||||
startshift datetime NOT NULL,
|
||||
endshift datetime default NULL,
|
||||
pplid varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE stockcurrent (
|
||||
location varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
attributesetinstance_id varchar(255) default NULL,
|
||||
units double NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE stockdiary (
|
||||
id varchar(255) NOT NULL,
|
||||
datenew datetime NOT NULL,
|
||||
reason int(11) NOT NULL,
|
||||
location varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
attributesetinstance_id varchar(255) default NULL,
|
||||
units double NOT NULL,
|
||||
price double NOT NULL,
|
||||
appuser varchar(255) default NULL,
|
||||
supplier varchar(255) default NULL,
|
||||
supplierdoc varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE stocklevel (
|
||||
id varchar(255) NOT NULL,
|
||||
location varchar(255) NOT NULL,
|
||||
product varchar(255) NOT NULL,
|
||||
stocksecurity double default NULL,
|
||||
stockmaximum double default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE suppliers (
|
||||
id varchar(255) NOT NULL,
|
||||
searchkey varchar(255) NOT NULL,
|
||||
taxid varchar(255) default NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
maxdebt double NOT NULL default 0 ,
|
||||
address varchar(255) default NULL,
|
||||
address2 varchar(255) default NULL,
|
||||
postal varchar(255) default NULL,
|
||||
city varchar(255) default NULL,
|
||||
region varchar(255) default NULL,
|
||||
country varchar(255) default NULL,
|
||||
firstname varchar(255) default NULL,
|
||||
lastname varchar(255) default NULL,
|
||||
email varchar(255) default NULL,
|
||||
phone varchar(255) default NULL,
|
||||
phone2 varchar(255) default NULL,
|
||||
fax varchar(255) default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
visible int(1) NOT NULL default 1 ,
|
||||
curdate datetime default NULL,
|
||||
curdebt double default 0 ,
|
||||
vatid varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxcategories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxcustcategories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxes (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
category varchar(255) NOT NULL,
|
||||
custcategory varchar(255) default NULL,
|
||||
parentid varchar(255) default NULL,
|
||||
rate double NOT NULL default 0 ,
|
||||
ratecascade int(1) NOT NULL default 0 ,
|
||||
rateorder int(11) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxlines (
|
||||
id varchar(255) NOT NULL,
|
||||
receipt varchar(255) NOT NULL,
|
||||
taxid varchar(255) NOT NULL,
|
||||
base double NOT NULL default 0 ,
|
||||
amount double NOT NULL default 0 ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE taxsuppcategories (
|
||||
id varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE thirdparties (
|
||||
id varchar(255) NOT NULL,
|
||||
cif varchar(255) NOT NULL,
|
||||
name varchar(255) NOT NULL,
|
||||
address varchar(255) default NULL,
|
||||
contactcomm varchar(255) default NULL,
|
||||
contactfact varchar(255) default NULL,
|
||||
payrule varchar(255) default NULL,
|
||||
faxnumber varchar(255) default NULL,
|
||||
phonenumber varchar(255) default NULL,
|
||||
mobilenumber varchar(255) default NULL,
|
||||
email varchar(255) default NULL,
|
||||
webpage varchar(255) default NULL,
|
||||
notes varchar(255) default NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ticketlines (
|
||||
ticket varchar(255) NOT NULL,
|
||||
line int(11) NOT NULL,
|
||||
product varchar(255) default NULL,
|
||||
attributesetinstance_id varchar(255) default NULL,
|
||||
units double NOT NULL,
|
||||
price double NOT NULL,
|
||||
taxid varchar(255) NOT NULL,
|
||||
attributes mediumblob default NULL,
|
||||
PRIMARY KEY (ticket , line)
|
||||
);
|
||||
|
||||
CREATE TABLE tickets (
|
||||
id varchar(255) NOT NULL,
|
||||
tickettype int(11) NOT NULL default 0 ,
|
||||
ticketid int(11) NOT NULL,
|
||||
person varchar(255) NOT NULL,
|
||||
customer varchar(255) default NULL,
|
||||
status int(11) NOT NULL default 0 ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ticketsnum (
|
||||
id int(11) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE ticketsnum_payment (
|
||||
id int(11) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE ticketsnum_refund (
|
||||
id int(11) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE uom (
|
||||
id VARCHAR(255) NOT NULL,
|
||||
name VARCHAR(255) NOT NULL,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
CREATE TABLE vouchers (
|
||||
id VARCHAR(100) NOT NULL,
|
||||
voucher_number VARCHAR(100) DEFAULT NULL,
|
||||
customer VARCHAR(100) DEFAULT NULL,
|
||||
amount DOUBLE DEFAULT NULL,
|
||||
status CHAR(1) DEFAULT A ,
|
||||
PRIMARY KEY (id)
|
||||
);
|
||||
|
||||
-- ADD roles
|
||||
INSERT INTO roles(id, name, permissions) VALUES('0', 'Administrator role', $FILE{/com/unicenta/pos/templates/Role.Administrator.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('1', 'Manager role', $FILE{/com/unicenta/pos/templates/Role.Manager.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('2', 'Employee role', $FILE{/com/unicenta/pos/templates/Role.Employee.xml} );
|
||||
INSERT INTO roles(id, name, permissions) VALUES('3', 'Guest role', $FILE{/com/unicenta/pos/templates/Role.Guest.xml} );
|
||||
|
||||
-- ADD people
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('0', 'Administrator', NULL, '0', 1, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('1', 'Manager', NULL, '1', 1, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('2', 'Employee', NULL, '2', 1, NULL);
|
||||
INSERT INTO people(id, name, apppassword, role, visible, image) VALUES ('3', 'Guest', NULL, '3', 1, NULL);
|
||||
|
||||
-- ADD resources --
|
||||
-- SYSTEM
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('00', 'Menu.Root', 0, $FILE{/com/unicenta/pos/templates/Menu.Root.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('02', 'Cash.Close', 0, $FILE{/com/unicenta/pos/templates/Cash.Close.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('03', 'Customer.Created', 0, $FILE{/com/unicenta/pos/templates/customer.created.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('04', 'Customer.Deleted', 0, $FILE{/com/unicenta/pos/templates/customer.deleted.xml});
|
||||
INSERT INTO resources(ID, name, restype, content) VALUES('05', 'Customer.Updated', 0, $FILE{/com/unicenta/pos/templates/customer.updated.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('06', 'payment.cash', 0, $FILE{/com/unicenta/pos/templates/payment.cash.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('07', 'Ticket.Buttons', 0, $FILE{/com/unicenta/pos/templates/Ticket.Buttons.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('08', 'Ticket.Close', 0, $FILE{/com/unicenta/pos/templates/Ticket.Close.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('09', 'Ticket.Line', 0, $FILE{/com/unicenta/pos/templates/Ticket.Line.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('10', 'Window.Title', 0, $FILE{/com/unicenta/pos/templates/Window.Title.txt});
|
||||
|
||||
-- IMAGES
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('11', 'img.001', 1, $FILE{/com/unicenta/images/.01.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('12', 'img.002', 1, $FILE{/com/unicenta/images/.02.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('13', 'img.005', 1, $FILE{/com/unicenta/images/.05.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('14', 'img.010', 1, $FILE{/com/unicenta/images/.10.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('15', 'img.020', 1, $FILE{/com/unicenta/images/.20.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('16', 'img.025', 1, $FILE{/com/unicenta/images/.25.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('17', 'img.050', 1, $FILE{/com/unicenta/images/.50.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('18', 'img.1', 1, $FILE{/com/unicenta/images/1.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('19', 'img.2', 1, $FILE{/com/unicenta/images/2.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('20', 'img.5', 1, $FILE{/com/unicenta/images/5.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('21', 'img.10', 1, $FILE{/com/unicenta/images/10.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('22', 'img.20', 1, $FILE{/com/unicenta/images/20.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('23', 'img.50', 1, $FILE{/com/unicenta/images/50.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('24', 'img.100', 1, $FILE{/com/unicenta/images/100.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('25', 'img.200', 1, $FILE{/com/unicenta/images/200.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('26', 'img.500', 1, $FILE{/com/unicenta/images/500.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('27', 'img.1000', 1, $FILE{/com/unicenta/images/1000.00.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('28', 'img.cash', 1, $FILE{/com/unicenta/images/cash.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('29', 'img.cashdrawer', 1, $FILE{/com/unicenta/images/cashdrawer.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('30', 'img.discount', 1, $FILE{/com/unicenta/images/discount.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('31', 'img.discount_b', 1, $FILE{/com/unicenta/images/discount_b.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('32', 'img.heart', 1, $FILE{/com/unicenta/images/heart.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('33', 'img.keyboard_48', 1, $FILE{/com/unicenta/images/keyboard_48.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('34', 'img.kit_print', 1, $FILE{/com/unicenta/images/kit_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('35', 'img.no_photo', 1, $FILE{/com/unicenta/images/no_photo.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('36', 'img.refundit', 1, $FILE{/com/unicenta/images/refundit.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('37', 'img.run_script', 1, $FILE{/com/unicenta/images/run_script.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('38', 'img.ticket_print', 1, $FILE{/com/unicenta/images/ticket_print.png});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('40', 'Printer.Ticket.Logo', 1, $FILE{/com/unicenta/images/printer.ticket.logo.jpg});
|
||||
|
||||
-- PRINTER
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('41', 'Printer.CloseCash.Preview', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.Preview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('42', 'Printer.CloseCash', 0, $FILE{/com/unicenta/pos/templates/Printer.CloseCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('43', 'Printer.CustomerPaid', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('44', 'Printer.CustomerPaid2', 0, $FILE{/com/unicenta/pos/templates/Printer.CustomerPaid2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('45', 'Printer.FiscalTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.FiscalTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('46', 'Printer.Inventory', 0, $FILE{/com/unicenta/pos/templates/Printer.Inventory.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('47', 'Printer.OpenDrawer', 0, $FILE{/com/unicenta/pos/templates/Printer.OpenDrawer.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('48', 'Printer.PartialCash', 0, $FILE{/com/unicenta/pos/templates/Printer.PartialCash.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('49', 'Printer.PrintLastTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.PrintLastTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('50', 'Printer.Product', 0, $FILE{/com/unicenta/pos/templates/Printer.Product.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('52', 'Printer.ReprintTicket', 0, $FILE{/com/unicenta/pos/templates/Printer.ReprintTicket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('53', 'Printer.Start', 0, $FILE{/com/unicenta/pos/templates/Printer.Start.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('54', 'Printer.Ticket.P1', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P1.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('55', 'Printer.Ticket.P2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('56', 'Printer.Ticket.P3', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P3.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('57', 'Printer.Ticket.P4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('58', 'Printer.Ticket.P5', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P5.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('59', 'Printer.Ticket.P6', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.P6.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('60', 'Printer.Ticket', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('61', 'Printer.Ticket2', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket2.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('62', 'Printer.TicketClose', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketClose.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('63', 'Printer.TicketLine', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('64', 'Printer.TicketNew', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketLine.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('65', 'Printer.TicketPreview', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('66', 'Printer.Ticket_A4', 0, $FILE{/com/unicenta/pos/templates/Printer.Ticket_A4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('67', 'Printer.TicketPreview_A4', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketPreview_A4.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('68', 'Printer.TicketRemote', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketRemote.xml});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('69', 'Printer.TicketTotal', 0, $FILE{/com/unicenta/pos/templates/Printer.TicketTotal.xml});
|
||||
|
||||
-- SCRIPTS
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('70', 'script.Keyboard', 0, $FILE{/com/unicenta/pos/templates/script.Keyboard.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('71', 'script.Linediscount', 0, $FILE{/com/unicenta/pos/templates/script.Linediscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('73', 'script.SendOrder', 0, $FILE{/com/unicenta/pos/templates/script.SendOrder.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('74', 'script.Totaldiscount', 0, $FILE{/com/unicenta/pos/templates/script.Totaldiscount.txt});
|
||||
INSERT INTO resources(id, name, restype, content) VALUES('75', 'script.multibuy', 0, $FILE{/com/unicenta/pos/templates/script.multibuy.txt});
|
||||
|
||||
-- ADD CATEGORIES
|
||||
INSERT INTO categories(id, name) VALUES ('000', 'Category Standard');
|
||||
|
||||
-- ADD TAXCATEGORIES
|
||||
/* 002 added 31/01/2017 00:00:00. */
|
||||
INSERT INTO taxcategories(id, name) VALUES ('000', 'Tax Exempt');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('001', 'Tax Standard');
|
||||
INSERT INTO taxcategories(id, name) VALUES ('002', 'Tax Other');
|
||||
|
||||
-- ADD TAXES
|
||||
/* 002 added 31/01/2017 00:00:00. */
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('000', 'Tax Exempt', '000', NULL, NULL, 0, 0, NULL);
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('001', 'Tax Standard', '001', NULL, NULL, 0.20, 0, NULL);
|
||||
INSERT INTO taxes(id, name, category, custcategory, parentid, rate, ratecascade, rateorder) VALUES ('002', 'Tax Other', '002', NULL, NULL, 0, 0, NULL);
|
||||
|
||||
-- ADD PRODUCTS
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx999_999xxx_x9x9x9', 'xxx999', 'xxx999', 'Free Line entry', '000', '001', 1, '<html><center>Free Line entry', '1');
|
||||
INSERT INTO products(id, reference, code, name, category, taxcat, isservice, display, printto)
|
||||
VALUES ('xxx998_998xxx_x8x8x8', 'xxx998', 'xxx998', 'Service Charge', '000', '001', 1, '<html><center>Service Charge', '1');
|
||||
|
||||
-- ADD PRODUCTS_CAT
|
||||
INSERT INTO products_cat(product) VALUES ('xxx999_999xxx_x9x9x9');
|
||||
INSERT INTO products_cat(product) VALUES ('xxx998_998xxx_x8x8x8');
|
||||
|
||||
-- ADD LOCATION
|
||||
INSERT INTO locations(id, name, address) VALUES ('0','Location 1','Local');
|
||||
|
||||
-- ADD SUPPLIERS
|
||||
INSERT INTO suppliers(id, searchkey, name) VALUES ('0','unicenta','unicenta');
|
||||
|
||||
-- ADD UOM
|
||||
INSERT INTO uom(id, name) VALUES ('0','Each');
|
||||
|
||||
-- ADD FLOORS
|
||||
INSERT INTO floors(id, name, image) VALUES ('0', 'Restaurant floor', $FILE{/com/unicenta/images/paperboard960_600.png});
|
||||
|
||||
-- ADD PLACES
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('1', 'Table 1', 100, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('2', 'Table 2', 250, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('3', 'Table 3', 400, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('4', 'Table 4', 550, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('5', 'Table 5', 700, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('6', 'Table 6', 850, 50, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('7', 'Table 7', 100, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('8', 'Table 8', 250, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('9', 'Table 9', 400, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('10', 'Table 10', 550, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('11', 'Table 11', 700, 150, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('12', 'Table 12', 850, 150, '0', '1', 90, 45);
|
||||
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('13', 'Table 13', 100, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('14', 'Table 14', 250, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('15', 'Table 15', 400, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('16', 'Table 16', 550, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('17', 'Table 17', 700, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('18', 'Table 18', 850, 250, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('19', 'Table 19', 100, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('20', 'Table 20', 250, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('21', 'Table 21', 400, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('22', 'Table 22', 550, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('23', 'Table 23', 700, 350, '0', '1', 90, 45);
|
||||
INSERT INTO places(id, name, x, y, floor, seats, width, height) VALUES ('24', 'Table 24', 850, 350, '0', '1', 90, 45);
|
||||
|
||||
-- ADD SHIFTS
|
||||
INSERT INTO shifts(id, startshift, endshift, pplid) VALUES ('0', '2018-01-01 00:00:00.001', '2018-01-01 00:00:00.002','0');
|
||||
|
||||
-- ADD BREAKS
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('0', 'Lunch Break', 1, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('1', 'Tea Break', 1, NULL);
|
||||
INSERT INTO breaks(id, name, visible, notes) VALUES ('2', 'Mid Break', 1, NULL);
|
||||
|
||||
-- ADD SHIFT_BREAKS
|
||||
INSERT INTO shift_breaks(id, shiftid, breakid, starttime, endtime) VALUES ('0', '0', '0', '2018-01-01 00:00:00.003', '2018-01-01 00:00:00.004');
|
||||
|
||||
-- ADD SEQUENCES
|
||||
INSERT INTO pickup_number VALUES(1);
|
||||
INSERT INTO ticketsnum VALUES(1);
|
||||
INSERT INTO ticketsnum_refund VALUES(1);
|
||||
INSERT INTO ticketsnum_payment VALUES(1);
|
||||
|
||||
-- ADD APPLICATION VERSION
|
||||
INSERT INTO applications(id, name, version) VALUES($APP_ID{}, $APP_NAME{}, $APP_VERSION{});
|
||||
@@ -0,0 +1,68 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<fiscalreceipt>
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<!-- setting $vatinfo to the values contained in the fiscal printer vat table-->
|
||||
#if (${ticketline.getTaxInfo().getRate()}==0.04)
|
||||
#set ($vatinfo ="1")
|
||||
#elseif (${ticketline.getTaxInfo().getRate()}==0.1)
|
||||
#set ($vatinfo ="2")
|
||||
#elseif (${ticketline.getTaxInfo().getRate()}==0.2)
|
||||
#set ($vatinfo ="3")
|
||||
#else
|
||||
#set ($vatinfo ="1")
|
||||
#end
|
||||
#if ($ticketline.isProductCom())
|
||||
<line price="${ticketline.getValue()}" units="${ticketline.getMultiply()}" tax="${vatinfo}">*${ticketline.printName()}</line>
|
||||
#else
|
||||
<line price="${ticketline.getValue()}" units="${ticketline.getMultiply()}" tax="${vatinfo}">${ticketline.printName()}</line>
|
||||
#end
|
||||
#end
|
||||
<message>Items count: ${ticket.printArticlesCount()}</message>
|
||||
#foreach ($paymentline in $ticket.payment)
|
||||
#if ($paymentline.name == "cash")
|
||||
<total paid="${paymentline.getPaid()}">Cash</total>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<total paid="${paymentline.getTotal()}">Refund</total>
|
||||
#end
|
||||
#if ($paymentline.name == "ccard")
|
||||
<total paid="${paymentline.getTotal()}">Mag card</total>
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<total paid="${paymentline.getTotal()}">Mag card refund</total>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<total paid="${paymentline.getTotal()}">Cheque</total>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<total paid="${paymentline.getTotal()}">Cheque refund</total>
|
||||
#end
|
||||
#end
|
||||
</fiscalreceipt>
|
||||
<!-- Other commands -->
|
||||
<!--
|
||||
<fiscalzreport/>
|
||||
<fiscalxreport/>
|
||||
-->
|
||||
</output>
|
||||
@@ -0,0 +1,25 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
// Cash.Close
|
||||
// This script runs in the cash.close event
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,151 @@
|
||||
group = menu.addGroup("Menu.Main");
|
||||
group.addPanel("/com/unicenta/images/sale.png", "Menu.Ticket", "com.unicenta.pos.sales.JPanelTicketSales");
|
||||
group.addPanel("/com/unicenta/images/saleedit.png", "Menu.TicketEdit", "com.unicenta.pos.sales.JPanelTicketEdits");
|
||||
group.addPanel("/com/unicenta/images/customerpay.png", "Menu.CustomersPayment", "com.unicenta.pos.customers.CustomersPayment");
|
||||
group.addPanel("/com/unicenta/images/payments.png", "Menu.Payments", "com.unicenta.pos.panels.JPanelPayments");
|
||||
group.addPanel("/com/unicenta/images/calculator.png", "Menu.CloseTPV", "com.unicenta.pos.panels.JPanelCloseMoney");
|
||||
|
||||
group = menu.addGroup("Menu.Backoffice");
|
||||
submenu = group.addSubmenu("/com/unicenta/images/plugin.png", "Menu.Plugins", "plugins.configure");
|
||||
|
||||
submenu = group.addSubmenu("/com/unicenta/images/customer.png", "Menu.Customers", "com.unicenta.pos.forms.MenuCustomers");
|
||||
submenu.addTitle("Menu.Panel.Customers.Forms");
|
||||
submenu.addPanel("/com/unicenta/images/customer.png", "Menu.CustomersManagement", "com.unicenta.pos.customers.CustomersPanel");
|
||||
|
||||
submenu.addTitle("Menu.Panel.Customers.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Report", "/com/unicenta/reports/customers.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Sales", "/com/unicenta/reports/customers_sales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Debtors", "/com/unicenta/reports/customers_debtors.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Diary", "/com/unicenta/reports/customers_diary.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Cards", "/com/unicenta/reports/customers_cards.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.List", "/com/unicenta/reports/customers_list.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Export", "/com/unicenta/reports/customers_export.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Vouchers", "/com/unicenta/reports/customers_vouchers.bs");
|
||||
|
||||
submenu = group.addSubmenu("/com/unicenta/images/stockmaint.png", "Menu.Suppliers", "com.unicenta.pos.forms.MenuSuppliers");
|
||||
submenu.addTitle("Menu.Panel.Suppliers.Forms");
|
||||
submenu.addPanel("/com/unicenta/images/customer.png", "Menu.SuppliersManagement", "com.unicenta.pos.suppliers.SuppliersPanel");
|
||||
submenu.addTitle("Menu.Panel.Suppliers.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.Report", "/com/unicenta/reports/suppliers.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.Products", "/com/unicenta/reports/suppliers_products.bs");
|
||||
// submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.Creditors", "/com/unicenta/reports/suppliers_creditors.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.Diary", "/com/unicenta/reports/suppliers_diary.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.Sales", "/com/unicenta/reports/suppliers_sales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.List", "/com/unicenta/reports/suppliers_list.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Suppliers.Reports.Export", "/com/unicenta/reports/suppliers_export.bs");
|
||||
|
||||
submenu = group.addSubmenu("/com/unicenta/images/products.png", "Menu.StockManagement", "com.unicenta.pos.forms.MenuStockManagement");
|
||||
submenu.addTitle("Menu.Panel.Stock.Forms");
|
||||
|
||||
submenu.addPanel("/com/unicenta/images/category.png", "Menu.Categories", "com.unicenta.pos.inventory.CategoriesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/products.png", "Menu.Products", "com.unicenta.pos.inventory.ProductsPanel");
|
||||
submenu.addPanel("/com/unicenta/images/location.png", "Menu.ProductsWarehouse", "com.unicenta.pos.inventory.ProductsWarehousePanel");
|
||||
submenu.addPanel("/com/unicenta/images/stockmaint.png", "Menu.StockMovement", "com.unicenta.pos.inventory.StockManagement");
|
||||
submenu.addPanel("/com/unicenta/images/auxiliary.png", "Menu.Auxiliar", "com.unicenta.pos.inventory.AuxiliarPanel");
|
||||
submenu.addPanel("/com/unicenta/images/bundle.png", "Menu.Bundle", "com.unicenta.pos.inventory.BundlePanel");
|
||||
submenu.addPanel("/com/unicenta/images/attributes.png", "Menu.Attributes", "com.unicenta.pos.inventory.AttributesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/attributes.png", "Menu.AttributeValues", "com.unicenta.pos.inventory.AttributeValuesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/attributes.png", "Menu.AttributeSets", "com.unicenta.pos.inventory.AttributeSetsPanel");
|
||||
submenu.addPanel("/com/unicenta/images/attributes.png", "Menu.AttributeUse", "com.unicenta.pos.inventory.AttributeUsePanel");
|
||||
submenu.addPanel("/com/unicenta/images/products.png", "Menu.Uom", "com.unicenta.pos.inventory.UomPanel");
|
||||
|
||||
submenu.addTitle("Menu.Panel.Stock.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Inventory", "/com/unicenta/reports/inventory.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Inventory2", "/com/unicenta/reports/inventory_b.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Inventory.Reports.Diary", "/com/unicenta/reports/inventory_diary.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.InventoryBroken", "/com/unicenta/reports/inventory_broken.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.InventoryDiff", "/com/unicenta/reports/inventory_diff.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.InventoryDiffDetail", "/com/unicenta/reports/inventory_diffdetail.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.InventoryListDetail", "/com/unicenta/reports/inventory_listdetail.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Products", "/com/unicenta/reports/products.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.SaleCatalog", "/com/unicenta/reports/salecatalog.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ProductLabels", "/com/unicenta/reports/labels_product.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.BarcodeSheet", "/com/unicenta/reports/labels_barcode_sheet.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ShelfEdgeLabels", "/com/unicenta/reports/labels_barcode_shelfedge.bs");
|
||||
|
||||
|
||||
submenu = group.addSubmenu("/com/unicenta/images/sales.png", "Menu.SalesManagement", "com.unicenta.pos.forms.MenuSalesManagement");
|
||||
submenu.addTitle("Menu.Panel.Sales.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Closing", "/com/unicenta/reports/sales_closedpos.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Closing1", "/com/unicenta/reports/sales_closedpos_1.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.CashRegisterLog", "/com/unicenta/reports/sales_cashregisterlog.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ExtendedCashRegisterLog", "/com/unicenta/reports/sales_extendedcashregisterlog.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.CashFlow", "/com/unicenta/reports/sales_cashflow.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.PaymentReport", "/com/unicenta/reports/sales_payments.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.CategorySales", "/com/unicenta/reports/sales_categorysales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.CategorySales1", "/com/unicenta/reports/sales_categorysales_1.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ClosedProducts", "/com/unicenta/reports/sales_closedproducts.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ClosedProducts1", "/com/unicenta/reports/sales_closedproducts_1.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ExtendedByProducts", "/com/unicenta/reports/sales_extproducts.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.SalesProfit", "/com/unicenta/reports/sales_productsalesprofit.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.SaleTaxes", "/com/unicenta/reports/sales_saletaxes.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.TaxCatSales", "/com/unicenta/reports/sales_taxcatsales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.ReportTaxes", "/com/unicenta/reports/sales_taxes.bs");
|
||||
submenu.addTitle("Menu.Panel.Sales.Charts");
|
||||
submenu.addPanel("/com/unicenta/images/chart.png", "Menu.ProductSales", "/com/unicenta/reports/sales_chart_productsales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/chart.png", "Menu.ProductCategorySalesPieChart", "/com/unicenta/reports/sales_chart_piesalescat.bs");
|
||||
submenu.addPanel("/com/unicenta/images/chart.png", "Menu.SalesChart", "/com/unicenta/reports/sales_chart_sales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/chart.png", "Menu.TimeSeriesProduct", "/com/unicenta/reports/sales_chart_timeseriesproduct.bs");
|
||||
submenu.addPanel("/com/unicenta/images/chart.png", "Menu.Top10Sales", "/com/unicenta/reports/sales_chart_top10.bs");
|
||||
|
||||
|
||||
submenu = group.addSubmenu("/com/unicenta/images/maintain.png", "Menu.Maintenance", "com.unicenta.pos.forms.MenuMaintenance");
|
||||
submenu.addTitle("Menu.Panel.Maintenance.Forms");
|
||||
submenu.addPanel("/com/unicenta/images/resources.png", "Menu.Resources", "com.unicenta.pos.admin.ResourcesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/roles.png", "Menu.Roles", "com.unicenta.pos.admin.RolesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/user.png", "Menu.Users", "com.unicenta.pos.admin.PeoplePanel");
|
||||
submenu.addPanel("/com/unicenta/images/bookmark.png", "Menu.TaxCategories", "com.unicenta.pos.inventory.TaxCategoriesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/bookmark.png", "Menu.TaxCustCategories", "com.unicenta.pos.inventory.TaxCustCategoriesPanel");
|
||||
submenu.addPanel("/com/unicenta/images/bookmark.png", "Menu.Taxes", "com.unicenta.pos.inventory.TaxPanel");
|
||||
submenu.addPanel("/com/unicenta/images/location.png", "Menu.Locations", "com.unicenta.pos.inventory.LocationsPanel");
|
||||
submenu.addPanel("/com/unicenta/images/floors.png", "Menu.Floors", "com.unicenta.pos.mant.JPanelFloors");
|
||||
submenu.addPanel("/com/unicenta/images/tables.png", "Menu.Tables", "com.unicenta.pos.mant.JPanelPlaces");
|
||||
submenu.addPanel("/com/unicenta/images/products.png", "Menu.Vouchers", "com.unicenta.pos.voucher.VoucherPanel");
|
||||
|
||||
submenu.addTitle("Menu.Panel.Maintenance.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.UsersReport", "/com/unicenta/reports/users.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.UserSells", "/com/unicenta/reports/users_sales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.UserNoSales", "/com/unicenta/reports/users_nosales.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.UserVoids", "/com/unicenta/reports/users_voids.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Customers.Reports.Vouchers", "/com/unicenta/reports/customers_vouchers.bs");
|
||||
|
||||
// EPM
|
||||
submenu = group.addSubmenu("/com/unicenta/images/users.png", "Menu.PresenceManagement", "com.unicenta.pos.forms.MenuEmployees");
|
||||
submenu.addTitle("Menu.PresenceManagement");
|
||||
submenu.addPanel("/com/unicenta/images/coffee.png", "Menu.Breaks", "com.unicenta.pos.epm.BreaksPanel");
|
||||
submenu.addPanel("/com/unicenta/images/leaves.png", "Menu.Leaves", "com.unicenta.pos.epm.LeavesPanel");
|
||||
submenu.addTitle("Menu.Employees.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.EPM.DailyPresenceReport", "/com/unicenta/reports/epm_dailypresence.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.EPM.DailyScheduleReport", "/com/unicenta/reports/epm_dailyschedule.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.EPM.PerformanceReport", "/com/unicenta/reports/epm_performance.bs");
|
||||
|
||||
|
||||
group = menu.addGroup("Menu.Utilities");
|
||||
submenu = group.addSubmenu("/com/unicenta/images/utilities.png", "Menu.Tools", "com.unicenta.pos.imports.JPanelCSV");
|
||||
submenu.addTitle("Menu.Import");
|
||||
submenu.addPanel("/com/unicenta/images/import.png", "Menu.CSVImport", "com.unicenta.pos.imports.JPanelCSVImport");
|
||||
submenu.addPanel("/com/unicenta/images/import.png", "Menu.CSVStockQty", "com.unicenta.pos.imports.StockQtyImport");
|
||||
submenu.addPanel("/com/unicenta/images/import.png", "Menu.CustomerCSVImport", "com.unicenta.pos.imports.CustomerCSVImport");
|
||||
submenu.addPanel("/com/unicenta/images/database.png", "Menu.CSVReset", "com.unicenta.pos.imports.JPanelCSVCleardb");
|
||||
submenu.addPanel("/com/unicenta/images/database.png", "Menu.Transfer", "com.unicenta.pos.transfer.Transfer");
|
||||
submenu.addTitle("Menu.Import.Reports");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.NewProducts", "/com/unicenta/reports/tools_newproducts.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.UpdatedPrices", "/com/unicenta/reports/tools_updatedprices.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.StockQtyUpdate", "/com/unicenta/reports/tools_inventoryqtyupdate.bs");
|
||||
// submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.BadPrices", "/com/unicenta/reports/tools_badprice.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.InvalidCategory", "/com/unicenta/reports/tools_invalidcategory.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.MissingData", "/com/unicenta/reports/tools_missingdata.bs");
|
||||
submenu.addPanel("/com/unicenta/images/reports.png", "Menu.Tools.InvalidData", "/com/unicenta/reports/tools_invaliddata.bs");
|
||||
|
||||
group = menu.addGroup("Menu.System");
|
||||
group.addChangePasswordAction();
|
||||
group.addPanel("/com/unicenta/images/configuration.png", "Menu.Configuration", "com.unicenta.pos.config.JPanelConfiguration");
|
||||
group.addPanel("/com/unicenta/images/printer.png", "Menu.Printer", "com.unicenta.pos.panels.JPanelPrinter");
|
||||
group.addPanel("/com/unicenta/images/timer.png", "Menu.CheckInCheckOut", "com.unicenta.pos.epm.JPanelEmployeePresence");
|
||||
|
||||
// Deprecated options. Only required with Openbravo ERP software
|
||||
// submenu.addTitle("Menu.Maintenance.ERP");
|
||||
// submenu.addExecution("/com/unicenta/images/openbravo.png", "Menu.ERPProducts", "com.unicenta.possync.ProductsSyncCreate");
|
||||
// submenu.addExecution("/com/unicenta/images/openbravo.png", "Menu.ERPOrders", "com.unicenta.possync.OrdersSyncCreate");
|
||||
|
||||
group.addExitAction();
|
||||
@@ -0,0 +1,126 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
This file is part of uniCenta oPOS.
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="center" bold="true" length="42">Close Cash Preview</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line><text length="18" bold="true">Printed:</text><text>${payments.printDate()}</text></line>
|
||||
<line><text length="18" bold="true">Printed by:</text><text>${payments.printUser()}</text></line>
|
||||
<line><text length="18" bold="true">Terminal:</text><text>${payments.printHost()}</text></line>
|
||||
<line><text length="18" bold="true">Sequence:</text><text>${payments.printSequence()}</text></line>
|
||||
<line><text length="18" bold="true">Last Close Date:</text><text>${payments.printDateStart()}</text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="32">Payments Report</text>
|
||||
<text align ="right" bold="true" length="10">Amount</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getPaymentLines())
|
||||
<line>
|
||||
<text align ="left" length="32">${line.printType()} ${line.printReason()}</text>
|
||||
<text align ="right" length="10">${line.printValue()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line>
|
||||
<text align ="left" length="32" bold="true">Total Sales</text>
|
||||
<text align ="right" length="10" bold="true">${payments.printPaymentsTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Number of Payments:</text>
|
||||
<text align ="right" length="10">${payments.printPayments()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="32">Tax Analysis</text>
|
||||
<text align ="right" bold="true" length="10">Amount</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getSaleLines())
|
||||
<line>
|
||||
<text align ="left" length="32">${line.printTaxName()}</text>
|
||||
<text align ="right" length="10">${line.printTaxes()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<!-- START OF VOIDS -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Line Voids</text></line>
|
||||
<line>
|
||||
<text align ="left" length="6" bold="true">Tkt</text>
|
||||
<text align ="left" length="12" bold="true">User</text>
|
||||
<text align ="left" length="19" bold="true">Product</text>
|
||||
<text align ="right" length="5" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getRemovedProductLines())
|
||||
<line>
|
||||
<text align ="left" length="6">${line.printTicketId()}</text>
|
||||
<text align ="left" length="11">${line.printWorkerName()}</text>
|
||||
<text align ="left" length="1"></text>
|
||||
<text align ="left" length="19">${line.printProductName()}</text>
|
||||
<text align ="right" length="5">${line.printTotalUnits()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF VOIDS -->
|
||||
|
||||
<!-- START OF NO SALES -->
|
||||
<line size="1"><text align="center" length="42" bold="true">No Sales</text></line>
|
||||
<line>
|
||||
<text align ="left" length="34" bold="true">User</text>
|
||||
<text align ="right" length="8" bold="true">Ticket</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getDrawerOpenedLines())
|
||||
<line>
|
||||
<text align ="left" length="34">${line.printUserName()}</text>
|
||||
<text align ="right" length="8">${line.printTicketId()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF NO SALES -->
|
||||
|
||||
<line>
|
||||
<text align ="left" length="32">Receipts:</text>
|
||||
<text align ="right" length="10">${payments.printSales()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="32" bold="true">SubTotal</text>
|
||||
<text align ="right" length="10" bold="true">${payments.printSalesBase()}</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="left" length="32" bold="true">Taxes</text>
|
||||
<text align ="right" length="10" bold="true">${payments.printSalesTaxes()}</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="left" length="32" bold="true">Totals</text>
|
||||
<text align ="right" length="10" bold="true">${payments.printSalesTotal()}</text>
|
||||
</line>
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,127 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
This file is part of uniCenta oPOS.
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="center" bold="true" length="42">Close Cash Report</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="30">Payments Report</text>
|
||||
<text align ="right" bold="true" length="12">Amount</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getPaymentLines())
|
||||
<line>
|
||||
<text align ="left" length="30">${line.printType()} ${line.printReason()}</text>
|
||||
<text align ="right" length="12">${line.printValue()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line>
|
||||
<text align ="left" length="30" bold="true">Total Sales</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printPaymentsTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="30">Number of Payments:</text>
|
||||
<text align ="right" length="12">${payments.printPayments()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="30">Tax Analysis</text>
|
||||
<text align ="right" bold="true" length="12">Amount</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getSaleLines())
|
||||
<line>
|
||||
<text align ="left" length="30">${line.printTaxName()}</text>
|
||||
<text align ="right" length="12">${line.printTaxes()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<!-- START OF VOIDS -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Line Voids</text></line>
|
||||
<line>
|
||||
<text align ="left" length="6" bold="true">Tkt</text>
|
||||
<text align ="left" length="12" bold="true">User</text>
|
||||
<text align ="left" length="19" bold="true">Product</text>
|
||||
<text align ="right" length="5" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getRemovedProductLines())
|
||||
<line>
|
||||
<text align ="left" length="6">${line.printTicketId()}</text>
|
||||
<text align ="left" length="11">${line.printWorkerName()}</text>
|
||||
<text align ="left" length="1"></text>
|
||||
<text align ="left" length="19">${line.printProductName()}</text>
|
||||
<text align ="right" length="5">${line.printTotalUnits()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF VOIDS -->
|
||||
|
||||
<!-- START OF NO SALES -->
|
||||
<line size="1"><text align="center" length="42" bold="true">No Sales</text></line>
|
||||
<line>
|
||||
<text align ="left" length="34" bold="true">User</text>
|
||||
<text align ="right" length="8" bold="true">Ticket</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getDrawerOpenedLines())
|
||||
<line>
|
||||
<text align ="left" length="34">${line.printUserName()}</text>
|
||||
<text align ="right" length="8">${line.printTicketId()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF NO SALES -->
|
||||
|
||||
<line>
|
||||
<text align ="left" length="3">Receipts:</text>
|
||||
<text align ="right" length="12">${payments.printSales()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="30" bold="true">SubTotal</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSalesBase()}</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="left" length="30" bold="true">Taxes</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSalesTaxes()}</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="left" length="30" bold="true">Totals</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSalesTotal()}</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line><text length="18" bold="true">Closed by:</text><text>${payments.printUser()}</text></line>
|
||||
<line><text length="18" bold="true">Terminal:</text><text>${payments.printHost()}</text></line>
|
||||
<line><text length="18" bold="true">Sequence:</text><text>${payments.printSequence()}</text></line>
|
||||
<line><text length="18" bold="true">Start Date:</text><text>${payments.printDateStart()}</text></line>
|
||||
<line><text length="18" bold="true">End Date:</text><text>${payments.printDateEnd()}</text></line>
|
||||
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,160 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty or
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Total paid</text>
|
||||
<text align="right" length="10">${ticket.printTotalPaid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank You for your custom</text>
|
||||
</line>
|
||||
</display>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="center" length="42">Printer.CustomerPaid</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="42">You can change this template</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="42">in the Resources panel</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="left" length="15">Receipt:</text>
|
||||
<text>${ticket.printId()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Date:</text>
|
||||
<text>${ticket.printDate()}</text>
|
||||
</line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line>
|
||||
<text align="left" length="15">Account:</text>
|
||||
<text>${ticket.getCustomer().printTaxid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Customer:</text>
|
||||
<text>${ticket.getCustomer().printName()}</text>
|
||||
</line>
|
||||
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="32" bold="true">Total Paid</text>
|
||||
<text align ="right" length="10" bold="true">${ticket.printTotalPaid()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" length="32" bold="true">Account Balance</text>
|
||||
<text align ="right" length="10" bold="true">${customer.printCurDebt()}</text>
|
||||
</line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Cash</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="22">Tendered:</text>
|
||||
<text align ="right" length="20">${paymentline.printPaid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="22">Change:</text>
|
||||
<text align ="right" length="20">${paymentline.printChange()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "ccard")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Mag card</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Number:</text>
|
||||
<text>${paymentline.printCardNumber()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Expiry Date:</text>
|
||||
<text>${paymentline.printExpirationDate()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Operation:</text>
|
||||
<text>${paymentline.printTransactionID()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Authorization:</text>
|
||||
<text>${paymentline.printAuthorization()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Cheque</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Voucher</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="left" length="15">Cashier:</text>
|
||||
<text>${ticket.printUser()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="center" length="42">Thank You for your custom</text>
|
||||
</line>
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
</output>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Total Paid</text>
|
||||
<text align="right" length="10">${ticket.printTotalPaid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank You for your custom</text>
|
||||
</line>
|
||||
</display>
|
||||
</output>
|
||||
@@ -0,0 +1,67 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<fiscalreceipt>
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<!-- setting $vatinfo to the values contained in the fiscal printer vat table-->
|
||||
#if (${ticketline.getTaxInfo().getRate()}==0.04)
|
||||
#set ($vatinfo ="1")
|
||||
#elseif (${ticketline.getTaxInfo().getRate()}==0.1)
|
||||
#set ($vatinfo ="2")
|
||||
#elseif (${ticketline.getTaxInfo().getRate()}==0.2)
|
||||
#set ($vatinfo ="3")
|
||||
#else #set ($vatinfo ="1")
|
||||
#end
|
||||
#if ($ticketline.isProductCom())
|
||||
<line price="${ticketline.getValue()}" units="${ticketline.getMultiply()}" tax="${vatinfo}">*${ticketline.printName()}</line>
|
||||
#else
|
||||
<line price="${ticketline.getValue()}" units="${ticketline.getMultiply()}" tax="${vatinfo}">${ticketline.printName()}</line>
|
||||
#end
|
||||
#end
|
||||
<message>Items count: ${ticket.printArticlesCount()}</message>
|
||||
#foreach ($paymentline in $ticket.payment)
|
||||
#if ($paymentline.name == "cash")
|
||||
<total paid="${paymentline.getPaid()}">Cash</total>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<total paid="${paymentline.getTotal()}">Refund</total>
|
||||
#end
|
||||
#if ($paymentline.name == "ccard")
|
||||
<total paid="${paymentline.getTotal()}">Mag card</total>
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<total paid="${paymentline.getTotal()}">Mag card refund</total>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<total paid="${paymentline.getTotal()}">Cheque</total>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<total paid="${paymentline.getTotal()}">Cheque refund</total>
|
||||
#end
|
||||
#end
|
||||
</fiscalreceipt>
|
||||
<!-- Other commands -->
|
||||
<!--
|
||||
<fiscalzreport/>
|
||||
<fiscalxreport/>
|
||||
-->
|
||||
</output>
|
||||
@@ -0,0 +1,83 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
https://unicenta.com
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
<line><text align="center" length="42">You can change Printer.Inventory template</text></line>
|
||||
<line><text align="center" length="42">in the Resources panel</text></line>
|
||||
<line></line>
|
||||
<line><text align="center" bold="true" length="42">Inventory Record</text></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="12">Date : </text>
|
||||
<text align ="left" length="30">${inventoryrecord.printDate()}</text></line>
|
||||
<line><text align ="left" bold="true" length="12">Reason : </text>
|
||||
<text align ="left" length="30">${inventoryrecord.printReason()}</text></line>
|
||||
<line><text align ="left" bold="true" length="12">User : </text>
|
||||
<text align ="left" length="30">${inventoryrecord.printUser()}</text></line>
|
||||
<line><text align ="left" bold="true" length="12">Location : </text>
|
||||
<text align ="left" length="30">${inventoryrecord.printLocation()}</text></line>
|
||||
<line><text align ="left" bold="true" length="12">Supplier : </text>
|
||||
<text align ="left" length="30">${inventoryrecord.printSupplier()}</text></line>
|
||||
<line><text align ="left" bold="true" length="12">Document : </text>
|
||||
<text align ="left" length="30">${inventoryrecord.printSupplierDoc()}</text></line>
|
||||
|
||||
<line size="1">
|
||||
#if ($inventoryrecord.isInput())
|
||||
<text align ="center" bold="true" length="42">In</text>
|
||||
#else
|
||||
<text align ="center" bold="true" length="42">Out</text>
|
||||
#end
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="17">Item</text>
|
||||
<text align ="right" bold="true" length="10">Price</text>
|
||||
<text align ="right" bold="true" length="5">Qty</text>
|
||||
<text align ="right" bold="true" length="10">Value</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>------------------------------------------</text>
|
||||
</line>
|
||||
#foreach ($inventoryline in $inventoryrecord.getLines())
|
||||
<line>
|
||||
<text align ="left" length="17">${inventoryline.printName()}</text>
|
||||
<text align ="right" length="10">${inventoryline.printPrice()}</text>
|
||||
<text align ="right" length="5">x${inventoryline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${inventoryline.printSubValue()}</text>
|
||||
</line>
|
||||
#if ($inventoryline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${inventoryline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="27">Totals :</text>
|
||||
<text align ="right" bold="true" length="5">${inventoryrecord.printTotalArticles()}</text>
|
||||
<text align ="right" bold="true" length="10">${inventoryrecord.printSubTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line><text align="center" length="42">Please keep this ticket</text></line>
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
-->
|
||||
<output>
|
||||
|
||||
<opendrawer/>
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,201 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="center" length="42" bold="true">Partial Cash Report</text></line>
|
||||
<line></line>
|
||||
|
||||
<!-- START OF SEQUENCE DETAIL -->
|
||||
<line><text length="18" bold="true">Run by:</text><text>${payments.printUser()}</text></line>
|
||||
<line><text length="18" bold="true">Terminal:</text><text>${payments.printHost()}</text></line>
|
||||
<line><text length="18" bold="true">Sequence:</text><text>${payments.printSequence()}</text></line>
|
||||
<line><text length="18" bold="true">Start Date:</text><text>${payments.printDateStart()}</text></line>
|
||||
<line><text length="18" bold="true">End Date:</text><text>${payments.printDateEnd()}</text></line>
|
||||
<line></line>
|
||||
<!-- END OF SEQUENCE DETAIL -->
|
||||
|
||||
<!-- START OF SALES -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Sales</text></line>
|
||||
<line>
|
||||
<text align ="left" length="16" bold="true">Name</text>
|
||||
<text align ="right" length="6" bold="true">Sold</text>
|
||||
<text align ="right" length="10" bold="true">Net</text>
|
||||
<text align ="right" length="10" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getProductSalesLines())
|
||||
<line>
|
||||
<text align ="left" length="16">${line.printProductName()}</text>
|
||||
<text align ="right" length="6">${line.printProductUnits()}</text>
|
||||
<text align ="right" length="10">${line.printProductPriceNet()}</text>
|
||||
<text align ="right" length="10">${line.printProductSubValue()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line>
|
||||
<text align ="left" length="16" bold="true">Total</text>
|
||||
<text align ="right" length="6" bold="true">${payments.printProductSalesTotalUnits()}</text>
|
||||
<text align ="right" length="10" bold="true">${payments.printSalesBase()}</text>
|
||||
<text align ="right" length="10" bold="true">${payments.printProductSalesTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<!-- END OF SALES SUMMARY -->
|
||||
|
||||
<!-- START OF CATEGORIES SUMMARY -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Product Categories</text></line>
|
||||
<line>
|
||||
<text align ="left" length="16" bold="true">Name</text>
|
||||
<text align ="right" length="6" bold="true">Sold</text>
|
||||
<text align ="right" length="10" bold="true"></text>
|
||||
<text align ="right" length="10" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getCategorySalesLines())
|
||||
<line>
|
||||
<text align ="left" length="16">${line.printCategoryName()}</text>
|
||||
<text align ="right" length="6">${line.printCategoryUnits()}</text>
|
||||
<text align ="right" length="10"></text>
|
||||
<text align ="right" length="10">${line.printCategorySum()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line><text align ="left" length="16" bold="true">Total</text>
|
||||
<text align ="right" length="6" bold="true">${payments.printCategorySalesTotalUnits()}</text>
|
||||
<text align ="right" length="10" bold="true"></text>
|
||||
<text align ="right" length="10" bold="true">${payments.printCategorySalesTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<!-- END OF CATEGORIES SUMMARY -->
|
||||
|
||||
<!-- START OF VOIDS -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Line Voids</text></line>
|
||||
<line>
|
||||
<text align ="left" length="6" bold="true">Tkt</text>
|
||||
<text align ="left" length="12" bold="true">User</text>
|
||||
<text align ="left" length="19" bold="true">Product</text>
|
||||
<text align ="right" length="5" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getRemovedProductLines())
|
||||
<line>
|
||||
<text align ="left" length="6">${line.printTicketId()}</text>
|
||||
<text align ="left" length="11">${line.printWorkerName()}</text>
|
||||
<text align ="left" length="1"></text>
|
||||
<text align ="left" length="19">${line.printProductName()}</text>
|
||||
<text align ="right" length="5">${line.printTotalUnits()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF VOIDS -->
|
||||
|
||||
<!-- START OF NO SALES -->
|
||||
<line size="1"><text align="center" length="42" bold="true">No Sales</text></line>
|
||||
<line>
|
||||
<text align ="left" length="34" bold="true">User</text>
|
||||
<text align ="right" length="8" bold="true">Ticket</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getDrawerOpenedLines())
|
||||
<line>
|
||||
<text align ="left" length="34">${line.printUserName()}</text>
|
||||
<text align ="right" length="8">${line.printTicketId()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF NO SALES -->
|
||||
|
||||
<!-- START OF TAXES ANALYSIS -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Taxes</text></line>
|
||||
<line>
|
||||
<text align ="left" length="12" bold="true">Name</text>
|
||||
<text align ="right" length="10" bold="true">Net</text>
|
||||
<text align ="right" length="10" bold="true">Gross</text>
|
||||
<text align ="right" length="10" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getSaleLines())
|
||||
<line>
|
||||
<text align ="left" length="12">${line.printTaxName()}</text>
|
||||
<text align ="right" length="10">${line.printTaxNet()}</text>
|
||||
<text align ="right" length="10">${line.printTaxGross()}</text>
|
||||
<text align ="right" length="10">${line.printTaxes()}</text>
|
||||
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line></line>
|
||||
<!-- END OF TAXES ANALYSIS -->
|
||||
|
||||
<!-- START OF PAYMENTS -->
|
||||
<line size="1"><text align="center" length="42" bold="true">Payments</text></line>
|
||||
<line>
|
||||
<text align ="left" length="32" bold="true">Type</text>
|
||||
<text align ="right" length="10" bold="true">Total</text>
|
||||
</line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
#foreach ($line in $payments.getPaymentLines())
|
||||
<line>
|
||||
<text align ="left" length="22">${line.printType()}</text>
|
||||
<text align ="right" length="10">${line.printReason()}</text>
|
||||
<text align ="right" length="10">${line.printValue()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line><text>------------------------------------------</text></line>
|
||||
<line>
|
||||
<text align ="left" length="30" bold="true">Total</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printPaymentsTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<!-- END OF PAYMENTS RECEIVED -->
|
||||
|
||||
<!-- START OF TOTALS SUMMARY -->
|
||||
<line><text>******************************************</text></line>
|
||||
<line size="1"><text align="center" length="42" bold="true">SUMMARY</text></line>
|
||||
<line><text>******************************************</text></line>
|
||||
<line><text align ="left" length="30" bold="true">Tickets</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSales()}</text>
|
||||
</line>
|
||||
<line><text align ="left" length="30" bold="true">Ticket Lines</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printProductSalesRows()}</text>
|
||||
</line>
|
||||
<line><text align ="left" length="30" bold="true">Payments</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printPayments()}</text>
|
||||
</line>
|
||||
<line><text align ="left" length="30" bold="true">Net Sales</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSalesBase()}</text>
|
||||
</line>
|
||||
<line><text align ="left" length="30" bold="true">Tax</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSalesTaxes()}</text>
|
||||
</line>
|
||||
<line><text align ="left" length="30" bold="true">Gross Sales</text>
|
||||
<text align ="right" length="12" bold="true">${payments.printSalesTotal()}</text>
|
||||
</line>
|
||||
<!-- END OF TOTALS SUMMARY -->
|
||||
|
||||
</ticket>
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,405 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line><text align="left" length="8">Total</text><text align="right" length="12">${ticket.printTotal()}</text></line>
|
||||
<line><text align="center" length="20">Thank you</text></line>
|
||||
</display>
|
||||
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line>
|
||||
</line>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine1()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine2()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine3()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine4()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine5()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine6()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<line>
|
||||
<text align="center" length="42">Printer.PrintLastTicket</text>
|
||||
</line>
|
||||
<line></line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line>
|
||||
<text align="left" length="15">Receipt:</text>
|
||||
<text>${ticket.printId()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line>
|
||||
<text align="left" length="15">Refund:</text>
|
||||
<text>${ticket.printId()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<line>
|
||||
<text align="left" length="15">Date:</text>
|
||||
<text>${ticket.printDate()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Terminal: </text>
|
||||
<text>${ticket.getHost()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Served by:</text>
|
||||
<text>${ticket.printUser()}</text>
|
||||
</line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line>
|
||||
<text align="left" length="15">Account #:</text>
|
||||
<text>${ticket.getCustomer().printTaxCustomerID()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Customer:</text>
|
||||
<text>${ticket.getCustomer().printName()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Address:</text>
|
||||
<text>${ticket.getCustomer().printAddress()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Postal:</text>
|
||||
<text>${ticket.getCustomer().printPostal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Phone:</text>
|
||||
<text>${ticket.getCustomer().printPhone()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Current Debt:</text>
|
||||
<text>${ticket.getCustomer().printCurDebt()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line>
|
||||
<text align="left" length="15">Table:</text>
|
||||
<text>${place}</text>
|
||||
</line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
<line>
|
||||
<text align ="left" length="17">Item</text>
|
||||
<text align ="right" length="8">Price</text>
|
||||
<text align ="right" length="7">Qty</text>
|
||||
<text align ="right" length="10">Value</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="42">------------------------------------------</text>
|
||||
</line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="17">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="17">${ticketline.printName()}</text>
|
||||
#end
|
||||
<!-- Print line to show Prices pre-Tax
|
||||
<text align ="right" length="8">${ticketline.printPrice()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="8">${ticketline.printSubValue()}</text>
|
||||
</line>
|
||||
-->
|
||||
|
||||
<!-- Print line to show Prices inc. Tax -->
|
||||
<text align ="right" length="8">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's barcode -->
|
||||
<!-- <line><text align ="left" length="12">Barcode : </text>${ticketline.printCode()}</text></line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's Reference -->
|
||||
<!-- <line><text align ="left" length="12">Reference : </text>${ticketline.printReference()}</text></line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line>
|
||||
<text align ="left" length="42">${ticketline.productAttSetInstDesc}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
<line><text>Items count: </text><text align ="left" length="14">${ticket.printArticlesCount()}</text></line>
|
||||
<line></line>
|
||||
<line><text align ="left" bold="true" length="16">Subtotal</text><text align ="right" length="26">${ticket.printSubTotal()}</text></line>
|
||||
<line><text align ="left" length="16">Tax</text><text align ="right" length="26">${ticket.printTax()}</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="16" bold="true">Balance Due</text><text align ="right" length="26" bold="true">${ticket.printTotal()}</text></line>
|
||||
<line></line>
|
||||
|
||||
#foreach ($taxinfo in $taxes)
|
||||
<!-- #set( $taxline = $ticket.getTaxLine($taxinfo)) -->
|
||||
<line>
|
||||
<text align ="left" length="18">${taxline.getTaxInfo()}</text>
|
||||
<text align ="right" length="12">${taxline.printSubTotal()}</text>
|
||||
<text align ="right" length="12">${taxline.printTax()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">Cash</text></line>
|
||||
<line>
|
||||
<text align="left" length="22">Tendered:</text>
|
||||
<text align ="right" length="20">${paymentline.printPaid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="22">Change:</text>
|
||||
<text align ="right" length="20">${paymentline.printChange()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Refund</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Cheque</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Cheque Refund</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Voucher</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Note Refund</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "slip")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Slip</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Free</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">On Account</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketFooterLine1()}</text>
|
||||
</line>
|
||||
<line><text>==========================================</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine6()}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "ccard")
|
||||
#if ($paymentline.chipAndPin)
|
||||
<line size="1">
|
||||
<text align="center" length="42" bold="true">CARD SALE</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text>${paymentline.getCardName()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>${paymentline.printCardNumber()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align="left" length="10">AMOUNT</text>
|
||||
<text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line>
|
||||
<text>Tranx ID : </text>
|
||||
<text>${paymentline.printTransactionID()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>Auth Code : </text>
|
||||
<text>${paymentline.printAuthorization()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>Verified By : </text>
|
||||
<text>${paymentline.printVerification()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (!$paymentline.chipAndPin)
|
||||
<line size="1">
|
||||
<text align="center" length="42" bold="true">CARD SALE</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text>${paymentline.getCardName()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>${paymentline.printCardNumber()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align="left" length="10">AMOUNT</text>
|
||||
<text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<text align ="left" length="22">Expiration Date:</text>
|
||||
<text>${paymentline.printExpirationDate()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>Operation : </text>
|
||||
<text>${paymentline.printTransactionID()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>Auth Code : </text>
|
||||
<text>${paymentline.printAuthorization()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
#end
|
||||
#if ($ticket.hasTip())
|
||||
<line>
|
||||
<text align ="left" length="16">Tip:</text>
|
||||
<text align ="right" length="26">_______________</text></line>
|
||||
<line></line>
|
||||
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="false">Total</text>
|
||||
<text align ="right" length="26" bold="false">_______________</text></line>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="42" bold="false">__________________________________________</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="center" length="42" bold="false">Signature</text>
|
||||
</line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="true">Total</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line size="1">
|
||||
<text align="center" length="42" bold="true">CARD REFUND</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text>${paymentline.getCardName()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>${paymentline.printCardNumber()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align="left" length="10">AMOUNT</text>
|
||||
<text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line>
|
||||
<text align ="left" length="22">Expiration Date:</text>
|
||||
<text>${paymentline.printExpirationDate()}</text></line>
|
||||
<line>
|
||||
<text>Tranx ID : </text>
|
||||
<text>${paymentline.printTransactionID()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>Auth Code : </text>
|
||||
<text>${paymentline.printAuthorization()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,42 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line>
|
||||
<text align="center" length="42">N.I.F. 00.000.000 X</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="center" length="42" bold="true">${product.printName()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="3">
|
||||
<text>Eur.</text>
|
||||
<text align ="right" length="6">${product.printPriceEur()}</text>
|
||||
</line>
|
||||
<line size="2">
|
||||
<text>Pts.</text>
|
||||
<text align ="right" length="6">${product.printPricePts()}</text>
|
||||
</line>
|
||||
<barcode type="EAN13">${product.printCode()}</barcode>
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,303 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line><text align="left" length="8">Total</text><text align="right" length="12">${ticket.printTotal()}</text></line>
|
||||
<line><text align="center" length="20">Thank you</text></line>
|
||||
</display>
|
||||
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine1()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine6()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="center" length="42">Printer.ReprintTicket</text></line>
|
||||
<line></line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line><text align="left" length="15">Receipt:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line><text align="left" length="15">Refund:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Terminal: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Served by:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().printTaxCustomerID()}</text></line>
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().printName()}</text></line>
|
||||
<line><text align="left" length="15">Address:</text><text>${ticket.getCustomer().printAddress()}</text></line>
|
||||
<line><text align="left" length="15">Postal:</text><text>${ticket.getCustomer().printPostal()}</text></line>
|
||||
<line><text align="left" length="15">Phone:</text><text>${ticket.getCustomer().printPhone1()}</text></line>
|
||||
<line><text align="left" length="15">Current Debt:</text><text>${ticket.getCustomer().printCurDebt()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
<line>
|
||||
<text align ="left" length="17">Item</text>
|
||||
<text align ="right" length="8">Price</text>
|
||||
<text align ="right" length="7">Qty</text>
|
||||
<text align ="right" length="10">Value</text>
|
||||
</line>
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="17">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="17">${ticketline.printName()}</text>
|
||||
#end
|
||||
<!-- Print line to show Prices pre-Tax
|
||||
<text align ="right" length="8">${ticketline.printPrice()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="8">${ticketline.printSubValue()}</text>
|
||||
</line>
|
||||
-->
|
||||
|
||||
<!-- Print line to show Prices inc. Tax -->
|
||||
<text align ="right" length="8">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's barcode -->
|
||||
<!-- <line><text align ="left" length="12">Barcode : </text>${ticketline.printCode()}</text></line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's Reference -->
|
||||
<!-- <line><text align ="left" length="12">Reference : </text>${ticketline.printReference()}</text></line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
<line><text>Items count: </text><text align ="left" length="14">${ticket.printArticlesCount()}</text></line>
|
||||
<line></line>
|
||||
<line><text align ="left" bold="true" length="16">Subtotal</text><text align ="right" length="26">${ticket.printSubTotal()}</text></line>
|
||||
<line><text align ="left" length="16">Tax</text><text align ="right" length="26">${ticket.printTax()}</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="16" bold="true">Balance Due</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
|
||||
#foreach ($taxinfo in $taxes)
|
||||
<!-- #set( $taxline = $ticket.getTaxLine($taxinfo)) -->
|
||||
<line>
|
||||
<text align ="left" length="18">${taxline.getTaxInfo()}</text>
|
||||
<text align ="right" length="12">${taxline.printSubTotal()}</text>
|
||||
<text align ="right" length="12">${taxline.printTax()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">Cash</text></line>
|
||||
<line><text align="left" length="22">Tendered:</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
<line><text align="left" length="22">Change:</text><text align ="right" length="20">${paymentline.printChange()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Refund</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Cheque</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Cheque Refund</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Voucher</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Note Refund</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "slip")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Slip</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">Free</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line>
|
||||
<text align="left" length="22" bold="true">On Account</text>
|
||||
<text align ="right" length="20">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketFooterLine1()}</text>
|
||||
</line>
|
||||
<line><text>==========================================</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine6()}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "ccard")
|
||||
#if ($paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line size="1"><text>${paymentline.getCardName()}</text></line>
|
||||
<line><text>${paymentline.printCardNumber()}</text></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align="left" length="10">AMOUNT</text>
|
||||
<text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line><text>Tranx ID : </text><text>${paymentline.printTransactionID()}</text></line>
|
||||
<line><text>Auth Code : </text><text>${paymentline.printAuthorization()}</text></line>
|
||||
<line><text>Verified By : </text><text>${paymentline.printVerification()}</text></line>
|
||||
#end
|
||||
#if (!$paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line size="1"><text>${paymentline.getCardName()}</text></line>
|
||||
<line><text>${paymentline.printCardNumber()}</text></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align="left" length="10">AMOUNT</text>
|
||||
<text align ="right" length="32">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Expiration Date:</text>
|
||||
<text>${paymentline.printExpirationDate()}</text>
|
||||
</line>
|
||||
<line><text>Operation : </text><text>${paymentline.printTransactionID()}</text></line>
|
||||
<line><text>Auth Code : </text><text>${paymentline.printAuthorization()}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
#if ($ticket.hasTip())
|
||||
<line><text align ="left" length="16">Tip:</text><text align ="right" length="26">_______________</text></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="false">Total</text>
|
||||
<text align ="right" length="26" bold="false">_______________</text></line>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="42" bold="false">__________________________________________</text>
|
||||
</line>
|
||||
<line size="1">
|
||||
<text align ="center" length="42" bold="false">Signature</text>
|
||||
</line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="true">Total</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD REFUND</text></line>
|
||||
<line size="1"><text>${paymentline.getCardName()}</text></line>
|
||||
<line><text>${paymentline.printCardNumber()}</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line><text align ="left" length="22">Expiration Date:</text><text>${paymentline.printExpirationDate()}</text></line>
|
||||
<line><text>Tranx ID : </text><text>${paymentline.printTransactionID()}</text></line>
|
||||
<line><text>Auth Code : </text><text>${paymentline.printAuthorization()}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
</ticket>
|
||||
|
||||
<!-- unComment this block if you want to open Cashdrawer in Print Preview
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end -->
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<!-- DISPLAY ANIMATION OPTIONS -->
|
||||
<!-- <display animation="flyer"> -->
|
||||
<!-- <display animation="scroll"> -->
|
||||
<!-- <display animation="blink"> -->
|
||||
<!-- <display animation="curtain"> -->
|
||||
|
||||
<display animation="none">
|
||||
<line><text align="center" length="20">uniCenta oPOS</text></line>
|
||||
<line><text align="center" length="20">Touch Friendly POS</text></line>
|
||||
</display>
|
||||
</output>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Order sent to P1</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you.</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer="1">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1"><text bold = "true" align="center" length="42">Printer 1</text></line>
|
||||
<line></line>
|
||||
<line size = "1"><text>Order : </text><text bold = "true">${ticket.getPickupId()}</text></line>
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line size = "1"><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Sent from: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Server:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().getName()}</text></line>
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="17">Item</text><text align ="right" length="5"></text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
#if($ticketline.printPrinter().equals("1"))
|
||||
#if($ticketline.getProperty("ticket.updated").equals("true"))
|
||||
#if ($ticketline.isProductCom())
|
||||
<line size="1"><text align ="left" length="37">--${ticketline.printName()}</text></line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="5"> ${ticketline.printMultiply()}x</text>
|
||||
<text align ="left" length="37"> ${ticketline.printName()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- Add the following lines only for 2.30 Attributes -->
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
${ticketline.setProperty("ticket.updated", "false")}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Order sent to P2</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you.</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer="2">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1"><text bold = "true" align="center" length="42">Printer 2</text></line>
|
||||
<line></line>
|
||||
<line size = "1"><text>Order : </text><text bold = "true">${ticket.getPickupId()}</text></line>
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Sent from: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Server:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().getName()}</text></line>
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="17">Item</text><text align ="right" length="5"></text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
#if($ticketline.printPrinter().equals("2"))
|
||||
#if($ticketline.getProperty("ticket.updated").equals("true"))
|
||||
#if ($ticketline.isProductCom())
|
||||
<line size="1"><text align ="left" length="37">--${ticketline.printName()}</text></line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="5"> ${ticketline.printMultiply()}x</text>
|
||||
<text align ="left" length="37"> ${ticketline.printName()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- Add the following lines only for 2.30 Attributes -->
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
${ticketline.setProperty("ticket.updated", "false")}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Order sent to P3</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you.</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer="3">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1"><text bold = "true" align="center" length="42">Printer 3</text></line>
|
||||
<line></line>
|
||||
<line size = "1"><text>Order : </text><text bold = "true">${ticket.getPickupId()}</text></line>
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Sent from: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Server:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().getName()}</text></line>
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="17">Item</text><text align ="right" length="5"></text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
#if($ticketline.printPrinter().equals("3"))
|
||||
#if($ticketline.getProperty("ticket.updated").equals("true"))
|
||||
#if ($ticketline.isProductCom())
|
||||
<line size="1"><text align ="left" length="37">--${ticketline.printName()}</text></line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="5"> ${ticketline.printMultiply()}x</text>
|
||||
<text align ="left" length="37"> ${ticketline.printName()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- Add the following lines only for 2.30 Attributes -->
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
${ticketline.setProperty("ticket.updated", "false")}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Order sent to P4</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you.</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer="4">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1"><text bold = "true" align="center" length="42">Printer 4</text></line>
|
||||
<line></line>
|
||||
<line size = "1"><text>Order : </text><text bold = "true">${ticket.getPickupId()}</text></line>
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Sent from: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Server:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().getName()}</text></line>
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="17">Item</text><text align ="right" length="5"></text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
#if($ticketline.printPrinter().equals("4"))
|
||||
#if($ticketline.getProperty("ticket.updated").equals("true"))
|
||||
#if ($ticketline.isProductCom())
|
||||
<line size="1"><text align ="left" length="37">--${ticketline.printName()}</text></line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="5"> ${ticketline.printMultiply()}x</text>
|
||||
<text align ="left" length="37"> ${ticketline.printName()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- Add the following lines only for 2.30 Attributes -->
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
${ticketline.setProperty("ticket.updated", "false")}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Order sent to P5</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you.</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer="5">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1"><text bold = "true" align="center" length="42">Printer 5</text></line>
|
||||
<line></line>
|
||||
<line size = "1"><text>Order : </text><text bold = "true">${ticket.getPickupId()}</text></line>
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Sent from: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Server:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().getName()}</text></line>
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="17">Item</text><text align ="right" length="5"></text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
#if($ticketline.printPrinter().equals("5"))
|
||||
#if($ticketline.getProperty("ticket.updated").equals("true"))
|
||||
#if ($ticketline.isProductCom())
|
||||
<line size="1"><text align ="left" length="37">--${ticketline.printName()}</text></line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="5"> ${ticketline.printMultiply()}x</text>
|
||||
<text align ="left" length="37"> ${ticketline.printName()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- Add the following lines only for 2.30 Attributes -->
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
${ticketline.setProperty("ticket.updated", "false")}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,86 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Order sent to P6</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you.</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer="6">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1"><text bold = "true" align="center" length="42">Printer 6</text></line>
|
||||
<line></line>
|
||||
<line size = "1"><text>Order : </text><text bold = "true">${ticket.getPickupId()}</text></line>
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Sent from: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Server:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().getName()}</text></line>
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="17">Item</text><text align ="right" length="5"></text></line>
|
||||
<line><text>------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
#if($ticketline.printPrinter().equals("6"))
|
||||
#if($ticketline.getProperty("ticket.updated").equals("true"))
|
||||
#if ($ticketline.isProductCom())
|
||||
<line size="1"><text align ="left" length="37">--${ticketline.printName()}</text></line>
|
||||
#else
|
||||
<line size="1">
|
||||
<text align ="left" length="5"> ${ticketline.printMultiply()}x</text>
|
||||
<text align ="left" length="37"> ${ticketline.printName()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- Add the following lines only for 2.30 Attributes -->
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
${ticketline.setProperty("ticket.updated", "false")}
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,270 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2019 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line><text align="left" length="8">Total</text><text align="right" length="12">${ticket.printTotal()}</text></line>
|
||||
<line><text align="center" length="20">Thank you</text></line>
|
||||
</display>
|
||||
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line>
|
||||
</line>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine1()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine6()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="center" length="42">Printer.Ticket</text></line>
|
||||
<line></line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line><text align="left" length="15">Receipt:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line><text align="left" length="15">Refund:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Terminal: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Served by:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().printTaxCustomerID()}</text></line>
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().printName()}</text></line>
|
||||
<line><text align="left" length="15">Address:</text><text>${ticket.getCustomer().printAddress()}</text></line>
|
||||
<line><text align="left" length="15">Postal:</text><text>${ticket.getCustomer().printPostal()}</text></line>
|
||||
<line><text align="left" length="15">Phone:</text><text>${ticket.getCustomer().printPhone1()}</text></line>
|
||||
<line><text align="left" length="15">Current Debt:</text><text>${ticket.getCustomer().printCurDebt()}</text></line>
|
||||
<line><text align="left" length="15">Balance:</text><text>${ticket.getCustomer().printCurBal()}</text></line>
|
||||
<line><text align="left" length="15">TaxId:</text><text>${ticket.getCustomer().getTaxid()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" length="17">Item</text>
|
||||
<text align ="right" length="8">Price</text>
|
||||
<text align ="right" length="7">Qty</text>
|
||||
<text align ="right" length="10">Value</text>
|
||||
</line>
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="17">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="17">${ticketline.printName()}</text>
|
||||
#end
|
||||
<!-- Print line to show Prices pre-Tax
|
||||
<text align ="right" length="8">${ticketline.printPrice()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="8">${ticketline.printSubValue()}</text>
|
||||
</line>
|
||||
-->
|
||||
|
||||
<!-- Print line to show Prices inc. Tax -->
|
||||
<text align ="right" length="8">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's barcode -->
|
||||
<!-- <line><text align ="left" length="12">Barcode : </text>${ticketline.printCode()}</text></line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's Reference -->
|
||||
<!-- <line><text align ="left" length="12">Reference : </text>${ticketline.printReference()}</text></line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
<line><text>Items count: </text><text align ="left" length="14">${ticket.printArticlesCount()}</text></line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="16">Subtotal</text>
|
||||
<text align ="right" length="26">${ticket.printSubTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="16">Tax</text>
|
||||
<text align ="right" length="26">${ticket.printTax()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="true">Balance Due</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
|
||||
#foreach ($taxinfo in $taxes)
|
||||
#set( $taxline = $ticket.getTaxLine($taxinfo))
|
||||
<line>
|
||||
<text align ="left" length="18">${taxline.getTaxInfo()}</text>
|
||||
<text align ="right" length="12">${taxline.printSubTotal()}</text>
|
||||
<text align ="right" length="12">${taxline.printTax()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">Cash</text></line>
|
||||
<line><text align="left" length="22">Tendered:</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
<line><text align="left" length="22">Change:</text><text align ="right" length="20">${paymentline.printChange()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line><text align="left" length="22" bold="true">Refund</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line><text align="left" length="22" bold="true">Cheque</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line><text align="left" length="22" bold="true">Cheque Refund</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line><text align="left" length="22" bold="true">Voucher : ${paymentline.printVoucherNumber()}</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line><text align="left" length="22" bold="true">Voucher Refund : ${paymentline.printVoucherNumber()}</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "slip")
|
||||
<line><text align="left" length="22" bold="true">Slip</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line><text align="left" length="22" bold="true">Free</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line><text align="left" length="22" bold="true">On Account</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line></line>
|
||||
<line><text align="center" length="42">${ticket.printTicketFooterLine1()}</text></line>
|
||||
<line><text>==========================================</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine6()}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
|
||||
#if ($paymentline.name == "ccard")
|
||||
#if ($paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line size="1"><text>${paymentline.getCardName()}</text></line>
|
||||
<line><text>${paymentline.printCardNumber()}</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line><text>Tranx ID : </text><text>${paymentline.printTransactionID()}</text></line>
|
||||
<line><text>Auth Code : </text><text>${paymentline.printAuthorization()}</text></line>
|
||||
<line><text>Verified By : </text><text>${paymentline.printVerification()}</text></line>
|
||||
<line><text>Card # (last 4) : </text><text>${paymentline.printLastFourDigits()}</text></line>
|
||||
#end
|
||||
#if (!$paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line size="1"><text>${paymentline.getCardName()}</text></line>
|
||||
<line><text>${paymentline.printCardNumber()}</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line><text align ="left" length="22">Expiration Date:</text><text>${paymentline.printExpirationDate()}</text></line>
|
||||
<line><text>Operation : </text><text>${paymentline.printTransactionID()}</text></line>
|
||||
<line><text>Auth Code : </text><text>${paymentline.printAuthorization()}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
#if ($ticket.hasTip())
|
||||
<line><text align ="left" length="16">Tip:</text><text align ="right" length="26">_______________</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="16" bold="false">Total</text><text align ="right" length="26" bold="false">_______________</text></line>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="42" bold="false">__________________________________________</text></line>
|
||||
<line size="1"><text align ="center" length="42" bold="false">Signature</text></line>
|
||||
#else
|
||||
<line size="1"><text align ="left" length="16" bold="true">Total</text><text align ="right" length="26" bold="true">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD REFUND</text></line>
|
||||
<line size="1"><text>${paymentline.getCardName()}</text></line>
|
||||
<line><text>${paymentline.printCardNumber()}</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
<line><text align ="left" length="22">Expiration Date:</text><text>${paymentline.printExpirationDate()}</text></line>
|
||||
<line><text>Tranx ID : </text><text>${paymentline.printTransactionID()}</text></line>
|
||||
<line><text>Auth Code : </text><text>${paymentline.printAuthorization()}</text></line>
|
||||
<line></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,40 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="8">Total:</text>
|
||||
<text align="right" length="12">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank You for your custom</text>
|
||||
</line>
|
||||
</display>
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
</output>
|
||||
@@ -0,0 +1,38 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
This displays amount tendered and change on customer display
|
||||
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
<line>
|
||||
<text align="left" length="8">Given:</text>
|
||||
<text align ="right" length="12">${paymentline.printPaid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="8">Change:</text>
|
||||
<text align ="right" length="12">${paymentline.printChange()}</text>
|
||||
</line>
|
||||
#end
|
||||
</display>
|
||||
</output>
|
||||
@@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align="left" length="15">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align="left" length="15">${ticketline.printName()}</text>
|
||||
#end
|
||||
<text align="right" length="5">x${ticketline.printMultiply()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<!-- These lines for values without tax
|
||||
<text align="right" length="10">${ticketline.printPrice()}</text>
|
||||
<text align="right" length="10">${ticketline.printSubValue()}</text>
|
||||
-->
|
||||
<!-- These lines for values with tax -->
|
||||
<text align ="right" length="10">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
|
||||
</line>
|
||||
</display>
|
||||
</output>
|
||||
@@ -0,0 +1,319 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="10">Total</text>
|
||||
<text align="right" length="10">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you for your custom</text>
|
||||
</line>
|
||||
</display>
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine1()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine2()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine3()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine4()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine5()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketHeaderLine6()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line>
|
||||
<text align="center" length="42">Printer.TicketNew</text>
|
||||
</line>
|
||||
<line></line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line>
|
||||
<text align="left" length="15">Receipt:</text>
|
||||
<text>${ticket.printId()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line>
|
||||
<text align="left" length="15">Refund:</text>
|
||||
<text>${ticket.printId()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line>
|
||||
<text align="left" length="15">Date:</text>
|
||||
<text>${ticket.printDate()}</text>
|
||||
</line>
|
||||
#if ($ticket.getCustomer())
|
||||
<line>
|
||||
<text align="left" length="15">Customer:</text>
|
||||
<text>${ticket.getCustomer().printName()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Account #:</text>
|
||||
<text>${ticket.getCustomer().printTaxid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Current Debt:</text>
|
||||
<text>${ticket.getCustomer().printCurDebt()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line>
|
||||
<text align="left" length="15">Table:</text>
|
||||
<text>${place}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<line>
|
||||
<text align="left" length="15">Served by:</text>
|
||||
<text>${ticket.printUser()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" length="17">Item</text>
|
||||
<text align ="right" length="8">Price</text>
|
||||
<text align ="right" length="7">Qty</text>
|
||||
<text align ="right" length="10">Value</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>------------------------------------------</text>
|
||||
</line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="17">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="17">${ticketline.printName()}</text>
|
||||
#end
|
||||
<text align ="right" length="8">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line>
|
||||
<text align ="left" length="42">${ticketline.productAttSetInstDesc}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
<line>
|
||||
<text>------------------------------------------</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>Items count: </text>
|
||||
<text align ="left" length="14">${ticket.printArticlesCount()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="true">Total</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line>
|
||||
<text bold="true">Cash</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="22">Tendered:</text>
|
||||
<text align ="right" length="20">${paymentline.printPaid()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="22">Change:</text>
|
||||
<text align ="right" length="20">${paymentline.printChange()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line>
|
||||
<text bold="true">Refund</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "ccard")
|
||||
<line>
|
||||
<text bold="true">Card</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Card Number:</text>
|
||||
<text>${paymentline.printCardNumber()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Expiration Date:</text>
|
||||
<text>${paymentline.printExpirationDate()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Operation:</text>
|
||||
<text>${paymentline.printTransactionID()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="22">Authorisation:</text>
|
||||
<text>${paymentline.printAuthorization()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line>
|
||||
<text bold="true">Card Refund</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Cheque</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Cheque Refund</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Voucher</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Note Refund</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">Free</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line></line>
|
||||
<line>
|
||||
<text bold="true">On Account</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="42">${paymentline.printTotal()}</text>
|
||||
</line>
|
||||
#end
|
||||
#end
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="16">Nett of Tax:</text>
|
||||
<text align ="right" length="26">${ticket.printSubTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="16">Taxes:</text>
|
||||
<text align ="right" length="26">${ticket.printTax()}</text>
|
||||
</line>
|
||||
#foreach ($taxinfo in $taxes)
|
||||
<line>
|
||||
<text align ="left" length="18">${taxinfo.getTaxInfo()}</text>
|
||||
<text align ="right" length="12">${taxinfo.printSubTotal()}</text>
|
||||
<text align ="right" length="12">${taxinfo.printTax()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="center" length="42">${ticket.printTicketFooterLine1()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>==========================================</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine2()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine3()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine4()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine5()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine6()}</text>
|
||||
</line>
|
||||
#end
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
</output>
|
||||
@@ -0,0 +1,245 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line><text align="left" length="8">Total</text><text align="right" length="12">${ticket.printTotal()}</text></line>
|
||||
<line><text align="center" length="20">Thank you</text></line>
|
||||
</display>
|
||||
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine1()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line><text align="center" length="42">${ticket.printTicketHeaderLine6()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="center" length="42">Printer.TicketPreview</text></line>
|
||||
<line></line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line><text align="left" length="15">Receipt:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line><text align="left" length="15">Refund:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Terminal: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Served by:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().printTaxCustomerID()}</text></line>
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().printName()}</text></line>
|
||||
<line><text align="left" length="15">Address:</text><text>${ticket.getCustomer().printAddress()}</text></line>
|
||||
<line><text align="left" length="15">Postal:</text><text>${ticket.getCustomer().printPostal()}</text></line>
|
||||
<line><text align="left" length="15">Phone:</text><text>${ticket.getCustomer().printPhone1()}</text></line>
|
||||
<line><text align="left" length="15">Current Debt:</text><text>${ticket.getCustomer().printCurDebt()}</text></line>
|
||||
<line><text align="left" length="15">Balance:</text><text>${ticket.getCustomer().printCurBal()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" length="17">Item</text>
|
||||
<text align ="right" length="8">Price</text>
|
||||
<text align ="right" length="7">Qty</text>
|
||||
<text align ="right" length="10">Value</text>
|
||||
</line>
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="17">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="17">${ticketline.printName()}</text>
|
||||
#end
|
||||
<!-- Print line to show Prices pre-Tax
|
||||
<text align ="right" length="8">${ticketline.printPrice()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="8">${ticketline.printSubValue()}</text>
|
||||
</line>
|
||||
-->
|
||||
|
||||
<!-- Print line to show Prices inc. Tax -->
|
||||
<text align ="right" length="8">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="7">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's barcode -->
|
||||
<!-- <line><text align ="left" length="12">Barcode : </text>${ticketline.printCode()}</text></line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's Reference -->
|
||||
<!-- <line><text align ="left" length="12">Reference : </text>${ticketline.printReference()}</text></line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
<line><text align="left" length="42">------------------------------------------</text></line>
|
||||
<line><text>Items count: </text><text align ="left" length="14">${ticket.printArticlesCount()}</text></line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="16">Subtotal</text>
|
||||
<text align ="right" length="26">${ticket.printSubTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="16">Tax</text>
|
||||
<text align ="right" length="26">${ticket.printTax()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="true">Balance Due</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
|
||||
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">Cash</text></line>
|
||||
<line><text align="left" length="22">Tendered:</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
<line><text align="left" length="22">Change:</text><text align ="right" length="20">${paymentline.printChange()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line><text align="left" length="22" bold="true">Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line><text align="left" length="22" bold="true">Cheque</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line><text align="left" length="22" bold="true">Cheque Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line><text align="left" length="22" bold="true">Voucher</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line><text align="left" length="22" bold="true">Voucher Refund<text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "slip")
|
||||
<line><text align="left" length="22" bold="true">Slip</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line><text align="left" length="22" bold="true">Free</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line><text align="left" length="22" bold="true">On Account</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line></line>
|
||||
<line><text align="center" length="42">${ticket.printTicketFooterLine1()}</text></line>
|
||||
<line><text>==========================================</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine6()}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "ccard")
|
||||
#if ($paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line><text align = "center" length="42" bold="true">A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if (!$paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line><text align = "center" length="42" bold="true">A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($ticket.hasTip())
|
||||
<line><text align ="left" length="16">Tip:</text><text align ="right" length="26">_______________</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="16" bold="false">Total</text><text align ="right" length="26" bold="false">_______________</text></line>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="42" bold="false">__________________________________________</text></line>
|
||||
<line size="1"><text align ="center" length="42" bold="false">Signature</text></line>
|
||||
#else
|
||||
<line size="1"><text align ="left" length="16" bold="true">Total</text><text align ="right" length="26" bold="true">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line size="1"><text align="center" length="42" bold="true">CARD SALE</text></line>
|
||||
<line></line>
|
||||
<line><text align = "center" length="42" bold="true">A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,243 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Contributed by: Julian Roberts, Brockley Estate, Tasmania
|
||||
Additional changes: uniCenta 2015
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line><text align="left" length="8">Total</text><text align="right" length="12">${ticket.printTotal()}</text></line>
|
||||
<line><text align="center" length="20">Thank you</text></line>
|
||||
</display>
|
||||
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line><text align="center" length="126">${ticket.printTicketHeaderLine1()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line><text align="center" length="126">${ticket.printTicketHeaderLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line><text align="center" length="126">${ticket.printTicketHeaderLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line><text align="center" length="126">${ticket.printTicketHeaderLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line><text align="center" length="126">${ticket.printTicketHeaderLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line><text align="center" length="126">${ticket.printTicketHeaderLine6()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="center" length="126">Printer.TicketPreview</text></line>
|
||||
<line></line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line><text align="left" length="15">Receipt:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line><text align="left" length="15">Refund:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
<line><text align="left" length="15">Terminal: </text><text>${ticket.getHost()}</text></line>
|
||||
<line><text align="left" length="15">Served by:</text><text>${ticket.printUser()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().printTaxCustomerID()}</text></line>
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().printName()}</text></line>
|
||||
<line><text align="left" length="15">Address:</text><text>${ticket.getCustomer().printAddress()}</text></line>
|
||||
<line><text align="left" length="15">Postal:</text><text>${ticket.getCustomer().printPostal()}</text></line>
|
||||
<line><text align="left" length="15">Phone:</text><text>${ticket.getCustomer().printPhone1()}</text></line>
|
||||
<line><text align="left" length="15">Current Debt:</text><text>${ticket.getCustomer().printCurDebt()}</text></line>
|
||||
<line><text align="left" length="15">Balance:</text><text>${ticket.getCustomer().printCurBal()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table:</text><text>${place}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" length="83">Item</text>
|
||||
<text align ="right" length="10">Price</text>
|
||||
<text align ="right" length="5">Qty</text>
|
||||
<text align ="right" length="10">Value</text>
|
||||
</line>
|
||||
<line><text align="left" length="108">------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="83">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="83">${ticketline.printName()}</text>
|
||||
#end
|
||||
<!-- Print line to show Prices pre-Tax -->
|
||||
<text align ="right" length="10">${ticketline.printPrice()}</text>
|
||||
<text align ="right" length="5">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printSubValue()}</text>
|
||||
</line>
|
||||
|
||||
<!-- Print line to show Prices inc. Tax
|
||||
<text align ="right" length="10">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="5">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
-->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="108">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="108">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's barcode -->
|
||||
<!-- <line><text align ="left" length="30">Barcode : </text>${ticketline.printCode()}</text></line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a product's Reference -->
|
||||
<!-- <line><text align ="left" length="30">Reference : </text>${ticketline.printReference()}</text></line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
<line><text align="left" length="108">------------------------------------------</text></line>
|
||||
<line><text>Items count: </text><text align ="left" length="14">${ticket.printArticlesCount()}</text></line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" bold="true" length="16">Subtotal</text>
|
||||
<text align ="right" length="26">${ticket.printSubTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="left" length="16">Tax</text>
|
||||
<text align ="right" length="26">${ticket.printTax()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="left" length="16" bold="true">Balance Due</text>
|
||||
<text align ="right" length="26" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">Cash</text></line>
|
||||
<line><text align="left" length="22">Tendered:</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
<line><text align="left" length="22">Change:</text><text align ="right" length="20">${paymentline.printChange()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line><text align="left" length="22" bold="true">Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line><text align="left" length="22" bold="true">Cheque</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line><text align="left" length="22" bold="true">Cheque Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line><text align="left" length="22" bold="true">Voucher</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line><text align="left" length="22" bold="true">Note Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "slip")
|
||||
<line><text align="left" length="22" bold="true">Slip</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line><text align="left" length="22" bold="true">Free</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line><text align="left" length="22" bold="true">On Account</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line></line>
|
||||
<line><text align="center" length="108">${ticket.printTicketFooterLine1()}</text></line>
|
||||
<line><text>==========================================</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line><text>${ticket.printTicketFooterLine6()}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "ccard")
|
||||
#if ($paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="126" bold="true">CARD SALE</text></line>
|
||||
<line><text align = "center" length="126" bold="true">A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if (!$paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" length="126" bold="true">CARD SALE</text></line>
|
||||
<line><text align = "center" length="126" bold="true">A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($ticket.hasTip())
|
||||
<line><text align ="left" length="16">Tip:</text><text align ="right" length="26">_______________</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="16" bold="false">Total</text><text align ="right" length="26" bold="false">_______________</text></line>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="126" bold="false">__________________________________________</text></line>
|
||||
<line size="1"><text align ="center" length="126" bold="false">Signature</text></line>
|
||||
#else
|
||||
<line size="1"><text align ="left" length="16" bold="true">Total</text><text align ="right" length="26" bold="true">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line size="1"><text align="center" length="126" bold="true">CARD SALE</text></line>
|
||||
<line></line>
|
||||
<line><text align = "center" length="126" bold="true">A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left" length="10">AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,116 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="8">Sent!</text>
|
||||
<text align="right" length="12">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank you</text>
|
||||
</line>
|
||||
</display>
|
||||
|
||||
<ticket printer = "2">
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size = "1">
|
||||
<text bold = "true" align="center" length="42">ORDER</text>
|
||||
</line>
|
||||
<line></line>
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line size ="1">
|
||||
<text bold="true" align="left" length="15">Table:</text>
|
||||
<text bold="true">${place}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<line>
|
||||
<text align="left" length="15">Server:</text>
|
||||
<text>${ticket.printUser()}</text>
|
||||
</line>
|
||||
|
||||
<line>
|
||||
<text align="left" length="15">Date:</text>
|
||||
<text>${ticket.printDate()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Receipt:</text>
|
||||
<text>${ticket.printId()}</text>
|
||||
</line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line>
|
||||
<text align="left" length="15">Customer:</text>
|
||||
<text>${ticket.getCustomer().getName()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="15">Account #:</text>
|
||||
<text>${ticket.getCustomer().getTaxid()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line>
|
||||
<text align ="left" length="17">Item</text>
|
||||
<text align ="right" length="5"></text>
|
||||
</line>
|
||||
<line>
|
||||
<text>------------------------------------------</text>
|
||||
</line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<!-- Show Product's assigned Printer
|
||||
<line><text align="left" length="15">Printer :</text><text>${ticketline.printPrinter()}</text></line>-->
|
||||
|
||||
#if(($ticketline.printPrinter()) && ($ticketline.getProperty("sendstatus").equals("No")))
|
||||
<line size = "1">
|
||||
<text align ="left" length="5">${ticketline.printMultiply()}x</text>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="37">--${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="37">${ticketline.printName()}</text>
|
||||
#end
|
||||
</line>
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line>
|
||||
<text align ="left" length="42"> ${ticketline.productAttSetInstDesc}</text>
|
||||
</line>
|
||||
<line></line>
|
||||
#end
|
||||
#end
|
||||
#end
|
||||
<line>
|
||||
<text>------------------------------------------</text>
|
||||
</line>
|
||||
</ticket>
|
||||
</output>
|
||||
@@ -0,0 +1,32 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<output>
|
||||
<display>
|
||||
<line>
|
||||
<text align="left" length="8">Total:</text>
|
||||
<text align="right" length="12">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align="center" length="20">Thank You for your custom</text>
|
||||
</line>
|
||||
</display>
|
||||
</output>
|
||||
@@ -0,0 +1,259 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Contributed by: Julian Roberts, Brockley Estate, Tasmania
|
||||
Additional changes: uniCenta 2015
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<output>
|
||||
|
||||
<display>
|
||||
<line><text align="left" length="10">Total</text><text align="right" length="10">${ticket.printTotal()}</text></line>
|
||||
<line><text align="center" length="20">Thank you for your custom</text></line>
|
||||
</display>
|
||||
|
||||
<ticket>
|
||||
<line></line>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line></line>
|
||||
<line><text align="center" length="126">Tax Invoice</text></line>
|
||||
<line></line>
|
||||
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<line>
|
||||
<text align="center" length="126">${ticket.printTicketHeaderLine1()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<line>
|
||||
<text align="center" length="126">${ticket.printTicketHeaderLine2()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<line>
|
||||
<text align="center" length="126">${ticket.printTicketHeaderLine3()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<line>
|
||||
<text align="center" length="126">${ticket.printTicketHeaderLine4()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<line>
|
||||
<text align="center" length="126">${ticket.printTicketHeaderLine5()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<line>
|
||||
<text align="center" length="126">${ticket.printTicketHeaderLine6()}</text>
|
||||
</line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
|
||||
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<line><text align="left" length="15">Receipt:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<line><text align="left" length="15">Refund:</text><text>${ticket.printId()}</text></line>
|
||||
#end
|
||||
<line><text align="left" length="15">Date:</text><text>${ticket.printDate()}</text></line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left" length="15">Account #:</text><text>${ticket.getCustomer().printTaxCustomerID()}</text></line>
|
||||
<line><text align="left" length="15">Customer:</text><text>${ticket.getCustomer().printName()}</text></line>
|
||||
<line><text align="left" length="15">Address:</text><text>${ticket.getCustomer().printAddress()}</text></line>
|
||||
<line><text align="left" length="15">Postal:</text><text>${ticket.getCustomer().printPostal()}</text></line>
|
||||
<line><text align="left" length="15">Phone:</text><text>${ticket.getCustomer().printPhone1()}</text></line>
|
||||
<line><text align="left" length="15">Current Debt:</text><text>${ticket.getCustomer().printCurDebt()}</text></line>
|
||||
<line><text align="left" length="15">Balance:</text><text>${ticket.getCustomer().printCurBal()}</text></line>
|
||||
#end
|
||||
|
||||
#if (${tickettext.place} != ${place})
|
||||
<line><text align="left" length="15">Table/Room:</text><text>${place}</text></line>
|
||||
#end
|
||||
|
||||
<line><text align="left" length="15">Served by:</text><text>${ticket.printUser()}</text></line>
|
||||
<line></line>
|
||||
<line><text align ="left" length="83">Item</text><text align ="right" length="10">Price</text><text align ="right" length="5">Qty</text><text align ="right" length="10">Value</text></line>
|
||||
<line><text align="left" length="108">------------------------------------------------------------------------------------------------------------</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="83">*${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="83">${ticketline.printName()}</text>
|
||||
#end
|
||||
<text align ="right" length="10">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="5">x${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="10">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
|
||||
<!-- un-comment line below if you want to add a product's properties -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("ingredients", "")}</text> </line> -->
|
||||
|
||||
<!-- un-comment line below if you want to add a user input sales line's Note -->
|
||||
<!-- <line><text align ="left" length="42">${ticketline.getProperty("notes", "")}</text> </line> -->
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="42">${ticketline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
<line><text align="left" length="108">------------------------------------------------------------------------------------------------------------</text></line>
|
||||
<line><text>Items count: </text><text align ="left" length="14">${ticket.printArticlesCount()}</text></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">Cash</text></line>
|
||||
<!-- <line><text align="left" length="22">Tendered:</text><text align ="right" length="20">${paymentline.printTendered()}</text></line> -->
|
||||
<line><text align="left" length="22">Change:</text><text align ="right" length="20">${paymentline.printChange()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line><text bold="true">Refund</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "ccard")
|
||||
<line><text bold="true">Card</text></line>
|
||||
<line> <text>Card Type</text></line>
|
||||
<line>
|
||||
<text>${paymentline.getCardName()}</text>
|
||||
</line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line><text bold="true">Card Refund</text></line>
|
||||
<line> <text>Card Type</text></line>
|
||||
<line>
|
||||
<text>${paymentline.getCardName()}</text>
|
||||
</line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line></line>
|
||||
<line><text bold="true">Cheque</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line></line>
|
||||
<line><text bold="true">Cheque Refund</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line></line>
|
||||
<line><text bold="true">Voucher</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line></line>
|
||||
<line><text bold="true">Note Refund</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "free")
|
||||
<line></line>
|
||||
<line><text bold="true">Free</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "debt")
|
||||
<line></line>
|
||||
<line><text bold="true">On Account</text></line>
|
||||
<line><text align ="right" length="108">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
|
||||
<line></line>
|
||||
<line><text align ="left" length="16">Taxable Items:</text><text align ="right" length="92">${ticket.printSubTotal()}</text></line>
|
||||
<line><text align ="left" length="22">Tax Included in total:</text><text align ="right" length="86">${ticket.printTax()}</text></line>
|
||||
<line></line>
|
||||
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" length="16" bold="true">Total</text><text align ="right" length="92" bold="true">${ticket.printTotal()}</text></line>
|
||||
|
||||
<!-- #foreach ($taxinfo in $taxes) -->
|
||||
<!-- #set( $taxline = $ticket.getTaxLine($taxinfo)) -->
|
||||
<!-- <line> -->
|
||||
<!-- <text align ="left" length="18">${taxline.getTaxInfo()}</text> -->
|
||||
<!-- <text align ="right" length="12">${taxline.printSubTotal()}</text> -->
|
||||
<!-- <text align ="right" length="12">${taxline.printTax()}</text> -->
|
||||
<!-- </line> -->
|
||||
<!--#end -->
|
||||
|
||||
<line></line>
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line>
|
||||
<text align="center" length="105">${ticket.printTicketFooterLine1()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text>==========================================</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine2()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine3()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine4()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine5()}</text>
|
||||
</line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line>
|
||||
<text>${ticket.printTicketFooterLine6()}</text>
|
||||
</line>
|
||||
#end
|
||||
<line></line>
|
||||
<!-- <line><barcode type="CODE128">${ticket.printId()}</barcode></line> -->
|
||||
|
||||
</ticket>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<opendrawer/>
|
||||
#end
|
||||
#end
|
||||
|
||||
</output>
|
||||
@@ -0,0 +1,198 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!--
|
||||
The Administrator Role Permissions has full access to all uniCenta oPOS
|
||||
functionality.
|
||||
The Administrator Role should only be used to make system changes.
|
||||
|
||||
*** Do not change unless you know what you are doing ***
|
||||
-->
|
||||
|
||||
|
||||
<permissions>
|
||||
<class name="plugins.configure"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelCloseMoney"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelCloseMoneyReprint"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelPayments"/>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketEdits"/>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketSales"/>
|
||||
|
||||
<class name="payment.bank"/>
|
||||
<class name="payment.cash"/>
|
||||
<class name="payment.cheque"/>
|
||||
<class name="payment.debt"/>
|
||||
<class name="payment.free"/>
|
||||
<class name="payment.magcard"/>
|
||||
<class name="payment.slip"/>
|
||||
<class name="payment.voucher"/>
|
||||
<class name="refund.cash"/>
|
||||
<class name="refund.cheque"/>
|
||||
<class name="refund.magcard"/>
|
||||
<class name="refund.voucher"/>
|
||||
<class name="sales.ChangeTaxOptions"/>
|
||||
<class name="sales.DeleteLines"/>
|
||||
<class name="sales.DeleteTicket"/>
|
||||
<class name="sales.EditLines"/>
|
||||
<class name="sales.EditTicket"/>
|
||||
<class name="sales.Layout"/>
|
||||
<class name="sales.Override"/>
|
||||
<class name="sales.PrintRemote"/>
|
||||
<class name="sales.PrintTicket"/>
|
||||
<class name="sales.RefundTicket"/>
|
||||
<class name="sales.ShowList"/>
|
||||
<class name="sales.Total"/>
|
||||
<class name="sales.ViewSharedTicket"/>
|
||||
|
||||
<!-- Standard button scripts -->
|
||||
<class name="button.opendrawer"/>
|
||||
<class name="button.print"/>
|
||||
<class name="button.Totaldiscount"/>
|
||||
|
||||
<!-- Additional button scripts -->
|
||||
<class name="button.keyboard"/>
|
||||
<class name="button.Linediscount"/>
|
||||
<class name="button.refundit"/>
|
||||
<class name="button.scharge"/>
|
||||
<class name="button.sendorder"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuCustomers"/>
|
||||
<class name="com.unicenta.pos.customers.CustomersPanel"/>
|
||||
<class name="/com/unicenta/reports/customers.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_cards.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_debtors.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_diary.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_export.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_list.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_sales.bs"/>
|
||||
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuSuppliers"/>
|
||||
<class name="com.unicenta.pos.suppliers.SuppliersPanel"/>
|
||||
<class name="/com/unicenta/reports/suppliers.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_b.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_creditors.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_diary.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_export.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_list.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_products.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_sales.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuStockManagement"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributeSetsPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributeUsePanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributeValuesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AuxiliarPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.BundlePanel"/>
|
||||
<class name="com.unicenta.pos.inventory.CategoriesPanel"/>
|
||||
|
||||
<class name="com.unicenta.pos.inventory.ProductsPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.ProductsWarehousePanel"/>
|
||||
<class name="com.unicenta.pos.inventory.StockDiaryPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.StockManagement"/>
|
||||
<class name="com.unicenta.pos.inventory.TaxCategoriesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.TaxCustCategoriesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.TaxPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.UomPanel"/>
|
||||
|
||||
<class name="/com/unicenta/reports/inventory.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_b.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_broken.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_diary.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_diff.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_diffdetail.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_listdetail.bs"/>
|
||||
<class name="/com/unicenta/reports/labels_barcode_sheet.bs"/>
|
||||
<class name="/com/unicenta/reports/labels_barcode_shelfedge.bs"/> <class name="/com/unicenta/reports/productscatalog.bs"/>
|
||||
<class name="/com/unicenta/reports/labels_product.bs"/>
|
||||
<class name="/com/unicenta/reports/products.bs"/>
|
||||
<class name="/com/unicenta/reports/salecatalog.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuSalesManagement"/>
|
||||
<class name="/com/unicenta/reports/sales_cashflow.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_cashregisterlog.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_categorysales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_categorysales_1.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedpos.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedpos_1.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedproducts.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedproducts_1.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_extendedcashregisterlog.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_extproducts.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_payments.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_productsalesprofit.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_saletaxes.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_taxcatsales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_taxes.bs"/>
|
||||
|
||||
<class name="/com/unicenta/reports/sales_chart_piesalescat.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_productsales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_sales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_timeseriesproduct.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_top10.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuMaintenance"/>
|
||||
<class name="com.unicenta.pos.admin.PeoplePanel"/>
|
||||
<class name="com.unicenta.pos.admin.ResourcesPanel"/>
|
||||
<class name="com.unicenta.pos.admin.RolesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.LocationsPanel"/>
|
||||
<class name="com.unicenta.pos.mant.JPanelFloors"/>
|
||||
<class name="com.unicenta.pos.mant.JPanelPlaces"/>
|
||||
<class name="com.unicenta.pos.voucher.VoucherPanel"/>
|
||||
<class name="/com/unicenta/reports/customers_vouchers.bs"/>
|
||||
<class name="/com/unicenta/reports/users.bs"/>
|
||||
<class name="/com/unicenta/reports/users_nosales.bs"/>
|
||||
<class name="/com/unicenta/reports/users_sales.bs"/>
|
||||
<class name="/com/unicenta/reports/users_tips.bs"/>
|
||||
<class name="/com/unicenta/reports/users_voids.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.imports.JPanelCSV"/>
|
||||
<class name="com.unicenta.pos.imports.CustomerCSVImport"/>
|
||||
<class name="com.unicenta.pos.imports.JPanelCSVCleardb"/>
|
||||
<class name="com.unicenta.pos.imports.JPanelCSVImport"/>
|
||||
<class name="com.unicenta.pos.imports.StockQtyImport"/>
|
||||
<class name="com.unicenta.pos.transfer.Transfer"/>
|
||||
<class name="/com/unicenta/reports/tools_invalidcategory.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_invaliddata.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_inventoryqtyupdate.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_missingdata.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_newproducts.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_updatedprices.bs"/>
|
||||
// <class name="/com/unicenta/reports/tools_badprice.bs"/>
|
||||
|
||||
<!-- EPM -->
|
||||
<class name="com.unicenta.pos.forms.MenuEmployees" />
|
||||
<class name="com.unicenta.pos.epm.BreaksPanel" />
|
||||
<class name="com.unicenta.pos.epm.JPanelEmployeePresence" />
|
||||
<class name="com.unicenta.pos.epm.LeavesPanel" />
|
||||
<class name="/com/unicenta/reports/epm_dailypresence.bs" />
|
||||
<class name="/com/unicenta/reports/epm_dailyschedule.bs" />
|
||||
<class name="/com/unicenta/reports/epm_performance.bs" />
|
||||
|
||||
<!-- <class name="com.unicenta.possync.ProductsSyncCreate"/> -->
|
||||
<!-- <class name="com.unicenta.possync.OrdersSyncCreate"/> -->
|
||||
<class name="Menu.ChangePassword"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelPrinter"/>
|
||||
<class name="com.unicenta.pos.config.JPanelConfiguration"/>
|
||||
|
||||
</permissions>
|
||||
@@ -0,0 +1,82 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!--
|
||||
The Administrator Role Permissions has full access to all uniCenta oPOS
|
||||
functionality.
|
||||
The Administrator Role should only be used to make system changes.
|
||||
|
||||
*** Do not change unless you know what you are doing ***
|
||||
-->
|
||||
|
||||
|
||||
<permissions>
|
||||
<class name="com.unicenta.pos.customers.CustomersPayment"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelPayments"/>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketEdits"/>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketSales"/>
|
||||
|
||||
<class name="payment.cash"/>
|
||||
<class name="payment.cheque"/>
|
||||
<class name="payment.debt"/>
|
||||
<class name="payment.free"/>
|
||||
<class name="payment.magcard"/>
|
||||
<class name="payment.slip"/>
|
||||
<class name="payment.voucher"/>
|
||||
<class name="sales.DeleteLines"/>
|
||||
<class name="sales.EditLines"/>
|
||||
<class name="sales.EditTicket"/>
|
||||
<class name="sales.PrintRemote"/>
|
||||
<class name="sales.PrintTicket"/>
|
||||
<class name="sales.Total"/>
|
||||
<class name="sales.ViewSharedTicket"/>
|
||||
|
||||
<!-- Standard button scripts -->
|
||||
<class name="button.opendrawer"/>
|
||||
<class name="button.print"/>
|
||||
<class name="button.Totaldiscount"/>
|
||||
|
||||
<!-- Additional button scripts -->
|
||||
<class name="button.keyboard"/>
|
||||
<class name="button.Linediscount"/>
|
||||
<class name="button.scharge"/>
|
||||
<class name="button.sendorder"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuCustomers"/>
|
||||
<class name="com.unicenta.pos.customers.CustomersPanel"/>
|
||||
<class name="/com/unicenta/reports/customers.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_cards.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuSuppliers"/>
|
||||
<class name="com.unicenta.pos.suppliers.SuppliersPanel"/>
|
||||
<class name="/com/unicenta/reports/suppliers.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuMaintenance"/>
|
||||
<class name="com.unicenta.pos.voucher.VoucherPanel"/>
|
||||
|
||||
<!-- EPM -->
|
||||
<class name="com.unicenta.pos.forms.MenuEmployees" />
|
||||
<class name="Menu.ChangePassword"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelPrinter"/>
|
||||
<class name="com.unicenta.pos.config.JPanelConfiguration"/>
|
||||
|
||||
</permissions>
|
||||
@@ -0,0 +1,25 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
<permissions>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketSales"/>
|
||||
<class name="button.keyboard"/>
|
||||
</permissions>
|
||||
@@ -0,0 +1,198 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS.
|
||||
If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!--
|
||||
The Administrator Role Permissions has full access to all uniCenta oPOS
|
||||
functionality.
|
||||
The Administrator Role should only be used to make system changes.
|
||||
|
||||
*** Do not change unless you know what you are doing ***
|
||||
-->
|
||||
|
||||
|
||||
<permissions>
|
||||
<class name="com.unicenta.pos.customers.CustomersPayment"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelCloseMoney"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelCloseMoneyReprint"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelPayments"/>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketEdits"/>
|
||||
<class name="com.unicenta.pos.sales.JPanelTicketSales"/>
|
||||
|
||||
<class name="payment.bank"/>
|
||||
<class name="payment.cash"/>
|
||||
<class name="payment.cheque"/>
|
||||
<class name="payment.debt"/>
|
||||
<class name="payment.free"/>
|
||||
<class name="payment.magcard"/>
|
||||
<class name="payment.slip"/>
|
||||
<class name="payment.voucher"/>
|
||||
<class name="refund.cash"/>
|
||||
<class name="refund.cheque"/>
|
||||
<class name="refund.magcard"/>
|
||||
<class name="refund.voucher"/>
|
||||
<class name="sales.ChangeTaxOptions"/>
|
||||
<class name="sales.DeleteLines"/>
|
||||
<class name="sales.DeleteTicket"/>
|
||||
<class name="sales.EditLines"/>
|
||||
<class name="sales.EditTicket"/>
|
||||
<class name="sales.Layout"/>
|
||||
<class name="sales.Override"/>
|
||||
<class name="sales.PrintRemote"/>
|
||||
<class name="sales.PrintTicket"/>
|
||||
<class name="sales.RefundTicket"/>
|
||||
<class name="sales.ShowList"/>
|
||||
<class name="sales.Total"/>
|
||||
<class name="sales.ViewSharedTicket"/>
|
||||
|
||||
<!-- Standard button scripts -->
|
||||
<class name="button.opendrawer"/>
|
||||
<class name="button.print"/>
|
||||
<class name="button.Totaldiscount"/>
|
||||
|
||||
<!-- Additional button scripts -->
|
||||
<class name="button.keyboard"/>
|
||||
<class name="button.Linediscount"/>
|
||||
<class name="button.refundit"/>
|
||||
<class name="button.scharge"/>
|
||||
<class name="button.sendorder"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuCustomers"/>
|
||||
<class name="com.unicenta.pos.customers.CustomersPanel"/>
|
||||
<class name="/com/unicenta/reports/customers.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_cards.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_debtors.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_diary.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_export.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_list.bs"/>
|
||||
<class name="/com/unicenta/reports/customers_sales.bs"/>
|
||||
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuSuppliers"/>
|
||||
<class name="com.unicenta.pos.suppliers.SuppliersPanel"/>
|
||||
<class name="/com/unicenta/reports/suppliers.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_b.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_creditors.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_diary.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_export.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_list.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_products.bs"/>
|
||||
<class name="/com/unicenta/reports/suppliers_sales.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuStockManagement"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributeSetsPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributeUsePanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AttributeValuesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.AuxiliarPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.BundlePanel"/>
|
||||
<class name="com.unicenta.pos.inventory.CategoriesPanel"/>
|
||||
|
||||
<class name="com.unicenta.pos.inventory.ProductsPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.ProductsWarehousePanel"/>
|
||||
<class name="com.unicenta.pos.inventory.StockDiaryPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.StockManagement"/>
|
||||
<class name="com.unicenta.pos.inventory.TaxCategoriesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.TaxCustCategoriesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.TaxPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.UomPanel"/>
|
||||
|
||||
<class name="/com/unicenta/reports/inventory.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_b.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_broken.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_diary.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_diff.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_diffdetail.bs"/>
|
||||
<class name="/com/unicenta/reports/inventory_listdetail.bs"/>
|
||||
<class name="/com/unicenta/reports/labels_barcode_sheet.bs"/>
|
||||
<class name="/com/unicenta/reports/labels_barcode_shelfedge.bs"/> <class name="/com/unicenta/reports/productscatalog.bs"/>
|
||||
<class name="/com/unicenta/reports/labels_product.bs"/>
|
||||
<class name="/com/unicenta/reports/products.bs"/>
|
||||
<class name="/com/unicenta/reports/salecatalog.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuSalesManagement"/>
|
||||
<class name="/com/unicenta/reports/sales_cashflow.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_cashregisterlog.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_categorysales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_categorysales_1.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedpos.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedpos_1.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedproducts.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_closedproducts_1.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_extendedcashregisterlog.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_extproducts.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_payments.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_productsalesprofit.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_saletaxes.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_taxcatsales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_taxes.bs"/>
|
||||
|
||||
<class name="/com/unicenta/reports/sales_chart_piesalescat.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_productsales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_sales.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_timeseriesproduct.bs"/>
|
||||
<class name="/com/unicenta/reports/sales_chart_top10.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.forms.MenuMaintenance"/>
|
||||
<class name="com.unicenta.pos.admin.PeoplePanel"/>
|
||||
<class name="com.unicenta.pos.admin.ResourcesPanel"/>
|
||||
<class name="com.unicenta.pos.admin.RolesPanel"/>
|
||||
<class name="com.unicenta.pos.inventory.LocationsPanel"/>
|
||||
<class name="com.unicenta.pos.mant.JPanelFloors"/>
|
||||
<class name="com.unicenta.pos.mant.JPanelPlaces"/>
|
||||
<class name="com.unicenta.pos.voucher.VoucherPanel"/>
|
||||
<class name="/com/unicenta/reports/customers_vouchers.bs"/>
|
||||
<class name="/com/unicenta/reports/users.bs"/>
|
||||
<class name="/com/unicenta/reports/users_nosales.bs"/>
|
||||
<class name="/com/unicenta/reports/users_sales.bs"/>
|
||||
<class name="/com/unicenta/reports/users_tips.bs"/>
|
||||
<class name="/com/unicenta/reports/users_voids.bs"/>
|
||||
|
||||
<class name="com.unicenta.pos.imports.JPanelCSV"/>
|
||||
<class name="com.unicenta.pos.imports.CustomerCSVImport"/>
|
||||
<class name="com.unicenta.pos.imports.JPanelCSVCleardb"/>
|
||||
<class name="com.unicenta.pos.imports.JPanelCSVImport"/>
|
||||
<class name="com.unicenta.pos.imports.StockQtyImport"/>
|
||||
<class name="com.unicenta.pos.transfer.Transfer"/>
|
||||
<class name="/com/unicenta/reports/tools_invalidcategory.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_invaliddata.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_inventoryqtyupdate.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_missingdata.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_newproducts.bs"/>
|
||||
<class name="/com/unicenta/reports/tools_updatedprices.bs"/>
|
||||
// <class name="/com/unicenta/reports/tools_badprice.bs"/>
|
||||
|
||||
<!-- EPM -->
|
||||
<class name="com.unicenta.pos.forms.MenuEmployees" />
|
||||
<class name="com.unicenta.pos.epm.BreaksPanel" />
|
||||
<class name="com.unicenta.pos.epm.JPanelEmployeePresence" />
|
||||
<class name="com.unicenta.pos.epm.LeavesPanel" />
|
||||
<class name="/com/unicenta/reports/epm_dailypresence.bs" />
|
||||
<class name="/com/unicenta/reports/epm_dailyschedule.bs" />
|
||||
<class name="/com/unicenta/reports/epm_performance.bs" />
|
||||
|
||||
<!-- <class name="com.unicenta.possync.ProductsSyncCreate"/> -->
|
||||
<!-- <class name="com.unicenta.possync.OrdersSyncCreate"/> -->
|
||||
<class name="Menu.ChangePassword"/>
|
||||
<class name="com.unicenta.pos.panels.JPanelPrinter"/>
|
||||
<class name="com.unicenta.pos.config.JPanelConfiguration"/>
|
||||
|
||||
</permissions>
|
||||
@@ -0,0 +1,121 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!-- To ENABLE a feature remove the beginning and end of line commentors -->
|
||||
<!-- To DISABLE a feature you must add the beginning and of line commentors -->
|
||||
|
||||
<configuration>
|
||||
<!-- Sales Ticket Button Bar - Show icons **************************************** -->
|
||||
|
||||
<!-- SET Sales Ticket Refund Item (Default=DISABLED) -->
|
||||
<!-- <button key="button.refundit" image="img.refundit" code="script.Refundit"/> -->
|
||||
|
||||
<!-- SET Sales Ticket ServiceCharge (Default=DISABLED) -->
|
||||
<!-- <button key="button.scharge" image="img.heart" code="script.ServiceCharge"/> -->
|
||||
|
||||
<!-- SET Sales line Note (Default=DISABLED) -->
|
||||
<!-- <button key="button.note" image="img.refundit" code="script.addlinenote"/> -->
|
||||
|
||||
<!-- SET Line or Total Discount (Default=TotalDiscount= ENABLED) -->
|
||||
<button key="button.Totaldiscount" image="img.discount" code="script.Totaldiscount"/>
|
||||
<button key="button.Linediscount" image="img.discount_b" code="script.Linediscount"/>
|
||||
|
||||
<!-- SET Waiter's name (Default=DISABLED) -->
|
||||
<!-- <button key="button.setperson" image="img.user" code="script.SetPerson"/> -->
|
||||
|
||||
<!-- SET Remote Printer (Default=DISABLED) -->
|
||||
<!-- <button key="button.sendorder" image="img.kit_print" code="script.SendOrder"/> -->
|
||||
|
||||
<!-- SET Ticket Print Preview (Default=ENABLED) -->
|
||||
<button key="button.print" image="img.ticket_print" template="Printer.TicketPreview"/>
|
||||
|
||||
<!-- SET Open Cashdrawer (Default=ENABLED) -->
|
||||
<button key="button.opendrawer" image="img.cashdrawer" template="Printer.OpenDrawer"/>
|
||||
<!-- SET Virtual Keyboard (Default=ENABLED) -->
|
||||
<button key="button.keyboard" image="img.keyboard_48" code="script.Keyboard"/>
|
||||
|
||||
<!-- END Sales Ticket Button Bar - Show icons -->
|
||||
|
||||
<!-- SET Ticket Button Bar - Text Only ****************************************************************** -->
|
||||
<!-- <button key="button.refundit" name="button.refundit" code="script.Refundit"/> -->
|
||||
<!-- <button key="button.Linediscount" name="button.Linediscount" code="script.Linediscount"/> -->
|
||||
<!-- <button key="button.Totaldiscount" name="button.Totaldiscount" code="script.Totaldiscount"/> -->
|
||||
<!-- <button key="button.setperson" name="button.setperson" code="script.SetPerson"/> -->
|
||||
<!-- <button key="button.sendorder" name="button.sendorder" code="script.SendOrder"/> -->
|
||||
<!-- <button key="button.print" titlekey="button.print" template="Printer.TicketPreview"/> -->
|
||||
<!-- <button key="button.opendrawer" titlekey="button.opendrawer" template="Printer.OpenDrawer"/> -->
|
||||
<!-- <button key="button.keyboard" titlekey="button.keyboard" template="script.Keyboard"/> -->
|
||||
<!-- END Ticket Button Bar - Text Only -->
|
||||
|
||||
<!-- SET Product Area Size ********************************************* -->
|
||||
<!-- Maximum Category height for 800x480 for PDA in Full Screen mode -->
|
||||
<!-- <cat-height value="100" /> -->
|
||||
|
||||
<!-- Maximum Category height for 800x600 -->
|
||||
<!-- <cat-height value="155" /> -->
|
||||
|
||||
<!-- Maximum Category height for 1024x768 in Full Screen mode (Default=ENABLED) -->
|
||||
<cat-height value="320" />
|
||||
|
||||
<!-- Maximum Category height for 1280x1024 in Full Screen mode -->
|
||||
<!-- <cat-height value="640" /> -->
|
||||
<!-- END Product Area Size -->
|
||||
|
||||
<!-- SET Product Button Sizes ****************************************** -->
|
||||
<!-- Small Product button size in Sales screen (Default=DISABLED) -->
|
||||
<!-- <img-width value="64"/> -->
|
||||
<!-- <img-height value="48"/> -->
|
||||
|
||||
<!-- Medium Product button size in Sales screen (Default=ENABLED) -->
|
||||
<img-width value="107"/>
|
||||
<img-height value="60"/>
|
||||
|
||||
<!-- Large Product button size in Sales screen (Default=DISABLED)-->
|
||||
<!-- <img-width value="128"/> -->
|
||||
<!-- <img-height value="96"/> -->
|
||||
<!-- END Product Button Size -->
|
||||
|
||||
<!-- Print Receipt (Default=ENABLED) -->
|
||||
<printselected value="true"/>
|
||||
|
||||
<!-- ADDITIONAL FEATURES ************************************************* -->
|
||||
<!-- SET Show Change in Cash Sale (Default=ENABLED -->
|
||||
<event key="ticket.close" code="Ticket.Close"/>
|
||||
<event key="cash.close" code="Cash.Close"/>
|
||||
|
||||
<!-- Execute your own scripts by EVENTS triggered by Sales Screen -->
|
||||
<!-- <event key="ticket.change" code="script.multibuy"/> Discount 2 different products -->
|
||||
<!-- <event key="ticket.change" code="script.YourChangeScript"/> after a ticketline is changed -->
|
||||
<!-- <event key="ticket.addline" code="script.YourAddLineScript"/> before a ticketline is added -->
|
||||
<!-- <event key="ticket.setline" code="script.YourSetLineScript"/> before an exisitng ticketline is changed -->
|
||||
<!-- <event key="ticket.removeline" code="script.YourRemoveLineScript"/> before a ticketline is deleted -->
|
||||
<!-- <event key="ticket.show" code="script.YourShowScript"/> before the receipt is shown -->
|
||||
<!-- <event key="ticket.total" code="script.YourTotalScript"/> after the equals button -->
|
||||
<!-- <event key="ticket.save" code="script.YourSaveScript"/> after payment OK button -->
|
||||
<!-- <event key="ticket.close" code="script.YourCloseScript"/> after ticket is stored in database and ticket number assigned -->
|
||||
|
||||
|
||||
<taxesincluded value="true"/>
|
||||
<taxcategoryid value="001"/>
|
||||
<pricevisible value="true" />
|
||||
|
||||
</configuration>
|
||||
@@ -0,0 +1,59 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
// Ticket.Close
|
||||
// This script displays the amount of Cash Change (CashTendered - TicketValue) to be given to Customer
|
||||
|
||||
import java.awt.Font;
|
||||
import javax.swing.plaf.FontUIResource;
|
||||
import com.unicenta.pos.payment.PaymentInfo;
|
||||
import javax.swing.JOptionPane;
|
||||
import javax.swing.JDialog;
|
||||
|
||||
|
||||
boolean isCash = false;
|
||||
String change = "";
|
||||
PaymentInfo p = ticket.payments.getFirst();
|
||||
|
||||
if ("cash".equals(p.getName())) {
|
||||
isCash = true;
|
||||
change = p.printChange();
|
||||
}
|
||||
|
||||
// Get details of the original font before we change it otherwise all dialogboxes will use new settings
|
||||
JOptionPane pane = new JOptionPane();
|
||||
Font originalFont=pane.getFont();
|
||||
|
||||
UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font("ARIAL",Font.PLAIN,20)));
|
||||
message = "Change: " + change;
|
||||
JLabel FontText = new JLabel(message);
|
||||
FontText.setFont (new Font ( "Arial", Font.BOLD, 36) );
|
||||
|
||||
if(isCash) {
|
||||
JOptionPane pane = new JOptionPane();
|
||||
pane.setMessage(FontText);
|
||||
pane.setPreferredSize( new Dimension(450,150));
|
||||
JDialog dialog = pane.createDialog("Cash payment");
|
||||
new Thread(new Runnable() { void run() {
|
||||
dialog.show();
|
||||
} }).start();
|
||||
}
|
||||
|
||||
// Return to default settings
|
||||
UIManager.put("OptionPane.buttonFont", new FontUIResource(new Font(originalFont.getName(),originalFont.getStyle(),originalFont.getSize())));
|
||||
@@ -0,0 +1,56 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<!-- This sales transaction screen is great for Retailers! -->
|
||||
<line>
|
||||
<column name="label.item" width="185" align="left" value="<html>
|
||||
#if ($ticketline.isProductCom()) <i>*&nbsp;&nbsp;
|
||||
${ticketline.printName()}</i>
|
||||
#else
|
||||
${ticketline.printName()}
|
||||
#end
|
||||
<br>${ticketline.getProductAttSetInstDesc()}"/>
|
||||
|
||||
<column name="label.price" width="50" align="right" value="${ticketline.printPrice()}"/>
|
||||
<column name="label.units" width="50" align="right" value="x${ticketline.printMultiply()}"/>
|
||||
<column name="label.tax" width="50" align="right" value="${ticketline.printTaxRate()}"/>
|
||||
<column name="label.value" width="100" align="right" value="${ticketline.printValue()}"/>
|
||||
<column name="label.printto" width="5" align="center" value="${ticketline.printPrinter()}"/>
|
||||
<!--<column name="label.sendorder" width="5" align="left" value="${ticketline.getProperty('printkb','?')}"/> -->
|
||||
<!--<column name="label.sendstatus" width="5" align="left" value="${ticketline.getProperty('sendstatus','?')}"/> -->
|
||||
</line>
|
||||
|
||||
<!-- This sales transaction screen is great for Hospitality!
|
||||
<line>
|
||||
<column name="label.item2" width="235" align="left" value="<html>
|
||||
#if ($ticketline.isProductCom())
|
||||
<i>*&nbsp;&nbsp;${ticketline.printName()}</i>
|
||||
#else
|
||||
${ticketline.printName()}
|
||||
#end
|
||||
<br>${ticketline.getProductAttSetInstDesc()}"/>
|
||||
|
||||
<column name="label.units2" width="50" align="right" value="x${ticketline.printMultiply()}"/>
|
||||
<column name="label.value2" width="100" align="right" value="${ticketline.printValue()}"/>
|
||||
<column name="label.printto" width="5" align="center" value="${ticketline.printPrinter()}"/>
|
||||
</line>
|
||||
-->
|
||||
@@ -0,0 +1,34 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!--
|
||||
uniCenta oPOS - Touch friendly Point Of Sale
|
||||
Copyright (c) 2009-2018 uniCenta.
|
||||
http://sourceforge.net/projects/unicentaopos
|
||||
|
||||
This file is part of uniCenta oPOS.
|
||||
|
||||
uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
-->
|
||||
|
||||
<line>
|
||||
<column name="label.item" width="125" align="left" value="<html>
|
||||
#if ($ticketline.isProductCom())
|
||||
<i>*&nbsp;&nbsp;${ticketline.printName()}</i>
|
||||
#else ${ticketline.printName()}
|
||||
|
||||
#end"/>
|
||||
<column name="label.price" width="80" align="right" value="${ticketline.printPriceTax()}"/>
|
||||
<column name="label.units" width="50" align="right" value="x${ticketline.printMultiply()}"/>
|
||||
<column name="label.tax" width="100" align="right" value="${ticketline.printTaxRate()}"/>
|
||||
<column name="label.value" width="80" align="right" value="${ticketline.printValue()}"/>
|
||||
</line>
|
||||
@@ -0,0 +1 @@
|
||||
uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
@@ -0,0 +1,27 @@
|
||||
// Customer.Created
|
||||
// This script initialises the uniCenta posApps CUSTOMER CREATED
|
||||
// REST API web services
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
|
||||
import uk.co.pos_apps.PosApps;
|
||||
|
||||
PosApps.createCustomer(device, customer);
|
||||
@@ -0,0 +1,27 @@
|
||||
// Customer.Deleted
|
||||
// This script initialises the uniCenta posApps CUSTOMER DELETED
|
||||
// REST API web services
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
|
||||
import uk.co.pos_apps.PosApps;
|
||||
|
||||
PosApps.deleteCustomer(device, customer);
|
||||
@@ -0,0 +1,27 @@
|
||||
// Customer.Updated
|
||||
// This script initialises the uniCenta posApps CUSTOMER UPDATED
|
||||
// REST API web services
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
|
||||
import uk.co.pos_apps.PosApps;
|
||||
|
||||
PosApps.updateCustomer(device, customer);
|
||||
@@ -0,0 +1,41 @@
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// *************************************************************************
|
||||
|
||||
// *************************************************************************
|
||||
// All currency payment denominations to show in Payment forms
|
||||
// You can find additional prepared currency styles in the Configs folder of
|
||||
// uniCenta oPOS install folder. Use the Import button to load
|
||||
//
|
||||
// To INCLUDE a denomination remove "//" from the line
|
||||
// To EXCLUDE a denomination add "//" to the line
|
||||
// *************************************************************************
|
||||
|
||||
payment.addButton("img.50", 50.0);
|
||||
payment.addButton("img.20", 20.0);
|
||||
payment.addButton("img.10", 10.0);
|
||||
payment.addButton("img.5", 5.0);
|
||||
payment.addButton("img.2", 2.0);
|
||||
payment.addButton("img.1", 1.00);
|
||||
payment.addButton("img.050", 0.50);
|
||||
payment.addButton("img.020", 0.20);
|
||||
payment.addButton("img.010", 0.10);
|
||||
payment.addButton("img.005", 0.05);
|
||||
payment.addButton("img.002", 0.02);
|
||||
payment.addButton("img.001", 0.01);
|
||||
@@ -0,0 +1,29 @@
|
||||
// script.Keyboard.txt
|
||||
// This script launches uniCenta Virtual Keyboard
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
|
||||
Runtime runtime = Runtime.getRuntime();
|
||||
// Windows
|
||||
Process proc = runtime.getRuntime() .exec("cmd /C start osk.exe");
|
||||
|
||||
// Ubuntu
|
||||
// Process proc = runtime.getRuntime() .exec("onboard");
|
||||
@@ -0,0 +1,51 @@
|
||||
// script.Linediscount
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
// This script applies UsersInput %Discount for the Item Line value
|
||||
// To use in the sales screen: Highlight the line you want to discount
|
||||
// Then Tap in the %Discount amount and touch the % button
|
||||
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.ticket.TicketLineInfo;
|
||||
import com.unicenta.pos.ticket.TicketProductInfo;
|
||||
|
||||
discountrate = sales.getInputValue() / 100.0;
|
||||
|
||||
index = sales.getSelectedIndex();
|
||||
if (index >= 0) {
|
||||
line = ticket.getLine(index);
|
||||
if (line.getPrice() > 0.0 && discountrate > 0.0) {
|
||||
sdiscount = Formats.PERCENT.formatValue(discountrate);
|
||||
ticket.insertLine(index + 1,
|
||||
new TicketLineInfo(
|
||||
"Line Discount " + sdiscount,
|
||||
line.getProductTaxCategoryID(),
|
||||
line.getProductPrinter(),
|
||||
line.getMultiply(),
|
||||
-(double)Math.abs(line.getNewPrice() * discountrate * 100) / 100,
|
||||
line.getTaxInfo()));
|
||||
sales.setSelectedIndex(index + 1);
|
||||
} else {
|
||||
java.awt.Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
} else {
|
||||
java.awt.Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
// script.SendOrder
|
||||
// Sends an item in a Sale to a remote Printers
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
|
||||
private boolean printedP1 = false;
|
||||
private boolean printedP2 = false;
|
||||
private boolean printedP3 = false;
|
||||
private boolean printedP4 = false;
|
||||
private boolean printedP5 = false;
|
||||
private boolean printedP6 = false;
|
||||
|
||||
for(int i= 0; i < ticket.getLinesCount(); i++){
|
||||
line = ticket.getLine(i);
|
||||
|
||||
if (line.getProperty("product.printer")!=null) {
|
||||
|
||||
if (line.getProperty("product.printer").equals("1")) {
|
||||
if((printedP1 == false) && line.getProperty("ticket.updated").equals("true")) {
|
||||
sales.printTicket("Printer.Ticket.P1");
|
||||
printedP1 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (line.getProperty("product.printer").equals("2")) {
|
||||
if((printedP2 == false) && line.getProperty("ticket.updated").equals("true")){
|
||||
sales.printTicket("Printer.Ticket.P2");
|
||||
printedP2 = true;
|
||||
}
|
||||
}
|
||||
if (line.getProperty("product.printer").equals("3")) {
|
||||
if((printedP3 == false) && line.getProperty("ticket.updated").equals("true")){
|
||||
sales.printTicket("Printer.Ticket.P3");
|
||||
printedP3 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (line.getProperty("product.printer").equals("4")) {
|
||||
if((printedP4 == false) && line.getProperty("ticket.updated").equals("true")){
|
||||
sales.printTicket("Printer.Ticket.P4");
|
||||
printedP4 = true;
|
||||
}
|
||||
}
|
||||
if (line.getProperty("product.printer").equals("5")) {
|
||||
if((printedP5 == false) && line.getProperty("ticket.updated").equals("true")){
|
||||
sales.printTicket("Printer.Ticket.P5");
|
||||
printedP5 = true;
|
||||
}
|
||||
}
|
||||
|
||||
if (line.getProperty("product.printer").equals("6")) {
|
||||
if((printedP6 == false) && line.getProperty("ticket.updated").equals("true")){
|
||||
sales.printTicket("Printer.Ticket.P6");
|
||||
printedP6 = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,54 @@
|
||||
// script.Totaldiscount
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright (c) 2009-2018 uniCenta
|
||||
// http://sourceforge.net/projects/unicentaopos
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
// This script applies UsersInput %Discount for the Total Ticket
|
||||
// each Line value is recalculated and annotated
|
||||
// To use in the sales screen: Highlight the line you want to discount
|
||||
// Then Tap in the %Discount amount and touch the % button
|
||||
|
||||
import com.unicenta.format.Formats;
|
||||
import com.unicenta.pos.ticket.TicketLineInfo;
|
||||
import com.unicenta.pos.ticket.TicketProductInfo;
|
||||
|
||||
discountrate = sales.getInputValue() / 100.0;
|
||||
|
||||
index = sales.getSelectedIndex();
|
||||
if (index >= 0) {
|
||||
if (ticket.getTotal() > 0.0 && discountrate > 0.0) {
|
||||
sdiscount = Formats.PERCENT.formatValue((discountrate));
|
||||
for (int number= 0; number < ticket.getLinesCount(); number++) {
|
||||
line = ticket.getLine(number);
|
||||
ticket.setLine(number,
|
||||
new TicketLineInfo(
|
||||
line.getProductID(),
|
||||
line.getProductName() + " - Item Discount @ " + sdiscount,
|
||||
line.getProductTaxCategoryID(),
|
||||
line.getProductPrinter(),
|
||||
line.getMultiply(),
|
||||
line.getNewPrice() - (double)Math.abs(line.getNewPrice() * discountrate * 100) /100,
|
||||
line.getTaxInfo()));
|
||||
}
|
||||
} else {
|
||||
java.awt.Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
} else {
|
||||
java.awt.Toolkit.getDefaultToolkit().beep();
|
||||
}
|
||||
@@ -0,0 +1,82 @@
|
||||
//
|
||||
// uniCenta oPOS - Touch Friendly Point Of Sale
|
||||
// Copyright © 2009-2020 uniCenta
|
||||
//
|
||||
// This file is part of uniCenta oPOS.
|
||||
//
|
||||
// uniCenta oPOS is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// uniCenta oPOS is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with uniCenta oPOS. If not, see <http://www.gnu.org/licenses/>.
|
||||
// **************************************************************************
|
||||
|
||||
import com.unicenta.pos.ticket.TicketLineInfo;
|
||||
|
||||
index = sales.getSelectedIndex();
|
||||
if (index != -1)
|
||||
|
||||
{
|
||||
line = ticket.getLine(index);
|
||||
int count = Integer.parseInt(line.getProperty("COUNT", "0"));
|
||||
Double newPrice1 = new Double(line.getProperty("PRICE", "0"));
|
||||
String groupName = line.getProperty("GROUP", "0");
|
||||
if (count > 0) {
|
||||
int productCount = 0;
|
||||
int discountsAlreadyApplied = 0;
|
||||
String productID = line.getProductID();
|
||||
|
||||
for (TicketLineInfo ticketLine: ticket.getLines()) {
|
||||
boolean grouped = groupName.equals(ticketLine.getProperty("GROUP", "0"));
|
||||
boolean multi = count > 0;
|
||||
if (multi && grouped) {
|
||||
productCount++;
|
||||
}
|
||||
if (ticketLine.getProductName().contains("Buy")) {
|
||||
discountsAlreadyApplied = discountsAlreadyApplied + count;
|
||||
}
|
||||
}
|
||||
|
||||
if (count == (productCount - discountsAlreadyApplied)) {
|
||||
|
||||
newPrice2 = -(line.getPriceTax() * count) + newPrice1;
|
||||
|
||||
|
||||
ticket.insertLine(ticket.getLinesCount(),
|
||||
new TicketLineInfo(
|
||||
"Buy " + count + " for £" + (line.getProperty("PRICE")),ox
|
||||
line.getProductTaxCategoryID(),
|
||||
"",
|
||||
1,
|
||||
0,
|
||||
line.getTaxInfo()));
|
||||
|
||||
|
||||
sales.setSelectedIndex(ticket.getLinesCount() - 1);
|
||||
index = sales.getSelectedIndex();
|
||||
line = ticket.getLine(index);
|
||||
line.setPriceTax(newPrice2);
|
||||
sales.setSelectedIndex(ticket.getLinesCount() - 2);
|
||||
|
||||
|
||||
|
||||
/* Remove BOGO property to start fresh */
|
||||
for (i = 0; i < ticket.getLinesCount(); i++) {
|
||||
if (productID.equals(ticket.getLine(i).getProductID())) {
|
||||
ticket.getLine(i).setProperty("COUNT", "0");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sales.setSelectedIndex(ticket.getLinesCount() - 1);
|
||||
}
|
||||
}
|
||||
//END MULTI BUY
|
||||
@@ -0,0 +1,208 @@
|
||||
#set ( $leftm= " " ) ## Uses spaces to set the LEFT margin - 10 is default for A4
|
||||
#set ( $len= 'length="130"' ) ## Sets the line LENGTH - 130 is default for A4
|
||||
|
||||
<ticket>
|
||||
<image>Printer.Ticket.Logo</image>
|
||||
<line size="1"><text align="center" $len>$leftm Printer.TicketPreview_A4</text></line>
|
||||
<line></line>
|
||||
|
||||
<line>
|
||||
#if (${ticket.ticketType} == 0)
|
||||
<text align="left" length="40">$leftm Receipt: ${ticket.printId()}</text>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<text align="right" length="90">$leftm ${ticket.printTicketHeaderLine1()}</text>
|
||||
#end
|
||||
#end
|
||||
#if (${ticket.ticketType} == 1)
|
||||
<text align="left" length="40">$leftm Refund: ${ticket.printId()}</text>
|
||||
#if (${ticket.printTicketHeaderLine1()} != "")
|
||||
<text align="right" length="90">$leftm ${ticket.printTicketHeaderLine1()}</text>
|
||||
#end
|
||||
#end
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="20">$leftm Date: </text><text length="20">${ticket.printDate()}</text>
|
||||
#if (${ticket.printTicketHeaderLine2()} != "")
|
||||
<text align="right" length="90">$leftm ${ticket.printTicketHeaderLine2()}</text>
|
||||
#end
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="20">$leftm Terminal: </text><text length="20">${ticket.getHost()}</text>
|
||||
#if (${ticket.printTicketHeaderLine3()} != "")
|
||||
<text align="right" length="90">$leftm ${ticket.printTicketHeaderLine3()}</text>
|
||||
#end
|
||||
</line>
|
||||
<line>
|
||||
<text align="left" length="20">$leftm Server: </text><text length="20">${ticket.printUser()}</text>
|
||||
#if (${ticket.printTicketHeaderLine4()} != "")
|
||||
<text align="right" length="90">${ticket.printTicketHeaderLine4()}</text>
|
||||
#end
|
||||
</line>
|
||||
<line>
|
||||
#if (${tickettext.place} != ${place})
|
||||
<text align="left" length="20">$leftm Table:</text><text length="20">${place}</text>
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<text align="right" length="90">${ticket.printTicketHeaderLine5()}</text>
|
||||
#end
|
||||
#else
|
||||
#if (${ticket.printTicketHeaderLine5()} != "")
|
||||
<text align="right" $len>${ticket.printTicketHeaderLine5()}</text>
|
||||
#end
|
||||
#end
|
||||
</line>
|
||||
<line>
|
||||
#if (${ticket.printTicketHeaderLine6()} != "")
|
||||
<text align="right" $len>${ticket.printTicketHeaderLine6()}</text>
|
||||
#end
|
||||
</line>
|
||||
|
||||
#if ($ticket.getCustomer())
|
||||
<line><text align="left">$leftm Account #: </text><text>${ticket.getCustomer().printTaxCustomerID()}</text></line>
|
||||
<line><text align="left">$leftm Customer: </text><text>${ticket.getCustomer().printName()}</text></line>
|
||||
<line><text align="left">$leftm Address: </text><text>${ticket.getCustomer().printAddress()}</text></line>
|
||||
<line><text align="left">$leftm Postal: </text><text>${ticket.getCustomer().printPostal()}</text></line>
|
||||
<line><text align="left">$leftm Phone: </text><text>${ticket.getCustomer().printPhone1()}</text></line>
|
||||
<line><text align="left">$leftm Current Debt: </text><text>${ticket.getCustomer().printCurDebt()}</text></line>
|
||||
#end
|
||||
|
||||
<line></line>
|
||||
<line><text align="left" $len>$leftm ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text></line>
|
||||
<line>
|
||||
<text align ="left" length="20" bold="true">$leftm REFERENCE</text>
|
||||
<text align ="left" length="74" bold="true">$leftm ITEM</text>
|
||||
<text align ="right" length="10" bold="true">PRICE</text>
|
||||
<text align ="right" length="10" bold="true">QTY</text>
|
||||
<text align ="right" bold="true">$leftm VALUE</text>
|
||||
</line>
|
||||
<line><text align="left" $len>$leftm ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text></line>
|
||||
|
||||
#foreach ($ticketline in $ticket.getLines())
|
||||
<line>
|
||||
#if ($ticketline.isProductCom())
|
||||
<text align ="left" length="20">$leftm ★${ticketline.printReference()}</text>
|
||||
<text align ="left" length="74">$leftm ${ticketline.printName()}</text>
|
||||
#else
|
||||
<text align ="left" length="20">$leftm ${ticketline.printReference()}</text>
|
||||
<text align ="left" length="74">$leftm ${ticketline.printName()}</text>
|
||||
#end
|
||||
|
||||
<text align ="right" length="11">${ticketline.printPriceTax()}</text>
|
||||
<text align ="right" length="10">${ticketline.printMultiply()}</text>
|
||||
<text align ="right" length="15">${ticketline.printValue()}</text>
|
||||
</line>
|
||||
|
||||
#if ($ticketline.productAttSetInstId)
|
||||
<line><text align ="left" length="74">$leftm $leftm ★★ ${ticketline.productAttSetInstDesc}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
<line><text align="left" $len>$leftm ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text></line>
|
||||
<line><text>$leftm Items count: </text><text align ="left" length="15">${ticket.printArticlesCount()}</text></line>
|
||||
<line></line>
|
||||
<line>
|
||||
<text align="right" length="115">$leftm Subtotal</text>
|
||||
<text align ="right" length="15">${ticket.printSubTotal()}</text>
|
||||
</line>
|
||||
<line>
|
||||
<text align ="right" length="115">$leftm Tax</text>
|
||||
<text align ="right" length="15">${ticket.printTax()}</text>
|
||||
</line>
|
||||
<line><text align="right" $len>$leftm ───────────────</text></line>
|
||||
<line></line>
|
||||
<line size="1">
|
||||
<text align ="right" length="115" bold="true">$leftm Balance Due</text>
|
||||
<text align ="right" length="15" bold="true">${ticket.printTotal()}</text>
|
||||
</line>
|
||||
<line><text align="right" $len>$leftm ═══════════════</text></line>
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "cash")
|
||||
<line><text bold="true">$leftm Cash</text></line>
|
||||
<line><text align="left" length="22">$leftm Tendered:</text><text align ="right" length="20">${paymentline.printPaid()}</text></line>
|
||||
<line><text align="left" length="22">$leftm Change:</text><text align ="right" length="20">${paymentline.printChange()}</text></line>
|
||||
#end
|
||||
|
||||
#if ($paymentline.name == "cashrefund")
|
||||
<line><text align="left" length="22" bold="true">$leftm Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "cheque")
|
||||
<line><text align="left" length="22" bold="true">$leftm Cheque</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "chequerefund")
|
||||
<line><text align="left" length="22" bold="true">$leftm Cheque Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherin")
|
||||
<line><text align="left" length="22" bold="true">$leftm Voucher</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "voucherout")
|
||||
<line><text align="left" length="22" bold="true">$leftm Note Refund</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "slip")
|
||||
<line><text align="left" length="22" bold="true">$leftm Slip</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "free")
|
||||
<line><text align="left" length="22" bold="true">$leftm Free</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($paymentline.name == "debt")
|
||||
<line><text align="left" length="22" bold="true">$leftm On Account</text><text align ="right" length="20">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
|
||||
#if (${ticket.printTicketFooterLine1()} != "")
|
||||
<line></line>
|
||||
<line><text align="center" $len>$leftm ${ticket.printTicketFooterLine1()}</text></line>
|
||||
<line><text align="left" $len>$leftm ──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine2()} != "")
|
||||
<line><text>$leftm ${ticket.printTicketFooterLine2()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine3()} != "")
|
||||
<line><text>$leftm ${ticket.printTicketFooterLine3()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine4()} != "")
|
||||
<line><text>$leftm ${ticket.printTicketFooterLine4()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine5()} != "")
|
||||
<line><text>$leftm ${ticket.printTicketFooterLine5()}</text></line>
|
||||
#end
|
||||
#if (${ticket.printTicketFooterLine6()} != "")
|
||||
<line><text>$leftm ${ticket.printTicketFooterLine6()}</text></line>
|
||||
#end
|
||||
<line></line>
|
||||
|
||||
#foreach ($paymentline in $ticket.payments)
|
||||
#if ($paymentline.name == "ccard")
|
||||
#if ($paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" $len bold="true">$leftm CARD SALE</text></line>
|
||||
<line><text align = "center" $len bold="true">$leftm A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left">$leftm AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if (!$paymentline.chipAndPin)
|
||||
<line size="1"><text align="center" $len bold="true">$leftm CARD SALE</text></line>
|
||||
<line><text align = "center" $len bold="true">$leftm A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left">$leftm AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#if ($ticket.hasTip())
|
||||
<line><text align ="left">$leftm Tip: </text><text align ="right" length="26">_______________</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" bold="false">$leftm Total </text><text align ="right" length="26" bold="false">_______________</text></line>
|
||||
<line></line>
|
||||
<line></line>
|
||||
<line size="1"><text align ="left" bold="false">$leftm __________________________________________</text></line>
|
||||
<line size="1"><text align ="center" bold="false">$leftm Signature</text></line>
|
||||
#else
|
||||
<line size="1"><text align ="left" bold="true">$leftm Total</text><text align ="right" length="26" bold="true">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
#if ($paymentline.name == "ccardrefund")
|
||||
<line size="1"><text align="center" $len bold="true">$leftm CARD SALE</text></line>
|
||||
<line></line>
|
||||
<line><text align = "center" $len bold="true">$leftm A card payment was received</text></line>
|
||||
<line></line>
|
||||
<line size="1"><text align="left">$leftm AMOUNT</text><text align ="right" length="32">${paymentline.printTotal()}</text></line>
|
||||
#end
|
||||
#end
|
||||
</ticket>
|
||||
Binary file not shown.
Reference in New Issue
Block a user