-- https://www.phpmyadmin.net/
--

START TRANSACTION;



--
-- Database: `almadinapfdb`
--

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

--
-- Table structure for table `accreg`
--

CREATE TABLE `accreg` (
  `Trid` int(11) NOT NULL,
  `accid` int(11) NOT NULL DEFAULT 0,
  `accno` varchar(100) NOT NULL DEFAULT '',
  `groupid` int(11) NOT NULL DEFAULT 0,
  `comid` int(11) NOT NULL DEFAULT 0,
  `accname` varchar(250) NOT NULL DEFAULT '',
  `urduname` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `address` varchar(200) NOT NULL DEFAULT '',
  `phone` varchar(50) NOT NULL DEFAULT '',
  `city` varchar(100) NOT NULL DEFAULT '',
  `cnic` varchar(15) NOT NULL DEFAULT '',
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `pay` int(11) NOT NULL DEFAULT 0,
  `accid2` int(11) NOT NULL DEFAULT 0,
  `shortname` varchar(200) NOT NULL DEFAULT '',
  `medpercent` int(11) NOT NULL DEFAULT 0,
  `vaccinepercent` int(11) NOT NULL DEFAULT 0,
  `ownerId` int(11) NOT NULL DEFAULT 0,
  `accTypeDrCr` int(11) NOT NULL DEFAULT 0,
  `activityacc` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `accreg`
--

INSERT INTO `accreg` (`Trid`, `accid`, `accno`, `groupid`, `comid`, `accname`, `urduname`, `address`, `phone`, `city`, `cnic`, `dated`, `pay`, `accid2`, `shortname`, `medpercent`, `vaccinepercent`, `ownerId`, `accTypeDrCr`, `activityacc`) VALUES
(1, 1, '1', 4, 0, 'PURCHASE', 'Purchase', '', '----', '', '', '2019-12-29', 0, 0, '', 0, 0, 0, 0, 0),
(2, 2, '2', 2, 0, 'SALES', 'Sales', '---', '---', '', '', '2019-12-29', 0, 0, '', 0, 0, 0, 0, 0),
(3, 3, '3', 7, 0, 'CASH BOOK', 'Cash Book', '', '----', '', '', '2019-12-29', 0, 0, '', 0, 0, 0, 0, 0),
(4, 4, '4', 2, 0, 'Sales Return', 'Sales Return', '---', '---', '', '', '2019-12-29', 0, 0, '', 0, 0, 0, 0, 0);

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

--
-- Table structure for table `aging`
--

CREATE TABLE `aging` (
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `vno` int(11) NOT NULL DEFAULT 0,
  `entrytype` varchar(100) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '',
  `accid` int(11) NOT NULL DEFAULT 0,
  `qty` double NOT NULL DEFAULT 0,
  `rate` double NOT NULL DEFAULT 0,
  `debit` double NOT NULL DEFAULT 0,
  `credit` double NOT NULL DEFAULT 0,
  `duedate` date NOT NULL DEFAULT '0000-00-00',
  `ageday` int(11) NOT NULL DEFAULT 0,
  `status` int(11) NOT NULL DEFAULT 0,
  `trid` int(11) NOT NULL,
  `rcvtype` int(11) NOT NULL DEFAULT 0,
  `rcvvno` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

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

--
-- Table structure for table `broilertransfer`
--

CREATE TABLE `broilertransfer` (
  `vno` int(11) NOT NULL DEFAULT 0,
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `supid` int(11) NOT NULL DEFAULT 0,
  `accid` int(11) NOT NULL DEFAULT 0,
  `itemid` int(11) NOT NULL DEFAULT 0,
  `vrate` int(11) NOT NULL DEFAULT 0,
  `crate` int(11) NOT NULL DEFAULT 0,
  `qty` int(11) NOT NULL DEFAULT 0,
  `kat` int(11) NOT NULL DEFAULT 0,
  `refno` varchar(100) NOT NULL DEFAULT '',
  `trid` int(11) NOT NULL,
  `status` varchar(100) NOT NULL DEFAULT '',
  `posted` varchar(50) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `category`
--

CREATE TABLE `category` (
  `catid` int(11) NOT NULL,
  `catname` varchar(200) NOT NULL,
  `trid` int(11) NOT NULL,
  `disc` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `category`
--

INSERT INTO `category` (`catid`, `catname`, `trid`, `disc`) VALUES
(1, 'Broiler', 1, 0),
(2, 'Feed', 2, 0),
(3, 'Medicine', 3, 0),
(4, 'Chicks', 4, 0);

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

--
-- Table structure for table `chartacc`
--

CREATE TABLE `chartacc` (
  `chartid` int(11) NOT NULL,
  `chartname` varchar(100) NOT NULL,
  `charttype` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `chartacc`
--

INSERT INTO `chartacc` (`chartid`, `chartname`, `charttype`) VALUES
(1, 'Capital', 'CA'),
(2, 'Assets', 'CA'),
(3, 'Expenses', 'CA'),
(4, 'Liabilities', 'CA'),
(5, 'Income & Revenue', 'CA'),
(6, 'Other Account', 'CA');

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

--
-- Table structure for table `chicksinout`
--

CREATE TABLE `chicksinout` (
  `vno` int(11) NOT NULL DEFAULT 0,
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `supid` int(11) NOT NULL DEFAULT 0,
  `accid` int(11) NOT NULL DEFAULT 0,
  `itemid` int(11) NOT NULL DEFAULT 0,
  `vrate` int(11) NOT NULL DEFAULT 0,
  `srate` int(11) NOT NULL DEFAULT 0,
  `qty` int(11) NOT NULL DEFAULT 0,
  `kat` int(11) NOT NULL DEFAULT 0,
  `refno` varchar(100) NOT NULL DEFAULT '0',
  `trid` int(11) NOT NULL,
  `status` varchar(100) NOT NULL DEFAULT '',
  `posted` varchar(100) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `cityreg`
--

CREATE TABLE `cityreg` (
  `cityid` int(11) NOT NULL,
  `cityname` varchar(250) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cityreg`
--

INSERT INTO `cityreg` (`cityid`, `cityname`) VALUES
(1, 'Khanpur'),
(2, 'RYK'),
(3, 'Liaqatpur'),
(8, 'Feroza'),
(9, '123'),
(10, 'Khanpur2'),
(11, 'Feroza'),
(12, 'Feroza'),
(13, 'Khanpur2'),
(14, 'Khanpur2'),
(15, 'Rajan pur'),
(16, 'Feroza');

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

--
-- Table structure for table `cityreg2`
--

CREATE TABLE `cityreg2` (
  `acid` int(11) NOT NULL,
  `accname` varchar(200) NOT NULL,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `cityreg2`
--

INSERT INTO `cityreg2` (`acid`, `accname`, `trid`) VALUES
(1, 'Khanpur', 1),
(2, 'RYK', 2),
(3, 'Liaqatpur', 3),
(8, 'Feroza', 4),
(9, '123', 5),
(10, 'Khanpur2', 6),
(11, 'Feroza', 7),
(12, 'Feroza', 8),
(13, 'Khanpur2', 9),
(14, 'Khanpur2', 10),
(15, 'Rajan pur', 11),
(16, 'Feroza', 12);

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

--
-- Table structure for table `feedinout`
--

CREATE TABLE `feedinout` (
  `vno` int(11) NOT NULL DEFAULT 0,
  `supid` int(11) NOT NULL DEFAULT 0,
  `custid` int(11) NOT NULL DEFAULT 0,
  `qty` int(11) NOT NULL DEFAULT 0,
  `srate` int(11) NOT NULL DEFAULT 0,
  `crate` int(11) NOT NULL DEFAULT 0,
  `itemid` int(11) NOT NULL DEFAULT 0,
  `comid` int(11) NOT NULL DEFAULT 0,
  `smid` int(11) NOT NULL DEFAULT 0,
  `userid` int(11) NOT NULL DEFAULT 0,
  `biltyexp` varchar(100) NOT NULL DEFAULT '0',
  `cariageexp` int(11) NOT NULL DEFAULT 0,
  `refno` varchar(100) NOT NULL DEFAULT '',
  `refno2` varchar(200) NOT NULL DEFAULT '',
  `disc` int(11) NOT NULL DEFAULT 0,
  `posted` varchar(100) NOT NULL DEFAULT '',
  `status` varchar(100) NOT NULL DEFAULT '',
  `trid` int(11) NOT NULL,
  `dated` date NOT NULL DEFAULT '0000-00-00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `feedrate`
--

CREATE TABLE `feedrate` (
  `accid` int(11) NOT NULL,
  `itemid` int(11) NOT NULL,
  `suprate` float NOT NULL,
  `custrate` float NOT NULL,
  `itemname` varchar(200) NOT NULL,
  `fullrate` int(11) NOT NULL,
  `trid` int(11) NOT NULL,
  `sorting` int(11) NOT NULL,
  `addrate` int(11) NOT NULL,
  `percent` double NOT NULL,
  `shedpercent` int(11) NOT NULL,
  `discrate` int(11) NOT NULL,
  `discAfterPercent` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `feedslret`
--

CREATE TABLE `feedslret` (
  `vno` int(11) NOT NULL,
  `supid` int(11) NOT NULL,
  `custid` int(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `srate` int(11) NOT NULL,
  `crate` int(11) NOT NULL,
  `itemid` int(11) NOT NULL,
  `comid` int(11) NOT NULL,
  `biltyexp` int(11) NOT NULL,
  `refno` int(11) NOT NULL,
  `posted` varchar(100) NOT NULL,
  `trid` int(11) NOT NULL,
  `dated` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `groupreg`
--

CREATE TABLE `groupreg` (
  `chartid` int(11) NOT NULL,
  `groupid` int(11) NOT NULL,
  `groupname` varchar(100) NOT NULL,
  `gtype` varchar(100) NOT NULL,
  `groupid2` int(11) NOT NULL,
  `Own1` int(11) NOT NULL,
  `Own2` int(11) NOT NULL,
  `Own1Perc` int(11) NOT NULL,
  `grouptype` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `groupreg`
--

INSERT INTO `groupreg` (`chartid`, `groupid`, `groupname`, `gtype`, `groupid2`, `Own1`, `Own2`, `Own1Perc`, `grouptype`) VALUES
(2, 1, 'CUSTOMER', '3', 0, 0, 0, 0, 0),
(5, 2, 'Sales', '5', 0, 0, 0, 0, 0),
(3, 4, 'Purchase', '3', 0, 0, 0, 0, 0),
(2, 7, 'Cash in Hand', '2', 0, 0, 0, 0, 0),
(3, 8, 'Office Expenses', '3', 0, 0, 0, 0, 0),
(2, 9, 'Banks', '2', 0, 0, 0, 0, 0);

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

--
-- Table structure for table `itemreg`
--

CREATE TABLE `itemreg` (
  `dated` date NOT NULL,
  `itemid` int(11) NOT NULL,
  `itemcode` varchar(100) NOT NULL,
  `itemname` varchar(200) NOT NULL,
  `rate` int(11) NOT NULL,
  `urdu` varchar(200) NOT NULL,
  `srate` int(11) NOT NULL,
  `description` varchar(250) NOT NULL,
  `ministock` int(11) NOT NULL,
  `boxqty` int(11) NOT NULL,
  `catid` int(11) NOT NULL,
  `brid` int(11) NOT NULL,
  `retailrate` int(11) NOT NULL,
  `vaccine` int(11) NOT NULL,
  `activeItem` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `itemreg`
--

INSERT INTO `itemreg` (`dated`, `itemid`, `itemcode`, `itemname`, `rate`, `urdu`, `srate`, `description`, `ministock`, `boxqty`, `catid`, `brid`, `retailrate`, `vaccine`, `activeItem`) VALUES
('2019-12-20', 1, '1', 'Broiler', 0, '', 0, 'Kg', 0, 0, 1, 0, 0, 0, 0),
('2019-12-30', 2, '2', 'Chicks', 0, '', 0, 'Pcs', 0, 0, 4, 0, 0, 0, 0);

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

--
-- Table structure for table `jvvoucher`
--

CREATE TABLE `jvvoucher` (
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `vno` int(11) NOT NULL DEFAULT 0,
  `craccid` int(11) NOT NULL DEFAULT 0,
  `draccid` int(11) NOT NULL DEFAULT 0,
  `description` varchar(500) NOT NULL DEFAULT '',
  `amount` int(11) NOT NULL DEFAULT 0,
  `msg` varchar(500) NOT NULL DEFAULT '',
  `posted` varchar(100) NOT NULL DEFAULT '',
  `smid` int(11) NOT NULL DEFAULT 0,
  `userid` int(11) NOT NULL DEFAULT 0,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ledger`
--

CREATE TABLE `ledger` (
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `accid` int(11) NOT NULL DEFAULT 0,
  `comid` int(11) NOT NULL DEFAULT 0,
  `userid` int(11) NOT NULL DEFAULT 0,
  `smid` int(11) NOT NULL DEFAULT 0,
  `description` varchar(500) NOT NULL DEFAULT '',
  `vno` int(11) NOT NULL DEFAULT 0,
  `refno` varchar(50) NOT NULL DEFAULT '',
  `entrytype` varchar(50) NOT NULL DEFAULT '',
  `debit` int(11) NOT NULL DEFAULT 0,
  `credit` int(11) NOT NULL DEFAULT 0,
  `qty` int(11) NOT NULL DEFAULT 0,
  `bns` int(11) NOT NULL DEFAULT 0,
  `rate` float(13,2) NOT NULL DEFAULT 0.00,
  `disc` int(11) NOT NULL DEFAULT 0,
  `trid` int(11) NOT NULL,
  `itemid` int(11) NOT NULL DEFAULT 0,
  `accid2` int(11) NOT NULL DEFAULT 0,
  `flockNo` int(11) NOT NULL DEFAULT 0,
  `dated2` date NOT NULL DEFAULT '0000-00-00'
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `monthlyreport`
--

CREATE TABLE `monthlyreport` (
  `dated` date NOT NULL,
  `accid` int(11) NOT NULL DEFAULT 0,
  `debit` int(11) NOT NULL DEFAULT 0,
  `credit` int(11) NOT NULL DEFAULT 0,
  `picname` varchar(250) NOT NULL DEFAULT '',
  `picaddress` varchar(500) NOT NULL DEFAULT '',
  `trid` int(11) NOT NULL,
  `flockno` int(11) NOT NULL DEFAULT 0,
  `trvno` int(11) NOT NULL DEFAULT 0,
  `shedname` varchar(500) NOT NULL DEFAULT '',
  `charityamt` int(11) NOT NULL DEFAULT 0,
  `ownerId` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `preflkdtl`
--

CREATE TABLE `preflkdtl` (
  `accid` int(11) NOT NULL DEFAULT 0,
  `flockno` int(11) NOT NULL DEFAULT 0,
  `trvno` int(11) NOT NULL DEFAULT 0,
  `sorting` int(11) NOT NULL DEFAULT 0,
  `expenseid` int(11) NOT NULL DEFAULT 0,
  `debit` int(11) NOT NULL DEFAULT 0,
  `credit` int(11) NOT NULL DEFAULT 0,
  `Description` varchar(500) NOT NULL DEFAULT '',
  `Trid` int(11) NOT NULL,
  `chkqty` int(11) NOT NULL DEFAULT 0,
  `fdqty` varchar(100) NOT NULL DEFAULT '',
  `weight` varchar(100) NOT NULL DEFAULT '',
  `dr0cr1` int(11) NOT NULL DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `purchase`
--

CREATE TABLE `purchase` (
  `dated` date NOT NULL,
  `Invono` varchar(50) NOT NULL,
  `userid` int(11) NOT NULL,
  `comid` int(11) NOT NULL,
  `accid` int(11) NOT NULL,
  `saletx` int(11) NOT NULL,
  `totalamt` int(11) NOT NULL,
  `exp` int(11) NOT NULL,
  `cariage` int(11) NOT NULL,
  `def` int(11) NOT NULL,
  `prid` int(11) NOT NULL,
  `netamt` int(11) NOT NULL,
  `payment` int(11) NOT NULL,
  `partybal` int(11) NOT NULL,
  `posted` varchar(11) NOT NULL,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `purchasedetail`
--

CREATE TABLE `purchasedetail` (
  `prid` int(11) NOT NULL,
  `itemid` int(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `rate` int(11) NOT NULL,
  `cost` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `saleret`
--

CREATE TABLE `saleret` (
  `vno` int(11) NOT NULL,
  `dated` date NOT NULL,
  `slrid` int(11) NOT NULL,
  `billno` varchar(100) NOT NULL,
  `userid` int(11) NOT NULL,
  `comid` int(11) NOT NULL,
  `smid` int(11) NOT NULL,
  `accid` int(11) NOT NULL,
  `netamt` int(11) NOT NULL,
  `payment` int(11) NOT NULL,
  `posted` varchar(50) NOT NULL,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

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

CREATE TABLE `sales` (
  `dated` date NOT NULL,
  `saleid` int(11) NOT NULL,
  `billno` varchar(50) NOT NULL,
  `userid` int(11) NOT NULL,
  `comid` int(11) NOT NULL,
  `smid` int(11) NOT NULL,
  `accid` int(11) NOT NULL,
  `saletx` int(11) NOT NULL,
  `invodisc` int(11) NOT NULL,
  `netamt` int(11) NOT NULL,
  `received` int(11) NOT NULL,
  `partybal` int(11) NOT NULL,
  `status` varchar(100) NOT NULL,
  `posted` varchar(100) NOT NULL,
  `trid` int(11) NOT NULL,
  `msg` varchar(150) NOT NULL,
  `days` int(11) NOT NULL,
  `otherexp` int(11) NOT NULL,
  `description` varchar(250) NOT NULL,
  `vehical` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `setrate`
--

CREATE TABLE `setrate` (
  `accid` int(11) NOT NULL DEFAULT 0,
  `itemid` int(11) NOT NULL DEFAULT 0,
  `prate` float(11,2) NOT NULL DEFAULT 0.00,
  `srate` float(11,2) NOT NULL DEFAULT 0.00,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `stockledger`
--

CREATE TABLE `stockledger` (
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `accid` int(11) NOT NULL DEFAULT 0,
  `userid` int(11) NOT NULL DEFAULT 0,
  `smid` int(11) NOT NULL DEFAULT 0,
  `vno` int(11) NOT NULL DEFAULT 0,
  `refno` varchar(50) NOT NULL DEFAULT '',
  `invoiceno` varchar(50) NOT NULL DEFAULT '',
  `srno` int(11) NOT NULL DEFAULT 0,
  `itemid` int(11) NOT NULL DEFAULT 0,
  `stockin` int(11) NOT NULL DEFAULT 0,
  `bnsin` int(11) NOT NULL DEFAULT 0,
  `ratein` int(11) NOT NULL DEFAULT 0,
  `stockout` int(11) NOT NULL DEFAULT 0,
  `bnsout` int(11) NOT NULL DEFAULT 0,
  `rateout` int(11) NOT NULL DEFAULT 0,
  `itemdisc` int(11) NOT NULL DEFAULT 0,
  `saletax` int(11) NOT NULL DEFAULT 0,
  `cariage` int(11) NOT NULL DEFAULT 0,
  `exps` int(11) NOT NULL DEFAULT 0,
  `def` int(11) NOT NULL DEFAULT 0,
  `costin` int(11) NOT NULL DEFAULT 0,
  `costout` int(11) NOT NULL DEFAULT 0,
  `dateexp` int(11) NOT NULL DEFAULT 0,
  `batch` int(11) NOT NULL DEFAULT 0,
  `trid` int(11) NOT NULL,
  `accid1` int(11) NOT NULL DEFAULT 0,
  `dated1` int(11) NOT NULL DEFAULT 0,
  `refno1` varchar(50) NOT NULL DEFAULT ''
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `trvdetail`
--

CREATE TABLE `trvdetail` (
  `tvno` int(11) NOT NULL,
  `dated` date NOT NULL,
  `accid` int(11) NOT NULL,
  `description` varchar(250) NOT NULL,
  `debit` int(11) NOT NULL,
  `credit` int(11) NOT NULL,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `trvoucher`
--

CREATE TABLE `trvoucher` (
  `tvno` int(11) NOT NULL,
  `accid` int(11) NOT NULL,
  `dated` date NOT NULL,
  `amount` int(11) NOT NULL,
  `description` varchar(250) NOT NULL,
  `trid` int(11) NOT NULL,
  `status` varchar(50) NOT NULL,
  `posted` varchar(50) NOT NULL,
  `dated2` date NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `unitreg`
--

CREATE TABLE `unitreg` (
  `unitid` int(11) NOT NULL,
  `unitname` varchar(100) NOT NULL,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `unitreg`
--

INSERT INTO `unitreg` (`unitid`, `unitname`, `trid`) VALUES
(1, 'Kg', 1),
(2, 'Litter', 2),
(3, 'Cane', 3),
(4, 'Bag', 4),
(5, 'Gm', 5),
(6, 'Dose', 6),
(7, 'Vac', 7),
(8, 'Balti', 8),
(9, 'Mg', 9),
(10, 'Pack', 10),
(11, 'Pcs', 11),
(12, ' ', 12),
(13, 'Tablet', 13);

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

--
-- Table structure for table `voucher`
--

CREATE TABLE `voucher` (
  `dated` date NOT NULL DEFAULT '0000-00-00',
  `vno` int(11) NOT NULL DEFAULT 0,
  `accid` int(11) NOT NULL DEFAULT 0,
  `comid` int(11) NOT NULL DEFAULT 0,
  `userid` int(11) NOT NULL DEFAULT 0,
  `description` varchar(500) NOT NULL DEFAULT '',
  `refno` varchar(50) NOT NULL DEFAULT '',
  `debit` int(11) NOT NULL DEFAULT 0,
  `credit` int(11) NOT NULL DEFAULT 0,
  `trid` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `accreg`
--
ALTER TABLE `accreg`
  ADD PRIMARY KEY (`Trid`);

--
-- Indexes for table `aging`
--
ALTER TABLE `aging`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `broilertransfer`
--
ALTER TABLE `broilertransfer`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `category`
--
ALTER TABLE `category`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `chicksinout`
--
ALTER TABLE `chicksinout`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `feedinout`
--
ALTER TABLE `feedinout`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `feedrate`
--
ALTER TABLE `feedrate`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `feedslret`
--
ALTER TABLE `feedslret`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `groupreg`
--
ALTER TABLE `groupreg`
  ADD PRIMARY KEY (`groupid`);

--
-- Indexes for table `itemreg`
--
ALTER TABLE `itemreg`
  ADD PRIMARY KEY (`itemid`);

--
-- Indexes for table `jvvoucher`
--
ALTER TABLE `jvvoucher`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `ledger`
--
ALTER TABLE `ledger`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `purchase`
--
ALTER TABLE `purchase`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `saleret`
--
ALTER TABLE `saleret`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `sales`
--
ALTER TABLE `sales`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `setrate`
--
ALTER TABLE `setrate`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `stockledger`
--
ALTER TABLE `stockledger`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `trvdetail`
--
ALTER TABLE `trvdetail`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `trvoucher`
--
ALTER TABLE `trvoucher`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `unitreg`
--
ALTER TABLE `unitreg`
  ADD PRIMARY KEY (`trid`);

--
-- Indexes for table `voucher`
--
ALTER TABLE `voucher`
  ADD PRIMARY KEY (`trid`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `accreg`
--
ALTER TABLE `accreg`
  MODIFY `Trid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=917;

--
-- AUTO_INCREMENT for table `aging`
--
ALTER TABLE `aging`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `broilertransfer`
--
ALTER TABLE `broilertransfer`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `category`
--
ALTER TABLE `category`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;

--
-- AUTO_INCREMENT for table `chicksinout`
--
ALTER TABLE `chicksinout`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feedinout`
--
ALTER TABLE `feedinout`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feedrate`
--
ALTER TABLE `feedrate`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `feedslret`
--
ALTER TABLE `feedslret`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `groupreg`
--
ALTER TABLE `groupreg`
  MODIFY `groupid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=43;

--
-- AUTO_INCREMENT for table `itemreg`
--
ALTER TABLE `itemreg`
  MODIFY `itemid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=155;

--
-- AUTO_INCREMENT for table `jvvoucher`
--
ALTER TABLE `jvvoucher`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ledger`
--
ALTER TABLE `ledger`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `purchase`
--
ALTER TABLE `purchase`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `saleret`
--
ALTER TABLE `saleret`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `setrate`
--
ALTER TABLE `setrate`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `stockledger`
--
ALTER TABLE `stockledger`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `trvdetail`
--
ALTER TABLE `trvdetail`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `trvoucher`
--
ALTER TABLE `trvoucher`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;

--
-- AUTO_INCREMENT for table `unitreg`
--
ALTER TABLE `unitreg`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=14;

--
-- AUTO_INCREMENT for table `voucher`
--
ALTER TABLE `voucher`
  MODIFY `trid` int(11) NOT NULL AUTO_INCREMENT;
COMMIT;

