-- phpMyAdmin SQL Dump
-- version 4.9.7
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Feb 08, 2023 at 01:18 PM
-- Server version: 10.3.37-MariaDB-cll-lve
-- PHP Version: 7.4.33

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: `nsdsoftn_db4`
--

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

--
-- Table structure for table `cstledger4`
--

CREATE TABLE `cstledger4` (
  `ID` int(11) NOT NULL,
  `CompanyID` int(11) NOT NULL,
  `cstCode` int(11) NOT NULL,
  `cstName` varchar(60) NOT NULL,
  `tDate` date NOT NULL,
  `VoucherNo` varchar(30) NOT NULL,
  `TransactionType` varchar(100) NOT NULL,
  `Debit` double NOT NULL,
  `Credit` double NOT NULL,
  `Balance` double NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `cstorder4`
--

CREATE TABLE `cstorder4` (
  `ID` int(11) NOT NULL,
  `ordDate` varchar(20) NOT NULL,
  `cstCode` int(10) NOT NULL,
  `cstName` varchar(60) NOT NULL,
  `OrderAmt` double NOT NULL,
  `UserID` varchar(20) NOT NULL,
  `Status` varchar(20) NOT NULL,
  `CompanyID` int(11) NOT NULL,
  `ordTime` varchar(30) NOT NULL,
  `warehouseid` int(11) NOT NULL,
  `invdisc` double NOT NULL,
  `invnetamt` double NOT NULL,
  `invpaid` double NOT NULL,
  `uorderno` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `cstorderdetail4`
--

CREATE TABLE `cstorderdetail4` (
  `id` int(10) NOT NULL,
  `PrdCode` int(10) NOT NULL,
  `prdName` varchar(60) NOT NULL,
  `OrderAmt` double NOT NULL,
  `OrderQty` double NOT NULL,
  `UserID` varchar(20) NOT NULL,
  `CompanyID` int(11) NOT NULL,
  `orderbns` double NOT NULL,
  `orderdisc` double NOT NULL,
  `orderfrate` double NOT NULL,
  `tp` double NOT NULL,
  `warehouseid` int(11) NOT NULL,
  `discamt` double NOT NULL,
  `uorderno` int(11) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `cstpayments4`
--

CREATE TABLE `cstpayments4` (
  `ID` int(11) NOT NULL,
  `CompanyID` int(11) NOT NULL,
  `pDate` varchar(20) NOT NULL,
  `cstCode` int(11) NOT NULL,
  `cstName` varchar(60) NOT NULL,
  `PaidAmt` double NOT NULL,
  `UserID` varchar(20) NOT NULL,
  `pTime` varchar(30) NOT NULL,
  `warehouseid` int(11) NOT NULL,
  `uorderno` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `tbarea4`
--

CREATE TABLE `tbarea4` (
  `id` int(10) NOT NULL,
  `CstArea` varchar(60) NOT NULL,
  `CompanyID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `tbcompany4`
--

CREATE TABLE `tbcompany4` (
  `ID` int(11) NOT NULL DEFAULT 0,
  `CompanyID` int(11) NOT NULL,
  `CompanyTitle` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `tbcstrates4`
--

CREATE TABLE `tbcstrates4` (
  `ID` bigint(20) NOT NULL,
  `cstcode` int(11) NOT NULL,
  `prdcode` int(11) NOT NULL,
  `sprice` varchar(100) NOT NULL,
  `lastsdate` varchar(100) NOT NULL,
  `companyid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `tbcustomers4`
--

CREATE TABLE `tbcustomers4` (
  `ID` int(10) NOT NULL DEFAULT 0,
  `CstCode` int(10) NOT NULL,
  `CstName` varchar(60) NOT NULL,
  `CstCity` varchar(60) NOT NULL,
  `CstArea` varchar(60) NOT NULL,
  `CompanyID` int(11) NOT NULL,
  `CstType` varchar(150) DEFAULT '-',
  `salemanid` int(11) NOT NULL,
  `cLimit` varchar(10) NOT NULL,
  `balance` int(11) NOT NULL,
  `customertype` varchar(30) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `tbproducts4`
--

CREATE TABLE `tbproducts4` (
  `ID` int(11) NOT NULL DEFAULT 0,
  `PrdCode` int(10) NOT NULL,
  `PrdName` varchar(60) NOT NULL,
  `PrdCompany` varchar(60) NOT NULL,
  `PrdTP` double NOT NULL,
  `CompanyID` int(11) NOT NULL,
  `Stock` varchar(30) NOT NULL,
  `mintp` double NOT NULL,
  `warehouseid` int(11) NOT NULL,
  `stockqty` double NOT NULL,
  `units` varchar(20) NOT NULL,
  `wsRate` double NOT NULL,
  `lastprate` varchar(60) DEFAULT '0',
  `lastpcost` varchar(60) DEFAULT '0',
  `synced` tinyint(4) NOT NULL DEFAULT 0
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `tbusers4`
--

CREATE TABLE `tbusers4` (
  `id` int(11) DEFAULT NULL,
  `username` varchar(10) NOT NULL,
  `password` varchar(10) NOT NULL,
  `acstatus` varchar(20) NOT NULL,
  `sno` int(11) NOT NULL,
  `salemanid` varchar(11) NOT NULL,
  `companyid` int(11) NOT NULL,
  `allowbns` varchar(2) NOT NULL,
  `allowdisc` varchar(2) NOT NULL,
  `allowfrate` varchar(2) NOT NULL,
  `warehouseid` int(11) NOT NULL,
  `showpurchaserate` varchar(2) NOT NULL DEFAULT 'N'
) ENGINE=MyISAM DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

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

--
-- Table structure for table `tbwarehouse4`
--

CREATE TABLE `tbwarehouse4` (
  `warehouseid` int(11) NOT NULL,
  `warehousename` varchar(50) NOT NULL,
  `CompanyID` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `cstorder4`
--
ALTER TABLE `cstorder4`
  ADD PRIMARY KEY (`uorderno`);

--
-- Indexes for table `cstorderdetail4`
--
ALTER TABLE `cstorderdetail4`
  ADD PRIMARY KEY (`uorderno`);

--
-- Indexes for table `cstpayments4`
--
ALTER TABLE `cstpayments4`
  ADD PRIMARY KEY (`uorderno`);

--
-- Indexes for table `tbcstrates4`
--
ALTER TABLE `tbcstrates4`
  ADD UNIQUE KEY `ID` (`ID`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `cstorder4`
--
ALTER TABLE `cstorder4`
  MODIFY `uorderno` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cstorderdetail4`
--
ALTER TABLE `cstorderdetail4`
  MODIFY `uorderno` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `cstpayments4`
--
ALTER TABLE `cstpayments4`
  MODIFY `uorderno` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `tbcstrates4`
--
ALTER TABLE `tbcstrates4`
  MODIFY `ID` bigint(20) 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 */;
