-- --------------------------------------------------------
-- Hôte :                        127.0.0.1
-- Version du serveur:           10.1.28-MariaDB - mariadb.org binary distribution
-- SE du serveur:                Win32
-- HeidiSQL Version:             9.5.0.5278
-- --------------------------------------------------------



-- Listage de la structure de la base pour opensalecustom
DROP DATABASE IF EXISTS `opensalecustom`;
CREATE DATABASE IF NOT EXISTS `opensalecustom` /*!40100 DEFAULT CHARACTER SET latin1 */;
USE `opensalecustom`;

-- Listage de la structure de la table opensalecustom. ospos_boncommande
CREATE TABLE IF NOT EXISTS `ospos_boncommande` (
  `id_boncommande` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `datebon_commande` timestamp NULL DEFAULT NULL,
  `date_livraison` timestamp NULL DEFAULT NULL,
  `employee_id` int(11) NOT NULL,
  PRIMARY KEY (`id_boncommande`),
  UNIQUE KEY `id_boncommande_UNIQUE` (`id_boncommande`),
  KEY `f_employee_id_idx` (`employee_id`),
  CONSTRAINT `f_employee_id` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_boncommande : ~0 rows (environ)
DELETE FROM `ospos_boncommande`;

-- Listage de la structure de la table opensalecustom. ospos_categorie
CREATE TABLE IF NOT EXISTS `ospos_categorie` (
  `id_categorie` int(11) NOT NULL AUTO_INCREMENT,
  `nom_categorie` varchar(100) NOT NULL,
  `etat_categorie` varchar(100) DEFAULT 'Désactivé',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_categorie`),
  UNIQUE KEY `nom_categorie_UNIQUE` (`nom_categorie`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_categorie : ~0 rows (environ)
DELETE FROM `ospos_categorie`;
INSERT INTO `ospos_categorie` (`id_categorie`, `nom_categorie`, `etat_categorie`, `deleted`) VALUES
	(0, 'Samsung', 'Désactivé', 0);

-- Listage de la structure de la table opensalecustom. ospos_compte
CREATE TABLE IF NOT EXISTS `ospos_compte` (
  `id_compte` int(11) NOT NULL AUTO_INCREMENT,
  `solde_compte` int(11) NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  PRIMARY KEY (`id_compte`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_compte : ~0 rows (environ)
DELETE FROM `ospos_compte`;

-- Listage de la structure de la table opensalecustom. ospos_customers
CREATE TABLE IF NOT EXISTS `ospos_customers` (
  `person_id` int(10) NOT NULL,
  `company_name` varchar(255) DEFAULT NULL,
  `account_number` varchar(255) DEFAULT NULL,
  `taxable` int(1) NOT NULL DEFAULT '1',
  `sales_tax_code` varchar(32) NOT NULL DEFAULT '1',
  `discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
  `package_id` int(11) DEFAULT NULL,
  `points` int(11) DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `account_number` (`account_number`),
  KEY `person_id` (`person_id`),
  KEY `package_id` (`package_id`),
  CONSTRAINT `ospos_customers_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos_people` (`person_id`),
  CONSTRAINT `ospos_customers_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `ospos_customers_packages` (`package_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_customers : ~0 rows (environ)
DELETE FROM `ospos_customers`;

-- Listage de la structure de la table opensalecustom. ospos_customers_packages
CREATE TABLE IF NOT EXISTS `ospos_customers_packages` (
  `package_id` int(11) NOT NULL AUTO_INCREMENT,
  `package_name` varchar(255) DEFAULT NULL,
  `points_percent` float NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`package_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_customers_packages : ~0 rows (environ)
DELETE FROM `ospos_customers_packages`;

-- Listage de la structure de la table opensalecustom. ospos_customers_points
CREATE TABLE IF NOT EXISTS `ospos_customers_points` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `person_id` int(11) NOT NULL,
  `package_id` int(11) NOT NULL,
  `sale_id` int(11) NOT NULL,
  `points_earned` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `person_id` (`person_id`),
  KEY `package_id` (`package_id`),
  KEY `sale_id` (`sale_id`),
  CONSTRAINT `ospos_customers_points_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos_customers` (`person_id`),
  CONSTRAINT `ospos_customers_points_ibfk_2` FOREIGN KEY (`package_id`) REFERENCES `ospos_customers_packages` (`package_id`),
  CONSTRAINT `ospos_customers_points_ibfk_3` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales` (`sale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_customers_points : ~0 rows (environ)
DELETE FROM `ospos_customers_points`;

-- Listage de la structure de la table opensalecustom. ospos_details_boncommande
CREATE TABLE IF NOT EXISTS `ospos_details_boncommande` (
  `ospos_items_item_id` int(10) NOT NULL,
  `id_details_boncommande` int(11) NOT NULL AUTO_INCREMENT,
  `ospos_boncommande_id_boncommande` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id_details_boncommande`),
  KEY `fk_ospos_details_boncommande_ospos_items1_idx` (`ospos_items_item_id`),
  KEY `fk_ospos_details_boncommande_ospos_boncommande1_idx` (`ospos_boncommande_id_boncommande`),
  CONSTRAINT `fk_ospos_details_boncommande_ospos_boncommande1` FOREIGN KEY (`ospos_boncommande_id_boncommande`) REFERENCES `ospos_boncommande` (`id_boncommande`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_ospos_details_boncommande_ospos_items1` FOREIGN KEY (`ospos_items_item_id`) REFERENCES `ospos_items` (`item_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_details_boncommande : ~0 rows (environ)
DELETE FROM `ospos_details_boncommande`;

-- Listage de la structure de la table opensalecustom. ospos_dinner_tables
CREATE TABLE IF NOT EXISTS `ospos_dinner_tables` (
  `dinner_table_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(30) NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`dinner_table_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_dinner_tables : ~0 rows (environ)
DELETE FROM `ospos_dinner_tables`;

-- Listage de la structure de la table opensalecustom. ospos_expenses
CREATE TABLE IF NOT EXISTS `ospos_expenses` (
  `expense_id` int(10) NOT NULL AUTO_INCREMENT,
  `date` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `amount` decimal(15,2) NOT NULL,
  `payment_type` varchar(40) NOT NULL,
  `expense_category_id` int(11) NOT NULL,
  `description` varchar(255) NOT NULL,
  `employee_id` int(10) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `supplier_name` varchar(255) DEFAULT NULL,
  `supplier_tax_code` varchar(255) DEFAULT NULL,
  `tax_amount` decimal(15,2) DEFAULT NULL,
  PRIMARY KEY (`expense_id`),
  KEY `expense_category_id` (`expense_category_id`),
  KEY `employee_id` (`employee_id`),
  CONSTRAINT `ospos_expenses_ibfk_1` FOREIGN KEY (`expense_category_id`) REFERENCES `ospos_expense_categories` (`expense_category_id`),
  CONSTRAINT `ospos_expenses_ibfk_2` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_expenses : ~0 rows (environ)
DELETE FROM `ospos_expenses`;

-- Listage de la structure de la table opensalecustom. ospos_expense_categories
CREATE TABLE IF NOT EXISTS `ospos_expense_categories` (
  `expense_category_id` int(10) NOT NULL AUTO_INCREMENT,
  `category_name` varchar(255) DEFAULT NULL,
  `category_description` varchar(255) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`expense_category_id`),
  UNIQUE KEY `category_name` (`category_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_expense_categories : ~0 rows (environ)
DELETE FROM `ospos_expense_categories`;

-- Listage de la structure de la table opensalecustom. ospos_fondcaisse
CREATE TABLE IF NOT EXISTS `ospos_fondcaisse` (
  `id_fondcaisse` int(11) NOT NULL AUTO_INCREMENT,
  `montant_fondcaisse` int(10) unsigned NOT NULL,
  `montant_depot` int(11) DEFAULT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `ospos_sales_sale_id` int(10) NOT NULL,
  `expense_id` int(11) DEFAULT NULL,
  `ospos_stock_locations_location_id` int(11) NOT NULL,
  `description_fondcaisse` text,
  PRIMARY KEY (`id_fondcaisse`),
  KEY `fk_ospos_expense_id1` (`expense_id`),
  KEY `fk_ospos_fondcaisse_ospos_sales1_idx` (`ospos_sales_sale_id`),
  KEY `fk_ospos_fondcaisse_ospos_stock_locations1_idx` (`ospos_stock_locations_location_id`),
  CONSTRAINT `fk_expense_id1` FOREIGN KEY (`expense_id`) REFERENCES `ospos_expenses` (`expense_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_ospos_fondcaisse_ospos_sales1` FOREIGN KEY (`ospos_sales_sale_id`) REFERENCES `ospos_sales` (`sale_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_ospos_fondcaisse_ospos_stock_locations1` FOREIGN KEY (`ospos_stock_locations_location_id`) REFERENCES `ospos_stock_locations` (`location_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_fondcaisse : ~0 rows (environ)
DELETE FROM `ospos_fondcaisse`;

-- Listage de la structure de la table opensalecustom. ospos_giftcards
CREATE TABLE IF NOT EXISTS `ospos_giftcards` (
  `record_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `giftcard_id` int(11) NOT NULL AUTO_INCREMENT,
  `giftcard_number` varchar(255) DEFAULT NULL,
  `value` decimal(15,2) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  `person_id` int(10) DEFAULT NULL,
  PRIMARY KEY (`giftcard_id`),
  UNIQUE KEY `giftcard_number` (`giftcard_number`),
  KEY `person_id` (`person_id`),
  CONSTRAINT `ospos_giftcards_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos_people` (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_giftcards : ~0 rows (environ)
DELETE FROM `ospos_giftcards`;

-- Listage de la structure de la table opensalecustom. ospos_grants
CREATE TABLE IF NOT EXISTS `ospos_grants` (
  `permission_id` varchar(255) NOT NULL,
  `person_id` int(10) NOT NULL,
  `menu_group` varchar(32) DEFAULT 'home',
  PRIMARY KEY (`permission_id`,`person_id`),
  KEY `ospos_grants_ibfk_2` (`person_id`),
  CONSTRAINT `ospos_grants_ibfk_1` FOREIGN KEY (`permission_id`) REFERENCES `ospos_permissions` (`permission_id`) ON DELETE CASCADE,
  CONSTRAINT `ospos_grants_ibfk_2` FOREIGN KEY (`person_id`) REFERENCES `ospos_employees` (`person_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_grants : ~33 rows (environ)
DELETE FROM `ospos_grants`;
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('categories', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('config', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('customers', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('employees', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('expenses', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('expenses_categories', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('giftcards', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('home', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('items', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('items_ds', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('item_kits', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('messages', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('office', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('receivings', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('receivings_ds', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_categories', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_customers', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_discounts', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_employees', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_expenses_categories', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_inventory', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_items', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_payments', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_receivings', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_sales', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_suppliers', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('reports_taxes', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('sales', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('sales_delete', 1, '--');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('sales_ds', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('suppliers', 1, 'both');
INSERT INTO `ospos_grants` (`permission_id`, `person_id`, `menu_group`) VALUES
	('taxes', 1, 'both');

-- Listage de la structure de la table opensalecustom. ospos_inventory
CREATE TABLE IF NOT EXISTS `ospos_inventory` (
  `trans_id` int(11) NOT NULL AUTO_INCREMENT,
  `trans_items` int(11) NOT NULL DEFAULT '0',
  `trans_user` int(11) NOT NULL DEFAULT '0',
  `trans_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `trans_comment` text NOT NULL,
  `trans_location` int(11) NOT NULL,
  `trans_inventory` decimal(15,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`trans_id`),
  KEY `trans_items` (`trans_items`),
  KEY `trans_user` (`trans_user`),
  KEY `trans_location` (`trans_location`),
  CONSTRAINT `ospos_inventory_ibfk_1` FOREIGN KEY (`trans_items`) REFERENCES `ospos_items` (`item_id`),
  CONSTRAINT `ospos_inventory_ibfk_2` FOREIGN KEY (`trans_user`) REFERENCES `ospos_employees` (`person_id`),
  CONSTRAINT `ospos_inventory_ibfk_3` FOREIGN KEY (`trans_location`) REFERENCES `ospos_stock_locations` (`location_id`)
) ENGINE=InnoDB AUTO_INCREMENT=206 DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_inventory : ~43 rows (environ)
DELETE FROM `ospos_inventory`;
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(155, 37, 1, '2018-05-04 12:17:54', 'Édition Manuelle de Quantité', 1, 1000.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(156, 37, 1, '2018-05-04 12:22:20', 'POS 57', 1, -1001.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(157, 37, 1, '2018-05-04 12:22:58', 'Édition Manuelle de Quantité', 1, 801.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(158, 37, 1, '2018-05-04 12:25:32', '', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(159, 37, 1, '2018-05-04 12:25:51', '', 1, -1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(160, 38, 1, '2018-05-04 12:34:41', 'Édition Manuelle de Quantité', 1, 100.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(161, 37, 1, '2018-05-05 17:44:21', 'RECV1', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(162, 37, 1, '2018-05-05 17:47:10', 'RECV 2', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(163, 37, 1, '2018-05-05 17:49:18', 'RECV3', 1, 1000.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(164, 37, 1, '2018-05-05 17:51:08', 'RECV 4', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(165, 37, 1, '2018-05-07 10:48:51', 'POS 59', 1, -1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(166, 37, 1, '2018-05-07 11:04:01', 'RECV5', 1, 2.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(167, 37, 1, '2018-05-07 11:04:47', 'RECV6', 1, -8.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(168, 37, 1, '2018-05-07 11:11:01', 'RECV7', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(169, 37, 1, '2018-05-07 11:12:04', 'RECV8', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(170, 37, 1, '2018-05-07 11:16:39', 'RECV9', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(171, 37, 1, '2018-05-07 12:49:42', 'RECV10', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(172, 37, 1, '2018-05-07 12:52:15', 'RECV11', 1, 2.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(173, 37, 1, '2018-05-07 12:55:06', 'RECV12', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(174, 37, 1, '2018-05-07 13:01:48', 'RECV13', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(175, 37, 1, '2018-05-07 13:13:19', 'RECV14', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(176, 37, 1, '2018-05-07 13:15:07', 'RECV15', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(177, 37, 1, '2018-05-07 13:16:55', 'RECV16', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(178, 37, 1, '2018-05-07 13:19:18', 'RECV17', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(179, 37, 1, '2018-05-07 13:51:35', 'RECV18', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(180, 37, 1, '2018-05-07 13:56:25', 'RECV19', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(181, 37, 1, '2018-05-07 13:57:09', 'RECV20', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(182, 37, 1, '2018-05-07 14:03:14', 'RECV21', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(183, 37, 1, '2018-05-07 14:11:19', 'RECV22', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(184, 37, 1, '2018-05-07 14:13:46', 'RECV23', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(185, 37, 1, '2018-05-07 14:17:21', 'POS 58', 1, -1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(186, 37, 1, '2018-05-07 14:28:57', 'RECV24', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(187, 37, 1, '2018-05-07 14:29:42', 'RECV25', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(188, 37, 1, '2018-05-07 14:50:28', 'POS 61', 1, -1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(189, 37, 1, '2018-05-07 15:04:37', 'RECV26', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(190, 37, 1, '2018-05-07 15:32:28', 'RECV27', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(191, 38, 1, '2018-05-07 15:33:58', 'RECV28', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(192, 38, 1, '2018-05-07 15:35:03', 'RECV29', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(193, 37, 1, '2018-05-07 15:42:55', 'RECV30', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(194, 37, 1, '2018-05-07 15:44:28', 'RECV31', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(195, 37, 1, '2018-05-07 15:54:47', 'RECV32', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(196, 37, 1, '2018-05-07 16:21:37', 'POS 62', 1, -1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(197, 37, 1, '2018-05-07 16:35:25', 'RECV33', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(198, 38, 1, '2018-05-07 16:42:47', 'RECV34', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(199, 37, 1, '2018-05-07 17:09:25', 'RECV35', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(200, 37, 1, '2018-05-07 17:10:05', 'RECV36', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(201, 37, 1, '2018-05-07 19:29:14', 'RECV37', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(202, 37, 1, '2018-05-08 00:47:24', 'RECV38', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(203, 37, 1, '2018-05-08 00:48:39', 'RECV39', 1, 6.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(204, 37, 1, '2018-05-08 00:50:22', 'RECV40', 1, 1.000);
INSERT INTO `ospos_inventory` (`trans_id`, `trans_items`, `trans_user`, `trans_date`, `trans_comment`, `trans_location`, `trans_inventory`) VALUES
	(205, 37, 1, '2018-05-08 00:53:36', 'POS 63', 1, -2.000);

-- Listage de la structure de la table opensalecustom. ospos_items
CREATE TABLE IF NOT EXISTS `ospos_items` (
  `name` varchar(255) NOT NULL,
  `category` varchar(255) NOT NULL,
  `supplier_id` int(11) DEFAULT NULL,
  `item_number` varchar(255) DEFAULT NULL,
  `description` varchar(255) NOT NULL,
  `cost_price` decimal(15,2) NOT NULL,
  `unit_price` decimal(15,2) NOT NULL,
  `reorder_level` decimal(15,3) NOT NULL DEFAULT '0.000',
  `receiving_quantity` decimal(15,3) NOT NULL DEFAULT '1.000',
  `item_id` int(10) NOT NULL AUTO_INCREMENT,
  `pic_filename` varchar(255) DEFAULT NULL,
  `allow_alt_description` tinyint(1) NOT NULL,
  `is_serialized` tinyint(1) NOT NULL,
  `stock_type` tinyint(2) NOT NULL DEFAULT '0',
  `item_type` tinyint(2) NOT NULL DEFAULT '0',
  `tax_category_id` int(10) NOT NULL DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `custom1` varchar(255) DEFAULT NULL,
  `custom2` varchar(255) DEFAULT NULL,
  `custom3` varchar(255) DEFAULT NULL,
  `custom4` varchar(255) DEFAULT NULL,
  `custom5` varchar(255) DEFAULT NULL,
  `custom6` varchar(255) DEFAULT NULL,
  `custom7` varchar(255) DEFAULT NULL,
  `custom8` varchar(255) DEFAULT NULL,
  `custom9` varchar(255) DEFAULT NULL,
  `custom10` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`item_id`),
  KEY `item_number` (`item_number`),
  KEY `supplier_id` (`supplier_id`),
  CONSTRAINT `ospos_items_ibfk_1` FOREIGN KEY (`supplier_id`) REFERENCES `ospos_suppliers` (`person_id`)
) ENGINE=InnoDB AUTO_INCREMENT=39 DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_items : ~2 rows (environ)
DELETE FROM `ospos_items`;
INSERT INTO `ospos_items` (`name`, `category`, `supplier_id`, `item_number`, `description`, `cost_price`, `unit_price`, `reorder_level`, `receiving_quantity`, `item_id`, `pic_filename`, `allow_alt_description`, `is_serialized`, `stock_type`, `item_type`, `tax_category_id`, `deleted`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`, `custom9`, `custom10`) VALUES
	('Galaxy S6', 'Samsung Téléphone', 3, '57493658933012984', '', 200000.00, 350000.00, 70.000, 1.000, 37, NULL, 0, 0, 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '');
INSERT INTO `ospos_items` (`name`, `category`, `supplier_id`, `item_number`, `description`, `cost_price`, `unit_price`, `reorder_level`, `receiving_quantity`, `item_id`, `pic_filename`, `allow_alt_description`, `is_serialized`, `stock_type`, `item_type`, `tax_category_id`, `deleted`, `custom1`, `custom2`, `custom3`, `custom4`, `custom5`, `custom6`, `custom7`, `custom8`, `custom9`, `custom10`) VALUES
	('Galaxy S7', 'Samsung Téléphone', 3, '87946961326986000', '', 250000.00, 350000.00, 1.000, 1.000, 38, NULL, 0, 0, 0, 0, 0, 0, '', '', '', '', '', '', '', '', '', '');

-- Listage de la structure de la table opensalecustom. ospos_items_taxes
CREATE TABLE IF NOT EXISTS `ospos_items_taxes` (
  `item_id` int(10) NOT NULL,
  `name` varchar(255) NOT NULL,
  `percent` decimal(15,3) NOT NULL,
  PRIMARY KEY (`item_id`,`name`,`percent`),
  CONSTRAINT `ospos_items_taxes_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_items_taxes : ~4 rows (environ)
DELETE FROM `ospos_items_taxes`;
INSERT INTO `ospos_items_taxes` (`item_id`, `name`, `percent`) VALUES
	(37, 'Promo', 0.000);
INSERT INTO `ospos_items_taxes` (`item_id`, `name`, `percent`) VALUES
	(37, 'TVA', 0.000);
INSERT INTO `ospos_items_taxes` (`item_id`, `name`, `percent`) VALUES
	(38, 'Promo', 0.000);
INSERT INTO `ospos_items_taxes` (`item_id`, `name`, `percent`) VALUES
	(38, 'TVA', 0.000);

-- Listage de la structure de la table opensalecustom. ospos_item_kits
CREATE TABLE IF NOT EXISTS `ospos_item_kits` (
  `item_kit_id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `item_id` int(10) NOT NULL DEFAULT '0',
  `kit_discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
  `price_option` tinyint(2) NOT NULL DEFAULT '0',
  `print_option` tinyint(2) NOT NULL DEFAULT '0',
  `description` varchar(255) NOT NULL,
  PRIMARY KEY (`item_kit_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_item_kits : ~0 rows (environ)
DELETE FROM `ospos_item_kits`;

-- Listage de la structure de la table opensalecustom. ospos_item_kit_items
CREATE TABLE IF NOT EXISTS `ospos_item_kit_items` (
  `item_kit_id` int(11) NOT NULL,
  `item_id` int(11) NOT NULL,
  `quantity` decimal(15,3) NOT NULL,
  `kit_sequence` int(3) NOT NULL DEFAULT '0',
  PRIMARY KEY (`item_kit_id`,`item_id`,`quantity`),
  KEY `ospos_item_kit_items_ibfk_2` (`item_id`),
  CONSTRAINT `ospos_item_kit_items_ibfk_1` FOREIGN KEY (`item_kit_id`) REFERENCES `ospos_item_kits` (`item_kit_id`) ON DELETE CASCADE,
  CONSTRAINT `ospos_item_kit_items_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_item_kit_items : ~0 rows (environ)
DELETE FROM `ospos_item_kit_items`;

-- Listage de la structure de la table opensalecustom. ospos_item_quantities
CREATE TABLE IF NOT EXISTS `ospos_item_quantities` (
  `item_id` int(11) NOT NULL,
  `location_id` int(11) NOT NULL,
  `quantity` decimal(15,3) NOT NULL DEFAULT '0.000',
  PRIMARY KEY (`item_id`,`location_id`),
  KEY `item_id` (`item_id`),
  KEY `location_id` (`location_id`),
  CONSTRAINT `ospos_item_quantities_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`),
  CONSTRAINT `ospos_item_quantities_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `ospos_stock_locations` (`location_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_item_quantities : ~2 rows (environ)
DELETE FROM `ospos_item_quantities`;
INSERT INTO `ospos_item_quantities` (`item_id`, `location_id`, `quantity`) VALUES
	(37, 1, 1828.000);
INSERT INTO `ospos_item_quantities` (`item_id`, `location_id`, `quantity`) VALUES
	(38, 1, 103.000);

-- Listage de la structure de la table opensalecustom. ospos_migrations
CREATE TABLE IF NOT EXISTS `ospos_migrations` (
  `version` bigint(20) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_migrations : ~0 rows (environ)
DELETE FROM `ospos_migrations`;
INSERT INTO `ospos_migrations` (`version`) VALUES
	(20180225100000);

-- Listage de la structure de la table opensalecustom. ospos_modules
CREATE TABLE IF NOT EXISTS `ospos_modules` (
  `name_lang_key` varchar(255) NOT NULL,
  `desc_lang_key` varchar(255) NOT NULL,
  `sort` int(10) NOT NULL,
  `module_id` varchar(255) NOT NULL,
  PRIMARY KEY (`module_id`),
  UNIQUE KEY `desc_lang_key` (`desc_lang_key`),
  UNIQUE KEY `name_lang_key` (`name_lang_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_modules : ~17 rows (environ)
DELETE FROM `ospos_modules`;
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_categories', 'module_categories_desc', 40, 'categories');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_config', 'module_config_desc', 110, 'config');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_customers', 'module_customers_desc', 10, 'customers');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_employees', 'module_employees_desc', 80, 'employees');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_expenses', 'module_expenses_desc', 108, 'expenses');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_expenses_categories', 'module_expenses_categories_desc', 109, 'expenses_categories');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_giftcards', 'module_giftcards_desc', 90, 'giftcards');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_home', 'module_home_desc', 1, 'home');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_items', 'module_items_desc', 20, 'items');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_item_kits', 'module_item_kits_desc', 30, 'item_kits');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_messages', 'module_messages_desc', 98, 'messages');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_office', 'module_office_desc', 999, 'office');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_receivings', 'module_receivings_desc', 60, 'receivings');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_reports', 'module_reports_desc', 50, 'reports');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_sales', 'module_sales_desc', 70, 'sales');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_suppliers', 'module_suppliers_desc', 40, 'suppliers');
INSERT INTO `ospos_modules` (`name_lang_key`, `desc_lang_key`, `sort`, `module_id`) VALUES
	('module_taxes', 'module_taxes_desc', 105, 'taxes');

-- Listage de la structure de la table opensalecustom. ospos_nbkarat
CREATE TABLE IF NOT EXISTS `ospos_nbkarat` (
  `id_nbkarat` int(11) NOT NULL AUTO_INCREMENT,
  `prix_karat` int(10) unsigned NOT NULL,
  `created_at` timestamp NULL DEFAULT NULL,
  `updated_at` timestamp NULL DEFAULT NULL,
  `ospos_categorie_id_categorie` int(11) NOT NULL,
  PRIMARY KEY (`id_nbkarat`),
  UNIQUE KEY `nb_karat_UNIQUE` (`prix_karat`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_nbkarat : ~0 rows (environ)
DELETE FROM `ospos_nbkarat`;

-- Listage de la structure de la table opensalecustom. ospos_people
CREATE TABLE IF NOT EXISTS `ospos_people` (
  `first_name` varchar(255) NOT NULL,
  `last_name` varchar(255) NOT NULL,
  `gender` int(1) DEFAULT NULL,
  `phone_number` varchar(255) NOT NULL,
  `email` varchar(255) NOT NULL,
  `address_1` varchar(255) NOT NULL,
  `address_2` varchar(255) NOT NULL,
  `city` varchar(255) NOT NULL,
  `state` varchar(255) NOT NULL,
  `zip` varchar(255) NOT NULL,
  `country` varchar(255) NOT NULL,
  `comments` text NOT NULL,
  `person_id` int(10) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`person_id`),
  KEY `email` (`email`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_people : ~0 rows (environ)
DELETE FROM `ospos_people`;
INSERT INTO `ospos_people` (`first_name`, `last_name`, `gender`, `phone_number`, `email`, `address_1`, `address_2`, `city`, `state`, `zip`, `country`, `comments`, `person_id`) VALUES
	('Admin', 'Admin', NULL, '706789087', 'admin@example.com', 'Address 1', '', '', '', '', '', '', 1);
INSERT INTO `ospos_people` (`first_name`, `last_name`, `gender`, `phone_number`, `email`, `address_1`, `address_2`, `city`, `state`, `zip`, `country`, `comments`, `person_id`) VALUES
	('Pint', 'Tom', NULL, '7890076', 'pinton@gmail.com', '688', '', '', '', '', '', '', 2);
INSERT INTO `ospos_people` (`first_name`, `last_name`, `gender`, `phone_number`, `email`, `address_1`, `address_2`, `city`, `state`, `zip`, `country`, `comments`, `person_id`) VALUES
	('Hj', 'H', 1, 'jh', 'jh@gmail.com', 'jh', '', '', '', '', '', '', 3);
INSERT INTO `ospos_people` (`first_name`, `last_name`, `gender`, `phone_number`, `email`, `address_1`, `address_2`, `city`, `state`, `zip`, `country`, `comments`, `person_id`) VALUES
	('Jason', 'Mandabrandja', NULL, '7817898', 'dashing.jr@gmail.com', 'Liberté six extension', '', '', '', '', '', '', 4);

-- Listage de la structure de la table opensalecustom. ospos_permissions
CREATE TABLE IF NOT EXISTS `ospos_permissions` (
  `permission_id` varchar(255) NOT NULL,
  `module_id` varchar(255) NOT NULL,
  `location_id` int(10) DEFAULT NULL,
  PRIMARY KEY (`permission_id`),
  KEY `module_id` (`module_id`),
  KEY `ospos_permissions_ibfk_2` (`location_id`),
  CONSTRAINT `ospos_permissions_ibfk_1` FOREIGN KEY (`module_id`) REFERENCES `ospos_modules` (`module_id`) ON DELETE CASCADE,
  CONSTRAINT `ospos_permissions_ibfk_2` FOREIGN KEY (`location_id`) REFERENCES `ospos_stock_locations` (`location_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_permissions : ~33 rows (environ)
DELETE FROM `ospos_permissions`;
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('categories', 'categories', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('config', 'config', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('customers', 'customers', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('employees', 'employees', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('expenses', 'expenses', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('expenses_categories', 'expenses_categories', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('giftcards', 'giftcards', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('home', 'home', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('items', 'items', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('items_ds', 'items', 1);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('item_kits', 'item_kits', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('messages', 'messages', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('office', 'office', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('receivings', 'receivings', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('receivings_ds', 'receivings', 1);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_categories', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_customers', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_discounts', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_employees', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_expenses_categories', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_inventory', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_items', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_payments', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_receivings', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_sales', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_suppliers', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('reports_taxes', 'reports', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('sales', 'sales', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('sales_delete', 'sales', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('sales_ds', 'sales', 1);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('suppliers', 'suppliers', NULL);
INSERT INTO `ospos_permissions` (`permission_id`, `module_id`, `location_id`) VALUES
	('taxes', 'taxes', NULL);

-- Listage de la structure de la table opensalecustom. ospos_promo_categorie
CREATE TABLE IF NOT EXISTS `ospos_promo_categorie` (
  `id_promo_categori` int(11) DEFAULT NULL,
  `pourcentage_promo` int(11) DEFAULT NULL,
  `date_debut` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `employee_id` int(11) NOT NULL,
  `date_fin` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00',
  KEY `fk_employee_id124` (`employee_id`),
  CONSTRAINT `fk_employee_id124` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_promo_categorie : ~0 rows (environ)
DELETE FROM `ospos_promo_categorie`;

-- Listage de la structure de la table opensalecustom. ospos_receivings
CREATE TABLE IF NOT EXISTS `ospos_receivings` (
  `receiving_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `supplier_id` int(10) DEFAULT NULL,
  `employee_id` int(10) NOT NULL DEFAULT '0',
  `comment` text,
  `receiving_id` int(10) NOT NULL AUTO_INCREMENT,
  `payment_type` varchar(20) DEFAULT NULL,
  `reference` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`receiving_id`),
  KEY `supplier_id` (`supplier_id`),
  KEY `employee_id` (`employee_id`),
  KEY `reference` (`reference`),
  CONSTRAINT `ospos_receivings_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`),
  CONSTRAINT `ospos_receivings_ibfk_2` FOREIGN KEY (`supplier_id`) REFERENCES `ospos_suppliers` (`person_id`)
) ENGINE=InnoDB AUTO_INCREMENT=41 DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_receivings : ~34 rows (environ)
DELETE FROM `ospos_receivings`;
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-05 17:44:21', NULL, 1, '', 1, 'Cheque', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-05 17:47:10', NULL, 1, '', 2, 'Comptant', 'FR');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-05 17:49:17', 2, 1, '', 3, 'Comptant', '1000');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-05 17:51:08', 2, 1, '', 4, 'Cheque', '234');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 11:04:01', NULL, 1, '', 5, 'Comptant', 'TR');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 11:04:47', NULL, 1, '', 6, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 11:11:01', NULL, 1, '', 7, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 11:12:04', NULL, 1, '', 8, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 11:16:39', 4, 1, '', 9, 'Comptant', 'FR');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 12:49:42', NULL, 1, '', 10, 'Comptant', 'rfe');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 12:52:15', 4, 1, '', 11, 'Comptant', 'RTF');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 12:55:06', 4, 1, '', 12, 'Comptant', 'GRT');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:01:48', 4, 1, '', 13, 'Comptant', 'FRT');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:13:18', NULL, 1, '', 14, 'Comptant', 'RE');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:15:07', NULL, 1, '', 15, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:16:55', 4, 1, '', 16, 'Comptant', 'fr');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:19:17', NULL, 1, '', 17, 'Comptant', 'REF');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:51:35', NULL, 1, '', 18, 'Comptant', 'FRT');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:56:25', NULL, 1, '', 19, 'Comptant', 'FRTC');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 13:57:09', NULL, 1, '', 20, 'Comptant', 'RT');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 14:03:13', NULL, 1, '', 21, 'Comptant', 'ERT');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 14:11:19', NULL, 1, '', 22, 'Comptant', '12');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 14:13:46', NULL, 1, '', 23, 'Comptant', 'TOUR');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 14:28:57', NULL, 1, '', 24, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 14:29:42', NULL, 1, '', 25, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:04:36', 4, 1, '', 26, 'Comptant', 'DC');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:32:28', NULL, 1, '', 27, 'Comptant', 'FRT');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:33:58', NULL, 1, '', 28, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:35:03', 4, 1, '', 29, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:42:54', 4, 1, '', 30, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:44:28', 4, 1, '', 31, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 15:54:47', NULL, 1, '', 32, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 16:35:24', NULL, 1, '', 33, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 16:42:45', NULL, 1, '', 34, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 17:09:25', NULL, 1, '', 35, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 17:10:05', NULL, 1, '', 36, 'Comptant', 'FR');
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-07 19:29:14', NULL, 1, '', 37, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-08 00:47:24', NULL, 1, '', 38, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-08 00:48:39', NULL, 1, '', 39, 'Comptant', NULL);
INSERT INTO `ospos_receivings` (`receiving_time`, `supplier_id`, `employee_id`, `comment`, `receiving_id`, `payment_type`, `reference`) VALUES
	('2018-05-08 00:50:22', NULL, 1, '', 40, 'Comptant', NULL);

-- Listage de la structure de la table opensalecustom. ospos_receivings_items
CREATE TABLE IF NOT EXISTS `ospos_receivings_items` (
  `receiving_id` int(10) NOT NULL DEFAULT '0',
  `item_id` int(10) NOT NULL DEFAULT '0',
  `description` varchar(30) DEFAULT NULL,
  `serialnumber` varchar(30) DEFAULT NULL,
  `line` int(3) NOT NULL,
  `quantity_purchased` decimal(15,3) NOT NULL DEFAULT '0.000',
  `item_cost_price` decimal(15,2) NOT NULL,
  `item_unit_price` decimal(15,2) NOT NULL,
  `discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
  `item_location` int(11) NOT NULL,
  `receiving_quantity` decimal(15,3) NOT NULL DEFAULT '1.000',
  PRIMARY KEY (`receiving_id`,`item_id`,`line`),
  KEY `item_id` (`item_id`),
  CONSTRAINT `ospos_receivings_items_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`),
  CONSTRAINT `ospos_receivings_items_ibfk_2` FOREIGN KEY (`receiving_id`) REFERENCES `ospos_receivings` (`receiving_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_receivings_items : ~34 rows (environ)
DELETE FROM `ospos_receivings_items`;
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(1, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(2, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(3, 37, '', NULL, 1, 1000.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(4, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(5, 37, '', NULL, 1, 2.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(6, 37, '', NULL, 1, -8.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(7, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(8, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(9, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(10, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(11, 37, '', NULL, 1, 2.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(12, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(13, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(14, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(15, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(16, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(17, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(18, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(19, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(20, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(21, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(22, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(23, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(24, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(25, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(26, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(27, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(28, 38, '', '', 1, 1.000, 250000.00, 250000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(29, 38, '', '', 1, 1.000, 250000.00, 250000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(30, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(31, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(32, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(33, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(34, 38, '', '', 1, 1.000, 250000.00, 250000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(35, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(36, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(37, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(38, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(39, 37, '', NULL, 1, 6.000, 200000.00, 200000.00, 0.00, 1, 1.000);
INSERT INTO `ospos_receivings_items` (`receiving_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `receiving_quantity`) VALUES
	(40, 37, '', '', 1, 1.000, 200000.00, 200000.00, 0.00, 1, 1.000);

-- Listage de la structure de la table opensalecustom. ospos_sales
CREATE TABLE IF NOT EXISTS `ospos_sales` (
  `sale_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `customer_id` int(10) DEFAULT NULL,
  `employee_id` int(10) NOT NULL DEFAULT '0',
  `comment` text,
  `invoice_number` varchar(32) DEFAULT NULL,
  `quote_number` varchar(32) DEFAULT NULL,
  `sale_id` int(10) NOT NULL AUTO_INCREMENT,
  `sale_status` tinyint(2) NOT NULL DEFAULT '0',
  `dinner_table_id` int(11) DEFAULT NULL,
  `work_order_number` varchar(32) DEFAULT NULL,
  `sale_type` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`sale_id`),
  UNIQUE KEY `invoice_number` (`invoice_number`),
  KEY `customer_id` (`customer_id`),
  KEY `employee_id` (`employee_id`),
  KEY `sale_time` (`sale_time`),
  KEY `dinner_table_id` (`dinner_table_id`),
  CONSTRAINT `ospos_sales_ibfk_1` FOREIGN KEY (`employee_id`) REFERENCES `ospos_employees` (`person_id`),
  CONSTRAINT `ospos_sales_ibfk_2` FOREIGN KEY (`customer_id`) REFERENCES `ospos_customers` (`person_id`),
  CONSTRAINT `ospos_sales_ibfk_3` FOREIGN KEY (`dinner_table_id`) REFERENCES `ospos_dinner_tables` (`dinner_table_id`)
) ENGINE=InnoDB AUTO_INCREMENT=64 DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sales : ~6 rows (environ)
DELETE FROM `ospos_sales`;
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-04 12:19:56', NULL, 1, '', '1-20180504121956', NULL, 56, 2, NULL, NULL, 0);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-04 12:22:20', NULL, 1, '', '1-20180504122220', NULL, 57, 0, NULL, NULL, 0);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-07 14:17:21', NULL, 1, '', '1-20180507141721', NULL, 58, 0, NULL, NULL, 1);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-07 10:48:51', NULL, 1, '', '1-20180507104851', NULL, 59, 0, NULL, NULL, 1);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-07 11:50:27', NULL, 1, '', '1-20180507115027', NULL, 60, 1, NULL, NULL, 0);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-07 14:50:28', NULL, 1, '', '1-20180507145028', NULL, 61, 0, NULL, NULL, 1);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-07 16:21:36', NULL, 1, '', '1-20180507162136', NULL, 62, 0, NULL, NULL, 0);
INSERT INTO `ospos_sales` (`sale_time`, `customer_id`, `employee_id`, `comment`, `invoice_number`, `quote_number`, `sale_id`, `sale_status`, `dinner_table_id`, `work_order_number`, `sale_type`) VALUES
	('2018-05-08 00:53:36', NULL, 1, '', '1-20180508005336', NULL, 63, 0, NULL, NULL, 1);

-- Listage de la structure de la table opensalecustom. ospos_sales_items
CREATE TABLE IF NOT EXISTS `ospos_sales_items` (
  `sale_id` int(10) NOT NULL DEFAULT '0',
  `item_id` int(10) NOT NULL DEFAULT '0',
  `description` varchar(255) DEFAULT NULL,
  `serialnumber` varchar(30) DEFAULT NULL,
  `line` int(3) NOT NULL DEFAULT '0',
  `quantity_purchased` decimal(15,3) NOT NULL DEFAULT '0.000',
  `item_cost_price` decimal(15,2) NOT NULL,
  `item_unit_price` decimal(15,2) NOT NULL,
  `discount_percent` decimal(15,2) NOT NULL DEFAULT '0.00',
  `item_location` int(11) NOT NULL,
  `print_option` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`sale_id`,`item_id`,`line`),
  KEY `sale_id` (`sale_id`),
  KEY `item_id` (`item_id`),
  KEY `item_location` (`item_location`),
  CONSTRAINT `ospos_sales_items_ibfk_1` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`),
  CONSTRAINT `ospos_sales_items_ibfk_2` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales` (`sale_id`),
  CONSTRAINT `ospos_sales_items_ibfk_3` FOREIGN KEY (`item_location`) REFERENCES `ospos_stock_locations` (`location_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sales_items : ~7 rows (environ)
DELETE FROM `ospos_sales_items`;
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(56, 37, '', '', 1, 500.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(57, 37, '', '', 1, 1001.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(58, 37, '', '', 1, 1.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(59, 37, '', '', 1, 1.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(60, 37, '', '', 1, 1.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(61, 37, '', '', 1, 1.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(62, 37, '', '', 1, 1.000, 200000.00, 350000.00, 0.00, 1, 0);
INSERT INTO `ospos_sales_items` (`sale_id`, `item_id`, `description`, `serialnumber`, `line`, `quantity_purchased`, `item_cost_price`, `item_unit_price`, `discount_percent`, `item_location`, `print_option`) VALUES
	(63, 37, '', '', 1, 2.000, 200000.00, 350000.00, 0.00, 1, 0);

-- Listage de la structure de la table opensalecustom. ospos_sales_items_taxes
CREATE TABLE IF NOT EXISTS `ospos_sales_items_taxes` (
  `sale_id` int(10) NOT NULL,
  `item_id` int(10) NOT NULL,
  `line` int(3) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL,
  `percent` decimal(15,4) NOT NULL DEFAULT '0.0000',
  `tax_type` tinyint(2) NOT NULL DEFAULT '0',
  `rounding_code` tinyint(2) NOT NULL DEFAULT '0',
  `cascade_tax` tinyint(2) NOT NULL DEFAULT '0',
  `cascade_sequence` tinyint(2) NOT NULL DEFAULT '0',
  `item_tax_amount` decimal(15,4) NOT NULL DEFAULT '0.0000',
  PRIMARY KEY (`sale_id`,`item_id`,`line`,`name`,`percent`),
  KEY `sale_id` (`sale_id`),
  KEY `item_id` (`item_id`),
  CONSTRAINT `ospos_sales_items_taxes_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales_items` (`sale_id`),
  CONSTRAINT `ospos_sales_items_taxes_ibfk_2` FOREIGN KEY (`item_id`) REFERENCES `ospos_items` (`item_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sales_items_taxes : ~2 rows (environ)
DELETE FROM `ospos_sales_items_taxes`;
INSERT INTO `ospos_sales_items_taxes` (`sale_id`, `item_id`, `line`, `name`, `percent`, `tax_type`, `rounding_code`, `cascade_tax`, `cascade_sequence`, `item_tax_amount`) VALUES
	(56, 37, 1, 'TVA', 18.0000, 1, 1, 0, 0, 31500000.0000);
INSERT INTO `ospos_sales_items_taxes` (`sale_id`, `item_id`, `line`, `name`, `percent`, `tax_type`, `rounding_code`, `cascade_tax`, `cascade_sequence`, `item_tax_amount`) VALUES
	(57, 37, 1, 'TVA', 18.0000, 1, 1, 0, 0, 63063000.0000);

-- Listage de la structure de la table opensalecustom. ospos_sales_payments
CREATE TABLE IF NOT EXISTS `ospos_sales_payments` (
  `sale_id` int(10) NOT NULL,
  `payment_type` varchar(40) NOT NULL,
  `payment_amount` decimal(15,2) NOT NULL,
  PRIMARY KEY (`sale_id`,`payment_type`),
  KEY `sale_id` (`sale_id`),
  CONSTRAINT `ospos_sales_payments_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales` (`sale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sales_payments : ~5 rows (environ)
DELETE FROM `ospos_sales_payments`;
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(57, 'Comptant', 413413000.00);
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(58, 'Comptant', 350000.00);
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(59, 'Comptant', 350000.00);
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(60, 'Comptant', 350000.00);
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(61, 'Comptant', 350000.00);
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(62, 'Comptant', 350000.00);
INSERT INTO `ospos_sales_payments` (`sale_id`, `payment_type`, `payment_amount`) VALUES
	(63, 'Comptant', 700000.00);

-- Listage de la structure de la table opensalecustom. ospos_sales_reward_points
CREATE TABLE IF NOT EXISTS `ospos_sales_reward_points` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sale_id` int(11) NOT NULL,
  `earned` float NOT NULL,
  `used` float NOT NULL,
  PRIMARY KEY (`id`),
  KEY `sale_id` (`sale_id`),
  CONSTRAINT `ospos_sales_reward_points_ibfk_1` FOREIGN KEY (`sale_id`) REFERENCES `ospos_sales` (`sale_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sales_reward_points : ~0 rows (environ)
DELETE FROM `ospos_sales_reward_points`;

-- Listage de la structure de la table opensalecustom. ospos_sales_taxes
CREATE TABLE IF NOT EXISTS `ospos_sales_taxes` (
  `sale_id` int(10) NOT NULL,
  `tax_type` smallint(2) NOT NULL,
  `tax_group` varchar(32) NOT NULL,
  `sale_tax_basis` decimal(15,4) NOT NULL,
  `sale_tax_amount` decimal(15,4) NOT NULL,
  `print_sequence` tinyint(2) NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL,
  `tax_rate` decimal(15,4) NOT NULL,
  `sales_tax_code` varchar(32) NOT NULL DEFAULT '',
  `rounding_code` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`sale_id`,`tax_type`,`tax_group`),
  KEY `print_sequence` (`sale_id`,`print_sequence`,`tax_type`,`tax_group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sales_taxes : ~2 rows (environ)
DELETE FROM `ospos_sales_taxes`;
INSERT INTO `ospos_sales_taxes` (`sale_id`, `tax_type`, `tax_group`, `sale_tax_basis`, `sale_tax_amount`, `print_sequence`, `name`, `tax_rate`, `sales_tax_code`, `rounding_code`) VALUES
	(56, 1, '18% TVA', 175000000.0000, 31500000.0000, 0, 'TVA', 18.0000, '', 1);
INSERT INTO `ospos_sales_taxes` (`sale_id`, `tax_type`, `tax_group`, `sale_tax_basis`, `sale_tax_amount`, `print_sequence`, `name`, `tax_rate`, `sales_tax_code`, `rounding_code`) VALUES
	(57, 1, '18% TVA', 350350000.0000, 63063000.0000, 0, 'TVA', 18.0000, '', 1);

-- Listage de la structure de la table opensalecustom. ospos_sessions
CREATE TABLE IF NOT EXISTS `ospos_sessions` (
  `id` varchar(40) NOT NULL,
  `ip_address` varchar(45) NOT NULL,
  `timestamp` int(10) unsigned NOT NULL DEFAULT '0',
  `data` blob NOT NULL,
  KEY `ci_sessions_timestamp` (`timestamp`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_sessions : ~18 rows (environ)
DELETE FROM `ospos_sessions`;
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('q0hos55025lau2rrisek5ntng6hvivss', '::1', 1525701317, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('0m5m804o7no7nk8tmhnmk0n0ab8iet5k', '::1', 1525701009, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('pg8qgj1l8od32pqpbo88rfl91mc4u1vo', '::1', 1525701815, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('na2bidt6ki30jtqb1d771s7v1d8fcfpu', '::1', 1525703501, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('4edi7bi7un1cphorjelddin43v8rekr2', '::1', 1525703803, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('k9f1lnkbp9ooho76a4jk6pdei8cqd837', '::1', 1525704174, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('op29ucvq6p9a36kqr4h2a38jp9av2ll9', '::1', 1525704874, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('t0rh8vn2be0uk895ka634t1qpst823m8', '::1', 1525706463, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('2mfjuhoaomo9is24e6i1jl4342eaam97', '::1', 1525707310, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('jabh3c8ba8jcql05jht9r042mtb9jeq5', '::1', 1525707701, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('95mf0n24pa9rpl5nuna06ukiu71igena', '::1', 1525709354, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('23bb1ufh01150h547nh2coe6p9el2ia1', '::1', 1525716536, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('kjpm38n5a0pde1rk30om423bp925ipoa', '::1', 1525717641, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('g4fftfg7o4ri7bf3a88uq5r6trfm5mgo', '::1', 1525717754, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('tv5lgfvafldebe5v24qdqgud92f23t8e', '::1', 1525736804, _binary 0x5F5F63695F6C6173745F726567656E65726174657C693A313532353733363830333B);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('n5luoqrrstkkk7cucjijuqeae6oaj17k', '::1', 1525737148, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('br7d71gfhopnplkomtmqods61me44aho', '::1', 1525737217, _binary 0x[BLOB]);
INSERT INTO `ospos_sessions` (`id`, `ip_address`, `timestamp`, `data`) VALUES
	('dnt0ufuc0j1dc43c3e6h31mhkcetn9m9', '::1', 1525782176, _binary 0x5F5F63695F6C6173745F726567656E65726174657C693A313532353738313838313B706572736F6E5F69647C733A313A2231223B6D656E755F67726F75707C733A343A22686F6D65223B6974656D5F6C6F636174696F6E7C733A313A2231223B);

-- Listage de la structure de la table opensalecustom. ospos_stock_locations
CREATE TABLE IF NOT EXISTS `ospos_stock_locations` (
  `location_id` int(11) NOT NULL AUTO_INCREMENT,
  `location_name` varchar(255) DEFAULT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`location_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_stock_locations : ~0 rows (environ)
DELETE FROM `ospos_stock_locations`;
INSERT INTO `ospos_stock_locations` (`location_id`, `location_name`, `deleted`) VALUES
	(1, 'stock', 0);

-- Listage de la structure de la table opensalecustom. ospos_suppliers
CREATE TABLE IF NOT EXISTS `ospos_suppliers` (
  `person_id` int(10) NOT NULL,
  `company_name` varchar(255) NOT NULL,
  `agency_name` varchar(255) NOT NULL,
  `account_number` varchar(255) DEFAULT NULL,
  `type_personne` varchar(100) DEFAULT NULL,
  `pourcentage` int(11) NOT NULL,
  `deleted` int(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `account_number` (`account_number`),
  KEY `person_id` (`person_id`),
  CONSTRAINT `ospos_suppliers_ibfk_1` FOREIGN KEY (`person_id`) REFERENCES `ospos_people` (`person_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_suppliers : ~0 rows (environ)
DELETE FROM `ospos_suppliers`;
INSERT INTO `ospos_suppliers` (`person_id`, `company_name`, `agency_name`, `account_number`, `type_personne`, `pourcentage`, `deleted`) VALUES
	(2, 'Pinton', 'Fataya', NULL, NULL, 1, 1);
INSERT INTO `ospos_suppliers` (`person_id`, `company_name`, `agency_name`, `account_number`, `type_personne`, `pourcentage`, `deleted`) VALUES
	(3, 'hjhj', 'hj', NULL, NULL, 0, 0);
INSERT INTO `ospos_suppliers` (`person_id`, `company_name`, `agency_name`, `account_number`, `type_personne`, `pourcentage`, `deleted`) VALUES
	(4, 'Mandabra', 'Dash', NULL, NULL, 0, 0);

-- Listage de la structure de la table opensalecustom. ospos_tax_categories
CREATE TABLE IF NOT EXISTS `ospos_tax_categories` (
  `tax_category_id` int(10) NOT NULL AUTO_INCREMENT,
  `tax_category` varchar(32) NOT NULL,
  `tax_group_sequence` tinyint(2) NOT NULL,
  PRIMARY KEY (`tax_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_tax_categories : ~0 rows (environ)
DELETE FROM `ospos_tax_categories`;

-- Listage de la structure de la table opensalecustom. ospos_tax_codes
CREATE TABLE IF NOT EXISTS `ospos_tax_codes` (
  `tax_code` varchar(32) NOT NULL,
  `tax_code_name` varchar(255) NOT NULL DEFAULT '',
  `tax_code_type` tinyint(2) NOT NULL DEFAULT '0',
  `city` varchar(255) NOT NULL DEFAULT '',
  `state` varchar(255) NOT NULL DEFAULT '',
  PRIMARY KEY (`tax_code`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_tax_codes : ~0 rows (environ)
DELETE FROM `ospos_tax_codes`;

-- Listage de la structure de la table opensalecustom. ospos_tax_code_rates
CREATE TABLE IF NOT EXISTS `ospos_tax_code_rates` (
  `rate_tax_code` varchar(32) NOT NULL,
  `rate_tax_category_id` int(10) NOT NULL,
  `tax_rate` decimal(15,4) NOT NULL DEFAULT '0.0000',
  `rounding_code` tinyint(2) NOT NULL DEFAULT '0',
  PRIMARY KEY (`rate_tax_code`,`rate_tax_category_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

-- Listage des données de la table opensalecustom.ospos_tax_code_rates : ~0 rows (environ)
DELETE FROM `ospos_tax_code_rates`;

-- Listage de la structure de la table opensalecustom. ospos_tiers
CREATE TABLE IF NOT EXISTS `ospos_tiers` (
  `id_tiers` int(11) NOT NULL AUTO_INCREMENT,
  `ospos_suppliers_id_suppliers` int(11) NOT NULL,
  `pourcentage` double NOT NULL,
  PRIMARY KEY (`id_tiers`),
  KEY `fk_ospos_tiers_ospos_suppliers1_idx` (`ospos_suppliers_id_suppliers`),
  CONSTRAINT `fk_ospos_tiers_ospos_suppliers122` FOREIGN KEY (`ospos_suppliers_id_suppliers`) REFERENCES `ospos_suppliers` (`person_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

-- Listage des données de la table opensalecustom.ospos_tiers : ~0 rows (environ)
DELETE FROM `ospos_tiers`;

