-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Aug 29, 2019 at 12:34 PM
-- Server version: 10.3.16-MariaDB
-- PHP Version: 7.3.2

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
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: `id4448656_bitlinkdata`
--

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

--
-- Table structure for table `appsettings`
--

CREATE TABLE `appsettings` (
  `comp_id` int(4) NOT NULL,
  `set_category` varchar(15) DEFAULT NULL,
  `set_name` varchar(20) DEFAULT NULL,
  `set_value` varchar(50) DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `Val_type` varchar(1) DEFAULT NULL,
  `Editable` bit(1) DEFAULT b'0',
  `Set_options` varchar(255) DEFAULT NULL,
  `Description` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `client_requests`
--

CREATE TABLE `client_requests` (
  `request_id` int(11) NOT NULL,
  `client_app_id` varchar(45) NOT NULL,
  `Notes` varchar(250) DEFAULT NULL,
  `request_type` varchar(40) NOT NULL,
  `request_index` tinyint(1) DEFAULT 0,
  `request_time` datetime DEFAULT NULL,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `Cust_Code` varchar(10) NOT NULL,
  `Reply_message` varchar(250) DEFAULT NULL,
  `req_status` tinyint(4) DEFAULT 0,
  `reply_time` datetime DEFAULT NULL,
  `file_data` mediumblob DEFAULT NULL,
  `file_name` varchar(45) NOT NULL,
  `comp_id` int(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `company`
--

CREATE TABLE `company` (
  `comp_id` int(11) NOT NULL,
  `comp_code` varchar(10) NOT NULL,
  `comp_name` varchar(50) NOT NULL,
  `app_id` varchar(30) NOT NULL,
  `area` varchar(50) DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `app_name` varchar(20) DEFAULT NULL,
  `show_tax` tinyint(1) NOT NULL,
  `inactive` tinyint(1) NOT NULL DEFAULT 0,
  `tax_system` varchar(3) DEFAULT NULL,
  `tax_extra` tinyint(1) NOT NULL DEFAULT 0,
  `notes` varchar(255) NOT NULL,
  `max_clients` int(2) NOT NULL DEFAULT 2,
  `app_type` varchar(3) NOT NULL COMMENT 'exp values : AND or WIN',
  `iscust_order` bit(1) NOT NULL DEFAULT b'0',
  `currency_name` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `mobile_clients`
--

CREATE TABLE `mobile_clients` (
  `comp_id` int(4) NOT NULL,
  `pkey` int(11) NOT NULL,
  `client_app_id` varchar(45) DEFAULT NULL,
  `description` varchar(45) DEFAULT NULL,
  `Next_SO_No` int(8) DEFAULT NULL,
  `Next_Bill_No` int(8) DEFAULT NULL,
  `Next_Rec_No` int(8) DEFAULT NULL,
  `Next_SRet_No` int(8) NOT NULL DEFAULT 1,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `inactive` tinyint(1) DEFAULT 0,
  `client_type` tinyint(1) DEFAULT 0,
  `App_Pass` varchar(10) DEFAULT NULL,
  `isSales` bit(1) DEFAULT b'0',
  `isSO` bit(1) DEFAULT b'0',
  `isRec` bit(1) DEFAULT b'0',
  `isSRet` bit(1) DEFAULT b'0',
  `isRequest` bit(1) DEFAULT b'0',
  `isQuote` bit(1) NOT NULL DEFAULT b'0',
  `isCost` bit(1) NOT NULL DEFAULT b'0',
  `serial_prefix` varchar(5) DEFAULT NULL,
  `isPriceLock` bit(1) NOT NULL DEFAULT b'0',
  `price_level` tinyint(1) DEFAULT 1 not null
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

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

CREATE TABLE `products` (
  `comp_id` int(4) NOT NULL,
  `prod_code` varchar(10) DEFAULT NULL,
  `prod_name` varchar(50) DEFAULT NULL,
  `quantity` decimal(13,4) DEFAULT 0.0000,
  `price` decimal(10,4) DEFAULT 0.0000,
  `mrp` decimal(10,4) DEFAULT 0.0000,
  `disc_rate` decimal(5,2) DEFAULT 0.00,
  `tax_rate` decimal(5,2) DEFAULT 0.00,
  `BarCode` varchar(15) DEFAULT NULL,
  `Brand` varchar(20) DEFAULT NULL,
  `Category` varchar(20) DEFAULT NULL,
  `UNIT1` varchar(5) DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `Inactive` bit(1) DEFAULT b'0',
  `outof_stock` bit(1) DEFAULT b'0',
  `edit_time` int(12) DEFAULT 0,
  `add_time` datetime DEFAULT NULL,
  `price2` decimal(10,4) NOT NULL DEFAULT 0.0000,
  `disp_order` smallint(5) NOT NULL DEFAULT 0,
  `packing` varchar(10) DEFAULT NULL,
  `photo_edit_time` bigint(12) DEFAULT 0 NOT NULL,
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `receipts`
--

CREATE TABLE `receipts` (
  `entry_no` int(11) NOT NULL,
  `client_entry_id` int(8) DEFAULT 0,
  `client_app_id` varchar(45) NOT NULL,
  `counter_code` varchar(10) DEFAULT NULL,
  `vchr_no` varchar(10) NOT NULL,
  `trans_date` date DEFAULT NULL,
  `cust_code` varchar(10) DEFAULT NULL,
  `cust_id` int(8) DEFAULT NULL,
  `cust_name` varchar(40) DEFAULT NULL,
  `disc_amt` decimal(10,4) DEFAULT 0.0000,
  `amount` decimal(10,4) DEFAULT 0.0000,
  `pay_mode` tinyint(4) DEFAULT 0,
  `notes` varchar(50) NOT NULL,
  `sync_time` datetime NOT NULL,
  `SYNC_ENTRY_NO` int(10) NOT NULL DEFAULT 0,
  `IS_SYNCHED` bit(1) NOT NULL DEFAULT b'0',
  `acc_id` int(8) DEFAULT NULL,
  `acc_name` varchar(40) DEFAULT NULL,
  `ref_no` varchar(15) NOT NULL,
  `comp_id` int(4) NOT NULL,
  `cheque_no` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `receipts_bills`
--

CREATE TABLE `receipts_bills` (
  `entry_no` int(8) NOT NULL,
  `compid` int(4) NOT NULL,
  `bill_date` date NOT NULL,
  `doc_entry_no` int(8) NOT NULL,
  `doc_vchr_no` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
  `amt_paid` decimal(12,3) NOT NULL DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `sales`
--

CREATE TABLE `sales` (
  `Entry_no` int(8) DEFAULT 0,
  `Entry_Date` date DEFAULT NULL,
  `Notes` varchar(255) DEFAULT NULL,
  `Amount` decimal(13,4) DEFAULT 0.0000,
  `disc_amt` decimal(10,0) NOT NULL DEFAULT 0,
  `Voucher_no` varchar(15) DEFAULT NULL,
  `Sub_Code` varchar(10) DEFAULT NULL,
  `Pay_Mode` tinyint(1) DEFAULT 0,
  `Exported` bit(1) DEFAULT b'0',
  `Acc_no` smallint(6) DEFAULT 0,
  `CUST_REF` varchar(15) DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `CUST_NAME` varchar(50) DEFAULT NULL,
  `APRVDBY` varchar(10) DEFAULT NULL,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `client_app_id` varchar(30) DEFAULT NULL,
  `sync_time` datetime DEFAULT NULL,
  `SYNC_ENTRY_NO` int(8) DEFAULT 0,
  `IS_SYNCHED` bit(1) DEFAULT b'0',
  `ordStatus` tinyint(4) DEFAULT 0,
  `Status_message` varchar(255) DEFAULT NULL,
  `synced_Status` tinyint(4) DEFAULT 0,
  `tax_amt` decimal(10,4) DEFAULT 0.0000,
  `cgst_amt` decimal(10,4) DEFAULT 0.0000,
  `sgst_amt` decimal(10,4) DEFAULT 0.0000,
  `cess_amt` decimal(10,4) DEFAULT 0.0000,
  `comp_id` int(4) NOT NULL,
  `CUST_PHONE` varchar(25) DEFAULT NULL,
  `CUST_AREA` varchar(25) DEFAULT NULL,
  `cash_paid` decimal(12,3) NOT NULL DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sales_return`
--

CREATE TABLE `sales_return` (
  `Entry_no` int(8) DEFAULT 0,
  `Entry_Date` date DEFAULT NULL,
  `Notes` varchar(255) DEFAULT NULL,
  `Amount` decimal(13,4) DEFAULT 0.0000,
  `Voucher_no` varchar(15) DEFAULT NULL,
  `Sub_Code` varchar(10) DEFAULT NULL,
  `Pay_Mode` tinyint(1) DEFAULT 0,
  `Exported` bit(1) DEFAULT b'0',
  `Acc_no` smallint(6) DEFAULT 0,
  `CUST_REF` varchar(15) DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `CUST_NAME` varchar(50) DEFAULT NULL,
  `APRVDBY` varchar(10) DEFAULT NULL,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `client_app_id` varchar(30) DEFAULT NULL,
  `sync_time` datetime DEFAULT NULL,
  `SYNC_ENTRY_NO` int(8) DEFAULT 0,
  `IS_SYNCHED` bit(1) DEFAULT b'0',
  `ordStatus` tinyint(4) DEFAULT 0,
  `Status_message` varchar(255) DEFAULT NULL,
  `synced_Status` tinyint(4) DEFAULT 0,
  `disc_amt` decimal(10,4) NOT NULL DEFAULT 0.0000,
  `tax_amt` decimal(10,4) DEFAULT 0.0000,
  `cgst_amt` decimal(10,4) DEFAULT 0.0000,
  `sgst_amt` decimal(10,4) DEFAULT 0.0000,
  `cess_amt` decimal(10,4) DEFAULT 0.0000,
  `comp_id` int(4) NOT NULL,
  `CUST_PHONE` varchar(25) DEFAULT NULL,
  `CUST_AREA` varchar(25) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sales_return_sub`
--

CREATE TABLE `sales_return_sub` (
  `Entry_no` int(8) DEFAULT 0,
  `compid` int(4) NOT NULL,
  `prod_code` varchar(10) DEFAULT NULL,
  `batch` varchar(10) DEFAULT NULL,
  `loc_code` varchar(10) DEFAULT NULL,
  `Quantity` decimal(13,4) DEFAULT 0.0000,
  `Rate` decimal(10,4) DEFAULT 0.0000,
  `Unit` varchar(3) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `TaxRate` decimal(10,4) DEFAULT 0.0000,
  `Acc_no` smallint(6) DEFAULT 0,
  `discount` decimal(10,4) DEFAULT 0.0000,
  `sl_no` smallint(6) DEFAULT 0,
  `pack_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_unit` varchar(5) DEFAULT NULL,
  `Cost` decimal(10,4) DEFAULT 0.0000,
  `imp_entryNo` int(8) DEFAULT 0,
  `imp_slNo` smallint(6) DEFAULT 0,
  `sale_date` date DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `BARCODE` varchar(13) DEFAULT NULL,
  `UnitIndex` tinyint(1) DEFAULT 0,
  `cgst_rate` decimal(5,2) DEFAULT 0.00,
  `sgst_rate` decimal(5,2) DEFAULT 0.00,
  `cess_rate` decimal(5,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sales_sub`
--

CREATE TABLE `sales_sub` (
  `Entry_no` int(8) DEFAULT 0,
  `compid` int(4) NOT NULL,
  `prod_code` varchar(10) DEFAULT NULL,
  `batch` varchar(10) DEFAULT NULL,
  `loc_code` varchar(10) DEFAULT NULL,
  `Quantity` decimal(13,4) DEFAULT 0.0000,
  `Rate` decimal(10,4) DEFAULT 0.0000,
  `Unit` varchar(3) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `TaxRate` decimal(10,4) DEFAULT 0.0000,
  `Acc_no` smallint(6) DEFAULT 0,
  `discount` decimal(10,4) DEFAULT 0.0000,
  `sl_no` smallint(6) DEFAULT 0,
  `pack_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_unit` varchar(5) DEFAULT NULL,
  `Cost` decimal(10,4) DEFAULT 0.0000,
  `imp_entryNo` int(8) DEFAULT 0,
  `imp_slNo` smallint(6) DEFAULT 0,
  `sale_date` date DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `BARCODE` varchar(13) DEFAULT NULL,
  `UnitIndex` tinyint(1) DEFAULT 0,
  `cgst_rate` decimal(5,2) DEFAULT 0.00,
  `sgst_rate` decimal(5,2) DEFAULT 0.00,
  `cess_rate` decimal(5,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sale_order`
--

CREATE TABLE `sale_order` (
  `comp_id` int(4) NOT NULL,
  `Entry_no` int(8) DEFAULT 0,
  `Entry_Date` date DEFAULT NULL,
  `Notes` varchar(255) DEFAULT NULL,
  `Amount` decimal(13,4) DEFAULT 0.0000,
  `Voucher_no` varchar(15) DEFAULT NULL,
  `Sub_Code` varchar(10) DEFAULT NULL,
  `Exported` bit(1) DEFAULT b'0',
  `Acc_no` smallint(6) DEFAULT 0,
  `CUST_REF` varchar(15) DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `CUST_NAME` varchar(40) DEFAULT NULL,
  `APRVDBY` varchar(10) DEFAULT NULL,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `client_app_id` varchar(30) DEFAULT NULL,
  `sync_time` datetime DEFAULT NULL,
  `SYNC_ENTRY_NO` int(8) DEFAULT 0,
  `IS_SYNCHED` bit(1) DEFAULT b'0',
  `ordStatus` tinyint(4) DEFAULT 0,
  `Status_message` varchar(255) DEFAULT NULL,
  `synced_Status` tinyint(4) DEFAULT 0,
  `CUST_NAME1` varchar(40) DEFAULT NULL,
  `CUST_PHONE` varchar(25) DEFAULT NULL,
  `CUST_AREA` varchar(25) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `sale_order_sub`
--

CREATE TABLE `sale_order_sub` (
  `Entry_no` int(8) DEFAULT 0,
  `compid` int(4) NOT NULL,
  `prod_code` varchar(10) DEFAULT NULL,
  `batch` varchar(10) DEFAULT NULL,
  `loc_code` varchar(10) DEFAULT NULL,
  `Quantity` decimal(13,4) DEFAULT 0.0000,
  `Rate` decimal(10,4) DEFAULT 0.0000,
  `Unit` varchar(5) DEFAULT NULL,
  `Expiry` date DEFAULT NULL,
  `TaxRate` decimal(10,4) DEFAULT 0.0000,
  `Acc_no` smallint(6) DEFAULT 0,
  `discount` decimal(10,4) DEFAULT 0.0000,
  `sl_no` smallint(6) DEFAULT 0,
  `pack_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_unit` varchar(5) DEFAULT NULL,
  `Cost` decimal(10,4) DEFAULT 0.0000,
  `imp_entryNo` int(8) DEFAULT 0,
  `imp_slNo` smallint(6) DEFAULT 0,
  `sale_date` date DEFAULT NULL,
  `BARCODE` varchar(13) DEFAULT NULL,
  `UnitIndex` tinyint(1) DEFAULT 0,
  `cgst_rate` decimal(5,2) DEFAULT 0.00,
  `sgst_rate` decimal(5,2) DEFAULT 0.00,
  `cess_rate` decimal(5,2) DEFAULT 0.00
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `stock_issue`
--

CREATE TABLE `stock_issue` (
  `comp_id` int(4) NOT NULL,
  `Entry_No` int(8) DEFAULT 0,
  `Entry_Date` date DEFAULT NULL,
  `Notes` varchar(255) DEFAULT NULL,
  `Amount` decimal(13,4) DEFAULT 0.0000,
  `Tax_Amt` decimal(11,4) DEFAULT 0.0000,
  `Voucher_No` varchar(15) DEFAULT NULL,
  `Exported` bit(1) DEFAULT b'0',
  `pkey` int(11) NOT NULL,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `Counter_Name` varchar(40) DEFAULT NULL,
  `sync_time` datetime DEFAULT NULL,
  `WebEntry_No` int(8) DEFAULT 0,
  `pc_edited` tinyint(1) NOT NULL DEFAULT 0,
  `edit_time` int(12) DEFAULT NULL,
  `Ref_No` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `stock_issue_sub`
--

CREATE TABLE `stock_issue_sub` (
  `Entry_no` int(8) DEFAULT 0,
  `compid` int(4) NOT NULL,
  `prod_code` varchar(10) DEFAULT NULL,
  `Quantity` decimal(13,4) DEFAULT 0.0000,
  `loc_code` varchar(10) DEFAULT NULL,
  `Rate` decimal(10,4) DEFAULT 0.0000,
  `Unit` varchar(5) DEFAULT NULL,
  `Tax_Rate` decimal(10,4) DEFAULT 0.0000,
  `sl_no` smallint(6) DEFAULT 0,
  `pack_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_unit` varchar(5) DEFAULT NULL,
  `Cost` decimal(10,4) DEFAULT 0.0000,
  `UnitIndex` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `stock_return`
--

CREATE TABLE `stock_return` (
  `comp_id` int(4) NOT NULL,
  `Entry_No` int(8) DEFAULT 0,
  `Entry_Date` date DEFAULT NULL,
  `Notes` varchar(255) DEFAULT NULL,
  `Amount` decimal(13,4) DEFAULT 0.0000,
  `Tax_Amt` decimal(11,4) DEFAULT 0.0000,
  `Voucher_No` varchar(15) DEFAULT NULL,
  `Exported` bit(1) DEFAULT b'0',
  `pkey` int(11) NOT NULL,
  `Counter_Code` varchar(10) DEFAULT NULL,
  `Counter_Name` varchar(40) DEFAULT NULL,
  `sync_time` datetime DEFAULT NULL,
  `WebEntry_No` int(8) DEFAULT 0,
  `pc_edited` tinyint(1) NOT NULL DEFAULT 0,
  `edit_time` int(12) DEFAULT NULL,
  `Ref_No` varchar(15) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `stock_return_sub`
--

CREATE TABLE `stock_return_sub` (
  `Entry_no` int(8) DEFAULT 0,
  `compid` int(4) NOT NULL,
  `prod_code` varchar(10) DEFAULT NULL,
  `Quantity` decimal(13,4) DEFAULT 0.0000,
  `loc_code` varchar(10) DEFAULT NULL,
  `Rate` decimal(10,4) DEFAULT 0.0000,
  `Unit` varchar(5) DEFAULT NULL,
  `Tax_Rate` decimal(10,4) DEFAULT 0.0000,
  `sl_no` smallint(6) DEFAULT 0,
  `pack_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_qty` decimal(10,4) DEFAULT 0.0000,
  `foc_unit` varchar(5) DEFAULT NULL,
  `Cost` decimal(10,4) DEFAULT 0.0000,
  `UnitIndex` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `subsidiary`
--

CREATE TABLE `subsidiary` (
  `comp_id` int(4) NOT NULL,
  `SUB_CODE` varchar(10) DEFAULT NULL,
  `SUB_NAME` varchar(50) DEFAULT NULL,
  `ADDRESS` varchar(50) DEFAULT NULL,
  `EMAIL` varchar(50) DEFAULT NULL,
  `PLACE` varchar(30) DEFAULT NULL,
  `PHONE` varchar(30) DEFAULT NULL,
  `MOBILE` varchar(30) DEFAULT NULL,
  `FAX` varchar(30) DEFAULT NULL,
  `CONT_NAME` varchar(50) DEFAULT NULL,
  `CONT_PHONE` varchar(30) DEFAULT NULL,
  `AREA_CODE` varchar(10) DEFAULT NULL,
  `Area_Name` varchar(30) DEFAULT NULL,
  `WEB` varchar(50) DEFAULT NULL,
  `SMAN_CODE` varchar(10) DEFAULT NULL,
  `SUB_TYPE` varchar(1) DEFAULT NULL,
  `pkey` int(11) NOT NULL,
  `Inactive` bit(1) DEFAULT b'0',
  `edit_time` int(12) DEFAULT 0,
  `Reg_No1` varchar(25) DEFAULT NULL,
  `App_Pass` varchar(10) DEFAULT NULL,
  `AppID1` varchar(25) DEFAULT NULL,
  `AppID2` varchar(25) DEFAULT NULL,
  `AppID3` varchar(25) DEFAULT NULL,
  `price_level` tinyint(1) DEFAULT 1 not null
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `web_offers`
--

CREATE TABLE `web_offers` (
  `comp_id` int(4) NOT NULL,
  `offer_code` varchar(10) DEFAULT NULL,
  `offer_desc` varchar(500) DEFAULT NULL,
  `start_date` datetime DEFAULT NULL,
  `pkey` int(11) DEFAULT NULL,
  `end_date` datetime DEFAULT NULL,
  `web_entry_no` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `appsettings`
--
ALTER TABLE `appsettings`
  ADD PRIMARY KEY (`pkey`);

--
-- Indexes for table `client_requests`
--
ALTER TABLE `client_requests`
  ADD PRIMARY KEY (`request_id`);

--
-- Indexes for table `company`
--
ALTER TABLE `company`
  ADD PRIMARY KEY (`comp_id`),
  ADD UNIQUE KEY `compcd` (`comp_code`);

--
-- Indexes for table `mobile_clients`
--
ALTER TABLE `mobile_clients`
  ADD PRIMARY KEY (`pkey`);

--
-- Indexes for table `products`
--
ALTER TABLE `products`
  ADD PRIMARY KEY (`pkey`),
  ADD KEY `edtime` (`edit_time`) USING BTREE;
  ADD KEY `photedtime` (`photo_edit_time`) USING BTREE;
  ADD KEY `prdcode` (`prod_code`) USING BTREE;
--
-- Indexes for table `receipts`
--
ALTER TABLE `receipts`
  ADD PRIMARY KEY (`entry_no`);

--
-- Indexes for table `receipts_bills`
--
ALTER TABLE `receipts_bills`
  ADD KEY `entry_no` (`entry_no`) USING BTREE;

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`pkey`),
  ADD KEY `sleno` (`Entry_no`);

--
-- Indexes for table `sales_return`
--
ALTER TABLE `sales_return`
  ADD PRIMARY KEY (`pkey`),
  ADD KEY `sreno` (`Entry_no`);

--
-- Indexes for table `sales_return_sub`
--
ALTER TABLE `sales_return_sub`
  ADD PRIMARY KEY (`pkey`);

--
-- Indexes for table `sales_sub`
--
ALTER TABLE `sales_sub`
  ADD PRIMARY KEY (`pkey`);

--
-- Indexes for table `sale_order`
--
ALTER TABLE `sale_order`
  ADD PRIMARY KEY (`pkey`);

--
-- Indexes for table `sale_order_sub`
--
ALTER TABLE `sale_order_sub`
  ADD KEY `soenno` (`Entry_no`);

--
-- Indexes for table `stock_issue`
--
ALTER TABLE `stock_issue`
  ADD PRIMARY KEY (`pkey`),
  ADD KEY `stiss` (`Entry_No`),
  ADD KEY `ccodentx` (`Counter_Code`),
  ADD KEY `synctimentx` (`sync_time`) USING BTREE;

--
-- Indexes for table `stock_issue_sub`
--
ALTER TABLE `stock_issue_sub`
  ADD KEY `sieno` (`Entry_no`);

--
-- Indexes for table `stock_return`
--
ALTER TABLE `stock_return`
  ADD PRIMARY KEY (`pkey`),
  ADD KEY `stiss` (`Entry_No`),
  ADD KEY `ccodentx` (`Counter_Code`),
  ADD KEY `synctimentx` (`sync_time`) USING BTREE;

--
-- Indexes for table `stock_return_sub`
--
ALTER TABLE `stock_return_sub`
  ADD KEY `sieno` (`Entry_no`);

--
-- Indexes for table `subsidiary`
--
ALTER TABLE `subsidiary`
  ADD PRIMARY KEY (`pkey`);

--
-- Indexes for table `web_offers`
--
ALTER TABLE `web_offers`
  ADD PRIMARY KEY (`web_entry_no`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `appsettings`
--
ALTER TABLE `appsettings`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `client_requests`
--
ALTER TABLE `client_requests`
  MODIFY `request_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `company`
--
ALTER TABLE `company`
  MODIFY `comp_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `mobile_clients`
--
ALTER TABLE `mobile_clients`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `products`
--
ALTER TABLE `products`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `receipts`
--
ALTER TABLE `receipts`
  MODIFY `entry_no` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sales_return`
--
ALTER TABLE `sales_return`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sales_return_sub`
--
ALTER TABLE `sales_return_sub`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sales_sub`
--
ALTER TABLE `sales_sub`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `sale_order`
--
ALTER TABLE `sale_order`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stock_issue`
--
ALTER TABLE `stock_issue`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stock_return`
--
ALTER TABLE `stock_return`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `subsidiary`
--
ALTER TABLE `subsidiary`
  MODIFY `pkey` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `web_offers`
--
ALTER TABLE `web_offers`
  MODIFY `web_entry_no` int(10) NOT NULL AUTO_INCREMENT;
COMMIT;

/*!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 */;
