From: <ex...@us...> - 2013-07-14 08:36:40
|
Revision: 6083 http://sourceforge.net/p/web-erp/reponame/6083 Author: exsonqu Date: 2013-07-14 08:36:36 +0000 (Sun, 14 Jul 2013) Log Message: ----------- 14/7/2013 Exson: Add new directory for new installer and add those default installation sql file. Added Paths: ----------- trunk/sql/mysql/coa/ trunk/sql/mysql/coa/weberp-demo.sql trunk/sql/mysql/coa/weberp-new.sql Added: trunk/sql/mysql/coa/weberp-demo.sql =================================================================== --- trunk/sql/mysql/coa/weberp-demo.sql (rev 0) +++ trunk/sql/mysql/coa/weberp-demo.sql 2013-07-14 08:36:36 UTC (rev 6083) @@ -0,0 +1,27566 @@ +CREATE DATABASE IF NOT EXISTS weberpdemo; +USE weberpdemo; +SET FOREIGN_KEY_CHECKS = 0; +-- MySQL dump 10.13 Distrib 5.5.24, for Linux (i686) +-- +-- Host: localhost Database: weberpdemo +-- ------------------------------------------------------ +-- Server version 5.5.24 +/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */; +/*!40103 SET TIME_ZONE='+00:00' */; +/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */; +/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */; +/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */; +/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; + +-- +-- Table structure for table `accountgroups` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accountgroups` ( + `groupname` char(30) NOT NULL DEFAULT '', + `sectioninaccounts` int(11) NOT NULL DEFAULT '0', + `pandl` tinyint(4) NOT NULL DEFAULT '1', + `sequenceintb` smallint(6) NOT NULL DEFAULT '0', + `parentgroupname` varchar(30) NOT NULL, + PRIMARY KEY (`groupname`), + KEY `SequenceInTB` (`sequenceintb`), + KEY `sectioninaccounts` (`sectioninaccounts`), + KEY `parentgroupname` (`parentgroupname`), + CONSTRAINT `accountgroups_ibfk_1` FOREIGN KEY (`sectioninaccounts`) REFERENCES `accountsection` (`sectionid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `accountsection` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `accountsection` ( + `sectionid` int(11) NOT NULL DEFAULT '0', + `sectionname` text NOT NULL, + PRIMARY KEY (`sectionid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `areas` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `areas` ( + `areacode` char(3) NOT NULL, + `areadescription` varchar(25) NOT NULL DEFAULT '', + PRIMARY KEY (`areacode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `assetmanager` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `assetmanager` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `stockid` varchar(20) NOT NULL DEFAULT '', + `serialno` varchar(30) NOT NULL DEFAULT '', + `location` varchar(15) NOT NULL DEFAULT '', + `cost` double NOT NULL DEFAULT '0', + `depn` double NOT NULL DEFAULT '0', + `datepurchased` date NOT NULL DEFAULT '0000-00-00', + `disposalvalue` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `audittrail` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `audittrail` ( + `transactiondate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `userid` varchar(20) NOT NULL DEFAULT '', + `querystring` text, + KEY `UserID` (`userid`), + CONSTRAINT `audittrail_ibfk_1` FOREIGN KEY (`userid`) REFERENCES `www_users` (`userid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `bankaccounts` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bankaccounts` ( + `accountcode` varchar(20) NOT NULL DEFAULT '0', + `currcode` char(3) NOT NULL, + `invoice` smallint(2) NOT NULL DEFAULT '0', + `bankaccountcode` varchar(50) NOT NULL DEFAULT '', + `bankaccountname` char(50) NOT NULL DEFAULT '', + `bankaccountnumber` char(50) NOT NULL DEFAULT '', + `bankaddress` char(50) DEFAULT NULL, + PRIMARY KEY (`accountcode`), + KEY `currcode` (`currcode`), + KEY `BankAccountName` (`bankaccountname`), + KEY `BankAccountNumber` (`bankaccountnumber`), + CONSTRAINT `bankaccounts_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `banktrans` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `banktrans` ( + `banktransid` bigint(20) NOT NULL AUTO_INCREMENT, + `type` smallint(6) NOT NULL DEFAULT '0', + `transno` bigint(20) NOT NULL DEFAULT '0', + `bankact` varchar(20) NOT NULL DEFAULT '0', + `ref` varchar(50) NOT NULL DEFAULT '', + `amountcleared` double NOT NULL DEFAULT '0', + `exrate` double NOT NULL DEFAULT '1' COMMENT 'From bank account currency to payment currency', + `functionalexrate` double NOT NULL DEFAULT '1' COMMENT 'Account currency to functional currency', + `transdate` date NOT NULL DEFAULT '0000-00-00', + `banktranstype` varchar(30) NOT NULL DEFAULT '', + `amount` double NOT NULL DEFAULT '0', + `currcode` char(3) NOT NULL DEFAULT '', + PRIMARY KEY (`banktransid`), + KEY `BankAct` (`bankact`,`ref`), + KEY `TransDate` (`transdate`), + KEY `TransType` (`banktranstype`), + KEY `Type` (`type`,`transno`), + KEY `CurrCode` (`currcode`), + KEY `ref` (`ref`), + KEY `ref_2` (`ref`), + KEY `ref_3` (`ref`), + KEY `ref_4` (`ref`), + KEY `ref_5` (`ref`), + KEY `ref_6` (`ref`), + KEY `ref_7` (`ref`), + KEY `ref_8` (`ref`), + KEY `ref_9` (`ref`), + KEY `ref_10` (`ref`), + CONSTRAINT `banktrans_ibfk_1` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`), + CONSTRAINT `banktrans_ibfk_2` FOREIGN KEY (`bankact`) REFERENCES `bankaccounts` (`accountcode`) +) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `bom` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `bom` ( + `parent` char(20) NOT NULL DEFAULT '', + `component` char(20) NOT NULL DEFAULT '', + `workcentreadded` char(5) NOT NULL DEFAULT '', + `loccode` char(5) NOT NULL DEFAULT '', + `effectiveafter` date NOT NULL DEFAULT '0000-00-00', + `effectiveto` date NOT NULL DEFAULT '9999-12-31', + `quantity` double NOT NULL DEFAULT '1', + `autoissue` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`parent`,`component`,`workcentreadded`,`loccode`), + KEY `Component` (`component`), + KEY `EffectiveAfter` (`effectiveafter`), + KEY `EffectiveTo` (`effectiveto`), + KEY `LocCode` (`loccode`), + KEY `Parent` (`parent`,`effectiveafter`,`effectiveto`,`loccode`), + KEY `Parent_2` (`parent`), + KEY `WorkCentreAdded` (`workcentreadded`), + CONSTRAINT `bom_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `stockmaster` (`stockid`), + CONSTRAINT `bom_ibfk_2` FOREIGN KEY (`component`) REFERENCES `stockmaster` (`stockid`), + CONSTRAINT `bom_ibfk_3` FOREIGN KEY (`workcentreadded`) REFERENCES `workcentres` (`code`), + CONSTRAINT `bom_ibfk_4` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `chartdetails` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `chartdetails` ( + `accountcode` varchar(20) NOT NULL DEFAULT '0', + `period` smallint(6) NOT NULL DEFAULT '0', + `budget` double NOT NULL DEFAULT '0', + `actual` double NOT NULL DEFAULT '0', + `bfwd` double NOT NULL DEFAULT '0', + `bfwdbudget` double NOT NULL DEFAULT '0', + PRIMARY KEY (`accountcode`,`period`), + KEY `Period` (`period`), + CONSTRAINT `chartdetails_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`), + CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `chartmaster` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `chartmaster` ( + `accountcode` varchar(20) NOT NULL DEFAULT '0', + `accountname` char(50) NOT NULL DEFAULT '', + `group_` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`accountcode`), + KEY `AccountName` (`accountname`), + KEY `Group_` (`group_`), + CONSTRAINT `chartmaster_ibfk_1` FOREIGN KEY (`group_`) REFERENCES `accountgroups` (`groupname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `cogsglpostings` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `cogsglpostings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `area` char(3) NOT NULL DEFAULT '', + `stkcat` varchar(6) NOT NULL DEFAULT '', + `glcode` varchar(20) NOT NULL DEFAULT '0', + `salestype` char(2) NOT NULL DEFAULT 'AN', + PRIMARY KEY (`id`), + UNIQUE KEY `Area_StkCat` (`area`,`stkcat`,`salestype`), + KEY `Area` (`area`), + KEY `StkCat` (`stkcat`), + KEY `GLCode` (`glcode`), + KEY `SalesType` (`salestype`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `companies` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `companies` ( + `coycode` int(11) NOT NULL DEFAULT '1', + `coyname` varchar(50) NOT NULL DEFAULT '', + `gstno` varchar(20) NOT NULL DEFAULT '', + `companynumber` varchar(20) NOT NULL DEFAULT '0', + `regoffice1` varchar(40) NOT NULL DEFAULT '', + `regoffice2` varchar(40) NOT NULL DEFAULT '', + `regoffice3` varchar(40) NOT NULL DEFAULT '', + `regoffice4` varchar(40) NOT NULL DEFAULT '', + `regoffice5` varchar(20) NOT NULL DEFAULT '', + `regoffice6` varchar(15) NOT NULL DEFAULT '', + `telephone` varchar(25) NOT NULL DEFAULT '', + `fax` varchar(25) NOT NULL DEFAULT '', + `email` varchar(55) NOT NULL DEFAULT '', + `currencydefault` varchar(4) NOT NULL DEFAULT '', + `debtorsact` varchar(20) NOT NULL DEFAULT '70000', + `pytdiscountact` varchar(20) NOT NULL DEFAULT '55000', + `creditorsact` varchar(20) NOT NULL DEFAULT '80000', + `payrollact` varchar(20) NOT NULL DEFAULT '84000', + `grnact` varchar(20) NOT NULL DEFAULT '72000', + `exchangediffact` varchar(20) NOT NULL DEFAULT '65000', + `purchasesexchangediffact` varchar(20) NOT NULL DEFAULT '0', + `retainedearnings` varchar(20) NOT NULL DEFAULT '90000', + `gllink_debtors` tinyint(1) DEFAULT '1', + `gllink_creditors` tinyint(1) DEFAULT '1', + `gllink_stock` tinyint(1) DEFAULT '1', + `freightact` varchar(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`coycode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `config` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `config` ( + `confname` varchar(35) NOT NULL DEFAULT '', + `confvalue` text NOT NULL, + PRIMARY KEY (`confname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `contractbom` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contractbom` ( + `contractref` varchar(20) NOT NULL DEFAULT '0', + `stockid` varchar(20) NOT NULL DEFAULT '', + `workcentreadded` char(5) NOT NULL DEFAULT '', + `quantity` double NOT NULL DEFAULT '1', + PRIMARY KEY (`contractref`,`stockid`,`workcentreadded`), + KEY `Stockid` (`stockid`), + KEY `ContractRef` (`contractref`), + KEY `WorkCentreAdded` (`workcentreadded`), + CONSTRAINT `contractbom_ibfk_1` FOREIGN KEY (`workcentreadded`) REFERENCES `workcentres` (`code`), + CONSTRAINT `contractbom_ibfk_3` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `contractcharges` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contractcharges` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `contractref` varchar(20) NOT NULL, + `transtype` smallint(6) NOT NULL DEFAULT '20', + `transno` int(11) NOT NULL DEFAULT '0', + `amount` double NOT NULL DEFAULT '0', + `narrative` text NOT NULL, + `anticipated` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `contractref` (`contractref`,`transtype`,`transno`), + KEY `contractcharges_ibfk_2` (`transtype`), + CONSTRAINT `contractcharges_ibfk_1` FOREIGN KEY (`contractref`) REFERENCES `contracts` (`contractref`), + CONSTRAINT `contractcharges_ibfk_2` FOREIGN KEY (`transtype`) REFERENCES `systypes` (`typeid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `contractreqts` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contractreqts` ( + `contractreqid` int(11) NOT NULL AUTO_INCREMENT, + `contractref` varchar(20) NOT NULL DEFAULT '0', + `requirement` varchar(40) NOT NULL DEFAULT '', + `quantity` double NOT NULL DEFAULT '1', + `costperunit` double NOT NULL DEFAULT '0', + PRIMARY KEY (`contractreqid`), + KEY `ContractRef` (`contractref`), + CONSTRAINT `contractreqts_ibfk_1` FOREIGN KEY (`contractref`) REFERENCES `contracts` (`contractref`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `contracts` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `contracts` ( + `contractref` varchar(20) NOT NULL DEFAULT '', + `contractdescription` text NOT NULL, + `debtorno` varchar(10) NOT NULL DEFAULT '', + `branchcode` varchar(10) NOT NULL DEFAULT '', + `loccode` varchar(5) NOT NULL DEFAULT '', + `status` tinyint(4) NOT NULL DEFAULT '0', + `categoryid` varchar(6) NOT NULL DEFAULT '', + `orderno` int(11) NOT NULL DEFAULT '0', + `customerref` varchar(20) NOT NULL DEFAULT '', + `margin` double NOT NULL DEFAULT '1', + `wo` int(11) NOT NULL DEFAULT '0', + `requireddate` date NOT NULL DEFAULT '0000-00-00', + `drawing` varchar(50) NOT NULL DEFAULT '', + `exrate` double NOT NULL DEFAULT '1', + PRIMARY KEY (`contractref`), + KEY `OrderNo` (`orderno`), + KEY `CategoryID` (`categoryid`), + KEY `Status` (`status`), + KEY `WO` (`wo`), + KEY `loccode` (`loccode`), + KEY `DebtorNo` (`debtorno`,`branchcode`), + CONSTRAINT `contracts_ibfk_1` FOREIGN KEY (`debtorno`, `branchcode`) REFERENCES `custbranch` (`debtorno`, `branchcode`), + CONSTRAINT `contracts_ibfk_2` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`), + CONSTRAINT `contracts_ibfk_3` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `currencies` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `currencies` ( + `currency` char(20) NOT NULL DEFAULT '', + `currabrev` char(3) NOT NULL DEFAULT '', + `country` char(50) NOT NULL DEFAULT '', + `hundredsname` char(15) NOT NULL DEFAULT 'Cents', + `decimalplaces` tinyint(3) NOT NULL DEFAULT '2', + `rate` double NOT NULL DEFAULT '1', + `webcart` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'If 1 shown in weberp cart. if 0 no show', + PRIMARY KEY (`currabrev`), + KEY `Country` (`country`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `custallocns` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custallocns` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `amt` decimal(20,4) NOT NULL DEFAULT '0.0000', + `datealloc` date NOT NULL DEFAULT '0000-00-00', + `transid_allocfrom` int(11) NOT NULL DEFAULT '0', + `transid_allocto` int(11) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `DateAlloc` (`datealloc`), + KEY `TransID_AllocFrom` (`transid_allocfrom`), + KEY `TransID_AllocTo` (`transid_allocto`), + CONSTRAINT `custallocns_ibfk_1` FOREIGN KEY (`transid_allocfrom`) REFERENCES `debtortrans` (`id`), + CONSTRAINT `custallocns_ibfk_2` FOREIGN KEY (`transid_allocto`) REFERENCES `debtortrans` (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `custbranch` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custbranch` ( + `branchcode` varchar(10) NOT NULL DEFAULT '', + `debtorno` varchar(10) NOT NULL DEFAULT '', + `brname` varchar(40) NOT NULL DEFAULT '', + `braddress1` varchar(40) NOT NULL DEFAULT '', + `braddress2` varchar(40) NOT NULL DEFAULT '', + `braddress3` varchar(40) NOT NULL DEFAULT '', + `braddress4` varchar(50) NOT NULL DEFAULT '', + `braddress5` varchar(20) NOT NULL DEFAULT '', + `braddress6` varchar(40) NOT NULL DEFAULT '', + `lat` float(10,6) NOT NULL DEFAULT '0.000000', + `lng` float(10,6) NOT NULL DEFAULT '0.000000', + `estdeliverydays` smallint(6) NOT NULL DEFAULT '1', + `area` char(3) NOT NULL, + `salesman` varchar(4) NOT NULL DEFAULT '', + `fwddate` smallint(6) NOT NULL DEFAULT '0', + `phoneno` varchar(20) NOT NULL DEFAULT '', + `faxno` varchar(20) NOT NULL DEFAULT '', + `contactname` varchar(30) NOT NULL DEFAULT '', + `email` varchar(55) NOT NULL DEFAULT '', + `defaultlocation` varchar(5) NOT NULL DEFAULT '', + `taxgroupid` tinyint(4) NOT NULL DEFAULT '1', + `defaultshipvia` int(11) NOT NULL DEFAULT '1', + `deliverblind` tinyint(1) DEFAULT '1', + `disabletrans` tinyint(4) NOT NULL DEFAULT '0', + `brpostaddr1` varchar(40) NOT NULL DEFAULT '', + `brpostaddr2` varchar(40) NOT NULL DEFAULT '', + `brpostaddr3` varchar(30) NOT NULL DEFAULT '', + `brpostaddr4` varchar(20) NOT NULL DEFAULT '', + `brpostaddr5` varchar(20) NOT NULL DEFAULT '', + `brpostaddr6` varchar(15) NOT NULL DEFAULT '', + `specialinstructions` text NOT NULL, + `custbranchcode` varchar(30) NOT NULL DEFAULT '', + PRIMARY KEY (`branchcode`,`debtorno`), + KEY `BrName` (`brname`), + KEY `DebtorNo` (`debtorno`), + KEY `Salesman` (`salesman`), + KEY `Area` (`area`), + KEY `DefaultLocation` (`defaultlocation`), + KEY `DefaultShipVia` (`defaultshipvia`), + KEY `taxgroupid` (`taxgroupid`), + CONSTRAINT `custbranch_ibfk_1` FOREIGN KEY (`debtorno`) REFERENCES `debtorsmaster` (`debtorno`), + CONSTRAINT `custbranch_ibfk_2` FOREIGN KEY (`area`) REFERENCES `areas` (`areacode`), + CONSTRAINT `custbranch_ibfk_3` FOREIGN KEY (`salesman`) REFERENCES `salesman` (`salesmancode`), + CONSTRAINT `custbranch_ibfk_4` FOREIGN KEY (`defaultlocation`) REFERENCES `locations` (`loccode`), + CONSTRAINT `custbranch_ibfk_6` FOREIGN KEY (`defaultshipvia`) REFERENCES `shippers` (`shipper_id`), + CONSTRAINT `custbranch_ibfk_7` FOREIGN KEY (`taxgroupid`) REFERENCES `taxgroups` (`taxgroupid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `custcontacts` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custcontacts` ( + `contid` int(11) NOT NULL AUTO_INCREMENT, + `debtorno` varchar(10) NOT NULL, + `contactname` varchar(40) NOT NULL, + `role` varchar(40) NOT NULL, + `phoneno` varchar(20) NOT NULL, + `notes` varchar(255) NOT NULL, + `email` varchar(55) NOT NULL, + PRIMARY KEY (`contid`) +) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `custnotes` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `custnotes` ( + `noteid` tinyint(4) NOT NULL AUTO_INCREMENT, + `debtorno` varchar(10) NOT NULL DEFAULT '0', + `href` varchar(100) NOT NULL, + `note` text NOT NULL, + `date` date NOT NULL DEFAULT '0000-00-00', + `priority` varchar(20) NOT NULL, + PRIMARY KEY (`noteid`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `debtorsmaster` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `debtorsmaster` ( + `debtorno` varchar(10) NOT NULL DEFAULT '', + `name` varchar(40) NOT NULL DEFAULT '', + `address1` varchar(40) NOT NULL DEFAULT '', + `address2` varchar(40) NOT NULL DEFAULT '', + `address3` varchar(40) NOT NULL DEFAULT '', + `address4` varchar(50) NOT NULL DEFAULT '', + `address5` varchar(20) NOT NULL DEFAULT '', + `address6` varchar(40) NOT NULL DEFAULT '', + `currcode` char(3) NOT NULL DEFAULT '', + `salestype` char(2) NOT NULL DEFAULT '', + `clientsince` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `holdreason` smallint(6) NOT NULL DEFAULT '0', + `paymentterms` char(2) NOT NULL DEFAULT 'f', + `discount` double NOT NULL DEFAULT '0', + `pymtdiscount` double NOT NULL DEFAULT '0', + `lastpaid` double NOT NULL DEFAULT '0', + `lastpaiddate` datetime DEFAULT NULL, + `creditlimit` double NOT NULL DEFAULT '1000', + `invaddrbranch` tinyint(4) NOT NULL DEFAULT '0', + `discountcode` char(2) NOT NULL DEFAULT '', + `ediinvoices` tinyint(4) NOT NULL DEFAULT '0', + `ediorders` tinyint(4) NOT NULL DEFAULT '0', + `edireference` varchar(20) NOT NULL DEFAULT '', + `editransport` varchar(5) NOT NULL DEFAULT 'email', + `ediaddress` varchar(50) NOT NULL DEFAULT '', + `ediserveruser` varchar(20) NOT NULL DEFAULT '', + `ediserverpwd` varchar(20) NOT NULL DEFAULT '', + `taxref` varchar(20) NOT NULL DEFAULT '', + `customerpoline` tinyint(1) NOT NULL DEFAULT '0', + `typeid` tinyint(4) NOT NULL DEFAULT '1', + `language_id` varchar(10) NOT NULL DEFAULT 'en_GB.utf8', + PRIMARY KEY (`debtorno`), + KEY `Currency` (`currcode`), + KEY `HoldReason` (`holdreason`), + KEY `Name` (`name`), + KEY `PaymentTerms` (`paymentterms`), + KEY `SalesType` (`salestype`), + KEY `EDIInvoices` (`ediinvoices`), + KEY `EDIOrders` (`ediorders`), + KEY `debtorsmaster_ibfk_5` (`typeid`), + CONSTRAINT `debtorsmaster_ibfk_1` FOREIGN KEY (`holdreason`) REFERENCES `holdreasons` (`reasoncode`), + CONSTRAINT `debtorsmaster_ibfk_2` FOREIGN KEY (`currcode`) REFERENCES `currencies` (`currabrev`), + CONSTRAINT `debtorsmaster_ibfk_3` FOREIGN KEY (`paymentterms`) REFERENCES `paymentterms` (`termsindicator`), + CONSTRAINT `debtorsmaster_ibfk_4` FOREIGN KEY (`salestype`) REFERENCES `salestypes` (`typeabbrev`), + CONSTRAINT `debtorsmaster_ibfk_5` FOREIGN KEY (`typeid`) REFERENCES `debtortype` (`typeid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `debtortrans` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `debtortrans` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `transno` int(11) NOT NULL DEFAULT '0', + `type` smallint(6) NOT NULL DEFAULT '0', + `debtorno` varchar(10) NOT NULL DEFAULT '', + `branchcode` varchar(10) NOT NULL DEFAULT '', + `trandate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `inputdate` datetime NOT NULL, + `prd` smallint(6) NOT NULL DEFAULT '0', + `settled` tinyint(4) NOT NULL DEFAULT '0', + `reference` varchar(20) NOT NULL DEFAULT '', + `tpe` char(2) NOT NULL DEFAULT '', + `order_` int(11) NOT NULL DEFAULT '0', + `rate` double NOT NULL DEFAULT '0', + `ovamount` double NOT NULL DEFAULT '0', + `ovgst` double NOT NULL DEFAULT '0', + `ovfreight` double NOT NULL DEFAULT '0', + `ovdiscount` double NOT NULL DEFAULT '0', + `diffonexch` double NOT NULL DEFAULT '0', + `alloc` double NOT NULL DEFAULT '0', + `invtext` text, + `shipvia` int(11) NOT NULL DEFAULT '0', + `edisent` tinyint(4) NOT NULL DEFAULT '0', + `consignment` varchar(15) NOT NULL DEFAULT '', + `packages` int(11) NOT NULL DEFAULT '1' COMMENT 'number of cartons', + `salesperson` varchar(4) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + KEY `DebtorNo` (`debtorno`,`branchcode`), + KEY `Order_` (`order_`), + KEY `Prd` (`prd`), + KEY `Tpe` (`tpe`), + KEY `Type` (`type`), + KEY `Settled` (`settled`), + KEY `TranDate` (`trandate`), + KEY `TransNo` (`transno`), + KEY `Type_2` (`type`,`transno`), + KEY `EDISent` (`edisent`), + KEY `salesperson` (`salesperson`), + CONSTRAINT `debtortrans_ibfk_2` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`), + CONSTRAINT `debtortrans_ibfk_3` FOREIGN KEY (`prd`) REFERENCES `periods` (`periodno`) +) ENGINE=InnoDB AUTO_INCREMENT=35 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `debtortranstaxes` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `debtortranstaxes` ( + `debtortransid` int(11) NOT NULL DEFAULT '0', + `taxauthid` tinyint(4) NOT NULL DEFAULT '0', + `taxamount` double NOT NULL DEFAULT '0', + PRIMARY KEY (`debtortransid`,`taxauthid`), + KEY `taxauthid` (`taxauthid`), + CONSTRAINT `debtortranstaxes_ibfk_1` FOREIGN KEY (`taxauthid`) REFERENCES `taxauthorities` (`taxid`), + CONSTRAINT `debtortranstaxes_ibfk_2` FOREIGN KEY (`debtortransid`) REFERENCES `debtortrans` (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `debtortype` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `debtortype` ( + `typeid` tinyint(4) NOT NULL AUTO_INCREMENT, + `typename` varchar(100) NOT NULL, + PRIMARY KEY (`typeid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `debtortypenotes` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `debtortypenotes` ( + `noteid` tinyint(4) NOT NULL AUTO_INCREMENT, + `typeid` tinyint(4) NOT NULL DEFAULT '0', + `href` varchar(100) NOT NULL, + `note` varchar(200) NOT NULL, + `date` date NOT NULL DEFAULT '0000-00-00', + `priority` varchar(20) NOT NULL, + PRIMARY KEY (`noteid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `deliverynotes` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `deliverynotes` ( + `deliverynotenumber` int(11) NOT NULL, + `deliverynotelineno` tinyint(4) NOT NULL, + `salesorderno` int(11) NOT NULL, + `salesorderlineno` int(11) NOT NULL, + `qtydelivered` double NOT NULL DEFAULT '0', + `printed` tinyint(4) NOT NULL DEFAULT '0', + `invoiced` tinyint(4) NOT NULL DEFAULT '0', + `deliverydate` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`deliverynotenumber`,`deliverynotelineno`), + KEY `deliverynotes_ibfk_2` (`salesorderno`,`salesorderlineno`), + CONSTRAINT `deliverynotes_ibfk_1` FOREIGN KEY (`salesorderno`) REFERENCES `salesorders` (`orderno`), + CONSTRAINT `deliverynotes_ibfk_2` FOREIGN KEY (`salesorderno`, `salesorderlineno`) REFERENCES `salesorderdetails` (`orderno`, `orderlineno`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `departments` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `departments` ( + `departmentid` int(11) NOT NULL AUTO_INCREMENT, + `description` varchar(100) NOT NULL DEFAULT '', + `authoriser` varchar(20) NOT NULL DEFAULT '', + PRIMARY KEY (`departmentid`) +) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `discountmatrix` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `discountmatrix` ( + `salestype` char(2) NOT NULL DEFAULT '', + `discountcategory` char(2) NOT NULL DEFAULT '', + `quantitybreak` int(11) NOT NULL DEFAULT '1', + `discountrate` double NOT NULL DEFAULT '0', + PRIMARY KEY (`salestype`,`discountcategory`,`quantitybreak`), + KEY `QuantityBreak` (`quantitybreak`), + KEY `DiscountCategory` (`discountcategory`), + KEY `SalesType` (`salestype`), + CONSTRAINT `discountmatrix_ibfk_1` FOREIGN KEY (`salestype`) REFERENCES `salestypes` (`typeabbrev`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `edi_orders_seg_groups` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edi_orders_seg_groups` ( + `seggroupno` tinyint(4) NOT NULL DEFAULT '0', + `maxoccur` int(4) NOT NULL DEFAULT '0', + `parentseggroup` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`seggroupno`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `edi_orders_segs` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edi_orders_segs` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `segtag` char(3) NOT NULL DEFAULT '', + `seggroup` tinyint(4) NOT NULL DEFAULT '0', + `maxoccur` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`id`), + KEY `SegTag` (`segtag`), + KEY `SegNo` (`seggroup`) +) ENGINE=InnoDB AUTO_INCREMENT=96 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `ediitemmapping` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `ediitemmapping` ( + `supporcust` varchar(4) NOT NULL DEFAULT '', + `partnercode` varchar(10) NOT NULL DEFAULT '', + `stockid` varchar(20) NOT NULL DEFAULT '', + `partnerstockid` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`supporcust`,`partnercode`,`stockid`), + KEY `PartnerCode` (`partnercode`), + KEY `StockID` (`stockid`), + KEY `PartnerStockID` (`partnerstockid`), + KEY `SuppOrCust` (`supporcust`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `edimessageformat` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `edimessageformat` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `partnercode` varchar(10) NOT NULL DEFAULT '', + `messagetype` varchar(6) NOT NULL DEFAULT '', + `section` varchar(7) NOT NULL DEFAULT '', + `sequenceno` int(11) NOT NULL DEFAULT '0', + `linetext` varchar(70) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `PartnerCode` (`partnercode`,`messagetype`,`sequenceno`), + KEY `Section` (`section`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `emailsettings` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `emailsettings` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `host` varchar(30) NOT NULL, + `port` char(5) NOT NULL, + `heloaddress` varchar(20) NOT NULL, + `username` varchar(30) DEFAULT NULL, + `password` varchar(30) DEFAULT NULL, + `timeout` int(11) DEFAULT '5', + `companyname` varchar(50) DEFAULT NULL, + `auth` tinyint(1) DEFAULT '0', + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `factorcompanies` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `factorcompanies` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `coyname` varchar(50) NOT NULL DEFAULT '', + `address1` varchar(40) NOT NULL DEFAULT '', + `address2` varchar(40) NOT NULL DEFAULT '', + `address3` varchar(40) NOT NULL DEFAULT '', + `address4` varchar(40) NOT NULL DEFAULT '', + `address5` varchar(20) NOT NULL DEFAULT '', + `address6` varchar(15) NOT NULL DEFAULT '', + `contact` varchar(25) NOT NULL DEFAULT '', + `telephone` varchar(25) NOT NULL DEFAULT '', + `fax` varchar(25) NOT NULL DEFAULT '', + `email` varchar(55) NOT NULL DEFAULT '', + PRIMARY KEY (`id`), + UNIQUE KEY `factor_name` (`coyname`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `fixedassetcategories` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `fixedassetcategories` ( + `categoryid` char(6) NOT NULL DEFAULT '', + `categorydescription` char(20) NOT NULL DEFAULT '', + `costact` varchar(20) NOT NULL DEFAULT '0', + `depnact` varchar(20) NOT NULL DEFAULT '0', + `disposalact` varchar(20) NOT NULL DEFAULT '80000', + `accumdepnact` varchar(20) NOT NULL DEFAULT '0', + `defaultdepnrate` double NOT NULL DEFAULT '0.2', + `defaultdepntype` int(11) NOT NULL DEFAULT '1', + PRIMARY KEY (`categoryid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `fixedassetlocations` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `fixedassetlocations` ( + `locationid` char(6) NOT NULL DEFAULT '', + `locationdescription` char(20) NOT NULL DEFAULT '', + `parentlocationid` char(6) DEFAULT '', + PRIMARY KEY (`locationid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `fixedassets` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `fixedassets` ( + `assetid` int(11) NOT NULL AUTO_INCREMENT, + `serialno` varchar(30) NOT NULL DEFAULT '', + `barcode` varchar(20) NOT NULL, + `assetlocation` varchar(6) NOT NULL DEFAULT '', + `cost` double NOT NULL DEFAULT '0', + `accumdepn` double NOT NULL DEFAULT '0', + `datepurchased` date NOT NULL DEFAULT '0000-00-00', + `disposalproceeds` double NOT NULL DEFAULT '0', + `assetcategoryid` varchar(6) NOT NULL DEFAULT '', + `description` varchar(50) NOT NULL DEFAULT '', + `longdescription` text NOT NULL, + `depntype` int(11) NOT NULL DEFAULT '1', + `depnrate` double NOT NULL, + `disposaldate` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`assetid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `fixedassettasks` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `fixedassettasks` ( + `taskid` int(11) NOT NULL AUTO_INCREMENT, + `assetid` int(11) NOT NULL, + `taskdescription` text NOT NULL, + `frequencydays` int(11) NOT NULL DEFAULT '365', + `lastcompleted` date NOT NULL, + `userresponsible` varchar(20) NOT NULL, + `manager` varchar(20) NOT NULL DEFAULT '', + PRIMARY KEY (`taskid`), + KEY `assetid` (`assetid`), + KEY `userresponsible` (`userresponsible`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `fixedassettrans` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `fixedassettrans` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `assetid` int(11) NOT NULL, + `transtype` tinyint(4) NOT NULL, + `transdate` date NOT NULL, + `transno` int(11) NOT NULL, + `periodno` smallint(6) NOT NULL, + `inputdate` date NOT NULL, + `fixedassettranstype` varchar(8) NOT NULL, + `amount` double NOT NULL, + PRIMARY KEY (`id`), + KEY `assetid` (`assetid`,`transtype`,`transno`), + KEY `inputdate` (`inputdate`), + KEY `transdate` (`transdate`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `freightcosts` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `freightcosts` ( + `shipcostfromid` int(11) NOT NULL AUTO_INCREMENT, + `locationfrom` varchar(5) NOT NULL DEFAULT '', + `destination` varchar(40) NOT NULL DEFAULT '', + `shipperid` int(11) NOT NULL DEFAULT '0', + `cubrate` double NOT NULL DEFAULT '0', + `kgrate` double NOT NULL DEFAULT '0', + `maxkgs` double NOT NULL DEFAULT '999999', + `maxcub` double NOT NULL DEFAULT '999999', + `fixedprice` double NOT NULL DEFAULT '0', + `minimumchg` double NOT NULL DEFAULT '0', + PRIMARY KEY (`shipcostfromid`), + KEY `Destination` (`destination`), + KEY `LocationFrom` (`locationfrom`), + KEY `ShipperID` (`shipperid`), + KEY `Destination_2` (`destination`,`locationfrom`,`shipperid`), + CONSTRAINT `freightcosts_ibfk_1` FOREIGN KEY (`locationfrom`) REFERENCES `locations` (`loccode`), + CONSTRAINT `freightcosts_ibfk_2` FOREIGN KEY (`shipperid`) REFERENCES `shippers` (`shipper_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `geocode_param` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `geocode_param` ( + `geocodeid` tinyint(4) NOT NULL AUTO_INCREMENT, + `geocode_key` varchar(200) NOT NULL DEFAULT '', + `center_long` varchar(20) NOT NULL DEFAULT '', + `center_lat` varchar(20) NOT NULL DEFAULT '', + `map_height` varchar(10) NOT NULL DEFAULT '', + `map_width` varchar(10) NOT NULL DEFAULT '', + `map_host` varchar(50) NOT NULL DEFAULT '', + PRIMARY KEY (`geocodeid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `gltrans` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `gltrans` ( + `counterindex` int(11) NOT NULL AUTO_INCREMENT, + `type` smallint(6) NOT NULL DEFAULT '0', + `typeno` bigint(16) NOT NULL DEFAULT '1', + `chequeno` int(11) NOT NULL DEFAULT '0', + `trandate` date NOT NULL DEFAULT '0000-00-00', + `periodno` smallint(6) NOT NULL DEFAULT '0', + `account` varchar(20) NOT NULL DEFAULT '0', + `narrative` varchar(200) NOT NULL DEFAULT '', + `amount` double NOT NULL DEFAULT '0', + `posted` tinyint(4) NOT NULL DEFAULT '0', + `jobref` varchar(20) NOT NULL DEFAULT '', + `tag` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`counterindex`), + KEY `Account` (`account`), + KEY `ChequeNo` (`chequeno`), + KEY `PeriodNo` (`periodno`), + KEY `Posted` (`posted`), + KEY `TranDate` (`trandate`), + KEY `TypeNo` (`typeno`), + KEY `Type_and_Number` (`type`,`typeno`), + KEY `JobRef` (`jobref`), + KEY `tag` (`tag`), + KEY `tag_2` (`tag`), + KEY `tag_3` (`tag`), + KEY `tag_4` (`tag`), + CONSTRAINT `gltrans_ibfk_1` FOREIGN KEY (`account`) REFERENCES `chartmaster` (`accountcode`), + CONSTRAINT `gltrans_ibfk_2` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`), + CONSTRAINT `gltrans_ibfk_3` FOREIGN KEY (`periodno`) REFERENCES `periods` (`periodno`) +) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `grns` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `grns` ( + `grnbatch` smallint(6) NOT NULL DEFAULT '0', + `grnno` int(11) NOT NULL AUTO_INCREMENT, + `podetailitem` int(11) NOT NULL DEFAULT '0', + `itemcode` varchar(20) NOT NULL DEFAULT '', + `deliverydate` date NOT NULL DEFAULT '0000-00-00', + `itemdescription` varchar(100) NOT NULL DEFAULT '', + `qtyrecd` double NOT NULL DEFAULT '0', + `quantityinv` double NOT NULL DEFAULT '0', + `supplierid` varchar(10) NOT NULL DEFAULT '', + `stdcostunit` double NOT NULL DEFAULT '0', + PRIMARY KEY (`grnno`), + KEY `DeliveryDate` (`deliverydate`), + KEY `ItemCode` (`itemcode`), + KEY `PODetailItem` (`podetailitem`), + KEY `SupplierID` (`supplierid`), + CONSTRAINT `grns_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`), + CONSTRAINT `grns_ibfk_2` FOREIGN KEY (`podetailitem`) REFERENCES `purchorderdetails` (`podetailitem`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `holdreasons` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `holdreasons` ( + `reasoncode` smallint(6) NOT NULL DEFAULT '1', + `reasondescription` char(30) NOT NULL DEFAULT '', + `dissallowinvoices` tinyint(4) NOT NULL DEFAULT '-1', + PRIMARY KEY (`reasoncode`), + KEY `ReasonDescription` (`reasondescription`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `internalstockcatrole` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `internalstockcatrole` ( + `categoryid` varchar(6) NOT NULL, + `secroleid` int(11) NOT NULL, + PRIMARY KEY (`categoryid`,`secroleid`), + KEY `internalstockcatrole_ibfk_1` (`categoryid`), + KEY `internalstockcatrole_ibfk_2` (`secroleid`), + CONSTRAINT `internalstockcatrole_ibfk_1` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`), + CONSTRAINT `internalstockcatrole_ibfk_2` FOREIGN KEY (`secroleid`) REFERENCES `securityroles` (`secroleid`), + CONSTRAINT `internalstockcatrole_ibfk_3` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`), + CONSTRAINT `internalstockcatrole_ibfk_4` FOREIGN KEY (`secroleid`) REFERENCES `securityroles` (`secroleid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `labelfields` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `labelfields` ( + `labelfieldid` int(11) NOT NULL AUTO_INCREMENT, + `labelid` tinyint(4) NOT NULL, + `fieldvalue` varchar(20) NOT NULL, + `vpos` double NOT NULL DEFAULT '0', + `hpos` double NOT NULL DEFAULT '0', + `fontsize` tinyint(4) NOT NULL, + `barcode` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`labelfieldid`), + KEY `labelid` (`labelid`), + KEY `vpos` (`vpos`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `labels` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `labels` ( + `labelid` tinyint(11) NOT NULL AUTO_INCREMENT, + `description` varchar(50) NOT NULL, + `pagewidth` double NOT NULL DEFAULT '0', + `pageheight` double NOT NULL DEFAULT '0', + `height` double NOT NULL DEFAULT '0', + `width` double NOT NULL DEFAULT '0', + `topmargin` double NOT NULL DEFAULT '0', + `leftmargin` double NOT NULL DEFAULT '0', + `rowheight` double NOT NULL DEFAULT '0', + `columnwidth` double NOT NULL DEFAULT '0', + PRIMARY KEY (`labelid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `lastcostrollup` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `lastcostrollup` ( + `stockid` char(20) NOT NULL DEFAULT '', + `totalonhand` double NOT NULL DEFAULT '0', + `matcost` decimal(20,4) NOT NULL DEFAULT '0.0000', + `labcost` decimal(20,4) NOT NULL DEFAULT '0.0000', + `oheadcost` decimal(20,4) NOT NULL DEFAULT '0.0000', + `categoryid` char(6) NOT NULL DEFAULT '', + `stockact` varchar(20) NOT NULL DEFAULT '0', + `adjglact` varchar(20) NOT NULL DEFAULT '0', + `newmatcost` decimal(20,4) NOT NULL DEFAULT '0.0000', + `newlabcost` decimal(20,4) NOT NULL DEFAULT '0.0000', + `newoheadcost` decimal(20,4) NOT NULL DEFAULT '0.0000' +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `locations` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `locations` ( + `loccode` varchar(5) NOT NULL DEFAULT '', + `locationname` varchar(50) NOT NULL DEFAULT '', + `deladd1` varchar(40) NOT NULL DEFAULT '', + `deladd2` varchar(40) NOT NULL DEFAULT '', + `deladd3` varchar(40) NOT NULL DEFAULT '', + `deladd4` varchar(40) NOT NULL DEFAULT '', + `deladd5` varchar(20) NOT NULL DEFAULT '', + `deladd6` varchar(15) NOT NULL DEFAULT '', + `tel` varchar(30) NOT NULL DEFAULT '', + `fax` varchar(30) NOT NULL DEFAULT '', + `email` varchar(55) NOT NULL DEFAULT '', + `contact` varchar(30) NOT NULL DEFAULT '', + `taxprovinceid` tinyint(4) NOT NULL DEFAULT '1', + `cashsalecustomer` varchar(10) DEFAULT '', + `managed` int(11) DEFAULT '0', + `cashsalebranch` varchar(10) DEFAULT '', + `internalrequest` tinyint(4) NOT NULL DEFAULT '1' COMMENT 'Allow (1) or not (0) internal request from this location', + PRIMARY KEY (`loccode`), + UNIQUE KEY `locationname` (`locationname`), + KEY `taxprovinceid` (`taxprovinceid`), + CONSTRAINT `locations_ibfk_1` FOREIGN KEY (`taxprovinceid`) REFERENCES `taxprovinces` (`taxprovinceid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `locstock` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `locstock` ( + `loccode` varchar(5) NOT NULL DEFAULT '', + `stockid` varchar(20) NOT NULL DEFAULT '', + `quantity` double NOT NULL DEFAULT '0', + `reorderlevel` bigint(20) NOT NULL DEFAULT '0', + `bin` varchar(10) NOT NULL, + PRIMARY KEY (`loccode`,`stockid`), + KEY `StockID` (`stockid`), + KEY `bin` (`bin`), + CONSTRAINT `locstock_ibfk_1` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`), + CONSTRAINT `locstock_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `loctransfers` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `loctransfers` ( + `reference` int(11) NOT NULL DEFAULT '0', + `stockid` varchar(20) NOT NULL DEFAULT '', + `shipqty` double NOT NULL DEFAULT '0', + `recqty` double NOT NULL DEFAULT '0', + `shipdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `recdate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', + `shiploc` varchar(7) NOT NULL DEFAULT '', + `recloc` varchar(7) NOT NULL DEFAULT '', + KEY `Reference` (`reference`,`stockid`), + KEY `ShipLoc` (`shiploc`), + KEY `RecLoc` (`recloc`), + KEY `StockID` (`stockid`), + CONSTRAINT `loctransfers_ibfk_1` FOREIGN KEY (`shiploc`) REFERENCES `locations` (`loccode`), + CONSTRAINT `loctransfers_ibfk_2` FOREIGN KEY (`recloc`) REFERENCES `locations` (`loccode`), + CONSTRAINT `loctransfers_ibfk_3` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Stores Shipments To And From Locations'; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mailgroupdetails` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mailgroupdetails` ( + `groupname` varchar(100) NOT NULL, + `userid` varchar(20) NOT NULL, + KEY `userid` (`userid`), + KEY `groupname` (`groupname`), + CONSTRAINT `mailgroupdetails_ibfk_1` FOREIGN KEY (`groupname`) REFERENCES `mailgroups` (`groupname`), + CONSTRAINT `mailgroupdetails_ibfk_2` FOREIGN KEY (`userid`) REFERENCES `www_users` (`userid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mailgroups` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mailgroups` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `groupname` varchar(100) NOT NULL, + PRIMARY KEY (`id`), + UNIQUE KEY `groupname` (`groupname`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `manufacturers` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `manufacturers` ( + `manufacturers_id` int(11) NOT NULL AUTO_INCREMENT, + `manufacturers_name` varchar(32) NOT NULL, + `manufacturers_url` varchar(50) NOT NULL DEFAULT '', + `manufacturers_image` varchar(64) DEFAULT NULL, + PRIMARY KEY (`manufacturers_id`), + KEY `manufacturers_name` (`manufacturers_name`) +) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mrpcalendar` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mrpcalendar` ( + `calendardate` date NOT NULL, + `daynumber` int(6) NOT NULL, + `manufacturingflag` smallint(6) NOT NULL DEFAULT '1', + PRIMARY KEY (`calendardate`), + KEY `daynumber` (`daynumber`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mrpdemands` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mrpdemands` ( + `demandid` int(11) NOT NULL AUTO_INCREMENT, + `stockid` varchar(20) NOT NULL DEFAULT '', + `mrpdemandtype` varchar(6) NOT NULL DEFAULT '', + `quantity` double NOT NULL DEFAULT '0', + `duedate` date NOT NULL DEFAULT '0000-00-00', + PRIMARY KEY (`demandid`), + KEY `StockID` (`stockid`), + KEY `mrpdemands_ibfk_1` (`mrpdemandtype`), + CONSTRAINT `mrpdemands_ibfk_1` FOREIGN KEY (`mrpdemandtype`) REFERENCES `mrpdemandtypes` (`mrpdemandtype`), + CONSTRAINT `mrpdemands_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mrpdemandtypes` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mrpdemandtypes` ( + `mrpdemandtype` varchar(6) NOT NULL DEFAULT '', + `description` char(30) NOT NULL DEFAULT '', + PRIMARY KEY (`mrpdemandtype`), + KEY `mrpdemandtype` (`mrpdemandtype`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `mrpplannedorders` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `mrpplannedorders` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `part` char(20) DEFAULT NULL, + `duedate` date DEFAULT NULL, + `supplyquantity` double DEFAULT NULL, + `ordertype` varchar(6) DEFAULT NULL, + `orderno` int(11) DEFAULT NULL, + `mrpdate` date DEFAULT NULL, + `updateflag` smallint(6) DEFAULT NULL, + PRIMARY KEY (`id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `offers` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `offers` ( + `offerid` int(11) NOT NULL AUTO_INCREMENT, + `tenderid` int(11) NOT NULL DEFAULT '0', + `supplierid` varchar(10) NOT NULL DEFAULT '', + `stockid` varchar(20) NOT NULL DEFAULT '', + `quantity` double NOT NULL DEFAULT '0', + `uom` varchar(15) NOT NULL DEFAULT '', + `price` double NOT NULL DEFAULT '0', + `expirydate` date NOT NULL DEFAULT '0000-00-00', + `currcode` char(3) NOT NULL DEFAULT '', + PRIMARY KEY (`offerid`), + KEY `offers_ibfk_1` (`supplierid`), + KEY `offers_ibfk_2` (`stockid`), + CONSTRAINT `offers_ibfk_1` FOREIGN KEY (`supplierid`) REFERENCES `suppliers` (`supplierid`), + CONSTRAINT `offers_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) +) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `orderdeliverydifferenceslog` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `orderdeliverydifferenceslog` ( + `orderno` int(11) NOT NULL DEFAULT '0', + `invoiceno` int(11) NOT NULL DEFAULT '0', + `stockid` varchar(20) NOT NULL DEFAULT '', + `quantitydiff` double NOT NULL DEFAULT '0', + `debtorno` varchar(10) NOT NULL DEFAULT '', + `branch` varchar(10) NOT NULL DEFAULT '', + `can_or_bo` char(3) NOT NULL DEFAULT 'CAN', + KEY `StockID` (`stockid`), + KEY `DebtorNo` (`debtorno`,`branch`), + KEY `Can_or_BO` (`can_or_bo`), + KEY `OrderNo` (`orderno`), + CONSTRAINT `orderdeliverydifferenceslog_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`), + CONSTRAINT `orderdeliverydifferenceslog_ibfk_2` FOREIGN KEY (`debtorno`, `branch`) REFERENCES `custbranch` (`debtorno`, `branchcode`), + CONSTRAINT `orderdeliverydifferenceslog_ibfk_3` FOREIGN KEY (`orderno`) REFERENCES `salesorders` (`orderno`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `paymentmethods` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `paymentmethods` ( + `paymentid` tinyint(4) NOT NULL AUTO_INCREMENT, + `paymentname` varchar(15) NOT NULL DEFAULT '', + `paymenttype` int(11) NOT NULL DEFAULT '1', + `receipttype` int(11) NOT NULL DEFAULT '1', + `usepreprintedstationery` tinyint(4) NOT NULL DEFAULT '0', + `opencashdrawer` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`paymentid`) +) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `paymentterms` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `paymentterms` ( + `termsindicator` char(2) NOT NULL DEFAULT '', + `terms` char(40) NOT NULL DEFAULT '', + `daysbeforedue` smallint(6) NOT NULL DEFAULT '0', + `dayinfollowingmonth` smallint(6) NOT NULL DEFAULT '0', + PRIMARY KEY (`termsindicator`), + KEY `DaysBeforeDue` (`daysbeforedue`), + KEY `DayInFollowingMonth` (`dayinfollowingmonth`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `pcashdetails` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pcashdetails` ( + `counterindex` int(20) NOT NULL AUTO_INCREMENT, + `tabcode` varchar(20) NOT NULL, + `date` date NOT NULL, + `codeexpense` varchar(20) NOT NULL, + `amount` double NOT NULL, + `authorized` date NOT NULL COMMENT 'date cash assigment was revised and authorized by authorizer from tabs table', + `posted` tinyint(4) NOT NULL COMMENT 'has (or has not) been posted into gltrans', + `notes` text NOT NULL, + `receipt` text COMMENT 'filename or path to scanned receipt or code of receipt to find physical receipt if tax guys or auditors show up', + PRIMARY KEY (`counterindex`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `pcexpenses` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pcexpenses` ( + `codeexpense` varchar(20) NOT NULL COMMENT 'code for the group', + `description` varchar(50) NOT NULL COMMENT 'text description, e.g. meals, train tickets, fuel, etc', + `glaccount` varchar(20) NOT NULL DEFAULT '0', + `tag` tinyint(4) NOT NULL DEFAULT '0', + PRIMARY KEY (`codeexpense`), + KEY `glaccount` (`glaccount`), + CONSTRAINT `pcexpenses_ibfk_1` FOREIGN KEY (`glaccount`) REFERENCES `chartmaster` (`accountcode`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `pctabexpenses` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pctabexpenses` ( + `typetabcode` varchar(20) NOT NULL, + `codeexpense` varchar(20) NOT NULL, + KEY `typetabcode` (`typetabcode`), + KEY `codeexpense` (`codeexpense`), + CONSTRAINT `pctabexpenses_ibfk_1` FOREIGN KEY (`typetabcode`) REFERENCES `pctypetabs` (`typetabcode`), + CONSTRAINT `pctabexpenses_ibfk_2` FOREIGN KEY (`codeexpense`) REFERENCES `pcexpenses` (`codeexpense`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Table structure for table `pctabs` +-- + +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `pctabs` ( + `tabcode` varchar(20) NOT NULL, + `usercode` varchar(20) NOT NULL COMMENT 'code of user employee from www_users', + `typetabcode` varchar(20) NOT NULL, + `currency` char(3) NOT NULL, + `tablimit` double NOT NULL, + `assigner` varchar(20) NOT NULL COMMENT 'Cash assigner for the tab', + `authorizer` varchar(20) NOT NULL COMMENT 'code of user from www_users', + `glaccountassignment` varchar(20) NOT NULL DEFAULT '0', + `glaccountpcash` varchar(20) NOT NULL DEFAULT '0', + PRIMARY KEY (`tabcode`), + KEY `usercode` (`usercode`), + KEY `typetabcode` (`typetabcode`), + KEY `currency` (`currency`), + KEY `authorizer` (`authorizer`), + KEY `glaccountassignment` (`glaccountassignment`), + CONSTRAINT `pctabs_ibfk_1` FOREIGN KEY (`usercode`) REFERENCES `www_users` (`userid`), + CONSTRAINT `pctabs_ibfk_2` FOREIGN KEY (`typetabcode`) REFERENCES `pctypetabs` (`typetabcode`), + CONSTRAINT `pctabs_ibfk_3` FOREIGN KEY (`currency`) REFERENCES `currencies` (`currabrev`), + CONSTRAINT `pctabs_ibfk_4` FOREIGN KEY (`authorizer`) REFERENCES `www_users` (`userid`), + CONSTRAINT `pctabs_ibfk_5` FOREIGN KEY (`glaccountassignment`) REFERENCES `chartmaster` (`accountcode`) +) ENGINE=... [truncated message content] |
From: <dai...@us...> - 2015-02-03 06:29:47
|
Revision: 7116 http://sourceforge.net/p/web-erp/reponame/7116 Author: daintree Date: 2015-02-03 06:29:37 +0000 (Tue, 03 Feb 2015) Log Message: ----------- add QA to sysadmin role Modified Paths: -------------- trunk/sql/mysql/country_sql/default.sql trunk/sql/mysql/country_sql/demo.sql trunk/sql/mysql/upgrade4.11.4-4.12.sql Added Paths: ----------- trunk/sql/mysql/upgrade4.12-4.13.sql Modified: trunk/sql/mysql/country_sql/default.sql =================================================================== --- trunk/sql/mysql/country_sql/default.sql 2015-02-02 16:05:28 UTC (rev 7115) +++ trunk/sql/mysql/country_sql/default.sql 2015-02-03 06:29:37 UTC (rev 7116) @@ -7042,6 +7042,7 @@ INSERT INTO `securitygroups` VALUES (8,13); INSERT INTO `securitygroups` VALUES (8,14); INSERT INTO `securitygroups` VALUES (8,15); +INSERT INTO `securitygroups` VALUES (8,16); INSERT INTO `securitygroups` VALUES (9,0); INSERT INTO `securitygroups` VALUES (9,9); Modified: trunk/sql/mysql/country_sql/demo.sql =================================================================== --- trunk/sql/mysql/country_sql/demo.sql 2015-02-02 16:05:28 UTC (rev 7115) +++ trunk/sql/mysql/country_sql/demo.sql 2015-02-03 06:29:37 UTC (rev 7116) @@ -11314,6 +11314,7 @@ INSERT INTO `securitygroups` VALUES (8,13); INSERT INTO `securitygroups` VALUES (8,14); INSERT INTO `securitygroups` VALUES (8,15); +INSERT INTO `securitygroups` VALUES (8,16); INSERT INTO `securitygroups` VALUES (9,0); INSERT INTO `securitygroups` VALUES (9,9); Modified: trunk/sql/mysql/upgrade4.11.4-4.12.sql =================================================================== --- trunk/sql/mysql/upgrade4.11.4-4.12.sql 2015-02-02 16:05:28 UTC (rev 7115) +++ trunk/sql/mysql/upgrade4.11.4-4.12.sql 2015-02-03 06:29:37 UTC (rev 7116) @@ -166,8 +166,6 @@ KEY `stockid` (`stockid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 AUTO_INCREMENT=1; --- Add a description for the script: -UPDATE `scripts` SET `description` = 'Allows you to view all bank transactions for a selected date range, and the inquiry can be filtered by matched or unmatched transactions, or all transactions can be chosen' WHERE `scripts`.`script` = 'DailyBankTransactions.php'; UPDATE config SET confvalue='4.12' WHERE confname='VersionNumber'; Added: trunk/sql/mysql/upgrade4.12-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12-4.13.sql (rev 0) +++ trunk/sql/mysql/upgrade4.12-4.13.sql 2015-02-03 06:29:37 UTC (rev 7116) @@ -0,0 +1,6 @@ +INSERT INTO `securitygroups` VALUES (8,16); +-- Add a description for the script: +UPDATE `scripts` SET `description` = 'Allows you to view all bank transactions for a selected date range, and the inquiry can be filtered by matched or unmatched transactions, or all transactions can be chosen' WHERE `scripts`.`script` = 'DailyBankTransactions.php'; + + +-----UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; \ No newline at end of file |
From: <rc...@us...> - 2015-02-06 15:27:43
|
Revision: 7130 http://sourceforge.net/p/web-erp/reponame/7130 Author: rchacon Date: 2015-02-06 15:27:41 +0000 (Fri, 06 Feb 2015) Log Message: ----------- Add upgrade 4.12.2 - 4.13. Modified Paths: -------------- trunk/sql/mysql/upgrade4.12.1-4.12.2.sql Added Paths: ----------- trunk/sql/mysql/upgrade4.12.2-4.13.sql Modified: trunk/sql/mysql/upgrade4.12.1-4.12.2.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.1-4.12.2.sql 2015-02-06 07:07:22 UTC (rev 7129) +++ trunk/sql/mysql/upgrade4.12.1-4.12.2.sql 2015-02-06 15:27:41 UTC (rev 7130) @@ -1,3 +1,7 @@ +-- webERP 4.12.2. +-- Release date: 2015-02-06. +-- + CREATE TABLE IF NOT EXISTS `locationusers` ( `loccode` varchar(5) NOT NULL, `userid` varchar(20) NOT NULL, @@ -10,4 +14,5 @@ INSERT INTO `locationusers` (`loccode`, `userid`, `canview`, `canupd`) SELECT loccode, userid,1,1 FROM locations, www_users; INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('LocationUsers.php', '15', 'Allows users that have permission to access a location to be defined'); -UPDATE config SET confvalue='4.12.2' WHERE confname='VersionNumber'; \ No newline at end of file +-- Update version number: +UPDATE config SET confvalue='4.12.2' WHERE confname='VersionNumber'; Added: trunk/sql/mysql/upgrade4.12.2-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.2-4.13.sql (rev 0) +++ trunk/sql/mysql/upgrade4.12.2-4.13.sql 2015-02-06 15:27:41 UTC (rev 7130) @@ -0,0 +1,10 @@ +-- webERP 4.13. +-- Release date: yyyy-mm-dd. +-- + + + + + +-- Update version number: +UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <dai...@us...> - 2015-05-17 01:43:23
|
Revision: 7304 http://sourceforge.net/p/web-erp/reponame/7304 Author: daintree Date: 2015-05-17 01:43:20 +0000 (Sun, 17 May 2015) Log Message: ----------- setup new SQL upgrade script Added Paths: ----------- trunk/sql/mysql/upgrade4.12.3-4.13.sql Removed Paths: ------------- trunk/sql/mysql/upgrade4.12.2-4.13.sql Deleted: trunk/sql/mysql/upgrade4.12.2-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.2-4.13.sql 2015-05-17 01:42:19 UTC (rev 7303) +++ trunk/sql/mysql/upgrade4.12.2-4.13.sql 2015-05-17 01:43:20 UTC (rev 7304) @@ -1,12 +0,0 @@ -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('CustomerAccount.php', '1', 'Shows customer account/statement on screen rather than PDF'); -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('StockCategorySalesInquiry.php', '2', 'Sales inquiry by stock category showing top items'); -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('PcAnalysis.php', '15', 'Creates an Excel with details of PC expnese for 24 months'); - --- Add field to store location's GL account code: -ALTER TABLE `locations` ADD `glaccountcode` VARCHAR(20) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT 'GL account of the location'; --- Add field to allow or deny the invoicing of items in this location: -ALTER TABLE `locations` ADD `allowinvoicing` TINYINT(1) NOT NULL DEFAULT '1' COMMENT 'Allow invoicing of items at this location'; ----- QUESTION: Existing locations are (always) set to 1? *********************** - --- Update version number: -UPDATE config SET confvalue='4.12.3' WHERE confname='VersionNumber'; Added: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql (rev 0) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-05-17 01:43:20 UTC (rev 7304) @@ -0,0 +1,4 @@ + + +-- Update version number: +UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |
From: <ex...@us...> - 2015-11-17 22:52:37
|
Revision: 7394 http://sourceforge.net/p/web-erp/reponame/7394 Author: exsonqu Date: 2015-11-17 22:52:34 +0000 (Tue, 17 Nov 2015) Log Message: ----------- 18/11/15 AlexFigueiro: Remove the duplicate foreign key in stockrequest and stockrequestitem; Modified Paths: -------------- trunk/sql/mysql/country_sql/default.sql trunk/sql/mysql/upgrade4.12.3-4.13.sql Modified: trunk/sql/mysql/country_sql/default.sql =================================================================== --- trunk/sql/mysql/country_sql/default.sql 2015-11-17 00:38:05 UTC (rev 7393) +++ trunk/sql/mysql/country_sql/default.sql 2015-11-17 22:52:34 UTC (rev 7394) @@ -2749,8 +2749,6 @@ KEY `departmentid` (`departmentid`), CONSTRAINT `stockrequest_ibfk_1` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`), CONSTRAINT `stockrequest_ibfk_2` FOREIGN KEY (`departmentid`) REFERENCES `departments` (`departmentid`), - CONSTRAINT `stockrequest_ibfk_3` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`), - CONSTRAINT `stockrequest_ibfk_4` FOREIGN KEY (`departmentid`) REFERENCES `departments` (`departmentid`) ) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2774,8 +2772,6 @@ KEY `stockid` (`stockid`), CONSTRAINT `stockrequestitems_ibfk_1` FOREIGN KEY (`dispatchid`) REFERENCES `stockrequest` (`dispatchid`), CONSTRAINT `stockrequestitems_ibfk_2` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`), - CONSTRAINT `stockrequestitems_ibfk_3` FOREIGN KEY (`dispatchid`) REFERENCES `stockrequest` (`dispatchid`), - CONSTRAINT `stockrequestitems_ibfk_4` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; Modified: trunk/sql/mysql/upgrade4.12.3-4.13.sql =================================================================== --- trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-11-17 00:38:05 UTC (rev 7393) +++ trunk/sql/mysql/upgrade4.12.3-4.13.sql 2015-11-17 22:52:34 UTC (rev 7394) @@ -23,7 +23,7 @@ `grns` (`grnno`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; INSERT INTO scripts VALUES('EmailCustStatements.php','3','Email customer statement to customer'); -INSERT INTO scripts VALUES('SupplierGRNAndInvoiceInquiry.php',5,'Suppliers delivery note and grn relationship inquiry'); +INSERT INTO scripts VALUES('SupplierGRNAndInvoiceInquiry.php',5,'Supplier\'s delivery note and grn relationship inquiry'); ALTER table grns ADD supplierref varchar(30) NOT NULL DEFAULT ''; CREATE TABLE IF NOT EXISTS `glaccountusers` ( @@ -48,9 +48,7 @@ INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES ('GLAccountUsers.php', '15', 'Maintenance of users allowed to a GL Account'), ('UserGLAccounts.php', '15', 'Maintenance of GL Accounts allowed for a user'); - -INSERT INTO `scripts` (`script`, `pagesecurity`, `description`) VALUES -('GLAccountUsersCopyAuthority.php', '15', 'Copy the authority into GL Accounts from user A to user B'); - +ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_3`; +ALTER table stockrequest DROP FOREIGN KEY `stockrequest_ibfk_4`; -- Update version number: UPDATE config SET confvalue='4.13' WHERE confname='VersionNumber'; |