CreateTable('internalstockcatrole', "CREATE TABLE IF NOT EXISTS `internalstockcatrole` (\n `categoryid` varchar(6) NOT NULL,\n `secroleid` int(11) NOT NULL,\n KEY `internalstockcatrole_ibfk_1` (`categoryid`),\n KEY `internalstockcatrole_ibfk_2` (`secroleid`)\n)", $db); NewScript('InternalStockCategoriesByRole.php', '15', $db); AddColumn('internalrequest', 'locations', 'TINYINT(1)', 'NOT NULL', '1', 'cashsalebranch', $db); ChangeColumnType('shipdate', 'loctransfers', 'DATETIME', 'NOT NULL', "0000-00-00 00:00:00", $db); ChangeColumnType('recdate', 'loctransfers', 'DATETIME', 'NOT NULL', "0000-00-00 00:00:00", $db); NewScript('GLJournalInquiry.php', '15', $db); NewScript('PDFGLJournal.php', '15', $db); AddColumn('department', 'www_users', 'INT(11)', 'NOT NULL', '0', 'pdflanguage', $db); NewConfigValue('WorkingDaysWeek', '5', $db); ChangeColumnType('address6', 'suppliers', 'VARCHAR(40)', 'NOT NULL', '', $db); ChangeColumnType('braddress6', 'custbranch', 'VARCHAR(40)', 'NOT NULL', '', $db); ChangeColumnType('address6', 'debtorsmaster', 'VARCHAR(40)', 'NOT NULL', '', $db); AddConstraint('stockcatproperties', 'categoryid', 'categoryid', 'stockcategory', 'categoryid', $db); AddConstraint('stockitemproperties', 'stockid', 'stockid', 'stockmaster', 'stockid', $db); AddConstraint('stockitemproperties', 'stkcatpropid', 'stkcatpropid', 'stockcatproperties', 'stkcatpropid', $db); AddConstraint('stockmovestaxes', 'stkmoveno', 'stkmoveno', 'stockmoves', 'stkmoveno', $db); AddIndex(array('loccode'), 'stockrequest', 'loccode', $db); AddConstraint('stockrequest', 'loccode', 'loccode', 'locations', 'loccode', $db); AddIndex(array('departmentid'), 'stockrequest', 'departmentid', $db); AddConstraint('stockrequest', 'departmentid', 'departmentid', 'departments', 'departmentid', $db); AddPrimaryKey('stockrequestitems', array('dispatchitemsid', 'dispatchid'), $db); AddIndex(array('dispatchid'), 'stockrequestitems', 'dispatchid', $db); AddIndex(array('stockid'), 'stockrequestitems', 'stockid', $db); AddConstraint('stockrequestitems', 'dispatchid', 'dispatchid', 'stockrequest', 'dispatchid', $db); AddConstraint('stockrequestitems', 'stockrequestitems_ibfk_2', 'stockid', 'stockmaster', 'stockid', $db); AddPrimaryKey('internalstockcatrole', array('categoryid', 'secroleid'), $db); AddConstraint('internalstockcatrole', 'internalstockcatrole_ibfk_1', 'categoryid', 'stockcategory', 'categoryid', $db); AddConstraint('internalstockcatrole', 'secroleid', 'secroleid', 'securityroles', 'secroleid', $db); NewScript('PDFQuotationPortrait.php', '2', $db); ChangeConfigValue('VersionNumber', '4.09', $db); UpdateDBNo(basename(__FILE__, '.php'), $db);
<?php ChangeConfigName('DefaultTaxLevel', 'DefaultTaxCategory', $db); ChangeConfigValue('part_pics_dir', 'companies/kwamoja/part_pics', $db); ChangeConfigValue('EDI_Incoming_Orders', 'companies/kwamoja/EDI_Incoming_Orders', $db); ChangeConfigValue('EDI_MsgPending', 'companies/kwamoja/EDI_MsgPending', $db); ChangeConfigValue('EDI_Sent', 'companies/kwamoja/EDI_Sent', $db); ChangeConfigValue('companies/kwamoja/reports', 'reports_dir', $db); DropColumn('pinno', 'www_users', $db); DropColumn('swipecard', 'www_users', $db); ChangeColumnType('bankact', 'suppliers', 'VARCHAR( 30 )', 'NOT NULL', '', $db); UpdateDBNo(basename(__FILE__, '.php'), $db);
<?php AddColumn('url', 'suppliers', 'VARCHAR( 70 )', 'NOT NULL', '', 'email', $db); ChangeConfigValue('VersionNumber', '13.10.0', $db); UpdateDBNo(basename(__FILE__, '.php'), $db);
<?php ChangeConfigValue('ShopFreightModule', 'ShopFreightMethod', $db); UpdateDBNo(basename(__FILE__, '.php'), $db);
exit; } InsertRecord('www_users', array('userid'), array('admin'), array('userid', 'password', 'realname', 'email', 'displayrecordsmax', 'fullaccess', 'cancreatetender', 'modulesallowed', 'blocked', 'theme', 'language', 'pdflanguage', 'fontsize'), array($_SESSION['Installer']['AdminAccount'], sha1($_SESSION['Installer']['KwaMojaPassword']), $_SESSION['Installer']['AdminAccount'], $_SESSION['Installer']['Email'], 50, 1, 1, '1,1,1,1,1,1,1,1,1,1,1,1,', 0, 'aguapop', $_SESSION['Installer']['Language'], 0, 0), $db); /* Now we uploade the chosen chart of accounts */ if (!isset($_POST['Demo'])) { $sql = "SET foreign_key_checks=0"; $result = executeSQL($sql, $db, False); include $PathPrefix . 'install/coa/' . $_SESSION['Installer']['CoA']; echo '<div class="success">' . _('Your chosen chart of accounts has been uploaded') . '</div>'; ob_flush(); /* Create the admin user */ } else { echo '<legend>' . _('Populating the database with demo data.') . '</legend>'; PopulateSQLDataBySQL($PathPrefix . 'sql/demodata/data.sql', $db, $DBType, false, $_SESSION['Installer']['Database']); } ChangeConfigValue('VersionNumber', '14.02', $db); function HighestFileName($PathPrefix) { $files = glob($PathPrefix . 'sql/install/*.php'); natsort($files); return basename(array_pop($files), ".php"); } function executeSQL($sql, $db, $TrapErrors = False) { global $SQLFile; /* Run an sql statement and return an error code */ if (!isset($SQLFile)) { DB_IgnoreForeignKeys($db); $result = DB_query($sql, $db, '', '', false, $TrapErrors); $ErrorNumber = DB_error_no($db); DB_ReinstateForeignKeys($db);