-- phpMyAdmin SQL Dump
-- version 4.8.5
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Dec 06, 2024 at 04:38 PM
-- Server version: 10.1.38-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: `citibuilders`
--

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

--
-- Table structure for table `branch`
--

CREATE TABLE `branch` (
  `branch_id` int(11) NOT NULL,
  `branch_name` varchar(50) NOT NULL,
  `branch_address` varchar(100) NOT NULL,
  `branch_contact` varchar(50) NOT NULL,
  `skin` varchar(15) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `branch`
--

INSERT INTO `branch` (`branch_id`, `branch_name`, `branch_address`, `branch_contact`, `skin`) VALUES
(1, 'GLASS DEPARTMENT', 'MASBATE CITY', '090998278', 'red'),
(2, 'ROOFING DEPARTMENT', 'MASBATE CITY', '98786786', 'blue');

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

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

CREATE TABLE `category` (
  `cat_id` int(11) NOT NULL,
  `cat_name` varchar(30) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

INSERT INTO `category` (`cat_id`, `cat_name`) VALUES
(5, 'ROOF'),
(6, 'GLASS'),
(7, 'GLASS AND ALUMINUM'),
(8, 'ALUMINUM'),
(9, 'ACCESOSRIES');

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

--
-- Table structure for table `customer`
--

CREATE TABLE `customer` (
  `cust_id` int(11) NOT NULL,
  `cust_first` varchar(50) NOT NULL,
  `cust_last` varchar(30) NOT NULL,
  `cust_address` varchar(100) NOT NULL,
  `cust_contact` varchar(30) NOT NULL,
  `balance` decimal(10,2) NOT NULL,
  `cust_pic` varchar(300) NOT NULL,
  `bday` date NOT NULL,
  `nickname` varchar(30) NOT NULL,
  `house_status` varchar(30) NOT NULL,
  `years` varchar(20) NOT NULL,
  `rent` varchar(10) NOT NULL,
  `emp_name` varchar(100) NOT NULL,
  `emp_no` varchar(30) NOT NULL,
  `emp_address` varchar(100) NOT NULL,
  `emp_year` varchar(10) NOT NULL,
  `occupation` varchar(30) NOT NULL,
  `salary` varchar(30) NOT NULL,
  `spouse` varchar(30) NOT NULL,
  `spouse_no` varchar(30) NOT NULL,
  `spouse_emp` varchar(50) NOT NULL,
  `spouse_details` varchar(100) NOT NULL,
  `spouse_income` decimal(10,2) NOT NULL,
  `comaker` varchar(30) NOT NULL,
  `comaker_details` varchar(100) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `credit_status` varchar(10) NOT NULL,
  `ci_remarks` varchar(1000) NOT NULL,
  `ci_name` varchar(50) NOT NULL,
  `ci_date` date NOT NULL,
  `payslip` int(11) NOT NULL,
  `valid_id` int(11) NOT NULL,
  `cert` int(11) NOT NULL,
  `municipality` int(11) NOT NULL,
  `income` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `customer`
--

INSERT INTO `customer` (`cust_id`, `cust_first`, `cust_last`, `cust_address`, `cust_contact`, `balance`, `cust_pic`, `bday`, `nickname`, `house_status`, `years`, `rent`, `emp_name`, `emp_no`, `emp_address`, `emp_year`, `occupation`, `salary`, `spouse`, `spouse_no`, `spouse_emp`, `spouse_details`, `spouse_income`, `comaker`, `comaker_details`, `branch_id`, `credit_status`, `ci_remarks`, `ci_name`, `ci_date`, `payslip`, `valid_id`, `cert`, `municipality`, `income`) VALUES
(1, 'WALKIN', 'WALKIN CITIBUILDERS', 'Masbate City', '09319928711', '300.00', 'default.gif', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0.00', '', '', 1, 'Approved', '', '', '0000-00-00', 0, 0, 0, 1, 0),
(2, 'JAMILA ', 'SIA', 'Masbate City', '09319928711', '0.00', 'default.gif', '1989-10-14', 'lee', 'owned', '27', 'NA', 'Stratium Software', '034-707-1630', 'Ayala Northpoint', '1', 'Systems Administrator', '12000', 'NA', 'NA', 'NA', 'NA', '0.00', 'Kaye Angela Cueva', 'Cadiz City', 1, 'Approved', '', '', '0000-00-00', 0, 0, 0, 1, 0),
(3, 'CITIBUILDERS STAFF', 'CITIBUILDERS', 'Diversion Road Masbate City', '09319928711', '7540.00', 'default.gif', '0000-00-00', '', '', '', '', '', '', '', '', '', '', '', '', '', '', '0.00', '', '', 1, 'Approved', '', '', '0000-00-00', 0, 0, 0, 1, 0),
(4, 'ARCH. CHRISTINE', 'ORDIZ', 'MASBATE CITY', '0', '0.00', 'default.gif', '0000-00-00', 'LOCATION', '', '', '', '', '', '', '', '', '', '', '', '', '', '0.00', '', '', 2, 'Approved', '', '', '0000-00-00', 0, 0, 0, 2, 0);

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

--
-- Table structure for table `expenses`
--

CREATE TABLE `expenses` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` int(11) NOT NULL,
  `date` date NOT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `expenses`
--

INSERT INTO `expenses` (`id`, `name`, `amount`, `date`, `user_id`) VALUES
(1, 'Gas sa ELF sa pa aroroy', 1020, '2024-11-20', 1);

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

--
-- Table structure for table `history_log`
--

CREATE TABLE `history_log` (
  `log_id` int(15) NOT NULL,
  `user_id` int(11) NOT NULL,
  `action` varchar(100) NOT NULL,
  `date` datetime NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `history_log`
--

INSERT INTO `history_log` (`log_id`, `user_id`, `action`, `date`) VALUES
(10, 1, 'has logged in the system at ', '2024-11-09 19:23:33'),
(11, 1, 'has logged out the system at ', '2024-11-09 19:23:58'),
(12, 4, 'has logged in the system at ', '2024-11-09 19:24:07'),
(13, 4, 'has logged in the system at ', '2024-11-09 20:00:20'),
(14, 4, 'has logged in the system at ', '2024-11-09 20:06:44'),
(15, 1, 'has logged in the system at ', '2024-11-19 18:15:54'),
(16, 1, 'has logged in the system at ', '2024-11-19 19:44:35'),
(17, 1, 'has logged out the system at ', '2024-11-19 20:05:13'),
(18, 4, 'has logged in the system at ', '2024-11-19 20:05:22'),
(19, 4, 'has logged out the system at ', '2024-11-19 21:00:59'),
(20, 1, 'has logged in the system at ', '2024-11-19 21:01:06'),
(21, 1, 'has logged out the system at ', '2024-11-19 21:01:41'),
(22, 4, 'has logged in the system at ', '2024-11-19 21:01:50'),
(23, 4, 'has logged out the system at ', '2024-11-19 21:14:49'),
(24, 4, 'has logged in the system at ', '2024-11-19 21:17:58'),
(25, 4, 'added a payment of 27000 for , ', '2024-11-19 00:00:00'),
(26, 4, 'has logged out the system at ', '2024-11-19 21:53:58'),
(27, 1, 'has logged in the system at ', '2024-11-20 12:24:22'),
(28, 1, 'has logged out the system at ', '2024-11-20 12:31:48'),
(29, 5, 'has logged in the system at ', '2024-11-20 12:32:06'),
(30, 5, 'has logged out the system at ', '2024-11-20 12:36:47'),
(31, 4, 'has logged in the system at ', '2024-11-20 12:36:56'),
(32, 4, 'has logged out the system at ', '2024-11-20 12:37:08'),
(33, 7, 'has logged in the system at ', '2024-11-20 12:37:20'),
(34, 7, 'has logged out the system at ', '2024-11-20 12:54:04'),
(35, 4, 'has logged in the system at ', '2024-11-20 12:54:13'),
(36, 4, 'has logged in the system at ', '2024-11-20 13:15:56'),
(37, 4, 'has logged in the system at ', '2024-11-20 13:19:53'),
(38, 4, 'has logged out the system at ', '2024-11-20 13:52:36'),
(39, 1, 'has logged in the system at ', '2024-11-20 13:52:43'),
(40, 1, 'added a payment of 4000 for , ', '2024-11-20 00:00:00'),
(41, 1, 'added a payment of 16000 for , ', '2024-11-20 00:00:00'),
(42, 1, 'added a payment of 295 for , ', '2024-11-20 00:00:00'),
(43, 1, 'added a payment of -5840 for , ', '2024-11-20 00:00:00'),
(44, 1, 'added a payment of -21550 for , ', '2024-11-20 00:00:00'),
(45, 1, 'added a payment of -5095.5 for , ', '2024-11-20 00:00:00'),
(46, 1, 'added a payment of 10000 for , ', '2024-11-20 00:00:00'),
(47, 1, 'has logged out the system at ', '2024-11-20 17:18:31'),
(48, 4, 'has logged in the system at ', '2024-11-20 17:18:44'),
(49, 4, 'has logged out the system at ', '2024-11-20 17:19:00'),
(50, 1, 'has logged in the system at ', '2024-11-20 17:19:08'),
(51, 1, 'has logged out the system at ', '2024-11-20 19:01:38'),
(52, 4, 'has logged in the system at ', '2024-11-20 19:01:54'),
(53, 4, 'has logged out the system at ', '2024-11-20 19:05:29'),
(54, 4, 'has logged in the system at ', '2024-11-20 19:06:27'),
(55, 4, 'has logged out the system at ', '2024-11-20 19:10:34'),
(56, 1, 'has logged in the system at ', '2024-11-20 19:10:50'),
(57, 1, 'added a payment of 350 for , ', '2024-11-20 00:00:00'),
(58, 1, 'has logged in the system at ', '2024-11-20 21:57:20'),
(59, 1, 'added a payment of 5000 for , ', '2024-11-20 00:00:00'),
(60, 1, 'added a payment of 1000 for , ', '2024-11-20 00:00:00'),
(61, 1, 'added a payment of 500 for , ', '2024-11-20 00:00:00'),
(62, 1, 'added a payment of 120 for , ', '2024-11-20 00:00:00'),
(63, 1, 'added a payment of 500 for WALKIN CITIBUILDERS, WALKIN', '2024-11-20 00:00:00'),
(64, 1, 'added a payment of 200 for WALKIN CITIBUILDERS, WALKIN', '2024-11-20 00:00:00'),
(65, 4, 'has logged in the system at ', '2024-12-06 20:23:05'),
(66, 7, 'has logged in the system at ', '2024-12-06 20:25:32'),
(67, 7, 'has logged out the system at ', '2024-12-06 20:41:36'),
(68, 4, 'has logged in the system at ', '2024-12-06 20:41:44'),
(69, 5, 'has logged in the system at ', '2024-12-06 20:47:01'),
(70, 4, 'has logged in the system at ', '2024-12-06 21:27:35'),
(71, 7, 'has logged in the system at ', '2024-12-06 21:30:07'),
(72, 7, 'has logged in the system at ', '2024-12-06 21:42:36'),
(73, 7, 'has logged in the system at ', '2024-12-06 23:02:53'),
(74, 7, 'has logged in the system at ', '2024-12-06 23:37:42');

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

--
-- Table structure for table `passcode`
--

CREATE TABLE `passcode` (
  `id` int(11) NOT NULL,
  `passcode` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `passcode`
--

INSERT INTO `passcode` (`id`, `passcode`) VALUES
(1, 'citiadmin');

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

--
-- Table structure for table `payment`
--

CREATE TABLE `payment` (
  `payment_id` int(11) NOT NULL,
  `cust_id` int(11) NOT NULL,
  `sales_id` int(11) NOT NULL,
  `payment` decimal(10,2) NOT NULL,
  `payment_date` datetime NOT NULL,
  `user_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `payment_for` date NOT NULL,
  `due` decimal(10,2) NOT NULL,
  `interest` decimal(10,2) NOT NULL,
  `remaining` decimal(10,2) NOT NULL,
  `status` varchar(20) NOT NULL,
  `rebate` decimal(10,2) NOT NULL,
  `or_no` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `payment`
--

INSERT INTO `payment` (`payment_id`, `cust_id`, `sales_id`, `payment`, `payment_date`, `user_id`, `branch_id`, `payment_for`, `due`, `interest`, `remaining`, `status`, `rebate`, `or_no`) VALUES
(3208, 3, 50, '9055.20', '2024-12-06 20:42:23', 4, 1, '2024-12-06', '9055.20', '0.00', '0.00', 'quote', '0.00', 1901),
(3209, 1, 51, '80000.00', '2024-12-06 21:23:38', 5, 1, '2024-12-06', '80000.00', '0.00', '0.00', 'quote', '0.00', 1902),
(3210, 2, 52, '12266.66', '2024-12-06 21:27:58', 4, 1, '2024-12-06', '12266.66', '0.00', '0.00', 'quote', '0.00', 1903),
(3211, 3, 53, '22897.78', '2024-12-06 21:41:35', 7, 1, '2024-12-06', '22897.78', '0.00', '0.00', 'quote', '0.00', 1904),
(3212, 1, 54, '0.00', '2024-12-06 22:48:33', 7, 2, '2024-12-06', '0.00', '0.00', '0.00', 'quote', '0.00', 1905),
(3213, 4, 55, '2760.00', '2024-12-06 23:37:07', 7, 2, '2024-12-06', '2760.00', '0.00', '0.00', 'quote', '0.00', 1906);

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

--
-- Table structure for table `product`
--

CREATE TABLE `product` (
  `prod_id` int(11) NOT NULL,
  `prod_name` varchar(100) NOT NULL,
  `prod_desc` varchar(500) NOT NULL,
  `prod_price` decimal(10,2) NOT NULL,
  `prod_pic` varchar(300) NOT NULL,
  `cat_id` int(11) NOT NULL,
  `prod_qty` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `reorder` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `serial` varchar(50) NOT NULL,
  `cm` int(11) NOT NULL,
  `cmm` int(11) NOT NULL,
  `prod_price2` decimal(11,2) NOT NULL,
  `prod_price3` decimal(11,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `product`
--

INSERT INTO `product` (`prod_id`, `prod_name`, `prod_desc`, `prod_price`, `prod_pic`, `cat_id`, `prod_qty`, `branch_id`, `reorder`, `supplier_id`, `serial`, `cm`, `cmm`, `prod_price2`, `prod_price3`) VALUES
(26, 'SLIDING WINDOW', 'SLIDING WINDOW', '120.00', 'crealco-elite-slider.png', 7, -1, 1, 0, 2, '899789', 30, 30, '110.00', '100.00'),
(27, 'BOX GUTTER .4mm 16x8ft', 'BOX GUTTER .4mm16x8ft', '465.00', 'roof.jpg', 5, -2, 2, 0, 3, 'BOX4mm16x8ft', 0, 0, '395.00', '345.00'),
(28, 'BOX GUTTER 4mm18x8ft', 'BOX GUTTER 4mm18x8ft', '525.00', 'images.jfif', 5, 0, 2, 0, 3, 'BOX4mm18x8ft', 0, 0, '495.00', '435.00'),
(29, 'BOX GUTTER 4mm24x8ft', 'BOX GUTTER 4mm24x8ft', '670.00', 'roof.jpg', 5, 0, 2, 0, 3, 'BOX4mm24x8ft', 0, 0, '590.00', '550.00'),
(30, 'BOX GUTTER 5mm16x8ft', 'BOX GUTTER 5mm16x8ft', '520.00', 'roof.jpg', 5, 0, 2, 0, 3, 'BOX5mm16x8ft', 0, 0, '470.00', '435.00'),
(31, 'BOX GUTTER5mm18x8ft', 'BOX GUTTER5mm18x8ft', '595.00', 'roof.jpg', 5, 0, 2, 0, 3, 'BOX5mm18x8ft', 0, 0, '520.00', '525.00'),
(32, 'BOX GUTTER 5mm 24x8ft', 'BOX GUTTER 5mm 24x8ft', '680.00', 'roof.jpg', 5, 0, 2, 0, 3, 'BOX5mm24x8ft', 0, 0, '620.00', '565.00'),
(33, 'SPANISH GUTTER 4mm16X8ft', 'SPANISH GUTTER 4mm16X8ft', '550.00', 'roof.jpg', 5, 0, 2, 0, 3, 'SPANISH GUTTER 4mm16X8ft', 0, 0, '510.00', '495.00'),
(34, 'SPANISH GUTTER 4mm18X8ft', 'SPANISH GUTTER 4mm18X8ft', '640.00', 'roof.jpg', 5, 0, 2, 0, 3, 'SPANISH GUTTER 4mm18X8ft', 0, 0, '595.00', '565.00'),
(35, 'SPANISH GUTTER 4mm24X8ft', 'SPANISH GUTTER 4mm24X8ft', '790.00', 'roof.jpg', 5, 0, 2, 0, 3, 'SPANISH GUTTER 4mm24X8ft', 0, 0, '720.00', '690.00'),
(36, 'SPANISH GUTTER 5mm16X8ft', 'SPANISH GUTTER 5mm16X8ft', '640.00', 'roof.jpg', 5, 0, 2, 0, 3, 'SPANISH GUTTER 5mm16X8ft', 0, 0, '590.00', '550.00'),
(37, 'SPANISH GUTTER 5mm18X8ft', 'SPANISH GUTTER 5mm18X8ft', '760.00', 'roof.jpg', 5, 0, 2, 0, 3, 'SPANISH GUTTER 5mm18X8ft', 0, 0, '690.00', '640.00'),
(38, 'SPANISH GUTTER 5mm24X8ft', 'SPANISH GUTTER 5mm24X8ft', '820.00', '04f95933-5b29-4130-8197-5b36e66d9523.jpg', 5, 0, 2, 0, 3, 'SPANISH GUTTER 5mm24X8ft', 0, 0, '780.00', '720.00'),
(39, 'RIDGE ROLL 4mm 16X18ft', 'RIDGE ROLL 4mm 16X18ft', '465.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE ROLL 4mm 16X18ft', 0, 0, '395.00', '345.00'),
(40, 'RIDGE ROLL 4mm 18X18ft', 'RIDGE ROLL 4mm 18X18ft', '525.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE ROLL 4mm 18X18ft', 0, 0, '495.00', '435.00'),
(41, 'RIDGE ROLL 4mm 24X18ft', 'RIDGE ROLL 4mm 24X18ft', '670.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE ROLL 4mm 24X18ft', 0, 0, '590.00', '550.00'),
(42, 'RIDGE ROLL 5mm 16X18ft', 'RIDGE ROLL 5mm 16X18ft', '520.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE ROLL 5mm 16X18ft', 0, 0, '470.00', '435.00'),
(43, 'RIDGE ROLL 5mm 18X8ft', 'RIDGE ROLL 5mm 18X8ft', '595.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE ROLL 5mm 18X8ft', 0, 0, '520.00', '525.00'),
(44, 'RIDGE ROLL 5mm 24X8ft', 'RIDGE ROLL 5mm 24X8ft', '680.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE ROLL 5mm 24X8ft', 0, 0, '620.00', '565.00'),
(45, 'RIDGE CAP 4mm 16X8ft', 'RIDGE CAP 4mm 16X8ft', '495.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE CAP 4mm 16X8ft', 0, 0, '465.00', '395.00'),
(46, 'RIDGE CAP 4mm 18X8ft', 'RIDGE CAP 4mm 18X8ft', '560.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE CAP 4mm 18X8ft', 0, 0, '520.00', '485.00'),
(47, 'RIDGE CAP 4mm 24X8ft', 'RIDGE CAP 4mm 24X8ft', '705.00', 'roof.jpg', 5, 0, 2, 0, 3, 'RIDGE CAP 4mm 24X8ft', 0, 0, '645.00', '595.00'),
(48, 'SF SCREEN DOOR', 'SF SCREEN DOOR', '257.00', 'crealco-elite-slider.png', 7, -2, 1, 0, 2, 'SF SCREEN DOOR', 30, 30, '200.00', '230.00'),
(49, 'ALCO SCREEN DOOR (Screen Door Heavy Duty)', 'ALCO SCREEN DOOR (Screen Door Heavy Duty)', '350.00', 'S568bf82c7bc04f03aa06179927637802d.jpg_720x720q80.png', 7, -12, 1, 0, 2, 'ALCO SCREEN DOOR', 30, 30, '320.00', '330.00'),
(50, '38SERIES OWNING WINDOW', '38SERIES OWNING WINDOW', '550.00', 'crealco-elite-slider.png', 7, -2, 1, 0, 2, '38SERIES OWNING WINDOW', 30, 30, '500.00', '450.00'),
(51, 'SPANDREIL WHITE .4MM 6', '.4MM', '580.00', '264360e6-c99f-4b4a-9197-2287e5b67705.jpg', 5, 0, 2, 0, 3, 'SPANDREIL  6', 0, 0, '500.00', '550.00'),
(52, 'END MOULDING 2.44METERS', '.4MM', '375.00', 'default.gif', 5, 0, 2, 0, 3, 'END MOULDING 2.44METERS', 0, 0, '350.00', '325.00'),
(53, 'CENTER MOULDING 2.44METERS', '.4MM', '475.00', 'default.gif', 5, 0, 2, 0, 3, 'CENTER MOULDING 2.44METERS', 0, 0, '450.00', '425.00'),
(54, 'PVC FLUTTED WALL PANEL', '25MM', '720.00', '8f4e8c69-985f-4c99-9f07-62152ad834e3.jpg', 9, 0, 2, 0, 5, '160', 0, 0, '690.00', '660.00'),
(55, '155 PVC FLUTTED WALL PANEL', '155 CLASSIC OAK PVC', '720.00', 'cd8699e8-311e-4456-af94-3a1f3dae25f7.jpg', 9, -1, 2, 0, 5, '155 CLASSIC OAK PVC', 0, 0, '690.00', '660.00'),
(56, '155 PVC FLUTTED WALL PANEL SUB POMELO', '155 COR SUB POMELO', '720.00', '61f976b0-5d06-4466-8a5d-3cd0867a54db.jpg', 9, -1, 2, 0, 5, '155 COR SUB POMELO', 0, 0, '690.00', '660.00'),
(57, '155 PVC FLUTTED WALL PANEL EVONY', '155 PVC WALL BOARD EVONY', '720.00', '258b8149-92ba-4b1a-a64c-7313fb2d8554.jpg', 9, -5, 2, 0, 5, '155 PVC WALL BOARD EVONY', 0, 0, '690.00', '660.00'),
(58, '160 PVC FLUTTED WALLCLASSIC WALLNUT', '160 PVC CLASSIC WALLNUT', '720.00', '085f70e5-780e-4f69-a6d8-6ef08964922f.jpg', 9, 0, 2, 0, 5, '160 PVC CLASSIC WALLNUT', 0, 0, '690.00', '660.00'),
(59, 'HL008 PVC PANEL', '8MM ', '400.00', '3d37ac6b-8b4f-424e-8c77-191e2b41c13d.jpg', 9, 0, 2, 0, 5, 'PVC CEILING PANEL', 0, 0, '375.00', '390.00'),
(60, 'HL0010 PVC PANEL', '7MM', '400.00', '05781fde-f918-4a0e-b206-a9766e075dad.jpg', 9, 0, 2, 0, 5, 'PVC CEILING PANEL', 0, 0, '390.00', '375.00'),
(61, 'VALLEY GUTTER 16\" x 8ft', '.4MM ', '495.00', '86c09302-5c40-4beb-87e3-e6a47ce87dff.jpg', 5, 0, 2, 0, 3, 'BENDED ACCESORIES', 0, 0, '395.00', '465.00'),
(62, 'VALLEY GUTTER 18\"X8FT', '.4MM', '550.00', '5fd7de85-9429-4b79-8c1d-1aa5ed3f629f.jpg', 5, 0, 2, 0, 3, 'BENDED ACCESORIES', 0, 0, '470.00', '510.00'),
(63, 'VALLEY GUTTER 24\"X8FT', '.4MM', '750.00', '7973001d-b813-41da-8e0b-484df45db7dc.jpg', 5, 0, 2, 0, 3, 'BENDED ACCESORIES', 0, 0, '640.00', '690.00'),
(64, 'BANAWE GUTTER 24\"X8FT', '.4MM', '705.00', '7b27b0d4-a7be-4347-b277-e76213f4598b.jpg', 5, 0, 2, 0, 3, 'BENDED ACCESORIES', 0, 0, '595.00', '645.00'),
(65, 'SPANISH END FLASHING 24\"X8FT', '.4MM', '705.00', 'a6b41b93-379a-4212-ad82-e6136f32c708.jpg', 5, 0, 2, 0, 3, 'BENDED ACCESORIES', 0, 0, '595.00', '645.00');

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

--
-- Table structure for table `purchase_request`
--

CREATE TABLE `purchase_request` (
  `pr_id` int(11) NOT NULL,
  `prod_id` int(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `request_date` date NOT NULL,
  `branch_id` int(11) NOT NULL,
  `purchase_status` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `ratedeliver`
--

CREATE TABLE `ratedeliver` (
  `id` int(11) NOT NULL,
  `truckname` varchar(100) NOT NULL,
  `meter` varchar(11) NOT NULL,
  `qty` int(11) NOT NULL,
  `fee1` int(11) NOT NULL,
  `fee2` int(11) NOT NULL,
  `fee3` int(11) NOT NULL,
  `fee4` int(11) NOT NULL,
  `fee5` int(11) NOT NULL,
  `fee6` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `ratedeliver`
--

INSERT INTO `ratedeliver` (`id`, `truckname`, `meter`, `qty`, `fee1`, `fee2`, `fee3`, `fee4`, `fee5`, `fee6`) VALUES
(1, 'TRYCYCLE RACK', '1-4m', 25, 500, 800, 1200, 1500, 1800, 2000),
(2, 'DROPSIDE 4WHEELER', '5-8m', 25, 1500, 2500, 3000, 3500, 4000, 4500),
(3, 'BOOM TRUCK 6 WHEELER', '9-13m', 25, 2500, 2800, 3500, 4000, 4500, 5000),
(4, 'TRYCYCLE RACK', '1-4m', 50, 1500, 2000, 2500, 3000, 3500, 4000),
(5, 'DROPSIDE 4WHEELER', '5-8m', 50, 2000, 2500, 3000, 3500, 4000, 5000),
(6, 'BOOM TRUCK 6 WHEELER', '9-13m', 50, 3000, 3500, 4000, 4500, 5000, 5500),
(7, 'TRYCYCLE RACK', '1.4m', 75, 1500, 2000, 0, 0, 0, 0),
(8, 'DROPSIDE 4WHEELER', '5-8m', 75, 2500, 3000, 3500, 4000, 4500, 5000),
(9, 'BOOM TRUCK 6 WHEELER', '9-13m', 75, 3500, 4000, 4500, 5000, 5500, 6000),
(10, 'TRYCYCLE RACK', '1.4m', 100, 1500, 2000, 0, 0, 0, 0),
(11, 'DROPSIDE 4WHEELER', '5-8m', 100, 3000, 3500, 4000, 4500, 5000, 5500),
(12, 'BOOM TRUCK 6 WHEELER', '9-13m', 100, 4000, 4500, 5000, 5500, 6000, 6500),
(14, 'DROPSIDE 4WHEELER', '5-8m', 125, 3500, 4000, 4500, 5000, 5500, 6000),
(15, 'BOOM TRUCK 6 WHEELER', '9-13m', 125, 4500, 5000, 5500, 6000, 6500, 7000);

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

--
-- Table structure for table `remit`
--

CREATE TABLE `remit` (
  `id` int(11) NOT NULL,
  `name` varchar(100) NOT NULL,
  `amount` int(11) NOT NULL,
  `aa` int(11) NOT NULL,
  `bb` int(11) NOT NULL,
  `cc` int(11) NOT NULL,
  `dd` int(11) NOT NULL,
  `ee` int(11) NOT NULL,
  `ff` int(11) NOT NULL,
  `gg` int(11) NOT NULL,
  `hh` int(11) NOT NULL,
  `ii` int(11) NOT NULL,
  `date` date NOT NULL,
  `user_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;

--
-- Dumping data for table `remit`
--

INSERT INTO `remit` (`id`, `name`, `amount`, `aa`, `bb`, `cc`, `dd`, `ee`, `ff`, `gg`, `hh`, `ii`, `date`, `user_id`) VALUES
(1, 'REMIT MAAM JAM', 3772, 2, 5, 1, 0, 0, 0, 5, 5, 5, '2024-11-20', 1);

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

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

CREATE TABLE `sales` (
  `sales_id` int(11) NOT NULL,
  `cust_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `cash_tendered` decimal(10,2) DEFAULT NULL,
  `discount` decimal(10,2) DEFAULT NULL,
  `discko` int(11) NOT NULL,
  `amount_due` decimal(10,2) NOT NULL,
  `cash_change` decimal(10,2) DEFAULT NULL,
  `date_added` datetime NOT NULL,
  `modeofpayment` varchar(15) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `partial1` decimal(11,2) NOT NULL,
  `partial2` decimal(11,2) NOT NULL,
  `partial3` decimal(11,2) NOT NULL,
  `status` varchar(100) NOT NULL,
  `charge` int(11) NOT NULL,
  `mydate` date NOT NULL,
  `delivery` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sales`
--

INSERT INTO `sales` (`sales_id`, `cust_id`, `user_id`, `cash_tendered`, `discount`, `discko`, `amount_due`, `cash_change`, `date_added`, `modeofpayment`, `branch_id`, `total`, `partial1`, `partial2`, `partial3`, `status`, `charge`, `mydate`, `delivery`) VALUES
(50, 3, 4, '0.00', '184.80', 2, '9240.00', '-9055.20', '2024-12-06 20:42:23', 'quote', 1, '9055.20', '0.00', '0.00', '0.00', 'quote', 0, '2024-12-06', ''),
(51, 1, 5, '0.00', '0.00', 0, '80000.00', '-80000.00', '2024-12-06 21:23:38', 'quote', 1, '80000.00', '0.00', '0.00', '0.00', 'quote', 0, '0000-00-00', ''),
(52, 2, 4, '0.00', '0.00', 0, '12266.66', '-12266.66', '2024-12-06 21:27:58', 'quote', 1, '12266.66', '0.00', '0.00', '0.00', 'quote', 0, '0000-00-00', ''),
(53, 3, 7, '0.00', '0.00', 0, '22897.78', '-22897.78', '2024-12-06 21:41:35', 'quote', 1, '22897.78', '0.00', '0.00', '0.00', 'quote', 0, '0000-00-00', ''),
(54, 1, 7, '0.00', '0.00', 0, '0.00', '0.00', '2024-12-06 22:48:33', 'quote', 2, '0.00', '0.00', '0.00', '0.00', 'quote', 0, '0000-00-00', ''),
(55, 4, 7, '0.00', '0.00', 0, '2760.00', '-2760.00', '2024-12-06 23:37:07', 'quote', 2, '2760.00', '0.00', '0.00', '0.00', 'quote', 0, '0000-00-00', 'TRYCYCLE RACK');

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

--
-- Table structure for table `sales_details`
--

CREATE TABLE `sales_details` (
  `sales_details_id` int(11) NOT NULL,
  `sales_id` int(11) NOT NULL,
  `prod_id` int(11) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `qty` int(11) NOT NULL,
  `hh` varchar(100) NOT NULL,
  `ww` varchar(100) NOT NULL,
  `variation` varchar(100) NOT NULL,
  `color` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `sales_details`
--

INSERT INTO `sales_details` (`sales_details_id`, `sales_id`, `prod_id`, `price`, `qty`, `hh`, `ww`, `variation`, `color`) VALUES
(63, 50, 49, '4620.00', 2, '70', '90', 'ANALOTE BLACK', 'REF BRONZE'),
(64, 51, 50, '40000.00', 2, '200', '200', 'ANALOTE BLACK', 'DARK GRAY'),
(65, 52, 48, '6133.33', 2, '150', '80', 'COLOR VARIATION', 'REF BRONZE'),
(66, 54, 48, '1831822.40', 2, '160', '140', 'ANALOTE BLACK', 'REF GOLD GRAY'),
(67, 54, 55, '0.00', 1, '0', '690.00', '0.55mm', 'JO2 BLACK'),
(68, 54, 57, '0.00', 1, '0', '690.00', '0.6mm', 'SUB POMELO'),
(69, 54, 56, '0.00', 1, '0', '690.00', '0.45mm', 'JO5 COFFEE'),
(70, 55, 57, '690.00', 2, '1', '690.00', '0.6mm', 'CHOCOLATE BROWN'),
(71, 55, 57, '690.00', 2, '1', '690.00', '0.4mm', 'RED OAK');

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

--
-- Table structure for table `stockin`
--

CREATE TABLE `stockin` (
  `stockin_id` int(11) NOT NULL,
  `prod_id` int(11) NOT NULL,
  `qty` int(6) NOT NULL,
  `date` datetime NOT NULL,
  `branch_id` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `supplier`
--

CREATE TABLE `supplier` (
  `supplier_id` int(11) NOT NULL,
  `supplier_name` varchar(100) NOT NULL,
  `supplier_address` varchar(300) NOT NULL,
  `supplier_contact` varchar(50) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `supplier`
--

INSERT INTO `supplier` (`supplier_id`, `supplier_name`, `supplier_address`, `supplier_contact`) VALUES
(2, 'GLASS', 'Makati City, Philippines', '423-4444'),
(3, 'ROOF', 'Binondo, Manila', '98878'),
(4, 'MAIN', 'Bacolod City', '034-666-087611'),
(5, 'OTHERS', 'Philippines', '42424');

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

--
-- Table structure for table `temp_trans`
--

CREATE TABLE `temp_trans` (
  `temp_trans_id` int(11) NOT NULL,
  `prod_id` int(11) NOT NULL,
  `cust_id` int(11) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `qty` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `hh` varchar(100) NOT NULL,
  `ww` varchar(100) NOT NULL,
  `variation` varchar(100) NOT NULL,
  `color` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

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

--
-- Table structure for table `term`
--

CREATE TABLE `term` (
  `term_id` int(11) NOT NULL,
  `sales_id` int(11) DEFAULT NULL,
  `payable_for` varchar(10) NOT NULL,
  `term` varchar(11) NOT NULL,
  `due` decimal(10,2) NOT NULL,
  `payment_start` date NOT NULL,
  `down` decimal(10,2) NOT NULL,
  `due_date` date NOT NULL,
  `interest` decimal(10,2) NOT NULL,
  `status` varchar(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `term`
--

INSERT INTO `term` (`term_id`, `sales_id`, `payable_for`, `term`, `due`, `payment_start`, `down`, `due_date`, `interest`, `status`) VALUES
(1, 8, '4', 'monthly', '113.30', '2017-02-21', '113.30', '2017-06-21', '16.50', ''),
(2, 9, '4', 'monthly', '113.30', '2017-02-21', '113.30', '2017-06-21', '16.50', '');

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

--
-- Table structure for table `user`
--

CREATE TABLE `user` (
  `user_id` int(11) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` varchar(50) NOT NULL,
  `name` varchar(50) NOT NULL,
  `status` varchar(10) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `type` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `user`
--

INSERT INTO `user` (`user_id`, `username`, `password`, `name`, `status`, `branch_id`, `type`) VALUES
(1, 'admin', 'a1Bz20ydqelm8m1wql21232f297a57a5a743894a0e4a801fc3', 'CITIBUILDERS', 'active', 1, 1),
(4, 'frontdesk', 'a1Bz20ydqelm8m1wql21232f297a57a5a743894a0e4a801fc3', 'FRONT DESK QUOTE', 'active', 1, 0),
(5, 'cashier2', 'a1Bz20ydqelm8m1wql21232f297a57a5a743894a0e4a801fc3', 'CASHIER ', 'active', 1, 1),
(6, 'administrator', 'a1Bz20ydqelm8m1wql21232f297a57a5a743894a0e4a801fc3', 'CITIBUILDERS ADMIN', 'active', 0, 1),
(7, 'cashier1', 'a1Bz20ydqelm8m1wql21232f297a57a5a743894a0e4a801fc3', 'CASHIER', 'active', 2, 1);

--
-- Indexes for dumped tables
--

--
-- Indexes for table `branch`
--
ALTER TABLE `branch`
  ADD PRIMARY KEY (`branch_id`);

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

--
-- Indexes for table `customer`
--
ALTER TABLE `customer`
  ADD PRIMARY KEY (`cust_id`);

--
-- Indexes for table `expenses`
--
ALTER TABLE `expenses`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `history_log`
--
ALTER TABLE `history_log`
  ADD PRIMARY KEY (`log_id`);

--
-- Indexes for table `passcode`
--
ALTER TABLE `passcode`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `payment`
--
ALTER TABLE `payment`
  ADD PRIMARY KEY (`payment_id`);

--
-- Indexes for table `product`
--
ALTER TABLE `product`
  ADD PRIMARY KEY (`prod_id`);

--
-- Indexes for table `purchase_request`
--
ALTER TABLE `purchase_request`
  ADD PRIMARY KEY (`pr_id`);

--
-- Indexes for table `ratedeliver`
--
ALTER TABLE `ratedeliver`
  ADD PRIMARY KEY (`id`);

--
-- Indexes for table `remit`
--
ALTER TABLE `remit`
  ADD PRIMARY KEY (`id`);

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

--
-- Indexes for table `sales_details`
--
ALTER TABLE `sales_details`
  ADD PRIMARY KEY (`sales_details_id`);

--
-- Indexes for table `stockin`
--
ALTER TABLE `stockin`
  ADD PRIMARY KEY (`stockin_id`);

--
-- Indexes for table `supplier`
--
ALTER TABLE `supplier`
  ADD PRIMARY KEY (`supplier_id`);

--
-- Indexes for table `temp_trans`
--
ALTER TABLE `temp_trans`
  ADD PRIMARY KEY (`temp_trans_id`);

--
-- Indexes for table `term`
--
ALTER TABLE `term`
  ADD PRIMARY KEY (`term_id`);

--
-- Indexes for table `user`
--
ALTER TABLE `user`
  ADD PRIMARY KEY (`user_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

--
-- AUTO_INCREMENT for table `history_log`
--
ALTER TABLE `history_log`
  MODIFY `log_id` int(15) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=75;

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

--
-- AUTO_INCREMENT for table `payment`
--
ALTER TABLE `payment`
  MODIFY `payment_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3214;

--
-- AUTO_INCREMENT for table `product`
--
ALTER TABLE `product`
  MODIFY `prod_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=66;

--
-- AUTO_INCREMENT for table `purchase_request`
--
ALTER TABLE `purchase_request`
  MODIFY `pr_id` int(11) NOT NULL AUTO_INCREMENT;

--
-- AUTO_INCREMENT for table `ratedeliver`
--
ALTER TABLE `ratedeliver`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=16;

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

--
-- AUTO_INCREMENT for table `sales`
--
ALTER TABLE `sales`
  MODIFY `sales_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=56;

--
-- AUTO_INCREMENT for table `sales_details`
--
ALTER TABLE `sales_details`
  MODIFY `sales_details_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=72;

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

--
-- AUTO_INCREMENT for table `supplier`
--
ALTER TABLE `supplier`
  MODIFY `supplier_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;

--
-- AUTO_INCREMENT for table `temp_trans`
--
ALTER TABLE `temp_trans`
  MODIFY `temp_trans_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=126;

--
-- AUTO_INCREMENT for table `term`
--
ALTER TABLE `term`
  MODIFY `term_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;

--
-- AUTO_INCREMENT for table `user`
--
ALTER TABLE `user`
  MODIFY `user_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
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 */;
