-- phpMyAdmin SQL Dump
-- version 5.2.1
-- https://www.phpmyadmin.net/
--
-- Host: 127.0.0.1
-- Generation Time: Jul 16, 2026 at 03:01 PM
-- Server version: 10.4.32-MariaDB
-- PHP Version: 8.0.30

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
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: `coffee_erp`
--

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

--
-- Table structure for table `branches`
--

CREATE TABLE `branches` (
  `id` int(11) NOT NULL,
  `branch_name` varchar(100) NOT NULL,
  `location` varchar(255) DEFAULT NULL,
  `is_main` tinyint(1) DEFAULT 0
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `branches`
--

INSERT INTO `branches` (`id`, `branch_name`, `location`, `is_main`) VALUES
(1, 'kaba', 'kaba', 0);

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

--
-- Table structure for table `inventory`
--

CREATE TABLE `inventory` (
  `id` int(11) NOT NULL,
  `branch_id` int(11) DEFAULT NULL,
  `product_id` int(11) DEFAULT NULL,
  `quantity` decimal(10,3) NOT NULL DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `inventory`
--

INSERT INTO `inventory` (`id`, `branch_id`, `product_id`, `quantity`) VALUES
(1, 1, 1, 46.000),
(2, 1, 2, 47.000),
(5, 1, 3, 138.000),
(6, 1, 4, 63.000),
(7, 1, 5, 587.000),
(8, 1, 6, 43.000),
(9, 1, 7, 410.000),
(10, 1, 8, 30.000),
(11, 1, 9, 5.000),
(12, 1, 10, 5.000),
(15, 1, 11, 4.000),
(16, 1, 12, 3.000),
(18, 1, 13, 0.000),
(19, 1, 14, 5.000),
(20, 1, 15, 12.000),
(22, 1, 16, 3.000),
(23, 1, 17, 9.000),
(24, 1, 18, 4.000),
(25, 1, 19, 15.000),
(26, 1, 20, 15.000),
(27, 1, 21, 196.000),
(28, 1, 22, 200.000),
(29, 1, 23, 200.000),
(30, 1, 24, 200.000),
(31, 1, 25, 206.000),
(32, 1, 26, 200.000),
(33, 1, 27, 200.000),
(34, 1, 28, 4.000),
(35, 1, 29, 200.000),
(36, 1, 30, 6.000),
(37, 1, 31, 12.000),
(38, 1, 32, 62.000),
(39, 1, 33, 51.000),
(40, 1, 34, 26.000),
(41, 1, 35, 34.000),
(42, 1, 36, 20.000),
(43, 1, 37, 19.000),
(44, 1, 38, 10.000),
(45, 1, 39, 6.000),
(46, 1, 40, 5.000),
(47, 1, 41, 5.000),
(48, 1, 42, 6.000),
(49, 1, 43, 10.000),
(50, 1, 44, 5.000),
(51, 1, 45, 10.000),
(52, 1, 46, 6.000),
(53, 1, 47, 10.000),
(54, 1, 48, 10.000),
(55, 1, 49, 10.000),
(56, 1, 50, 10.000),
(57, 1, 51, 45.000),
(58, 1, 52, 49.000),
(59, 1, 53, 41.000),
(60, 1, 54, 200.000),
(61, 1, 55, 4.000),
(62, 1, 56, 4.000),
(63, 1, 57, 50.000),
(64, 1, 58, 50.000),
(65, 1, 59, 50.000),
(66, 1, 60, 352.000),
(67, 1, 61, 50.000),
(68, 1, 62, 31.000),
(69, 1, 63, 105.000),
(70, 1, 64, 10.000),
(71, 1, 65, 99.000),
(72, 1, 66, 13.000),
(73, 1, 67, 98.000),
(74, 1, 68, 100.000),
(75, 1, 69, 4.000),
(76, 1, 70, 99.000),
(77, 1, 71, 4.000),
(78, 1, 72, 4.000),
(79, 1, 73, 4.000),
(80, 1, 74, 93.000),
(81, 1, 75, 4.000),
(82, 1, 76, 100.000),
(83, 1, 77, 4.000),
(84, 1, 78, 4.000),
(85, 1, 79, 4.000),
(88, 1, 80, 0.000),
(90, 1, 81, 103.000),
(91, 1, 82, 4.000),
(92, 1, 83, 4.000),
(93, 1, 84, 4.000),
(94, 1, 85, 4.000),
(96, 1, 86, 4.000),
(97, 1, 87, 4.000),
(98, 1, 88, 197.000),
(99, 1, 89, 4.000),
(100, 1, 90, 105.000),
(101, 1, 91, 4.000),
(102, 1, 92, 3.000),
(103, 1, 93, 4.000),
(106, 1, 94, 3.000),
(107, 1, 95, 3.000),
(108, 1, 96, 4.000),
(109, 1, 97, 3.000),
(110, 1, 98, 3.000),
(111, 1, 99, 4.000),
(112, 1, 100, 3.000),
(114, 1, 101, 3.000),
(115, 1, 102, 4.000),
(116, 1, 103, 3.000),
(118, 1, 104, 3.000),
(120, 1, 105, 4.000),
(121, 1, 106, 4.000),
(122, 1, 107, 3.000),
(123, 1, 108, 4.000),
(124, 1, 109, 3.000),
(125, 1, 110, 4.000),
(126, 1, 111, 3.000),
(127, 1, 112, 3.000),
(128, 1, 113, 4.000),
(129, 1, 114, 3.000),
(130, 1, 115, 3.000),
(131, 1, 116, 4.000),
(132, 1, 117, 3.000),
(133, 1, 118, 3.000),
(134, 1, 119, 4.000),
(135, 1, 120, 3.000),
(136, 1, 121, 3.000),
(137, 1, 122, 4.000),
(138, 1, 123, 3.000),
(139, 1, 124, 3.000),
(140, 1, 125, 4.000),
(141, 1, 126, 3.000),
(142, 1, 127, 3.000),
(143, 1, 128, 4.000),
(144, 1, 129, 3.000),
(145, 1, 130, 3.000),
(146, 1, 131, 4.000),
(147, 1, 132, 3.000),
(148, 1, 133, 3.000),
(149, 1, 134, 4.000),
(150, 1, 135, 3.000),
(160, 1, 136, 21.000),
(161, 1, 137, 29.000),
(162, 1, 138, 17.000),
(163, 1, 139, 30.000),
(164, 1, 140, 20.000),
(165, 1, 141, 95.000),
(166, 1, 142, 10.000),
(167, 1, 143, 5.000),
(168, 1, 144, 50.000),
(169, 1, 145, 31.000),
(170, 1, 146, 30.000),
(171, 1, 147, 5.000),
(172, 1, 148, 30.000),
(173, 1, 149, 28.000),
(174, 1, 150, 28.000),
(175, 1, 151, 20.000),
(176, 1, 152, 30.000),
(177, 1, 153, 20.000),
(178, 1, 154, 20.000),
(179, 1, 155, 20.000),
(180, 1, 156, 78.000),
(181, 1, 157, 9.000),
(182, 1, 158, 20.000),
(183, 1, 159, 27.000),
(184, 1, 160, 20.000),
(185, 1, 161, 30.000),
(186, 1, 162, 30.000),
(188, 1, 163, 30.000),
(189, 1, 164, 13.000),
(191, 1, 165, 20.000),
(192, 1, 166, 29.000),
(194, 1, 167, 30.000),
(197, 1, 168, 0.000),
(198, 1, 169, 21.000),
(200, 1, 170, 4.000),
(201, 1, 171, 200.000),
(215, 1, 172, 49.000),
(216, 1, 173, 49.000),
(228, 1, 174, 0.000),
(244, 1, 175, 23.000),
(245, 1, 176, 97.000),
(246, 1, 177, 0.000),
(259, 1, 178, 24.000),
(269, 1, 179, 43.000),
(337, 1, 180, 2.000),
(338, 1, 181, 1.000),
(339, 1, 182, 1.000),
(340, 1, 183, 1.000),
(341, 1, 184, 1.000),
(342, 1, 185, 1.000),
(343, 1, 186, 1.000),
(344, 1, 187, 1.000),
(345, 1, 188, 1.000),
(346, 1, 189, 1.000),
(347, 1, 190, 1.000),
(348, 1, 191, 1.000),
(349, 1, 192, 1.000),
(351, 1, 193, 2.000),
(436, 1, 194, 3.000),
(437, 1, 195, 5.000),
(438, 1, 196, 10.000),
(439, 1, 197, 15.000),
(440, 1, 198, 9.000),
(441, 1, 199, 3.000),
(442, 1, 200, 5.000),
(443, 1, 201, 6.000),
(444, 1, 202, 3.000),
(445, 1, 203, 4.000),
(446, 1, 204, 24.000),
(447, 1, 205, 12.000),
(448, 1, 206, 3.000),
(449, 1, 207, 3.000),
(450, 1, 208, 12.000),
(451, 1, 209, 4.000),
(452, 1, 210, 3.000),
(455, 1, 211, 24.000),
(456, 1, 212, 11.000),
(458, 1, 213, 86.000),
(459, 1, 214, 4.000),
(461, 1, 215, 7.000),
(462, 1, 216, 32.000),
(466, 1, 217, 12.000),
(467, 1, 218, 12.000),
(468, 1, 219, 12.000),
(469, 1, 220, 12.000),
(470, 1, 221, 12.000),
(471, 1, 222, 6.000),
(472, 1, 223, 5.000),
(473, 1, 224, 3.000),
(474, 1, 225, 12.000),
(476, 1, 226, 12.000),
(478, 1, 227, 23.000),
(479, 1, 228, 26.000),
(481, 1, 229, 6.000),
(482, 1, 230, 6.000),
(484, 1, 231, 11.000),
(485, 1, 232, 12.000),
(486, 1, 233, 17.000),
(489, 1, 234, 12.000),
(491, 1, 235, 4.000),
(492, 1, 236, 31.000),
(493, 1, 237, 1.000),
(494, 1, 238, 1.000),
(496, 1, 239, 1.000),
(497, 1, 240, 1.000),
(498, 1, 241, 1.000),
(499, 1, 242, 1.000),
(500, 1, 243, 1.000),
(501, 1, 244, 1.000),
(503, 1, 245, 1.000),
(504, 1, 246, 1.000),
(505, 1, 247, 1.000),
(506, 1, 248, 1.000),
(507, 1, 249, 1.000),
(508, 1, 250, 1.000),
(509, 1, 251, 1.000),
(510, 1, 252, 1.000),
(511, 1, 253, 1.000),
(512, 1, 254, 1.000),
(513, 1, 255, 1.000),
(514, 1, 256, 1.000),
(515, 1, 257, 1.000),
(516, 1, 258, 1.000),
(517, 1, 259, 1.000),
(518, 1, 260, 1.000),
(519, 1, 261, 1.000),
(520, 1, 262, 1.000),
(521, 1, 263, 2.000),
(522, 1, 264, 1.000),
(523, 1, 265, 2.000),
(524, 1, 266, 2.000),
(525, 1, 267, 2.000),
(526, 1, 268, 1.000),
(527, 1, 269, 2.000),
(528, 1, 270, 2.000),
(529, 1, 271, 1.000),
(530, 1, 272, 1.000),
(531, 1, 273, 2.000),
(532, 1, 274, 2.000),
(533, 1, 275, 2.000),
(534, 1, 276, 2.000),
(535, 1, 277, 1.000),
(536, 1, 278, 1.000),
(570, 1, 279, 100.000),
(571, 1, 280, 40.000),
(575, 1, 281, 1.000),
(577, 1, 282, 1.000),
(585, 1, 283, 4.000),
(587, 1, 284, 44.000),
(621, 1, 285, 2.000),
(622, 1, 286, 2.000),
(623, 1, 287, 2.000),
(624, 1, 288, 2.000),
(630, 1, 289, 1.000),
(631, 1, 290, 2.000),
(637, 1, 291, 48.000);

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

--
-- Table structure for table `orders`
--

CREATE TABLE `orders` (
  `id` int(11) NOT NULL,
  `shift_id` int(11) DEFAULT NULL,
  `currency` varchar(10) DEFAULT 'EGP',
  `exchange_rate` decimal(10,4) DEFAULT 1.0000,
  `paid_amount` decimal(10,2) DEFAULT 0.00,
  `table_id` int(11) DEFAULT NULL,
  `total_amount` decimal(10,2) DEFAULT NULL,
  `order_date` datetime DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `orders`
--

INSERT INTO `orders` (`id`, `shift_id`, `currency`, `exchange_rate`, `paid_amount`, `table_id`, `total_amount`, `order_date`) VALUES
(12, 12, 'USD', 49.0000, 17.76, NULL, 870.00, '2026-07-04 17:50:55'),
(13, 12, 'USD', 49.0000, 17.76, NULL, 870.00, '2026-07-04 17:51:41'),
(14, 13, 'EGP', 1.0000, 840.00, NULL, 840.00, '2026-07-04 17:52:06'),
(15, 12, 'EGP', 1.0000, 2670.00, NULL, 2670.00, '2026-07-04 17:52:39'),
(16, 12, 'USD', 49.0000, 34.29, NULL, 1680.00, '2026-07-04 17:54:26'),
(17, 12, 'USD', 49.0000, 26.94, NULL, 1320.00, '2026-07-04 17:55:37'),
(18, 13, 'EGP', 1.0000, 1680.00, NULL, 1680.00, '2026-07-04 17:55:43'),
(19, 13, 'USD', 49.0000, 57.24, NULL, 2805.00, '2026-07-04 17:56:11'),
(20, 12, 'EGP', 1.0000, 3280.00, NULL, 3280.00, '2026-07-04 17:58:48'),
(21, 13, 'USD', 49.0000, 34.90, NULL, 1710.00, '2026-07-04 17:59:03'),
(22, 12, 'EGP', 1.0000, 3150.00, NULL, 3150.00, '2026-07-04 18:00:13'),
(23, 12, 'EGP', 1.0000, 3450.00, NULL, 3450.00, '2026-07-04 18:02:23'),
(24, 13, 'EGP', 1.0000, 4350.00, NULL, 4350.00, '2026-07-04 18:04:05'),
(25, 12, 'USD', 49.0000, 47.76, NULL, 2340.00, '2026-07-04 18:04:41'),
(26, 13, 'EGP', 1.0000, 4350.00, NULL, 4350.00, '2026-07-04 18:05:36'),
(27, 12, 'EGP', 1.0000, 1095.00, NULL, 1095.00, '2026-07-04 18:05:54'),
(28, 12, 'EGP', 1.0000, 1122.00, NULL, 1122.00, '2026-07-04 18:07:46'),
(29, 13, 'USD', 49.0000, 42.86, NULL, 2100.00, '2026-07-04 18:08:10'),
(32, 12, 'USD', 49.0000, 12.24, NULL, 600.00, '2026-07-04 18:09:54'),
(33, 12, 'EGP', 1.0000, 1983.00, NULL, 1983.00, '2026-07-06 10:14:43'),
(34, 13, 'EGP', 1.0000, 510.00, NULL, 510.00, '2026-07-06 10:15:52'),
(38, 12, 'EGP', 1.0000, 3495.00, NULL, 3495.00, '2026-07-06 10:32:38'),
(39, 14, 'EGP', 1.0000, 1206.00, NULL, 1206.00, '2026-07-06 10:40:54'),
(45, 24, 'USD', 1.0000, 0.00, NULL, 0.00, '2026-07-16 14:28:51'),
(48, 26, 'USD', 1.0000, 0.00, NULL, 0.00, '2026-07-16 15:33:06'),
(49, 26, 'USD', 1.0000, 0.00, NULL, 0.00, '2026-07-16 15:42:02');

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

--
-- Table structure for table `order_items`
--

CREATE TABLE `order_items` (
  `id` int(11) NOT NULL,
  `order_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` decimal(10,3) NOT NULL,
  `price` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `order_items`
--

INSERT INTO `order_items` (`id`, `order_id`, `product_id`, `quantity`, `price`, `total`, `created_at`) VALUES
(20, 12, 5, 1.000, 420.00, 420.00, '2026-07-04 14:50:55'),
(21, 12, 7, 1.000, 450.00, 450.00, '2026-07-04 14:50:55'),
(22, 13, 5, 1.000, 420.00, 420.00, '2026-07-04 14:51:41'),
(23, 13, 7, 1.000, 450.00, 450.00, '2026-07-04 14:51:41'),
(24, 14, 5, 2.000, 420.00, 840.00, '2026-07-04 14:52:06'),
(25, 15, 5, 1.000, 420.00, 420.00, '2026-07-04 14:52:39'),
(26, 15, 7, 5.000, 450.00, 2250.00, '2026-07-04 14:52:39'),
(27, 16, 5, 4.000, 420.00, 1680.00, '2026-07-04 14:54:26'),
(28, 17, 5, 1.000, 420.00, 420.00, '2026-07-04 14:55:37'),
(29, 17, 7, 2.000, 450.00, 900.00, '2026-07-04 14:55:37'),
(30, 18, 5, 4.000, 420.00, 1680.00, '2026-07-04 14:55:43'),
(31, 19, 5, 4.000, 420.00, 1680.00, '2026-07-04 14:56:11'),
(32, 19, 53, 5.000, 225.00, 1125.00, '2026-07-04 14:56:11'),
(33, 20, 173, 1.000, 1075.00, 1075.00, '2026-07-04 14:58:48'),
(34, 20, 172, 1.000, 105.00, 105.00, '2026-07-04 14:58:48'),
(35, 20, 5, 5.000, 420.00, 2100.00, '2026-07-04 14:58:48'),
(36, 21, 6, 1.000, 420.00, 420.00, '2026-07-04 14:59:03'),
(37, 21, 7, 1.000, 450.00, 450.00, '2026-07-04 14:59:03'),
(38, 21, 5, 2.000, 420.00, 840.00, '2026-07-04 14:59:03'),
(39, 22, 7, 7.000, 450.00, 3150.00, '2026-07-04 15:00:13'),
(40, 23, 7, 3.000, 450.00, 1350.00, '2026-07-04 15:02:23'),
(41, 23, 5, 5.000, 420.00, 2100.00, '2026-07-04 15:02:23'),
(42, 24, 7, 5.000, 450.00, 2250.00, '2026-07-04 15:04:05'),
(43, 24, 5, 5.000, 420.00, 2100.00, '2026-07-04 15:04:05'),
(44, 25, 174, 1.000, 240.00, 240.00, '2026-07-04 15:04:41'),
(45, 25, 5, 5.000, 420.00, 2100.00, '2026-07-04 15:04:41'),
(46, 26, 7, 5.000, 450.00, 2250.00, '2026-07-04 15:05:36'),
(47, 26, 5, 5.000, 420.00, 2100.00, '2026-07-04 15:05:36'),
(48, 27, 169, 2.000, 225.00, 450.00, '2026-07-04 15:05:54'),
(49, 27, 53, 1.000, 225.00, 225.00, '2026-07-04 15:05:54'),
(50, 27, 5, 1.000, 420.00, 420.00, '2026-07-04 15:05:54'),
(51, 28, 22, 9.000, 78.00, 702.00, '2026-07-04 15:07:46'),
(52, 28, 5, 1.000, 420.00, 420.00, '2026-07-04 15:07:46'),
(53, 29, 5, 5.000, 420.00, 2100.00, '2026-07-04 15:08:10'),
(56, 32, 2, 1.000, 300.00, 300.00, '2026-07-04 15:09:54'),
(57, 32, 1, 1.000, 300.00, 300.00, '2026-07-04 15:09:54'),
(58, 33, 176, 3.000, 576.00, 1728.00, '2026-07-06 07:14:43'),
(59, 33, 51, 1.000, 255.00, 255.00, '2026-07-06 07:14:43'),
(60, 34, 51, 2.000, 255.00, 510.00, '2026-07-06 07:15:52'),
(66, 38, 7, 6.000, 450.00, 2700.00, '2026-07-06 07:32:38'),
(67, 38, 51, 1.000, 255.00, 255.00, '2026-07-06 07:32:38'),
(68, 38, 25, 1.000, 108.00, 108.00, '2026-07-06 07:32:38'),
(69, 38, 81, 1.000, 432.00, 432.00, '2026-07-06 07:32:38'),
(70, 39, 175, 1.000, 540.00, 540.00, '2026-07-06 07:40:54'),
(71, 39, 177, 1.000, 450.00, 450.00, '2026-07-06 07:40:54'),
(72, 39, 25, 2.000, 108.00, 216.00, '2026-07-06 07:40:54'),
(79, 45, 4, 3.000, 12.00, 0.00, '2026-07-16 11:28:51'),
(80, 45, 12, 1.000, 95.00, 0.00, '2026-07-16 11:28:51'),
(81, 45, 8, 2.000, 13.00, 0.00, '2026-07-16 11:28:51'),
(82, 45, 291, 2.000, 15.00, 0.00, '2026-07-16 11:28:51'),
(83, 45, 7, 2.000, 9.00, 0.00, '2026-07-16 11:28:51'),
(84, 45, 41, 1.000, 14.00, 0.00, '2026-07-16 11:28:51'),
(85, 45, 40, 1.000, 14.00, 0.00, '2026-07-16 11:28:51'),
(88, 48, 3, 1.000, 12.00, 0.00, '2026-07-16 12:33:06'),
(89, 49, 169, 1.000, 5.00, 0.00, '2026-07-16 12:42:02');

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

--
-- Table structure for table `pages`
--

CREATE TABLE `pages` (
  `id` int(11) NOT NULL,
  `page_name` varchar(100) DEFAULT NULL,
  `page_url` varchar(100) DEFAULT NULL,
  `icon` varchar(50) DEFAULT 'fa-file',
  `is_menu` tinyint(1) DEFAULT 1
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `pages`
--

INSERT INTO `pages` (`id`, `page_name`, `page_url`, `icon`, `is_menu`) VALUES
(1, 'إدارة المستخدمين', 'manage_users.php', 'fa-users-cog', 1),
(2, 'المخزن الرئيسي', 'main_inventory.php', 'fa-warehouse', 1),
(3, 'لوحة التحكم', 'dashboard.php', 'fa-chart-line', 1),
(6, 'إعدادات النظام', 'settings.php', 'fa-cogs', 1),
(8, 'تحويل مخزني', 'stock_transfer.php', 'fa-exchange-alt', 1),
(9, 'نقطة البيع (POS)', 'pos.php', 'fa-cash-register', 1),
(10, 'إدارة الفروع والورديات', 'manage_structure.php', 'fa-sitemap', 1),
(11, 'تقارير المبيعات', 'reports.php', 'fa-chart-pie', 1),
(12, 'إدارة الفروع', 'branches.php', 'fa-building', 1),
(13, 'تفاصيل الفرع', 'branch_details.php', 'fa-info-circle', 0),
(14, 'الدعم الفني والصيانة', 'support.php', 'fa-screwdriver-wrench', 1),
(15, 'إدارة المشتريات', 'manage_purchases.php', 'fa-shopping-bag', 1),
(16, 'إدارة الموردين', 'suppliers_manager.php', 'fa-handshake', 1),
(17, 'فاتورة مشتريات', 'create_purchase_invoice.php', 'fa-file', 1),
(18, 'تقرير الارباح', 'profit_report.php', 'fa-file', 1);

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

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

CREATE TABLE `products` (
  `id` int(11) NOT NULL,
  `product_name` varchar(100) NOT NULL,
  `barcode` varchar(255) DEFAULT NULL,
  `min_limit` int(11) DEFAULT 5,
  `price` decimal(10,2) DEFAULT NULL,
  `unit` varchar(50) DEFAULT 'كيلو',
  `is_composite` tinyint(1) DEFAULT 0,
  `raw_product_id` int(11) DEFAULT NULL,
  `consumption_qty` decimal(10,3) DEFAULT 0.000
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `products`
--

INSERT INTO `products` (`id`, `product_name`, `barcode`, `min_limit`, `price`, `unit`, `is_composite`, `raw_product_id`, `consumption_qty`) VALUES
(1, 'Duqqa Araishi ', '6425993620852', 25, 6.00, 'قطعة', 0, NULL, 0.000),
(2, 'Thyme Duqqa ', '5942054272598', 25, 6.00, 'قطعة', 0, NULL, 0.000),
(3, 'Chocolate with malban', '3553059623297', 10, 12.00, 'قطعة', 0, NULL, 0.000),
(4, 'Chocolate with kunafa and pistachio', '0951504131998', 15, 12.00, 'قطعة', 0, NULL, 0.000),
(5, 'Pyramids shaped chocolate ', '3474065452642', 100, 10.00, 'قطعة', 0, NULL, 0.000),
(6, 'Tutankhamen shaped chocolate ', '4672557407825', 10, 10.00, 'قطعة', 0, NULL, 0.000),
(7, 'Dates', '3242585355739', 75, 9.00, 'قطعة', 0, NULL, 0.000),
(8, 'Small Belgium ChocolateTtutankhamon', '3418446757529', 0, 13.00, 'قطعة', 0, NULL, 0.000),
(9, 'Large Belgium Chocolate tutankhamon', '7458612255808', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(10, 'Alia dates with chocolate _9pieces', '3586000345822', 0, 28.00, 'قطعة', 0, NULL, 0.000),
(11, 'Alia dates with chocolate _24pieces', '1337713458213', 0, 73.00, 'قطعة', 0, NULL, 0.000),
(12, 'Alia dates with chocolate _36pieces', '5881758818383', 0, 95.00, 'قطعة', 0, NULL, 0.000),
(13, '------------', '2151567609441', 0, 0.00, 'قطعة', 0, NULL, 0.000),
(14, 'Porcelain teapot', '8539430812272', 0, 18.00, 'قطعة', 0, NULL, 0.000),
(15, 'Colored Metal Pocket Mirror', '4657752207713', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(16, 'Metal pyramids', '8163896848384', 0, 1800.00, 'قطعة', 0, NULL, 0.000),
(17, 'Raw clover Honey', '9175686827375', 0, 7.00, 'قطعة', 0, NULL, 0.000),
(18, ' Medium Metal pyramids', '6259277222447', 0, 780.00, 'قطعة', 0, NULL, 0.000),
(19, 'Raw Citrus Honey', '6922663611362', 0, 7.00, 'قطعة', 0, NULL, 0.000),
(20, 'Raw Sider Honey', '1381271806393', 0, 22.00, 'قطعة', 0, NULL, 0.000),
(21, 'Anise', '9606314393513', 0, 3.00, 'قطعة', 0, NULL, 0.000),
(22, 'Chamomile', '3625364367270', 0, 3.00, 'قطعة', 0, NULL, 0.000),
(23, 'Garden Sage', '6158656412122', 0, 2.00, 'قطعة', 0, NULL, 0.000),
(24, 'Turmeric', '0865207940690', 0, 3.00, 'قطعة', 0, NULL, 0.000),
(25, 'Hibiscus', '9407114553153', 0, 4.00, 'قطعة', 0, NULL, 0.000),
(26, 'Grounded Cinnamon', '3863654389467', 0, 2.00, 'قطعة', 0, NULL, 0.000),
(27, 'Dry Mint', '7361333574914', 0, 2.00, 'قطعة', 0, NULL, 0.000),
(28, 'Metal medium 3sections', '9874014346183', 0, 480.00, 'قطعة', 0, NULL, 0.000),
(29, 'Fine Cumin', '2337419598686', 0, 3.00, 'قطعة', 0, NULL, 0.000),
(30, 'Metal vase 2hands', '5615345535491', 0, 1950.00, 'قطعة', 0, NULL, 0.000),
(31, 'Paper Knife', '7850291294400', 2, 6.00, 'قطعة', 0, NULL, 0.000),
(32, 'Blue Tea', '7806332393525', 0, 23.00, 'قطعة', 0, NULL, 0.000),
(33, 'Rose Tea', '7674353978209', 0, 15.00, 'قطعة', 0, NULL, 0.000),
(34, 'Red Tea', '4043574734202', 0, 6.00, 'قطعة', 0, NULL, 0.000),
(35, 'Green Tea', '1239859956470', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(36, 'Simsiya', '9431829614824', 0, 14.00, 'قطعة', 0, NULL, 0.000),
(37, 'Fuliya', '9192607098189', 0, 14.00, 'قطعة', 0, NULL, 0.000),
(38, 'Aswanian Doom', '6286217241552', 0, 6.00, 'قطعة', 0, NULL, 0.000),
(39, 'Small Metal Jewellery Box ', '7918054480651', 1, 22.00, 'قطعة', 0, NULL, 0.000),
(40, 'Cashew ne', '3343323789330', 0, 14.00, 'قطعة', 0, NULL, 0.000),
(41, 'Roasted Cashews', '5842383678159', 0, 14.00, 'قطعة', 0, NULL, 0.000),
(42, ' Metal Medium Box', '9874014346183', 0, 1500.00, 'قطعة', 0, NULL, 0.000),
(43, 'Roasted Peanut-Cheese Flavor', '4085209436468', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(44, 'Metal pyramids small', '8012417284728', 0, 330.00, 'قطعة', 0, NULL, 0.000),
(45, 'Roasted peanut-Chilli Flavor', '6215493087819', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(46, 'Porcelain Mug With Plate and Cover ', '3182962180551', 1, 20.00, 'قطعة', 0, NULL, 0.000),
(47, 'Roasted peanut-Ketchup Flavor', '3143704105172', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(48, 'Roasted peanut-Spices Flavor', '2123856288622', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(49, 'Roasted corn-Spices Flavor', '1712419691747', 0, 6.00, 'قطعة', 0, NULL, 0.000),
(50, 'Roasted corn-cheese Flavor', '6550968136469', 0, 6.00, 'قطعة', 0, NULL, 0.000),
(51, 'Hibiscus jam', '7446984420108', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(52, 'Orange jam', '8639557600445', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(53, 'Sesame Tahini ', '7711651807926', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(54, 'Olive oil-250 ml', '3379835208917', 25, 14.00, 'قطعة', 0, NULL, 0.000),
(55, 'Noul Red Bag', '0772302048459', 0, 190.00, 'قطعة', 0, NULL, 0.000),
(56, 'Noul Blue Bag', '2351627276396', 0, 190.00, 'قطعة', 0, NULL, 0.000),
(57, 'Eco Bag Egypt', '9868754211683', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(58, 'Eco Bag Nefertiti', '0901222105284', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(59, 'Eco Bag Ankh', '3212483994903', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(60, 'Small Hippo Statues', '8756472390038', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(61, 'Eco Bag Egyptian Symbols', '1400843166325', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(62, 'pharaonic Jewelry Box', '2959226465743', 0, 48.00, 'قطعة', 0, NULL, 0.000),
(63, 'Small Cat Statues(Bastet)', '2562771842429', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(64, 'Hand Made pharaonic Girl Doll', '2622220450560', 0, 50.00, 'قطعة', 0, NULL, 0.000),
(65, 'Coloring Book A5 Size', '5538537528223', 0, 3.00, 'قطعة', 0, NULL, 0.000),
(66, 'Hand Made Pottery', '4076076491674', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(67, 'Coloring Book A4 Size', '0771277051783', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(68, 'Puzzle of Tutankhamon Mask-120 pieces', '7877708301091', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(69, 'Brown Anubis_L', '9525132855507', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(70, 'puzzle of Nefertiti -208 pieces', '3578531038125', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(71, 'Brown Anubis_XXL', '8099979169858', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(72, 'Brown Anubis_M', '7525669575392', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(73, 'Brown Anubis_XL', '2235144691190', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(74, 'Post Card', '0583693306985', 0, 1.00, 'قطعة', 0, NULL, 0.000),
(75, 'White Anubis_XXL', '4238384771764', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(76, 'Book mark', '9683240446158', 0, 1.00, 'قطعة', 0, NULL, 0.000),
(77, 'White Anubis_XL', '5017624262308', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(78, 'White Anubis_L', '0071182539457', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(79, 'White Anubis_M', '3448702018805', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(80, '-----------', '4355660168604', 0, 0.00, 'قطعة', 0, NULL, 0.000),
(81, 'Rounded Coaster set of 4', '4355660168604', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(82, 'Green Anubis _M ', '2957180189688', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(83, 'Green Anubis L', '7280771493224', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(84, 'Green Anubis XL', '5743299945219', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(85, 'Green Anubis XXL ', '8099979169858', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(86, 'Black Anubis M ', '4227291019844', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(87, 'Black Anubis L', '9822426971419', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(88, 'Pharaonic Notebook', '4593166933145', 0, 3.00, 'قطعة', 0, NULL, 0.000),
(89, 'Black Anubis XL', '3371378859857', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(90, 'Pharaonic Metal opener', '0834797055172', 0, 5.00, 'قطعة', 0, NULL, 0.000),
(91, 'Black Anubis XXL', '5308845919302', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(92, 'Black Anubis T-Shirt L ', '3629681863462', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(93, 'Black Anubis T-Shirt M', '4227291019844', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(94, 'Black Anubis T-Shirt - XL', '8736389691719', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(95, 'Beige Anubis T-Shirt - L', '1649186701744', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(96, 'Beige Anubis T-Shirt - M', '2570001062924', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(97, 'Beige Anubis T-Shirt - XL ', '0341604259327', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(98, 'Blue Anubis T-Shirt - L', '5931274824645', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(99, 'Blue Anubis T-Shirt - M', '7019008849397', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(100, 'Blue Anubis T-Shirt - XL', '5092688414629', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(101, 'Beige Ankh T-Shirt - L', '7900579391698', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(102, 'Beige Ankh T-Shirt - M ', '8362591397785', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(103, 'Beige Ankh T-Shirt - XL', '0746701920594', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(104, 'Black Ankh T-Shirt - L', '1243301094922', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(105, 'Black Ankh T-Shirt - M ', '5431569074245', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(106, 'Black Ankh T-Shirt - XL ', '7218636397012', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(107, 'Blue Ankh T-Shirt - L', '7223584642477', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(108, 'Blue Ankh T-Shirt - M', '7238382106090', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(109, 'Beige Scarab T- Shirt - L', '6267823075222', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(110, 'Beige Scarab T- Shirt - M ', '0214438369145', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(111, 'Beige Scarab T- Shirt - XL', '7618660486377', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(112, 'Black Scarab T- Shirt - L', '2227613523799', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(113, 'Black Scarab T- Shirt - M ', '0634263344593', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(114, 'Black Scarab T- Shirt - XL', '5497424949271', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(115, 'Blue Scarab T- Shirt - L', '2066729208092', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(116, 'Blue Scarab T- Shirt - M', '4190196874058', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(117, 'Blue Scarab T- Shirt - XL', '4223312099754', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(118, 'Beige Horus Eye T-Shirt - L', '9353990202492', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(119, 'Beige Horus Eye T-Shirt - M', '7100627599160', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(120, 'Beige Horus Eye T-Shirt - XL ', '1118462536910', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(121, 'Black Horus Eye T-Shirt - L', '4291495367171', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(122, 'Black Horus Eye T-Shirt - M ', '7132463738327', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(123, 'Black Horus Eye T-Shirt - XL', '3698573661851', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(124, 'Blue Horus Eye T-Shirt - L', '4487977698199', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(125, 'Blue Horus Eye T-Shirt - M ', '1783643912920', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(126, 'Blue Horus Eye T-Shirt - XL', '2607966520564', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(127, 'Beige Egyptian Symbol T-Shirt - L', '3030783950725', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(128, 'Beige Egyptian Symbol T-Shirt - M ', '8631841010735', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(129, 'Beige Egyptian Symbol T-Shirt - XL', '6603563678518', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(130, 'Black Egyptian Symbol T-Shirt - L', '2157064130279', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(131, 'Black Egyptian Symbol T-Shirt - M', '7185278194761', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(132, 'Black Egyptian Symbol T-Shirt - XL', '5010891801497', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(133, 'Blue Egyptian Symbol T-Shirt - L', '8644596467855', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(134, 'Blue Egyptian Symbol T-Shirt - M ', '0846896334983', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(135, 'Blue Egyptian Symbol T-Shirt - XL', '3409758263164', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(136, ' Henna Lawsonia Inermis Powder', '6223003831615', 0, 6.00, 'قطعة', 0, NULL, 0.000),
(137, ' Nefertari lip balm', '6223003832346', 0, 9.00, 'قطعة', 0, NULL, 0.000),
(138, 'Ankh Soap', '6223003830526', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(139, 'Bath salts with natural lavender ', '6223003831325', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(140, 'Egyptian glow', '6223003833169', 0, 17.00, 'قطعة', 0, NULL, 0.000),
(141, 'Embroidered Towel with Pharaonic Design', '6223003832827', 0, 8.00, 'قطعة', 0, NULL, 0.000),
(142, 'Eye of Horus Set', '622300383370', 0, 25.00, 'قطعة', 0, NULL, 0.000),
(143, 'Geranium Box ', '6223003832551', 0, 135.00, 'قطعة', 0, NULL, 0.000),
(144, 'Hand Towel with crochet trims', '6223003832810', 0, 20.00, 'قطعة', 0, NULL, 0.000),
(145, 'Horus Eye Soap', '6223003830472', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(146, 'Kohl for the Eyes', '6223003832360', 0, 20.00, 'قطعة', 0, NULL, 0.000),
(147, 'Large Pharaonic Set ', '6223003833428', 0, 70.00, 'قطعة', 0, NULL, 0.000),
(148, 'Lavender Body Splash ', '6223003832100', 0, 14.00, 'قطعة', 0, NULL, 0.000),
(149, 'Lavender Soap', '6223003830229', 0, 9.00, 'قطعة', 0, NULL, 0.000),
(150, 'Lemon Soap ', '6223003830267', 0, 9.00, 'قطعة', 0, NULL, 0.000),
(151, 'Milk Bath', '6223003831172', 0, 21.00, 'قطعة', 0, NULL, 0.000),
(152, 'Nefertari Aleo vera Extract', '6223003831752', 0, 15.00, 'قطعة', 0, NULL, 0.000),
(153, 'Nefertari Rose face scrub', '6223003832162', 0, 24.00, 'قطعة', 0, NULL, 0.000),
(154, 'Nefertari coconut body scrub ', '6223003832261', 0, 22.00, 'قطعة', 0, NULL, 0.000),
(155, 'Nefertari natural coffee beans body scrub', '6223003832209', 0, 21.00, 'قطعة', 0, NULL, 0.000),
(156, 'Pharaonic Towel Set of 3', '0190687473111', 0, 28.00, 'قطعة', 0, NULL, 0.000),
(157, 'Queen Tiyi Box ', '6223003833855', 0, 46.00, 'قطعة', 0, NULL, 0.000),
(158, 'Red sea salt with chamomile', '6223003831271', 0, 9.00, 'قطعة', 0, NULL, 0.000),
(159, 'Rose petal soap ', '6223003830243', 0, 9.00, 'قطعة', 0, NULL, 0.000),
(160, 'Safaga Red Sea Salt', '6223003831233', 0, 8.00, 'قطعة', 0, NULL, 0.000),
(161, 'Safaga Sea salt with lavender flowers ', '6223003831288', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(162, 'Scarab Shaped Soap', '6223003830465', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(163, 'Sweet Almond Body Oil With Rose', '6223003830632', 0, 20.00, 'قطعة', 0, NULL, 0.000),
(164, 'Sweet Almond Oil with vanilla', '6223003830656', 0, 20.00, 'قطعة', 0, NULL, 0.000),
(165, 'Sweet Almond With Lavender ', '6223003830649', 0, 20.00, 'قطعة', 0, NULL, 0.000),
(166, 'Vanilla Body splash ', '6223003832087', 0, 14.00, 'قطعة', 0, NULL, 0.000),
(167, 'White musk body splash', '6223003832155', 2, 12.00, 'قطعة', 0, NULL, 0.000),
(168, '-----', '2622220450560', 0, 0.00, 'قطعة', 0, NULL, 0.000),
(169, 'Pickels ', '1247784998318', 5, 5.00, 'قطعة', 0, NULL, 0.000),
(170, 'Porcelain Coffee Set', '5257718549422', 1, 19.00, 'قطعة', 0, NULL, 0.000),
(171, 'Fine Coriander ', '3242585355739', 20, 2.00, 'قطعة', 0, NULL, 0.000),
(172, 'Siwa Salt ', '6480469040324', 0, 2.00, 'قطعة', 0, NULL, 0.000),
(173, 'Olive oil 250ml', '3379835208917', 0, 23.00, 'قطعة', 0, NULL, 0.000),
(174, 'Single Pharaonic Play Cards ', '2315060898788', 0, 240.00, 'قطعة', 0, NULL, 0.000),
(175, 'Colored Porcelain Mug', '0166277841279', 5, 11.00, 'قطعة', 0, NULL, 0.000),
(176, 'Squared pharaonic coaster', '9858893536465', 0, 12.00, 'قطعة', 0, NULL, 0.000),
(177, '-----', '3548368430957', 0, 0.00, 'قطعة', 0, NULL, 0.000),
(178, 'Porcelain Shot Glass', '3548368430957', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(179, 'Sinawe Alabaria ', '202628242785', 15, 4.00, 'قطعة', 0, NULL, 0.000),
(180, 'Vest YSV01', '202661097655', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(181, 'Vest YSV02', '202699947104', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(182, 'Vest YSV03', '202680004251', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(183, 'Vest YSV04', '202668540543', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(184, 'Vest YSV05', '202691225595', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(185, 'Vest YSV06', '202643314124', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(186, 'Dress YSD01', '202698579095', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(187, 'Dress YSD02', '202626591166', 0, 80.00, 'قطعة', 0, NULL, 0.000),
(188, 'T-Shirt YBP01', '202685334421', 0, 38.00, 'قطعة', 0, NULL, 0.000),
(189, 'T-Shirt YBP02', '202678031471', 0, 38.00, 'قطعة', 0, NULL, 0.000),
(190, 'Shawl YSS01', '202658768473', 0, 61.00, 'قطعة', 0, NULL, 0.000),
(191, 'Shawl YSS02', '202612590162', 0, 61.00, 'قطعة', 0, NULL, 0.000),
(192, 'Shawl YSS03', '202680382813', 0, 61.00, 'قطعة', 0, NULL, 0.000),
(193, 'Shawl YSS04', '202656618401', 0, 61.00, 'قطعة', 0, NULL, 0.000),
(194, 'Seated Camel Fur With 2 Humps', '202655211294', 1, 6.00, 'قطعة', 0, NULL, 0.000),
(195, 'Standing Camel Fur', '202655492350', 1, 8.00, 'قطعة', 0, NULL, 0.000),
(196, 'Metal Small Shot Glass ', '202661677581', 1, 3.00, 'قطعة', 0, NULL, 0.000),
(197, 'Metal Large Shot Glass ', '202660489225', 1, 5.00, 'قطعة', 0, NULL, 0.000),
(198, 'Pharaonic Metal Pen ', '202636019111', 1, 9.00, 'قطعة', 0, NULL, 0.000),
(199, 'Peacock Shaped Medium Mirror', '202674455331', 1, 14.00, 'قطعة', 0, NULL, 0.000),
(200, 'One Size Small Metal Pyramid Set Of 3', '202680318171', 1, 7.00, 'قطعة', 0, NULL, 0.000),
(201, 'Three Size Small Metal Pyramid Set Of 3', '202692959630', 1, 10.00, 'قطعة', 0, NULL, 0.000),
(202, 'Three Size Large Metal Pyramid Set Of 3', '202685086062', 1, 28.00, 'قطعة', 0, NULL, 0.000),
(203, 'Three Size Medium Metal Pyramid Set Of 3', '202614546957', 1, 12.00, 'قطعة', 0, NULL, 0.000),
(204, 'Pharaonic Corkscrew ', '202617591880', 3, 19.00, 'قطعة', 0, NULL, 0.000),
(205, 'Double Pharaonic Play Cards', '202615133369', 2, 5.00, 'قطعة', 0, NULL, 0.000),
(206, 'Small Porcelain Plate', '202634198676', 1, 9.00, 'قطعة', 0, NULL, 0.000),
(207, 'Medium Porcelain Plate', '202615706070', 1, 13.00, 'قطعة', 0, NULL, 0.000),
(208, 'Glass Shot ', '202642382764', 2, 2.00, 'قطعة', 0, NULL, 0.000),
(209, 'Pharaonic Wall Portrait', '202674695375', 1, 14.00, 'قطعة', 0, NULL, 0.000),
(210, 'Metal Square Large Vase', '202610398981', 1, 32.00, 'قطعة', 0, NULL, 0.000),
(211, 'Fridge Magnetic Ankh ', '202670763256', 5, 1.00, 'قطعة', 0, NULL, 0.000),
(212, 'Porcelain Set of 2', '202690698346', 1, 22.00, 'قطعة', 0, NULL, 0.000),
(213, 'Pharaonic Fridge Magnetic ', '202619235679', 5, 2.00, 'قطعة', 0, NULL, 0.000),
(214, 'Large Camel From Fur', '202633043722', 1, 7.00, 'قطعة', 0, NULL, 0.000),
(215, 'Metal Pharaonic Desk Card Holder', '202668259420', 1, 8.00, 'قطعة', 0, NULL, 0.000),
(216, 'Sand Magnetic ', '202645341680', 5, 2.00, 'قطعة', 0, NULL, 0.000),
(217, 'Dice Keychain', '202622259773', 2, 4.00, 'قطعة', 0, NULL, 0.000),
(218, 'Cartouche Keychain', '202686219120', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(219, 'Scarab Keychain ', '202644807840', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(220, 'Pyramid Keychain', '202629324367', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(221, 'Scarab Keychain With Robe ', '202678157667', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(222, 'Metal Wide Jug ', '202637381298', 1, 30.00, 'قطعة', 0, NULL, 0.000),
(223, 'Peacock Shaped Small Mirror', '202659617800', 1, 6.00, 'قطعة', 0, NULL, 0.000),
(224, 'Metal Large Jewellery Box ', '202647899978', 1, 64.00, 'قطعة', 0, NULL, 0.000),
(225, 'Porcelain Tea Cup without Plate ', '202617173227', 2, 8.00, 'قطعة', 0, NULL, 0.000),
(226, 'Porcelain Soup Mug ', '202640045557', 2, 12.00, 'قطعة', 0, NULL, 0.000),
(227, 'Small Porcelain Mug', '202621278457', 3, 11.00, 'قطعة', 0, NULL, 0.000),
(228, 'Large Porcelain Mug', '202692222981', 5, 13.00, 'قطعة', 0, NULL, 0.000),
(229, 'Medium Metal Jewellery Box ', '202695406199', 1, 32.00, 'قطعة', 0, NULL, 0.000),
(230, 'Chess Box 6 In 1', '202664693535', 1, 29.00, 'قطعة', 0, NULL, 0.000),
(231, 'Camel Corkscrew', '202617992750', 2, 16.00, 'قطعة', 0, NULL, 0.000),
(232, 'Leather Pocket Mirror ', '202637734594', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(233, 'Set of 12 Pencils', '202644086681', 2, 4.00, 'قطعة', 0, NULL, 0.000),
(234, 'Porcelain Opener shaped on Camel with Magnetic ', '202664199366', 2, 3.00, 'قطعة', 0, NULL, 0.000),
(235, 'Metal Small Jewellery box - 3 Section ', '202671335470', 1, 41.00, 'قطعة', 0, NULL, 0.000),
(236, 'Coaster ', '202624557634', 3, 1.00, 'قطعة', 0, NULL, 0.000),
(237, 'Shawl #1', '202617079123', 0, 140.00, 'قطعة', 0, NULL, 0.000),
(238, 'Runner #2', '202617135705', 0, 96.00, 'قطعة', 0, NULL, 0.000),
(239, 'Runner #3', '202652175288', 0, 105.00, 'قطعة', 0, NULL, 0.000),
(240, 'Runner #8', '202613383966', 0, 90.00, 'قطعة', 0, NULL, 0.000),
(241, 'Runner #9', '202672896298', 0, 34.00, 'قطعة', 0, NULL, 0.000),
(242, 'Runner #10', '202681588817', 0, 40.00, 'قطعة', 0, NULL, 0.000),
(243, 'Shawl #12', '202652215668', 0, 415.00, 'قطعة', 0, NULL, 0.000),
(244, 'Shawl #13', '202644401748', 0, 415.00, 'قطعة', 0, NULL, 0.000),
(245, 'Shawl #14', '202688912060', 0, 450.00, 'قطعة', 0, NULL, 0.000),
(246, 'Shawl #15', '202613509660', 0, 383.00, 'قطعة', 0, NULL, 0.000),
(247, 'Shawl #16', '202660449340', 0, 160.00, 'قطعة', 0, NULL, 0.000),
(248, 'Shawl #17', '202659309474', 0, 447.00, 'قطعة', 0, NULL, 0.000),
(249, 'Shawl #18', '202646000506', 0, 415.00, 'قطعة', 0, NULL, 0.000),
(250, 'Shawl #19', '202699507702', 0, 478.00, 'قطعة', 0, NULL, 0.000),
(251, 'Shawl #20', '202693371357', 0, 320.00, 'قطعة', 0, NULL, 0.000),
(252, 'Shawl #21', '202644547367', 0, 320.00, 'قطعة', 0, NULL, 0.000),
(253, 'Shawl #22', '202673630291', 0, 320.00, 'قطعة', 0, NULL, 0.000),
(254, 'Shawl #23', '202635381085', 0, 445.00, 'قطعة', 0, NULL, 0.000),
(255, 'Shawl #24', '202695554635', 0, 350.00, 'قطعة', 0, NULL, 0.000),
(256, 'Shawl #26', '202665119959', 0, 445.00, 'قطعة', 0, NULL, 0.000),
(257, 'Shawl #27', '202655917787', 0, 383.00, 'قطعة', 0, NULL, 0.000),
(258, 'Shawl #29', '202672428648', 0, 383.00, 'قطعة', 0, NULL, 0.000),
(259, 'Shawl #31', '202611988569', 0, 445.00, 'قطعة', 0, NULL, 0.000),
(260, 'Shawl #33', '202685609243', 0, 415.00, 'قطعة', 0, NULL, 0.000),
(261, 'Shawl #35', '202672819498', 0, 450.00, 'قطعة', 0, NULL, 0.000),
(262, 'Galabiya #36', '202666703990', 0, 225.00, 'قطعة', 0, NULL, 0.000),
(263, 'Bag #37', '202670962023', 0, 45.00, 'قطعة', 0, NULL, 0.000),
(264, 'Bag #38', '202635149206', 0, 32.00, 'قطعة', 0, NULL, 0.000),
(265, 'Bag #39', '202671585991', 0, 38.00, 'قطعة', 0, NULL, 0.000),
(266, 'Bag #40', '202611868249', 0, 109.00, 'قطعة', 0, NULL, 0.000),
(267, 'Bag #41', '202689635630', 0, 109.00, 'قطعة', 0, NULL, 0.000),
(268, 'Bag #42', '202644453411', 0, 109.00, 'قطعة', 0, NULL, 0.000),
(269, 'Bag #43', '202618125195', 0, 109.00, 'قطعة', 0, NULL, 0.000),
(270, 'Bag #44', '202655508848', 0, 109.00, 'قطعة', 0, NULL, 0.000),
(271, 'Bag #45', '202685510809', 0, 109.00, 'قطعة', 0, NULL, 0.000),
(272, 'Bag #50', '202657948234', 0, 77.00, 'قطعة', 0, NULL, 0.000),
(273, 'Bag #51', '202667746098', 0, 83.00, 'قطعة', 0, NULL, 0.000),
(274, 'Bag #52', '202653979496', 0, 83.00, 'قطعة', 0, NULL, 0.000),
(275, 'Bag #53', '202618409673', 0, 83.00, 'قطعة', 0, NULL, 0.000),
(276, 'Bag #54', '202675031684', 0, 83.00, 'قطعة', 0, NULL, 0.000),
(277, 'Bag #55', '202689816411', 0, 83.00, 'قطعة', 0, NULL, 0.000),
(278, 'Cushion Cover #56', '202676141221', 0, 115.00, 'قطعة', 0, NULL, 0.000),
(279, 'Meowty Cat', '202644970931', 5, 7.00, 'قطعة', 0, NULL, 0.000),
(280, 'Pharaonic Tie', '202634300995', 2, 18.00, 'قطعة', 0, NULL, 0.000),
(281, 'Shawl #25', '202661729750', 0, 415.00, 'قطعة', 0, NULL, 0.000),
(282, 'Shawl #28', '202680323330', 0, 478.00, 'قطعة', 0, NULL, 0.000),
(283, 'Metal one Size Medium set of 3', '202650953748', 1, 12.00, 'قطعة', 0, NULL, 0.000),
(284, 'Siwan Olive Oil', '202620971894', 4, 18.00, 'قطعة', 0, NULL, 0.000),
(285, 'Siwa Salt 800G', '202699179758', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(286, 'Siwa Salt 400G', '202661861072', 0, 7.00, 'قطعة', 0, NULL, 0.000),
(287, 'Siwa Bath salt ', '202667862898', 0, 10.00, 'قطعة', 0, NULL, 0.000),
(288, 'Siwa Bath Salt 400G', '202687291433', 0, 6.00, 'قطعة', 0, NULL, 0.000),
(289, 'Glass Chess', '202671817816', 0, 95.00, 'قطعة', 0, NULL, 0.000),
(290, 'XL-Blue Ankh T-Shirt ', '202694687721', 0, 30.00, 'قطعة', 0, NULL, 0.000),
(291, 'Dates With Mango', '202670828689', 0, 15.00, 'قطعة', 0, NULL, 0.000);

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

--
-- Table structure for table `purchase_invoices`
--

CREATE TABLE `purchase_invoices` (
  `id` int(11) NOT NULL,
  `supplier_id` int(11) NOT NULL,
  `branch_id` int(11) NOT NULL,
  `total_amount` decimal(10,2) NOT NULL,
  `paid_amount` decimal(10,2) DEFAULT 0.00,
  `invoice_date` datetime DEFAULT current_timestamp(),
  `next_payment_date` date DEFAULT NULL,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `purchase_invoices`
--

INSERT INTO `purchase_invoices` (`id`, `supplier_id`, `branch_id`, `total_amount`, `paid_amount`, `invoice_date`, `next_payment_date`, `created_at`) VALUES
(1, 1, 0, 30800.00, 0.00, '2026-07-08 13:02:46', '2026-07-15', '2026-07-08 10:02:46');

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

--
-- Table structure for table `purchase_items`
--

CREATE TABLE `purchase_items` (
  `id` int(11) NOT NULL,
  `purchase_id` int(11) NOT NULL,
  `product_id` int(11) NOT NULL,
  `quantity` decimal(10,3) NOT NULL,
  `cost_price` decimal(10,2) NOT NULL,
  `total` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `purchase_items`
--

INSERT INTO `purchase_items` (`id`, `purchase_id`, `product_id`, `quantity`, `cost_price`, `total`) VALUES
(1, 1, 5, 100.000, 140.00, 14000.00),
(2, 1, 7, 90.000, 150.00, 13500.00),
(3, 1, 3, 15.000, 220.00, 3300.00);

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

--
-- Table structure for table `settings`
--

CREATE TABLE `settings` (
  `id` int(11) NOT NULL,
  `system_name` varchar(100) DEFAULT 'مطاحن البن',
  `logo` varchar(255) DEFAULT NULL,
  `primary_color` varchar(20) DEFAULT '#70483c'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `settings`
--

INSERT INTO `settings` (`id`, `system_name`, `logo`, `primary_color`) VALUES
(1, 'kaba', NULL, '#70483c'),
(2, 'kaba', NULL, '#70483c');

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

--
-- Table structure for table `shifts`
--

CREATE TABLE `shifts` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `branch_id` int(11) DEFAULT NULL,
  `start_time` datetime DEFAULT current_timestamp(),
  `end_time` datetime DEFAULT NULL,
  `cash_start` decimal(10,2) DEFAULT NULL,
  `cash_start_usd` decimal(10,2) DEFAULT 0.00,
  `cash_start_jpy` decimal(10,2) DEFAULT 0.00,
  `egp_rate` decimal(10,4) NOT NULL DEFAULT 1.0000,
  `jpy_rate` decimal(10,4) DEFAULT 1.0000,
  `cash_end` decimal(10,2) DEFAULT NULL,
  `cash_end_usd` decimal(10,2) DEFAULT 0.00,
  `cash_end_jpy` decimal(10,2) DEFAULT 0.00,
  `status` enum('open','closed') DEFAULT 'open'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `shifts`
--

INSERT INTO `shifts` (`id`, `user_id`, `branch_id`, `start_time`, `end_time`, `cash_start`, `cash_start_usd`, `cash_start_jpy`, `egp_rate`, `jpy_rate`, `cash_end`, `cash_end_usd`, `cash_end_jpy`, `status`) VALUES
(1, 1, 1, '2026-07-04 11:49:05', '2026-07-04 12:27:32', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(2, 7, 1, '2026-07-04 11:55:55', '2026-07-04 11:56:01', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(3, 1, 1, '2026-07-04 12:27:57', '2026-07-04 12:31:45', 0.00, 0.00, 0.00, 1.0000, 1.0000, 1000.00, 0.00, 0.00, 'closed'),
(4, 1, 1, '2026-07-04 12:44:09', '2026-07-04 16:42:58', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(5, 7, 1, '2026-07-04 13:14:58', NULL, 0.00, 0.00, 0.00, 1.0000, 1.0000, NULL, 0.00, 0.00, 'open'),
(6, 9, 1, '2026-07-04 15:15:14', '2026-07-04 16:01:25', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(7, 8, 1, '2026-07-04 15:39:36', '2026-07-04 16:58:53', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(8, 9, 1, '2026-07-04 16:15:59', '2026-07-04 17:04:03', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(9, 1, 1, '2026-07-04 16:43:00', '2026-07-04 16:44:14', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(10, 1, 1, '2026-07-04 16:44:50', '2026-07-05 16:25:28', 0.00, 0.00, 0.00, 1.0000, 1.0000, 0.00, 0.00, 0.00, 'closed'),
(11, 8, 1, '2026-07-04 17:01:02', '2026-07-04 17:02:00', 0.00, 0.00, 0.00, 49.0000, 0.3000, 0.00, 0.00, 0.00, 'closed'),
(12, 8, 1, '2026-07-04 17:02:22', '2026-07-09 12:26:37', 0.00, 0.00, 0.00, 49.0000, 0.3000, 0.00, 0.00, 0.00, 'closed'),
(13, 9, 1, '2026-07-04 17:04:52', '2026-07-16 13:45:17', 11300.00, 0.00, 0.00, 49.0000, 0.3000, 0.00, 0.00, 0.00, 'closed'),
(14, 1, 1, '2026-07-05 16:26:06', '2026-07-06 14:22:39', 16000.00, 0.00, 0.00, 48.8500, 0.3000, 0.00, 0.00, 0.00, 'closed'),
(15, 1, 1, '2026-07-06 14:23:01', '2026-07-09 11:34:38', 0.00, 0.00, 0.00, 48.0000, 0.3000, 0.00, 0.00, 0.00, 'closed'),
(16, 8, 1, '2026-07-09 12:28:20', '2026-07-09 12:31:38', 2000.00, 200.00, 15000.00, 49.0000, 0.3000, 2000.00, 200.00, 15000.00, 'closed'),
(17, 8, 1, '2026-07-09 13:53:13', '2026-07-09 13:53:35', 0.00, 0.00, 0.00, 49.0000, 0.3000, 0.00, 0.00, 0.00, 'closed'),
(18, 8, 1, '2026-07-09 14:40:57', '2026-07-09 14:41:20', 0.00, 0.00, 0.00, 0.5000, 150.0000, 0.00, 0.00, 0.00, 'closed'),
(19, 8, 1, '2026-07-09 14:41:50', '2026-07-09 14:42:22', 0.00, 0.00, 0.00, 49.0000, 150.0000, 0.00, 0.00, 0.00, 'closed'),
(20, 1, 1, '2026-07-09 21:28:29', NULL, 0.00, 0.00, 0.00, 49.0000, 150.0000, NULL, 0.00, 0.00, 'open'),
(21, 8, 1, '2026-07-11 14:09:13', '2026-07-11 14:33:39', 2000.00, 200.00, 15000.00, 49.6000, 150.0000, 2000.00, 200.00, 15000.00, 'closed'),
(22, 8, 1, '2026-07-12 14:06:12', '2026-07-14 12:33:01', 2000.00, 200.00, 15000.00, 49.8600, 150.0000, 2000.00, 200.00, 15000.00, 'closed'),
(23, 8, 1, '2026-07-14 12:33:28', '2026-07-16 13:44:02', 2000.00, 200.00, 15000.00, 50.0000, 150.0000, 0.00, 0.00, 0.00, 'closed'),
(24, 8, 1, '2026-07-16 13:44:36', '2026-07-16 15:24:27', 2000.00, 200.00, 15000.00, 50.4500, 150.0000, 2000.00, 200.00, 15000.00, 'closed'),
(25, 9, 1, '2026-07-16 13:45:53', NULL, 2000.00, 200.00, 15000.00, 50.4500, 150.0000, NULL, 0.00, 0.00, 'open'),
(26, 8, 1, '2026-07-16 15:27:51', NULL, 2000.00, 200.00, 15000.00, 50.5000, 150.0000, NULL, 0.00, 0.00, 'open');

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

--
-- Table structure for table `stock_transfers`
--

CREATE TABLE `stock_transfers` (
  `id` int(11) NOT NULL,
  `product_id` int(11) DEFAULT NULL,
  `from_branch_id` int(11) DEFAULT NULL,
  `to_branch_id` int(11) DEFAULT NULL,
  `quantity` decimal(10,2) DEFAULT NULL,
  `transfer_date` timestamp NOT NULL DEFAULT current_timestamp(),
  `user_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `suppliers`
--

CREATE TABLE `suppliers` (
  `id` int(11) NOT NULL,
  `name` varchar(255) NOT NULL,
  `phone` varchar(50) DEFAULT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `balance` decimal(10,2) DEFAULT 0.00,
  `created_at` timestamp NOT NULL DEFAULT current_timestamp()
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `suppliers`
--

INSERT INTO `suppliers` (`id`, `name`, `phone`, `company_name`, `balance`, `created_at`) VALUES
(1, 'ناصر شعبان', '', 'ِشيكولاتة', 30800.00, '2026-07-08 10:01:01');

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

--
-- Table structure for table `tables`
--

CREATE TABLE `tables` (
  `id` int(11) NOT NULL,
  `table_number` varchar(10) DEFAULT NULL,
  `branch_id` int(11) DEFAULT NULL,
  `status` enum('available','occupied') DEFAULT 'available'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

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

--
-- Table structure for table `users`
--

CREATE TABLE `users` (
  `id` int(11) NOT NULL,
  `username` varchar(50) NOT NULL,
  `password` varchar(255) NOT NULL,
  `full_name` varchar(100) DEFAULT NULL,
  `branch_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `users`
--

INSERT INTO `users` (`id`, `username`, `password`, `full_name`, `branch_id`) VALUES
(1, 'admin', '$2y$10$92IXUNpkjO0rOQ5byMi.Ye4oKoEa3Ro9llC/.og/at2.uheWG/igi', 'المدير العام', 1),
(6, 'rana', '$2y$10$Kw9uGMCnnlU35JsLubpnS.DXQ3cnGWarHkibUsBljWUphx/v0Y8ia', 'rana', 1),
(7, 'data1', '$2y$10$f1WHCGRnCInB8M/D3V7/duaqgMgAqMUWBbYJfcGEpve4CNDgWFwUG', 'data1', 1),
(8, 'Adham', '$2y$10$CyWhaUMT/hcbgLzQ/JA7TutvNlPCFwYPgJtLEsCXJSps1QZaFpXdC', 'Adham', 1),
(9, 'Aziza', '$2y$10$jHrnuw.n6q6ovszjPG65feKEvfp4HFm7VDZYhLunTMFEIvBXBx3Ua', 'Aziza', 1);

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

--
-- Table structure for table `user_permissions`
--

CREATE TABLE `user_permissions` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `page_id` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;

--
-- Dumping data for table `user_permissions`
--

INSERT INTO `user_permissions` (`id`, `user_id`, `page_id`) VALUES
(62, 3, 9),
(63, 3, 13),
(78, 5, 3),
(79, 5, 9),
(80, 5, 13),
(81, 4, 9),
(136, 6, 2),
(137, 6, 9),
(138, 6, 16),
(139, 6, 17),
(140, 7, 2),
(141, 7, 3),
(142, 7, 9),
(143, 7, 11),
(153, 8, 2),
(154, 8, 3),
(155, 8, 9),
(156, 8, 11),
(157, 8, 13),
(158, 9, 2),
(159, 9, 3),
(160, 9, 9),
(161, 9, 11),
(162, 1, 1),
(163, 1, 2),
(164, 1, 3),
(165, 1, 6),
(166, 1, 8),
(167, 1, 9),
(168, 1, 10),
(169, 1, 11),
(170, 1, 12),
(171, 1, 13),
(172, 1, 16),
(173, 1, 17),
(174, 1, 18);

--
-- Indexes for dumped tables
--

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

--
-- Indexes for table `inventory`
--
ALTER TABLE `inventory`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `unique_branch_product` (`branch_id`,`product_id`),
  ADD KEY `branch_id` (`branch_id`),
  ADD KEY `product_id` (`product_id`);

--
-- Indexes for table `orders`
--
ALTER TABLE `orders`
  ADD PRIMARY KEY (`id`),
  ADD KEY `shift_id` (`shift_id`);

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

--
-- Indexes for table `pages`
--
ALTER TABLE `pages`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `page_url` (`page_url`);

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

--
-- Indexes for table `purchase_invoices`
--
ALTER TABLE `purchase_invoices`
  ADD PRIMARY KEY (`id`),
  ADD KEY `supplier_id` (`supplier_id`);

--
-- Indexes for table `purchase_items`
--
ALTER TABLE `purchase_items`
  ADD PRIMARY KEY (`id`),
  ADD KEY `purchase_id` (`purchase_id`);

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

--
-- Indexes for table `shifts`
--
ALTER TABLE `shifts`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`);

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

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

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

--
-- Indexes for table `users`
--
ALTER TABLE `users`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `username` (`username`),
  ADD KEY `branch_id` (`branch_id`);

--
-- Indexes for table `user_permissions`
--
ALTER TABLE `user_permissions`
  ADD PRIMARY KEY (`id`),
  ADD KEY `user_id` (`user_id`),
  ADD KEY `page_id` (`page_id`);

--
-- AUTO_INCREMENT for dumped tables
--

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

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

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

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

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

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

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

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

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

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

--
-- AUTO_INCREMENT for table `stock_transfers`
--
ALTER TABLE `stock_transfers`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

--
-- AUTO_INCREMENT for table `tables`
--
ALTER TABLE `tables`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;

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

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

--
-- Constraints for dumped tables
--

--
-- Constraints for table `inventory`
--
ALTER TABLE `inventory`
  ADD CONSTRAINT `inventory_ibfk_1` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`),
  ADD CONSTRAINT `inventory_ibfk_2` FOREIGN KEY (`product_id`) REFERENCES `products` (`id`);

--
-- Constraints for table `orders`
--
ALTER TABLE `orders`
  ADD CONSTRAINT `orders_ibfk_1` FOREIGN KEY (`shift_id`) REFERENCES `shifts` (`id`);

--
-- Constraints for table `purchase_invoices`
--
ALTER TABLE `purchase_invoices`
  ADD CONSTRAINT `purchase_invoices_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `suppliers` (`id`);

--
-- Constraints for table `purchase_items`
--
ALTER TABLE `purchase_items`
  ADD CONSTRAINT `purchase_items_ibfk_1` FOREIGN KEY (`purchase_id`) REFERENCES `purchase_invoices` (`id`);

--
-- Constraints for table `shifts`
--
ALTER TABLE `shifts`
  ADD CONSTRAINT `shifts_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `users` (`id`);

--
-- Constraints for table `users`
--
ALTER TABLE `users`
  ADD CONSTRAINT `users_ibfk_1` FOREIGN KEY (`branch_id`) REFERENCES `branches` (`id`);
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 */;
