-- SQL-Ledger Backup
-- Dataset: testdb
-- Version: 3.2.4
-- Host: localhost
-- Login: admin@testdb
-- User: Admin Testdb
-- Date: Wed Feb 23 08:24:15 2022
--
DROP TABLE vr;
DROP TABLE archivedata;
DROP TABLE mimetype;
DROP TABLE reportvars;
DROP TABLE tax;
DROP TABLE address;
DROP TABLE pay_trans;
DROP TABLE partstax;
DROP TABLE payment;
DROP TABLE archive;
DROP TABLE recurringemail;
DROP TABLE gl;
DROP TABLE assembly;
DROP TABLE status;
DROP TABLE report;
DROP TABLE shipto;
DROP TABLE cargo;
DROP TABLE ap;
DROP TABLE partsvendor;
DROP TABLE recurringprint;
DROP TABLE pricegroup;
DROP TABLE wage;
DROP TABLE partsgroup;
DROP TABLE inventory;
DROP TABLE makemodel;
DROP TABLE semaphore;
DROP TABLE exchangerate;
DROP TABLE oe;
DROP TABLE employeededuction;
DROP TABLE acsrole;
DROP TABLE warehouse;
DROP TABLE chart;
DROP TABLE employeewage;
DROP TABLE dpt_trans;
DROP TABLE paymentmethod;
DROP TABLE audittrail;
DROP TABLE deduct;
DROP TABLE recurring;
DROP TABLE customer;
DROP TABLE vendor;
DROP TABLE partscustomer;
DROP TABLE ar;
DROP TABLE parts;
DROP TABLE invoice;
DROP TABLE language;
DROP TABLE acc_trans;
DROP TABLE translation;
DROP TABLE department;
DROP TABLE customertax;
DROP TABLE br;
DROP TABLE defaults;
DROP TABLE deduction;
DROP TABLE contact;
DROP TABLE reference;
DROP TABLE yearend;
DROP TABLE jcitems;
DROP TABLE gifi;
DROP TABLE deductionrate;
DROP TABLE payrate;
DROP TABLE project;
DROP TABLE orderitems;
DROP TABLE business;
DROP TABLE vendortax;
DROP TABLE curr;
DROP TABLE sic;
--
CREATE SEQUENCE inventoryid;
CREATE SEQUENCE assemblyid;
CREATE SEQUENCE invoiceid;
CREATE SEQUENCE orderitemsid;
CREATE SEQUENCE referenceid;
CREATE SEQUENCE archiveid;
CREATE SEQUENCE jcitemsid;
CREATE SEQUENCE addressid;
CREATE SEQUENCE contactid;
CREATE SEQUENCE id;
CREATE TABLE makemodel (
  parts_id int,
  make text,
  model text
);
CREATE TABLE gl (
  id int DEFAULT nextval('id'),
  reference text,
  description text,
  transdate date DEFAULT current_date,
  employee_id int,
  notes text,
  department_id int DEFAULT 0,
  approved bool DEFAULT 't',
  curr char(3),
  exchangerate float
);
CREATE TABLE chart (
  id int DEFAULT nextval('id'),
  accno text NOT NULL,
  description text,
  charttype char(1) DEFAULT 'A',
  category char(1),
  link text,
  gifi_accno text,
  contra bool DEFAULT 'f',
  closed bool DEFAULT 'f'
);
CREATE TABLE gifi (
  accno text,
  description text
);
CREATE TABLE defaults (
  fldname text,
  fldvalue text
);
CREATE TABLE acc_trans (
  trans_id int,
  chart_id int,
  amount float,
  transdate date DEFAULT current_date,
  source text,
  approved bool DEFAULT 't',
  fx_transaction bool DEFAULT 'f',
  project_id int,
  memo text,
  id int,
  cleared date,
  vr_id int
);
CREATE TABLE invoice (
  id int DEFAULT nextval('invoiceid') primary key,
  trans_id int,
  parts_id int,
  description text,
  qty float,
  allocated float,
  sellprice float,
  fxsellprice float,
  discount float4,
  assemblyitem bool DEFAULT 'f',
  unit varchar(5),
  project_id int,
  deliverydate date,
  serialnumber text,
  itemnotes text,
  lineitemdetail bool,
  ordernumber text,
  ponumber text,
  cost float,
  vendor text,
  vendor_id int,
  kititem bool DEFAULT 'f'
);
CREATE TABLE customer (
  id int DEFAULT nextval('id') primary key,
  name varchar(64),
  contact varchar(64),
  phone varchar(20),
  fax varchar(20),
  email text,
  notes text,
  terms int2 DEFAULT 0,
  taxincluded bool DEFAULT 'f',
  customernumber varchar(32),
  cc text,
  bcc text,
  business_id int,
  taxnumber varchar(32),
  sic_code varchar(6),
  discount float4,
  creditlimit float DEFAULT 0,
  employee_id int,
  language_code varchar(6),
  pricegroup_id int,
  curr char(3),
  startdate date,
  enddate date,
  arap_accno_id int,
  payment_accno_id int,
  discount_accno_id int,
  cashdiscount float4,
  discountterms int2,
  threshold float,
  paymentmethod_id int,
  remittancevoucher bool,
  prepayment_accno_id int
);
CREATE TABLE parts (
  id int DEFAULT nextval('id'),
  partnumber text,
  description text,
  unit varchar(5),
  listprice float,
  sellprice float,
  lastcost float,
  priceupdate date DEFAULT current_date,
  weight float,
  onhand float DEFAULT 0,
  notes text,
  makemodel bool DEFAULT 'f',
  assembly bool DEFAULT 'f',
  alternate bool DEFAULT 'f',
  rop float,
  inventory_accno_id int,
  income_accno_id int,
  expense_accno_id int,
  bin text,
  obsolete bool DEFAULT 'f',
  bom bool DEFAULT 'f',
  image text,
  drawing text,
  microfiche text,
  partsgroup_id int,
  project_id int,
  avgcost float,
  tariff_hscode text,
  countryorigin text,
  barcode text,
  toolnumber text,
  lot text,
  expires date,
  checkinventory bool default 'f'
);
CREATE TABLE assembly (
  id int DEFAULT nextval('assemblyid'),
  parts_id int,
  qty float,
  bom bool,
  adj bool,
  aid int
);
CREATE TABLE ar (
  id int DEFAULT nextval('id'),
  invnumber text,
  transdate date DEFAULT current_date,
  customer_id int,
  taxincluded bool,
  amount float,
  netamount float,
  paid float,
  datepaid date,
  duedate date,
  invoice bool DEFAULT 'f',
  shippingpoint text,
  terms int2 DEFAULT 0,
  notes text,
  curr char(3),
  ordnumber text,
  employee_id int,
  till varchar(20),
  quonumber text,
  intnotes text,
  department_id int DEFAULT 0,
  shipvia text,
  language_code varchar(6),
  ponumber text,
  approved bool DEFAULT 't',
  cashdiscount float4,
  discountterms int2,
  waybill text,
  warehouse_id int,
  description text,
  onhold bool DEFAULT 'f',
  exchangerate float,
  dcn text,
  bank_id int,
  paymentmethod_id int
);
CREATE TABLE ap (
  id int DEFAULT nextval('id'),
  invnumber text,
  transdate date DEFAULT current_date,
  vendor_id int,
  taxincluded bool DEFAULT 'f',
  amount float,
  netamount float,
  paid float,
  datepaid date,
  duedate date,
  invoice bool DEFAULT 'f',
  ordnumber text,
  curr char(3),
  notes text,
  employee_id int,
  till varchar(20),
  quonumber text,
  intnotes text,
  department_id int DEFAULT 0,
  shipvia text,
  language_code varchar(6),
  ponumber text,
  shippingpoint text,
  terms int2 DEFAULT 0,
  approved bool DEFAULT 't',
  cashdiscount float4,
  discountterms int2,
  waybill text,
  warehouse_id int,
  description text,
  onhold bool DEFAULT 'f',
  exchangerate float,
  dcn text,
  bank_id int,
  paymentmethod_id int
);
CREATE TABLE partstax (
  parts_id int,
  chart_id int
);
CREATE TABLE tax (
  chart_id int,
  rate float,
  taxnumber text,
  validto date
);
CREATE TABLE customertax (
  customer_id int,
  chart_id int
);
CREATE TABLE vendortax (
  vendor_id int,
  chart_id int
);
CREATE TABLE oe (
  id int DEFAULT nextval('id'),
  ordnumber text,
  transdate date DEFAULT current_date,
  vendor_id int,
  customer_id int,
  amount float,
  netamount float,
  reqdate date,
  taxincluded bool,
  shippingpoint text,
  notes text,
  curr char(3),
  employee_id int,
  closed bool DEFAULT 'f',
  quotation bool DEFAULT 'f',
  quonumber text,
  intnotes text,
  department_id int DEFAULT 0,
  shipvia text,
  language_code varchar(6),
  ponumber text,
  terms int2 DEFAULT 0,
  waybill text,
  warehouse_id int,
  description text,
  aa_id int,
  exchangerate float,
  backorder bool DEFAULT 'f'
);
CREATE TABLE orderitems (
  id int DEFAULT nextval('orderitemsid'),
  trans_id int,
  parts_id int,
  description text,
  qty float,
  sellprice float,
  discount float4,
  unit varchar(5),
  project_id int,
  reqdate date,
  ship float,
  serialnumber text,
  itemnotes text,
  lineitemdetail bool,
  ordernumber text,
  ponumber text,
  cost float,
  vendor text,
  vendor_id int
);
CREATE TABLE exchangerate (
  curr char(3),
  transdate date,
  exchangerate float
);
CREATE TABLE shipto (
  trans_id int,
  shiptoname varchar(64),
  shiptoaddress1 varchar(32),
  shiptoaddress2 varchar(32),
  shiptocity varchar(32),
  shiptostate varchar(32),
  shiptozipcode varchar(10),
  shiptocountry varchar(32),
  shiptocontact varchar(64),
  shiptophone varchar(20),
  shiptofax varchar(20),
  shiptoemail text,
  shiptorecurring bool DEFAULT 'f'
);
CREATE TABLE vendor (
  id int DEFAULT nextval('id') primary key,
  name varchar(64),
  contact varchar(64),
  phone varchar(20),
  fax varchar(20),
  email text,
  notes text,
  terms int2 DEFAULT 0,
  taxincluded bool DEFAULT 'f',
  vendornumber varchar(32),
  cc text,
  bcc text,
  gifi_accno varchar(30),
  business_id int,
  taxnumber varchar(32),
  sic_code varchar(6),
  discount float4,
  creditlimit float DEFAULT 0,
  employee_id int,
  language_code varchar(6),
  pricegroup_id int,
  curr char(3),
  startdate date,
  enddate date,
  arap_accno_id int,
  payment_accno_id int,
  discount_accno_id int,
  cashdiscount float4,
  discountterms int2,
  threshold float,
  paymentmethod_id int,
  remittancevoucher bool,
  prepayment_accno_id int
);
CREATE TABLE project (
  id int DEFAULT nextval('id'),
  projectnumber text,
  description text,
  startdate date,
  enddate date,
  parts_id int,
  production float DEFAULT 0,
  completed float DEFAULT 0,
  customer_id int
);
CREATE TABLE partsgroup (
  id int DEFAULT nextval('id'),
  partsgroup text,
  pos bool DEFAULT 't',
  code text,
  image text
);
CREATE TABLE status (
  trans_id int,
  formname text,
  printed bool DEFAULT 'f',
  emailed bool DEFAULT 'f',
  spoolfile text
);
CREATE TABLE department (
  id int DEFAULT nextval('id'),
  description text,
  role char(1) DEFAULT 'P',
  rn int
);
CREATE TABLE dpt_trans (
  trans_id int,
  department_id int
);
CREATE TABLE business (
  id int DEFAULT nextval('id'),
  description text,
  discount float4,
  rn int
);
CREATE TABLE sic (
  code varchar(6),
  sictype char(1),
  description text
);
CREATE TABLE warehouse (
  id int DEFAULT nextval('id'),
  description text,
  rn int
);
CREATE TABLE inventory (
  id int DEFAULT nextval('inventoryid'),
  warehouse_id int,
  parts_id int,
  trans_id int,
  orderitems_id int,
  qty float,
  shippingdate date,
  employee_id int
);
CREATE TABLE yearend (
  trans_id int,
  transdate date
);
CREATE TABLE partsvendor (
  vendor_id int,
  parts_id int,
  partnumber text,
  leadtime int2,
  lastcost float,
  curr char(3)
);
CREATE TABLE pricegroup (
  id int DEFAULT nextval('id'),
  pricegroup text
);
CREATE TABLE partscustomer (
  parts_id int,
  customer_id int,
  pricegroup_id int,
  pricebreak float,
  sellprice float,
  validfrom date,
  validto date,
  curr char(3)
);
CREATE TABLE language (
  code varchar(6),
  description text
);
CREATE TABLE audittrail (
  trans_id int,
  tablename text,
  reference text,
  formname text,
  action text,
  transdate timestamp DEFAULT current_timestamp,
  employee_id int
);
CREATE TABLE translation (
  trans_id int,
  language_code varchar(6),
  description text
);
CREATE TABLE recurring (
  id int,
  reference text,
  startdate date,
  nextdate date,
  enddate date,
  repeat int2,
  unit varchar(6),
  howmany int,
  payment bool DEFAULT 'f',
  description text
);
CREATE TABLE recurringemail (
  id int,
  formname text,
  format text,
  message text
);
CREATE TABLE recurringprint (
  id int,
  formname text,
  format text,
  printer text
);
CREATE TABLE jcitems (
  id int DEFAULT nextval('jcitemsid'),
  project_id int,
  parts_id int,
  description text,
  qty float,
  allocated float,
  sellprice float,
  fxsellprice float,
  serialnumber text,
  checkedin timestamp with time zone,
  checkedout timestamp with time zone,
  employee_id int,
  notes text
);
CREATE TABLE cargo (
  id int not null,
  trans_id int not null,
  package text,
  netweight float,
  grossweight float,
  volume float
);
CREATE TABLE br (
  id int DEFAULT nextval('id') primary key,
  batchnumber text,
  description text,
  batch text,
  transdate date DEFAULT current_date,
  apprdate date,
  amount float,
  managerid int,
  employee_id int
);
CREATE TABLE vr (
  br_id int references br (id) on delete cascade,
  trans_id int not null,
  id int not null DEFAULT nextval('id'),
  vouchernumber text
);
CREATE TABLE semaphore (
  id int,
  login text,
  module text,
  expires varchar(12)
);
CREATE TABLE address (
  id int DEFAULT nextval('addressid') primary key,
  trans_id int,
  address1 varchar(32),
  address2 varchar(32),
  city varchar(32),
  state varchar(32),
  zipcode varchar(10),
  country varchar(32)
);
CREATE TABLE contact (
  id int default nextval('contactid') primary key,
  trans_id int not null,
  salutation varchar(32),
  firstname varchar(32),
  lastname varchar(32),
  contacttitle varchar(32),
  occupation varchar(32),
  phone varchar(20),
  fax varchar(20),
  mobile varchar(20),
  email text,
  gender char(1) default 'M',
  parent_id int,
  typeofcontact varchar(20)
);
CREATE TABLE paymentmethod (
  id int primary key default nextval('id'),
  description text,
  fee float,
  rn int,
  roundchange float4
);
CREATE TABLE payment (
  id int not null,
  trans_id int not null,
  exchangerate float default 1,
  paymentmethod_id int
);
CREATE TABLE curr (
  rn int2,
  curr char(3) primary key,
  prec int2
);
CREATE TABLE report (
  reportid int primary key default nextval('id'),
  reportcode text,
  reportdescription text,
  login text
);
CREATE TABLE reportvars (
  reportid int not null,
  reportvariable text,
  reportvalue text
);
CREATE TABLE employeededuction (
  id int,
  employee_id int,
  deduction_id int,
  exempt float,
  maximum float
);
CREATE TABLE pay_trans (
  trans_id int,
  id int,
  glid int,
  qty float,
  amount float
);
CREATE TABLE deduction (
  id int default nextval('id') primary key,
  description text,
  employee_accno_id int,
  employeepays float4,
  employer_accno_id int,
  employerpays float4,
  fromage int2,
  toage int2,
  agedob bool,
  basedon int
);
CREATE TABLE deduct (
  trans_id int,
  deduction_id int,
  withholding bool,
  percent float4
);
CREATE TABLE deductionrate (
  rn int2,
  trans_id int,
  rate float,
  amount float,
  above float,
  below float
);
CREATE TABLE wage (
  id int default nextval('id') primary key,
  description text,
  amount float,
  defer int,
  exempt bool default 'f',
  chart_id int
);
CREATE TABLE payrate (
  trans_id int,
  id int,
  rate float,
  above float
);
CREATE TABLE employeewage (
  id int,
  employee_id int,
  wage_id int
);
CREATE TABLE reference (
  id int default nextval('referenceid') primary key,
  code text,
  trans_id int,
  description text,
  archive_id int,
  login text,
  formname text,
  folder text
);
CREATE TABLE acsrole (
  id int default nextval('id') primary key,
  description text,
  acs text,
  rn int2
);
CREATE TABLE archive (
  id int default nextval('archiveid') primary key,
  filename text
);
CREATE TABLE archivedata (
  archive_id int references archive (id) on delete cascade,
  bt text,
  rn int
);
CREATE TABLE mimetype (
  extension varchar(32) primary key,
  contenttype varchar(64)
);
-- Pg-upgrade-3.2.3-3.2.4.sql
alter table shipto add shiptorecurring bool default 'f';
update shipto set shiptorecurring = 'f';
update defaults set fldvalue = '3.2.4' where fldname = 'version';
-- Pg-functions.sql

-- set options
;set client_encoding to 'UTF8';
--
INSERT INTO mimetype (extension,contenttype) VALUES ('acx','application/internet-property-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('ai','application/postscript');
INSERT INTO mimetype (extension,contenttype) VALUES ('aif','audio/x-aiff');
INSERT INTO mimetype (extension,contenttype) VALUES ('aifc','audio/x-aiff');
INSERT INTO mimetype (extension,contenttype) VALUES ('aiff','audio/x-aiff');
INSERT INTO mimetype (extension,contenttype) VALUES ('asf','video/x-ms-asf');
INSERT INTO mimetype (extension,contenttype) VALUES ('asr','video/x-ms-asf');
INSERT INTO mimetype (extension,contenttype) VALUES ('asx','video/x-ms-asf');
INSERT INTO mimetype (extension,contenttype) VALUES ('au','audio/basic');
INSERT INTO mimetype (extension,contenttype) VALUES ('avi','video/x-msvideo');
INSERT INTO mimetype (extension,contenttype) VALUES ('axs','application/olescript');
INSERT INTO mimetype (extension,contenttype) VALUES ('bas','text/plain');
INSERT INTO mimetype (extension,contenttype) VALUES ('bcpio','application/x-bcpio');
INSERT INTO mimetype (extension,contenttype) VALUES ('bin','application/octet-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('bmp','image/bmp');
INSERT INTO mimetype (extension,contenttype) VALUES ('c','text/plain');
INSERT INTO mimetype (extension,contenttype) VALUES ('cat','application/vnd.ms-pkiseccat');
INSERT INTO mimetype (extension,contenttype) VALUES ('cdf','application/x-cdf');
INSERT INTO mimetype (extension,contenttype) VALUES ('cer','application/x-x509-ca-cert');
INSERT INTO mimetype (extension,contenttype) VALUES ('class','application/octet-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('clp','application/x-msclip');
INSERT INTO mimetype (extension,contenttype) VALUES ('cmx','image/x-cmx');
INSERT INTO mimetype (extension,contenttype) VALUES ('cod','image/cis-cod');
INSERT INTO mimetype (extension,contenttype) VALUES ('cpio','application/x-cpio');
INSERT INTO mimetype (extension,contenttype) VALUES ('crd','application/x-mscardfile');
INSERT INTO mimetype (extension,contenttype) VALUES ('crl','application/pkix-crl');
INSERT INTO mimetype (extension,contenttype) VALUES ('crt','application/x-x509-ca-cert');
INSERT INTO mimetype (extension,contenttype) VALUES ('csh','application/x-csh');
INSERT INTO mimetype (extension,contenttype) VALUES ('css','text/css');
INSERT INTO mimetype (extension,contenttype) VALUES ('dcr','application/x-director');
INSERT INTO mimetype (extension,contenttype) VALUES ('der','application/x-x509-ca-cert');
INSERT INTO mimetype (extension,contenttype) VALUES ('dir','application/x-director');
INSERT INTO mimetype (extension,contenttype) VALUES ('dll','application/x-msdownload');
INSERT INTO mimetype (extension,contenttype) VALUES ('dms','application/octet-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('doc','application/msword');
INSERT INTO mimetype (extension,contenttype) VALUES ('dot','application/msword');
INSERT INTO mimetype (extension,contenttype) VALUES ('dvi','application/x-dvi');
INSERT INTO mimetype (extension,contenttype) VALUES ('dxr','application/x-director');
INSERT INTO mimetype (extension,contenttype) VALUES ('eps','application/postscript');
INSERT INTO mimetype (extension,contenttype) VALUES ('etx','text/x-setext');
INSERT INTO mimetype (extension,contenttype) VALUES ('evy','application/envoy');
INSERT INTO mimetype (extension,contenttype) VALUES ('exe','application/octet-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('fif','application/fractals');
INSERT INTO mimetype (extension,contenttype) VALUES ('flr','x-world/x-vrml');
INSERT INTO mimetype (extension,contenttype) VALUES ('gif','image/gif');
INSERT INTO mimetype (extension,contenttype) VALUES ('gtar','application/x-gtar');
INSERT INTO mimetype (extension,contenttype) VALUES ('gz','application/x-gzip');
INSERT INTO mimetype (extension,contenttype) VALUES ('h','text/plain');
INSERT INTO mimetype (extension,contenttype) VALUES ('hdf','application/x-hdf');
INSERT INTO mimetype (extension,contenttype) VALUES ('hlp','application/winhlp');
INSERT INTO mimetype (extension,contenttype) VALUES ('hqx','application/mac-binhex40');
INSERT INTO mimetype (extension,contenttype) VALUES ('hta','application/hta');
INSERT INTO mimetype (extension,contenttype) VALUES ('htc','text/x-component');
INSERT INTO mimetype (extension,contenttype) VALUES ('htm','text/html');
INSERT INTO mimetype (extension,contenttype) VALUES ('html','text/html');
INSERT INTO mimetype (extension,contenttype) VALUES ('htt','text/webviewhtml');
INSERT INTO mimetype (extension,contenttype) VALUES ('ico','image/x-icon');
INSERT INTO mimetype (extension,contenttype) VALUES ('ief','image/ief');
INSERT INTO mimetype (extension,contenttype) VALUES ('iii','application/x-iphone');
INSERT INTO mimetype (extension,contenttype) VALUES ('ins','application/x-internet-signup');
INSERT INTO mimetype (extension,contenttype) VALUES ('isp','application/x-internet-signup');
INSERT INTO mimetype (extension,contenttype) VALUES ('jfif','image/pipeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('jpe','image/jpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('jpeg','image/jpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('jpg','image/jpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('js','application/x-javascript');
INSERT INTO mimetype (extension,contenttype) VALUES ('latex','application/x-latex');
INSERT INTO mimetype (extension,contenttype) VALUES ('lha','application/octet-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('lsf','video/x-la-asf');
INSERT INTO mimetype (extension,contenttype) VALUES ('lsx','video/x-la-asf');
INSERT INTO mimetype (extension,contenttype) VALUES ('lzh','application/octet-stream');
INSERT INTO mimetype (extension,contenttype) VALUES ('m13','application/x-msmediaview');
INSERT INTO mimetype (extension,contenttype) VALUES ('m14','application/x-msmediaview');
INSERT INTO mimetype (extension,contenttype) VALUES ('m3u','audio/x-mpegurl');
INSERT INTO mimetype (extension,contenttype) VALUES ('man','application/x-troff-man');
INSERT INTO mimetype (extension,contenttype) VALUES ('mdb','application/x-msaccess');
INSERT INTO mimetype (extension,contenttype) VALUES ('me','application/x-troff-me');
INSERT INTO mimetype (extension,contenttype) VALUES ('mht','message/rfc822');
INSERT INTO mimetype (extension,contenttype) VALUES ('mhtml','message/rfc822');
INSERT INTO mimetype (extension,contenttype) VALUES ('mid','audio/mid');
INSERT INTO mimetype (extension,contenttype) VALUES ('mny','application/x-msmoney');
INSERT INTO mimetype (extension,contenttype) VALUES ('mov','video/quicktime');
INSERT INTO mimetype (extension,contenttype) VALUES ('movie','video/x-sgi-movie');
INSERT INTO mimetype (extension,contenttype) VALUES ('mp2','video/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('mp3','audio/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('mpa','video/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('mpe','video/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('mpeg','video/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('mpg','video/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('mpp','application/vnd.ms-project');
INSERT INTO mimetype (extension,contenttype) VALUES ('mpv2','video/mpeg');
INSERT INTO mimetype (extension,contenttype) VALUES ('ms','application/x-troff-ms');
INSERT INTO mimetype (extension,contenttype) VALUES ('mvb','application/x-msmediaview');
INSERT INTO mimetype (extension,contenttype) VALUES ('nws','message/rfc822');
INSERT INTO mimetype (extension,contenttype) VALUES ('oda','application/oda');
INSERT INTO mimetype (extension,contenttype) VALUES ('ods','application/vnd.oasis.opendocument.spreadsheet');
INSERT INTO mimetype (extension,contenttype) VALUES ('odt','application/vnd.oasis.opendocument.document');
INSERT INTO mimetype (extension,contenttype) VALUES ('p10','application/pkcs10');
INSERT INTO mimetype (extension,contenttype) VALUES ('p12','application/x-pkcs12');
INSERT INTO mimetype (extension,contenttype) VALUES ('p7b','application/x-pkcs7-certificates');
INSERT INTO mimetype (extension,contenttype) VALUES ('p7c','application/x-pkcs7-mime');
INSERT INTO mimetype (extension,contenttype) VALUES ('p7m','application/x-pkcs7-mime');
INSERT INTO mimetype (extension,contenttype) VALUES ('p7r','application/x-pkcs7-certreqresp');
INSERT INTO mimetype (extension,contenttype) VALUES ('p7s','application/x-pkcs7-signature');
INSERT INTO mimetype (extension,contenttype) VALUES ('pbm','image/x-portable-bitmap');
INSERT INTO mimetype (extension,contenttype) VALUES ('pdf','application/pdf');
INSERT INTO mimetype (extension,contenttype) VALUES ('pfx','application/x-pkcs12');
INSERT INTO mimetype (extension,contenttype) VALUES ('pgm','image/x-portable-graymap');
INSERT INTO mimetype (extension,contenttype) VALUES ('pko','application/ynd.ms-pkipko');
INSERT INTO mimetype (extension,contenttype) VALUES ('pma','application/x-perfmon');
INSERT INTO mimetype (extension,contenttype) VALUES ('pmc','application/x-perfmon');
INSERT INTO mimetype (extension,contenttype) VALUES ('pml','application/x-perfmon');
INSERT INTO mimetype (extension,contenttype) VALUES ('pmr','application/x-perfmon');
INSERT INTO mimetype (extension,contenttype) VALUES ('pmw','application/x-perfmon');
INSERT INTO mimetype (extension,contenttype) VALUES ('png','image/png');
INSERT INTO mimetype (extension,contenttype) VALUES ('pnm','image/x-portable-anymap');
INSERT INTO mimetype (extension,contenttype) VALUES ('pot','application/vnd.ms-powerpoint');
INSERT INTO mimetype (extension,contenttype) VALUES ('ppm','image/x-portable-pixmap');
INSERT INTO mimetype (extension,contenttype) VALUES ('pps','application/vnd.ms-powerpoint');
INSERT INTO mimetype (extension,contenttype) VALUES ('ppt','application/vnd.ms-powerpoint');
INSERT INTO mimetype (extension,contenttype) VALUES ('prf','application/pics-rules');
INSERT INTO mimetype (extension,contenttype) VALUES ('ps','application/postscript');
INSERT INTO mimetype (extension,contenttype) VALUES ('pub','application/x-mspublisher');
INSERT INTO mimetype (extension,contenttype) VALUES ('qt','video/quicktime');
INSERT INTO mimetype (extension,contenttype) VALUES ('ra','audio/x-pn-realaudio');
INSERT INTO mimetype (extension,contenttype) VALUES ('ram','audio/x-pn-realaudio');
INSERT INTO mimetype (extension,contenttype) VALUES ('ras','image/x-cmu-raster');
INSERT INTO mimetype (extension,contenttype) VALUES ('rgb','image/x-rgb');
INSERT INTO mimetype (extension,contenttype) VALUES ('rmi','audio/mid');
INSERT INTO mimetype (extension,contenttype) VALUES ('roff','application/x-troff');
INSERT INTO mimetype (extension,contenttype) VALUES ('rtf','application/rtf');
INSERT INTO mimetype (extension,contenttype) VALUES ('rtx','text/richtext');
INSERT INTO mimetype (extension,contenttype) VALUES ('scd','application/x-msschedule');
INSERT INTO mimetype (extension,contenttype) VALUES ('sct','text/scriptlet');
INSERT INTO mimetype (extension,contenttype) VALUES ('setpay','application/set-payment-initiation');
INSERT INTO mimetype (extension,contenttype) VALUES ('setreg','application/set-registration-initiation');
INSERT INTO mimetype (extension,contenttype) VALUES ('sh','application/x-sh');
INSERT INTO mimetype (extension,contenttype) VALUES ('shar','application/x-shar');
INSERT INTO mimetype (extension,contenttype) VALUES ('sit','application/x-stuffit');
INSERT INTO mimetype (extension,contenttype) VALUES ('snd','audio/basic');
INSERT INTO mimetype (extension,contenttype) VALUES ('spc','application/x-pkcs7-certificates');
INSERT INTO mimetype (extension,contenttype) VALUES ('spl','application/futuresplash');
INSERT INTO mimetype (extension,contenttype) VALUES ('src','application/x-wais-source');
INSERT INTO mimetype (extension,contenttype) VALUES ('sst','application/vnd.ms-pkicertstore');
INSERT INTO mimetype (extension,contenttype) VALUES ('stl','application/vnd.ms-pkistl');
INSERT INTO mimetype (extension,contenttype) VALUES ('stm','text/html');
INSERT INTO mimetype (extension,contenttype) VALUES ('svg','image/svg+xml');
INSERT INTO mimetype (extension,contenttype) VALUES ('sv4cpio','application/x-sv4cpio');
INSERT INTO mimetype (extension,contenttype) VALUES ('sv4crc','application/x-sv4crc');
INSERT INTO mimetype (extension,contenttype) VALUES ('swf','application/x-shockwave-flash');
INSERT INTO mimetype (extension,contenttype) VALUES ('t','application/x-troff');
INSERT INTO mimetype (extension,contenttype) VALUES ('tar','application/x-tar');
INSERT INTO mimetype (extension,contenttype) VALUES ('tcl','application/x-tcl');
INSERT INTO mimetype (extension,contenttype) VALUES ('tex','application/x-tex');
INSERT INTO mimetype (extension,contenttype) VALUES ('texi','application/x-texinfo');
INSERT INTO mimetype (extension,contenttype) VALUES ('texinfo','application/x-texinfo');
INSERT INTO mimetype (extension,contenttype) VALUES ('tgz','application/x-compressed');
INSERT INTO mimetype (extension,contenttype) VALUES ('tif','image/tiff');
INSERT INTO mimetype (extension,contenttype) VALUES ('tiff','image/tiff');
INSERT INTO mimetype (extension,contenttype) VALUES ('tr','application/x-troff');
INSERT INTO mimetype (extension,contenttype) VALUES ('trm','application/x-msterminal');
INSERT INTO mimetype (extension,contenttype) VALUES ('tsv','text/tab-separated-values');
INSERT INTO mimetype (extension,contenttype) VALUES ('txt','text/plain');
INSERT INTO mimetype (extension,contenttype) VALUES ('uls','text/iuls');
INSERT INTO mimetype (extension,contenttype) VALUES ('ustar','application/x-ustar');
INSERT INTO mimetype (extension,contenttype) VALUES ('vcf','text/x-vcard');
INSERT INTO mimetype (extension,contenttype) VALUES ('vrml','x-world/x-vrml');
INSERT INTO mimetype (extension,contenttype) VALUES ('wav','audio/x-wav');
INSERT INTO mimetype (extension,contenttype) VALUES ('wcm','application/vnd.ms-works');
INSERT INTO mimetype (extension,contenttype) VALUES ('wdb','application/vnd.ms-works');
INSERT INTO mimetype (extension,contenttype) VALUES ('wks','application/vnd.ms-works');
INSERT INTO mimetype (extension,contenttype) VALUES ('wmf','application/x-msmetafile');
INSERT INTO mimetype (extension,contenttype) VALUES ('wps','application/vnd.ms-works');
INSERT INTO mimetype (extension,contenttype) VALUES ('wri','application/x-mswrite');
INSERT INTO mimetype (extension,contenttype) VALUES ('wrl','x-world/x-vrml');
INSERT INTO mimetype (extension,contenttype) VALUES ('wrz','x-world/x-vrml');
INSERT INTO mimetype (extension,contenttype) VALUES ('xaf','x-world/x-vrml');
INSERT INTO mimetype (extension,contenttype) VALUES ('xbm','image/x-xbitmap');
INSERT INTO mimetype (extension,contenttype) VALUES ('xla','application/vnd.ms-excel');
INSERT INTO mimetype (extension,contenttype) VALUES ('xlc','application/vnd.ms-excel');
INSERT INTO mimetype (extension,contenttype) VALUES ('xlm','application/vnd.ms-excel');
INSERT INTO mimetype (extension,contenttype) VALUES ('xls','application/vnd.ms-excel');
INSERT INTO mimetype (extension,contenttype) VALUES ('xlt','application/vnd.ms-excel');
INSERT INTO mimetype (extension,contenttype) VALUES ('xlw','application/vnd.ms-excel');
INSERT INTO mimetype (extension,contenttype) VALUES ('xof','x-world/x-vrml');
INSERT INTO mimetype (extension,contenttype) VALUES ('xpm','image/x-xpixmap');
INSERT INTO mimetype (extension,contenttype) VALUES ('xwd','image/x-xwindowdump');
INSERT INTO mimetype (extension,contenttype) VALUES ('z','application/x-compress');
INSERT INTO mimetype (extension,contenttype) VALUES ('zip','application/zip');
INSERT INTO tax (chart_id,rate,taxnumber,validto) VALUES ('10024','0','',NULL);
INSERT INTO wage (id,description,amount,defer,exempt,chart_id) VALUES ('10071','Wages-Level01','300000',NULL,'0','10046');
INSERT INTO wage (id,description,amount,defer,exempt,chart_id) VALUES ('10072','Wages-Level02','600000',NULL,'0','10046');
INSERT INTO wage (id,description,amount,defer,exempt,chart_id) VALUES ('10073','Wages-Level03','1000000',NULL,'0','10046');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10001','1000','CURRENT ASSETS','H','A','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10002','1060','Checking Account','A','A','AR_paid:AP_paid','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10004','1200','Accounts Receivables','A','A','AR','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10005','1205','Allowance for doubtful accounts','A','A','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10006','1500','INVENTORY ASSETS','H','A','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10009','1800','CAPITAL ASSETS','H','A','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10010','1820','Office Furniture & Equipment','A','A','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10011','1825','Accum. Amort. -Furn. & Equip.','A','A','','','1','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10012','1840','Vehicle','A','A','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10013','1845','Accum. Amort. -Vehicle','A','A','','','1','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10014','2000','CURRENT LIABILITIES','H','L','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10015','2100','Accounts Payable','A','L','AP','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10018','2210','Workers Comp Payable','A','L','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10019','2220','Vacation Pay Payable','A','L','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10021','2260','Employment Insurance Payable','A','L','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10029','3300','SHARE CAPITAL','H','Q','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10038','4440','Interest','A','I','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10039','4450','Foreign Exchange Gain','A','I','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10040','5000','COST OF GOODS SOLD','H','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10041','5010','Purchases','A','E','AP_amount:IC_expense','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10045','5400','PAYROLL EXPENSES','H','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10047','5420','Employment Insurance Expense','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10049','5440','Workers Comp Expense','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10050','5470','Employee Benefits','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10051','5600','GENERAL & ADMINISTRATIVE EXPENSES','H','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10052','5610','Accounting & Legal','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10054','5620','Bad Debts','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10055','5650','Capital Cost Allowance Expense','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10056','5660','Amortization Expense','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10058','5685','Insurance','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10059','5690','Interest & Bank Charges','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10060','5700','Office Supplies','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10061','5760','Rent','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10062','5765','Repair & Maintenance','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10063','5780','Telephone','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10064','5785','Travel & Entertainment','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10065','5790','Utilities','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10066','5795','Registrations','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10067','5800','Licenses','A','E','AP_amount','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10068','5810','Foreign Exchange Loss','A','E','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10022','2280','PAYE','A','L','AP_amount:IC_expense','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10048','5430','NSSF Expense','A','E','AP_amount:IC_expense','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10020','2250','NSSF Payable','A','L','AP_amount:IC_expense','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10046','5410','Wages & Salaries','A','E','AP_amount:IC_expense','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10070','2110','Accounts Payable-Staff','A','L','AP','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10042','5020','COGS / General','A','E','AP_amount:IC_cogs','','0','1');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10043','5030','COGS / Aftermarket Parts','A','E','AP_amount:IC_cogs','','0','1');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10044','5100','Freight','A','E','AP_amount:IC_expense','','0','1');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10003','1065','CashBox','A','A','AR_paid:AP_paid','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10007','1520','Inventory / General','A','A','IC','','0','1');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10008','1530','Inventory / Aftermarket Parts','A','A','IC','','0','1');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10024','2320','VAT (0%)','A','L','AR_tax:AP_tax:IC_taxpart:IC_taxservice','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10069','3360','LastYear Carry-over Value','A','Q','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10032','4020','Contributions / GeneralFund','A','I','AR_amount:IC_income','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10031','4000','Contributions / GeneralFund','H','I','','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10057','5680','NSSF-SocialSecurity-Employer','A','E','AP_amount:IC_expense','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10081','2350','FundNatl','A','L','AR_amount:IC_income','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10082','2355','FundCBC','A','L','AR_amount:IC_income','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10083','2360','FundInternatl','A','L','AR_amount:IC_income','','0','0');
INSERT INTO chart (id,accno,description,charttype,category,link,gifi_accno,contra,closed) VALUES ('10088','4460','Cash Overs & Shorts','A','I','AR_amount:IC_income','','0','0');
INSERT INTO parts (id,partnumber,description,unit,listprice,sellprice,lastcost,priceupdate,weight,onhand,notes,makemodel,assembly,alternate,rop,inventory_accno_id,income_accno_id,expense_accno_id,bin,obsolete,bom,image,drawing,microfiche,partsgroup_id,project_id,avgcost,tariff_hscode,countryorigin,barcode,toolnumber,lot,expires,checkinventory) VALUES ('10080','FundLocal','','','0','1','0','2022-02-02','0','0','','0','0','0','0',NULL,'10032','10041',NULL,'0','0','','','','0',NULL,NULL,'','','','',NULL,NULL,'0');
INSERT INTO parts (id,partnumber,description,unit,listprice,sellprice,lastcost,priceupdate,weight,onhand,notes,makemodel,assembly,alternate,rop,inventory_accno_id,income_accno_id,expense_accno_id,bin,obsolete,bom,image,drawing,microfiche,partsgroup_id,project_id,avgcost,tariff_hscode,countryorigin,barcode,toolnumber,lot,expires,checkinventory) VALUES ('10084','FundNatl','','','0','1','0','2022-02-02','0','0','','0','0','0','0',NULL,'10081','10041',NULL,'0','0','','','','0',NULL,NULL,'','','','',NULL,NULL,'0');
INSERT INTO parts (id,partnumber,description,unit,listprice,sellprice,lastcost,priceupdate,weight,onhand,notes,makemodel,assembly,alternate,rop,inventory_accno_id,income_accno_id,expense_accno_id,bin,obsolete,bom,image,drawing,microfiche,partsgroup_id,project_id,avgcost,tariff_hscode,countryorigin,barcode,toolnumber,lot,expires,checkinventory) VALUES ('10085','FundCBC','','','0','1','0','2022-02-02','0','0','','0','0','0','0',NULL,'10082','10041',NULL,'0','0','','','','0',NULL,NULL,'','','','',NULL,NULL,'0');
INSERT INTO parts (id,partnumber,description,unit,listprice,sellprice,lastcost,priceupdate,weight,onhand,notes,makemodel,assembly,alternate,rop,inventory_accno_id,income_accno_id,expense_accno_id,bin,obsolete,bom,image,drawing,microfiche,partsgroup_id,project_id,avgcost,tariff_hscode,countryorigin,barcode,toolnumber,lot,expires,checkinventory) VALUES ('10086','FundInternatl','','','0','1','0','2022-02-02','0','0','','0','0','0','0',NULL,'10083','10041',NULL,'0','0','','','','0',NULL,NULL,'','','','',NULL,NULL,'0');
INSERT INTO department (id,description,role,rn) VALUES ('10089','Secretariat','C','1');
INSERT INTO department (id,description,role,rn) VALUES ('10090','Treasury','C','2');
INSERT INTO department (id,description,role,rn) VALUES ('10091','Growth Committee','C','3');
INSERT INTO defaults (fldname,fldvalue) VALUES ('version','3.2.4');
INSERT INTO defaults (fldname,fldvalue) VALUES ('inventory_accno_id','10007');
INSERT INTO defaults (fldname,fldvalue) VALUES ('income_accno_id','10032');
INSERT INTO defaults (fldname,fldvalue) VALUES ('expense_accno_id','10041');
INSERT INTO defaults (fldname,fldvalue) VALUES ('fxgainloss_accno_id','10039');
INSERT INTO defaults (fldname,fldvalue) VALUES ('cashovershort_accno_id','10088');
INSERT INTO defaults (fldname,fldvalue) VALUES ('precision','0');
INSERT INTO defaults (fldname,fldvalue) VALUES ('company','TestAssembly');
INSERT INTO defaults (fldname,fldvalue) VALUES ('weightunit','kg');
INSERT INTO defaults (fldname,fldvalue) VALUES ('method','cash');
INSERT INTO defaults (fldname,fldvalue) VALUES ('roundchange','1');
INSERT INTO defaults (fldname,fldvalue) VALUES ('glnumber','GL0001');
INSERT INTO defaults (fldname,fldvalue) VALUES ('sinumber','DTN0001');
INSERT INTO defaults (fldname,fldvalue) VALUES ('vinumber','APT0001');
INSERT INTO defaults (fldname,fldvalue) VALUES ('batchnumber','BAT001');
INSERT INTO defaults (fldname,fldvalue) VALUES ('vouchernumber','VCHR001');
INSERT INTO deduction (id,description,employee_accno_id,employeepays,employer_accno_id,employerpays,fromage,toage,agedob,basedon) VALUES ('10074','NSSF Employee Level01','10020','1','10048','2',NULL,NULL,NULL,NULL);
INSERT INTO deduction (id,description,employee_accno_id,employeepays,employer_accno_id,employerpays,fromage,toage,agedob,basedon) VALUES ('10075','NSSF Employee Level02','10020','1','10048','2',NULL,NULL,NULL,NULL);
INSERT INTO deduction (id,description,employee_accno_id,employeepays,employer_accno_id,employerpays,fromage,toage,agedob,basedon) VALUES ('10076','NSSF Employee Level03','10020','1','10048','2',NULL,NULL,NULL,NULL);
INSERT INTO deduction (id,description,employee_accno_id,employeepays,employer_accno_id,employerpays,fromage,toage,agedob,basedon) VALUES ('10077','PAYE-Employee Level 01','10022','1',NULL,'0',NULL,NULL,NULL,NULL);
INSERT INTO deduction (id,description,employee_accno_id,employeepays,employer_accno_id,employerpays,fromage,toage,agedob,basedon) VALUES ('10078','PAYE-Employee Level 02','10022','1',NULL,'0',NULL,NULL,NULL,NULL);
INSERT INTO deduction (id,description,employee_accno_id,employeepays,employer_accno_id,employerpays,fromage,toage,agedob,basedon) VALUES ('10079','PAYE-Employee Level 03','10022','1',NULL,'0',NULL,NULL,NULL,NULL);
INSERT INTO deductionrate (rn,trans_id,rate,amount,above,below) VALUES ('1','10074','0.05','15000','0','0');
INSERT INTO deductionrate (rn,trans_id,rate,amount,above,below) VALUES ('1','10075','0.05','30000','0','0');
INSERT INTO deductionrate (rn,trans_id,rate,amount,above,below) VALUES ('1','10076','0.05','50000','0','0');
INSERT INTO deductionrate (rn,trans_id,rate,amount,above,below) VALUES ('1','10077','0.1','30000','0','0');
INSERT INTO deductionrate (rn,trans_id,rate,amount,above,below) VALUES ('1','10078','0.1','90000','0','0');
INSERT INTO deductionrate (rn,trans_id,rate,amount,above,below) VALUES ('1','10079','0.1','200000','0','0');
INSERT INTO project (id,projectnumber,description,startdate,enddate,parts_id,production,completed,customer_id) VALUES ('10092','LocalCtr','Construction of Local Centre',NULL,NULL,NULL,'0','0',NULL);
INSERT INTO curr (rn,curr,prec) VALUES ('1','UGX','0');
--
create index acc_trans_trans_id_key on acc_trans (trans_id);
create index acc_trans_chart_id_key on acc_trans (chart_id);
create index acc_trans_transdate_key on acc_trans (transdate);
create index acc_trans_source_key on acc_trans (lower(source));
--
create index ap_id_key on ap (id);
create index ap_transdate_key on ap (transdate);
create index ap_invnumber_key on ap (invnumber);
create index ap_ordnumber_key on ap (ordnumber);
create index ap_vendor_id_key on ap (vendor_id);
create index ap_employee_id_key on ap (employee_id);
create index ap_quonumber_key on ap (quonumber);
--
create index ar_id_key on ar (id);
create index ar_transdate_key on ar (transdate);
create index ar_invnumber_key on ar (invnumber);
create index ar_ordnumber_key on ar (ordnumber);
create index ar_customer_id_key on ar (customer_id);
create index ar_employee_id_key on ar (employee_id);
create index ar_quonumber_key on ar (quonumber);
--
create index assembly_id_key on assembly (id);
--
create index chart_id_key on chart (id);
create unique index chart_accno_key on chart (accno);
create index chart_category_key on chart (category);
create index chart_link_key on chart (link);
create index chart_gifi_accno_key on chart (gifi_accno);
--
create index customer_name_key on customer (lower(name));
create index customer_customernumber_key on customer (customernumber);
create index customer_contact_key on customer (lower(contact));
create index customer_customer_id_key on customertax (customer_id);
--
create index exchangerate_ct_key on exchangerate (curr, transdate);
--
create unique index gifi_accno_key on gifi (accno);
--
create index gl_id_key on gl (id);
create index gl_transdate_key on gl (transdate);
create index gl_reference_key on gl (reference);
create index gl_description_key on gl (lower(description));
create index gl_employee_id_key on gl (employee_id);
--
create index invoice_trans_id_key on invoice (trans_id);
--
create index makemodel_parts_id_key on makemodel (parts_id);
create index makemodel_make_key on makemodel (lower(make));
create index makemodel_model_key on makemodel (lower(model));
--
create index oe_id_key on oe (id);
create index oe_transdate_key on oe (transdate);
create index oe_ordnumber_key on oe (ordnumber);
create index oe_employee_id_key on oe (employee_id);
create index orderitems_trans_id_key on orderitems (trans_id);
--
create index parts_id_key on parts (id);
create index parts_partnumber_key on parts (lower(partnumber));
create index parts_description_key on parts (lower(description));
create index partstax_parts_id_key on partstax (parts_id);
--
create index vendor_name_key on vendor (lower(name));
create index vendor_vendornumber_key on vendor (vendornumber);
create index vendor_contact_key on vendor (lower(contact));
create index vendortax_vendor_id_key on vendortax (vendor_id);
--
create index shipto_trans_id_key on shipto (trans_id);
--
create index project_id_key on project (id);
create unique index projectnumber_key on project (projectnumber);
--
create index partsgroup_id_key on partsgroup (id);
create unique index partsgroup_key on partsgroup (partsgroup);
--
create index status_trans_id_key on status (trans_id);
--
create index department_id_key on department (id);
--
create index partscustomer_customer_id_key on partscustomer (customer_id);
create index partscustomer_parts_id_key on partscustomer (parts_id);
--
create index partsvendor_vendor_id_key on partsvendor (vendor_id);
create index partsvendor_parts_id_key on partsvendor (parts_id);
--
create index pricegroup_pricegroup_key on pricegroup (pricegroup);
create index pricegroup_id_key on pricegroup (id);
--
create index audittrail_trans_id_key on audittrail (trans_id);
--
create index translation_trans_id_key on translation (trans_id);
--
create unique index language_code_key on language (code);
--
create index jcitems_id_key on jcitems (id);
--
create index cargo_id_key on cargo (id, trans_id);
--
create index inventory_parts_id_key on inventory (parts_id);

