1 # Built by FrontAccounting 2.1.2
2 # http://frontaccounting.net
3 # Company: Company name
8 ### Structure of table `0_areas` ###
10 DROP TABLE IF EXISTS `0_areas`;
12 CREATE TABLE `0_areas` (
13 `area_code` int(11) NOT NULL auto_increment,
14 `description` varchar(60) NOT NULL default '',
15 `inactive` tinyint(1) NOT NULL default '0',
16 PRIMARY KEY (`area_code`),
17 UNIQUE KEY `description` (`description`)
18 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
21 ### Data of table `0_areas` ###
23 INSERT INTO `0_areas` VALUES ('1', 'Global', '0');
25 ### Structure of table `0_attachments` ###
27 DROP TABLE IF EXISTS `0_attachments`;
29 CREATE TABLE `0_attachments` (
30 `id` int(11) unsigned NOT NULL auto_increment,
31 `description` varchar(60) NOT NULL default '',
32 `type_no` int(11) NOT NULL default '0',
33 `trans_no` int(11) NOT NULL default '0',
34 `unique_name` varchar(60) NOT NULL default '',
35 `tran_date` date NOT NULL default '0000-00-00',
36 `filename` varchar(60) NOT NULL default '',
37 `filesize` int(11) NOT NULL default '0',
38 `filetype` varchar(60) NOT NULL default '',
40 KEY `type_no` (`type_no`,`trans_no`)
41 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
44 ### Data of table `0_attachments` ###
46 ### Structure of table `0_audit_trail` ###
48 DROP TABLE IF EXISTS `0_audit_trail`;
50 CREATE TABLE `0_audit_trail` (
51 `id` int(11) NOT NULL AUTO_INCREMENT,
52 `type` smallint(6) unsigned NOT NULL default '0',
53 `trans_no` int(11) unsigned NOT NULL default '0',
54 `user` smallint(6) unsigned NOT NULL default '0',
55 `stamp` timestamp NOT NULL,
56 `description` varchar(60) default NULL,
57 `fiscal_year` int(11) NOT NULL,
58 `gl_date` date NOT NULL default '0000-00-00',
59 `gl_seq` int(11) unsigned default NULL,
61 KEY (`fiscal_year`, `gl_seq`)
64 ### Data of table `0_audit_trail` ###
68 ### Structure of table `0_bank_accounts` ###
70 DROP TABLE IF EXISTS `0_bank_accounts`;
72 CREATE TABLE `0_bank_accounts` (
73 `account_code` varchar(11) NOT NULL default '',
74 `account_type` smallint(6) NOT NULL default '0',
75 `bank_account_name` varchar(60) NOT NULL default '',
76 `bank_account_number` varchar(100) NOT NULL default '',
77 `bank_name` varchar(60) NOT NULL default '',
78 `bank_address` tinytext,
79 `bank_curr_code` char(3) NOT NULL default '',
80 `id` smallint(6) NOT NULL auto_increment,
81 `last_reconciled_date` timestamp NOT NULL default '0000-00-00 00:00:00',
82 `ending_reconcile_balance` double NOT NULL default '0',
83 `inactive` tinyint(1) NOT NULL default '0',
85 KEY `bank_account_name` (`bank_account_name`),
86 KEY `bank_account_number` (`bank_account_number`)
87 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
90 ### Data of table `0_bank_accounts` ###
92 INSERT INTO `0_bank_accounts` VALUES ('1060', '0', 'Current account', 'N/A', 'N/A', '', 'USD', '1', '0000-00-00 00:00:00', '0', '0');
93 INSERT INTO `0_bank_accounts` VALUES ('1065', '3', 'Petty Cash account', 'N/A', 'N/A', '', 'USD', '2', '0000-00-00 00:00:00', '0', '0');
96 ### Structure of table `0_bank_trans` ###
98 DROP TABLE IF EXISTS `0_bank_trans`;
100 CREATE TABLE `0_bank_trans` (
101 `id` int(11) NOT NULL auto_increment,
102 `type` smallint(6) default NULL,
103 `trans_no` int(11) default NULL,
104 `bank_act` varchar(11) default NULL,
105 `ref` varchar(40) default NULL,
106 `trans_date` date NOT NULL default '0000-00-00',
107 `amount` double default NULL,
108 `dimension_id` int(11) NOT NULL default '0',
109 `dimension2_id` int(11) NOT NULL default '0',
110 `person_type_id` int(11) NOT NULL default '0',
111 `person_id` tinyblob,
112 `reconciled` date default NULL,
114 KEY `bank_act` (`bank_act`,`ref`),
115 KEY `type` (`type`,`trans_no`)
116 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
119 ### Data of table `0_bank_trans` ###
123 ### Structure of table `0_bom` ###
125 DROP TABLE IF EXISTS `0_bom`;
127 CREATE TABLE `0_bom` (
128 `id` int(11) NOT NULL auto_increment,
129 `parent` char(20) NOT NULL default '',
130 `component` char(20) NOT NULL default '',
131 `workcentre_added` int(11) NOT NULL default '0',
132 `loc_code` char(5) NOT NULL default '',
133 `quantity` double NOT NULL default '1',
134 PRIMARY KEY (`parent`,`component`,`workcentre_added`,`loc_code`),
135 KEY `component` (`component`),
137 KEY `loc_code` (`loc_code`),
138 KEY `parent` (`parent`,`loc_code`),
139 KEY `Parent_2` (`parent`),
140 KEY `workcentre_added` (`workcentre_added`)
141 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
144 ### Data of table `0_bom` ###
148 ### Structure of table `0_budget_trans` ###
150 DROP TABLE IF EXISTS `0_budget_trans`;
152 CREATE TABLE `0_budget_trans` (
153 `counter` int(11) NOT NULL auto_increment,
154 `type` smallint(6) NOT NULL default '0',
155 `type_no` bigint(16) NOT NULL default '1',
156 `tran_date` date NOT NULL default '0000-00-00',
157 `account` varchar(11) NOT NULL default '',
158 `memo_` tinytext NOT NULL,
159 `amount` double NOT NULL default '0',
160 `dimension_id` int(11) default '0',
161 `dimension2_id` int(11) default '0',
162 `person_type_id` int(11) default NULL,
163 `person_id` tinyblob,
164 PRIMARY KEY (`counter`),
165 KEY `Type_and_Number` (`type`,`type_no`)
166 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
169 ### Data of table `0_budget_trans` ###
173 ### Structure of table `0_chart_class` ###
175 DROP TABLE IF EXISTS `0_chart_class`;
177 CREATE TABLE `0_chart_class` (
178 `cid` int(11) NOT NULL default '0',
179 `class_name` varchar(60) NOT NULL default '',
180 `ctype` tinyint(1) NOT NULL default '0',
181 `inactive` tinyint(1) NOT NULL default '0',
186 ### Data of table `0_chart_class` ###
188 INSERT INTO `0_chart_class` VALUES ('1', 'Assets', '1', '0');
189 INSERT INTO `0_chart_class` VALUES ('2', 'Liabilities', '2', '0');
190 INSERT INTO `0_chart_class` VALUES ('3', 'Income', '4', '0');
191 INSERT INTO `0_chart_class` VALUES ('4', 'Costs', '6', '0');
193 ### Structure of table `0_chart_master` ###
195 DROP TABLE IF EXISTS `0_chart_master`;
197 CREATE TABLE `0_chart_master` (
198 `account_code` varchar(11) NOT NULL default '',
199 `account_code2` varchar(11) default '',
200 `account_name` varchar(60) NOT NULL default '',
201 `account_type` int(11) NOT NULL default '0',
202 `inactive` tinyint(1) NOT NULL default '0',
203 PRIMARY KEY (`account_code`),
204 KEY `account_code` (`account_code`),
205 KEY `account_name` (`account_name`)
209 ### Data of table `0_chart_master` ###
211 INSERT INTO `0_chart_master` VALUES ('1060', '', 'Checking Account', '1', '0');
212 INSERT INTO `0_chart_master` VALUES ('1065', '', 'Petty Cash', '1', '0');
213 INSERT INTO `0_chart_master` VALUES ('1200', '', 'Accounts Receivables', '1', '0');
214 INSERT INTO `0_chart_master` VALUES ('1205', '', 'Allowance for doubtful accounts', '1', '0');
215 INSERT INTO `0_chart_master` VALUES ('1510', '', 'Inventory', '2', '0');
216 INSERT INTO `0_chart_master` VALUES ('1520', '', 'Stocks of Raw Materials', '2', '0');
217 INSERT INTO `0_chart_master` VALUES ('1530', '', 'Stocks of Work In Progress', '2', '0');
218 INSERT INTO `0_chart_master` VALUES ('1540', '', 'Stocks of Finsihed Goods', '2', '0');
219 INSERT INTO `0_chart_master` VALUES ('1550', '', 'Goods Received Clearing account', '2', '0');
220 INSERT INTO `0_chart_master` VALUES ('1820', '', 'Office Furniture & Equipment', '3', '0');
221 INSERT INTO `0_chart_master` VALUES ('1825', '', 'Accum. Amort. -Furn. & Equip.', '3', '0');
222 INSERT INTO `0_chart_master` VALUES ('1840', '', 'Vehicle', '3', '0');
223 INSERT INTO `0_chart_master` VALUES ('1845', '', 'Accum. Amort. -Vehicle', '3', '0');
224 INSERT INTO `0_chart_master` VALUES ('2100', '', 'Accounts Payable', '4', '0');
225 INSERT INTO `0_chart_master` VALUES ('2110', '', 'Accrued Income Tax - Federal', '4', '0');
226 INSERT INTO `0_chart_master` VALUES ('2120', '', 'Accrued Income Tax - State', '4', '0');
227 INSERT INTO `0_chart_master` VALUES ('2130', '', 'Accrued Franchise Tax', '4', '0');
228 INSERT INTO `0_chart_master` VALUES ('2140', '', 'Accrued Real & Personal Prop Tax', '4', '0');
229 INSERT INTO `0_chart_master` VALUES ('2150', '', 'Sales Tax', '4', '0');
230 INSERT INTO `0_chart_master` VALUES ('2160', '', 'Accrued Use Tax Payable', '4', '0');
231 INSERT INTO `0_chart_master` VALUES ('2210', '', 'Accrued Wages', '4', '0');
232 INSERT INTO `0_chart_master` VALUES ('2220', '', 'Accrued Comp Time', '4', '0');
233 INSERT INTO `0_chart_master` VALUES ('2230', '', 'Accrued Holiday Pay', '4', '0');
234 INSERT INTO `0_chart_master` VALUES ('2240', '', 'Accrued Vacation Pay', '4', '0');
235 INSERT INTO `0_chart_master` VALUES ('2310', '', 'Accr. Benefits - 401K', '4', '0');
236 INSERT INTO `0_chart_master` VALUES ('2320', '', 'Accr. Benefits - Stock Purchase', '4', '0');
237 INSERT INTO `0_chart_master` VALUES ('2330', '', 'Accr. Benefits - Med, Den', '4', '0');
238 INSERT INTO `0_chart_master` VALUES ('2340', '', 'Accr. Benefits - Payroll Taxes', '4', '0');
239 INSERT INTO `0_chart_master` VALUES ('2350', '', 'Accr. Benefits - Credit Union', '4', '0');
240 INSERT INTO `0_chart_master` VALUES ('2360', '', 'Accr. Benefits - Savings Bond', '4', '0');
241 INSERT INTO `0_chart_master` VALUES ('2370', '', 'Accr. Benefits - Garnish', '4', '0');
242 INSERT INTO `0_chart_master` VALUES ('2380', '', 'Accr. Benefits - Charity Cont.', '4', '0');
243 INSERT INTO `0_chart_master` VALUES ('2620', '', 'Bank Loans', '5', '0');
244 INSERT INTO `0_chart_master` VALUES ('2680', '', 'Loans from Shareholders', '5', '0');
245 INSERT INTO `0_chart_master` VALUES ('3350', '', 'Common Shares', '6', '0');
246 INSERT INTO `0_chart_master` VALUES ('3590', '', 'Retained Earnings - prior years', '7', '0');
247 INSERT INTO `0_chart_master` VALUES ('4010', '', 'Sales', '8', '0');
248 INSERT INTO `0_chart_master` VALUES ('4430', '', 'Shipping & Handling', '9', '0');
249 INSERT INTO `0_chart_master` VALUES ('4440', '', 'Interest', '9', '0');
250 INSERT INTO `0_chart_master` VALUES ('4450', '', 'Foreign Exchange Gain', '9', '0');
251 INSERT INTO `0_chart_master` VALUES ('4500', '', 'Prompt Payment Discounts', '9', '0');
252 INSERT INTO `0_chart_master` VALUES ('4510', '', 'Discounts Given', '9', '0');
253 INSERT INTO `0_chart_master` VALUES ('5010', '', 'Cost of Goods Sold - Retail', '10', '0');
254 INSERT INTO `0_chart_master` VALUES ('5020', '', 'Material Usage Varaiance', '10', '0');
255 INSERT INTO `0_chart_master` VALUES ('5030', '', 'Consumable Materials', '10', '0');
256 INSERT INTO `0_chart_master` VALUES ('5040', '', 'Purchase price Variance', '10', '0');
257 INSERT INTO `0_chart_master` VALUES ('5050', '', 'Purchases of materials', '10', '0');
258 INSERT INTO `0_chart_master` VALUES ('5060', '', 'Discounts Received', '10', '0');
259 INSERT INTO `0_chart_master` VALUES ('5100', '', 'Freight', '10', '0');
260 INSERT INTO `0_chart_master` VALUES ('5410', '', 'Wages & Salaries', '11', '0');
261 INSERT INTO `0_chart_master` VALUES ('5420', '', 'Wages - Overtime', '11', '0');
262 INSERT INTO `0_chart_master` VALUES ('5430', '', 'Benefits - Comp Time', '11', '0');
263 INSERT INTO `0_chart_master` VALUES ('5440', '', 'Benefits - Payroll Taxes', '11', '0');
264 INSERT INTO `0_chart_master` VALUES ('5450', '', 'Benefits - Workers Comp', '11', '0');
265 INSERT INTO `0_chart_master` VALUES ('5460', '', 'Benefits - Pension', '11', '0');
266 INSERT INTO `0_chart_master` VALUES ('5470', '', 'Benefits - General Benefits', '11', '0');
267 INSERT INTO `0_chart_master` VALUES ('5510', '', 'Inc Tax Exp - Federal', '11', '0');
268 INSERT INTO `0_chart_master` VALUES ('5520', '', 'Inc Tax Exp - State', '11', '0');
269 INSERT INTO `0_chart_master` VALUES ('5530', '', 'Taxes - Real Estate', '11', '0');
270 INSERT INTO `0_chart_master` VALUES ('5540', '', 'Taxes - Personal Property', '11', '0');
271 INSERT INTO `0_chart_master` VALUES ('5550', '', 'Taxes - Franchise', '11', '0');
272 INSERT INTO `0_chart_master` VALUES ('5560', '', 'Taxes - Foreign Withholding', '11', '0');
273 INSERT INTO `0_chart_master` VALUES ('5610', '', 'Accounting & Legal', '12', '0');
274 INSERT INTO `0_chart_master` VALUES ('5615', '', 'Advertising & Promotions', '12', '0');
275 INSERT INTO `0_chart_master` VALUES ('5620', '', 'Bad Debts', '12', '0');
276 INSERT INTO `0_chart_master` VALUES ('5660', '', 'Amortization Expense', '12', '0');
277 INSERT INTO `0_chart_master` VALUES ('5685', '', 'Insurance', '12', '0');
278 INSERT INTO `0_chart_master` VALUES ('5690', '', 'Interest & Bank Charges', '12', '0');
279 INSERT INTO `0_chart_master` VALUES ('5700', '', 'Office Supplies', '12', '0');
280 INSERT INTO `0_chart_master` VALUES ('5760', '', 'Rent', '12', '0');
281 INSERT INTO `0_chart_master` VALUES ('5765', '', 'Repair & Maintenance', '12', '0');
282 INSERT INTO `0_chart_master` VALUES ('5780', '', 'Telephone', '12', '0');
283 INSERT INTO `0_chart_master` VALUES ('5785', '', 'Travel & Entertainment', '12', '0');
284 INSERT INTO `0_chart_master` VALUES ('5790', '', 'Utilities', '12', '0');
285 INSERT INTO `0_chart_master` VALUES ('5795', '', 'Registrations', '12', '0');
286 INSERT INTO `0_chart_master` VALUES ('5800', '', 'Licenses', '12', '0');
287 INSERT INTO `0_chart_master` VALUES ('5810', '', 'Foreign Exchange Loss', '12', '0');
288 INSERT INTO `0_chart_master` VALUES ('9990', '', 'Year Profit/Loss', '12', '0');
291 ### Structure of table `0_chart_types` ###
293 DROP TABLE IF EXISTS `0_chart_types`;
295 CREATE TABLE `0_chart_types` (
296 `id` int(11) NOT NULL auto_increment,
297 `name` varchar(60) NOT NULL default '',
298 `class_id` tinyint(1) NOT NULL default '0',
299 `parent` int(11) NOT NULL default '-1',
300 `inactive` tinyint(1) NOT NULL default '0',
303 ) TYPE=MyISAM AUTO_INCREMENT=13 ;
306 ### Data of table `0_chart_types` ###
308 INSERT INTO `0_chart_types` VALUES ('1', 'Current Assets', '1', '-1', '0');
309 INSERT INTO `0_chart_types` VALUES ('2', 'Inventory Assets', '1', '-1', '0');
310 INSERT INTO `0_chart_types` VALUES ('3', 'Capital Assets', '1', '-1', '0');
311 INSERT INTO `0_chart_types` VALUES ('4', 'Current Liabilities', '2', '-1', '0');
312 INSERT INTO `0_chart_types` VALUES ('5', 'Long Term Liabilities', '2', '-1', '0');
313 INSERT INTO `0_chart_types` VALUES ('6', 'Share Capital', '2', '-1', '0');
314 INSERT INTO `0_chart_types` VALUES ('7', 'Retained Earnings', '2', '-1', '0');
315 INSERT INTO `0_chart_types` VALUES ('8', 'Sales Revenue', '3', '-1', '0');
316 INSERT INTO `0_chart_types` VALUES ('9', 'Other Revenue', '3', '-1', '0');
317 INSERT INTO `0_chart_types` VALUES ('10', 'Cost of Goods Sold', '4', '-1', '0');
318 INSERT INTO `0_chart_types` VALUES ('11', 'Payroll Expenses', '4', '-1', '0');
319 INSERT INTO `0_chart_types` VALUES ('12', 'General & Administrative expenses', '4', -1, '0');
322 ### Structure of table `0_comments` ###
324 DROP TABLE IF EXISTS `0_comments`;
326 CREATE TABLE `0_comments` (
327 `type` int(11) NOT NULL default '0',
328 `id` int(11) NOT NULL default '0',
329 `date_` date default '0000-00-00',
334 ### Data of table `0_comments` ###
338 ### Structure of table `0_company` ###
340 DROP TABLE IF EXISTS `0_company`;
342 CREATE TABLE `0_company` (
343 `coy_code` int(11) NOT NULL default '1',
344 `coy_name` varchar(60) NOT NULL default '',
345 `gst_no` varchar(25) NOT NULL default '',
346 `coy_no` varchar(25) NOT NULL default '0',
347 `tax_prd` int(11) NOT NULL default '1',
348 `tax_last` int(11) NOT NULL default '1',
349 `postal_address` tinytext NOT NULL,
350 `phone` varchar(30) NOT NULL default '',
351 `fax` varchar(30) NOT NULL default '',
352 `email` varchar(100) NOT NULL default '',
353 `coy_logo` varchar(100) NOT NULL default '',
354 `domicile` varchar(55) NOT NULL default '',
355 `curr_default` char(3) NOT NULL default '',
356 `debtors_act` varchar(11) NOT NULL default '',
357 `pyt_discount_act` varchar(11) NOT NULL default '',
358 `creditors_act` varchar(11) NOT NULL default '',
359 `bank_charge_act` varchar(11) NOT NULL default '',
360 `exchange_diff_act` varchar(11) NOT NULL default '',
361 `profit_loss_year_act` varchar(11) NOT NULL default '',
362 `retained_earnings_act` varchar(11) NOT NULL default '',
363 `freight_act` varchar(11) NOT NULL default '',
364 `default_sales_act` varchar(11) NOT NULL default '',
365 `default_sales_discount_act` varchar(11) NOT NULL default '',
366 `default_prompt_payment_act` varchar(11) NOT NULL default '',
367 `default_inventory_act` varchar(11) NOT NULL default '',
368 `default_cogs_act` varchar(11) NOT NULL default '',
369 `default_adj_act` varchar(11) NOT NULL default '',
370 `default_inv_sales_act` varchar(11) NOT NULL default '',
371 `default_assembly_act` varchar(11) NOT NULL default '',
372 `payroll_act` varchar(11) NOT NULL default '',
373 `allow_negative_stock` tinyint(1) NOT NULL default '0',
374 `po_over_receive` int(11) NOT NULL default '10',
375 `po_over_charge` int(11) NOT NULL default '10',
376 `default_credit_limit` int(11) NOT NULL default '1000',
377 `default_workorder_required` int(11) NOT NULL default '20',
378 `default_dim_required` int(11) NOT NULL default '20',
379 `past_due_days` int(11) NOT NULL default '30',
380 `use_dimension` tinyint(1) default '0',
381 `f_year` int(11) NOT NULL default '1',
382 `no_item_list` tinyint(1) NOT NULL default '0',
383 `no_customer_list` tinyint(1) NOT NULL default '0',
384 `no_supplier_list` tinyint(1) NOT NULL default '0',
385 `base_sales` int(11) NOT NULL default '-1',
386 `foreign_codes` tinyint(1) NOT NULL default '0',
387 `accumulate_shipping` tinyint(1) NOT NULL default '0',
388 `legal_text` tinytext NOT NULL,
389 `default_delivery_required` smallint(6) NOT NULL default '1',
390 `version_id` varchar(11) NOT NULL default '',
391 `time_zone` tinyint(1) NOT NULL default '0',
392 `add_pct` int(5) NOT NULL default '-1',
393 `round_to` int(5) NOT NULL default '1',
394 `login_tout` SMALLINT(6) NOT NULL DEFAULT '600',
395 PRIMARY KEY (`coy_code`)
399 ### Data of table `0_company` ###
401 INSERT INTO `0_company` VALUES ('1', 'Company name', '', '', '1', '1', 'N/A', '', '', '', '', '', 'USD', '1200', '5060', '2100', '5690', '4450', '9990', '3590', '4430', '4010', '4510', '4500', '1510', '5010', '5040', '4010', '1530', '5000', '0', '10', '10', '1000', '20', '20', '30', '1', '1', '0', '0', '0', '1', '0', '0', '', '1', '2.2', '0', '-1', '1', '600');
403 ### Structure of table `0_credit_status` ###
405 DROP TABLE IF EXISTS `0_credit_status`;
407 CREATE TABLE `0_credit_status` (
408 `id` int(11) NOT NULL auto_increment,
409 `reason_description` char(100) NOT NULL default '',
410 `dissallow_invoices` tinyint(1) NOT NULL default '0',
411 `inactive` tinyint(1) NOT NULL default '0',
413 UNIQUE KEY `reason_description` (`reason_description`)
414 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
417 ### Data of table `0_credit_status` ###
419 INSERT INTO `0_credit_status` VALUES ('1', 'Good History', '0', '0');
420 INSERT INTO `0_credit_status` VALUES ('3', 'No more work until payment received', '1', '0');
421 INSERT INTO `0_credit_status` VALUES ('4', 'In liquidation', '1', '0');
424 ### Structure of table `0_currencies` ###
426 DROP TABLE IF EXISTS `0_currencies`;
428 CREATE TABLE `0_currencies` (
429 `currency` varchar(60) NOT NULL default '',
430 `curr_abrev` char(3) NOT NULL default '',
431 `curr_symbol` varchar(10) NOT NULL default '',
432 `country` varchar(100) NOT NULL default '',
433 `hundreds_name` varchar(15) NOT NULL default '',
434 `auto_update` tinyint(1) NOT NULL default '1',
435 `inactive` tinyint(1) NOT NULL default '0',
436 PRIMARY KEY (`curr_abrev`)
440 ### Data of table `0_currencies` ###
442 INSERT INTO `0_currencies` VALUES ('US Dollars', 'USD', '$', 'United States', 'Cents', '1', '0');
443 INSERT INTO `0_currencies` VALUES ('CA Dollars', 'CAD', '$', 'Canada', 'Cents', '1', '0');
444 INSERT INTO `0_currencies` VALUES ('Euro', 'EUR', '?', 'Europe', 'Cents', '1', '0');
445 INSERT INTO `0_currencies` VALUES ('Pounds', 'GBP', '?', 'England', 'Pence', '1', '0');
447 ### Structure of table `0_cust_allocations` ###
449 DROP TABLE IF EXISTS `0_cust_allocations`;
451 CREATE TABLE `0_cust_allocations` (
452 `id` int(11) NOT NULL auto_increment,
453 `amt` double unsigned default NULL,
454 `date_alloc` date NOT NULL default '0000-00-00',
455 `trans_no_from` int(11) default NULL,
456 `trans_type_from` int(11) default NULL,
457 `trans_no_to` int(11) default NULL,
458 `trans_type_to` int(11) default NULL,
460 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
463 ### Data of table `0_cust_allocations` ###
467 ### Structure of table `0_cust_branch` ###
469 DROP TABLE IF EXISTS `0_cust_branch`;
471 CREATE TABLE `0_cust_branch` (
472 `branch_code` int(11) NOT NULL auto_increment,
473 `debtor_no` int(11) NOT NULL default '0',
474 `br_name` varchar(60) NOT NULL default '',
475 `branch_ref` varchar(30) NOT NULL default '',
476 `br_address` tinytext NOT NULL,
477 `area` int(11) default NULL,
478 `salesman` int(11) NOT NULL default '0',
479 `phone` varchar(30) NOT NULL default '',
480 `fax` varchar(30) NOT NULL default '',
481 `contact_name` varchar(60) NOT NULL default '',
482 `email` varchar(100) NOT NULL default '',
483 `default_location` varchar(5) NOT NULL default '',
484 `tax_group_id` int(11) default NULL,
485 `sales_account` varchar(11) default NULL,
486 `sales_discount_account` varchar(11) default NULL,
487 `receivables_account` varchar(11) default NULL,
488 `payment_discount_account` varchar(11) default NULL,
489 `default_ship_via` int(11) NOT NULL default '1',
490 `disable_trans` tinyint(4) NOT NULL default '0',
491 `br_post_address` tinytext NOT NULL,
492 `group_no` int(11) NOT NULL default '0',
493 `inactive` tinyint(1) NOT NULL default '0',
494 PRIMARY KEY (`branch_code`,`debtor_no`),
495 KEY `branch_code` (`branch_code`),
496 KEY `br_name` (`br_name`)
497 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
500 ### Data of table `0_cust_branch` ###
504 ### Structure of table `0_debtor_trans` ###
506 DROP TABLE IF EXISTS `0_debtor_trans`;
508 CREATE TABLE `0_debtor_trans` (
509 `trans_no` int(11) unsigned NOT NULL default '0',
510 `type` smallint(6) unsigned NOT NULL default '0',
511 `version` tinyint(1) unsigned NOT NULL default '0',
512 `debtor_no` int(11) unsigned default NULL,
513 `branch_code` int(11) NOT NULL default '-1',
514 `tran_date` date NOT NULL default '0000-00-00',
515 `due_date` date NOT NULL default '0000-00-00',
516 `reference` varchar(60) NOT NULL default '',
517 `tpe` int(11) NOT NULL default '0',
518 `order_` int(11) NOT NULL default '0',
519 `ov_amount` double NOT NULL default '0',
520 `ov_gst` double NOT NULL default '0',
521 `ov_freight` double NOT NULL default '0',
522 `ov_freight_tax` double NOT NULL default '0',
523 `ov_discount` double NOT NULL default '0',
524 `alloc` double NOT NULL default '0',
525 `rate` double NOT NULL default '1',
526 `ship_via` int(11) default NULL,
527 `trans_link` int(11) NOT NULL default '0',
528 `dimension_id` int(11) NOT NULL default '0',
529 `dimension2_id` int(11) NOT NULL default '0',
530 PRIMARY KEY (`trans_no`,`type`),
531 KEY `debtor_no` (`debtor_no`,`branch_code`)
535 ### Data of table `0_debtor_trans` ###
539 ### Structure of table `0_debtor_trans_details` ###
541 DROP TABLE IF EXISTS `0_debtor_trans_details`;
543 CREATE TABLE `0_debtor_trans_details` (
544 `id` int(11) NOT NULL auto_increment,
545 `debtor_trans_no` int(11) default NULL,
546 `debtor_trans_type` int(11) default NULL,
547 `stock_id` varchar(20) NOT NULL default '',
548 `description` tinytext,
549 `unit_price` double NOT NULL default '0',
550 `unit_tax` double NOT NULL default '0',
551 `quantity` double NOT NULL default '0',
552 `discount_percent` double NOT NULL default '0',
553 `standard_cost` double NOT NULL default '0',
554 `qty_done` double NOT NULL default '0',
556 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
559 ### Data of table `0_debtor_trans_details` ###
563 ### Structure of table `0_debtors_master` ###
565 DROP TABLE IF EXISTS `0_debtors_master`;
567 CREATE TABLE `0_debtors_master` (
568 `debtor_no` int(11) NOT NULL auto_increment,
569 `name` varchar(80) NOT NULL default '',
570 `debtor_ref` varchar(30) NOT NULL,
572 `email` varchar(100) NOT NULL default '',
573 `tax_id` varchar(55) NOT NULL default '',
574 `curr_code` char(3) NOT NULL default '',
575 `sales_type` int(11) NOT NULL default '1',
576 `dimension_id` int(11) NOT NULL default '0',
577 `dimension2_id` int(11) NOT NULL default '0',
578 `credit_status` int(11) NOT NULL default '0',
579 `payment_terms` int(11) default NULL,
580 `discount` double NOT NULL default '0',
581 `pymt_discount` double NOT NULL default '0',
582 `credit_limit` float NOT NULL default '1000',
583 `inactive` tinyint(1) NOT NULL default '0',
584 PRIMARY KEY (`debtor_no`),
585 UNIQUE KEY `name` (`name`)
586 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
589 ### Data of table `0_debtors_master` ###
593 ### Structure of table `0_dimensions` ###
595 DROP TABLE IF EXISTS `0_dimensions`;
597 CREATE TABLE `0_dimensions` (
598 `id` int(11) NOT NULL auto_increment,
599 `reference` varchar(60) NOT NULL default '',
600 `name` varchar(60) NOT NULL default '',
601 `type_` tinyint(1) NOT NULL default '1',
602 `closed` tinyint(1) NOT NULL default '0',
603 `date_` date NOT NULL default '0000-00-00',
604 `due_date` date NOT NULL default '0000-00-00',
606 UNIQUE KEY `reference` (`reference`)
607 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
610 ### Data of table `0_dimensions` ###
614 ### Structure of table `0_exchange_rates` ###
616 DROP TABLE IF EXISTS `0_exchange_rates`;
618 CREATE TABLE `0_exchange_rates` (
619 `id` int(11) NOT NULL auto_increment,
620 `curr_code` char(3) NOT NULL default '',
621 `rate_buy` double NOT NULL default '0',
622 `rate_sell` double NOT NULL default '0',
623 `date_` date NOT NULL default '0000-00-00',
625 UNIQUE KEY `curr_code` (`curr_code`,`date_`)
626 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
629 ### Data of table `0_exchange_rates` ###
633 ### Structure of table `0_fiscal_year` ###
635 DROP TABLE IF EXISTS `0_fiscal_year`;
637 CREATE TABLE `0_fiscal_year` (
638 `id` int(11) NOT NULL auto_increment,
639 `begin` date default '0000-00-00',
640 `end` date default '0000-00-00',
641 `closed` tinyint(1) NOT NULL default '0',
643 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
646 ### Data of table `0_fiscal_year` ###
648 INSERT INTO `0_fiscal_year` VALUES ('1', '2008-01-01', '2008-12-31', '0');
651 ### Structure of table `0_gl_trans` ###
653 DROP TABLE IF EXISTS `0_gl_trans`;
655 CREATE TABLE `0_gl_trans` (
656 `counter` int(11) NOT NULL auto_increment,
657 `type` smallint(6) NOT NULL default '0',
658 `type_no` bigint(16) NOT NULL default '1',
659 `tran_date` date NOT NULL default '0000-00-00',
660 `account` varchar(11) NOT NULL default '',
661 `memo_` tinytext NOT NULL,
662 `amount` double NOT NULL default '0',
663 `dimension_id` int(11) NOT NULL default '0',
664 `dimension2_id` int(11) NOT NULL default '0',
665 `person_type_id` int(11) default NULL,
666 `person_id` tinyblob,
667 PRIMARY KEY (`counter`),
668 KEY `Type_and_Number` (`type`,`type_no`)
669 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
672 ### Data of table `0_gl_trans` ###
676 ### Structure of table `0_grn_batch` ###
678 DROP TABLE IF EXISTS `0_grn_batch`;
680 CREATE TABLE `0_grn_batch` (
681 `id` int(11) NOT NULL auto_increment,
682 `supplier_id` int(11) NOT NULL default '0',
683 `purch_order_no` int(11) default NULL,
684 `reference` varchar(60) NOT NULL default '',
685 `delivery_date` date NOT NULL default '0000-00-00',
686 `loc_code` varchar(5) default NULL,
688 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
691 ### Data of table `0_grn_batch` ###
695 ### Structure of table `0_grn_items` ###
697 DROP TABLE IF EXISTS `0_grn_items`;
699 CREATE TABLE `0_grn_items` (
700 `id` int(11) NOT NULL auto_increment,
701 `grn_batch_id` int(11) default NULL,
702 `po_detail_item` int(11) NOT NULL default '0',
703 `item_code` varchar(20) NOT NULL default '',
704 `description` tinytext,
705 `qty_recd` double NOT NULL default '0',
706 `quantity_inv` double NOT NULL default '0',
708 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
711 ### Data of table `0_grn_items` ###
715 ### Structure of table `0_groups` ###
717 DROP TABLE IF EXISTS `0_groups`;
719 CREATE TABLE `0_groups` (
720 `id` smallint(6) unsigned NOT NULL auto_increment,
721 `description` varchar(60) NOT NULL default '',
722 `inactive` tinyint(1) NOT NULL default '0',
724 UNIQUE KEY `description` (`description`)
725 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
728 ### Data of table `0_groups` ###
730 INSERT INTO `0_groups` VALUES ('1', 'Small', '0');
731 INSERT INTO `0_groups` VALUES ('2', 'Medium', '0');
732 INSERT INTO `0_groups` VALUES ('3', 'Large', '0');
735 ### Structure of table `0_item_codes` ###
737 DROP TABLE IF EXISTS `0_item_codes`;
739 CREATE TABLE `0_item_codes` (
740 `id` int(11) unsigned NOT NULL auto_increment,
741 `item_code` varchar(20) NOT NULL,
742 `stock_id` varchar(20) NOT NULL,
743 `description` varchar(200) NOT NULL default '',
744 `category_id` smallint(6) unsigned NOT NULL,
745 `quantity` double NOT NULL default '1',
746 `is_foreign` tinyint(1) NOT NULL default '0',
747 `inactive` tinyint(1) NOT NULL default '0',
749 UNIQUE KEY `stock_id` (`stock_id`,`item_code`)
750 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
753 ### Data of table `0_item_codes` ###
757 ### Structure of table `0_item_tax_type_exemptions` ###
759 DROP TABLE IF EXISTS `0_item_tax_type_exemptions`;
761 CREATE TABLE `0_item_tax_type_exemptions` (
762 `item_tax_type_id` int(11) NOT NULL default '0',
763 `tax_type_id` int(11) NOT NULL default '0',
764 PRIMARY KEY (`item_tax_type_id`,`tax_type_id`)
768 ### Data of table `0_item_tax_type_exemptions` ###
772 ### Structure of table `0_item_tax_types` ###
774 DROP TABLE IF EXISTS `0_item_tax_types`;
776 CREATE TABLE `0_item_tax_types` (
777 `id` int(11) NOT NULL auto_increment,
778 `name` varchar(60) NOT NULL default '',
779 `exempt` tinyint(1) NOT NULL default '0',
780 `inactive` tinyint(1) NOT NULL default '0',
782 UNIQUE KEY `name` (`name`)
783 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
786 ### Data of table `0_item_tax_types` ###
788 INSERT INTO `0_item_tax_types` VALUES ('1', 'Regular', '0', '0');
791 ### Structure of table `0_item_units` ###
793 DROP TABLE IF EXISTS `0_item_units`;
795 CREATE TABLE `0_item_units` (
796 `abbr` varchar(20) NOT NULL,
797 `name` varchar(40) NOT NULL,
798 `decimals` tinyint(2) NOT NULL,
799 `inactive` tinyint(1) NOT NULL default '0',
800 PRIMARY KEY (`abbr`),
801 UNIQUE KEY `name` (`name`)
805 ### Data of table `0_item_units` ###
807 INSERT INTO `0_item_units` VALUES ('ea.', 'Each', '0', '0');
810 ### Structure of table `0_loc_stock` ###
812 DROP TABLE IF EXISTS `0_loc_stock`;
814 CREATE TABLE `0_loc_stock` (
815 `loc_code` char(5) NOT NULL default '',
816 `stock_id` char(20) NOT NULL default '',
817 `reorder_level` bigint(20) NOT NULL default '0',
818 PRIMARY KEY (`loc_code`,`stock_id`),
819 KEY `stock_id` (`stock_id`)
823 ### Data of table `0_loc_stock` ###
827 ### Structure of table `0_locations` ###
829 DROP TABLE IF EXISTS `0_locations`;
831 CREATE TABLE `0_locations` (
832 `loc_code` varchar(5) NOT NULL default '',
833 `location_name` varchar(60) NOT NULL default '',
834 `delivery_address` tinytext NOT NULL,
835 `phone` varchar(30) NOT NULL default '',
836 `fax` varchar(30) NOT NULL default '',
837 `email` varchar(100) NOT NULL default '',
838 `contact` varchar(30) NOT NULL default '',
839 `inactive` tinyint(1) NOT NULL default '0',
840 PRIMARY KEY (`loc_code`)
844 ### Data of table `0_locations` ###
846 INSERT INTO `0_locations` VALUES ('DEF', 'Default', 'N/A', '', '', '', '', '0');
849 ### Structure of table `0_movement_types` ###
851 DROP TABLE IF EXISTS `0_movement_types`;
853 CREATE TABLE `0_movement_types` (
854 `id` int(11) NOT NULL auto_increment,
855 `name` varchar(60) NOT NULL default '',
856 `inactive` tinyint(1) NOT NULL default '0',
858 UNIQUE KEY `name` (`name`)
859 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
862 ### Data of table `0_movement_types` ###
864 INSERT INTO `0_movement_types` VALUES ('1', 'Adjustment', '0');
867 ### Structure of table `0_payment_terms` ###
869 DROP TABLE IF EXISTS `0_payment_terms`;
871 CREATE TABLE `0_payment_terms` (
872 `terms_indicator` int(11) NOT NULL auto_increment,
873 `terms` char(80) NOT NULL default '',
874 `days_before_due` smallint(6) NOT NULL default '0',
875 `day_in_following_month` smallint(6) NOT NULL default '0',
876 `inactive` tinyint(1) NOT NULL default '0',
877 PRIMARY KEY (`terms_indicator`),
878 UNIQUE KEY `terms` (`terms`)
879 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
882 ### Data of table `0_payment_terms` ###
884 INSERT INTO `0_payment_terms` VALUES ('1', 'Due 15th Of the Following Month', '0', '17', '0');
885 INSERT INTO `0_payment_terms` VALUES ('2', 'Due By End Of The Following Month', '0', '30', '0');
886 INSERT INTO `0_payment_terms` VALUES ('3', 'Payment due within 10 days', '10', '0', '0');
887 INSERT INTO `0_payment_terms` VALUES ('4', 'Cash Only', '1', '0', '0');
890 ### Structure of table `0_prices` ###
892 DROP TABLE IF EXISTS `0_prices`;
894 CREATE TABLE `0_prices` (
895 `id` int(11) NOT NULL auto_increment,
896 `stock_id` varchar(20) NOT NULL default '',
897 `sales_type_id` int(11) NOT NULL default '0',
898 `curr_abrev` char(3) NOT NULL default '',
899 `price` double NOT NULL default '0',
901 UNIQUE KEY `price` (`stock_id`,`sales_type_id`,`curr_abrev`)
902 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
905 ### Data of table `0_prices` ###
909 ### Structure of table `0_print_profiles` ###
911 DROP TABLE IF EXISTS `0_print_profiles`;
913 CREATE TABLE `0_print_profiles` (
914 `id` smallint(6) unsigned NOT NULL auto_increment,
915 `profile` varchar(30) NOT NULL,
916 `report` varchar(5) default NULL,
917 `printer` tinyint(3) unsigned default NULL,
919 UNIQUE KEY `profile` (`profile`,`report`)
920 ) TYPE=MyISAM AUTO_INCREMENT=10 ;
923 ### Data of table `0_print_profiles` ###
925 INSERT INTO `0_print_profiles` VALUES ('1', 'Out of office', '', '0');
926 INSERT INTO `0_print_profiles` VALUES ('2', 'Sales Department', '', '0');
927 INSERT INTO `0_print_profiles` VALUES ('3', 'Central', '', '2');
928 INSERT INTO `0_print_profiles` VALUES ('4', 'Sales Department', '104', '2');
929 INSERT INTO `0_print_profiles` VALUES ('5', 'Sales Department', '105', '2');
930 INSERT INTO `0_print_profiles` VALUES ('6', 'Sales Department', '107', '2');
931 INSERT INTO `0_print_profiles` VALUES ('7', 'Sales Department', '109', '2');
932 INSERT INTO `0_print_profiles` VALUES ('8', 'Sales Department', '110', '2');
933 INSERT INTO `0_print_profiles` VALUES ('9', 'Sales Department', '201', '2');
936 ### Structure of table `0_printers` ###
938 DROP TABLE IF EXISTS `0_printers`;
940 CREATE TABLE `0_printers` (
941 `id` tinyint(3) unsigned NOT NULL auto_increment,
942 `name` varchar(20) NOT NULL,
943 `description` varchar(60) NOT NULL,
944 `queue` varchar(20) NOT NULL,
945 `host` varchar(40) NOT NULL,
946 `port` smallint(11) unsigned NOT NULL,
947 `timeout` tinyint(3) unsigned NOT NULL,
949 UNIQUE KEY `name` (`name`)
950 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
953 ### Data of table `0_printers` ###
955 INSERT INTO `0_printers` VALUES ('1', 'QL500', 'Label printer', 'QL500', 'server', '127', '20');
956 INSERT INTO `0_printers` VALUES ('2', 'Samsung', 'Main network printer', 'scx4521F', 'server', '515', '5');
957 INSERT INTO `0_printers` VALUES ('3', 'Local', 'Local print server at user IP', 'lp', '', '515', '10');
960 ### Structure of table `0_purch_data` ###
962 DROP TABLE IF EXISTS `0_purch_data`;
964 CREATE TABLE `0_purch_data` (
965 `supplier_id` int(11) NOT NULL default '0',
966 `stock_id` char(20) NOT NULL default '',
967 `price` double NOT NULL default '0',
968 `suppliers_uom` char(50) NOT NULL default '',
969 `conversion_factor` double NOT NULL default '1',
970 `supplier_description` char(50) NOT NULL default '',
971 PRIMARY KEY (`supplier_id`,`stock_id`)
975 ### Data of table `0_purch_data` ###
979 ### Structure of table `0_purch_order_details` ###
981 DROP TABLE IF EXISTS `0_purch_order_details`;
983 CREATE TABLE `0_purch_order_details` (
984 `po_detail_item` int(11) NOT NULL auto_increment,
985 `order_no` int(11) NOT NULL default '0',
986 `item_code` varchar(20) NOT NULL default '',
987 `description` tinytext,
988 `delivery_date` date NOT NULL default '0000-00-00',
989 `qty_invoiced` double NOT NULL default '0',
990 `unit_price` double NOT NULL default '0',
991 `act_price` double NOT NULL default '0',
992 `std_cost_unit` double NOT NULL default '0',
993 `quantity_ordered` double NOT NULL default '0',
994 `quantity_received` double NOT NULL default '0',
995 PRIMARY KEY (`po_detail_item`)
996 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
999 ### Data of table `0_purch_order_details` ###
1003 ### Structure of table `0_purch_orders` ###
1005 DROP TABLE IF EXISTS `0_purch_orders`;
1007 CREATE TABLE `0_purch_orders` (
1008 `order_no` int(11) NOT NULL auto_increment,
1009 `supplier_id` int(11) NOT NULL default '0',
1010 `comments` tinytext,
1011 `ord_date` date NOT NULL default '0000-00-00',
1012 `reference` tinytext NOT NULL,
1013 `requisition_no` tinytext,
1014 `into_stock_location` varchar(5) NOT NULL default '',
1015 `delivery_address` tinytext NOT NULL,
1016 PRIMARY KEY (`order_no`)
1017 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1020 ### Data of table `0_purch_orders` ###
1024 ### Structure of table `0_quick_entries` ###
1026 DROP TABLE IF EXISTS `0_quick_entries`;
1028 CREATE TABLE `0_quick_entries` (
1029 `id` smallint(6) unsigned NOT NULL auto_increment,
1030 `type` tinyint(1) NOT NULL default '0',
1031 `description` varchar(60) NOT NULL,
1032 `base_amount` double NOT NULL default '0',
1033 `base_desc` varchar(60) default NULL,
1035 KEY `description` (`description`)
1036 ) TYPE=MyISAM AUTO_INCREMENT=4 ;
1039 ### Data of table `0_quick_entries` ###
1041 INSERT INTO `0_quick_entries` VALUES ('1', '1', 'Maintenance', '0', 'Amount');
1042 INSERT INTO `0_quick_entries` VALUES ('2', '4', 'Phone', '0', 'Amount');
1043 INSERT INTO `0_quick_entries` VALUES ('3', '2', 'Cash Sales', '0', 'Amount');
1046 ### Structure of table `0_quick_entry_lines` ###
1048 DROP TABLE IF EXISTS `0_quick_entry_lines`;
1050 CREATE TABLE `0_quick_entry_lines` (
1051 `id` smallint(6) unsigned NOT NULL auto_increment,
1052 `qid` smallint(6) unsigned NOT NULL,
1053 `amount` double default '0',
1054 `action` varchar(2) NOT NULL,
1055 `dest_id` varchar(11) NOT NULL,
1056 `dimension_id` smallint(6) unsigned default NULL,
1057 `dimension2_id` smallint(6) unsigned default NULL,
1060 ) TYPE=MyISAM AUTO_INCREMENT=7 ;
1063 ### Data of table `0_quick_entry_lines` ###
1065 INSERT INTO `0_quick_entry_lines` VALUES ('1', '1', '0', 't-', '1', '0', '0');
1066 INSERT INTO `0_quick_entry_lines` VALUES ('2', '2', '0', 't-', '1', '0', '0');
1067 INSERT INTO `0_quick_entry_lines` VALUES ('3', '3', '0', 't-', '1', '0', '0');
1068 INSERT INTO `0_quick_entry_lines` VALUES ('4', '3', '0', '=', '4010', '0', '0');
1069 INSERT INTO `0_quick_entry_lines` VALUES ('5', '1', '0', '=', '5765', '0', '0');
1070 INSERT INTO `0_quick_entry_lines` VALUES ('6', '2', '0', '=', '5780', '0', '0');
1073 ### Structure of table `0_recurrent_invoices` ###
1075 DROP TABLE IF EXISTS `0_recurrent_invoices`;
1077 CREATE TABLE `0_recurrent_invoices` (
1078 `id` smallint(6) unsigned NOT NULL auto_increment,
1079 `description` varchar(60) NOT NULL default '',
1080 `order_no` int(11) unsigned NOT NULL,
1081 `debtor_no` int(11) unsigned default NULL,
1082 `group_no` smallint(6) unsigned default NULL,
1083 `days` int(11) NOT NULL default '0',
1084 `monthly` int(11) NOT NULL default '0',
1085 `begin` date NOT NULL default '0000-00-00',
1086 `end` date NOT NULL default '0000-00-00',
1087 `last_sent` date NOT NULL default '0000-00-00',
1089 UNIQUE KEY `description` (`description`)
1090 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1093 ### Data of table `0_recurrent_invoices` ###
1097 ### Structure of table `0_refs` ###
1099 DROP TABLE IF EXISTS `0_refs`;
1101 CREATE TABLE `0_refs` (
1102 `id` int(11) NOT NULL default '0',
1103 `type` int(11) NOT NULL default '0',
1104 `reference` varchar(100) NOT NULL default '',
1105 PRIMARY KEY (`id`,`type`)
1109 ### Data of table `0_refs` ###
1113 ### Structure of table `0_sales_order_details` ###
1115 DROP TABLE IF EXISTS `0_sales_order_details`;
1117 CREATE TABLE `0_sales_order_details` (
1118 `id` int(11) NOT NULL auto_increment,
1119 `order_no` int(11) NOT NULL default '0',
1120 `stk_code` varchar(20) NOT NULL default '',
1121 `description` tinytext,
1122 `qty_sent` double NOT NULL default '0',
1123 `unit_price` double NOT NULL default '0',
1124 `quantity` double NOT NULL default '0',
1125 `discount_percent` double NOT NULL default '0',
1127 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1130 ### Data of table `0_sales_order_details` ###
1134 ### Structure of table `0_sales_orders` ###
1136 DROP TABLE IF EXISTS `0_sales_orders`;
1138 CREATE TABLE `0_sales_orders` (
1139 `order_no` int(11) NOT NULL auto_increment,
1140 `version` tinyint(1) unsigned NOT NULL default '0',
1141 `type` tinyint(1) NOT NULL default '0',
1142 `debtor_no` int(11) NOT NULL default '0',
1143 `branch_code` int(11) NOT NULL default '0',
1144 `customer_ref` tinytext NOT NULL,
1145 `comments` tinytext,
1146 `ord_date` date NOT NULL default '0000-00-00',
1147 `order_type` int(11) NOT NULL default '0',
1148 `ship_via` int(11) NOT NULL default '0',
1149 `delivery_address` tinytext NOT NULL,
1150 `contact_phone` varchar(30) default NULL,
1151 `contact_email` varchar(100) default NULL,
1152 `deliver_to` tinytext NOT NULL,
1153 `freight_cost` double NOT NULL default '0',
1154 `from_stk_loc` varchar(5) NOT NULL default '',
1155 `delivery_date` date NOT NULL default '0000-00-00',
1156 PRIMARY KEY (`order_no`)
1157 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1160 ### Data of table `0_sales_orders` ###
1164 ### Structure of table `0_sales_pos` ###
1166 DROP TABLE IF EXISTS `0_sales_pos`;
1168 CREATE TABLE `0_sales_pos` (
1169 `id` smallint(6) unsigned NOT NULL auto_increment,
1170 `pos_name` varchar(30) NOT NULL,
1171 `cash_sale` tinyint(1) NOT NULL,
1172 `credit_sale` tinyint(1) NOT NULL,
1173 `pos_location` varchar(5) NOT NULL,
1174 `pos_account` smallint(6) unsigned NOT NULL,
1175 `inactive` tinyint(1) NOT NULL default '0',
1177 UNIQUE KEY `pos_name` (`pos_name`)
1178 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1181 ### Data of table `0_sales_pos` ###
1183 INSERT INTO `0_sales_pos` VALUES ('1', 'Default', '1', '1', 'DEF', '2', '0');
1186 ### Structure of table `0_sales_types` ###
1188 DROP TABLE IF EXISTS `0_sales_types`;
1190 CREATE TABLE `0_sales_types` (
1191 `id` int(11) NOT NULL auto_increment,
1192 `sales_type` char(50) NOT NULL default '',
1193 `tax_included` int(1) NOT NULL default '0',
1194 `factor` double NOT NULL default '1',
1195 `inactive` tinyint(1) NOT NULL default '0',
1197 UNIQUE KEY `sales_type` (`sales_type`)
1198 ) TYPE=MyISAM AUTO_INCREMENT=3 ;
1201 ### Data of table `0_sales_types` ###
1203 INSERT INTO `0_sales_types` VALUES ('1', 'Retail', '1', '1', '0');
1204 INSERT INTO `0_sales_types` VALUES ('2', 'Wholesale', '0', '0.7', '0');
1207 ### Structure of table `0_salesman` ###
1209 DROP TABLE IF EXISTS `0_salesman`;
1211 CREATE TABLE `0_salesman` (
1212 `salesman_code` int(11) NOT NULL auto_increment,
1213 `salesman_name` char(60) NOT NULL default '',
1214 `salesman_phone` char(30) NOT NULL default '',
1215 `salesman_fax` char(30) NOT NULL default '',
1216 `salesman_email` varchar(100) NOT NULL default '',
1217 `provision` double NOT NULL default '0',
1218 `break_pt` double NOT NULL default '0',
1219 `provision2` double NOT NULL default '0',
1220 `inactive` tinyint(1) NOT NULL default '0',
1221 PRIMARY KEY (`salesman_code`),
1222 UNIQUE KEY `salesman_name` (`salesman_name`)
1223 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1226 ### Data of table `0_salesman` ###
1228 INSERT INTO `0_salesman` VALUES ('1', 'Sales Person', '', '', '', '5', '1000', '4', '0');
1231 ### Structure of table `0_shippers` ###
1233 DROP TABLE IF EXISTS `0_shippers`;
1235 CREATE TABLE `0_shippers` (
1236 `shipper_id` int(11) NOT NULL auto_increment,
1237 `shipper_name` varchar(60) NOT NULL default '',
1238 `phone` varchar(30) NOT NULL default '',
1239 `contact` tinytext NOT NULL,
1240 `address` tinytext NOT NULL,
1241 `inactive` tinyint(1) NOT NULL default '0',
1242 PRIMARY KEY (`shipper_id`),
1243 UNIQUE KEY `name` (`shipper_name`)
1244 ) TYPE=MyISAM AUTO_INCREMENT=2 ;
1247 ### Data of table `0_shippers` ###
1249 INSERT INTO `0_shippers` VALUES ('1', 'Default', '', '', '', '0');
1252 ### Structure of table `0_sql_trail` ###
1254 DROP TABLE IF EXISTS `0_sql_trail`;
1256 CREATE TABLE `0_sql_trail` (
1257 `id` int(11) unsigned NOT NULL auto_increment,
1258 `sql` text NOT NULL,
1259 `result` tinyint(1) NOT NULL,
1260 `msg` varchar(255) NOT NULL,
1262 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1265 ### Data of table `0_sql_trail` ###
1269 ### Structure of table `0_stock_category` ###
1271 DROP TABLE IF EXISTS `0_stock_category`;
1273 CREATE TABLE `0_stock_category` (
1274 `category_id` int(11) NOT NULL auto_increment,
1275 `description` varchar(60) NOT NULL default '',
1276 `dflt_tax_type` int(11) NOT NULL default '0',
1277 `dflt_units` varchar(20) NOT NULL default 'each',
1278 `dflt_mb_flag` char(1) NOT NULL default 'B',
1279 `dflt_sales_act` varchar(11) NOT NULL default '',
1280 `dflt_cogs_act` varchar(11) NOT NULL default '',
1281 `dflt_inventory_act` varchar(11) NOT NULL default '',
1282 `dflt_adjustment_act` varchar(11) NOT NULL default '',
1283 `dflt_assembly_act` varchar(11) NOT NULL default '',
1284 `dflt_dim1` int(11) default NULL,
1285 `dflt_dim2` int(11) default NULL,
1286 `inactive` tinyint(1) NOT NULL default '0',
1287 `dflt_no_sale` tinyint(1) NOT NULL default '0',
1288 PRIMARY KEY (`category_id`),
1289 UNIQUE KEY `description` (`description`)
1290 ) TYPE=MyISAM AUTO_INCREMENT=5 ;
1293 ### Data of table `0_stock_category` ###
1295 INSERT INTO `0_stock_category` VALUES ('1', 'Components', '1', 'each', 'B', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1296 INSERT INTO `0_stock_category` VALUES ('2', 'Charges', '1', 'each', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1297 INSERT INTO `0_stock_category` VALUES ('3', 'Systems', '1', 'each', 'M', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1298 INSERT INTO `0_stock_category` VALUES ('4', 'Services', '1', 'hrs', 'D', '4010', '5010', '1510', '5040', '1530', '0', '0', '0', '0');
1301 ### Structure of table `0_stock_master` ###
1303 DROP TABLE IF EXISTS `0_stock_master`;
1305 CREATE TABLE `0_stock_master` (
1306 `stock_id` varchar(20) NOT NULL default '',
1307 `category_id` int(11) NOT NULL default '0',
1308 `tax_type_id` int(11) NOT NULL default '0',
1309 `description` varchar(200) NOT NULL default '',
1310 `long_description` tinytext NOT NULL,
1311 `units` varchar(20) NOT NULL default 'each',
1312 `mb_flag` char(1) NOT NULL default 'B',
1313 `sales_account` varchar(11) NOT NULL default '',
1314 `cogs_account` varchar(11) NOT NULL default '',
1315 `inventory_account` varchar(11) NOT NULL default '',
1316 `adjustment_account` varchar(11) NOT NULL default '',
1317 `assembly_account` varchar(11) NOT NULL default '',
1318 `dimension_id` int(11) default NULL,
1319 `dimension2_id` int(11) default NULL,
1320 `actual_cost` double NOT NULL default '0',
1321 `last_cost` double NOT NULL default '0',
1322 `material_cost` double NOT NULL default '0',
1323 `labour_cost` double NOT NULL default '0',
1324 `overhead_cost` double NOT NULL default '0',
1325 `inactive` tinyint(1) NOT NULL default '0',
1326 `no_sale` tinyint(1) NOT NULL default '0',
1327 PRIMARY KEY (`stock_id`)
1331 ### Data of table `0_stock_master` ###
1335 ### Structure of table `0_stock_moves` ###
1337 DROP TABLE IF EXISTS `0_stock_moves`;
1339 CREATE TABLE `0_stock_moves` (
1340 `trans_id` int(11) NOT NULL auto_increment,
1341 `trans_no` int(11) NOT NULL default '0',
1342 `stock_id` char(20) NOT NULL default '',
1343 `type` smallint(6) NOT NULL default '0',
1344 `loc_code` char(5) NOT NULL default '',
1345 `tran_date` date NOT NULL default '0000-00-00',
1346 `person_id` int(11) default NULL,
1347 `price` double NOT NULL default '0',
1348 `reference` char(40) NOT NULL default '',
1349 `qty` double NOT NULL default '1',
1350 `discount_percent` double NOT NULL default '0',
1351 `standard_cost` double NOT NULL default '0',
1352 `visible` tinyint(1) NOT NULL default '1',
1353 PRIMARY KEY (`trans_id`),
1354 KEY `type` (`type`,`trans_no`)
1355 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1358 ### Data of table `0_stock_moves` ###
1362 ### Structure of table `0_supp_allocations` ###
1364 DROP TABLE IF EXISTS `0_supp_allocations`;
1366 CREATE TABLE `0_supp_allocations` (
1367 `id` int(11) NOT NULL auto_increment,
1368 `amt` double unsigned default NULL,
1369 `date_alloc` date NOT NULL default '0000-00-00',
1370 `trans_no_from` int(11) default NULL,
1371 `trans_type_from` int(11) default NULL,
1372 `trans_no_to` int(11) default NULL,
1373 `trans_type_to` int(11) default NULL,
1375 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1378 ### Data of table `0_supp_allocations` ###
1382 ### Structure of table `0_supp_invoice_items` ###
1384 DROP TABLE IF EXISTS `0_supp_invoice_items`;
1386 CREATE TABLE `0_supp_invoice_items` (
1387 `id` int(11) NOT NULL auto_increment,
1388 `supp_trans_no` int(11) default NULL,
1389 `supp_trans_type` int(11) default NULL,
1390 `gl_code` varchar(11) NOT NULL default '0',
1391 `grn_item_id` int(11) default NULL,
1392 `po_detail_item_id` int(11) default NULL,
1393 `stock_id` varchar(20) NOT NULL default '',
1394 `description` tinytext,
1395 `quantity` double NOT NULL default '0',
1396 `unit_price` double NOT NULL default '0',
1397 `unit_tax` double NOT NULL default '0',
1400 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1403 ### Data of table `0_supp_invoice_items` ###
1407 ### Structure of table `0_supp_trans` ###
1409 DROP TABLE IF EXISTS `0_supp_trans`;
1411 CREATE TABLE `0_supp_trans` (
1412 `trans_no` int(11) unsigned NOT NULL default '0',
1413 `type` smallint(6) unsigned NOT NULL default '0',
1414 `supplier_id` int(11) unsigned default NULL,
1415 `reference` tinytext NOT NULL,
1416 `supp_reference` varchar(60) NOT NULL default '',
1417 `tran_date` date NOT NULL default '0000-00-00',
1418 `due_date` date NOT NULL default '0000-00-00',
1419 `ov_amount` double NOT NULL default '0',
1420 `ov_discount` double NOT NULL default '0',
1421 `ov_gst` double NOT NULL default '0',
1422 `rate` double NOT NULL default '1',
1423 `alloc` double NOT NULL default '0',
1424 PRIMARY KEY (`trans_no`,`type`),
1425 KEY `supplier_id` (`supplier_id`),
1426 KEY `SupplierID_2` (`supplier_id`,`supp_reference`),
1431 ### Data of table `0_supp_trans` ###
1435 ### Structure of table `0_suppliers` ###
1437 DROP TABLE IF EXISTS `0_suppliers`;
1439 CREATE TABLE `0_suppliers` (
1440 `supplier_id` int(11) NOT NULL auto_increment,
1441 `supp_name` varchar(60) NOT NULL default '',
1442 `supp_ref` varchar(30) NOT NULL default '',
1443 `address` tinytext NOT NULL,
1444 `supp_address` tinytext NOT NULL,
1445 `phone` varchar(30) NOT NULL default '',
1446 `fax` varchar(30) NOT NULL default '',
1447 `gst_no` varchar(25) NOT NULL default '',
1448 `contact` varchar(60) NOT NULL default '',
1449 `supp_account_no` varchar(40) NOT NULL default '',
1450 `email` varchar(100) NOT NULL default '',
1451 `website` varchar(100) NOT NULL default '',
1452 `bank_account` varchar(60) NOT NULL default '',
1453 `curr_code` char(3) default NULL,
1454 `payment_terms` int(11) default NULL,
1455 `dimension_id` int(11) default '0',
1456 `dimension2_id` int(11) default '0',
1457 `tax_group_id` int(11) default NULL,
1458 `credit_limit` double NOT NULL default '0',
1459 `purchase_account` varchar(11) default NULL,
1460 `payable_account` varchar(11) default NULL,
1461 `payment_discount_account` varchar(11) default NULL,
1462 `notes` tinytext NOT NULL,
1463 `inactive` tinyint(1) NOT NULL default '0',
1464 PRIMARY KEY (`supplier_id`)
1465 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1468 ### Data of table `0_suppliers` ###
1472 ### Structure of table `0_sys_types` ###
1474 DROP TABLE IF EXISTS `0_sys_types`;
1476 CREATE TABLE `0_sys_types` (
1477 `type_id` smallint(6) NOT NULL default '0',
1478 `type_name` varchar(60) NOT NULL default '',
1479 `type_no` int(11) NOT NULL default '1',
1480 `next_reference` varchar(100) NOT NULL default '',
1481 PRIMARY KEY (`type_id`)
1485 ### Data of table `0_sys_types` ###
1487 INSERT INTO `0_sys_types` VALUES ('0', 'Journal - GL', '17', '1');
1488 INSERT INTO `0_sys_types` VALUES ('1', 'Payment - GL', '7', '1');
1489 INSERT INTO `0_sys_types` VALUES ('2', 'Receipt - GL', '4', '1');
1490 INSERT INTO `0_sys_types` VALUES ('4', 'Funds Transfer', '3', '1');
1491 INSERT INTO `0_sys_types` VALUES ('10', 'Sales Invoice', '16', '1');
1492 INSERT INTO `0_sys_types` VALUES ('11', 'Credit Note', '2', '1');
1493 INSERT INTO `0_sys_types` VALUES ('12', 'Receipt', '6', '1');
1494 INSERT INTO `0_sys_types` VALUES ('13', 'Delivery', '1', '1');
1495 INSERT INTO `0_sys_types` VALUES ('16', 'Location Transfer', '2', '1');
1496 INSERT INTO `0_sys_types` VALUES ('17', 'Inventory Adjustment', '2', '1');
1497 INSERT INTO `0_sys_types` VALUES ('18', 'Purchase Order', '1', '1');
1498 INSERT INTO `0_sys_types` VALUES ('20', 'Supplier Invoice', '6', '1');
1499 INSERT INTO `0_sys_types` VALUES ('21', 'Supplier Credit Note', '1', '1');
1500 INSERT INTO `0_sys_types` VALUES ('22', 'Supplier Payment', '3', '1');
1501 INSERT INTO `0_sys_types` VALUES ('25', 'Purchase Order Delivery', '1', '1');
1502 INSERT INTO `0_sys_types` VALUES ('26', 'Work Order', '1', '1');
1503 INSERT INTO `0_sys_types` VALUES ('28', 'Work Order Issue', '1', '1');
1504 INSERT INTO `0_sys_types` VALUES ('29', 'Work Order Production', '1', '1');
1505 INSERT INTO `0_sys_types` VALUES ('30', 'Sales Order', '1', '1');
1506 INSERT INTO `0_sys_types` VALUES ('35', 'Cost Update', '1', '1');
1507 INSERT INTO `0_sys_types` VALUES ('40', 'Dimension', '1', '1');
1510 ### Structure of table `0_tax_group_items` ###
1512 DROP TABLE IF EXISTS `0_tax_group_items`;
1514 CREATE TABLE `0_tax_group_items` (
1515 `tax_group_id` int(11) NOT NULL default '0',
1516 `tax_type_id` int(11) NOT NULL default '0',
1517 `rate` double NOT NULL default '0',
1518 PRIMARY KEY (`tax_group_id`,`tax_type_id`)
1522 ### Data of table `0_tax_group_items` ###
1524 INSERT INTO `0_tax_group_items` VALUES ('1', '1', '5');
1527 ### Structure of table `0_tax_groups` ###
1529 DROP TABLE IF EXISTS `0_tax_groups`;
1531 CREATE TABLE `0_tax_groups` (
1532 `id` int(11) NOT NULL auto_increment,
1533 `name` varchar(60) NOT NULL default '',
1534 `tax_shipping` tinyint(1) NOT NULL default '0',
1535 `inactive` tinyint(1) NOT NULL default '0',
1537 UNIQUE KEY `name` (`name`)
1538 ) TYPE=InnoDB AUTO_INCREMENT=3 ;
1541 ### Data of table `0_tax_groups` ###
1543 INSERT INTO `0_tax_groups` VALUES ('1', 'Tax', '0', '0');
1544 INSERT INTO `0_tax_groups` VALUES ('2', 'Tax Exempt', '0', '0');
1547 ### Structure of table `0_tax_types` ###
1549 DROP TABLE IF EXISTS `0_tax_types`;
1551 CREATE TABLE `0_tax_types` (
1552 `id` int(11) NOT NULL auto_increment,
1553 `rate` double NOT NULL default '0',
1554 `sales_gl_code` varchar(11) NOT NULL default '',
1555 `purchasing_gl_code` varchar(11) NOT NULL default '',
1556 `name` varchar(60) NOT NULL default '',
1557 `inactive` tinyint(1) NOT NULL default '0',
1559 UNIQUE KEY `name` (`name`,`rate`)
1560 ) TYPE=InnoDB AUTO_INCREMENT=2 ;
1563 ### Data of table `0_tax_types` ###
1565 INSERT INTO `0_tax_types` VALUES ('1', '5', '2150', '2150', 'Tax', '0');
1568 ### Structure of table `0_trans_tax_details` ###
1570 DROP TABLE IF EXISTS `0_trans_tax_details`;
1572 CREATE TABLE `0_trans_tax_details` (
1573 `id` int(11) NOT NULL auto_increment,
1574 `trans_type` smallint(6) default NULL,
1575 `trans_no` int(11) default NULL,
1576 `tran_date` date NOT NULL,
1577 `tax_type_id` int(11) NOT NULL default '0',
1578 `rate` double NOT NULL default '0',
1579 `ex_rate` double NOT NULL default '1',
1580 `included_in_price` tinyint(1) NOT NULL default '0',
1581 `net_amount` double NOT NULL default '0',
1582 `amount` double NOT NULL default '0',
1585 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1588 ### Data of table `0_trans_tax_details` ###
1592 ### Structure of table `0_users` ###
1594 DROP TABLE IF EXISTS `0_users`;
1596 CREATE TABLE `0_users` (
1597 `id` SMALLINT(6) AUTO_INCREMENT,
1598 `user_id` varchar(60) NOT NULL default '',
1599 `password` varchar(100) NOT NULL default '',
1600 `real_name` varchar(100) NOT NULL default '',
1601 `role_id` int(11) NOT NULL default '1',
1602 `phone` varchar(30) NOT NULL default '',
1603 `email` varchar(100) default NULL,
1604 `language` varchar(20) default NULL,
1605 `date_format` tinyint(1) NOT NULL default '0',
1606 `date_sep` tinyint(1) NOT NULL default '0',
1607 `tho_sep` tinyint(1) NOT NULL default '0',
1608 `dec_sep` tinyint(1) NOT NULL default '0',
1609 `theme` varchar(20) NOT NULL default 'default',
1610 `page_size` varchar(20) NOT NULL default 'A4',
1611 `prices_dec` smallint(6) NOT NULL default '2',
1612 `qty_dec` smallint(6) NOT NULL default '2',
1613 `rates_dec` smallint(6) NOT NULL default '4',
1614 `percent_dec` smallint(6) NOT NULL default '1',
1615 `show_gl` tinyint(1) NOT NULL default '1',
1616 `show_codes` tinyint(1) NOT NULL default '0',
1617 `show_hints` tinyint(1) NOT NULL default '0',
1618 `last_visit_date` datetime default NULL,
1619 `query_size` tinyint(1) default '10',
1620 `graphic_links` tinyint(1) default '1',
1621 `pos` smallint(6) default '1',
1622 `print_profile` varchar(30) NOT NULL default '1',
1623 `rep_popup` tinyint(1) default '1',
1624 `sticky_doc_date` tinyint(1) default '0',
1625 `startup_tab` varchar(20) NOT NULL default '',
1626 `inactive` tinyint(1) NOT NULL default '0',
1628 UNIQUE KEY (`user_id`)
1629 ) TYPE=MyISAM AUTO_INCREMENT=2;
1632 ### Data of table `0_users` ###
1634 INSERT INTO `0_users` VALUES ('1', 'admin', '5f4dcc3b5aa765d61d8327deb882cf99', 'Administrator', '2', '', 'adm@adm.com', 'en_US', '0', '0', '0', '0', 'default', 'Letter', '2', '2', '4', '1', '1', '0', '0', '2008-04-04 12:34:29', '10', '1', '1', '1', '1', '0', 'orders', '0');
1636 ### Structure of table `0_voided` ###
1638 DROP TABLE IF EXISTS `0_voided`;
1640 CREATE TABLE `0_voided` (
1641 `type` int(11) NOT NULL default '0',
1642 `id` int(11) NOT NULL default '0',
1643 `date_` date NOT NULL default '0000-00-00',
1644 `memo_` tinytext NOT NULL,
1645 UNIQUE KEY `id` (`type`,`id`)
1649 ### Data of table `0_voided` ###
1653 ### Structure of table `0_wo_issue_items` ###
1655 DROP TABLE IF EXISTS `0_wo_issue_items`;
1657 CREATE TABLE `0_wo_issue_items` (
1658 `id` int(11) NOT NULL auto_increment,
1659 `stock_id` varchar(40) default NULL,
1660 `issue_id` int(11) default NULL,
1661 `qty_issued` double default NULL,
1663 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1666 ### Data of table `0_wo_issue_items` ###
1670 ### Structure of table `0_wo_issues` ###
1672 DROP TABLE IF EXISTS `0_wo_issues`;
1674 CREATE TABLE `0_wo_issues` (
1675 `issue_no` int(11) NOT NULL auto_increment,
1676 `workorder_id` int(11) NOT NULL default '0',
1677 `reference` varchar(100) default NULL,
1678 `issue_date` date default NULL,
1679 `loc_code` varchar(5) default NULL,
1680 `workcentre_id` int(11) default NULL,
1681 PRIMARY KEY (`issue_no`)
1682 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1685 ### Data of table `0_wo_issues` ###
1689 ### Structure of table `0_wo_manufacture` ###
1691 DROP TABLE IF EXISTS `0_wo_manufacture`;
1693 CREATE TABLE `0_wo_manufacture` (
1694 `id` int(11) NOT NULL auto_increment,
1695 `reference` varchar(100) default NULL,
1696 `workorder_id` int(11) NOT NULL default '0',
1697 `quantity` double NOT NULL default '0',
1698 `date_` date NOT NULL default '0000-00-00',
1700 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1703 ### Data of table `0_wo_manufacture` ###
1707 ### Structure of table `0_wo_requirements` ###
1709 DROP TABLE IF EXISTS `0_wo_requirements`;
1711 CREATE TABLE `0_wo_requirements` (
1712 `id` int(11) NOT NULL auto_increment,
1713 `workorder_id` int(11) NOT NULL default '0',
1714 `stock_id` char(20) NOT NULL default '',
1715 `workcentre` int(11) NOT NULL default '0',
1716 `units_req` double NOT NULL default '1',
1717 `std_cost` double NOT NULL default '0',
1718 `loc_code` char(5) NOT NULL default '',
1719 `units_issued` double NOT NULL default '0',
1721 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1724 ### Data of table `0_wo_requirements` ###
1728 ### Structure of table `0_workcentres` ###
1730 DROP TABLE IF EXISTS `0_workcentres`;
1732 CREATE TABLE `0_workcentres` (
1733 `id` int(11) NOT NULL auto_increment,
1734 `name` char(40) NOT NULL default '',
1735 `description` char(50) NOT NULL default '',
1736 `inactive` tinyint(1) NOT NULL default '0',
1738 UNIQUE KEY `name` (`name`)
1739 ) TYPE=MyISAM AUTO_INCREMENT=1 ;
1742 ### Data of table `0_workcentres` ###
1746 ### Structure of table `0_workorders` ###
1748 DROP TABLE IF EXISTS `0_workorders`;
1750 CREATE TABLE `0_workorders` (
1751 `id` int(11) NOT NULL auto_increment,
1752 `wo_ref` varchar(60) NOT NULL default '',
1753 `loc_code` varchar(5) NOT NULL default '',
1754 `units_reqd` double NOT NULL default '1',
1755 `stock_id` varchar(20) NOT NULL default '',
1756 `date_` date NOT NULL default '0000-00-00',
1757 `type` tinyint(4) NOT NULL default '0',
1758 `required_by` date NOT NULL default '0000-00-00',
1759 `released_date` date NOT NULL default '0000-00-00',
1760 `units_issued` double NOT NULL default '0',
1761 `closed` tinyint(1) NOT NULL default '0',
1762 `released` tinyint(1) NOT NULL default '0',
1763 `additional_costs` double NOT NULL default '0',
1765 UNIQUE KEY `wo_ref` (`wo_ref`)
1766 ) TYPE=InnoDB AUTO_INCREMENT=1 ;
1769 ### Data of table `0_workorders` ###