Exemple #1
0
<?php

CreateTable('reports', "CREATE TABLE `reports` (\n  `id` int(5) NOT NULL AUTO_INCREMENT,\n  `reportname` varchar(30) NOT NULL DEFAULT '',\n  `reporttype` char(3) NOT NULL DEFAULT 'rpt',\n  `groupname` varchar(9) NOT NULL DEFAULT 'misc',\n  `defaultreport` enum('1','0') NOT NULL DEFAULT '0',\n  `papersize` varchar(15) NOT NULL DEFAULT 'A4,210,297',\n  `paperorientation` enum('P','L') NOT NULL DEFAULT 'P',\n  `margintop` int(3) NOT NULL DEFAULT '10',\n  `marginbottom` int(3) NOT NULL DEFAULT '10',\n  `marginleft` int(3) NOT NULL DEFAULT '10',\n  `marginright` int(3) NOT NULL DEFAULT '10',\n  `coynamefont` varchar(20) NOT NULL DEFAULT 'Helvetica',\n  `coynamefontsize` int(3) NOT NULL DEFAULT '12',\n  `coynamefontcolor` varchar(11) NOT NULL DEFAULT '0,0,0',\n  `coynamealign` enum('L','C','R') NOT NULL DEFAULT 'C',\n  `coynameshow` enum('1','0') NOT NULL DEFAULT '1',\n  `title1desc` varchar(50) NOT NULL DEFAULT '%reportname%',\n  `title1font` varchar(20) NOT NULL DEFAULT 'Helvetica',\n  `title1fontsize` int(3) NOT NULL DEFAULT '10',\n  `title1fontcolor` varchar(11) NOT NULL DEFAULT '0,0,0',\n  `title1fontalign` enum('L','C','R') NOT NULL DEFAULT 'C',\n  `title1show` enum('1','0') NOT NULL DEFAULT '1',\n  `title2desc` varchar(50) NOT NULL DEFAULT 'Report Generated %date%',\n  `title2font` varchar(20) NOT NULL DEFAULT 'Helvetica',\n  `title2fontsize` int(3) NOT NULL DEFAULT '10',\n  `title2fontcolor` varchar(11) NOT NULL DEFAULT '0,0,0',\n  `title2fontalign` enum('L','C','R') NOT NULL DEFAULT 'C',\n  `title2show` enum('1','0') NOT NULL DEFAULT '1',\n  `filterfont` varchar(10) NOT NULL DEFAULT 'Helvetica',\n  `filterfontsize` int(3) NOT NULL DEFAULT '8',\n  `filterfontcolor` varchar(11) NOT NULL DEFAULT '0,0,0',\n  `filterfontalign` enum('L','C','R') NOT NULL DEFAULT 'L',\n  `datafont` varchar(10) NOT NULL DEFAULT 'Helvetica',\n  `datafontsize` int(3) NOT NULL DEFAULT '10',\n  `datafontcolor` varchar(10) NOT NULL DEFAULT 'black',\n  `datafontalign` enum('L','C','R') NOT NULL DEFAULT 'L',\n  `totalsfont` varchar(10) NOT NULL DEFAULT 'Helvetica',\n  `totalsfontsize` int(3) NOT NULL DEFAULT '10',\n  `totalsfontcolor` varchar(11) NOT NULL DEFAULT '0,0,0',\n  `totalsfontalign` enum('L','C','R') NOT NULL DEFAULT 'L',\n  `col1width` int(3) NOT NULL DEFAULT '25',\n  `col2width` int(3) NOT NULL DEFAULT '25',\n  `col3width` int(3) NOT NULL DEFAULT '25',\n  `col4width` int(3) NOT NULL DEFAULT '25',\n  `col5width` int(3) NOT NULL DEFAULT '25',\n  `col6width` int(3) NOT NULL DEFAULT '25',\n  `col7width` int(3) NOT NULL DEFAULT '25',\n  `col8width` int(3) NOT NULL DEFAULT '25',\n  `col9width` int(3) NOT NULL DEFAULT '25',\n  `col10width` int(3) NOT NULL DEFAULT '25',\n  `col11width` int(3) NOT NULL DEFAULT '25',\n  `col12width` int(3) NOT NULL DEFAULT '25',\n  `col13width` int(3) NOT NULL DEFAULT '25',\n  `col14width` int(3) NOT NULL DEFAULT '25',\n  `col15width` int(3) NOT NULL DEFAULT '25',\n  `col16width` int(3) NOT NULL DEFAULT '25',\n  `col17width` int(3) NOT NULL DEFAULT '25',\n  `col18width` int(3) NOT NULL DEFAULT '25',\n  `col19width` int(3) NOT NULL DEFAULT '25',\n  `col20width` int(3) NOT NULL DEFAULT '25',\n  `table1` varchar(25) NOT NULL DEFAULT '',\n  `table2` varchar(25) DEFAULT NULL,\n  `table2criteria` varchar(75) DEFAULT NULL,\n  `table3` varchar(25) DEFAULT NULL,\n  `table3criteria` varchar(75) DEFAULT NULL,\n  `table4` varchar(25) DEFAULT NULL,\n  `table4criteria` varchar(75) DEFAULT NULL,\n  `table5` varchar(25) DEFAULT NULL,\n  `table5criteria` varchar(75) DEFAULT NULL,\n  `table6` varchar(25) DEFAULT NULL,\n  `table6criteria` varchar(75) DEFAULT NULL,\n  PRIMARY KEY (`id`),\n  KEY `name` (`reportname`,`groupname`)\n)", $db);
Exemple #2
0
<?php

CreateTable('taxprovinces', "CREATE TABLE `taxprovinces` (\n  `taxprovinceid` tinyint(4) NOT NULL AUTO_INCREMENT,\n  `taxprovincename` varchar(30) NOT NULL DEFAULT '',\n  PRIMARY KEY (`taxprovinceid`)\n)", $db);
Exemple #3
0
<?php

CreateTable('tenderitems', "CREATE TABLE `tenderitems` (\n  `tenderid` int(11) NOT NULL DEFAULT '0',\n  `stockid` varchar(20) NOT NULL DEFAULT '',\n  `quantity` varchar(40) NOT NULL DEFAULT '',\n  `units` varchar(20) NOT NULL DEFAULT 'each',\n  PRIMARY KEY (`tenderid`,`stockid`)\n)", $db);
Exemple #4
0
<?php

CreateTable('recurringsalesorders', "CREATE TABLE `recurringsalesorders` (\n  `recurrorderno` int(11) NOT NULL AUTO_INCREMENT,\n  `debtorno` varchar(10) NOT NULL DEFAULT '',\n  `branchcode` varchar(10) NOT NULL DEFAULT '',\n  `customerref` varchar(50) NOT NULL DEFAULT '',\n  `buyername` varchar(50) DEFAULT NULL,\n  `comments` longblob,\n  `orddate` date NOT NULL DEFAULT '0000-00-00',\n  `ordertype` char(2) NOT NULL DEFAULT '',\n  `shipvia` int(11) NOT NULL DEFAULT '0',\n  `deladd1` varchar(40) NOT NULL DEFAULT '',\n  `deladd2` varchar(40) NOT NULL,\n  `deladd3` varchar(40) NOT NULL,\n  `deladd4` varchar(40) NOT NULL,\n  `deladd5` varchar(20) NOT NULL DEFAULT '',\n  `deladd6` varchar(15) NOT NULL DEFAULT '',\n  `contactphone` varchar(25) DEFAULT NULL,\n  `contactemail` varchar(25) DEFAULT NULL,\n  `deliverto` varchar(40) NOT NULL DEFAULT '',\n  `freightcost` double NOT NULL DEFAULT '0',\n  `fromstkloc` varchar(5) NOT NULL DEFAULT '',\n  `lastrecurrence` date NOT NULL DEFAULT '0000-00-00',\n  `stopdate` date NOT NULL DEFAULT '0000-00-00',\n  `frequency` tinyint(4) NOT NULL DEFAULT '1',\n  `autoinvoice` tinyint(4) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`recurrorderno`),\n  KEY `debtorno` (`debtorno`),\n  KEY `orddate` (`orddate`),\n  KEY `ordertype` (`ordertype`),\n  KEY `locationindex` (`fromstkloc`),\n  KEY `branchcode` (`branchcode`,`debtorno`),\n  CONSTRAINT `recurringsalesorders_ibfk_1` FOREIGN KEY (`branchcode`, `debtorno`) REFERENCES `custbranch` (`branchcode`, `debtorno`)\n)", $db);
Exemple #5
0
<?php

CreateTable('modules', "CREATE TABLE `modules` (\n  `secroleid` int(11) NOT NULL DEFAULT '15',\n  `modulelink` varchar(10) NOT NULL DEFAULT '',\n  `reportlink` varchar(4) NOT NULL DEFAULT '',\n  `modulename` varchar(25) NOT NULL DEFAULT '',\n  `sequence` int(11) NOT NULL DEFAULT '1',\n  PRIMARY KEY (`secroleid`,`modulelink`),\n  CONSTRAINT `modules_ibfk_1` FOREIGN KEY (`secroleid`) REFERENCES `securityroles` (`secroleid`)\n)", $db);
Exemple #6
0
<?php

CreateTable('lastcostrollup', "CREATE TABLE `lastcostrollup` (\n  `stockid` char(20) NOT NULL DEFAULT '',\n  `totalonhand` double NOT NULL DEFAULT '0',\n  `matcost` decimal(20,4) NOT NULL DEFAULT '0.0000',\n  `labcost` decimal(20,4) NOT NULL DEFAULT '0.0000',\n  `oheadcost` decimal(20,4) NOT NULL DEFAULT '0.0000',\n  `categoryid` char(6) NOT NULL DEFAULT '',\n  `stockact` varchar(20) NOT NULL DEFAULT '0',\n  `adjglact` varchar(20) NOT NULL DEFAULT '0',\n  `newmatcost` decimal(20,4) NOT NULL DEFAULT '0.0000',\n  `newlabcost` decimal(20,4) NOT NULL DEFAULT '0.0000',\n  `newoheadcost` decimal(20,4) NOT NULL DEFAULT '0.0000'\n)", $db);
Exemple #7
0
<?php

CreateTable('bankaccountusers', "CREATE TABLE `bankaccountusers` (\n  `accountcode` varchar(20) NOT NULL DEFAULT '',\n  `userid` varchar(20) NOT NULL DEFAULT '',\n  PRIMARY KEY (`accountcode`,`userid`)\n)", $db);
Exemple #8
0
<?php

CreateTable('accountsection', "CREATE TABLE `accountsection` (\n  `sectionid` int(11) NOT NULL DEFAULT '0',\n  `sectionname` text NOT NULL,\n  PRIMARY KEY (`sectionid`)\n)", $db);
Exemple #9
0
<?php

CreateTable('woitems', "CREATE TABLE `woitems` (\n  `wo` int(11) NOT NULL,\n  `stockid` char(20) NOT NULL DEFAULT '',\n  `qtyreqd` double NOT NULL DEFAULT '1',\n  `qtyrecd` double NOT NULL DEFAULT '0',\n  `stdcost` double NOT NULL,\n  `nextlotsnref` varchar(20) DEFAULT '',\n  PRIMARY KEY (`wo`,`stockid`),\n  KEY `stockid` (`stockid`),\n  CONSTRAINT `woitems_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`),\n  CONSTRAINT `woitems_ibfk_2` FOREIGN KEY (`wo`) REFERENCES `workorders` (`wo`)\n)", $db);
Exemple #10
0
<?php

CreateTable('edi_orders_segs', "CREATE TABLE `edi_orders_segs` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `segtag` char(3) NOT NULL DEFAULT '',\n  `seggroup` tinyint(4) NOT NULL DEFAULT '0',\n  `maxoccur` tinyint(4) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`id`),\n  KEY `SegTag` (`segtag`),\n  KEY `SegNo` (`seggroup`)\n)", $db);
Exemple #11
0
<?php

CreateTable('mailgroups', "CREATE TABLE `mailgroups` (\n\tid int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY,\n\tgroupname varchar(100) NOT NULL,\n\tunique (groupname))", $db);
CreateTable('mailgroupdetails', "CREATE TABLE `mailgroupdetails` (\n\tgroupname varchar(100) NOT NULL,\n\tuserid varchar(20) NOT NULL,\n\tCONSTRAINT FOREIGN KEY (`groupname`) REFERENCES `mailgroups` (`groupname`),\n\tCONSTRAINT FOREIGN KEY (`userid`) REFERENCES `www_users`(`userid`),\n\tINDEX(`groupname`))", $db);
NewScript('MailingGroupMaintenance.php', '15', $db);
UpdateDBNo(basename(__FILE__, '.php'), $db);
Exemple #12
0
<?php

/* New database stuff to move the page security levels to a
 * database table.
 */
CreateTable('pagesecurity', "CREATE TABLE `pagesecurity` (\n\t`script` varchar(78) NOT NULL DEFAULT '',\n\t`security` int(11) NOT NULL DEFAULT 1,\n\tPRIMARY KEY  (`script`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8", $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AccountGroups.php', 10), array('script', 'security'), array('AccountGroups.php', 10), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AccountSections.php', 10), array('script', 'security'), array('AccountSections.php', 10), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AddCustomerContacts.php', 3), array('script', 'security'), array('AddCustomerContacts.php', 3), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AddCustomerNotes.php', 3), array('script', 'security'), array('AddCustomerNotes.php', 3), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AddCustomerTypeNotes.php', 3), array('script', 'security'), array('AddCustomerTypeNotes.php', 3), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AgedDebtors.php', 2), array('script', 'security'), array('AgedDebtors.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AgedSuppliers.php', 2), array('script', 'security'), array('AgedSuppliers.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('Areas.php', 3), array('script', 'security'), array('Areas.php', 3), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('AuditTrail.php', 15), array('script', 'security'), array('AuditTrail.php', 15), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BankAccounts.php', 10), array('script', 'security'), array('BankAccounts.php', 10), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BankMatching.php', 7), array('script', 'security'), array('BankMatching.php', 7), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BankReconciliation.php', 7), array('script', 'security'), array('BankReconciliation.php', 7), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BOMExtendedQty.php', 2), array('script', 'security'), array('BOMExtendedQty.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BOMIndented.php', 2), array('script', 'security'), array('BOMIndented.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BOMIndentedReverse.php', 2), array('script', 'security'), array('BOMIndentedReverse.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BOMInquiry.php', 2), array('script', 'security'), array('BOMInquiry.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BOMListing.php', 2), array('script', 'security'), array('BOMListing.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('BOMs.php', 9), array('script', 'security'), array('BOMs.php', 9), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('COGSGLPostings.php', 10), array('script', 'security'), array('COGSGLPostings.php', 10), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('CompanyPreferences.php', 10), array('script', 'security'), array('CompanyPreferences.php', 10), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('ConfirmDispatchControlled_Invoice.php', 11), array('script', 'security'), array('ConfirmDispatchControlled_Invoice.php', 11), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('ConfirmDispatch_Invoice.php', 2), array('script', 'security'), array('ConfirmDispatch_Invoice.php', 2), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('ContractBOM.php', 6), array('script', 'security'), array('ContractBOM.php', 6), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('ContractCosting.php', 6), array('script', 'security'), array('ContractCosting.php', 6), $db);
InsertRecord('pagesecurity', array('script', 'security'), array('ContractOtherReqts.php', 4), array('script', 'security'), array('ContractOtherReqts.php', 4), $db);
Exemple #13
0
<?php

CreateTable('currencies', "CREATE TABLE `currencies` (\n  `currency` char(20) NOT NULL DEFAULT '',\n  `currabrev` char(3) NOT NULL DEFAULT '',\n  `country` char(50) NOT NULL DEFAULT '',\n  `hundredsname` char(15) NOT NULL DEFAULT 'Cents',\n  `decimalplaces` tinyint(3) NOT NULL DEFAULT '2',\n  `rate` double NOT NULL DEFAULT '1',\n  `webcart` tinyint(1) NOT NULL DEFAULT '1',\n  PRIMARY KEY (`currabrev`),\n  KEY `Country` (`country`)\n)", $db);
Exemple #14
0
<?php

CreateTable('salesman', "CREATE TABLE `salesman` (\n  `salesmancode` varchar(4) NOT NULL,\n  `salesmanname` char(30) NOT NULL DEFAULT '',\n  `salesarea` char(3) NOT NULL DEFAULT '',\n  `manager` int(1) NOT NULL DEFAULT '0',\n  `smantel` char(20) NOT NULL DEFAULT '',\n  `smanfax` char(20) NOT NULL DEFAULT '',\n  `commissionrate1` double NOT NULL DEFAULT '0',\n  `breakpoint` decimal(10,0) NOT NULL DEFAULT '0',\n  `commissionrate2` double NOT NULL DEFAULT '0',\n  `current` tinyint(4) NOT NULL COMMENT 'Salesman current (1) or not (0)',\n  PRIMARY KEY (`salesmancode`),\n  KEY `fk_salesman_1` (`salesarea`),\n  CONSTRAINT `fk_salesman_1` FOREIGN KEY (`salesarea`) REFERENCES `areas` (`areacode`)\n)", $db);
Exemple #15
0
<?php

CreateTable('chartdetails', "CREATE TABLE `chartdetails` (\n  `accountcode` varchar(20) NOT NULL DEFAULT '0',\n  `period` smallint(6) NOT NULL DEFAULT '0',\n  `budget` double NOT NULL DEFAULT '0',\n  `actual` double NOT NULL DEFAULT '0',\n  `bfwd` double NOT NULL DEFAULT '0',\n  `bfwdbudget` double NOT NULL DEFAULT '0',\n  PRIMARY KEY (`accountcode`,`period`),\n  KEY `Period` (`period`),\n  CONSTRAINT `chartdetails_ibfk_1` FOREIGN KEY (`accountcode`) REFERENCES `chartmaster` (`accountcode`),\n  CONSTRAINT `chartdetails_ibfk_2` FOREIGN KEY (`period`) REFERENCES `periods` (`periodno`)\n)", $db);
Exemple #16
0
<?php

CreateTable('warehouse', "CREATE TABLE `warehouse` (\n\t`warehouseid` VARCHAR(3) NOT NULL DEFAULT '',\n\t`loccode` VARCHAR(5) NOT NULL DEFAULT '',\n\t`name` VARCHAR(50) NOT NULL DEFAULT '',\n\tPRIMARY KEY (`warehouseid`, `loccode`),\n\tKEY (warehouseid),\n\tCONSTRAINT `warehouse_ibfk_1` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`)\n)", $db);
CreateTable('whlocations', "CREATE TABLE `whlocations` (\n\t`whlocationid` INT(11) NOT NULL AUTO_INCREMENT,\n\t`whlocationcode` VARCHAR(50) NOT NULL DEFAULT '',\n\t`warehouseid` VARCHAR(3) NOT NULL DEFAULT '',\n\t`parentwhlocationid` int(11) NOT NULL DEFAULT 0,\n\t`name` VARCHAR(50) NOT NULL DEFAULT '',\n\t`width` INT(11) NOT NULL DEFAULT 1,\n\t`length` INT(11) NOT NULL DEFAULT 1,\n\t`height` INT(11) NOT NULL DEFAULT 1,\n\t`notes` TEXT DEFAULT NULL,\n\t`img` VARCHAR(50) DEFAULT NULL,\n\t`active` TINYINT(4) NOT NULL DEFAULT '1',\n\t`putaway` TINYINT(4) NOT NULL DEFAULT '1',\n\t`replenish` TINYINT(4) NOT NULL DEFAULT '1',\n\t`issue` TINYINT(4) NOT NULL DEFAULT '1',\n\tPRIMARY KEY (`whlocationid`),\n\tCONSTRAINT `whlocations_ibfk_1` FOREIGN KEY (`warehouseid`) REFERENCES `warehouse` (`warehouseid`)\n)", $db);
UpdateDBNo(basename(__FILE__, '.php'), $db);
Exemple #17
0
<?php

include dirname(__FILE__) . "/../../../res/php/_auth.php";
include dirname(__FILE__) . "/../../../res/php/_loadLangFiles.php";
include dirname(__FILE__) . "/../../../res/php/_getVersionScript.php";
include dirname(__FILE__) . "/../../../res/php/_loadStundenplan.php";
include dirname(__FILE__) . "/../../../res/php/_saveStundenplan.php";
function CreateTable()
{
    $array = array();
    for ($i = 0; $i < 40; $i++) {
        array_push($array, "");
    }
    file_put_contents(dirname(__FILE__) . "/../../../res/data/" . $_SESSION['username'] . ".data", json_encode($array));
}
if (isset($_GET['do']) && $_GET['do'] == "create") {
    CreateTable();
}
if ($_SERVER['REQUEST_METHOD'] == 'POST') {
    if (@$_POST['save']) {
        saveStundenplan();
        $result = "<h2>" . $string['labels']['l.preview'] . "</h2>";
        $result .= loadStundenplan($wochentagArray);
    }
    if (@$_POST['reset']) {
        CreateTable();
    }
}
Exemple #18
0
<?php

CreateTable('levels', "CREATE TABLE `levels` (\n  `part` char(20) DEFAULT NULL,\n  `level` int(11) DEFAULT NULL,\n  `leadtime` smallint(6) NOT NULL DEFAULT '0',\n  `pansize` double NOT NULL DEFAULT '0',\n  `shrinkfactor` double NOT NULL DEFAULT '0',\n  `eoq` double NOT NULL DEFAULT '0',\n  KEY `part` (`part`)\n)", $db);
Exemple #19
0
<?php

CreateTable('purchorderdetails', "CREATE TABLE `purchorderdetails` (\n  `podetailitem` int(11) NOT NULL AUTO_INCREMENT,\n  `orderno` int(11) NOT NULL DEFAULT '0',\n  `itemcode` varchar(20) NOT NULL DEFAULT '',\n  `deliverydate` date NOT NULL DEFAULT '0000-00-00',\n  `itemdescription` varchar(100) NOT NULL,\n  `glcode` varchar(20) NOT NULL DEFAULT '0',\n  `qtyinvoiced` double NOT NULL DEFAULT '0',\n  `unitprice` double NOT NULL DEFAULT '0',\n  `actprice` double NOT NULL DEFAULT '0',\n  `stdcostunit` double NOT NULL DEFAULT '0',\n  `quantityord` double NOT NULL DEFAULT '0',\n  `quantityrecd` double NOT NULL DEFAULT '0',\n  `shiptref` int(11) NOT NULL DEFAULT '0',\n  `jobref` varchar(20) NOT NULL DEFAULT '',\n  `completed` tinyint(4) NOT NULL DEFAULT '0',\n  `suppliersunit` varchar(50) DEFAULT NULL,\n  `suppliers_partno` varchar(50) NOT NULL DEFAULT '',\n  `assetid` int(11) NOT NULL DEFAULT '0',\n  `conversionfactor` double NOT NULL DEFAULT '1',\n  PRIMARY KEY (`podetailitem`),\n  KEY `DeliveryDate` (`deliverydate`),\n  KEY `GLCode` (`glcode`),\n  KEY `ItemCode` (`itemcode`),\n  KEY `JobRef` (`jobref`),\n  KEY `OrderNo` (`orderno`),\n  KEY `ShiptRef` (`shiptref`),\n  KEY `Completed` (`completed`),\n  CONSTRAINT `purchorderdetails_ibfk_1` FOREIGN KEY (`orderno`) REFERENCES `purchorders` (`orderno`)\n)", $db);
Exemple #20
0
<?php

CreateTable('contracts', "CREATE TABLE `contracts` (\n  `contractref` varchar(20) NOT NULL DEFAULT '',\n  `contractdescription` text NOT NULL,\n  `debtorno` varchar(10) NOT NULL DEFAULT '',\n  `branchcode` varchar(10) NOT NULL DEFAULT '',\n  `loccode` varchar(5) NOT NULL DEFAULT '',\n  `status` tinyint(4) NOT NULL DEFAULT '0',\n  `categoryid` varchar(6) NOT NULL DEFAULT '',\n  `orderno` int(11) NOT NULL DEFAULT '0',\n  `customerref` varchar(20) NOT NULL DEFAULT '',\n  `margin` double NOT NULL DEFAULT '1',\n  `wo` int(11) NOT NULL DEFAULT '0',\n  `requireddate` date NOT NULL DEFAULT '0000-00-00',\n  `drawing` varchar(50) NOT NULL DEFAULT '',\n  `exrate` double NOT NULL DEFAULT '1',\n  PRIMARY KEY (`contractref`),\n  KEY `OrderNo` (`orderno`),\n  KEY `CategoryID` (`categoryid`),\n  KEY `Status` (`status`),\n  KEY `WO` (`wo`),\n  KEY `loccode` (`loccode`),\n  KEY `DebtorNo` (`debtorno`,`branchcode`),\n  CONSTRAINT `contracts_ibfk_1` FOREIGN KEY (`debtorno`, `branchcode`) REFERENCES `custbranch` (`debtorno`, `branchcode`),\n  CONSTRAINT `contracts_ibfk_2` FOREIGN KEY (`categoryid`) REFERENCES `stockcategory` (`categoryid`),\n  CONSTRAINT `contracts_ibfk_3` FOREIGN KEY (`loccode`) REFERENCES `locations` (`loccode`)\n)", $db);
Exemple #21
0
<?php

/* New table to hold a users shortcuts for the new
 * interface
 */
CreateTable('favourites', "CREATE TABLE `favourites` (\n\t`userid` varchar(20) NOT NULL DEFAULT '',\n\t`caption` varchar(50) NOT NULL DEFAULT '',\n\t`href` varchar(200) NOT NULL DEFAULT '#',\n\tPRIMARY KEY  (`userid`, `caption`)\n) ENGINE=InnoDB DEFAULT CHARSET=utf8", $db);
UpdateDBNo(basename(__FILE__, '.php'), $db);
Exemple #22
0
<?php

CreateTable('pickinglistdetails', "CREATE TABLE `pickinglistdetails` (\n  `pickinglistno` int(11) NOT NULL DEFAULT '0',\n  `pickinglistlineno` int(11) NOT NULL DEFAULT '0',\n  `orderlineno` int(11) NOT NULL DEFAULT '0',\n  `qtyexpected` double NOT NULL DEFAULT '0',\n  `qtypicked` double NOT NULL DEFAULT '0',\n  PRIMARY KEY (`pickinglistno`,`pickinglistlineno`),\n  CONSTRAINT `pickinglistdetails_ibfk_1` FOREIGN KEY (`pickinglistno`) REFERENCES `pickinglists` (`pickinglistno`)\n)", $db);
                 mysql_query($insert . implode(',', $inserts));
                 unset($list);
             }
         } else {
             if (strcmp($table, 'botnet_reports') == 0) {
                 if ($error = !CreateTable($table)) {
                     break;
                 }
                 $rlist = listReportTables($pd_mysql_db);
                 foreach ($rlist as $rtable) {
                     if ($error = !UpdateTableEx($rtable, 'botnet_reports')) {
                         break;
                     }
                 }
             } else {
                 $error = !($is_update ? UpdateTable($table) : CreateTable($table));
             }
         }
         if ($error) {
             break;
         }
     }
 }
 if (!$error) {
     //Создание директории для отчетов.
     if (!$error) {
         $error = !CreatePath($pd_reports_path, isset($config['reports_path']) ? $config['reports_path'] : 0);
     }
     //Обновление файла конфигурации.
     if (!$error) {
         ShowProgress("Writing config file");
Exemple #24
0
<?php

CreateTable('reportlinks', "CREATE TABLE `reportlinks` (\n  `table1` varchar(25) NOT NULL DEFAULT '',\n  `table2` varchar(25) NOT NULL DEFAULT '',\n  `equation` varchar(75) NOT NULL DEFAULT ''\n)", $db);
Exemple #25
0
<?php

CreateTable('contractbom', "CREATE TABLE `contractbom` (\n  `contractref` varchar(20) NOT NULL DEFAULT '0',\n  `stockid` varchar(20) NOT NULL DEFAULT '',\n  `workcentreadded` char(5) NOT NULL DEFAULT '',\n  `quantity` double NOT NULL DEFAULT '1',\n  PRIMARY KEY (`contractref`,`stockid`,`workcentreadded`),\n  KEY `Stockid` (`stockid`),\n  KEY `ContractRef` (`contractref`),\n  KEY `WorkCentreAdded` (`workcentreadded`),\n  CONSTRAINT `contractbom_ibfk_1` FOREIGN KEY (`workcentreadded`) REFERENCES `workcentres` (`code`),\n  CONSTRAINT `contractbom_ibfk_3` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`)\n)", $db);
Exemple #26
0
<?php

CreateTable('taxauthrates', "CREATE TABLE `taxauthrates` (\n  `taxauthority` tinyint(4) NOT NULL DEFAULT '1',\n  `dispatchtaxprovince` tinyint(4) NOT NULL DEFAULT '1',\n  `taxcatid` tinyint(4) NOT NULL DEFAULT '0',\n  `taxrate` double NOT NULL DEFAULT '0',\n  PRIMARY KEY (`taxauthority`,`dispatchtaxprovince`,`taxcatid`),\n  KEY `TaxAuthority` (`taxauthority`),\n  KEY `dispatchtaxprovince` (`dispatchtaxprovince`),\n  KEY `taxcatid` (`taxcatid`),\n  CONSTRAINT `taxauthrates_ibfk_1` FOREIGN KEY (`taxauthority`) REFERENCES `taxauthorities` (`taxid`),\n  CONSTRAINT `taxauthrates_ibfk_2` FOREIGN KEY (`taxcatid`) REFERENCES `taxcategories` (`taxcatid`),\n  CONSTRAINT `taxauthrates_ibfk_3` FOREIGN KEY (`dispatchtaxprovince`) REFERENCES `taxprovinces` (`taxprovinceid`)\n)", $db);
Exemple #27
0
<?php

CreateTable('stockitemproperties', "CREATE TABLE `stockitemproperties` (\n  `stockid` varchar(20) NOT NULL,\n  `stkcatpropid` int(11) NOT NULL,\n  `value` varchar(50) NOT NULL,\n  PRIMARY KEY (`stockid`,`stkcatpropid`),\n  KEY `stockid` (`stockid`),\n  KEY `value` (`value`),\n  KEY `stkcatpropid` (`stkcatpropid`),\n  CONSTRAINT `stockitemproperties_ibfk_1` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`),\n  CONSTRAINT `stockitemproperties_ibfk_2` FOREIGN KEY (`stkcatpropid`) REFERENCES `stockcatproperties` (`stkcatpropid`)\n)", $db);
Exemple #28
0
<?php

CreateTable('mrpplannedorders', "CREATE TABLE `mrpplannedorders` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `part` char(20) DEFAULT NULL,\n  `duedate` date DEFAULT NULL,\n  `supplyquantity` double DEFAULT NULL,\n  `ordertype` varchar(6) DEFAULT NULL,\n  `orderno` int(11) DEFAULT NULL,\n  `mrpdate` date DEFAULT NULL,\n  `updateflag` smallint(6) DEFAULT NULL,\n  PRIMARY KEY (`id`)\n)", $db);
Exemple #29
0
<?php

/* Include the new script for printing quotations in Portrait
 */
InsertRecord('pagesecurity', array('script', 'security'), array('ConfirmProForma_Invoice.php', 2), array('script', 'security'), array('ConfirmProForma_Invoice.php', 2), $db);
InsertRecord('systypes', array('typeid'), array('13'), array('typeid', 'typename', 'typeno'), array('13', 'Proforma Invoices', '0'), $db);
CreateTable('proformatrans', "CREATE TABLE `proformatrans` (\n  `id` int(11) NOT NULL AUTO_INCREMENT,\n  `transno` int(11) NOT NULL DEFAULT '0',\n  `type` smallint(6) NOT NULL DEFAULT '0',\n  `stockid` varchar(20) NOT NULL DEFAULT '',\n  `debtorno` varchar(10) NOT NULL DEFAULT '',\n  `branchcode` varchar(10) NOT NULL DEFAULT '',\n  `trandate` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',\n  `inputdate` datetime NOT NULL,\n  `prd` smallint(6) NOT NULL DEFAULT '0',\n  `settled` tinyint(4) NOT NULL DEFAULT '0',\n  `reference` varchar(20) NOT NULL DEFAULT '',\n  `tpe` char(2) NOT NULL DEFAULT '',\n  `order_` int(11) NOT NULL DEFAULT '0',\n  `rate` double NOT NULL DEFAULT '0',\n  `ovamount` double NOT NULL DEFAULT '0',\n  `ovgst` double NOT NULL DEFAULT '0',\n  `ovfreight` double NOT NULL DEFAULT '0',\n  `ovdiscount` double NOT NULL DEFAULT '0',\n  `diffonexch` double NOT NULL DEFAULT '0',\n  `alloc` double NOT NULL DEFAULT '0',\n  `invtext` text,\n  `shipvia` int(11) NOT NULL DEFAULT '0',\n  `edisent` tinyint(4) NOT NULL DEFAULT '0',\n  `consignment` varchar(15) NOT NULL DEFAULT '',\n  PRIMARY KEY (`id`),\n  KEY `DebtorNo` (`debtorno`,`branchcode`),\n  KEY `Order_` (`order_`),\n  KEY `Prd` (`prd`),\n  KEY `Tpe` (`tpe`),\n  KEY `Type` (`type`),\n  KEY `Settled` (`settled`),\n  KEY `TranDate` (`trandate`),\n  KEY `TransNo` (`transno`),\n  KEY `Type_2` (`type`,`transno`),\n  KEY `EDISent` (`edisent`),\n  CONSTRAINT `proformatrans_ibfk_2` FOREIGN KEY (`type`) REFERENCES `systypes` (`typeid`),\n  CONSTRAINT `proformatrans_ibfk_3` FOREIGN KEY (`prd`) REFERENCES `periods` (`periodno`),\n  CONSTRAINT `proformatrans_ibfk_4` FOREIGN KEY (`stockid`) REFERENCES `stockmaster` (`stockid`)\n) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8", $db);
UpdateDBNo(108, $db);
Exemple #30
0
<?php

CreateTable('paymentmethods', "CREATE TABLE `paymentmethods` (\n  `paymentid` tinyint(4) NOT NULL AUTO_INCREMENT,\n  `paymentname` varchar(15) NOT NULL DEFAULT '',\n  `paymenttype` int(11) NOT NULL DEFAULT '1',\n  `receipttype` int(11) NOT NULL DEFAULT '1',\n  `usepreprintedstationery` tinyint(4) NOT NULL DEFAULT '0',\n  `opencashdrawer` tinyint(4) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`paymentid`)\n)", $db);