--  MySQL Database Dump 1.1
--  Host: LOCALHOST    Database: DEMO
--  Server version 4.0.18-nt
--
--  Dump database DEMO on 09/03/2555 9:02:48
--

--
--  Table structure for table "adjcode"
--
DROP TABLE IF EXISTS adjcode;

CREATE TABLE `adjcode` (
  `ADJCODE` char(2) NOT NULL default '',
  `ADJDESC` varchar(50) default NULL,
  `GLID` varchar(15) default NULL,
  PRIMARY KEY  (`ADJCODE`)
) TYPE=MyISAM;

--
--  Table structure for table "adjhead"
--
DROP TABLE IF EXISTS adjhead;

CREATE TABLE `adjhead` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DPTID` varchar(10) default NULL,
  `SALEID` varchar(10) default NULL,
  `FLAG` varchar(20) default NULL,
  `JOBNO` varchar(10) default NULL,
  `XREMARK` varchar(60) default NULL,
  `REFNO` varchar(10) default NULL,
  `ADJCODE` char(2) default NULL,
  `LOCID` varchar(10) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "apcard"
--
DROP TABLE IF EXISTS apcard;

CREATE TABLE `apcard` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DUEDATE` datetime default NULL,
  `ACCID` varchar(10) default NULL,
  `TAXNO` varchar(30) default NULL,
  `TAXTYPE` varchar(20) default NULL,
  `DELITYPE` varchar(10) default NULL,
  `AREA` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VAT` decimal(13,3) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `AMOUNT_B` decimal(13,3) default NULL,
  `DISCD` varchar(10) default NULL,
  `DISCAMT` decimal(13,3) default NULL,
  `AFTDISC` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `AMOUNT_D` decimal(13,3) default NULL,
  `ADVAMT` decimal(13,3) default NULL,
  `RECAMT` decimal(13,3) default NULL,
  `LOCID` varchar(10) default NULL,
  `CUS_PO` varchar(15) default NULL,
  `SETBILL` char(1) default NULL,
  `VATTYPE` varchar(15) default NULL,
  `TERM` int(11) default NULL,
  `XNOTE` varchar(60) default NULL,
  `AFTADV` decimal(13,3) default NULL,
  `VATADD` char(1) default NULL,
  `IVNO` varchar(15) default NULL,
  `SALEAMT` decimal(13,3) default NULL,
  `GLID` varchar(15) default NULL,
  `NBAL` decimal(13,3) default NULL,
  `BILLDOC` varchar(15) default 'X',
  `RECBEG` decimal(13,3) default NULL,
  `VOID` int(11) default '0',
  `TRTYPE` char(3) default NULL,
  `REPBAL` decimal(13,3) default NULL,
  `CASHPAY` decimal(13,3) default NULL,
  `TAXPAID` decimal(13,3) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `DEBTAMT` decimal(13,3) default NULL,
  `BALLINE` decimal(13,3) default NULL,
  `OTHDESC` mediumtext,
  `VATPERIOD` varchar(7) default NULL,
  `CHKPAY` decimal(13,3) default NULL,
  `AMTDESC` varchar(60) default NULL,
  `VATEXP` char(1) default NULL,
  `SALETYPE` varchar(15) default NULL,
  `REFNO` varchar(15) default NULL,
  `DATEINV` date default NULL,
  `DISCTYPE` varchar(30) default NULL,
  `INVREF` decimal(13,3) default '0.000',
  `VATEDIT` tinyint(3) unsigned default '0',
  `PAYNOW` decimal(13,3) default '0.000',
  PRIMARY KEY  (`DOCNO`,`LINE`),
  KEY `DOCNO` (`DOCNO`),
  KEY `Index2` (`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "apgroup"
--
DROP TABLE IF EXISTS apgroup;

CREATE TABLE `apgroup` (
  `APGID` varchar(10) NOT NULL default '',
  `APGDESC` varchar(70) default NULL,
  PRIMARY KEY  (`APGID`)
) TYPE=MyISAM;

--
--  Table structure for table "apinvpr"
--
DROP TABLE IF EXISTS apinvpr;

CREATE TABLE `apinvpr` (
  `accid` varchar(20) NOT NULL default '',
  `id` varchar(18) NOT NULL default '',
  `price` decimal(14,4) default '0.0000',
  `discl` varchar(10) default NULL,
  PRIMARY KEY  (`accid`,`id`)
) TYPE=MyISAM;

--
--  Table structure for table "apmst"
--
DROP TABLE IF EXISTS apmst;

CREATE TABLE `apmst` (
  `ACCID` varchar(10) NOT NULL default '',
  `GACCID` varchar(10) default NULL,
  `GLID` varchar(15) default NULL,
  `XCOMP` varchar(70) default NULL,
  `XNAME` varchar(50) default NULL,
  `ADD_1` varchar(70) default NULL,
  `ADD_2` varchar(70) default NULL,
  `TEL` varchar(30) default NULL,
  `FAX` varchar(20) default NULL,
  `SHIPTO_1` varchar(70) default NULL,
  `SHIPTO_2` varchar(70) default NULL,
  `SALEID` varchar(10) default NULL,
  `AREA` char(2) default NULL,
  `DELITYPE` char(2) default NULL,
  `TERM` int(11) default NULL,
  `GRADE` varchar(5) default NULL,
  `XLIMIT` decimal(13,2) default NULL,
  `BILLCOND` varchar(50) default NULL,
  `CHKCOND` varchar(50) default NULL,
  `NBAL` decimal(13,2) default '0.00',
  `XREMARK` varchar(70) default NULL,
  `DISC` varchar(10) default NULL,
  `TAXNO` varchar(20) default NULL,
  PRIMARY KEY  (`ACCID`),
  KEY `APACC` (`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "appayhd"
--
DROP TABLE IF EXISTS appayhd;

CREATE TABLE `appayhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ACCID` varchar(10) default NULL,
  `RECAMT` decimal(13,3) default NULL,
  `CASHAMT` decimal(13,3) default NULL,
  `CHKAMT` decimal(13,3) default NULL,
  `TAXPAID` decimal(13,3) default NULL,
  `DISC` decimal(13,3) default NULL,
  `DISCDR` decimal(13,3) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VATPERIOD` varchar(7) default NULL,
  `VATTYPE` char(2) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `XNOTE` varchar(40) default NULL,
  `DEBTAMT` decimal(13,3) default NULL,
  `TAXNO` varchar(15) default NULL,
  `AMTDESC` varchar(20) default NULL,
  `XREMARK` text,
  `AMOUNT` decimal(13,2) default '0.00',
  `DISCD` decimal(13,3) default NULL,
  `OTHERS` decimal(13,3) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`),
  KEY `DOCNO` (`DOCNO`,`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "aptrtail"
--
DROP TABLE IF EXISTS aptrtail;

CREATE TABLE `aptrtail` (
  `docno` varchar(15) NOT NULL default '',
  `line` tinyint(3) unsigned NOT NULL default '0',
  `accid` varchar(10) default NULL,
  `glid` varchar(20) default NULL,
  `amount_l` decimal(13,2) default '0.00',
  `TAXTYPE` varchar(20) default NULL,
  `DATEINV` date default NULL,
  `VAT` decimal(13,2) default '0.00',
  `XREMARK` varchar(50) default NULL,
  `JOB` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `TAXNO` varchar(20) default NULL,
  `AMOUNT_B` decimal(13,2) default '0.00',
  `VATAMT` decimal(13,2) default '0.00',
  `INVAMT` decimal(13,2) default '0.00',
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`docno`,`line`)
) TYPE=MyISAM;

--
--  Table structure for table "arcard"
--
DROP TABLE IF EXISTS arcard;

CREATE TABLE `arcard` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DUEDATE` datetime default NULL,
  `ACCID` varchar(10) default NULL,
  `SALEID` varchar(10) default NULL,
  `TAXTYPE` varchar(20) default NULL,
  `DELITYPE` varchar(10) default NULL,
  `AREA` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VAT` decimal(13,3) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `AMOUNT_B` decimal(13,3) default NULL,
  `DISCD` varchar(10) default NULL,
  `DISCAMT` decimal(13,3) default NULL,
  `AFTDISC` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `AMOUNT_D` decimal(13,3) default NULL,
  `ADVAMT` decimal(13,3) default NULL,
  `RECAMT` decimal(13,3) default NULL,
  `LOCID` varchar(10) default NULL,
  `CUS_PO` varchar(15) default NULL,
  `SETBILL` char(1) default NULL,
  `VATTYPE` varchar(15) default NULL,
  `TERM` int(11) default NULL,
  `XNOTE` varchar(60) default NULL,
  `AFTADV` decimal(13,3) default NULL,
  `VATADD` char(1) default NULL,
  `IVNO` varchar(15) default NULL,
  `SALEAMT` decimal(13,3) default NULL,
  `GLID` varchar(15) default NULL,
  `NBAL` decimal(13,3) default NULL,
  `BILLDOC` varchar(15) default 'X',
  `RECBEG` decimal(13,3) default NULL,
  `VOID` int(11) default '0',
  `TRTYPE` char(3) default NULL,
  `REPBAL` decimal(13,3) default NULL,
  `CASHPAY` decimal(13,3) default NULL,
  `TAXPAID` decimal(13,3) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `DEBTAMT` decimal(13,3) default NULL,
  `BALLINE` decimal(13,3) default NULL,
  `OTHDESC` mediumtext,
  `VATPERIOD` varchar(7) default NULL,
  `CHKPAY` decimal(13,3) default NULL,
  `AMTDESC` varchar(60) default NULL,
  `INVREF` decimal(13,2) default NULL,
  `DISCTYPE` varchar(30) default NULL,
  `RECIMD` decimal(13,2) default NULL,
  `SALETYPE` varchar(15) default NULL,
  `XREMARK` text,
  `REFNO` varchar(15) default NULL,
  `DATEINV` date default NULL,
  `XBUYER` varchar(20) default NULL,
  `DATEDELIVERY` date default NULL,
  `VATEDIT` tinyint(3) unsigned default '0',
  `PAYNOW` decimal(13,3) default '0.000',
  PRIMARY KEY  (`DOCNO`,`LINE`),
  KEY `ACCID` (`ACCID`),
  KEY `DOCNO` (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "area"
--
DROP TABLE IF EXISTS area;

CREATE TABLE `area` (
  `AID` varchar(10) NOT NULL default '',
  `ADESC` varchar(70) default NULL,
  PRIMARY KEY  (`AID`)
) TYPE=MyISAM;

--
--  Table structure for table "argroup"
--
DROP TABLE IF EXISTS argroup;

CREATE TABLE `argroup` (
  `ARGID` varchar(10) NOT NULL default '',
  `ARGDESC` varchar(70) default NULL,
  PRIMARY KEY  (`ARGID`)
) TYPE=MyISAM;

--
--  Table structure for table "arinvpr"
--
DROP TABLE IF EXISTS arinvpr;

CREATE TABLE `arinvpr` (
  `accid` varchar(20) NOT NULL default '',
  `id` varchar(18) NOT NULL default '',
  `price` decimal(14,4) default '0.0000',
  `discl` varchar(10) default NULL,
  PRIMARY KEY  (`accid`,`id`)
) TYPE=MyISAM;

--
--  Table structure for table "armst"
--
DROP TABLE IF EXISTS armst;

CREATE TABLE `armst` (
  `ACCID` varchar(10) NOT NULL default '',
  `GACCID` varchar(10) default NULL,
  `GLID` varchar(15) default NULL,
  `XCOMP` varchar(70) default NULL,
  `XNAME` varchar(50) default NULL,
  `ADD_1` varchar(70) default NULL,
  `ADD_2` varchar(70) default NULL,
  `TEL` varchar(30) default NULL,
  `FAX` varchar(20) default NULL,
  `SHIPTO_1` varchar(70) default NULL,
  `SHIPTO_2` varchar(70) default NULL,
  `SALEID` varchar(10) default NULL,
  `AREA` varchar(10) default NULL,
  `DELITYPE` varchar(10) default NULL,
  `TERM` int(11) default NULL,
  `GRADE` varchar(5) default NULL,
  `XLIMIT` decimal(13,2) default NULL,
  `BILLCOND` varchar(50) default NULL,
  `CHKCOND` varchar(50) default NULL,
  `NBAL` decimal(13,2) default '0.00',
  `XREMARK` varchar(70) default NULL,
  `DISC` varchar(10) default NULL,
  `ROUTE` varchar(10) default NULL,
  `ZIP` varchar(10) default NULL,
  `SEVEN` varchar(10) default NULL,
  `DATESEVEN` varchar(5) default NULL,
  PRIMARY KEY  (`ACCID`),
  KEY `ACCID` (`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "arpayhd"
--
DROP TABLE IF EXISTS arpayhd;

CREATE TABLE `arpayhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ACCID` varchar(10) default NULL,
  `RECAMT` decimal(13,3) default NULL,
  `CASHAMT` decimal(13,3) default NULL,
  `CHKAMT` decimal(13,3) default NULL,
  `TAXPAID` decimal(13,3) default NULL,
  `DISC` decimal(13,3) default NULL,
  `DISCDR` decimal(13,3) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VATPERIOD` varchar(7) default NULL,
  `VATTYPE` char(2) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `XNOTE` varchar(40) default NULL,
  `DEBTAMT` decimal(13,3) default NULL,
  `AMTDESC` varchar(50) default NULL,
  `XREMARK` varchar(50) default NULL,
  `AMOUNT` decimal(13,2) default '0.00',
  `DISCD` decimal(13,3) default NULL,
  `OTHERS` decimal(13,3) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  `XDATECHK` varchar(20) default NULL,
  `XCHKNO` varchar(20) default NULL,
  `YDATECHK` date default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "artrtail"
--
DROP TABLE IF EXISTS artrtail;

CREATE TABLE `artrtail` (
  `docno` varchar(15) NOT NULL default '',
  `line` tinyint(3) unsigned NOT NULL default '0',
  `accid` varchar(10) default NULL,
  `glid` varchar(20) default NULL,
  `amount_l` decimal(13,2) default '0.00',
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`docno`,`line`)
) TYPE=MyISAM;

--
--  Table structure for table "bank"
--
DROP TABLE IF EXISTS bank;

CREATE TABLE `bank` (
  `BANKID` varchar(5) NOT NULL default '',
  `BANKNAME` varchar(40) default NULL,
  `BRANCH` varchar(20) default NULL,
  `BANKACC` varchar(13) default NULL,
  `GLID` varchar(15) default NULL,
  `BEGAMT` decimal(13,3) default NULL,
  PRIMARY KEY  (`BANKID`)
) TYPE=MyISAM;

--
--  Table structure for table "billaphd"
--
DROP TABLE IF EXISTS billaphd;

CREATE TABLE `billaphd` (
  `BDOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` date default NULL,
  `ACCID` varchar(15) default NULL,
  `XREMARK` varchar(100) default NULL,
  `AMOUNT_D` decimal(15,2) default '0.00',
  `BAHTTEXT` varchar(60) default NULL,
  `BILLDATE` date default NULL,
  `DATEREC` varchar(10) default NULL,
  `DATECHECK` varchar(10) default NULL,
  PRIMARY KEY  (`BDOCNO`),
  KEY `BDOCNO` (`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "billaptr"
--
DROP TABLE IF EXISTS billaptr;

CREATE TABLE `billaptr` (
  `BDOCNO` varchar(15) NOT NULL default '',
  `LINE` tinyint(3) unsigned NOT NULL default '0',
  `DOCNO` varchar(15) default NULL,
  `REFNO` varchar(15) default NULL,
  `DATEDOC` datetime default NULL,
  `DUEDATE` datetime default NULL,
  `AMOUNT_L` decimal(15,2) default '0.00',
  `ACCID` varchar(10) default NULL,
  PRIMARY KEY  (`BDOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "billhd"
--
DROP TABLE IF EXISTS billhd;

CREATE TABLE `billhd` (
  `BDOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` date default NULL,
  `ACCID` varchar(15) default NULL,
  `XREMARK` varchar(100) default NULL,
  `AMOUNT_D` decimal(15,2) default '0.00',
  `BAHTTEXT` varchar(60) default NULL,
  `BILLDATE` date default NULL,
  `DATEREC` varchar(10) default NULL,
  `DATECHECK` varchar(10) default NULL,
  `DATERECD` date default NULL,
  PRIMARY KEY  (`BDOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "billtr"
--
DROP TABLE IF EXISTS billtr;

CREATE TABLE `billtr` (
  `BDOCNO` varchar(15) NOT NULL default '',
  `LINE` tinyint(3) unsigned NOT NULL default '0',
  `DOCNO` varchar(15) default NULL,
  `REFNO` varchar(15) default NULL,
  `DATEDOC` datetime default NULL,
  `DUEDATE` datetime default NULL,
  `AMOUNT_L` decimal(15,2) default '0.00',
  `ACCID` varchar(10) default NULL,
  PRIMARY KEY  (`BDOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "bkktran"
--
DROP TABLE IF EXISTS bkktran;

CREATE TABLE `bkktran` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `BANKID` varchar(5) default NULL,
  `BANKID2` varchar(5) default NULL,
  `AMOUNT_D` decimal(13,3) default NULL,
  `XREMARK` varchar(40) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "bktr"
--
DROP TABLE IF EXISTS bktr;

CREATE TABLE `bktr` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ARACCID` varchar(10) default NULL,
  `APACCID` varchar(10) default NULL,
  `BANKID` varchar(5) default NULL,
  `BRANCH` varchar(20) default NULL,
  `CHKNO` varchar(17) default NULL,
  `DATECHK` datetime default NULL,
  `AMT_IN` decimal(13,3) default NULL,
  `AMT_OUT` decimal(13,3) default NULL,
  `DOCGL` varchar(15) default NULL,
  `XDESC` varchar(60) default NULL,
  `DATEPASS` datetime default NULL,
  `DATEPAYIN` datetime default NULL,
  `BKKCHG` decimal(13,3) default '0.000',
  `BANKID2` varchar(5) default NULL,
  `GLID` varchar(15) default NULL,
  `TRTYPE` char(2) default NULL,
  `CLRCHK` int(1) default '0',
  `CHKRETU` char(1) default NULL,
  `JOBNO` varchar(10) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `PAYTYPE` varchar(30) default NULL,
  `REPBAL` decimal(13,2) default '0.00',
  `XREMARK` varchar(50) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`,`LINE`),
  KEY `ARACCID` (`ARACCID`),
  KEY `APACCID` (`APACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "bookgl"
--
DROP TABLE IF EXISTS bookgl;

CREATE TABLE `bookgl` (
  `LINE` tinyint(3) unsigned NOT NULL default '0',
  `XSCRDESC` varchar(50) default NULL,
  `XFORM` varchar(50) default NULL,
  `JN` varchar(10) default NULL,
  PRIMARY KEY  (`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "brand"
--
DROP TABLE IF EXISTS brand;

CREATE TABLE `brand` (
  `BID` varchar(10) NOT NULL default '',
  `BDESC` varchar(70) default NULL,
  PRIMARY KEY  (`BID`)
) TYPE=MyISAM;

--
--  Table structure for table "cashpay"
--
DROP TABLE IF EXISTS cashpay;

CREATE TABLE `cashpay` (
  `docno` varchar(15) NOT NULL default '',
  `datedoc` date default NULL,
  `dptid` varchar(10) default NULL,
  `jobno` varchar(10) default NULL,
  `vatperiod` varchar(10) default NULL,
  `xremark` varchar(100) default NULL,
  `amount_b` decimal(13,3) default '0.000',
  `invamt` decimal(13,3) default '0.000',
  `vatamt` decimal(13,3) default '0.000',
  `amount_d` decimal(13,3) default '0.000',
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`docno`)
) TYPE=MyISAM;

--
--  Table structure for table "chkretu"
--
DROP TABLE IF EXISTS chkretu;

CREATE TABLE `chkretu` (
  `chkno` varchar(20) NOT NULL default '',
  `datechk` date NOT NULL default '0000-00-00',
  `dateretu` date default NULL,
  `datein` date default NULL,
  `line` int(11) NOT NULL default '0',
  `xcase` varchar(70) default NULL,
  `araccid` varchar(10) default NULL,
  `apaccid` varchar(10) default NULL,
  PRIMARY KEY  (`chkno`,`line`)
) TYPE=MyISAM;

--
--  Table structure for table "config"
--
DROP TABLE IF EXISTS config;

CREATE TABLE `config` (
  `XINDEX` varchar(5) NOT NULL default '',
  `XCOMP` varchar(70) default NULL,
  `COMTAXNO` varchar(15) default NULL,
  `COMVAT` decimal(10,0) default NULL,
  `TAXTYPE` char(2) default NULL,
  `AREATYPE` char(2) default NULL,
  `ACCMTH` int(11) default NULL,
  `ACCYR` int(11) default NULL,
  `ASKUNRATIO` char(1) default NULL,
  `AROLDPRICE` char(1) default NULL,
  `APOLDPRICE` char(1) default NULL,
  `LOCID` varchar(10) default NULL,
  `CASH` char(2) default NULL,
  `VATTYPE` char(2) default NULL,
  `GLTYPE` char(2) default NULL,
  `COSTTYPE` char(2) default NULL,
  `INVZERO` char(1) default NULL,
  `AROVER` char(2) default NULL,
  `GLSHOW` char(1) default NULL,
  `COMADD1` varchar(70) default NULL,
  `COMADD2` varchar(70) default NULL,
  `SWARNBACK` int(11) default NULL,
  `DATETYPE` char(2) default NULL,
  `CASHAP` char(2) default NULL,
  `SPLACCU` varchar(15) default NULL,
  `SLASTBACK` datetime default NULL,
  `SKINPATH` varchar(50) default NULL,
  `DBVERSION` varchar(10) default NULL,
  `COSTLOCID` char(2) default NULL,
  `FIXDAYINYR` int(11) default NULL,
  `F3INV` char(1) default NULL,
  `SENG` char(1) default NULL,
  `SLOCK` char(1) default NULL,
  `SLOCKDATE1` datetime default NULL,
  `SLOCKDATE2` datetime default NULL,
  `SERIAL` char(1) default NULL,
  `SHOWPIC` char(1) default NULL,
  `MULTIORD` char(1) default NULL,
  `MULTIPO` char(1) default NULL,
  `SDATESTART` date default '0000-00-00',
  `EDITPRICE` char(1) default NULL,
  `COMTYPE` varchar(20) default NULL,
  `DOCRUNOLDPAT` char(1) default 'N',
  `FONTNAME` varchar(50) default 'X',
  `FONTSIZE` tinyint(3) unsigned default '8',
  `FONTSTYLE` varchar(5) default NULL,
  `OETYPE` char(1) default 'N',
  `POTYPE` char(1) default 'N',
  PRIMARY KEY  (`XINDEX`)
) TYPE=MyISAM;

--
--  Table structure for table "deli"
--
DROP TABLE IF EXISTS deli;

CREATE TABLE `deli` (
  `DEID` varchar(10) NOT NULL default '',
  `DEDESC` varchar(70) default NULL,
  PRIMARY KEY  (`DEID`)
) TYPE=MyISAM;

--
--  Table structure for table "depart"
--
DROP TABLE IF EXISTS depart;

CREATE TABLE `depart` (
  `DID` varchar(10) NOT NULL default '',
  `DDESC` varchar(70) default NULL,
  PRIMARY KEY  (`DID`)
) TYPE=MyISAM;

--
--  Table structure for table "downiv"
--
DROP TABLE IF EXISTS downiv;

CREATE TABLE `downiv` (
  `docno` varchar(15) NOT NULL default '',
  `line` tinyint(3) unsigned NOT NULL default '0',
  `adocno` varchar(15) default NULL,
  `refamt` decimal(13,2) default '0.00',
  `clramt` decimal(13,2) default '0.00',
  PRIMARY KEY  (`docno`,`line`)
) TYPE=MyISAM;

--
--  Table structure for table "downpay"
--
DROP TABLE IF EXISTS downpay;

CREATE TABLE `downpay` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ACCID` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `TAXTYPE` char(2) default NULL,
  `PERIOD` int(11) default NULL,
  `CPNO` varchar(15) default NULL,
  `VAT` decimal(13,3) default '0.000',
  `VATAMT` decimal(13,3) default '0.000',
  `AMOUNT_D` decimal(13,3) default '0.000',
  `AMOUNT_B` decimal(13,3) default '0.000',
  `XDESC` varchar(70) default NULL,
  `INVAMT` decimal(13,3) default '0.000',
  `TAXPAID` decimal(13,3) default '0.000',
  `CLRAMT` decimal(13,3) default '0.000',
  `AMOUNTCUT` decimal(13,3) default '0.000',
  `CHKAMT` decimal(13,3) default '0.000',
  `CASHAMT` decimal(13,3) default '0.000',
  `NBAL` decimal(13,3) default '0.000',
  `INVNO` varchar(15) default NULL,
  `NOCLAIM` enum('True','False') default NULL,
  `NBAL_12` decimal(13,3) default '0.000',
  `CLRAMT_12` decimal(13,3) default '0.000',
  `RECBEG` decimal(13,3) default '0.000',
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "downrc"
--
DROP TABLE IF EXISTS downrc;

CREATE TABLE `downrc` (
  `docno` varchar(15) NOT NULL default '',
  `line` tinyint(3) unsigned NOT NULL default '0',
  `adocno` varchar(15) default NULL,
  `refamt` decimal(13,2) default '0.00',
  `clramt` decimal(13,2) default '0.00',
  PRIMARY KEY  (`docno`,`line`)
) TYPE=MyISAM;

--
--  Table structure for table "downrec"
--
DROP TABLE IF EXISTS downrec;

CREATE TABLE `downrec` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ACCID` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `SALEID` varchar(10) default NULL,
  `TAXTYPE` char(2) default NULL,
  `PERIOD` int(11) default NULL,
  `CPNO` varchar(15) default NULL,
  `VAT` decimal(13,3) default '0.000',
  `VATAMT` decimal(13,3) default '0.000',
  `AMOUNT_D` decimal(13,3) default '0.000',
  `AMOUNT_B` decimal(13,3) default '0.000',
  `XDESC` varchar(70) default NULL,
  `INVAMT` decimal(13,3) default '0.000',
  `TAXPAID` decimal(10,3) default '0.000',
  `CLRAMT` decimal(10,3) default '0.000',
  `AMOUNTCUT` decimal(10,3) default '0.000',
  `CHKAMT` decimal(10,3) default '0.000',
  `CASHAMT` decimal(13,3) default '0.000',
  `NBAL` decimal(13,3) default '0.000',
  `NBAL_12` decimal(13,3) default '0.000',
  `CLRAMT_12` decimal(13,3) default '0.000',
  `RECBEG` decimal(13,3) default '0.000',
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "exptail"
--
DROP TABLE IF EXISTS exptail;

CREATE TABLE `exptail` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `TAXNO` varchar(15) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `GLID` varchar(15) default NULL,
  `JOBNO` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `AMOUNT_L` decimal(13,3) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `AMOUNT` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `VATDATE` datetime default NULL,
  `VATADD` char(1) default NULL,
  `NOCLAIM` char(1) default NULL,
  `XREMARK` varchar(100) default NULL,
  `VAT` decimal(13,2) default '0.00',
  `TAXTYPE` varchar(20) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  `VATPERIOD` varchar(7) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "fixgroup"
--
DROP TABLE IF EXISTS fixgroup;

CREATE TABLE `fixgroup` (
  `FIXGROUP` varchar(10) NOT NULL default '',
  `FIXGROUPDESC` varchar(50) default NULL,
  PRIMARY KEY  (`FIXGROUP`)
) TYPE=MyISAM;

--
--  Table structure for table "fixmst"
--
DROP TABLE IF EXISTS fixmst;

CREATE TABLE `fixmst` (
  `FIXID` varchar(10) NOT NULL default '',
  `FIXDESC` varchar(45) default NULL,
  `FIXGROUP` varchar(10) default NULL,
  `CALTYPE` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `FIXGL` varchar(15) default NULL,
  `DEP_EX` varchar(15) default NULL,
  `DEP_ACC` varchar(15) default NULL,
  `METHOD` varchar(10) default NULL,
  `RATE` decimal(13,3) default '0.000',
  `AGE` int(11) default NULL,
  `DATESTART` datetime default NULL,
  `LASTDATE` datetime default NULL,
  `SALEDATE` datetime default NULL,
  `COST` decimal(13,3) default '0.000',
  `YEAR_COST` decimal(13,3) default '0.000',
  `LAST_COST` decimal(13,3) default '0.000',
  `BEG_COST` decimal(13,3) default '0.000',
  `JOBNO` varchar(10) default NULL,
  `ACCDOC` varchar(15) default NULL,
  `SUPPLIER` varchar(30) default NULL,
  `SERIAL` varchar(40) default NULL,
  `MODAL` varchar(15) default NULL,
  `BRAND` varchar(20) default NULL,
  `INSNO` varchar(40) default NULL,
  `INSAGE` int(11) default NULL,
  `INSDATE` datetime default NULL,
  `INSDATE2` datetime default NULL,
  `REMARK` varchar(30) default NULL,
  `SALE` char(1) default 'N',
  PRIMARY KEY  (`FIXID`)
) TYPE=MyISAM;

--
--  Table structure for table "fixtr"
--
DROP TABLE IF EXISTS fixtr;

CREATE TABLE `fixtr` (
  `FIXID` varchar(10) NOT NULL default '',
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `AMOUNT` decimal(13,3) default '0.000',
  `LINE` int(11) NOT NULL default '0',
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "glgroup"
--
DROP TABLE IF EXISTS glgroup;

CREATE TABLE `glgroup` (
  `glgroup` char(3) NOT NULL default '',
  `glgroupdesc` varchar(50) default NULL,
  PRIMARY KEY  (`glgroup`)
) TYPE=MyISAM;

--
--  Table structure for table "gllink"
--
DROP TABLE IF EXISTS gllink;

CREATE TABLE `gllink` (
  `XINDEX` varchar(10) default NULL,
  `GLCASHIN` varchar(10) default NULL,
  `GLCASHOUT` varchar(10) default NULL,
  `GLBANK` varchar(10) default NULL,
  `GLDOWNREC` varchar(10) default NULL,
  `GLAR` varchar(10) default NULL,
  `GLTAX` varchar(10) default NULL,
  `GLCHKIN` varchar(10) default NULL,
  `GLINV` varchar(10) default NULL,
  `GLVATSALE` varchar(10) default NULL,
  `GLNODUE` varchar(10) default NULL,
  `GLAP` varchar(10) default NULL,
  `GLDOWNPAY` varchar(10) default NULL,
  `GLCHKOUT` varchar(10) default NULL,
  `GLTAXOUT` varchar(10) default NULL,
  `GLVATPUR` varchar(10) default NULL,
  `GLVATADD` varchar(10) default NULL,
  `GLPLYEAR` varchar(10) default NULL,
  `GLPLBAL` varchar(10) default NULL,
  `GLREC` varchar(10) default NULL,
  `GLRI` varchar(10) default NULL,
  `GLDISC` varchar(10) default NULL,
  `GLCOST` varchar(10) default NULL,
  `GLPUR` varchar(10) default NULL,
  `GLRO` varchar(10) default NULL,
  `GLFIX` varchar(10) default NULL,
  `GLDISCOUT` varchar(10) default NULL,
  `GLPAYBANK` varchar(10) default NULL,
  `GLPAYVATPUR` varchar(10) default NULL
) TYPE=MyISAM;

--
--  Table structure for table "glmst"
--
DROP TABLE IF EXISTS glmst;

CREATE TABLE `glmst` (
  `GLID` varchar(15) NOT NULL default '',
  `GLDESC` varchar(60) default NULL,
  `GLEDESC` varchar(60) default NULL,
  `GLGROUP` varchar(30) default NULL,
  `CASHSTAT` char(2) default NULL,
  `XFLAG` char(1) default NULL,
  `NATURE` char(1) default NULL,
  `GLTYPE` varchar(50) default NULL,
  PRIMARY KEY  (`GLID`)
) TYPE=MyISAM;

--
--  Table structure for table "gltemplate1"
--
DROP TABLE IF EXISTS gltemplate1;

CREATE TABLE `gltemplate1` (
  `XSCR` varchar(5) NOT NULL default '',
  `XSCRDESC` varchar(50) default NULL,
  PRIMARY KEY  (`XSCR`)
) TYPE=MyISAM;

--
--  Table structure for table "gltr"
--
DROP TABLE IF EXISTS gltr;

CREATE TABLE `gltr` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `GLID` varchar(15) default NULL,
  `DEBIT` decimal(14,2) default NULL,
  `CREDIT` decimal(14,2) default NULL,
  `XREMARK` varchar(60) default NULL,
  `JN` char(3) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `DEBITBAL` decimal(14,2) default '0.00',
  `CREDITBAL` decimal(14,2) default '0.00',
  PRIMARY KEY  (`DOCNO`,`LINE`),
  KEY `GLID` (`GLID`)
) TYPE=MyISAM;

--
--  Table structure for table "gltrhd"
--
DROP TABLE IF EXISTS gltrhd;

CREATE TABLE `gltrhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `XREMARK` mediumtext,
  `XFLINE` varchar(60) default NULL,
  `XREF` varchar(15) default NULL,
  `XREMLINE` varchar(50) default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "glttemplate"
--
DROP TABLE IF EXISTS glttemplate;

CREATE TABLE `glttemplate` (
  `LINE` tinyint(3) unsigned NOT NULL default '0',
  `XDESC` varchar(60) default NULL,
  `XSCR` varchar(5) NOT NULL default '',
  `GLID` varchar(20) default NULL,
  `GLLINK` varchar(20) default NULL,
  `XDB` varchar(20) default '0',
  `XCR` varchar(20) default '0',
  `BOOKNO` varchar(5) default NULL,
  PRIMARY KEY  (`XSCR`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "htax"
--
DROP TABLE IF EXISTS htax;

CREATE TABLE `htax` (
  `DOCNO` varchar(15) NOT NULL default '',
  `XLine` int(11) NOT NULL default '0',
  `DATEDOC` datetime default NULL,
  `XTYPE` varchar(10) default NULL,
  `XDESC` varchar(20) default NULL,
  `TAXBASE` decimal(13,2) default '0.00',
  `TAX` decimal(13,2) default '0.00',
  `ACCID` varchar(10) default NULL,
  `TAXRATE` decimal(13,2) default '0.00',
  `TAXLINE` int(11) default NULL,
  `HDOCNO` varchar(50) default NULL,
  `PAYTYPELINE` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`,`XLine`)
) TYPE=MyISAM;

--
--  Table structure for table "idtype"
--
DROP TABLE IF EXISTS idtype;

CREATE TABLE `idtype` (
  `IDTID` varchar(10) NOT NULL default '',
  `IDTDESC` varchar(70) default NULL,
  PRIMARY KEY  (`IDTID`)
) TYPE=MyISAM;

--
--  Table structure for table "invcard"
--
DROP TABLE IF EXISTS invcard;

CREATE TABLE `invcard` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ID` varchar(20) default NULL,
  `PRICE` decimal(14,4) default NULL,
  `XDESC` varchar(60) default NULL,
  `QUAN` decimal(13,3) default NULL,
  `UNIT` varchar(10) default NULL,
  `UNRATIO` decimal(13,3) default NULL,
  `DISCL` varchar(10) default NULL,
  `AMOUNT_L` decimal(13,3) default NULL,
  `XREMARK` varchar(15) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `INVAMT` decimal(13,3) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `LOCID` varchar(10) default NULL,
  `TRTYPE` char(2) default NULL,
  `DISCLAMT` decimal(13,3) default NULL,
  `DISCAMT` decimal(13,3) default NULL,
  `COST` decimal(13,4) default NULL,
  `COSTAMT` decimal(13,4) default NULL,
  `MQUAN` decimal(13,3) default NULL,
  `COSTBAL` decimal(13,3) default NULL,
  `SALEID` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `ACCID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `SALEPURAMT` decimal(13,3) default NULL,
  `SALEPURQTY` decimal(13,3) default NULL,
  `SUBSET` char(1) default NULL,
  `HAVESET` char(1) default NULL,
  `OLDCOST` decimal(13,4) default NULL,
  `REPBAL` decimal(13,3) default NULL,
  `TRTYPE2` char(2) default NULL,
  `OTHDESC` mediumtext,
  `GLID` varchar(20) default NULL,
  `COSTREPBAL` decimal(13,4) default '0.0000',
  `ORDLINE` int(10) unsigned default '0',
  `ORDDOC` varchar(15) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  `SUBLINE` tinyint(3) unsigned NOT NULL default '0',
  `QTYCUT` decimal(13,3) default '0.000',
  `CUSID` varchar(20) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`,`SUBLINE`),
  KEY `ID` (`ID`),
  KEY `DOCNO` (`DOCNO`),
  KEY `ACCID` (`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "invfor"
--
DROP TABLE IF EXISTS invfor;

CREATE TABLE `invfor` (
  `id` varchar(20) NOT NULL default '',
  `line` int(11) NOT NULL default '0',
  `idraw` varchar(20) default NULL,
  `forqty` decimal(10,4) default '0.0000',
  `unit` varchar(10) default '0',
  PRIMARY KEY  (`id`,`line`)
) TYPE=MyISAM;

--
--  Table structure for table "invmst"
--
DROP TABLE IF EXISTS invmst;

CREATE TABLE `invmst` (
  `ID` varchar(20) NOT NULL default '',
  `XDESC` varchar(100) default NULL,
  `XGROUP` char(2) default NULL,
  `XSGROUP` char(2) default NULL,
  `XBRAND` char(2) default NULL,
  `XIDTYPE` char(2) default NULL,
  `OTHDESC` mediumtext,
  `INVGLID` varchar(15) default NULL,
  `SALEGLID` varchar(15) default NULL,
  `UNIT` varchar(10) default NULL,
  `UNITSAL` varchar(10) default NULL,
  `UNITPUR` varchar(10) default NULL,
  `MINPOINT` decimal(18,4) default '0.0000',
  `MAXPOINT` decimal(18,4) default '0.0000',
  `RORDER` decimal(18,4) default '0.0000',
  `NBAL` decimal(18,4) default '0.0000',
  `BACKORDER` decimal(18,4) default '0.0000',
  `ONORDER` decimal(18,4) default '0.0000',
  `COSTBAL` decimal(18,4) default '0.0000',
  `COSTGLID` varchar(15) default NULL,
  `WORKGLID` varchar(15) default NULL,
  `SEVEN` varchar(20) default NULL,
  `FROMPRN` char(2) default 'N',
  `HAVELOT` char(1) default 'N',
  `HAVESET` char(1) default 'N',
  `LDATESALE` date default '0000-00-00',
  `LDATEPUR` date default '0000-00-00',
  `OLDPRICE` decimal(18,4) default '0.0000',
  `OLDCOST` decimal(18,4) default '0.0000',
  `FORMPRN` char(1) default 'N',
  PRIMARY KEY  (`ID`),
  KEY `ID` (`ID`)
) TYPE=MyISAM;

--
--  Table structure for table "invset"
--
DROP TABLE IF EXISTS invset;

CREATE TABLE `invset` (
  `ID` varchar(20) NOT NULL default '',
  `LINE` int(11) NOT NULL default '0',
  `IDSUBSET` varchar(20) default NULL,
  `QUAN` decimal(13,2) default NULL,
  `UNIT` varchar(15) default NULL,
  `XDESC` varchar(20) default NULL,
  PRIMARY KEY  (`ID`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "invstdcost"
--
DROP TABLE IF EXISTS invstdcost;

CREATE TABLE `invstdcost` (
  `LINE` int(50) unsigned NOT NULL default '0',
  `ID` varchar(20) NOT NULL default '',
  `DATEFROM` datetime default NULL,
  `DATETO` datetime default NULL,
  `COST` decimal(13,2) default '0.00',
  PRIMARY KEY  (`ID`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "isshead"
--
DROP TABLE IF EXISTS isshead;

CREATE TABLE `isshead` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `XREMARK` varchar(60) default NULL,
  `REFNO` varchar(10) default NULL,
  `LOCID` varchar(10) default NULL,
  `ORDDOCNO` varchar(15) default NULL,
  `FID` varchar(18) default NULL,
  `FQUAN` decimal(13,6) default NULL,
  `FUNIT` varchar(10) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "ivgroup"
--
DROP TABLE IF EXISTS ivgroup;

CREATE TABLE `ivgroup` (
  `IVGID` varchar(10) NOT NULL default '',
  `IVGDESC` varchar(70) default NULL,
  PRIMARY KEY  (`IVGID`)
) TYPE=MyISAM;

--
--  Table structure for table "jn"
--
DROP TABLE IF EXISTS jn;

CREATE TABLE `jn` (
  `JN` varchar(10) NOT NULL default '',
  `JNDESC` varchar(50) default NULL,
  PRIMARY KEY  (`JN`)
) TYPE=MyISAM;

--
--  Table structure for table "jobmst"
--
DROP TABLE IF EXISTS jobmst;

CREATE TABLE `jobmst` (
  `JOBNO` varchar(10) NOT NULL default '',
  `JDESC` varchar(70) default NULL,
  PRIMARY KEY  (`JOBNO`)
) TYPE=MyISAM;

--
--  Table structure for table "loca"
--
DROP TABLE IF EXISTS loca;

CREATE TABLE `loca` (
  `LOCID` varchar(10) NOT NULL default '',
  `LOCDESC` varchar(70) default NULL,
  PRIMARY KEY  (`LOCID`)
) TYPE=MyISAM;

--
--  Table structure for table "ordhead"
--
DROP TABLE IF EXISTS ordhead;

CREATE TABLE `ordhead` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `TERM` int(11) default NULL,
  `ACCID` varchar(10) default NULL,
  `DELITYPE` varchar(10) default NULL,
  `SENDDATE` datetime default NULL,
  `PONO` varchar(15) default NULL,
  `SALEID` varchar(10) default NULL,
  `TAXTYPE` char(2) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VAT` decimal(13,3) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `DISCD` varchar(10) default NULL,
  `AMOUNT_D` decimal(13,3) default NULL,
  `AMOUNT_B` decimal(13,3) default NULL,
  `QUOFLG` char(1) default NULL,
  `DISCAMT` decimal(13,3) default NULL,
  `AREA` varchar(10) default NULL,
  `AFTDISC` decimal(13,3) default NULL,
  `CLEAR` char(1) default NULL,
  `QDOCNO` varchar(15) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `XREMARK` mediumtext,
  `AMTDESC` varchar(60) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`),
  KEY `ACCID` (`ACCID`),
  KEY `XDOCNO` (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "otherid"
--
DROP TABLE IF EXISTS otherid;

CREATE TABLE `otherid` (
  `ID` varchar(15) NOT NULL default '',
  `LINE` int(11) NOT NULL default '0',
  `GACCID` varchar(10) default NULL,
  `OTHID` varchar(15) default NULL,
  PRIMARY KEY  (`ID`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "passhead"
--
DROP TABLE IF EXISTS passhead;

CREATE TABLE `passhead` (
  `MPASS` varchar(10) NOT NULL default '',
  `MUSER` varchar(20) default NULL
) TYPE=MyISAM;

--
--  Table structure for table "passtail"
--
DROP TABLE IF EXISTS passtail;

CREATE TABLE `passtail` (
  `MPASS` varchar(10) NOT NULL default '',
  `MLINE` int(10) NOT NULL default '0',
  `MDESC` varchar(50) default NULL,
  `MFORM` varchar(50) default NULL,
  `MINX` char(1) default NULL,
  `MADD` char(1) default NULL,
  `MEDI` char(1) default NULL,
  `MDEL` char(1) default NULL,
  `MTYPE` char(1) default NULL
) TYPE=MyISAM;

--
--  Table structure for table "payin"
--
DROP TABLE IF EXISTS payin;

CREATE TABLE `payin` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `LINE` int(11) NOT NULL default '0',
  `CHKNO` varchar(17) default NULL,
  `DATECHK` datetime default NULL,
  `BRANCH` varchar(20) default NULL,
  `AMOUNT_L` decimal(13,3) default NULL,
  `BKKCHG` decimal(13,3) default NULL,
  `XDATEPASS` datetime default NULL,
  `XDOCGL` varchar(15) default NULL,
  `BKKCHK` decimal(13,3) default NULL,
  `XDATEPAYIN` datetime default NULL,
  `XBANKID` varchar(10) default NULL,
  `PAYDOCNO` varchar(15) default NULL,
  `PAYTYPE` varchar(30) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "payinhd"
--
DROP TABLE IF EXISTS payinhd;

CREATE TABLE `payinhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `AMOUNT_D` decimal(13,3) default NULL,
  `BANKID` varchar(5) default NULL,
  `DATEPASS` datetime default NULL,
  `REFNO` varchar(10) default NULL,
  `BKKCHK` decimal(13,3) default NULL,
  `XREMARK` varchar(50) default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "payout"
--
DROP TABLE IF EXISTS payout;

CREATE TABLE `payout` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `LINE` smallint(6) NOT NULL default '0',
  `CHKNO` varchar(17) default NULL,
  `DATECHK` datetime default NULL,
  `BANKID` varchar(5) default NULL,
  `BRANCH` varchar(20) default NULL,
  `AMOUNT_L` decimal(10,2) default NULL,
  `MARK` char(1) default NULL,
  `CHKTYPE` varchar(10) default NULL,
  `PAYDOCNO` varchar(15) default NULL,
  `PAYTYPE` varchar(30) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "payouthd"
--
DROP TABLE IF EXISTS payouthd;

CREATE TABLE `payouthd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `AMOUNT_D` decimal(10,0) default NULL,
  `REFNO` varchar(15) default NULL,
  `XREMARK` varchar(50) default NULL,
  `DATEPASS` date default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "po"
--
DROP TABLE IF EXISTS po;

CREATE TABLE `po` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ID` varchar(18) default NULL,
  `XDESC` varchar(60) default NULL,
  `QUAN` decimal(13,3) default NULL,
  `PRICE` decimal(14,4) default NULL,
  `REC` decimal(13,3) default NULL,
  `UNIT_SAL` varchar(10) default NULL,
  `RATIO` decimal(13,3) default NULL,
  `DISCL` varchar(10) default NULL,
  `AMOUNT_L` decimal(13,3) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `DISCAMT` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `OTHDESC` mediumtext,
  `AMOUNT_B` decimal(13,3) default NULL,
  `DISCDAMT` decimal(13,3) default NULL,
  `MQUAN` decimal(13,3) default NULL,
  `MQUANREC` decimal(13,3) default NULL,
  `NBAL` decimal(13,3) default NULL,
  `NBAL_12` decimal(13,3) default NULL,
  `REC_12` decimal(13,3) default NULL,
  `RECBEG` decimal(13,3) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "pohead"
--
DROP TABLE IF EXISTS pohead;

CREATE TABLE `pohead` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `TERM` int(11) default NULL,
  `ACCID` varchar(10) default NULL,
  `DELITYPE` char(2) default NULL,
  `SENDDATE` datetime default NULL,
  `TAXTYPE` char(2) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VAT` decimal(13,3) default NULL,
  `VATAMT` decimal(13,3) default NULL,
  `DISCD` varchar(10) default NULL,
  `AMOUNT_D` decimal(13,3) default NULL,
  `AMOUNT_B` decimal(13,3) default NULL,
  `QDOCNO` varchar(15) default NULL,
  `QUOFLG` char(1) default NULL,
  `DISCAMT` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `AREA` char(2) default NULL,
  `AFTDISC` decimal(13,3) default NULL,
  `CLEAR` char(1) default NULL,
  `XREMARK` mediumtext,
  `AMTDESC` varchar(60) default NULL,
  `PAYTYPE` varchar(30) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  `PRNO` varchar(15) default NULL,
  `XREFER` varchar(30) default NULL,
  `SENDDATE2` varchar(60) default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "pricechg"
--
DROP TABLE IF EXISTS pricechg;

CREATE TABLE `pricechg` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DATEEND` datetime default NULL,
  `CUSGRP` varchar(4) default NULL,
  `DISC` varchar(10) default NULL,
  `ID` varchar(18) NOT NULL default '',
  `CUSGRP2` varchar(4) default NULL,
  `PRICE` float default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "quo"
--
DROP TABLE IF EXISTS quo;

CREATE TABLE `quo` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ID` varchar(18) default NULL,
  `XDESC` varchar(60) default NULL,
  `QTY` decimal(18,4) default NULL,
  `PRICE` decimal(18,4) default NULL,
  `UNIT_SAL` varchar(10) default NULL,
  `PER_SAL` decimal(18,4) default NULL,
  `DISCL` varchar(15) default NULL,
  `AMOUNT_L` decimal(13,2) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `DISAMT` decimal(13,2) default NULL,
  `INVAMT` decimal(13,2) default NULL,
  `OTHDESC` mediumtext,
  `AMOUNT_B` decimal(13,2) default NULL,
  `DISCDAMT` decimal(13,2) default NULL,
  `MQUAN` decimal(13,2) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "quohead"
--
DROP TABLE IF EXISTS quohead;

CREATE TABLE `quohead` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `TERM` int(11) default NULL,
  `ACCID` varchar(10) default NULL,
  `DELITYPE` char(2) default NULL,
  `DUEN` int(11) default NULL,
  `PAIDTYPE` varchar(20) default NULL,
  `SALEID` varchar(10) default NULL,
  `TAXTYPE` char(2) default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `VAT` decimal(13,2) default NULL,
  `VATAMT` decimal(13,2) default NULL,
  `AMOUNT_D` decimal(13,2) default NULL,
  `AMOUNT_B` decimal(13,2) default NULL,
  `STATUS` char(2) default NULL,
  `QUOFLAG` char(2) default NULL,
  `DISCAMT` decimal(13,2) default NULL,
  `INVAMT` decimal(13,2) default NULL,
  `AREA` char(2) default NULL,
  `AFTDISC` decimal(13,2) default NULL,
  `REFNO` varchar(15) default NULL,
  `XREMARK` mediumtext,
  `DISCD` varchar(10) default NULL,
  `AMTDESC` varchar(60) default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "recfinhd"
--
DROP TABLE IF EXISTS recfinhd;

CREATE TABLE `recfinhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `XREMARK` varchar(60) default NULL,
  `REFNO` varchar(10) default NULL,
  `LOCID` varchar(10) default NULL,
  `ORDDOCNO` varchar(15) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "retisshd"
--
DROP TABLE IF EXISTS retisshd;

CREATE TABLE `retisshd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `DPTID` varchar(10) default NULL,
  `JOBNO` varchar(10) default NULL,
  `XREMARK` varchar(60) default NULL,
  `REFNO` varchar(10) default NULL,
  `LOCID` varchar(10) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "route"
--
DROP TABLE IF EXISTS route;

CREATE TABLE `route` (
  `ROUTE` varchar(4) NOT NULL default '',
  `AREA1` varchar(250) default NULL,
  PRIMARY KEY  (`ROUTE`)
) TYPE=MyISAM;

--
--  Table structure for table "runno"
--
DROP TABLE IF EXISTS runno;

CREATE TABLE `runno` (
  `MPRE` char(2) default NULL,
  `MMTH` int(11) default NULL,
  `MYR` int(11) default NULL,
  `RUNNO` int(11) default NULL
) TYPE=MyISAM;

--
--  Table structure for table "salemst"
--
DROP TABLE IF EXISTS salemst;

CREATE TABLE `salemst` (
  `SID` varchar(10) NOT NULL default '',
  `SNAME` varchar(70) default NULL,
  PRIMARY KEY  (`SID`)
) TYPE=MyISAM;

--
--  Table structure for table "scrform"
--
DROP TABLE IF EXISTS scrform;

CREATE TABLE `scrform` (
  `FFORMNAME` varchar(50) default NULL,
  `FILENAME` varchar(50) NOT NULL default '',
  `FRMCONTENT` mediumtext,
  `FRMSCREEN` varchar(50) default NULL,
  PRIMARY KEY  (`FILENAME`)
) TYPE=MyISAM;

--
--  Table structure for table "scrformpic"
--
DROP TABLE IF EXISTS scrformpic;

CREATE TABLE `scrformpic` (
  `FILENAME` varchar(50) NOT NULL default '',
  `LINE` int(11) NOT NULL default '0',
  `XPIC` mediumblob,
  PRIMARY KEY  (`FILENAME`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "seven"
--
DROP TABLE IF EXISTS seven;

CREATE TABLE `seven` (
  `ID` varchar(50) default NULL,
  `SEVEN` varchar(50) default NULL
) TYPE=MyISAM;

--
--  Table structure for table "sin"
--
DROP TABLE IF EXISTS sin;

CREATE TABLE `sin` (
  `DOCNO` varchar(20) NOT NULL default '',
  `LINE` int(255) NOT NULL default '0',
  `ID` varchar(20) default NULL,
  `LOCID` varchar(10) default NULL,
  `QUANIN` decimal(13,2) default '0.00',
  `QUANOUT` decimal(13,2) default '0.00',
  `REPBAL` decimal(13,2) default '0.00',
  `SERIAL` varchar(30) default NULL,
  `DATEDOC` datetime default NULL,
  `COSTREPBAL` decimal(13,2) default '0.00',
  `COST` decimal(13,3) default '0.000',
  `BEGFLAG` char(1) default NULL,
  `REFX` varchar(15) default NULL,
  `ARACCID` varchar(10) default NULL,
  `APACCID` varchar(10) default NULL,
  `TRLINE` tinyint(3) unsigned default '0',
  `TRTYPE` char(2) default '00',
  `LASTBAL` decimal(13,2) unsigned default '0.00',
  PRIMARY KEY  (`DOCNO`,`LINE`),
  KEY `ACCID` (`ARACCID`),
  KEY `APACCID` (`APACCID`),
  KEY `ID` (`ID`),
  KEY `LOCID` (`LOCID`)
) TYPE=MyISAM;

--
--  Table structure for table "skin"
--
DROP TABLE IF EXISTS skin;

CREATE TABLE `skin` (
  `FormName` varchar(20) NOT NULL default '',
  `FFolder` varchar(50) default NULL,
  `JpgName` varchar(20) default NULL,
  PRIMARY KEY  (`FormName`)
) TYPE=MyISAM;

--
--  Table structure for table "status"
--
DROP TABLE IF EXISTS status;

CREATE TABLE `status` (
  `STATUS` varchar(5) NOT NULL default '',
  `STATUSNAME` varchar(50) default NULL,
  PRIMARY KEY  (`STATUS`)
) TYPE=MyISAM;

--
--  Table structure for table "tranhd"
--
DROP TABLE IF EXISTS tranhd;

CREATE TABLE `tranhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `LOCIDFRM` varchar(10) default NULL,
  `LOCIDTO` varchar(10) default NULL,
  `XREMARK` varchar(60) default NULL,
  `JOBNO` varchar(10) default NULL,
  `DPTID` varchar(10) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "trantail"
--
DROP TABLE IF EXISTS trantail;

CREATE TABLE `trantail` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ID` varchar(18) default NULL,
  `XDESC` varchar(60) default NULL,
  `QUAN` decimal(13,3) default NULL,
  `UNIT` varchar(10) default NULL,
  `UNRATIO` decimal(13,3) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `LOCIDFRM` varchar(10) default NULL,
  `LOCIDTO` varchar(10) default NULL,
  `MQUAN` decimal(13,3) default NULL,
  `COST` decimal(13,3) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "unpr"
--
DROP TABLE IF EXISTS unpr;

CREATE TABLE `unpr` (
  `ID` varchar(20) NOT NULL default '',
  `UNIT` varchar(10) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `RATIO` decimal(18,4) default NULL,
  `PRICE1` decimal(18,4) default NULL,
  `PRICE2` decimal(18,4) default NULL,
  `PRICE3` decimal(18,4) default NULL,
  `PRICE4` decimal(18,4) default NULL,
  `BARCODE` varchar(20) default NULL,
  `XDESCB` varchar(100) default NULL,
  PRIMARY KEY  (`ID`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "upayin"
--
DROP TABLE IF EXISTS upayin;

CREATE TABLE `upayin` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `LINE` smallint(6) NOT NULL default '0',
  `CHKNO` varchar(17) default NULL,
  `DATECHK` datetime default NULL,
  `BRANCH` varchar(20) default NULL,
  `AMOUNT_L` decimal(10,3) default NULL,
  `BKKCHK` decimal(10,3) default NULL,
  `MARK` char(1) default NULL,
  `CHKTYPE` varchar(10) default NULL,
  `PAYDOCNO` varchar(15) default NULL,
  `PAYTYPE` varchar(30) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "upayinhd"
--
DROP TABLE IF EXISTS upayinhd;

CREATE TABLE `upayinhd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `AMOUNT_D` decimal(10,0) default NULL,
  `REFNO` varchar(15) default NULL,
  `BKKCHK` decimal(10,0) default NULL,
  `XREMARK` varchar(40) default NULL,
  `BANKID` varchar(10) default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "upayout"
--
DROP TABLE IF EXISTS upayout;

CREATE TABLE `upayout` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `LINE` smallint(6) NOT NULL default '0',
  `CHKNO` varchar(17) default NULL,
  `DATECHK` datetime default NULL,
  `BANKID` varchar(5) default NULL,
  `BRANCH` varchar(20) default NULL,
  `AMOUNT_L` decimal(10,3) default NULL,
  `MARK` char(1) default NULL,
  `CHKTYPE` varchar(10) default NULL,
  `PAYDOCNO` varchar(15) default NULL,
  `PAYTYPE` varchar(30) default NULL,
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

--
--  Table structure for table "upayouthd"
--
DROP TABLE IF EXISTS upayouthd;

CREATE TABLE `upayouthd` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `AMOUNT_D` decimal(10,0) default NULL,
  `REFNO` varchar(10) default NULL,
  `XREMARK` varchar(40) default NULL,
  PRIMARY KEY  (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "x120222085401"
--
DROP TABLE IF EXISTS x120222085401;

CREATE TABLE `x120222085401` (
  `DOCNO` varchar(15) default NULL,
  `DATEDOC` datetime default NULL,
  `XID` varchar(18) default NULL,
  `XDESC` varchar(60) default NULL,
  `XIN` decimal(13,2) default NULL,
  `OUT` decimal(13,2) default NULL,
  `SERIAL` varchar(50) default NULL,
  `XTRTYPE` char(3) default NULL,
  `XREMARK` varchar(150) default NULL,
  `APID` varchar(150) default NULL,
  `ARID` varchar(150) default NULL,
  KEY `ID` (`XID`),
  KEY `DOCNO` (`DOCNO`)
) TYPE=MyISAM;

--
--  Table structure for table "x120222085603"
--
DROP TABLE IF EXISTS x120222085603;

CREATE TABLE `x120222085603` (
  `DOCNO` varchar(50) default NULL,
  `DATEDOC` date default NULL,
  `DATENOW` date default NULL,
  `XDAY` int(11) default '0',
  `ACCID` varchar(10) default NULL,
  `XCOMP` varchar(70) default NULL,
  `REFNO` varchar(15) default NULL,
  `DEBT` decimal(13,2) default '0.00',
  `REC` decimal(13,2) default '0.00',
  `DISC` decimal(13,2) default '0.00',
  `BEG` decimal(13,2) default '0.00',
  `TRTYPE` tinyint(3) unsigned default NULL,
  `XDESC` varchar(50) default NULL,
  `GLID` varchar(20) default NULL,
  `GLNAME` varchar(50) default NULL,
  `ARGID` varchar(10) default NULL,
  `ARGDESC` varchar(50) default NULL,
  `SALEID` varchar(10) default NULL,
  `SNAME` varchar(50) default NULL,
  `CUS_PO` varchar(10) default NULL,
  `DUEDATE` date default NULL,
  `TERM` varchar(10) default NULL,
  `NDUE` decimal(13,2) default '0.00',
  `X30` decimal(13,2) default '0.00',
  `X60` decimal(13,2) default '0.00',
  `X90` decimal(13,2) default '0.00',
  `X91` decimal(13,2) default '0.00',
  `X120` decimal(13,2) default '0.00',
  `X365` decimal(13,2) default '0.00',
  `DATEINV` date default NULL,
  `BILLDOC` varchar(10) default NULL,
  `DATEREC` varchar(10) default NULL,
  `DISCD` decimal(13,2) default '0.00',
  `VATAMT` decimal(13,2) default '0.00',
  `ADVAMT` decimal(13,2) default '0.00',
  `INVAMT` decimal(13,2) default '0.00',
  `CASHPAY` decimal(13,2) default '0.00',
  `ORDDOC` varchar(15) default NULL,
  `XLIMIT` decimal(13,2) default '0.00',
  `ADD1` varchar(50) default NULL,
  KEY `DOCNO` (`DOCNO`,`ACCID`)
) TYPE=MyISAM;

--
--  Table structure for table "xorder"
--
DROP TABLE IF EXISTS xorder;

CREATE TABLE `xorder` (
  `DOCNO` varchar(15) NOT NULL default '',
  `DATEDOC` datetime default NULL,
  `ID` varchar(18) default NULL,
  `XDESC` varchar(60) default NULL,
  `QUAN` decimal(13,3) default NULL,
  `PRICE` decimal(14,4) default NULL,
  `REC` decimal(13,3) default NULL,
  `UNIT_SAL` varchar(10) default NULL,
  `RATIO` decimal(13,3) default NULL,
  `DISCL` varchar(10) default NULL,
  `AMOUNT_L` decimal(13,3) default NULL,
  `LINE` int(11) NOT NULL default '0',
  `DISCAMT` decimal(13,3) default NULL,
  `INVAMT` decimal(13,3) default NULL,
  `OTHDESC` mediumtext,
  `AMOUNT_B` decimal(13,3) default NULL,
  `DISCDAMT` decimal(13,3) default NULL,
  `MQUAN` decimal(13,3) default NULL,
  `MQUANREC` decimal(13,3) default NULL,
  `NBAL` decimal(13,3) default NULL,
  `NBAL_12` decimal(13,3) default NULL,
  `REC_12` decimal(13,3) default NULL,
  `RECBEG` decimal(13,3) default NULL,
  `VOID` tinyint(3) unsigned default '0',
  PRIMARY KEY  (`DOCNO`,`LINE`)
) TYPE=MyISAM;

