text: CREATE DATABASE  IF NOT EXISTS `test` /*!40100 DEFAULT CHARACTER SET latin1 */;
  USE `test`;
  -- MySQL dump 10.13  Distrib 5.5.50, for debian-linux-gnu (x86_64)
  --
  -- Host: 127.0.0.1    Database: test
  -- ------------------------------------------------------
  -- Server version	5.5.50-0ubuntu0.14.04.1
  
  /*!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 */;
  /*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
  /*!40103 SET TIME_ZONE='+00:00' */;
  /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
  /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
  /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
  /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
  
  --
  -- Table structure for table `clients`
  --
  
  DROP TABLE IF EXISTS `clients`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `clients` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) DEFAULT NULL,
    `address` varchar(45) DEFAULT NULL,
    `phone` varchar(45) DEFAULT NULL,
    `email` varchar(45) DEFAULT NULL,
    `organization` varchar(45) DEFAULT NULL,
    `fax` varchar(45) DEFAULT NULL,
    `tin` varchar(45) DEFAULT NULL,
    `user_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `master_brands`
  --
  
  DROP TABLE IF EXISTS `master_brands`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `master_brands` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '	',
    `name` varchar(45) DEFAULT NULL,
    `user_id` int(11) NOT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `master_categories`
  --
  
  DROP TABLE IF EXISTS `master_categories`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `master_categories` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) DEFAULT NULL,
    `user_id` int(11) NOT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `master_products`
  --
  
  DROP TABLE IF EXISTS `master_products`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `master_products` (
    `id` int(11) NOT NULL DEFAULT '0',
    `name` varchar(45) DEFAULT NULL,
    `quantity` varchar(45) DEFAULT NULL,
    `brand` varchar(45) DEFAULT NULL,
    `master_category_id` varchar(45) DEFAULT NULL,
    `product_group_id` varchar(45) DEFAULT NULL,
    `client_id` int(11) DEFAULT NULL,
    `user_id` varchar(45) NOT NULL,
    `price` varchar(45) DEFAULT NULL,
    `expairy_date` datetime DEFAULT NULL,
    `max_discount` varchar(45) DEFAULT NULL,
    `perchese_date` datetime DEFAULT NULL,
    `bill_number` varchar(45) DEFAULT NULL COMMENT '				',
    `transporter` varchar(45) DEFAULT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    `status` tinyint(4) DEFAULT NULL,
    `is_saled` tinyint(4) DEFAULT '0',
    `is_expaire` tinyint(4) DEFAULT '0',
    `is_return` tinyint(4) DEFAULT '0',
    `return_date` datetime DEFAULT NULL,
    `unit` varchar(45) NOT NULL
  ) ENGINE=InnoDB DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `product_groups`
  --
  
  DROP TABLE IF EXISTS `product_groups`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `product_groups` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) DEFAULT NULL,
    `user_id` int(11) NOT NULL,
    `created` datetime DEFAULT NULL,
    `modified` varchar(45) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `products`
  --
  
  DROP TABLE IF EXISTS `products`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `products` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) DEFAULT NULL,
    `quantity` varchar(45) DEFAULT NULL,
    `brand` varchar(45) DEFAULT NULL,
    `master_category_id` varchar(45) DEFAULT NULL,
    `product_group_id` varchar(45) DEFAULT NULL,
    `master_product_id` varchar(45) DEFAULT NULL,
    `client_id` int(11) DEFAULT NULL,
    `user_id` varchar(45) NOT NULL,
    `price` varchar(45) DEFAULT NULL,
    `expairy_date` datetime DEFAULT NULL,
    `max_discount` varchar(45) DEFAULT NULL,
    `perchese_date` datetime DEFAULT NULL,
    `bill_number` varchar(45) DEFAULT NULL COMMENT '				',
    `transporter` varchar(45) DEFAULT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    `status` tinyint(4) DEFAULT '1',
    `is_saled` tinyint(4) DEFAULT '0',
    `is_expaire` tinyint(4) DEFAULT '0',
    `is_return` tinyint(4) DEFAULT '0',
    `return_date` datetime DEFAULT NULL,
    `packing` varchar(45) DEFAULT NULL,
    `unit` varchar(45) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `salses`
  --
  
  DROP TABLE IF EXISTS `salses`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `salses` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '		',
    `master_product_id` int(11) DEFAULT NULL,
    `product_id` int(11) NOT NULL,
    `quantity` int(11) DEFAULT NULL,
    `user_id` int(11) DEFAULT NULL,
    `actual_price` int(11) DEFAULT NULL,
    `to_shoper` tinyint(4) DEFAULT '0',
    `shoper_id` int(11) DEFAULT NULL,
    `transection_id` int(11) DEFAULT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    `stok_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `shopers`
  --
  
  DROP TABLE IF EXISTS `shopers`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `shopers` (
    `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '	',
    `name` varchar(45) DEFAULT NULL,
    `email` varchar(45) DEFAULT NULL,
    `user` varchar(45) DEFAULT NULL,
    `address` varchar(45) DEFAULT NULL,
    `mobile` varchar(45) DEFAULT NULL,
    `phone` varchar(45) DEFAULT NULL,
    `is_deleted` int(11) DEFAULT '0',
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `stoks`
  --
  
  DROP TABLE IF EXISTS `stoks`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `stoks` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `product_id` int(11) DEFAULT NULL,
    `quantity_added` varchar(45) NOT NULL,
    `perchese_date` datetime DEFAULT NULL,
    `expairy_date` datetime DEFAULT NULL,
    `created` datetime DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    `quantity_available` int(11) DEFAULT NULL,
    `user_id` int(11) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `transactions`
  --
  
  DROP TABLE IF EXISTS `transactions`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `transactions` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `is_salse` tinyint(4) DEFAULT NULL,
    `is_parchage` tinyint(4) DEFAULT NULL,
    `salse_ids` varchar(45) DEFAULT NULL,
    `parchage_ids` varchar(45) DEFAULT NULL,
    `product_ids` varchar(45) DEFAULT NULL,
    `created` datetime DEFAULT NULL,
    `modified` varchar(45) DEFAULT NULL,
    `invoice_number` varchar(45) DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=81 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Table structure for table `users`
  --
  
  DROP TABLE IF EXISTS `users`;
  /*!40101 SET @saved_cs_client     = @@character_set_client */;
  /*!40101 SET character_set_client = utf8 */;
  CREATE TABLE `users` (
    `id` int(11) NOT NULL AUTO_INCREMENT,
    `name` varchar(45) NOT NULL,
    `password` varchar(45) DEFAULT NULL,
    `email` varchar(45) DEFAULT NULL,
    `remember` tinyint(4) DEFAULT NULL,
    `status` varchar(45) DEFAULT NULL,
    `is_admin` int(11) DEFAULT '0',
    `mobile` varchar(45) DEFAULT NULL,
    `modified` datetime DEFAULT NULL,
    `created` datetime DEFAULT NULL,
    PRIMARY KEY (`id`)
  ) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=latin1;
  /*!40101 SET character_set_client = @saved_cs_client */;
  
  --
  -- Dumping routines for database 'test'
  --
  /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
  
  /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
  /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
  /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
  /*!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 */;
  /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
  
  -- Dump completed on 2016-09-20 22:55:40
  