# phpMyAdmin SQL Dump
# version 2.5.3
# http://www.phpmyadmin.net
#
# Host: localhost
# Generation Time: Jan 21, 2009 at 01:10 PM
# Server version: 4.0.15
# PHP Version: 4.3.3
#
# Database : `simplefacs`
#

# --------------------------------------------------------

#
# Table structure for table `cpl`
#

DROP TABLE IF EXISTS `cpl`;
CREATE TABLE `cpl` (
`cpl_id` int(10) unsigned NOT NULL auto_increment,
`cpl_code` varchar(10) NOT NULL default '',
`cpl_description` varchar(30) NOT NULL default '',
`cpl_remark` varchar(30) NOT NULL default '',
`cpl_prn` char(1) NOT NULL default '',
`cpl_valid` char(1) NOT NULL default '',
`cpl_subtot` double(16,4) NOT NULL default '0.0000',
`cpl_creusr` varchar(10) NOT NULL default '',
`cpl_creda` datetime NOT NULL default '0000-00-00 00:00:00',
`cpl_updusr` varchar(10) NOT NULL default '',
`cpl_updda` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY  (`cpl_id`),
UNIQUE KEY `cpl_code` (`cpl_code`)
) TYPE=MyISAM COMMENT='costplace' AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `inv`
#

DROP TABLE IF EXISTS `inv`;
CREATE TABLE `inv` (
`inv_id` int(10) unsigned NOT NULL auto_increment,
`sup_id` int(11) unsigned NOT NULL default '0',
`inv_description` varchar(30) NOT NULL default '',
`inv_amount` decimal(16,4) NOT NULL default '0.0000',
`inv_currency` varchar(5) NOT NULL default '',
`inv_bkamount` decimal(16,4) NOT NULL default '0.0000',
`inv_decr` char(1) NOT NULL default '',
`inv_docseq` varchar(10) NOT NULL default '',
`inv_docdate` date NOT NULL default '0000-00-00',
`inv_remark` varchar(10) NOT NULL default '',
`inv_prn` char(1) NOT NULL default '',
`inv_creusr` varchar(10) NOT NULL default '',
`inv_creda` datetime NOT NULL default '0000-00-00 00:00:00',
`inv_updusr` varchar(10) NOT NULL default '',
`inv_updda` datetime NOT NULL default '0000-00-00 00:00:00',
`inv_ok` char(1) NOT NULL default '',
PRIMARY KEY  (`inv_id`)
) TYPE=MyISAM COMMENT='Incoming invoices' AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `ixc`
#

DROP TABLE IF EXISTS `ixc`;
CREATE TABLE `ixc` (
`ixc_id` int(11) NOT NULL auto_increment,
`inv_id` int(11) NOT NULL default '0',
`ixc_year` varchar(4) NOT NULL default '',
`ixc_amount` double(16,4) NOT NULL default '0.0000',
`cpl_code` varchar(10) NOT NULL default '',
`ixc_remark` varchar(80) NOT NULL default '',
`ixc_creusr` varchar(10) NOT NULL default '',
`ixc_creda` datetime NOT NULL default '0000-00-00 00:00:00',
`ixc_updusr` varchar(10) NOT NULL default '',
`ixc_updda` datetime NOT NULL default '0000-00-00 00:00:00',
PRIMARY KEY  (`ixc_id`,`ixc_id`)
) TYPE=MyISAM COMMENT='invoiceamount assigned to costcenter' AUTO_INCREMENT=1 ;

# --------------------------------------------------------

#
# Table structure for table `sup`
#

DROP TABLE IF EXISTS `sup`;
CREATE TABLE `sup` (
`sup_id` int(10) NOT NULL auto_increment,
`sup_name` varchar(30) NOT NULL default '',
`sup_description` varchar(30) NOT NULL default '',
`sup_lastcurrency` varchar(5) NOT NULL default '',
`sup_subcount` int(10) NOT NULL default '0',
`adr_id` varchar(10) NOT NULL default '',
`sup_extid` varchar(10) NOT NULL default '',
`sup_lastcpl` varchar(10) NOT NULL default '',
`sup_mostcpl` varchar(10) NOT NULL default '',
`sup_creusr` varchar(10) NOT NULL default '',
`sup_creda` datetime NOT NULL default '0000-00-00 00:00:00',
`sup_updusr` varchar(10) NOT NULL default '',
`sup_updda` datetime NOT NULL default '0000-00-00 00:00:00',
`sup_prn` char(1) NOT NULL default '',
PRIMARY KEY  (`sup_id`)
) TYPE=MyISAM COMMENT='Supplier Invoice data' AUTO_INCREMENT=1 ;
