-- Schema for line_items table CREATE TABLE IF NOT EXISTS `line_items` ( `id` int(11) NOT NULL AUTO_INCREMENT, `item_number` decimal(10,2) NOT NULL, `option` tinyint(1) NOT NULL DEFAULT 0, `quantity` decimal(10,2) NOT NULL, `title` varchar(500) NOT NULL, `description` text NOT NULL, `document_id` int(11) NOT NULL, `product_id` int(11) DEFAULT NULL, `has_text_prices` tinyint(1) NOT NULL DEFAULT 0, `has_price` tinyint(4) NOT NULL DEFAULT 1, `unit_price_string` varchar(255) DEFAULT NULL, `gross_price_string` varchar(255) DEFAULT NULL, `costing_id` int(11) DEFAULT NULL, `gross_unit_price` decimal(10,2) DEFAULT NULL COMMENT 'Either fill this in or have a costing_id associated with this record', `net_unit_price` decimal(10,2) DEFAULT NULL, `discount_percent` decimal(10,2) DEFAULT NULL, `discount_amount_unit` decimal(10,2) DEFAULT NULL, `discount_amount_total` decimal(10,2) DEFAULT NULL, `gross_price` decimal(10,2) DEFAULT NULL, `net_price` decimal(10,2) DEFAULT NULL, PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;