/*
Navicat MySQL Data Transfer

Source Server         : localhost
Source Server Version : 50534
Source Host           : localhost:3306
Source Database       : ips

Target Server Type    : MYSQL
Target Server Version : 50534
File Encoding         : 65001

Date: 2014-05-19 14:15:01
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for `purchase_order_items`
-- ----------------------------
DROP TABLE IF EXISTS `purchase_order_items`;
CREATE TABLE `purchase_order_items` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `purchase_order_id` int(10) unsigned NOT NULL,
  `line_number` smallint(5) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `quantity` int(10) unsigned NOT NULL DEFAULT '0',
  `cost` decimal(10,2) unsigned NOT NULL DEFAULT '0.00',
  `paper_or_substrate` varchar(800) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `cover` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `text` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `inks_or_coatings` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `binding_instructions` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `finishing` varchar(800) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `proofing` varchar(800) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `insert_date` datetime NOT NULL,
  `change_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of purchase_order_items
-- ----------------------------
INSERT INTO `purchase_order_items` VALUES ('3', '2', '1', 'test item 1!', '0', '25.00', 'poaper', 'cover', 'text', 'ink', 'binding', 'finishing', 'proofing', '2014-05-19 13:41:38', '2014-05-19 13:41:38');
INSERT INTO `purchase_order_items` VALUES ('4', '3', '1', 'test item name #1', '0', '5000.00', 'paper', 'cover', '', '', '', 'finishingasdfasdfas', '', '2014-05-19 13:42:41', '2014-05-19 13:42:41');

-- ----------------------------
-- Table structure for `purchase_orders`
-- ----------------------------
DROP TABLE IF EXISTS `purchase_orders`;
CREATE TABLE `purchase_orders` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `job_id` int(11) unsigned NOT NULL,
  `vendor_id` int(11) unsigned NOT NULL,
  `due_date` date DEFAULT NULL,
  `fulfillment_shipping` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `files_release_date` date DEFAULT NULL,
  `ship_date` date DEFAULT NULL,
  `in_hands_date` date DEFAULT NULL,
  `num_line_items` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `total` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `insert_date` datetime NOT NULL,
  `change_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of purchase_orders
-- ----------------------------
INSERT INTO `purchase_orders` VALUES ('1', '1001', '4', null, '', null, null, null, '1', '0.00', '0000-00-00 00:00:00', '2014-05-19 13:32:47');
INSERT INTO `purchase_orders` VALUES ('2', '1001', '13', '2014-05-21', 'test a', '2014-05-22', '2014-05-27', '2014-05-30', '1', '25.00', '0000-00-00 00:00:00', '2014-05-19 13:41:38');
INSERT INTO `purchase_orders` VALUES ('3', '1001', '17', '2014-05-01', '', '2014-05-16', null, null, '1', '5000.00', '0000-00-00 00:00:00', '2014-05-19 13:42:41');

-- ----------------------------
-- Table structure for `quote_letter_items`
-- ----------------------------
DROP TABLE IF EXISTS `quote_letter_items`;
CREATE TABLE `quote_letter_items` (
  `id` int(11) unsigned NOT NULL AUTO_INCREMENT,
  `job_id` int(11) unsigned NOT NULL,
  `line_number` smallint(5) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `description` varchar(2000) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `quantity` int(10) unsigned NOT NULL DEFAULT '0',
  `cost` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `insert_date` datetime NOT NULL,
  `change_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of quote_letter_items
-- ----------------------------
INSERT INTO `quote_letter_items` VALUES ('76', '1001', '1', 'test 1', 'test desc 1', '4', '5.00', '2014-05-19 00:00:00', '2014-05-19 09:51:44');
INSERT INTO `quote_letter_items` VALUES ('77', '1001', '2', 'test 2', 'test desc 2', '2', '25.00', '2014-05-19 00:00:00', '2014-05-19 09:51:44');
INSERT INTO `quote_letter_items` VALUES ('78', '1001', '3', 'item 3!!', '98', '87', '0.00', '2014-05-19 00:00:00', '2014-05-19 09:51:44');
INSERT INTO `quote_letter_items` VALUES ('79', '1001', '4', 'Test item 4', '', '0', '0.00', '2014-05-19 00:00:00', '2014-05-19 09:51:44');
INSERT INTO `quote_letter_items` VALUES ('80', '1001', '5', 'test item 5', '', '0', '0.00', '2014-05-19 00:00:00', '2014-05-19 09:51:44');

-- ----------------------------
-- Table structure for `quote_letters`
-- ----------------------------
DROP TABLE IF EXISTS `quote_letters`;
CREATE TABLE `quote_letters` (
  `job_id` int(11) unsigned NOT NULL,
  `attn` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `issue_date` date DEFAULT NULL,
  `num_line_items` tinyint(4) unsigned NOT NULL,
  `proofing_cost` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `proofing_tax_cost` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `vendor_in_shipping_cost` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `vendor_in_shipping_tax_cost` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `shipping_cost` decimal(9,2) unsigned NOT NULL,
  `shipping_tax_cost` decimal(9,2) unsigned NOT NULL,
  `fulfillment_cost` decimal(9,2) unsigned NOT NULL,
  `fulfillment_tax_cost` decimal(9,2) unsigned NOT NULL,
  `item_total` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `item_tax_cost` decimal(9,2) unsigned NOT NULL DEFAULT '0.00',
  `total_tax_cost` decimal(9,2) unsigned NOT NULL,
  `total` decimal(9,2) unsigned NOT NULL,
  `insert_date` datetime NOT NULL,
  `change_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`job_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

-- ----------------------------
-- Records of quote_letters
-- ----------------------------
INSERT INTO `quote_letters` VALUES ('1001', 'test 123asdf', '2014-05-21', '5', '20.00', '1.65', '30.00', '2.48', '32.99', '2.72', '44.75', '3.69', '30.00', '2.48', '13.01', '170.75', '0000-00-00 00:00:00', '2014-05-19 09:51:44');