forked from edruid/Nitroxy-retail-system
-
Notifications
You must be signed in to change notification settings - Fork 0
/
data.sql
142 lines (138 loc) · 4.07 KB
/
data.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
BEGIN;
SET FOREIGN_KEY_CHECKS=0;
REPLACE INTO account set
account_id = 1,
name = 'Kassa',
code_name = 'till',
default_sign = 'kredit',
warn_on_non_default = false,
description = 'Pengar som finns i kassaapparaten',
account_type = 'balance';
REPLACE INTO account set
account_id = 2,
name = 'Differenser',
code_name = 'diff',
default_sign = 'kredit',
warn_on_non_default = false,
description = 'Skillnader vid kassaräkning mot vad som borde finnas',
account_type = 'result';
REPLACE INTO account set
account_id = 3,
name = 'Inköp försäljningsvaror',
code_name = 'purchases',
default_sign = 'debit',
warn_on_non_default = true,
description = 'Pengar vi använt för att köpa varor',
account_type = 'result';
REPLACE INTO account set
account_id = 4,
name = 'Bank',
code_name = 'bank',
default_sign = 'debit',
warn_on_non_default = false,
description = 'Pengar som ligger på bankkontot',
account_type = 'balance';
REPLACE INTO account set
account_id = 5,
name = 'Skuld/förskott till engagerad',
code_name = 'engagerad',
default_sign = 'kredit',
warn_on_non_default = false,
description = 'Pengar lånade av privatperson t ex för inköp',
account_type = 'balance';
REPLACE INTO account set
account_id = 7,
name = 'Lager',
code_name = 'stock',
default_sign = 'debit',
warn_on_non_default = false,
description = 'Pengar bundna i varor i kiosken',
account_type = 'balance';
REPLACE INTO account set
account_id = 9,
name = 'Lagerdifferenser',
code_name = 'stock_diff',
default_sign = 'kredit',
warn_on_non_default = false,
description = 'Skillnader vid inventering mot vad som borde finnas',
account_type = 'result';
REPLACE INTO account set
account_id = 10,
name = 'Leverantörsskulder',
code_name = 'deliveries_debts',
default_sign = 'kredit',
warn_on_non_default = false,
description = 'Pengar vi är skyldiga leverantörer',
account_type = 'balance';
REPLACE INTO account set
account_id = 11,
name = 'Inköp förbrukningsinventarier',
code_name = 'spend',
default_sign = 'debit',
warn_on_non_default = true,
description = 'Saker som köpts till lokalen för förbrukning',
account_type = 'result';
REPLACE INTO account set
account_id = 12,
name = 'Förseningsavgifter',
code_name = 'delay_fees',
default_sign = 'debit',
warn_on_non_default = true,
description = 'Avgifter för sena betalningar',
account_type = 'result';
REPLACE INTO account set
account_id = 13,
name = 'Försäljning',
code_name = 'sales',
default_sign = 'kredit',
warn_on_non_default = true,
description = 'Försäljning av varor',
account_type = 'result';
REPLACE INTO account set
account_id = 14,
name = 'Medlemsavgifter',
code_name = 'member_fees',
default_sign = 'kredit',
warn_on_non_default = true,
description = 'Inkomster av medlemsavgifter',
account_type = 'result';
REPLACE INTO account set
account_id = 15,
name = 'Donationer',
code_name = 'donations',
default_sign = 'kredit',
warn_on_non_default = true,
description = 'Inkomster av donnationer',
account_type = 'result';
REPLACE INTO account set
account_id = 16,
name = 'Pant',
code_name = 'pant',
default_sign = 'debit',
warn_on_non_default = false,
description = 'Pengar bundna i pant',
account_type = 'balance';
REPLACE INTO account set
account_id = 17,
name = 'Ingående',
code_name = 'start',
default_sign = 'debit',
warn_on_non_default = false,
description = 'Ingående värden för start av systemet',
account_type = 'result';
REPLACE INTO account set
account_id = 18,
name = 'Öresavrundningar',
code_name = 'rounding',
default_sign = 'debit',
warn_on_non_default = false,
description = 'Öresavrundningar vid inköp, försäljning mm',
account_type = 'result';
SET FOREIGN_KEY_CHECKS=1;
INSERT INTO categories (category_id, name) VALUES
(0, 'Special');
UPDATE categories SET category_id = 0 WHERE name = 'Special'; -- WTF! Why do I need this?
INSERT INTO products (product_id, name, price, ean, category_id, value, count, inventory_threshold, active) VALUES
(0, 'Öresavrundning', 0, 'rounding', 0, 0, 0, null, 1);
UPDATE products SET product_id = 0 WHERE ean = 'rounding'; -- WTF! Why do I need this?
COMMIT;