-- phpMyAdmin SQL Dump
-- version 3.1.3.1
-- http://www.phpmyadmin.net
--
-- Host: localhost
-- Generation Time: Jun 15, 2016 at 04:39 AM
-- Server version: 5.1.33
-- PHP Version: 5.2.9

SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8 */;

--
-- Database: `newlimara`
--

-- --------------------------------------------------------

--
-- Table structure for table `category_table`
--

CREATE TABLE IF NOT EXISTS `category_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `machine_id` int(11) NOT NULL,
  `category` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `category_table`
--

INSERT INTO `category_table` (`id`, `machine_id`, `category`, `delet`) VALUES
(1, 1, 'Brochure', 0),
(2, 1, 'Notice', 0),
(3, 1, 'Leter Head', 0),
(4, 1, 'Flayer', 0),
(5, 1, 'Form', 0),
(6, 1, 'Card', 0),
(7, 1, 'Poster', 0),
(9, 3, 'Test', 0),
(8, 2, 'Book', 0);

-- --------------------------------------------------------

--
-- Table structure for table `clients`
--

CREATE TABLE IF NOT EXISTS `clients` (
  `client_id` int(11) NOT NULL AUTO_INCREMENT,
  `client_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `clientaddress` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `place` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zipcode` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `secphone` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`client_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `clients`
--

INSERT INTO `clients` (`client_id`, `client_name`, `clientaddress`, `email`, `place`, `zipcode`, `phone`, `secphone`, `delet`) VALUES
(1, 'Sudhi', 'Kalayapuram', 'asas@ymail.com', 'Kalayapuram', '691514', '09895956900', '09895956900', 0),
(2, 'RINU.B', 'Kalayapuram', 'asas@ymail.com', 'Kalayapuram', '691560', '09895956900', '09895956900', 1);

-- --------------------------------------------------------

--
-- Table structure for table `company_address`
--

CREATE TABLE IF NOT EXISTS `company_address` (
  `id` int(50) NOT NULL AUTO_INCREMENT,
  `company_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `company_addrs` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `mob` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tax_heads` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tax_decleration` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tin` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `cst` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `company_address`
--

INSERT INTO `company_address` (`id`, `company_name`, `company_addrs`, `mob`, `email`, `tax_heads`, `tax_decleration`, `tin`, `cst`, `delet`) VALUES
(1, 'New Limara', 'Pallimukku PO<br> Kollam - 691001, Kerala', '1234567890', 'info@newlimara.com', 'KERALA VALUE ADDED TAX RULES, 2005<br /> FORM NO.8<br /> [See rule 58(10)]<br /> TAX INVOICE-Cash/Credit Bill', 'Certified that all the particulars shown in the above Tax invoice are true and correct in all respects and the goods on which the tax charged and collected are in accordance with the provisions of the K VAT ACT 2003 and the rules made thereunder. It is also certified that my/our registration under K VAT Act 2003 is not subject to any suspension/cancellation and it is valid as', '32021000649', '32021000649C', 0);

-- --------------------------------------------------------

--
-- Table structure for table `copysetting`
--

CREATE TABLE IF NOT EXISTS `copysetting` (
  `paper_name` text NOT NULL,
  `papre_nickname` text NOT NULL,
  `size` text NOT NULL,
  `no_copy` int(10) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;

--
-- Dumping data for table `copysetting`
--

INSERT INTO `copysetting` (`paper_name`, `papre_nickname`, `size`, `no_copy`) VALUES
('demmy', 'demmy', '1', 1),
('demmy half', 'A3', '1/2', 2),
('demmy A4', 'A4', '1/4', 4),
('Demmy 1/8', '1/8', '1/8', 8);

-- --------------------------------------------------------

--
-- Table structure for table `department`
--

CREATE TABLE IF NOT EXISTS `department` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `department` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `department`
--

INSERT INTO `department` (`id`, `department`, `delet`) VALUES
(1, 'Printing1', 0),
(2, 'Billing', 0);

-- --------------------------------------------------------

--
-- Table structure for table `estimatethree_temp_table`
--

CREATE TABLE IF NOT EXISTS `estimatethree_temp_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer` int(11) NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `machine_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `pr_length` double NOT NULL,
  `pr_width` double NOT NULL,
  `numofcopys` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `plate` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `ctp` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `binding` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofwork` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `workdescription` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `estimatethree_temp_table`
--


-- --------------------------------------------------------

--
-- Table structure for table `estimatetwo_temp_table`
--

CREATE TABLE IF NOT EXISTS `estimatetwo_temp_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer` int(11) NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `machine_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `type_one` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_two` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_three` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_four` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_five` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `pr_length` double NOT NULL,
  `pr_width` double NOT NULL,
  `gsm_one` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_two` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_three` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_four` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_five` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `inkcolor` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofbooks` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofsetsperbooks` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `startingno` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofbndboard` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `binding` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stapling` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stitching` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `pasting` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prntlastcopy` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofwork` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `workdescription` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `estimatetwo_temp_table`
--


-- --------------------------------------------------------

--
-- Table structure for table `estimate_calculate`
--

CREATE TABLE IF NOT EXISTS `estimate_calculate` (
  `ecal_id` int(11) NOT NULL AUTO_INCREMENT,
  `id` int(11) NOT NULL,
  `paper_print` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `plate_print` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `impression_amount` double NOT NULL,
  `paper_amount` double NOT NULL,
  `dtp_amount` double NOT NULL,
  PRIMARY KEY (`ecal_id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `estimate_calculate`
--


-- --------------------------------------------------------

--
-- Table structure for table `estimate_table`
--

CREATE TABLE IF NOT EXISTS `estimate_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimation_no` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `customer` int(11) NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `machine_id` int(11) NOT NULL,
  `print_size` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nopages` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `inkcolor` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `copies` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofbooks` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofsetsperbooks` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `startingno` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofbndboard` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `plate` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `ctp` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `lamination` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `backprint` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `same_matter` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Nil',
  `folding` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `creasing` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `binding` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stapling` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stitching` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `pasting` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prntlastcopy` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofwork` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `workdescription` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `laminat_amount` double NOT NULL,
  `bckprnt_amt` double NOT NULL,
  `fold_amt` double NOT NULL,
  `creas_amt` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `advamt` double NOT NULL,
  `date` date NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `trnno` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `estimate_table`
--

INSERT INTO `estimate_table` (`id`, `estimation_no`, `customer`, `product_code`, `product_name`, `machine_id`, `print_size`, `nopages`, `inkcolor`, `copies`, `numberofbooks`, `numberofsetsperbooks`, `startingno`, `typeofbndboard`, `plate`, `ctp`, `lamination`, `backprint`, `same_matter`, `folding`, `creasing`, `binding`, `stapling`, `stitching`, `pasting`, `prntlastcopy`, `typeofwork`, `workdescription`, `amount`, `laminat_amount`, `bckprnt_amt`, `fold_amt`, `creas_amt`, `tax`, `advamt`, `date`, `permission`, `user`, `trnno`, `delet`) VALUES
(1, '71', 1, '009877', 'Dummy 130 GSM', 2, '1/4', '22', 'Red', '2500', '0', '0', '0', '', '0', '12', 'No', 'No', 'Nil', 'No', 'No', 'Normal', 'Side', 'No', 'No', 'No', 'Nil', 'Nil', 0, 0, 0, 0, 0, 0, 0, '2016-04-18', '488011460973872', 'admin', '78', 0),
(2, '71', 1, 'MAP0012', 'Dummy 120 GSM', 2, '1/4', '22', 'Red', '2500', '0', '0', '0', '', '0', '12', 'No', 'No', 'Nil', 'No', 'No', 'Normal', 'Side', 'No', 'No', 'No', 'Nil', 'Nil', 0, 0, 0, 0, 0, 0, 0, '2016-04-18', '488011460973872', 'admin', '78', 0),
(3, '71', 1, '003', 'Dummy 50 GSM', 2, '1/4', '22', 'Red', '2500', '0', '0', '0', '', '0', '12', 'No', 'No', 'Nil', 'No', 'No', 'Normal', 'Side', 'No', 'No', 'No', 'Nil', 'Nil', 0, 0, 0, 0, 0, 0, 0, '2016-04-18', '488011460973872', 'admin', '78', 0),
(4, '72', 1, '003', 'Dummy 50 GSM', 2, '1/4', '31', 'Blue', '2000', '0', '0', '0', '', '', '16', 'No', 'No', 'undefined', 'No', 'No', 'Normal', 'Side', 'No', 'No', 'No', 'Test', 'Test', 0, 0, 0, 0, 0, 0, 0, '2016-04-18', '566071460973977', 'admin', '79', 0),
(5, '72', 1, '003', 'Dummy 50 GSM', 2, '1/4', '31', 'Blue', '2000', '0', '0', '0', '', '', '16', 'No', 'No', 'undefined', 'No', 'No', 'Normal', 'Side', 'No', 'No', 'No', 'Test', 'Test', 0, 0, 0, 0, 0, 0, 0, '2016-04-18', '566071460973977', 'admin', '79', 0);

-- --------------------------------------------------------

--
-- Table structure for table `estimate_table_three`
--

CREATE TABLE IF NOT EXISTS `estimate_table_three` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimation_no` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `customer` int(11) NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `machine_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `pr_length` double NOT NULL,
  `pr_width` double NOT NULL,
  `numofcopys` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `plate` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `ctp` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `binding` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofwork` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `workdescription` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `advance` double NOT NULL,
  `date` date NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `trnno` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `estimate_table_three`
--

INSERT INTO `estimate_table_three` (`id`, `estimation_no`, `customer`, `product_code`, `product_name`, `machine_id`, `category_id`, `pr_length`, `pr_width`, `numofcopys`, `plate`, `ctp`, `binding`, `typeofwork`, `workdescription`, `amount`, `tax`, `advance`, `date`, `status`, `trnno`, `permission`, `user`, `delet`) VALUES
(1, '24', 1, '', '', 1, 1, 1213, 23, '21', '12', '13', 'Normal', 'test', 'test', 201, 5, 100, '2016-02-03', 0, '24', '59812', 'admin', 0),
(2, '24', 1, '', '', 1, 1, 1213, 23, '21', '12', '13', 'Normal', 'test', 'test', 201, 5, 100, '2016-02-03', 0, '24', '59812', 'admin', 0),
(3, '25', 1, '', '', 1, 6, 24, 45, '13', '2', 'ctp', 'Normal', 'sdfgh', '\\sfvdgfbbagf', 20, 0, 590, '2016-02-15', 1, '31', '71850', 'admin', 0);

-- --------------------------------------------------------

--
-- Table structure for table `estimate_table_two`
--

CREATE TABLE IF NOT EXISTS `estimate_table_two` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimation_no` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `customer` int(11) NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `machine_id` int(11) NOT NULL,
  `category_id` int(11) NOT NULL,
  `type_one` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_two` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_three` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_four` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `type_five` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `pr_length` double NOT NULL,
  `pr_width` double NOT NULL,
  `gsm_one` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_two` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_three` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_four` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm_five` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `inkcolor` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofbooks` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofsetsperbooks` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `startingno` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofbndboard` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `binding` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stapling` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stitching` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `pasting` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prntlastcopy` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofwork` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `workdescription` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `advance` double NOT NULL,
  `date` date NOT NULL,
  `status` int(11) NOT NULL DEFAULT '0',
  `trnno` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=3 ;

--
-- Dumping data for table `estimate_table_two`
--

INSERT INTO `estimate_table_two` (`id`, `estimation_no`, `customer`, `product_code`, `product_name`, `machine_id`, `category_id`, `type_one`, `type_two`, `type_three`, `type_four`, `type_five`, `pr_length`, `pr_width`, `gsm_one`, `gsm_two`, `gsm_three`, `gsm_four`, `gsm_five`, `inkcolor`, `numberofbooks`, `numberofsetsperbooks`, `startingno`, `typeofbndboard`, `binding`, `stapling`, `stitching`, `pasting`, `prntlastcopy`, `typeofwork`, `workdescription`, `amount`, `tax`, `advance`, `date`, `status`, `trnno`, `permission`, `user`, `delet`) VALUES
(1, '23', 1, '', '', 1, 1, '2', '5', '6', '7', '0', 23, 16, '9', '7', '4', '3', '0', 'Black', '5', '5', 'LM122', 'Thin', 'Normal', 'Side', 'Yes', 'No', 'Yes', 'Test 4', 'Test 4', 201, 5, 100, '2016-02-03', 1, '23', '20637', 'admin', 0),
(2, '23', 1, '', '', 1, 1, '2', '5', '6', '7', '0', 23, 16, '9', '7', '4', '3', '0', 'Blue', '5', '5', 'LM123', 'Thick', 'Normal', 'Side', 'Yes', 'No', 'Yes', 'Test 3', 'Test 3', 201, 5, 100, '2016-02-03', 1, '23', '20637', 'admin', 0);

-- --------------------------------------------------------

--
-- Table structure for table `estimate_temp_table`
--

CREATE TABLE IF NOT EXISTS `estimate_temp_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `customer` int(11) NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `machine_id` int(11) NOT NULL,
  `print_size` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `nopages` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `inkcolor` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `copies` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofbooks` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `numberofsetsperbooks` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `startingno` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofbndboard` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `plate` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `ctp` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `lamination` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `backprint` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `same_matter` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT 'Nil',
  `folding` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `creasing` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `binding` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stapling` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stitching` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `pasting` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `prntlastcopy` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `typeofwork` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `workdescription` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `laminat_amount` double NOT NULL,
  `bckprnt_amt` double NOT NULL,
  `fold_amt` double NOT NULL,
  `creas_amt` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `date` date NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=latin1 AUTO_INCREMENT=1 ;

--
-- Dumping data for table `estimate_temp_table`
--


-- --------------------------------------------------------

--
-- Table structure for table `estimation_no`
--

CREATE TABLE IF NOT EXISTS `estimation_no` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `estimateno` int(11) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `estimation_no`
--

INSERT INTO `estimation_no` (`id`, `estimateno`) VALUES
(1, 73);

-- --------------------------------------------------------

--
-- Table structure for table `login_details`
--

CREATE TABLE IF NOT EXISTS `login_details` (
  `id` int(50) NOT NULL AUTO_INCREMENT,
  `staff_username` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `staff_id` int(50) NOT NULL,
  `purpose` varchar(100) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `time` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `date` date NOT NULL,
  `delet` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=143 ;

--
-- Dumping data for table `login_details`
--

INSERT INTO `login_details` (`id`, `staff_username`, `staff_id`, `purpose`, `time`, `date`, `delet`) VALUES
(1, 'admin', 1, 'Logout', '03:26:34:PM', '2016-01-15', 0),
(2, 'admin', 1, 'Login', '03:26:43:PM', '2016-01-15', 0),
(3, 'admin', 1, 'Logout', '03:26:50:PM', '2016-01-15', 0),
(4, 'admin', 1, 'Login', '03:45:00:PM', '2016-01-15', 0),
(5, 'admin', 1, 'Login', '03:45:02:PM', '2016-01-15', 0),
(6, 'admin', 1, 'Login', '03:45:03:PM', '2016-01-15', 0),
(7, 'admin', 1, 'Login', '03:45:03:PM', '2016-01-15', 0),
(8, 'admin', 1, 'Login', '03:45:03:PM', '2016-01-15', 0),
(9, 'admin', 1, 'Login', '03:45:04:PM', '2016-01-15', 0),
(10, 'admin', 1, 'Login', '03:45:04:PM', '2016-01-15', 0),
(11, 'admin', 1, 'Login', '03:45:05:PM', '2016-01-15', 0),
(12, 'admin', 1, 'Login', '03:45:05:PM', '2016-01-15', 0),
(13, 'admin', 1, 'Login', '03:45:05:PM', '2016-01-15', 0),
(14, 'admin', 1, 'Login', '03:45:05:PM', '2016-01-15', 0),
(15, 'admin', 1, 'Login', '03:45:06:PM', '2016-01-15', 0),
(16, 'admin', 1, 'Login', '03:45:06:PM', '2016-01-15', 0),
(17, 'admin', 1, 'Login', '03:45:06:PM', '2016-01-15', 0),
(18, 'admin', 1, 'Login', '03:45:06:PM', '2016-01-15', 0),
(19, 'admin', 1, 'Login', '03:45:06:PM', '2016-01-15', 0),
(20, 'admin', 1, 'Login', '03:45:06:PM', '2016-01-15', 0),
(21, 'admin', 1, 'Login', '03:45:07:PM', '2016-01-15', 0),
(22, 'admin', 1, 'Login', '03:45:07:PM', '2016-01-15', 0),
(23, 'admin', 1, 'Login', '03:45:07:PM', '2016-01-15', 0),
(24, 'admin', 1, 'Login', '03:45:07:PM', '2016-01-15', 0),
(25, 'admin', 1, 'Login', '03:45:08:PM', '2016-01-15', 0),
(26, 'admin', 1, 'Login', '03:45:08:PM', '2016-01-15', 0),
(27, 'admin', 1, 'Login', '03:45:08:PM', '2016-01-15', 0),
(28, 'admin', 1, 'Login', '03:45:08:PM', '2016-01-15', 0),
(29, 'admin', 1, 'Login', '03:45:08:PM', '2016-01-15', 0),
(30, 'admin', 1, 'Login', '03:45:08:PM', '2016-01-15', 0),
(31, 'admin', 1, 'Login', '03:45:09:PM', '2016-01-15', 0),
(32, 'admin', 1, 'Logout', '03:45:11:PM', '2016-01-15', 0),
(33, 'admin', 1, 'Login', '03:45:19:PM', '2016-01-15', 0),
(34, 'admin', 1, 'Logout', '03:46:10:PM', '2016-01-15', 0),
(35, 'admin', 1, 'Login', '03:46:17:PM', '2016-01-15', 0),
(36, 'admin', 1, 'Logout', '03:46:25:PM', '2016-01-15', 0),
(37, 'admin', 1, 'Login', '03:46:49:PM', '2016-01-15', 0),
(38, 'admin', 1, 'Logout', '03:47:53:PM', '2016-01-15', 0),
(39, 'admin', 1, 'Login', '03:48:02:PM', '2016-01-15', 0),
(40, 'admin', 1, 'Login', '03:48:08:PM', '2016-01-15', 0),
(41, 'admin', 1, 'Login', '03:48:09:PM', '2016-01-15', 0),
(42, 'admin', 1, 'Login', '03:48:09:PM', '2016-01-15', 0),
(43, 'admin', 1, 'Login', '03:48:09:PM', '2016-01-15', 0),
(44, 'admin', 1, 'Login', '03:48:09:PM', '2016-01-15', 0),
(45, 'admin', 1, 'Logout', '03:48:12:PM', '2016-01-15', 0),
(46, 'admin', 1, 'Login', '03:48:36:PM', '2016-01-15', 0),
(47, 'admin', 1, 'Logout', '03:48:40:PM', '2016-01-15', 0),
(48, 'admin', 1, 'Login', '03:50:46:PM', '2016-01-15', 0),
(49, 'admin', 1, 'Logout', '03:51:59:PM', '2016-01-15', 0),
(50, 'admin', 1, 'Login', '03:52:05:PM', '2016-01-15', 0),
(51, 'admin', 1, 'Logout', '03:52:09:PM', '2016-01-15', 0),
(52, 'admin', 1, 'Login', '03:55:53:PM', '2016-01-15', 0),
(53, 'admin', 1, 'Login', '03:55:57:PM', '2016-01-15', 0),
(54, 'admin', 1, 'Login', '03:55:58:PM', '2016-01-15', 0),
(55, 'admin', 1, 'Login', '03:55:59:PM', '2016-01-15', 0),
(56, 'admin', 1, 'Login', '03:55:59:PM', '2016-01-15', 0),
(57, 'admin', 1, 'Login', '03:55:59:PM', '2016-01-15', 0),
(58, 'admin', 1, 'Login', '03:55:59:PM', '2016-01-15', 0),
(59, 'admin', 1, 'Login', '03:55:59:PM', '2016-01-15', 0),
(60, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(61, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(62, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(63, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(64, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(65, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(66, 'admin', 1, 'Login', '03:56:00:PM', '2016-01-15', 0),
(67, 'admin', 1, 'Login', '03:56:01:PM', '2016-01-15', 0),
(68, 'admin', 1, 'Login', '03:56:01:PM', '2016-01-15', 0),
(69, 'admin', 1, 'Login', '03:56:02:PM', '2016-01-15', 0),
(70, 'admin', 1, 'Login', '03:56:02:PM', '2016-01-15', 0),
(71, 'admin', 1, 'Login', '03:56:02:PM', '2016-01-15', 0),
(72, 'admin', 1, 'Login', '03:56:02:PM', '2016-01-15', 0),
(73, 'admin', 1, 'Login', '03:56:03:PM', '2016-01-15', 0),
(74, 'admin', 1, 'Login', '03:56:03:PM', '2016-01-15', 0),
(75, 'admin', 1, 'Login', '03:56:03:PM', '2016-01-15', 0),
(76, 'admin', 1, 'Login', '03:56:04:PM', '2016-01-15', 0),
(77, 'admin', 1, 'Logout', '03:56:07:PM', '2016-01-15', 0),
(78, 'admin', 1, 'Login', '03:56:16:PM', '2016-01-15', 0),
(79, 'admin', 1, 'Logout', '03:57:15:PM', '2016-01-15', 0),
(80, 'admin', 1, 'Login', '03:57:21:PM', '2016-01-15', 0),
(81, 'admin', 1, 'Logout', '03:57:25:PM', '2016-01-15', 0),
(82, 'admin', 1, 'Login', '03:58:13:PM', '2016-01-15', 0),
(83, 'admin', 1, 'Logout', '04:00:45:PM', '2016-01-15', 0),
(84, 'admin', 1, 'Login', '04:00:57:PM', '2016-01-15', 0),
(85, 'admin', 1, 'Logout', '04:45:07:PM', '2016-01-15', 0),
(86, 'admin', 1, 'Login', '04:45:15:PM', '2016-01-15', 0),
(87, 'admin', 1, 'Logout', '05:01:21:PM', '2016-01-15', 0),
(88, 'admin', 1, 'Login', '05:01:29:PM', '2016-01-15', 0),
(89, 'admin', 1, 'Login', '05:01:53:PM', '2016-01-15', 0),
(90, 'admin', 1, 'Logout', '10:23:06:AM', '2016-01-16', 0),
(91, 'admin', 1, 'Login', '10:30:41:AM', '2016-01-16', 0),
(92, 'admin', 1, 'Login', '10:36:41:AM', '2016-01-16', 0),
(93, 'admin', 1, 'Logout', '10:37:01:AM', '2016-01-16', 0),
(94, 'admin', 1, 'Login', '10:37:25:AM', '2016-01-16', 0),
(95, 'admin', 1, 'Logout', '10:37:32:AM', '2016-01-16', 0),
(96, 'admin', 1, 'Login', '03:50:40:PM', '2016-01-18', 0),
(97, 'admin', 1, 'Logout', '03:50:45:PM', '2016-01-18', 0),
(98, 'admin', 1, 'Login', '03:50:52:PM', '2016-01-18', 0),
(99, 'admin', 1, 'Logout', '03:50:58:PM', '2016-01-18', 0),
(100, 'admin', 1, 'Login', '03:52:36:PM', '2016-01-18', 0),
(101, 'admin', 1, 'Logout', '03:52:39:PM', '2016-01-18', 0),
(102, 'admin', 1, 'Login', '03:52:46:PM', '2016-01-18', 0),
(103, 'admin', 1, 'Login', '01:08:34:PM', '2016-01-19', 0),
(104, 'admin', 1, 'Login', '01:09:18:PM', '2016-01-19', 0),
(105, 'admin', 1, 'Logout', '03:23:20:PM', '2016-01-20', 0),
(106, 'admin', 1, 'Login', '03:27:40:PM', '2016-01-20', 0),
(107, 'admin', 1, 'Login', '03:50:22:PM', '2016-01-27', 0),
(108, 'admin', 1, 'Login', '10:44:28:AM', '2016-02-05', 0),
(109, 'admin', 1, 'Login', '10:44:47:AM', '2016-02-05', 0),
(110, 'admin', 1, 'Login', '10:17:50:AM', '2016-02-06', 0),
(111, 'admin', 1, 'Login', '10:18:01:AM', '2016-02-06', 0),
(112, 'admin', 1, 'Login', '10:21:37:AM', '2016-02-08', 0),
(113, 'admin', 1, 'Login', '10:21:50:AM', '2016-02-08', 0),
(114, 'admin', 1, 'Login', '10:14:34:AM', '2016-02-09', 0),
(115, 'admin', 1, 'Login', '11:24:53:AM', '2016-02-09', 0),
(116, 'admin', 1, 'Login', '04:05:56:PM', '2016-02-09', 0),
(117, 'admin', 1, 'Login', '04:06:02:PM', '2016-02-09', 0),
(118, 'admin', 1, 'Login', '10:17:14:AM', '2016-02-10', 0),
(119, 'admin', 1, 'Login', '02:33:30:PM', '2016-02-10', 0),
(120, 'admin', 1, 'Login', '02:33:35:PM', '2016-02-10', 0),
(121, 'admin', 1, 'Login', '10:48:33:AM', '2016-02-15', 0),
(122, 'admin', 1, 'Login', '10:44:20:AM', '2016-02-19', 0),
(123, 'admin', 1, 'Login', '10:12:00:AM', '2016-02-22', 0),
(124, 'admin', 1, 'Login', '10:09:03:AM', '2016-02-24', 0),
(125, 'admin', 1, 'Login', '11:41:10:AM', '2016-02-25', 0),
(126, 'admin', 1, 'Login', '03:58:17:PM', '2016-02-26', 0),
(127, 'admin', 1, 'Login', '09:58:33:AM', '2016-03-04', 0),
(128, 'admin', 1, 'Login', '10:43:15:AM', '2016-03-04', 0),
(129, 'admin', 1, 'Login', '12:47:10:PM', '2016-03-05', 0),
(130, 'admin', 1, 'Login', '10:46:03:AM', '2016-04-04', 0),
(131, 'admin', 1, 'Login', '11:48:42:AM', '2016-04-05', 0),
(132, 'admin', 1, 'Login', '11:13:47:AM', '2016-04-11', 0),
(133, 'admin', 1, 'Logout', '12:11:18:PM', '2016-04-18', 0),
(134, 'admin', 1, 'Login', '12:11:33:PM', '2016-04-18', 0),
(135, 'admin', 1, 'Logout', '12:14:04:PM', '2016-04-18', 0),
(136, 'admin', 1, 'Login', '12:14:11:PM', '2016-04-18', 0),
(137, 'admin', 1, 'Logout', '04:55:53:PM', '2016-04-18', 0),
(138, 'admin', 1, 'Login', '04:55:59:PM', '2016-04-18', 0),
(139, 'admin', 1, 'Login', '10:17:24:AM', '2016-04-28', 0),
(140, 'admin', 1, 'Login', '10:13:18:AM', '2016-05-27', 0),
(141, 'admin', 1, 'Login', '11:07:51:AM', '2016-06-14', 0),
(142, 'admin', 1, 'Login', '11:16:26:AM', '2016-06-14', 0);

-- --------------------------------------------------------

--
-- Table structure for table `machines_table`
--

CREATE TABLE IF NOT EXISTS `machines_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Machine_Name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `description` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `impression_charge` double NOT NULL,
  `additional_impression_charge` double NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `machines_table`
--

INSERT INTO `machines_table` (`id`, `Machine_Name`, `description`, `impression_charge`, `additional_impression_charge`, `delet`) VALUES
(1, 'ABDICK', 'ABDICK', 400, 150, 0),
(2, 'HEIDLEBERG', 'HEIDLEBERG', 400, 150, 0),
(3, 'SHINOHARA', 'SHINOHARA', 400, 150, 0);

-- --------------------------------------------------------

--
-- Table structure for table `master_purchase`
--

CREATE TABLE IF NOT EXISTS `master_purchase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vendr_id` int(11) NOT NULL,
  `invoice_date` date NOT NULL,
  `invoice_no` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `width` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `length` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `price` double NOT NULL,
  `quantity` double NOT NULL,
  `discount` double NOT NULL,
  `tax` double NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `entrydate` date NOT NULL,
  `trnno` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `user` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `master_purchase`
--

INSERT INTO `master_purchase` (`id`, `vendr_id`, `invoice_date`, `invoice_no`, `product_code`, `product_name`, `gsm`, `width`, `length`, `price`, `quantity`, `discount`, `tax`, `permission`, `entrydate`, `trnno`, `user`, `delet`) VALUES
(1, 0, '2016-02-09', 'AD231', '001', 'Paper1', '10', '12', '13', 10, 12, 0, 5, '510031455015629', '2016-02-09', '29', 'admin', 0),
(2, 0, '2016-02-09', 'AD231', '001', 'Paper1', '10', '12', '13', 10, 20, 0, 5, '510031455015629', '2016-02-09', '29', 'admin', 0),
(3, 0, '2016-02-09', 'AD231', '001', 'Paper1', '20', '12', '13', 10, 30, 0, 5, '510031455015629', '2016-02-09', '29', 'admin', 0),
(4, 0, '2016-02-09', 'AD231', '001', 'Paper1', '60', '12', '13', 10, 30, 0, 5, '510031455015629', '2016-02-09', '29', 'admin', 0),
(5, 0, '2016-02-09', 'AD231', '001', 'Paper1', '35', '12', '13', 10, 50, 0, 5, '510031455015629', '2016-02-09', '29', 'admin', 0),
(6, 1, '2016-02-09', 'AD231', '001', 'Paper1', '10', '12', '13', 10, 1, 0, 5, '931551455015791', '2016-02-09', '30', 'admin', 0),
(7, 1, '2016-02-29', '322', '003', 'Dummy', '70', '25', '40', 10, 800, 0, 5, '749741456722296', '2016-02-29', '36', 'admin', 0);

-- --------------------------------------------------------

--
-- Table structure for table `other_settings`
--

CREATE TABLE IF NOT EXISTS `other_settings` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `other_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `amount` double NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=13 ;

--
-- Dumping data for table `other_settings`
--

INSERT INTO `other_settings` (`id`, `other_name`, `amount`, `delet`) VALUES
(1, 'Lamination', 100, 0),
(2, 'Back Printing', 200, 0),
(3, 'Folding', 20, 0),
(4, 'Creasing', 500, 0),
(5, 'CTP Charge', 250, 0),
(6, 'DTP Charge', 200, 0),
(7, 'Tracing with Plate Charge', 50, 0),
(8, 'Binding', 0, 0),
(9, 'Stapling', 0, 0),
(10, 'Stitching', 0, 0),
(11, 'Pasting', 0, 0),
(12, 'Print on Last Copy', 5, 0);

-- --------------------------------------------------------

--
-- Table structure for table `price_details`
--

CREATE TABLE IF NOT EXISTS `price_details` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `machine_id` int(11) NOT NULL,
  `cata_id` int(11) NOT NULL,
  `amount` double NOT NULL,
  `tax` double NOT NULL DEFAULT '0',
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=10 ;

--
-- Dumping data for table `price_details`
--

INSERT INTO `price_details` (`id`, `machine_id`, `cata_id`, `amount`, `tax`, `delet`) VALUES
(1, 1, 1, 5, 0, 0),
(2, 1, 2, 4, 0, 0),
(3, 1, 3, 480, 0, 0),
(4, 1, 4, 600, 0, 0),
(5, 1, 5, 50, 0, 0),
(6, 1, 6, 20, 0, 0),
(7, 1, 7, 130, 5, 0),
(8, 2, 8, 0, 0, 0),
(9, 3, 9, 4, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `printing_size`
--

CREATE TABLE IF NOT EXISTS `printing_size` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `print_size` varchar(50) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=7 ;

--
-- Dumping data for table `printing_size`
--

INSERT INTO `printing_size` (`id`, `print_size`, `delet`) VALUES
(1, '1/2', 0),
(2, '1/4', 0),
(3, '1/6', 0),
(4, '1/8', 0),
(5, '1/16', 0),
(6, '1/1', 0);

-- --------------------------------------------------------

--
-- Table structure for table `products`
--

CREATE TABLE IF NOT EXISTS `products` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `productcode` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `productname` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm` double NOT NULL,
  `paper_type` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `paper_color` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `paper_size` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `sellprice` double NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `productcode`, `productname`, `gsm`, `paper_type`, `paper_color`, `paper_size`, `sellprice`, `delet`) VALUES
(1, '001', 'Paper1', 200, 'Ex Bond', 'Blue', '12', 3, 0),
(2, '002', 'clip', 3, 'Art Card', 'Black', '7', 32, 0),
(3, '0013', 'Dummy Crown 130 GSM', 130, 'Maplitho', 'White', '5', 2, 0),
(4, '003', 'Dummy 50 GSM', 50, 'Ivory Board', 'Gray', '3', 2, 0),
(5, '0045', 'Double Dummy 23GSM', 23, 'Maplitho', 'White', '12', 7, 0),
(6, 'MAP0012', 'Dummy 120 GSM', 120, 'Art Board', 'White', '9', 4, 0),
(7, '009877', 'Dummy 130 GSM', 130, 'Maplitho', 'White', '2', 2.5, 0);

-- --------------------------------------------------------

--
-- Table structure for table `purchase_temp`
--

CREATE TABLE IF NOT EXISTS `purchase_temp` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `vendr_id` int(11) NOT NULL,
  `invoice_date` date NOT NULL,
  `invoice_no` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_code` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `product_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `gsm` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `width` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `length` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `price` double NOT NULL,
  `quantity` double NOT NULL,
  `discount` double NOT NULL,
  `tax` double NOT NULL,
  `permission` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `entrydate` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=6 ;

--
-- Dumping data for table `purchase_temp`
--

INSERT INTO `purchase_temp` (`id`, `vendr_id`, `invoice_date`, `invoice_no`, `product_code`, `product_name`, `gsm`, `width`, `length`, `price`, `quantity`, `discount`, `tax`, `permission`, `entrydate`) VALUES
(3, 1, '2016-02-22', 'AD231', '001', 'Paper1', '12', '12', '32', 1222, 12, 0, 5, '875411456141503', '2016-02-22');

-- --------------------------------------------------------

--
-- Table structure for table `role`
--

CREATE TABLE IF NOT EXISTS `role` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `rolename` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=4 ;

--
-- Dumping data for table `role`
--

INSERT INTO `role` (`id`, `rolename`, `delet`) VALUES
(1, 'Admin1', 0),
(2, 'Manager', 0),
(3, '', 1);

-- --------------------------------------------------------

--
-- Table structure for table `staff`
--

CREATE TABLE IF NOT EXISTS `staff` (
  `staff_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `role_id` int(11) NOT NULL,
  `staff_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `stfaddress` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `dob` date NOT NULL,
  `depid` int(11) NOT NULL,
  `logaccess` int(11) NOT NULL,
  `email` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `place` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `zipcode` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `secphone` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `joining_dat` date NOT NULL,
  `image` varchar(200) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `status` int(11) NOT NULL DEFAULT '1',
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`staff_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `staff`
--

INSERT INTO `staff` (`staff_id`, `user_name`, `role_id`, `staff_name`, `stfaddress`, `dob`, `depid`, `logaccess`, `email`, `place`, `zipcode`, `phone`, `secphone`, `joining_dat`, `image`, `status`, `delet`) VALUES
(1, 'admin', 1, 'Admin', 'Kollam', '1990-02-01', 1, 0, 'sambu@gmail.com', 'Kalayapuram', '691560', '09895956913', '', '0000-00-00', '', 1, 0);

-- --------------------------------------------------------

--
-- Table structure for table `transaction_number`
--

CREATE TABLE IF NOT EXISTS `transaction_number` (
  `id` int(50) NOT NULL AUTO_INCREMENT,
  `trnno` int(50) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `transaction_number`
--

INSERT INTO `transaction_number` (`id`, `trnno`) VALUES
(1, 80);

-- --------------------------------------------------------

--
-- Table structure for table `users`
--

CREATE TABLE IF NOT EXISTS `users` (
  `user_id` int(11) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(250) NOT NULL,
  `password` varchar(250) NOT NULL,
  `name` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `staff_id` int(11) NOT NULL,
  `status` int(11) NOT NULL,
  `loginpermission` int(11) NOT NULL,
  `del_status` int(11) NOT NULL,
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `staff_id` (`staff_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=2 ;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`user_id`, `user_name`, `password`, `name`, `staff_id`, `status`, `loginpermission`, `del_status`) VALUES
(1, 'admin', 'admin', 'Admin', 1, 0, 0, 0);

-- --------------------------------------------------------

--
-- Table structure for table `vendor`
--

CREATE TABLE IF NOT EXISTS `vendor` (
  `client_id` int(11) NOT NULL AUTO_INCREMENT,
  `vendor_name` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `vendoraddress` varchar(250) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `email` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `place` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `tin` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `phone` varchar(150) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `secphone` varchar(20) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `delet` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`client_id`)
) ENGINE=MyISAM  DEFAULT CHARSET=latin1 AUTO_INCREMENT=8 ;

--
-- Dumping data for table `vendor`
--

INSERT INTO `vendor` (`client_id`, `vendor_name`, `vendoraddress`, `email`, `place`, `tin`, `phone`, `secphone`, `delet`) VALUES
(1, 'Sudhi', 'Kalayapuram', 'asas@ymail.com', 'Kalayapuram', '691304', '09895956900', '09895956900', 0),
(2, 'Shafeek', 'Keralapuram', 'asas@ymail.com', 'Kalayapuram', '691560', '09895956900', '09895956900', 0),
(7, 'Shafeek', 'Keralapuram', '123redsxf@gmai.com', 'Kalayapuram', '772314', '09895956900', '09895956900', 0);
