text: -- phpMyAdmin SQL Dump
  -- version 4.5.1
  -- http://www.phpmyadmin.net
  --
  -- Host: 127.0.0.1
  -- Generation Time: Mar 08, 2017 at 04:30 AM
  -- Server version: 10.1.13-MariaDB
  -- PHP Version: 5.5.37
  
  SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  SET time_zone = "+00:00";
  
  
  /*!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 utf8mb4 */;
  
  --
  -- Database: `inventory`
  --
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `cashier`
  --
  
  CREATE TABLE `cashier` (
    `cashier_id` int(10) NOT NULL,
    `cashier_name` varchar(100) NOT NULL,
    `position` varchar(100) NOT NULL,
    `username` varchar(100) NOT NULL,
    `password` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `cashier`
  --
  
  INSERT INTO `cashier` (`cashier_id`, `cashier_name`, `position`, `username`, `password`) VALUES
  (1, 'Cashier', 'cashier', 'cashier', '12345');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `collection`
  --
  
  CREATE TABLE `collection` (
    `transaction_id` int(11) NOT NULL,
    `date` varchar(100) NOT NULL,
    `name` varchar(100) NOT NULL,
    `invoice` varchar(100) NOT NULL,
    `amount` varchar(100) NOT NULL,
    `remarks` varchar(100) NOT NULL,
    `balance` int(11) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `customer`
  --
  
  CREATE TABLE `customer` (
    `customer_id` int(11) NOT NULL,
    `customer_name` varchar(100) NOT NULL,
    `address` varchar(100) NOT NULL,
    `contact` varchar(100) NOT NULL,
    `membership_number` varchar(100) NOT NULL,
    `first_name` varchar(50) NOT NULL,
    `middle_name` varchar(50) NOT NULL,
    `last_name` varchar(50) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `customer`
  --
  
  INSERT INTO `customer` (`customer_id`, `customer_name`, `address`, `contact`, `membership_number`, `first_name`, `middle_name`, `last_name`) VALUES
  (1, 'Customer', 'Silay City', '4536974', '1', 'customer', 'customer', 'customer');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `lose`
  --
  
  CREATE TABLE `lose` (
    `p_id` int(10) NOT NULL,
    `product_code` varchar(30) NOT NULL,
    `product_name` varchar(30) NOT NULL,
    `description_name` varchar(30) NOT NULL,
    `amount_lose` varchar(30) NOT NULL,
    `qty` varchar(30) NOT NULL,
    `cost` varchar(30) NOT NULL,
    `date` varchar(30) NOT NULL,
    `category` varchar(20) NOT NULL,
    `exdate` varchar(30) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `lose`
  --
  
  INSERT INTO `lose` (`p_id`, `product_code`, `product_name`, `description_name`, `amount_lose`, `qty`, `cost`, `date`, `category`, `exdate`) VALUES
  (1, 'P-08', 'Century Tuna', 'ADOBO', '3000', '100', '30', '02-23-2017', 'Canned Goods', '2017-05-27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `products`
  --
  
  CREATE TABLE `products` (
    `product_id` int(11) NOT NULL,
    `product_code` varchar(50) NOT NULL,
    `product_name` varchar(100) NOT NULL,
    `description_name` varchar(50) NOT NULL,
    `unit` varchar(15) NOT NULL,
    `cost` varchar(100) NOT NULL,
    `price` varchar(100) NOT NULL,
    `supplier` varchar(100) NOT NULL,
    `qty_left` int(10) NOT NULL,
    `category` varchar(100) NOT NULL,
    `date_delivered` varchar(20) NOT NULL,
    `expiration_date` varchar(20) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `products`
  --
  
  INSERT INTO `products` (`product_id`, `product_code`, `product_name`, `description_name`, `unit`, `cost`, `price`, `supplier`, `qty_left`, `category`, `date_delivered`, `expiration_date`) VALUES
  (1, 'P-08', 'Century Tuna', 'ADOBO', 'Per Pieces', '30', '33', 'Consuelo', 100, 'Canned Goods', '2017-02-20', ''),
  (2, 'P-20032023', 'Lucky Me', 'Pancit Canton Extra Hot', 'Per Pieces', '10', '12', 'Consuelo', 100, 'Noodles', '2017-01-21', '2017-07-13'),
  (3, 'P-20032043', 'Lucky Me', 'Pancit Canton Chilimansi', 'Per Pieces', '10', '12', 'Consuelo', 100, 'Noodles', '2017-02-21', '2017-06-30'),
  (4, 'P-3932232', 'M.Y. San', 'Skyflakes Crackers', 'Per Pack', '45.50', '50', 'Consuelo', 100, 'Crackers', '2017-02-21', '2017-07-27');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `purchases`
  --
  
  CREATE TABLE `purchases` (
    `transaction_id` int(11) NOT NULL,
    `invoice_number` varchar(100) NOT NULL,
    `date_order` varchar(100) NOT NULL,
    `suplier` varchar(100) NOT NULL,
    `date_deliver` varchar(100) NOT NULL,
    `p_name` varchar(30) NOT NULL,
    `qty` varchar(30) NOT NULL,
    `cost` varchar(30) NOT NULL,
    `status` varchar(25) NOT NULL,
    `remark` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `purchases`
  --
  
  INSERT INTO `purchases` (`transaction_id`, `invoice_number`, `date_order`, `suplier`, `date_deliver`, `p_name`, `qty`, `cost`, `status`, `remark`) VALUES
  (1, 'PO-8330322', '2017-02-23', 'Consuelo', '', 'P-08', '100', '3300', 'Returned', 'Expired Products\r\n');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `purchases_item`
  --
  
  CREATE TABLE `purchases_item` (
    `id` int(11) NOT NULL,
    `name` varchar(100) NOT NULL,
    `qty` int(11) NOT NULL,
    `cost` varchar(100) NOT NULL,
    `invoice` varchar(100) NOT NULL,
    `status` varchar(25) NOT NULL,
    `date` varchar(25) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `purchases_item`
  --
  
  INSERT INTO `purchases_item` (`id`, `name`, `qty`, `cost`, `invoice`, `status`, `date`) VALUES
  (1, 'P-08', 100, '3300', 'PO-8330322', 'Returned', '2017-02-23');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `sales`
  --
  
  CREATE TABLE `sales` (
    `transaction_id` int(11) NOT NULL,
    `invoice_number` varchar(100) NOT NULL,
    `cashier` varchar(100) NOT NULL,
    `date` varchar(100) NOT NULL,
    `type` varchar(100) NOT NULL,
    `amount` varchar(100) NOT NULL,
    `due_date` varchar(100) NOT NULL,
    `name` varchar(100) NOT NULL,
    `balance` varchar(100) NOT NULL,
    `total_amount` varchar(30) NOT NULL,
    `cash` varchar(100) NOT NULL,
    `month` varchar(20) NOT NULL,
    `year` varchar(20) NOT NULL,
    `p_amount` varchar(30) NOT NULL,
    `vat` varchar(30) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `sales`
  --
  
  INSERT INTO `sales` (`transaction_id`, `invoice_number`, `cashier`, `date`, `type`, `amount`, `due_date`, `name`, `balance`, `total_amount`, `cash`, `month`, `year`, `p_amount`, `vat`) VALUES
  (1, 'RS-33200322', 'Rizaldy Loren', '02/21/2017', 'cash', '184.8', '', 'Renzy Jerota Loren', '', '', '185', 'February', '2017', '165', '19.8');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `sales_order`
  --
  
  CREATE TABLE `sales_order` (
    `transaction_id` int(11) NOT NULL,
    `invoice` varchar(100) NOT NULL,
    `product` varchar(100) NOT NULL,
    `qty` varchar(100) NOT NULL,
    `amount` varchar(100) NOT NULL,
    `name` varchar(100) NOT NULL,
    `price` varchar(100) NOT NULL,
    `discount` varchar(100) NOT NULL,
    `category` varchar(100) NOT NULL,
    `date` varchar(25) NOT NULL,
    `omonth` varchar(25) NOT NULL,
    `oyear` varchar(25) NOT NULL,
    `qtyleft` varchar(25) NOT NULL,
    `dname` varchar(50) NOT NULL,
    `vat` varchar(20) NOT NULL,
    `total_amount` varchar(30) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `sales_order`
  --
  
  INSERT INTO `sales_order` (`transaction_id`, `invoice`, `product`, `qty`, `amount`, `name`, `price`, `discount`, `category`, `date`, `omonth`, `oyear`, `qtyleft`, `dname`, `vat`, `total_amount`) VALUES
  (1, 'RS-33200322', 'P-08', '5', '165', 'Century Tuna', '33', '0', 'Canned Goods', '02/21/2017', 'February', '2017', '95', 'ADOBO', '19.8', '184.8');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `supliers`
  --
  
  CREATE TABLE `supliers` (
    `suplier_id` int(11) NOT NULL,
    `suplier_name` varchar(100) NOT NULL,
    `suplier_address` varchar(100) NOT NULL,
    `suplier_contact` varchar(100) NOT NULL,
    `contact_person` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `supliers`
  --
  
  INSERT INTO `supliers` (`suplier_id`, `suplier_name`, `suplier_address`, `suplier_contact`, `contact_person`) VALUES
  (1, 'Unilever', 'Bacolod City', '441 3251', 'dina'),
  (2, 'Consuelo', 'Talisay City', '441 3896', 'rey');
  
  -- --------------------------------------------------------
  
  --
  -- Table structure for table `user`
  --
  
  CREATE TABLE `user` (
    `id` int(11) NOT NULL,
    `username` varchar(100) NOT NULL,
    `password` varchar(100) NOT NULL,
    `name` varchar(100) NOT NULL,
    `position` varchar(100) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  
  --
  -- Dumping data for table `user`
  --
  
  INSERT INTO `user` (`id`, `username`, `password`, `name`, `position`) VALUES
  (1, 'admin', 'admin123', 'Admin', 'Admin');
  
  --
  -- Indexes for dumped tables
  --
  
  --
  -- Indexes for table `cashier`
  --
  ALTER TABLE `cashier`
    ADD PRIMARY KEY (`cashier_id`);
  
  --
  -- Indexes for table `collection`
  --
  ALTER TABLE `collection`
    ADD PRIMARY KEY (`transaction_id`);
  
  --
  -- Indexes for table `customer`
  --
  ALTER TABLE `customer`
    ADD PRIMARY KEY (`customer_id`);
  
  --
  -- Indexes for table `lose`
  --
  ALTER TABLE `lose`
    ADD PRIMARY KEY (`p_id`);
  
  --
  -- Indexes for table `products`
  --
  ALTER TABLE `products`
    ADD PRIMARY KEY (`product_id`);
  
  --
  -- Indexes for table `purchases`
  --
  ALTER TABLE `purchases`
    ADD PRIMARY KEY (`transaction_id`);
  
  --
  -- Indexes for table `purchases_item`
  --
  ALTER TABLE `purchases_item`
    ADD PRIMARY KEY (`id`);
  
  --
  -- Indexes for table `sales`
  --
  ALTER TABLE `sales`
    ADD PRIMARY KEY (`transaction_id`);
  
  --
  -- Indexes for table `sales_order`
  --
  ALTER TABLE `sales_order`
    ADD PRIMARY KEY (`transaction_id`);
  
  --
  -- Indexes for table `supliers`
  --
  ALTER TABLE `supliers`
    ADD PRIMARY KEY (`suplier_id`);
  
  --
  -- Indexes for table `user`
  --
  ALTER TABLE `user`
    ADD PRIMARY KEY (`id`);
  
  --
  -- AUTO_INCREMENT for dumped tables
  --
  
  --
  -- AUTO_INCREMENT for table `cashier`
  --
  ALTER TABLE `cashier`
    MODIFY `cashier_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `collection`
  --
  ALTER TABLE `collection`
    MODIFY `transaction_id` int(11) NOT NULL AUTO_INCREMENT;
  --
  -- AUTO_INCREMENT for table `customer`
  --
  ALTER TABLE `customer`
    MODIFY `customer_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `lose`
  --
  ALTER TABLE `lose`
    MODIFY `p_id` int(10) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `products`
  --
  ALTER TABLE `products`
    MODIFY `product_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
  --
  -- AUTO_INCREMENT for table `purchases`
  --
  ALTER TABLE `purchases`
    MODIFY `transaction_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `purchases_item`
  --
  ALTER TABLE `purchases_item`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `sales`
  --
  ALTER TABLE `sales`
    MODIFY `transaction_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  --
  -- AUTO_INCREMENT for table `sales_order`
  --
  ALTER TABLE `sales_order`
    MODIFY `transaction_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `supliers`
  --
  ALTER TABLE `supliers`
    MODIFY `suplier_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
  --
  -- AUTO_INCREMENT for table `user`
  --
  ALTER TABLE `user`
    MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
  /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
  