--
-- Host: localhost    Database: dealerchoice_dcguest
-- ------------------------------------------------------


--
-- Table structure for table `_report_hash`
--

CREATE TABLE `_report_hash` (
  `po_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `proposal_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ap_invoice_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ar_invoice_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `ap_total` decimal(12,2) NOT NULL DEFAULT '0.00',
  `ar_total` decimal(12,2) NOT NULL DEFAULT '0.00',
  KEY `po_hash` (`po_hash`(10)),
  KEY `proposal_hash` (`proposal_hash`(10)),
  KEY `ap_invoice_hash` (`ap_invoice_hash`(10)),
  KEY `ar_invoice_hash` (`ar_invoice_hash`(10))
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `_report_hash`
--


--
-- Table structure for table `account_types`
--

CREATE TABLE `account_types` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(128) NOT NULL DEFAULT '',
  `type_code` varchar(6) NOT NULL DEFAULT '',
  `account_type` char(2) NOT NULL DEFAULT '',
  `account_side` char(1) NOT NULL DEFAULT '',
  PRIMARY KEY (`obj_id`),
  KEY `account_type` (`account_type`),
  KEY `account_side` (`account_side`),
  KEY `account_side_2` (`account_side`),
  KEY `type_code` (`type_code`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `account_types`
--

INSERT INTO `account_types` VALUES (1,'Current Assets','CA','DR','B'),(2,'Long Term Asset','FA','DR','B'),(3,'Current Liabilities','CL','CR','B'),(4,'Long Term Liabilities','LL','CR','B'),(5,'Equity','EQ','CR','B'),(6,'Income','IN','CR','P'),(7,'Expenses','EX','DR','P'),(8,'Cost of Goods Sold','CG','DR','P');

--
-- Table structure for table `accounts`
--

CREATE TABLE `accounts` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `account_hash` varchar(32) NOT NULL DEFAULT '',
  `parent_hash` varchar(32) NOT NULL DEFAULT '',
  `account_name` varchar(128) NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `private` tinyint(1) NOT NULL DEFAULT '0',
  `account_no` varchar(16) NOT NULL DEFAULT '',
  `account_type` char(2) NOT NULL DEFAULT '',
  `checking` tinyint(1) NOT NULL DEFAULT '0',
  `next_check_no` int(11) NOT NULL DEFAULT '1000',
  `check_stock` char(12) DEFAULT NULL,
  `check_stock_coords` text,
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00',
  `system` tinyint(1) NOT NULL DEFAULT '0',
  `state` varchar(12) DEFAULT NULL,
  `sys_lock` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `account_hash` (`account_hash`),
  KEY `account_name` (`account_name`(25)),
  KEY `account_no` (`account_no`),
  KEY `account_type` (`account_type`),
  KEY `parent_hash` (`parent_hash`)
) ENGINE=InnoDB AUTO_INCREMENT=132 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `accounts`
--

INSERT INTO `accounts` VALUES (1,1220531357,'55fca6213528b8ee98ab5d7c4643dbc3','001bdd9879308bf1646cdba2bd1a3806','','Cash - Checking Account',1,0,'105','CA',1,1000,'middle_stock','--top\ncheck_no|x|544\ncheck_no|y|765\npayto|x|57\npayto|y|700\nremit_to|x|25\nremit_to|y|665\ncheck_total|x|21\ncheck_total|y|674\ncheck_total_int|x|530.4\ncheck_total_int|y|702\ncheck_date|x|508.2\ncheck_date|y|738\nmemo|x|54.4\nmemo|y|596\ncoupon1|y|515.1\ncoupon2|y|268.4\n--ENDtop\n\n--middle_stock\ncheck_no|x|480\ncheck_no|y|471\npayto|x|51.3\npayto|y|389\nremit_to|x|51.3\nremit_to|y|389\ncheck_total|x|15\ncheck_total|y|408\ncheck_total_int|x|500\ncheck_total_int|y|400\ncheck_date|x|400\ncheck_date|y|400\nmemo|x|15\nmemo|y|340\ncoupon1|y|776\ncoupon2|y|270\n--ENDmiddle_stock\n\n--bottom_stock\ncheck_no|x|460\ncheck_no|y|171\npayto|x|54\npayto|y|79\nremit_to|x|54\nremit_to|y|65\ncheck_total|x|54\ncheck_total|y|85\ncheck_total_int|x|520\ncheck_total_int|y|120\ncheck_date|x|390\ncheck_date|y|120\nmemo|x|15\nmemo|y|40\ncoupon1|y|776\ncoupon2|y|470\n--ENDbottom_stock',20000.00,1,NULL,0),(2,1220617454,'55fca6213528b8ee98ab5d7c4643dbc3','9b26cd2f02d08d931ff24310b8f7c9b6','','Work In Progress',1,0,'150','CA',0,1000,NULL,NULL,-11304.00,1,NULL,0),(3,1217874789,'55fca6213528b8ee98ab5d7c4643dbc3','d245bfccb102b37819ae83150e4893a9','','Cost of Goods Sold',1,0,'504','EX',0,1000,NULL,NULL,11304.00,1,NULL,0),(4,1219929602,'381fe9cf147be141a27b0364ac9f1cde','2591f3077ec59510200d264c577ec591','','Accounts Receivable',1,0,'110','CA',0,1000,NULL,NULL,15976.31,1,NULL,1),(5,1219929722,'381fe9cf147be141a27b0364ac9f1cde','7ec591ec5902020000d264c577ec5902','','Accounts Payable',1,0,'200','CL',0,1000,NULL,NULL,0.00,1,NULL,1),(6,1218479368,'381fe9cf147be141a27b0364ac9f1cde','42e97bf5b85c5092e9380314b8235c6a','','Allowance for Doubtful Accounts',1,0,'112','CA',0,1000,NULL,NULL,0.00,1,NULL,0),(7,1287085754,'55fca6213528b8ee98ab5d7c4643dbc3','457383c4beacd49f80245c7cb9fced30','','Distributions to Shareholders',1,0,'120','EQ',0,0,NULL,NULL,0.00,1,NULL,0),(8,0,'','3ec0aa33b881c290709dbfe5f6d3c1db','','Employee Advances',1,0,'125','CA',0,1000,NULL,NULL,0.00,1,NULL,0),(9,0,'','f4cbaa008b10804920dbe9e3b4cc803d','','Undeposited Funds',1,0,'130','CA',0,1000,NULL,NULL,0.00,1,NULL,0),(10,1216916982,'d332d9cb4aab960227a7851ebe3f834b','f3914b51a620a890988d5185c84573eb','','Vendor Deposits',1,0,'135','CA',0,1000,NULL,NULL,0.00,1,NULL,1),(11,1219939395,'55fca6213528b8ee98ab5d7c4643dbc3','268f2abb9f81ec386cad5a7c8a6b0887','','Accumulated Depreciation',1,0,'145','FA',0,1000,NULL,NULL,0.00,1,NULL,0),(12,1217967732,'381fe9cf147be141a27b0364ac9f1cde','c1ac61e9264f0230263cb4e3a6c6ef68','','Sales Tax Payable',1,0,'201','CL',0,1000,NULL,NULL,0.00,1,NULL,0),(13,1219929602,'381fe9cf147be141a27b0364ac9f1cde','a113394dab302ed877a2507e3f915b10','','Customer Deposits',1,0,'202','CL',0,1000,NULL,NULL,20000.00,1,NULL,1),(14,0,'','1b7bb64b90a2f6589c08b1c83e5d6e07','','Commissions Payable',1,0,'210','CL',0,1000,NULL,NULL,0.00,1,NULL,0),(15,1217966901,'381fe9cf147be141a27b0364ac9f1cde','529e2bab2d139ff171c606463c44fccf','','Income Taxes Payable',1,0,'215','CL',0,1000,NULL,NULL,0.00,1,NULL,0),(16,1179517303,'c1413b951037ec577ec591f30200d264','0c401ccd5977d8a17026c2cd32e5fb96','','Payroll Taxes Payable',1,0,'235','CL',0,1000,NULL,NULL,0.00,1,NULL,0),(20,1192567756,'55fca6213528b8ee98ab5d7c4643dbc3','39ed4acad889d793b943549ef51721dd','','Owner\'s Stock',1,0,'375','EQ',0,1000,NULL,NULL,0.00,1,NULL,0),(21,1287779016,'632042d8b586e030e2ebdfaf06abc61b','20a2d6b96ce48cd243cf5665d21d3549','','Profit',1,0,'399','EQ',0,1000,NULL,NULL,3767.99,1,NULL,1),(22,1193345841,'55fca6213528b8ee98ab5d7c4643dbc3','205d2d853e58e805da13a88c58f08752','','Retained Earnings',1,0,'400','EQ',0,1000,NULL,NULL,0.00,1,NULL,1),(23,1217013836,'abdaf9179ef28acd663b89323ae284e0','7cfe666f2f8564e0f47c621b09934f10','','General Sales',1,0,'404','IN',0,1000,NULL,NULL,15071.99,1,NULL,0),(24,1179517647,'c1413b951037ec577ec591f30200d264','d6d48b678c8100fde215c0f00d8cb18e','','Bad Debt Expense',1,0,'920','EX',0,1000,NULL,NULL,0.00,1,NULL,0),(25,1220539384,'55fca6213528b8ee98ab5d7c4643dbc3','8d6565146e5052ceade4a87e526e2a61','','Clearing Account',1,0,'999','EX',0,1000,NULL,NULL,0.00,1,NULL,0),(26,1263404454,'55fca6213528b8ee98ab5d7c4643dbc3','e219ccc0c9154eecbe55868707dd86e9','','Net Interest (Income)  Expense',1,0,'950','EX',0,0,NULL,NULL,0.00,1,NULL,0),(27,1215622697,'d332d9cb4aab960227a7851ebe3f834b','8fb86e8ab70ee703a5d729196b02cf61','','Discounts Taken',1,0,'700','EX',0,1000,NULL,NULL,0.00,1,NULL,0),(29,1212671589,'d332d9cb4aab960227a7851ebe3f834b','c7880d492393e21538b9bc7a496e4e69','','Interest Income',1,0,'440','IN',0,1000,NULL,NULL,0.00,1,NULL,0),(36,0,'','3806001bdd9879308bf1646cdba2bd1a','','Employee Advances',1,0,'223','CL',0,1000,NULL,NULL,0.00,1,NULL,0),(37,0,'','9b69b26cd2f02d08d931ff24310b8f7c','','Gain/Loss on Investment',1,0,'450','IN',0,1000,NULL,NULL,0.00,1,NULL,0),(130,0,'','a890988d51f3914b51a620a890988d51','','Vendor Credits',1,0,'136','CA',0,1000,NULL,NULL,0.00,1,NULL,0),(131,1609773083,'bf6cb2d218fcf83343d42e0d4c65ee56','688fbcbe774c171a863c858d5ec3aa56','c1ac61e9264f0230263cb4e3a6c6ef68','Sales Tax Payable - MD',1,0,'','CL',0,0,NULL,NULL,904.32,0,NULL,0);

--
-- Table structure for table `arch_contacts`
--

CREATE TABLE `arch_contacts` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `arch_hash` varchar(32) NOT NULL DEFAULT '0',
  `contact_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `contact_name` varchar(255) NOT NULL DEFAULT '',
  `contact_title` varchar(128) NOT NULL DEFAULT '',
  `contact_phone1` varchar(32) NOT NULL DEFAULT '',
  `contact_phone2` varchar(32) NOT NULL DEFAULT '',
  `contact_mobile` varchar(32) NOT NULL DEFAULT '',
  `contact_fax` varchar(32) NOT NULL DEFAULT '',
  `contact_email` varchar(128) NOT NULL DEFAULT '',
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `contact_hash` (`contact_hash`),
  KEY `arch_hash` (`arch_hash`),
  KEY `contact_name` (`contact_name`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `arch_contacts`
--


--
-- Table structure for table `arch_design`
--

CREATE TABLE `arch_design` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `arch_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `ad_no` int(11) NOT NULL,
  `account_no` varchar(64) NOT NULL,
  `name` varchar(255) NOT NULL DEFAULT '',
  `street` text,
  `city` varchar(255) NOT NULL DEFAULT '',
  `state` varchar(128) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `country` varchar(32) NOT NULL DEFAULT 'USA',
  `phone` varchar(32) NOT NULL DEFAULT '',
  `fax` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`obj_id`),
  KEY `arch_hash` (`arch_hash`),
  KEY `name` (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `arch_design`
--


--
-- Table structure for table `audit_log`
--

CREATE TABLE `audit_log` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `audit_id` bigint(20) NOT NULL DEFAULT '0',
  `id_hash` varchar(32) NOT NULL DEFAULT '',
  `record_hash` varchar(32) NOT NULL DEFAULT '',
  `title` varchar(64) NOT NULL DEFAULT '',
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `audit_id` (`audit_id`),
  KEY `id_hash` (`id_hash`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `audit_log`
--


--
-- Table structure for table `bank_rec`
--

CREATE TABLE `bank_rec` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `user_id` varchar(45) NOT NULL,
  `date` datetime NOT NULL,
  `startdate` datetime DEFAULT NULL,
  `enddate` datetime DEFAULT NULL,
  `beginningBal` decimal(12,2) DEFAULT NULL,
  `closingBal` decimal(12,2) DEFAULT NULL,
  `endingBal` decimal(12,2) DEFAULT NULL,
  `account_hash` varchar(45) NOT NULL,
  `status` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bank_rec`
--


--
-- Table structure for table `bank_rec_data`
--

CREATE TABLE `bank_rec_data` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `bank_rec_id` int(11) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `payee` varchar(255) DEFAULT NULL,
  `comments` varchar(255) DEFAULT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `type` varchar(45) DEFAULT NULL,
  `date` varchar(45) DEFAULT NULL,
  `column` varchar(45) NOT NULL,
  `check_no` varchar(45) DEFAULT NULL,
  `account` varchar(45) DEFAULT NULL,
  `check_date` varchar(45) DEFAULT NULL,
  `cleared` int(11) NOT NULL,
  `record_id` int(11) DEFAULT NULL,
  `record_hash` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bank_rec_data`
--


--
-- Table structure for table `bank_rec_saved_sessions`
--

CREATE TABLE `bank_rec_saved_sessions` (
  `user_id` varchar(45) NOT NULL,
  `session_data` text,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `user_id` (`user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `bank_rec_saved_sessions`
--


--
-- Table structure for table `chat`
--

CREATE TABLE `chat` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `close_time` int(11) NOT NULL DEFAULT '0',
  `user_hash` varchar(32) NOT NULL DEFAULT '',
  `recipient_hash` varchar(32) NOT NULL DEFAULT '',
  `chat_hash` varchar(32) NOT NULL DEFAULT '',
  `ack` tinyint(1) NOT NULL DEFAULT '0',
  `closed` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`),
  KEY `user_hash` (`user_hash`),
  KEY `recipient_hash` (`recipient_hash`),
  KEY `chat_hash` (`chat_hash`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chat`
--


--
-- Table structure for table `chat_content`
--

CREATE TABLE `chat_content` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `chat_hash` varchar(32) NOT NULL DEFAULT '',
  `sender` varchar(32) NOT NULL DEFAULT '',
  `message` text NOT NULL,
  `post_time` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  PRIMARY KEY (`obj_id`),
  KEY `chat_hash` (`chat_hash`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chat_content`
--


--
-- Table structure for table `check_register`
--

CREATE TABLE `check_register` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL,
  `last_change` varchar(32) NOT NULL,
  `account_hash` varchar(32) NOT NULL,
  `expense_account` varchar(32) NOT NULL,
  `payee` varchar(32) NOT NULL,
  `remit_to` text NOT NULL,
  `check_date` date NOT NULL,
  `check_no` varchar(24) NOT NULL,
  `memo` varchar(128) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `cleared` tinyint(1) NOT NULL DEFAULT '0',
  `void` tinyint(1) NOT NULL DEFAULT '0',
  `currency` char(3) DEFAULT NULL,
  `exchange_rate` decimal(10,8) NOT NULL DEFAULT '0.00000000',
  `void_timestamp` int(11) DEFAULT NULL,
  `void_timestamp_manual` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `void` (`void`),
  KEY `check_date` (`check_date`),
  KEY `cleared` (`cleared`,`void`),
  KEY `check_no` (`check_no`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `check_register`
--


--
-- Table structure for table `commission_manual_deductions`
--

CREATE TABLE `commission_manual_deductions` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `account_name` varchar(128) DEFAULT NULL,
  `account_hash` varchar(32) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `description` varchar(256) DEFAULT NULL,
  `sales_user_hash` varchar(32) DEFAULT NULL,
  `comm_payment_hash` varchar(32) DEFAULT NULL,
  `opt_in` tinyint(1) NOT NULL DEFAULT '0',
  `debit_account_hash` varchar(32) DEFAULT NULL,
  `commission_to_pay` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `commission_manual_deductions`
--


--
-- Table structure for table `commission_tables`
--

CREATE TABLE `commission_tables` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `commission_hash` varchar(32) NOT NULL DEFAULT '',
  `type` char(1) NOT NULL DEFAULT '',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `name` varchar(128) NOT NULL DEFAULT '',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `effective_date` date DEFAULT NULL,
  `expiration_date` date DEFAULT NULL,
  `rules` text NOT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `commission_hash` (`commission_hash`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `commission_tables`
--

INSERT INTO `commission_tables` VALUES (3,1614177197,'bf6cb2d218fcf83343d42e0d4c65ee56','7ee6c5118410750864b1ce8486edc87a','D','','Sample Commission Rule',1,'2021-01-01','2025-12-31','0.25:1:0.2|0.5:1:0.3|1:1:0.35');

--
-- Table structure for table `commission_team_user`
--

CREATE TABLE `commission_team_user` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `commission_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `proposal_hash` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `id_hash` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `rate` decimal(10,8) NOT NULL DEFAULT '0.00000000',
  PRIMARY KEY (`obj_id`),
  KEY `commission_hash` (`commission_hash`),
  KEY `proposal_hash` (`proposal_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `commission_team_user`
--


--
-- Table structure for table `commissions_paid`
--

CREATE TABLE `commissions_paid` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `paid_date` date NOT NULL DEFAULT '0000-00-00',
  `proposal_hash` varchar(32) NOT NULL DEFAULT '',
  `user_hash` varchar(32) NOT NULL DEFAULT '',
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `paid_in_full` tinyint(1) NOT NULL DEFAULT '0',
  `previous_amount` decimal(10,2) NOT NULL,
  `commission_hash_used` varchar(32) NOT NULL,
  `commission_hash` varchar(32) NOT NULL,
  `rate` decimal(6,6) NOT NULL,
  `overhead_rate` decimal(6,6) NOT NULL DEFAULT '0.000000',
  `overhead_type` char(1) DEFAULT NULL,
  `cost` decimal(10,2) NOT NULL,
  `overhead_manual` tinyint(1) DEFAULT NULL,
  `commissions_team_data` varchar(100) NOT NULL DEFAULT '',
  PRIMARY KEY (`obj_id`),
  KEY `proposal_hash` (`proposal_hash`)
) ENGINE=MyISAM AUTO_INCREMENT=217 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `commissions_paid`
--


--
-- Table structure for table `correction_codes`
--

CREATE TABLE `correction_codes` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(10) unsigned NOT NULL,
  `last_change` varchar(32) NOT NULL,
  `correction_hash` varchar(32) NOT NULL,
  `code` varchar(12) NOT NULL,
  `descr` varchar(128) NOT NULL,
  `active` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `account_hash` varchar(32) NOT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `code` (`code`),
  KEY `account_hash` (`account_hash`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `correction_codes`
--

INSERT INTO `correction_codes` VALUES (1,1517925193,'e94588df973dd31c56052c73cc2e9458','044aaeb182d99414b6d62839447af9e7','C-CR','Customer Credit',1,'7cfe666f2f8564e0f47c621b09934f10');

--
-- Table structure for table `crm_log_project_stage`
--

CREATE TABLE `crm_log_project_stage` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `user_id` varchar(32) NOT NULL DEFAULT '',
  `project_hash` varchar(32) NOT NULL DEFAULT '',
  `project_stage` varchar(255) NOT NULL DEFAULT '',
  `change_note` text,
  `system_fill_flag` tinyint(1) NOT NULL DEFAULT '0',
  `system_code` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `project_hash` (`project_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_log_project_stage`
--


--
-- Table structure for table `crm_projects`
--

CREATE TABLE `crm_projects` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `prospect_hash` varchar(32) NOT NULL DEFAULT '',
  `project_hash` varchar(32) NOT NULL DEFAULT '',
  `project_name` varchar(255) NOT NULL DEFAULT '',
  `project_description` text,
  `probable_close_date` date DEFAULT NULL,
  `probable_close_percent` decimal(6,6) NOT NULL DEFAULT '0.000000',
  `estimated_begin_date` date DEFAULT NULL,
  `estimated_end_date` date DEFAULT NULL,
  `estimated_project_size` int(11) NOT NULL DEFAULT '0',
  `estimated_gp_percent` decimal(6,6) NOT NULL DEFAULT '0.000000',
  `project_location` text,
  `project_contacts` text,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_timestamp` int(11) NOT NULL DEFAULT '0',
  `project_active` tinyint(1) NOT NULL DEFAULT '0',
  `lead_source` text,
  `competitors` text,
  `project_notes` text,
  `project_stage` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `project_hash` (`project_hash`),
  KEY `prospect_hash` (`prospect_hash`),
  KEY `project_name` (`project_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_projects`
--


--
-- Table structure for table `crm_prospects`
--

CREATE TABLE `crm_prospects` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `prospect_hash` varchar(32) NOT NULL DEFAULT '',
  `customer_no` int(11) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `converted` tinyint(1) NOT NULL DEFAULT '0',
  `converted_timestamp` int(11) NOT NULL DEFAULT '0',
  `converted_by` varchar(32) NOT NULL DEFAULT '',
  `customer_name` varchar(255) NOT NULL DEFAULT '',
  `street` text,
  `city` varchar(255) NOT NULL DEFAULT '',
  `state` varchar(128) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `country` char(2) NOT NULL,
  `phone` varchar(32) NOT NULL DEFAULT '',
  `fax` varchar(32) NOT NULL DEFAULT '',
  `crm_deadlead` tinyint(1) NOT NULL DEFAULT '0',
  `crm_salesrepassigned` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `created_timestamp` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `prospect_hash` (`prospect_hash`),
  KEY `state` (`state`),
  KEY `customer_name` (`customer_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_prospects`
--


--
-- Table structure for table `crm_tasks`
--

CREATE TABLE `crm_tasks` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `project_hash` varchar(32) NOT NULL DEFAULT '',
  `task_hash` varchar(32) NOT NULL DEFAULT '',
  `task_name` varchar(255) NOT NULL DEFAULT '',
  `task_details` text,
  `task_due_date` datetime DEFAULT NULL,
  `task_reminder` int(11) NOT NULL DEFAULT '0',
  `task_completed` tinyint(1) NOT NULL DEFAULT '0',
  `task_completed_timestamp` int(11) NOT NULL DEFAULT '0',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_timestamp` int(11) NOT NULL DEFAULT '0',
  `task_priority` int(2) NOT NULL DEFAULT '1',
  `task_reminder_date` date DEFAULT NULL,
  `task_reminder_sent_date` datetime DEFAULT NULL,
  `task_reminder_sent_status` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `task_hash` (`task_hash`),
  KEY `project_hash` (`project_hash`),
  KEY `task_name` (`task_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `crm_tasks`
--


--
-- Table structure for table `csscheduler`
--

CREATE TABLE `csscheduler` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `period_type` varchar(2) NOT NULL DEFAULT '',
  `method` char(1) NOT NULL DEFAULT '',
  `recipient` text,
  `start_date` date DEFAULT NULL,
  `last_sent` int(11) NOT NULL DEFAULT '0',
  `last_sent_pdf` text,
  `next_send` date DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `send_now` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `csscheduler`
--


--
-- Table structure for table `csscheduler_log`
--

CREATE TABLE `csscheduler_log` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `period` varchar(2) NOT NULL DEFAULT '',
  `method` char(1) NOT NULL DEFAULT '',
  `recipient` text,
  `last_sent` int(11) NOT NULL DEFAULT '0',
  `statement_pdf` varchar(512) DEFAULT NULL,
  `notification` text,
  `status` varchar(3) NOT NULL DEFAULT '',
  `csscheduler_id` int(11) NOT NULL DEFAULT '0',
  `transmission_info` text,
  PRIMARY KEY (`obj_id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `csscheduler_log`
--


--
-- Table structure for table `currency`
--

CREATE TABLE `currency` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `code` char(3) NOT NULL,
  `country` char(2) NOT NULL,
  `symbol` text NOT NULL,
  `printed` varchar(255) NOT NULL,
  `printed_plural` varchar(255) NOT NULL,
  `rate` decimal(10,8) NOT NULL DEFAULT '0.00000000',
  `default` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`),
  KEY `code` (`code`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `currency`
--


--
-- Table structure for table `custom_fields`
--

CREATE TABLE `custom_fields` (
  `obj_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `created_by` varchar(32) NOT NULL,
  `last_change` varchar(32) NOT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `preview` tinyint(1) NOT NULL DEFAULT '1',
  `revert` text,
  `field_name` varchar(64) NOT NULL,
  `col_name` varchar(128) NOT NULL,
  `col_length` int(11) NOT NULL,
  `field_type` varchar(24) NOT NULL,
  `max_length` int(3) NOT NULL DEFAULT '16',
  `default_value` text,
  `required` tinyint(1) NOT NULL DEFAULT '0',
  `field_width` text,
  `field_height` text,
  `prepopulated` text,
  `class` varchar(45) NOT NULL,
  `table` varchar(64) NOT NULL,
  `location` varchar(45) NOT NULL,
  `sector` varchar(12) NOT NULL,
  `position` tinyint(2) NOT NULL DEFAULT '1',
  PRIMARY KEY (`obj_id`,`class`),
  KEY `field_name` (`field_name`(12))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `custom_fields`
--


--
-- Table structure for table `customer_contacts`
--

CREATE TABLE `customer_contacts` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `contact_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `contact_name` varchar(255) NOT NULL DEFAULT '',
  `contact_title` varchar(128) NOT NULL DEFAULT '',
  `contact_phone1` varchar(32) NOT NULL DEFAULT '',
  `contact_phone2` varchar(32) NOT NULL DEFAULT '',
  `contact_mobile` varchar(32) NOT NULL DEFAULT '',
  `contact_fax` varchar(32) NOT NULL DEFAULT '',
  `contact_email` varchar(128) NOT NULL DEFAULT '',
  `contact_user_name` varchar(32) NOT NULL DEFAULT '',
  `contact_password` varchar(32) NOT NULL DEFAULT '',
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `contact_hash` (`contact_hash`),
  KEY `customer_hash` (`customer_hash`),
  KEY `contact_name` (`contact_name`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_contacts`
--


--
-- Table structure for table `customer_credit`
--

CREATE TABLE `customer_credit` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL,
  `last_change` varchar(32) NOT NULL,
  `credit_hash` varchar(32) NOT NULL,
  `customer_hash` varchar(32) NOT NULL,
  `proposal_hash` varchar(32) DEFAULT NULL,
  `invoice_hash` varchar(32) DEFAULT NULL,
  `deleted` tinyint(1) NOT NULL,
  `deleted_date` date DEFAULT NULL,
  `credit_no` varchar(16) NOT NULL,
  `credit_date` date NOT NULL,
  `amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tax` decimal(10,2) NOT NULL DEFAULT '0.00',
  `balance` decimal(10,2) NOT NULL,
  `notes` text NOT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `credit_hash` (`credit_hash`),
  KEY `proposal_hash` (`proposal_hash`),
  KEY `customer_hash` (`customer_hash`),
  KEY `invoice_hash` (`invoice_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_credit`
--


--
-- Table structure for table `customer_credit_applied`
--

CREATE TABLE `customer_credit_applied` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `payment_hash` varchar(32) NOT NULL,
  `credit_hash` varchar(32) NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  `void` tinyint(1) NOT NULL DEFAULT '0',
  `void_timestamp` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`),
  KEY `invoice_hash` (`payment_hash`),
  KEY `credit_hash` (`credit_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_credit_applied`
--


--
-- Table structure for table `customer_credit_expenses`
--

CREATE TABLE `customer_credit_expenses` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `expense_hash` varchar(32) NOT NULL,
  `credit_hash` varchar(32) NOT NULL,
  `correction_code` varchar(32) NOT NULL,
  `account_hash` varchar(32) NOT NULL,
  `item_hash` varchar(32) DEFAULT NULL,
  `amount` decimal(10,2) NOT NULL,
  `tax` decimal(10,2) NOT NULL DEFAULT '0.00',
  `memo` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `credit_hash` (`credit_hash`),
  KEY `expense_hash` (`expense_hash`),
  KEY `correction_code` (`correction_code`),
  KEY `account_hash` (`account_hash`),
  KEY `item_hash` (`item_hash`(16))
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_credit_expenses`
--


--
-- Table structure for table `customer_credit_item`
--

CREATE TABLE `customer_credit_item` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `credit_hash` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `item_hash` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `amount` decimal(10,2) NOT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `credit_hash` (`credit_hash`),
  KEY `item_hash` (`item_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `customer_credit_item`
--


--
-- Table structure for table `customer_invoice`
--

CREATE TABLE `customer_invoice` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `invoice_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `invoice_to` char(1) NOT NULL DEFAULT 'C',
  `direct_bill` tinyint(1) NOT NULL DEFAULT '0',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `bill_to_hash` varchar(32) NOT NULL DEFAULT '',
  `audit_id` bigint(20) NOT NULL DEFAULT '0',
  `type` char(1) NOT NULL DEFAULT 'I',
  `paid_in_full` tinyint(1) NOT NULL DEFAULT '0',
  `reconciled` tinyint(1) NOT NULL DEFAULT '0',
  `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT 'invoice transmission status',
  `transmit_type` char(1) NOT NULL DEFAULT '',
  `transmit_timestamp` int(11) NOT NULL DEFAULT '0',
  `transmit_confirm` varchar(32) NOT NULL DEFAULT '',
  `transmit_to` text NOT NULL,
  `remit_to_addr` text,
  `install_hash` varchar(75) NOT NULL DEFAULT '',
  `install_city` varchar(255) NOT NULL DEFAULT '',
  `install_state` varchar(128) NOT NULL DEFAULT '',
  `install_zip` varchar(10) NOT NULL DEFAULT '',
  `install_country` varchar(12) NOT NULL DEFAULT '',
  `proposal_hash` varchar(32) NOT NULL DEFAULT '',
  `invoice_no` varchar(24) NOT NULL DEFAULT '',
  `punch` tinyint(1) NOT NULL DEFAULT '0',
  `invoice_date` date NOT NULL DEFAULT '0000-00-00',
  `amount` decimal(12,2) NOT NULL DEFAULT '0.00',
  `tax` decimal(10,2) NOT NULL DEFAULT '0.00',
  `balance` decimal(10,2) NOT NULL DEFAULT '0.00',
  `deposit_applied` decimal(10,2) NOT NULL DEFAULT '0.00',
  `finance_charges` decimal(10,2) NOT NULL DEFAULT '0.00',
  `currency` char(3) DEFAULT NULL,
  `exchange_rate` decimal(10,8) NOT NULL DEFAULT '0.00000000',
  `currency_account` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `invoice_hash` (`invoice_hash`),
  KEY `proposal_hash` (`proposal_hash`),
  KEY `customer_hash` (`customer_hash`),
  KEY `invoice_no` (`invoice_no`),
  KEY `type` (`type`,`balance`),
  KEY `invoice_date` (`invoice_date`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_invoice`
--

INSERT INTO `customer_invoice` VALUES (1,1614193101,'bf6cb2d218fcf83343d42e0d4c65ee56','f9375a13450a3d0b973ea10acaf7c6ee',0,NULL,'C',0,'721b63ef3e8f81b3cd72e53517aa46d1','',0,'D',0,0,1,'',0,'','',NULL,'','','','','','24794d1ba5c90cb2b10ecd8bbe29fffd','',0,'2021-02-24',20000.00,0.00,20000.00,0.00,0.00,NULL,0.00000000,NULL),(2,1614193196,'bf6cb2d218fcf83343d42e0d4c65ee56','8c04f450a6e9f4f81f9845008ce8842f',0,NULL,'C',0,'721b63ef3e8f81b3cd72e53517aa46d1','',0,'I',0,0,1,'M',0,'','Test Customer\n100 Main Street\nBaltimore, MD 21228','Dealer Choice Systems\nP.O. Box 21058\nCatonsville, MD 21228','customers|721b63ef3e8f81b3cd72e53517aa46d1','Baltimore','MD','21228','US','56eda27a24d06d7051fe9ebf5b89d936','2021-1000',0,'2021-02-24',15976.31,904.32,15976.31,0.00,0.00,NULL,0.00000000,NULL);

--
-- Table structure for table `customer_payment`
--

CREATE TABLE `customer_payment` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `payment_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `invoice_hash` varchar(32) NOT NULL DEFAULT '',
  `receipt_amount` decimal(10,2) NOT NULL DEFAULT '0.00',
  `currency_adjustment` decimal(10,2) NOT NULL DEFAULT '0.00',
  `account_hash` varchar(32) DEFAULT NULL,
  `applied_from` varchar(32) DEFAULT NULL,
  `applied_type` char(1) DEFAULT NULL,
  `reconciled` tinyint(1) NOT NULL DEFAULT '0',
  `receipt_date` date NOT NULL DEFAULT '0000-00-00',
  `receipt_type` char(2) NOT NULL DEFAULT 'CK',
  `check_no` varchar(32) NOT NULL DEFAULT '',
  `comments` text NOT NULL,
  `currency` char(3) DEFAULT NULL,
  `exchange_rate` decimal(10,8) NOT NULL DEFAULT '0.00000000',
  PRIMARY KEY (`obj_id`),
  KEY `invoice_hash` (`invoice_hash`),
  KEY `payment_hash` (`payment_hash`),
  KEY `applied_from` (`applied_from`),
  KEY `receipt_date` (`receipt_date`),
  KEY `deleted` (`deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_payment`
--

INSERT INTO `customer_payment` VALUES (1,1614193101,'bf6cb2d218fcf83343d42e0d4c65ee56','23b992b082c8faf2fb30119d53b96b0b',0,NULL,'f9375a13450a3d0b973ea10acaf7c6ee',20000.00,0.00,'001bdd9879308bf1646cdba2bd1a3806',NULL,NULL,0,'2021-02-24','CK','765','',NULL,0.00000000);

--
-- Table structure for table `customer_vendor_hash_index`
--

CREATE TABLE `customer_vendor_hash_index` (
  `hash` varchar(32) NOT NULL,
  PRIMARY KEY (`hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_vendor_hash_index`
--

INSERT INTO `customer_vendor_hash_index` VALUES ('18af13fec56ec4220b56a92f86a6fbb0'),('224a83e1b6481fe06a09faed1269a76c'),('34c8f11efbfabd9f9a236d2fbe3690ef'),('5fbcb9731415733b747a434951c5e37d'),('6b632de2aabc8cdd2594014b59dcabd9'),('721b63ef3e8f81b3cd72e53517aa46d1'),('8479bca24f263683b651a6d30005f9f8'),('8e567968b703cb44e59fae63db8d09e0'),('eaa1224353023d4b7b056b1efd7ea99f');

--
-- Table structure for table `customer_vendor_notes`
--

CREATE TABLE `customer_vendor_notes` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL,
  `note_hash` varchar(32) NOT NULL,
  `user_hash` varchar(32) NOT NULL,
  `entry_hash` varchar(32) NOT NULL,
  `type` char(1) NOT NULL,
  `comment` text NOT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `note_hash` (`note_hash`),
  KEY `entry_hash` (`entry_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer_vendor_notes`
--


--
-- Table structure for table `customers`
--

CREATE TABLE `customers` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `customer_no` int(11) DEFAULT NULL,
  `active` tinyint(1) NOT NULL DEFAULT '1',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `customer_name` varchar(255) NOT NULL DEFAULT '',
  `street` text,
  `city` varchar(255) NOT NULL DEFAULT '',
  `state` varchar(128) NOT NULL DEFAULT '',
  `zip` varchar(10) NOT NULL DEFAULT '',
  `country` char(2) NOT NULL,
  `phone` varchar(32) NOT NULL DEFAULT '',
  `fax` varchar(32) NOT NULL DEFAULT '',
  `duns_no` varchar(12) NOT NULL DEFAULT '',
  `account_no` varchar(64) NOT NULL,
  `credit_limit` decimal(10,0) DEFAULT NULL,
  `credit_hold` tinyint(1) NOT NULL DEFAULT '0',
  `deposit_percent` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tax_exempt_id` text,
  `gst_exempt` tinyint(1) NOT NULL DEFAULT '0',
  `pst_exempt` tinyint(1) NOT NULL DEFAULT '0',
  `hst_exempt` tinyint(1) NOT NULL DEFAULT '0',
  `qst_exempt` tinyint(1) NOT NULL DEFAULT '0',
  `tax_lock` tinyint(1) NOT NULL DEFAULT '0',
  `gsa` tinyint(1) NOT NULL DEFAULT '0',
  `po_required` tinyint(1) NOT NULL DEFAULT '0',
  `payment_terms` int(11) DEFAULT NULL,
  `invoice_reminder` tinyint(1) NOT NULL DEFAULT '0',
  `reminder_days` tinyint(1) NOT NULL DEFAULT '0',
  `finance_charges` tinyint(1) NOT NULL DEFAULT '0',
  `finance_percent` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `finance_days` tinyint(2) NOT NULL DEFAULT '0',
  `finance_minimum` decimal(10,2) NOT NULL DEFAULT '0.00',
  `assess_finance_charges` tinyint(1) NOT NULL DEFAULT '0',
  `finance_resend` tinyint(1) NOT NULL DEFAULT '0',
  `currency` char(3) DEFAULT NULL,
  `custom_sales_person` varchar(18) NOT NULL DEFAULT '' COMMENT 'Sales Person',
  `custom_special_terms` varchar(255) DEFAULT NULL COMMENT 'Special Terms',
  `salesrepassigned` varchar(32) NOT NULL,
  PRIMARY KEY (`obj_id`),
  UNIQUE KEY `customer_hash` (`customer_hash`),
  KEY `state` (`state`(12)),
  KEY `customer_name` (`customer_name`(32),`active`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customers`
--

INSERT INTO `customers` VALUES (1,1517335348,'e94588df973dd31c56052c73cc2e9458','721b63ef3e8f81b3cd72e53517aa46d1',NULL,1,0,NULL,'Test Customer','100 Main Street','Baltimore','MD','21228','US','','','','',NULL,0,0.5000,NULL,0,0,0,0,0,0,0,NULL,0,0,0,0.0000,0,0.00,0,0,NULL,'',NULL,'');

--
-- Table structure for table `discount_details`
--

CREATE TABLE `discount_details` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `discount_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `item_hash` varchar(32) NOT NULL DEFAULT '',
  `product_hash` varchar(32) DEFAULT NULL,
  `item_no` varchar(64) DEFAULT NULL,
  `discount_code` varchar(12) DEFAULT NULL,
  `discount_descr` varchar(64) DEFAULT NULL,
  `discount_frf` text NOT NULL,
  `discount_frf_quoted` tinyint(1) NOT NULL DEFAULT '0',
  `discount_type` char(1) NOT NULL DEFAULT 'F',
  `buy_discount1` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `buy_discount2` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `buy_discount3` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `buy_discount4` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `buy_discount5` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `sell_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `gp_margin` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `install_sell` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier1_from` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier1_to` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier1_buy_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier1_sell_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier1_install_sell` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier2_from` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier2_to` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier2_buy_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier2_sell_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier2_install_sell` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier3_from` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier3_to` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier3_buy_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier3_sell_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier3_install_sell` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier4_to` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier4_from` decimal(10,2) NOT NULL DEFAULT '0.00',
  `tier4_buy_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier4_sell_discount` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier4_install_sell` decimal(5,4) NOT NULL DEFAULT '0.0000',
  `tier5_from` decimal(10,2) NOT NULL,
  `tier5_to` decimal(10,2) NOT NULL,
  `tier5_buy_discount` decimal(5,4) NOT NULL,
  `tier5_sell_discount` decimal(5,4) NOT NULL,
  `tier6_from` decimal(10,2) NOT NULL,
  `tier6_to` decimal(10,2) NOT NULL,
  `tier6_buy_discount` decimal(5,4) NOT NULL,
  `tier6_sell_discount` decimal(5,4) NOT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `discount_hash` (`discount_hash`),
  KEY `item_hash` (`item_hash`),
  KEY `product_hash` (`product_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `discount_details`
--


--
-- Table structure for table `discounting`
--

CREATE TABLE `discounting` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `discount_hash` varchar(32) NOT NULL DEFAULT '',
  `deleted` tinyint(1) NOT NULL DEFAULT '0',
  `deleted_date` date DEFAULT NULL,
  `vendor_hash` varchar(32) NOT NULL DEFAULT '',
  `discount_type` char(1) NOT NULL DEFAULT '',
  `discount_id` varchar(24) NOT NULL,
  `discount_descr` varchar(64) NOT NULL DEFAULT '',
  `discount_gsa` tinyint(1) NOT NULL DEFAULT '0',
  `discount_default` tinyint(1) NOT NULL DEFAULT '0',
  `customer_hash` varchar(32) NOT NULL DEFAULT '',
  `discount_effective_date` date DEFAULT NULL,
  `discount_expiration_date` date DEFAULT NULL,
  PRIMARY KEY (`obj_id`),
  KEY `discount_hash` (`discount_hash`),
  KEY `vendor_hash` (`vendor_hash`),
  KEY `customer_hash` (`customer_hash`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `discounting`
--


--
-- Table structure for table `doc_vault`
--

CREATE TABLE `doc_vault` (
  `obj_id` int(11) NOT NULL AUTO_INCREMENT,
  `timestamp` int(11) NOT NULL DEFAULT '0',
  `last_change` varchar(32) NOT NULL DEFAULT '',
  `doc_hash` varchar(32) NOT NULL DEFAULT '',
  `download_hash` varchar(32) NOT NULL DEFAULT '',
  `public` tinyint(1) NOT NULL DEFAULT '0',
  `checkout` varchar(32) NOT NULL DEFAULT '',
  `checkout_time` int(11) NOT NULL DEFAULT '0',
  `proposal_hash` varchar(32) NOT NULL DEFAULT '',
  `file_name` varchar(128) NOT NULL DEFAULT '',
  `file_type` varchar(16) NOT NULL DEFAULT '',
  `content_type` varchar(128) NOT NULL DEFAULT '',
  `descr` text NOT NULL,
  `filesize` int(11) NOT NULL DEFAULT '0',
  `data` longblob,
  `customer_prospect_hash` varchar(32) NOT NULL DEFAULT '',
  `proposal_trailer` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`obj_id`),
  KEY `doc_hash` (`doc_hash`),
  KEY `proposal_hash` (`proposal_hash`),
  KEY `customer_prospect_hash` (`customer_prospect_hash`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;

--
-- Dumping data for table `doc_vault`
--

INSERT INTO `doc_vault` VALUES (1,1610550535,'','940fc817785160782c88b4772ce69aca','',0,'',0,'8a1647768847c08f206c4082c5662107','Haworth_SIF2.sif','SIF','application/octet-stream','',7395,0x[encoded data, 14790 characters],'',0),(2,1610550546,'','ed925e483a05bbd74a62411942592e58','',0,'',0,'d8f6202007fd9ab45a6942c6bb4d8161','Knoll.sif','SIF','application/octet-stream','',3249,0x[encoded data, 6498 characters],'',0),(3,1610550620,'','cd36bd20f0d247abf0e788821166d130','',0,'',0,'a86113928673b9b05475dcd91398f467','National_Office_from_OS.sif','SIF','application/octet-stream','',64708,0x[encoded data, 129416 characters],'',0);
INSERT INTO `doc_vault` VALUES (4,1610550669,'','b22be1ac170e1849bac0fd7a754157a5','',0,'',0,'0ee7fa1cc013415c7a8b712afda37b06','Herman_Miller_2.xml','XML','text/xml','',790998,0x[encoded data, 315167 characters]