
/*!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 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
DROP TABLE IF EXISTS `achat_depense`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `achat_depense` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_categorie` int(11) NOT NULL,
  `id_fournisseur` int(11) NOT NULL DEFAULT 0,
  `description` varchar(255) NOT NULL,
  `date_depense` date NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `type_depense` varchar(20) NOT NULL,
  `source` varchar(255) NOT NULL DEFAULT 'PS',
  `id_compte` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=189 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `achat_depense_categorie`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `achat_depense_categorie` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `activite_pertinente`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activite_pertinente` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(50) NOT NULL,
  `table_nom` varchar(100) NOT NULL,
  `id_ligne` int(11) NOT NULL,
  `type_acteur` enum('user','employe') NOT NULL DEFAULT 'user',
  `id_acteur` int(11) NOT NULL,
  `nom_acteur` varchar(150) NOT NULL,
  `resume` varchar(255) NOT NULL,
  `lien` varchar(255) NOT NULL,
  `id_client` int(11) DEFAULT NULL,
  `date_action` datetime NOT NULL,
  `vu` tinyint(1) NOT NULL DEFAULT 0,
  `id_journal` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_activite_pertinente_type` (`type`),
  KEY `idx_activite_pertinente_date` (`date_action`),
  KEY `idx_activite_pertinente_journal` (`id_journal`)
) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_citerne`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_citerne` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(30) NOT NULL,
  `volume` decimal(10,2) NOT NULL,
  `stock` decimal(10,2) NOT NULL,
  `id_produit` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_citerne_verification`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_citerne_verification` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `note` text DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1264 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_debut` datetime NOT NULL,
  `date_fin` datetime DEFAULT NULL,
  `id_admin` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_admin_cloture` int(11) DEFAULT NULL,
  `ca` decimal(10,2) DEFAULT NULL,
  `id_modele` int(11) NOT NULL,
  `journee` date DEFAULT NULL,
  `id_zone_activite` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1314 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_bon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_bon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL,
  `id_zone` int(11) NOT NULL,
  `id_type` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=69102 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_espece`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_espece` (
  `id` int(11) NOT NULL,
  `id_pompiste` int(11) NOT NULL,
  `remarque` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_produit_prix`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_produit_prix` (
  `id_produit` int(11) NOT NULL,
  `id_compte` int(11) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `melange` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id_produit`,`id_compte`,`melange`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_retour`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_retour` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL,
  `id_zone` int(11) NOT NULL,
  `id_citerne` int(11) NOT NULL,
  `qte` decimal(10,3) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5257 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_sortie_caisse`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_sortie_caisse` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL,
  `id_zone` int(11) NOT NULL,
  `motif` varchar(255) NOT NULL,
  `montant` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=416 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_zone`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_zone` (
  `id_compte` int(11) NOT NULL,
  `id_zone` int(11) NOT NULL,
  `id_admin` int(11) DEFAULT NULL,
  PRIMARY KEY (`id_compte`,`id_zone`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_compte_zone_pompiste`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_compte_zone_pompiste` (
  `id_compte` int(11) NOT NULL,
  `id_zone` int(11) NOT NULL,
  `id_pompiste` int(11) NOT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id_compte`,`id_zone`,`id_pompiste`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_pistolet`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_pistolet` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(30) NOT NULL,
  `id_citerne` int(11) NOT NULL,
  `index` decimal(10,0) NOT NULL,
  `melange` int(11) NOT NULL DEFAULT 1,
  `ordre` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=45 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_pistolet_index`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_pistolet_index` (
  `id` int(11) NOT NULL,
  `entre` decimal(20,3) NOT NULL,
  `sortie` decimal(20,3) DEFAULT NULL,
  `id_compte` int(11) NOT NULL,
  PRIMARY KEY (`id`,`id_compte`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_produit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_produit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(20) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `tva` decimal(10,0) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=110 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_zone`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_zone` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(30) NOT NULL,
  `id_modele` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_zone_modele`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_zone_modele` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(20) NOT NULL,
  `cloture` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carburant_zone_pistolet`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carburant_zone_pistolet` (
  `id_zone` int(11) NOT NULL,
  `id_pistolet` int(11) NOT NULL,
  PRIMARY KEY (`id_zone`,`id_pistolet`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carte_fournisseur_lettrage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carte_fournisseur_lettrage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `du_telecollecte` date NOT NULL,
  `a_telecollecte` date NOT NULL,
  `du_virement` date NOT NULL,
  `a_virement` date NOT NULL,
  `nbr_telecollecte` int(11) NOT NULL DEFAULT 0,
  `montant_telecollecte` decimal(12,2) NOT NULL DEFAULT 0.00,
  `nbr_virement` int(11) NOT NULL DEFAULT 0,
  `montant_virement` decimal(12,2) NOT NULL DEFAULT 0.00,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carte_telecollecte`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carte_telecollecte` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reference` varchar(255) NOT NULL,
  `id_type_carte` int(11) NOT NULL,
  `id_appareil` int(11) NOT NULL,
  `date_debut` datetime NOT NULL,
  `date_fin` datetime NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `montant_total` decimal(10,2) NOT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_type` int(11) NOT NULL DEFAULT 1,
  `id_lettrage` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_carte_telecollecte_lettrage` (`id_lettrage`)
) ENGINE=MyISAM AUTO_INCREMENT=3414 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carte_telecollecte_journee`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carte_telecollecte_journee` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_telecollecte` int(11) NOT NULL,
  `journee` date NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1890072 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `carte_ticket`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carte_ticket` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ticket` varchar(20) NOT NULL,
  `journee` date NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `diff` decimal(10,2) NOT NULL DEFAULT 0.00,
  `id_type_carte` int(11) NOT NULL,
  `id_appareil` int(11) NOT NULL,
  `source` varchar(255) NOT NULL,
  `id_source` int(11) NOT NULL,
  `type` int(11) NOT NULL DEFAULT 1,
  `zone` varchar(30) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_zone_source_idsource` (`zone`,`source`,`id_source`),
  KEY `idx_source_journee` (`source`,`journee`)
) ENGINE=MyISAM AUTO_INCREMENT=25914 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(50) NOT NULL,
  `email` varchar(255) DEFAULT NULL,
  `id_groupe` int(11) NOT NULL DEFAULT 0,
  `id_mode` int(11) NOT NULL DEFAULT 0,
  `delai_paiement` int(11) NOT NULL DEFAULT 0,
  `code` varchar(255) DEFAULT NULL,
  `statut` int(11) NOT NULL DEFAULT 0,
  `par_matricule` int(11) NOT NULL DEFAULT 0,
  `facturation_auto` int(11) NOT NULL DEFAULT 1,
  `plafond` decimal(20,6) NOT NULL DEFAULT 0.000000,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=MyISAM AUTO_INCREMENT=320 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_avance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_avance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_paiement_source` int(11) NOT NULL DEFAULT 0,
  `id_source` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `date_avance` date NOT NULL,
  `id_client` int(11) NOT NULL,
  `id_paiement` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `destination` varchar(50) DEFAULT NULL,
  `id_destination` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_source_idclient` (`source`,`id_client`)
) ENGINE=MyISAM AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_avance_etat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_avance_etat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_remplacement_source` int(11) NOT NULL DEFAULT 0,
  `id_source` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `date_avance` date NOT NULL,
  `id_client` int(11) NOT NULL,
  `id_remplacement` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_avoir`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_avoir` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `reference` varchar(255) NOT NULL,
  `date_avoir` date NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `source` varchar(50) NOT NULL,
  `id_source` int(11) NOT NULL,
  `destination` varchar(50) DEFAULT NULL,
  `id_destination` int(11) DEFAULT NULL,
  `id_creation` int(11) DEFAULT NULL,
  `date_creation` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=48 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bc`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `type` varchar(255) NOT NULL,
  `numero` int(11) NOT NULL,
  `date_bon` date NOT NULL,
  `id_produit` int(11) NOT NULL,
  `id_carte` int(11) NOT NULL,
  `montant` decimal(20,2) DEFAULT NULL,
  `littres` decimal(20,2) DEFAULT NULL,
  `id_bon` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifiant` varchar(255) DEFAULT NULL,
  `id_client` int(11) NOT NULL,
  `date_bon` date NOT NULL,
  `code` int(11) NOT NULL DEFAULT 0,
  `intervenant` varchar(255) DEFAULT NULL,
  `matricule` varchar(255) DEFAULT NULL,
  `id_matricule` int(11) NOT NULL DEFAULT 0,
  `produits` varchar(255) DEFAULT NULL,
  `montant` decimal(10,2) NOT NULL DEFAULT 0.00,
  `source` varchar(30) NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) DEFAULT NULL,
  `date_creation` datetime DEFAULT NULL,
  `id_modification` int(11) DEFAULT NULL,
  `date_modification` datetime DEFAULT NULL,
  `id_telecollect` int(11) NOT NULL DEFAULT 0,
  `kilometrage` int(11) DEFAULT NULL,
  `methode_utiliser` varchar(255) DEFAULT NULL,
  `id_carte` int(11) NOT NULL DEFAULT 0,
  `id_chauffeur` int(11) NOT NULL DEFAULT 0,
  `impression` int(11) NOT NULL DEFAULT 1,
  `id_user_pda` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_idetat` (`id_etat`),
  KEY `idx_idclient_datebon` (`id_client`,`date_bon`),
  KEY `idx_source_idsource` (`source`,`id_source`)
) ENGINE=MyISAM AUTO_INCREMENT=42753 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon_ancien`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon_ancien` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `date_bon` date NOT NULL,
  `intervenant` varchar(50) DEFAULT NULL,
  `matricule` varchar(30) DEFAULT NULL,
  `produits` varchar(255) DEFAULT NULL,
  `montant` decimal(10,2) NOT NULL,
  `source` varchar(30) NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  `code` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) DEFAULT NULL,
  `date_creation` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bon` int(11) NOT NULL,
  `tva` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon_passage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon_passage` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `id_matricule` int(11) NOT NULL,
  `client` varchar(255) NOT NULL,
  `matricule` varchar(255) NOT NULL,
  `date_bon` date NOT NULL,
  `numero` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  `id_telecollect` int(11) NOT NULL DEFAULT 0,
  `kilometrage` int(11) DEFAULT NULL,
  `methode_utiliser` varchar(255) DEFAULT NULL,
  `impression` int(11) NOT NULL DEFAULT 1,
  `id_user_pda` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=469 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon_passage_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon_passage_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bon` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `qte` decimal(20,6) NOT NULL,
  `prix` decimal(20,6) NOT NULL,
  `montant` decimal(20,6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=469 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon_produit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon_produit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bon` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `qte` decimal(10,2) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=45858 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_bon_total`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_bon_total` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=943 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_carte`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_carte` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `identifiant` varchar(255) DEFAULT NULL,
  `code` int(11) NOT NULL,
  `id_client` int(11) NOT NULL DEFAULT 0,
  `id_matricule` int(11) NOT NULL DEFAULT 0,
  `type_carte` varchar(50) NOT NULL,
  `kilometrage` int(11) NOT NULL,
  `pin` int(11) NOT NULL,
  `pin_premier` int(11) NOT NULL DEFAULT 0,
  `consultation_solde` int(11) NOT NULL DEFAULT 0,
  `etat` int(11) NOT NULL DEFAULT 0,
  `statut` int(11) NOT NULL DEFAULT 1,
  `tentatives_pin` int(11) NOT NULL DEFAULT 0,
  `date_blocage` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `code` (`code`)
) ENGINE=InnoDB AUTO_INCREMENT=265 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_carte_chauffeur`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_carte_chauffeur` (
  `id` int(11) NOT NULL,
  `id_chauffeur` int(11) NOT NULL,
  `id_carte` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_carte_prepaye_ticket`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_carte_prepaye_ticket` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_carte` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `prix` decimal(20,2) NOT NULL,
  `qte` decimal(20,2) NOT NULL,
  `montant` decimal(20,2) NOT NULL,
  `date_ticket` date NOT NULL,
  `type_transaction` varchar(50) NOT NULL,
  `source` varchar(50) DEFAULT NULL,
  `id_source` int(11) DEFAULT NULL,
  `numero` int(11) NOT NULL,
  `kilometrage` int(11) DEFAULT NULL,
  `methode_utiliser` int(11) DEFAULT NULL,
  `id_creation` int(11) NOT NULL DEFAULT 0,
  `date_creation` datetime DEFAULT NULL,
  `id_telecollect` int(11) NOT NULL DEFAULT 0,
  `impression` int(11) NOT NULL DEFAULT 1,
  `id_user_pda` int(11) NOT NULL DEFAULT 0,
  `id_description` int(11) NOT NULL DEFAULT 0,
  `id_facture` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_carte_prepaye_ticket_facture` (`id_facture`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_carte_reglage`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_carte_reglage` (
  `id` int(11) NOT NULL,
  `capacite` decimal(20,2) DEFAULT NULL,
  `depassement_capacite` int(11) NOT NULL,
  `saisie_kilometrage` int(11) NOT NULL,
  `blocage_kilometrage` int(11) NOT NULL,
  `modification_code_pin` int(11) NOT NULL,
  `code_chauffeur` int(11) NOT NULL DEFAULT -1,
  `lundi_du` time NOT NULL,
  `lundi_au` time NOT NULL,
  `mardi_du` time NOT NULL,
  `mardi_au` time NOT NULL,
  `mercredi_du` time NOT NULL,
  `mercredi_au` time NOT NULL,
  `jeudi_du` time NOT NULL,
  `jeudi_au` time NOT NULL,
  `vendredi_du` time NOT NULL,
  `vendredi_au` time NOT NULL,
  `samedi_du` time NOT NULL,
  `samedi_au` time NOT NULL,
  `dimanche_du` time NOT NULL,
  `dimanche_au` time NOT NULL,
  `plafond_journalier` decimal(20,2) DEFAULT NULL,
  `plafond_mensuel` decimal(20,2) DEFAULT NULL,
  `forcer_jour` int(11) NOT NULL,
  `forcer_horaire` int(11) NOT NULL,
  `forcer_pin` int(11) NOT NULL DEFAULT 1,
  `use_bc` int(11) NOT NULL DEFAULT -1,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_chauffeur`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_chauffeur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `prenom` varchar(255) NOT NULL,
  `cin` varchar(255) NOT NULL,
  `code` int(11) NOT NULL,
  `utilisation_carte` int(11) NOT NULL DEFAULT 0,
  `id_client` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_errachidia`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_errachidia` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_bon` date DEFAULT NULL,
  `client` varchar(41) DEFAULT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  `intervenant` varchar(44) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_errachidia_ver`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_errachidia_ver` (
  `id` int(11) NOT NULL,
  `date_bon` date DEFAULT NULL,
  `client` varchar(41) DEFAULT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  `intervenant` varchar(44) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_etat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_etat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `date_debut` date NOT NULL,
  `date_fin` date NOT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  `nombre` int(11) DEFAULT NULL,
  `reference` varchar(50) NOT NULL,
  `annee` int(11) NOT NULL,
  `num` int(11) NOT NULL,
  `source` varchar(30) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_remplacement` int(11) NOT NULL DEFAULT 0,
  `generation` int(11) NOT NULL DEFAULT 0,
  `date_echeance` date DEFAULT NULL,
  `id_matricule` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_idclient` (`id_client`),
  KEY `idx_idcloture` (`id_cloture`),
  KEY `idx_datecreation` (`date_creation`)
) ENGINE=MyISAM AUTO_INCREMENT=3133 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_facture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_facture` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `id_remplacement` int(11) NOT NULL DEFAULT 0,
  `reference` varchar(255) NOT NULL,
  `date_facture` date NOT NULL,
  `date_echeance` date DEFAULT NULL,
  `montant_ttc` decimal(10,2) DEFAULT NULL,
  `dont_tva` decimal(10,2) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_reglement` int(11) NOT NULL DEFAULT 0,
  `annee` int(11) NOT NULL,
  `num` int(11) NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `systeme` int(11) NOT NULL DEFAULT 1,
  `id_mode` int(11) NOT NULL DEFAULT -1,
  PRIMARY KEY (`id`),
  KEY `idx_idcloture_idclient` (`id_cloture`,`id_client`),
  KEY `idx_idclient_datefacture` (`id_client`,`date_facture`)
) ENGINE=MyISAM AUTO_INCREMENT=7542 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_facture_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_facture_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_produit` int(11) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `qte` decimal(10,2) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `tva` decimal(10,2) NOT NULL,
  `id_facture` int(11) NOT NULL,
  `id_bon_passage` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9942 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_gratuite`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_gratuite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_client` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `motif` varchar(255) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_groupe`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_groupe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `periode_traitement` varchar(50) DEFAULT NULL,
  `jour` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_groupement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_groupement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `id_type_encaissement` int(11) NOT NULL,
  `source` varchar(30) NOT NULL,
  `id_source` int(11) NOT NULL,
  `date_groupement` date NOT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  `nbr_piece` int(11) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_matricule`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_matricule` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `nom` varchar(255) NOT NULL,
  `code_qr` text DEFAULT NULL,
  `statut` int(11) NOT NULL DEFAULT 0,
  `utilisation` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_client` (`id_client`,`nom`),
  UNIQUE KEY `code_qr` (`code_qr`(50))
) ENGINE=InnoDB AUTO_INCREMENT=3593 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_paiement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_paiement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_reglement` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `dont_tva` decimal(10,2) DEFAULT NULL,
  `date_encaissement` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_source_idreglement` (`source`,`id_reglement`)
) ENGINE=MyISAM AUTO_INCREMENT=2305 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_reglement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_reglement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `date_echeance` date DEFAULT NULL,
  `difference` decimal(10,0) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `date_debut` date DEFAULT NULL,
  `date_fin` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_idclient` (`id_client`)
) ENGINE=MyISAM AUTO_INCREMENT=2170 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_remplacement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_remplacement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `date_remplacement` date NOT NULL,
  `id_etat` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_source_idetat` (`source`,`id_etat`),
  KEY `idx_source_dateremplacement` (`source`,`date_remplacement`)
) ENGINE=MyISAM AUTO_INCREMENT=3368 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_reste`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_reste` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_client` int(11) NOT NULL,
  `id_source` int(11) NOT NULL DEFAULT 0,
  `id_facture` int(11) NOT NULL DEFAULT 0,
  `date_reste` date NOT NULL,
  `date_echeance` date NOT NULL,
  `montant_ttc` decimal(10,2) NOT NULL,
  `dont_tva` decimal(10,2) NOT NULL,
  `id_reglement` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=163 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `client_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client_roles` (
  `id` int(11) NOT NULL,
  `bon` int(11) NOT NULL DEFAULT 0,
  `ont` int(11) NOT NULL DEFAULT 0,
  `avoir` int(11) NOT NULL DEFAULT 0,
  `facturation` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_bon` (`bon`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_bon_baf`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_bon_baf` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_type_piece` int(11) NOT NULL,
  `serie` varchar(50) NOT NULL,
  `date_bon` date NOT NULL,
  `code` int(11) NOT NULL DEFAULT 0,
  `source` varchar(10) NOT NULL,
  `id_source` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) DEFAULT NULL,
  `date_creation` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_bon_baf_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_bon_baf_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_caisse_operation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_caisse_operation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_zone_activite` int(11) NOT NULL,
  `date_flux` datetime NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `description` text NOT NULL,
  `type` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=52 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_envoi`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_envoi` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte_bancaire` int(11) NOT NULL,
  `id_employe` int(11) DEFAULT NULL,
  `date_envoi` datetime DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `statut` int(11) NOT NULL DEFAULT 0,
  `date_echeance` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=839 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_envoi_remise_piece`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_envoi_remise_piece` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_envoi` int(11) NOT NULL,
  `id_piece` int(11) NOT NULL,
  `id_remise` int(11) NOT NULL DEFAULT 0,
  `statut` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_idremise_idpiece` (`id_remise`,`id_piece`)
) ENGINE=MyISAM AUTO_INCREMENT=1607 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_piece`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_piece` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_mode` int(11) NOT NULL,
  `id_banque` int(11) NOT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `proprietaire` varchar(255) DEFAULT NULL,
  `date_piece` date NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `date_echeance` date NOT NULL,
  `source` varchar(30) NOT NULL,
  `id_source` int(11) NOT NULL,
  `zone` varchar(30) DEFAULT NULL,
  `id_remise` int(11) NOT NULL DEFAULT 0,
  `id_client` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  KEY `idx_zone_source_idsource` (`zone`,`source`,`id_source`),
  KEY `idx_source_datepiece` (`source`,`date_piece`)
) ENGINE=MyISAM AUTO_INCREMENT=1634 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_remplacement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_remplacement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_piece` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `date_echeance` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_remplacement_avance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_remplacement_avance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_remplacement` int(11) NOT NULL,
  `montant` decimal(20,2) NOT NULL,
  `destination` varchar(255) DEFAULT NULL,
  `id_destination` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `coffre_remplacement_piece`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `coffre_remplacement_piece` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_remplacement` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `collaborateur`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `collaborateur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `prenom` varchar(255) NOT NULL,
  `carte_identifiant` varchar(255) DEFAULT NULL,
  `id_poste` int(11) NOT NULL,
  `statut` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `collaborateur_avance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `collaborateur_avance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_employe` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `source` varchar(20) NOT NULL,
  `id_source` int(11) NOT NULL,
  `note` text NOT NULL,
  `date_avance` date NOT NULL,
  `id_zone` int(11) NOT NULL DEFAULT 0,
  `id_fiche` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1806 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `collaborateur_poste`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `collaborateur_poste` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `nom` (`nom`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `collaborateur_salaire`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `collaborateur_salaire` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mois` date NOT NULL,
  `nbr_employe` int(11) NOT NULL DEFAULT 0,
  `masse_salariale` decimal(10,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `comptabilite_declaration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `comptabilite_declaration` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `mois` date NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_bancaire`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_bancaire` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_banque` int(11) NOT NULL,
  `nom` varchar(50) NOT NULL,
  `rib` varchar(30) NOT NULL,
  `agence` varchar(100) NOT NULL,
  `ville` varchar(100) NOT NULL,
  `montant` decimal(10,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`id`),
  UNIQUE KEY `rib` (`rib`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_bancaire_flux`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_bancaire_flux` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte_bancaire` int(11) NOT NULL,
  `id_mode` int(11) NOT NULL,
  `reference` varchar(255) DEFAULT NULL,
  `date_flux` date DEFAULT NULL,
  `debit` decimal(10,2) NOT NULL,
  `credit` decimal(10,2) NOT NULL,
  `date_operation` date DEFAULT NULL,
  `note` text DEFAULT NULL,
  `source` varchar(20) NOT NULL,
  `id_source` int(11) NOT NULL,
  `zone` varchar(20) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_lettrage` int(11) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_zone_source_idsource` (`zone`,`source`,`id_source`),
  KEY `idx_source_idsource` (`source`,`id_source`),
  KEY `idx_source_dateflux` (`source`,`date_flux`),
  KEY `idx_compte_bancaire_flux_lettrage` (`id_lettrage`)
) ENGINE=MyISAM AUTO_INCREMENT=8632 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_bancaire_impaye`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_bancaire_impaye` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_piece` int(11) NOT NULL,
  `id_operation` int(11) NOT NULL,
  `date_impaye` date NOT NULL,
  `date_retour` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_bancaire_mode`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_bancaire_mode` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(30) NOT NULL,
  `methode` varchar(20) NOT NULL,
  `fournisseur` int(11) NOT NULL DEFAULT 1,
  `client` int(11) NOT NULL DEFAULT 1,
  `debit` int(11) NOT NULL DEFAULT 1,
  `credit` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_bancaire_operation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_bancaire_operation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte_bancaire` int(11) NOT NULL,
  `id_mode` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `description` varchar(255) NOT NULL,
  `type_operation` int(11) NOT NULL DEFAULT -1,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_coursier` int(11) NOT NULL DEFAULT -1,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_bancaire_remise`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_bancaire_remise` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `reference` varchar(255) NOT NULL,
  `id_compte_bancaire` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_mode` int(11) NOT NULL,
  `id_envoi` int(11) NOT NULL,
  `date_remise` date NOT NULL,
  `date_prevu` date NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=961 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_zone_activite` int(11) NOT NULL,
  `date_debut` datetime NOT NULL,
  `date_fin` datetime DEFAULT NULL,
  `date_creation` datetime NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `ca` decimal(10,2) DEFAULT NULL,
  `journee` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=835 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_bon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_bon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_type` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `id_compte` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_caisse_flux`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_caisse_flux` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_zone_activite` int(11) NOT NULL,
  `date_flux` datetime NOT NULL,
  `source` varchar(20) NOT NULL,
  `id_source` int(11) NOT NULL,
  `debit` decimal(10,2) DEFAULT NULL,
  `credit` decimal(10,2) DEFAULT NULL,
  `zone` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_zone_source_idsource` (`zone`,`source`,`id_source`),
  KEY `idx_source_dateflux` (`source`,`date_flux`)
) ENGINE=MyISAM AUTO_INCREMENT=9883 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_caisse_transfert`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_caisse_transfert` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL DEFAULT 0,
  `id_source` int(11) NOT NULL,
  `id_destination` int(11) NOT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  `note` varchar(255) NOT NULL,
  `date_transfert` datetime NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1372 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_vente_produit`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_vente_produit` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_produit` int(11) NOT NULL,
  `qte` int(11) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `id_client` int(11) NOT NULL DEFAULT 0,
  `matricule` varchar(50) NOT NULL,
  `id_compte` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=137 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_vente_service`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_vente_service` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_service` int(11) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `qte` int(11) NOT NULL,
  `id_client` int(11) NOT NULL DEFAULT 0,
  `matricule` varchar(50) NOT NULL,
  `id_compte` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8910 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_zone_activite`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_zone_activite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  `id_employe` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `date_debut` datetime NOT NULL,
  `date_fin` date DEFAULT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `etat` int(11) NOT NULL DEFAULT 0,
  `caisse` decimal(10,2) NOT NULL DEFAULT 0.00,
  `id_creation` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_ps_zone_activite_role`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_ps_zone_activite_role` (
  `id` int(11) NOT NULL,
  `produit` int(11) NOT NULL DEFAULT 0,
  `service` int(11) NOT NULL DEFAULT 0,
  `recharge` int(11) NOT NULL DEFAULT 0,
  `depense` int(11) NOT NULL DEFAULT 0,
  `avance` int(11) NOT NULL DEFAULT 0,
  `carburant` int(11) NOT NULL DEFAULT 0,
  `stock` int(11) NOT NULL DEFAULT 0,
  `caisse` int(11) NOT NULL DEFAULT 0,
  `restaurant` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `du` datetime NOT NULL,
  `au` datetime DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_pv` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=290 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_atelier`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_atelier` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `id_pv` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_atelier_poste`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_atelier_poste` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_poste` int(11) NOT NULL,
  `id_atelier` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_base`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_base` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_caisse` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `nom` (`nom`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_base_stock`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_base_stock` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_pv` int(11) NOT NULL,
  `id_stock` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_colocataire`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_colocataire` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `id_pv` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_employe`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_employe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_employe` int(11) NOT NULL,
  `id_compte` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=802 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_gratuite`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_gratuite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ticket` int(11) NOT NULL,
  `id_client` int(11) NOT NULL,
  `note` varchar(255) NOT NULL,
  `montant` decimal(20,6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_id_ticket` (`id_ticket`)
) ENGINE=InnoDB AUTO_INCREMENT=1629 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_ticket`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_ticket` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_ticket` datetime NOT NULL,
  `id_matricule` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `note` varchar(255) NOT NULL,
  `numero` int(11) NOT NULL,
  `id_compte` int(11) NOT NULL,
  `id_employe` int(11) NOT NULL,
  `date_debut` datetime DEFAULT NULL,
  `date_fin` datetime DEFAULT NULL,
  `id_atelier` int(11) NOT NULL,
  `id_colocataire` int(11) NOT NULL DEFAULT 0,
  `source_creation` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_compte_cloture` (`id_compte`,`id_cloture`)
) ENGINE=InnoDB AUTO_INCREMENT=5054 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `compte_pv_ticket_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compte_pv_ticket_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ticket` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `qte` decimal(20,6) NOT NULL,
  `prix` decimal(20,6) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_id_ticket` (`id_ticket`)
) ENGINE=InnoDB AUTO_INCREMENT=5626 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `entreprise`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `entreprise` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `raison_sociale` varchar(255) NOT NULL,
  `ice` varchar(255) DEFAULT NULL,
  `adresse` text DEFAULT NULL,
  `telephone` varchar(255) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `id_fournisseur` int(11) NOT NULL DEFAULT 0,
  `id_client` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=817 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_avance`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_avance` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_paiement_source` int(11) NOT NULL DEFAULT 0,
  `id_source` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `date_avance` date NOT NULL,
  `id_fournisseur` int(11) NOT NULL,
  `id_paiement` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_etat_remplacement` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_avoir`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_avoir` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `source` varchar(20) DEFAULT NULL,
  `id_source` int(11) NOT NULL DEFAULT 0,
  `reference` varchar(50) NOT NULL,
  `id_remplacement` int(11) NOT NULL DEFAULT 0,
  `id_reglement` int(11) NOT NULL DEFAULT 0,
  `id_paiement` int(11) NOT NULL DEFAULT 0,
  `date_avoir` date NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `dont_tva` decimal(10,2) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `type` varchar(20) NOT NULL,
  `transaction` int(11) NOT NULL,
  `id_etat_remplacement` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=87 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_bon`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_bon` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `date_bon` date NOT NULL,
  `montant` decimal(10,2) NOT NULL DEFAULT 0.00,
  `source` varchar(30) NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_idetat` (`id_etat`),
  KEY `idx_idfournisseur_datebon` (`id_fournisseur`,`date_bon`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_etat`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_etat` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `date_debut` date NOT NULL,
  `date_fin` date NOT NULL,
  `montant` decimal(10,2) DEFAULT NULL,
  `nombre` int(11) DEFAULT NULL,
  `reference` varchar(50) NOT NULL,
  `annee` int(11) NOT NULL,
  `num` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `date_echeance` date DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_idfournisseur` (`id_fournisseur`),
  KEY `idx_idcloture` (`id_cloture`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_facture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_facture` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `id_alimentation` int(11) NOT NULL DEFAULT 0,
  `id_depense` int(11) NOT NULL DEFAULT 0,
  `reference` varchar(255) NOT NULL,
  `date_facture` date NOT NULL,
  `date_echeance` date DEFAULT NULL,
  `montant_ttc` decimal(10,2) DEFAULT NULL,
  `dont_tva` decimal(10,2) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_reglement` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=734 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_facture_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_facture_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `produit` varchar(255) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `qte` decimal(10,2) NOT NULL,
  `tva` decimal(10,2) NOT NULL,
  `id_facture` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_paiement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_paiement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `id_reglement` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `dont_tva` decimal(10,2) DEFAULT NULL,
  `date_decaissement` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=641 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_reglement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_reglement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `date_echeance` date DEFAULT NULL,
  `difference` decimal(10,0) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `date_debut` date DEFAULT NULL,
  `date_fin` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=550 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_remplacement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_remplacement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `source` varchar(20) NOT NULL,
  `date_remplacement` date NOT NULL,
  `id_etat` int(11) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_source_idetat` (`source`,`id_etat`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_reste`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_reste` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `id_source` int(11) NOT NULL DEFAULT 0,
  `id_facture` int(11) NOT NULL DEFAULT 0,
  `date_reste` date NOT NULL,
  `date_echeance` date NOT NULL,
  `montant_ttc` decimal(10,2) NOT NULL,
  `dont_tva` decimal(10,2) NOT NULL,
  `id_reglement` int(11) NOT NULL DEFAULT 0,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `fournisseur_roles`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fournisseur_roles` (
  `id` int(11) NOT NULL,
  `depense` int(11) NOT NULL DEFAULT 0,
  `alimentation` int(11) NOT NULL DEFAULT 0,
  `avoir` int(11) NOT NULL DEFAULT 0,
  `facturation` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `journal_activite`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `journal_activite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_utilisateur` int(11) NOT NULL DEFAULT 0,
  `action` varchar(20) NOT NULL,
  `table_nom` varchar(100) NOT NULL,
  `id_ligne` int(11) NOT NULL DEFAULT 0,
  `donnees_avant` longtext DEFAULT NULL,
  `donnees_apres` longtext DEFAULT NULL,
  `date_action` datetime NOT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_utilisateur` (`id_utilisateur`),
  KEY `idx_table_ligne` (`table_nom`,`id_ligne`),
  KEY `idx_date` (`date_action`)
) ENGINE=InnoDB AUTO_INCREMENT=1430 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `migration_log`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `migration_log` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `migration` varchar(255) NOT NULL,
  `date_execution` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `migration` (`migration`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `notes_test`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `notes_test` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `module` varchar(80) NOT NULL,
  `sous_module` varchar(120) DEFAULT NULL,
  `fonctionnalite` varchar(255) DEFAULT NULL,
  `description` text NOT NULL,
  `priorite` varchar(20) NOT NULL DEFAULT 'normale',
  `statut` varchar(20) NOT NULL DEFAULT 'a_traiter',
  `lien` varchar(255) DEFAULT NULL,
  `id_utilisateur` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `date_modification` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `idx_module` (`module`),
  KEY `idx_statut` (`statut`),
  KEY `idx_priorite` (`priorite`),
  KEY `idx_utilisateur` (`id_utilisateur`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_activite_masquee`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_activite_masquee` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `type` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_activite_masquee_user_type` (`id_user`,`type`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_affichage_table`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_affichage_table` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `cle_table` varchar(80) NOT NULL,
  `preset_entete` varchar(30) NOT NULL DEFAULT 'defaut',
  `preset_bordure` varchar(30) NOT NULL DEFAULT 'defaut',
  `colonnes` text DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_user_table` (`id_user`,`cle_table`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_appareil`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_appareil` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(50) NOT NULL,
  `actif` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_appareil_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_appareil_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_type_carte` int(11) NOT NULL,
  `id_appareil` int(11) NOT NULL,
  `id_compte_bancaire` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `id_type_carte` (`id_type_carte`,`id_appareil`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_banque`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_banque` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_carte_type`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_carte_type` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(50) NOT NULL,
  `id_fournisseur` int(11) NOT NULL DEFAULT 0,
  `point` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_layout_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_layout_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `layout` varchar(20) NOT NULL DEFAULT 'classique',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_user` (`id_user`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_station`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_station` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `logo` varchar(255) NOT NULL,
  `logo_facture` varchar(255) NOT NULL,
  `entete_info` text NOT NULL,
  `pied_info` text NOT NULL,
  `entete_color` varchar(15) NOT NULL,
  `entete_color_texte` varchar(15) NOT NULL,
  `pied_color` varchar(15) NOT NULL,
  `pied_color_texte` varchar(15) NOT NULL,
  `color_table` varchar(15) NOT NULL,
  `color_table_titre` varchar(15) NOT NULL,
  `color_table_texte` varchar(15) NOT NULL,
  `color_table_opacite` varchar(15) NOT NULL,
  `color_titre` varchar(15) NOT NULL,
  `color_sous_titre` varchar(15) NOT NULL,
  `color_label_titre` varchar(15) NOT NULL,
  `color_label_sous_titre` varchar(15) NOT NULL,
  `taille_entete` decimal(10,2) NOT NULL,
  `taille_pied` decimal(10,2) NOT NULL,
  `shift` int(11) NOT NULL DEFAULT 12,
  `step` decimal(10,4) NOT NULL DEFAULT 0.0000,
  `entete_impression` int(11) NOT NULL DEFAULT 0,
  `code_station` int(11) NOT NULL DEFAULT 101,
  `afficher_ice` tinyint(1) NOT NULL DEFAULT 1,
  `afficher_adresse` tinyint(1) NOT NULL DEFAULT 1,
  `afficher_tel` tinyint(1) NOT NULL DEFAULT 1,
  `afficher_mail` tinyint(1) NOT NULL DEFAULT 1,
  `mentions_legales` text DEFAULT NULL,
  `signature_active` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_style`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_style` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_style_module`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_style_module` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `module` varchar(40) NOT NULL,
  `id_style` int(11) NOT NULL,
  `mode_theme` varchar(10) NOT NULL DEFAULT 'clair',
  `nav_style` varchar(20) NOT NULL DEFAULT 'plein',
  `nav_align` varchar(10) NOT NULL DEFAULT 'gauche',
  `police` varchar(20) NOT NULL DEFAULT 'theme',
  `taille_texte` varchar(10) NOT NULL DEFAULT 'normal',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uniq_user_module` (`id_user`,`module`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_style_user`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_style_user` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `id_style` int(11) NOT NULL,
  `mode_theme` varchar(10) NOT NULL DEFAULT 'clair',
  `nav_style` varchar(20) NOT NULL DEFAULT 'plein',
  `nav_align` varchar(10) NOT NULL DEFAULT 'gauche',
  `police` varchar(20) NOT NULL DEFAULT 'theme',
  `taille_texte` varchar(10) NOT NULL DEFAULT 'normal',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=184 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `parametre_type_encaissement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parametre_type_encaissement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(30) NOT NULL,
  `statut` int(11) NOT NULL DEFAULT 1,
  `type` int(11) NOT NULL DEFAULT 1,
  `coffre` int(11) NOT NULL DEFAULT 0,
  `methode` varchar(50) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_alimentation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_alimentation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_point_vente` int(11) NOT NULL,
  `id_fournisseur` int(11) NOT NULL,
  `date_alimentation` datetime NOT NULL,
  `reference` varchar(50) DEFAULT NULL,
  `livreur` varchar(255) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_alimentation_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_alimentation_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_alimentation` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `qte` decimal(10,3) NOT NULL,
  `prix` decimal(10,6) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_categorie`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_categorie` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  `icone` varchar(50) DEFAULT NULL,
  `ordre` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_compte`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_compte` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_point_vente` int(11) NOT NULL,
  `date_debut` datetime NOT NULL,
  `date_fin` datetime DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `ca` decimal(10,2) DEFAULT NULL COMMENT 'fige a la cloture',
  `espece_comptee` decimal(10,2) DEFAULT NULL COMMENT 'montant reellement compte en caisse a la cloture',
  `ecart` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_compte_employe`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_compte_employe` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL,
  `id_employe` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_compte_employe` (`id_compte`,`id_employe`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_depense`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_depense` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL,
  `motif` varchar(255) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_point_vente`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_point_vente` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_zone_activite` int(11) NOT NULL,
  `id_stock` int(11) NOT NULL,
  `actif` tinyint(1) NOT NULL DEFAULT 1,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_zone_activite` (`id_zone_activite`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_point_vente_appareil`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_point_vente_appareil` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_point_vente` int(11) NOT NULL,
  `id_appareil` int(11) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_pv_appareil` (`id_point_vente`,`id_appareil`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_recette`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_recette` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_produit` int(11) NOT NULL COMMENT 'produit fini (mode_vente=prepare)',
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_produit` (`id_produit`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_recette_ligne`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_recette_ligne` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_recette` int(11) NOT NULL,
  `id_produit_ingredient` int(11) NOT NULL,
  `qte` decimal(10,3) NOT NULL COMMENT 'quantite consommee par unite vendue du produit fini',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_ticket`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_ticket` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_compte` int(11) NOT NULL,
  `numero` int(11) NOT NULL,
  `date_ticket` datetime NOT NULL,
  `id_employe` int(11) NOT NULL DEFAULT 0,
  `id_client` int(11) NOT NULL DEFAULT 0,
  `statut` varchar(20) NOT NULL DEFAULT 'paye',
  `montant` decimal(10,2) NOT NULL DEFAULT 0.00,
  `methode` varchar(20) DEFAULT NULL COMMENT 'espece | carte | client',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `shop_ticket_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shop_ticket_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_ticket` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `qte` decimal(10,3) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  `type_vente` varchar(20) NOT NULL DEFAULT 'produit',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_alimentation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_alimentation` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `date_alimentation` datetime NOT NULL,
  `type` varchar(20) DEFAULT NULL,
  `suivi` tinyint(1) NOT NULL DEFAULT 0,
  `note` varchar(255) DEFAULT NULL,
  `livreur` varchar(255) NOT NULL,
  `reference` varchar(50) DEFAULT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_bon` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=556 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_bc`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_bc` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_fournisseur` int(11) NOT NULL,
  `date_bc` date NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  `id_alimentation` int(11) NOT NULL DEFAULT 0,
  `date_prevu` date DEFAULT NULL,
  `id_mode` int(11) NOT NULL DEFAULT -1,
  `date_mode` date DEFAULT NULL,
  `taxe` varchar(10) NOT NULL DEFAULT 'ht',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=383 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_bc_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_bc_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_produit` int(11) NOT NULL,
  `qte` int(11) NOT NULL,
  `id_bc` int(11) NOT NULL,
  `prix` decimal(11,6) NOT NULL DEFAULT 0.000000,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=708 DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_mouvement`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_mouvement` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_mouvement` datetime NOT NULL,
  `id_stock` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `entre` decimal(10,2) NOT NULL,
  `sortie` decimal(10,2) NOT NULL,
  `source` varchar(50) NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_groupe` int(11) DEFAULT NULL,
  `prix` decimal(10,6) DEFAULT NULL,
  `melange` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13836 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_mouvement_officiel`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_mouvement_officiel` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `journee` date NOT NULL,
  `id_produit` int(11) NOT NULL,
  `entre_officielle` decimal(10,2) NOT NULL,
  `entre` decimal(10,2) NOT NULL,
  `sortie` decimal(10,2) NOT NULL,
  `sortie_officielle` decimal(10,2) NOT NULL,
  `prix` decimal(10,6) NOT NULL,
  `tva` int(11) NOT NULL,
  `source` varchar(20) NOT NULL,
  `id_source` int(11) NOT NULL,
  `melange` int(11) NOT NULL DEFAULT 1,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13793 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_produit_ancien`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_produit_ancien` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(34) DEFAULT NULL,
  `prix_vente` decimal(11,2) DEFAULT NULL,
  `prix_achat` decimal(11,6) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `nom` (`nom`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_produits`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_produits` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(100) NOT NULL,
  `code_barre` varchar(50) DEFAULT NULL,
  `type_vente` varchar(20) NOT NULL,
  `id_categorie` int(11) DEFAULT NULL,
  `mode_vente` enum('direct','prepare') NOT NULL DEFAULT 'direct',
  `photo` varchar(255) DEFAULT NULL,
  `unite` varchar(20) NOT NULL DEFAULT 'unite',
  `prix_achat` decimal(20,6) NOT NULL,
  `prix_vente` decimal(20,6) NOT NULL,
  `tva` int(11) NOT NULL,
  `en_stock_initial` int(11) NOT NULL,
  `en_stock` int(11) NOT NULL,
  `en_vert` int(11) NOT NULL DEFAULT 0,
  `en_rouge` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uk_code_barre` (`code_barre`)
) ENGINE=MyISAM AUTO_INCREMENT=153 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_produits_quantite`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_produits_quantite` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_stock` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `en_stock` int(11) NOT NULL,
  `en_stock_initial` int(11) NOT NULL DEFAULT 0,
  `valeur_initial` decimal(10,2) NOT NULL DEFAULT 0.00,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=216 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `stocks_transfert`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stocks_transfert` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `date_transfert` datetime NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_destination` int(11) NOT NULL,
  `id_creation` int(11) NOT NULL,
  `date_creation` datetime NOT NULL,
  `id_cloture` int(11) DEFAULT NULL,
  `date_cloture` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `telecollect`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `telecollect` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `numero` int(11) NOT NULL,
  `du` datetime DEFAULT NULL,
  `au` datetime NOT NULL,
  `id_creation` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `user_path`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_path` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_user` int(11) NOT NULL,
  `path` varchar(250) NOT NULL,
  `date_creation` datetime NOT NULL,
  `info_post` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `user_profil`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user_profil` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(50) NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `nom` (`nom`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `nom` varchar(30) DEFAULT NULL,
  `prenom` varchar(50) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `id_profil` int(11) NOT NULL DEFAULT 3,
  `autorisation` int(11) NOT NULL DEFAULT 1,
  `token` text DEFAULT NULL,
  `date_connexion` datetime DEFAULT NULL,
  `remember_token` varchar(255) DEFAULT NULL,
  `remember_token_expire` datetime DEFAULT NULL,
  `actualite` tinyint(1) NOT NULL DEFAULT 0,
  `masquer_mes_activites` tinyint(1) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users_pda`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users_pda` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `email` varchar(255) NOT NULL,
  `nom` varchar(30) DEFAULT NULL,
  `prenom` varchar(50) DEFAULT NULL,
  `password` varchar(255) NOT NULL,
  `id_profil` int(11) NOT NULL DEFAULT 3,
  `autorisation` int(11) NOT NULL DEFAULT 1,
  `token` text DEFAULT NULL,
  `date_connexion` datetime DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `email` (`email`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `users_space`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `users_space` (
  `id` int(11) NOT NULL,
  `tresorie` int(11) NOT NULL DEFAULT 0,
  `coffre` int(11) NOT NULL DEFAULT 0,
  `compte` int(11) NOT NULL DEFAULT 0,
  `vente` int(11) NOT NULL DEFAULT 0,
  `achat` int(11) NOT NULL DEFAULT 0,
  `stock` int(11) NOT NULL DEFAULT 0,
  `service` int(11) NOT NULL DEFAULT 0,
  `restaurant` int(11) DEFAULT 0,
  `employe` int(11) NOT NULL DEFAULT 0,
  `interne` int(11) NOT NULL DEFAULT 0,
  `comptabilite` int(11) NOT NULL DEFAULT 0,
  `statistique` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1 COLLATE=latin1_swedish_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vignette_administration`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vignette_administration` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nom` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vignette_description`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vignette_description` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_bon` int(11) NOT NULL,
  `id_produit` int(11) NOT NULL,
  `qte` decimal(10,2) NOT NULL,
  `prix` decimal(10,2) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `type` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
DROP TABLE IF EXISTS `vignette_ont`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vignette_ont` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_administration` int(11) NOT NULL,
  `serie` varchar(50) NOT NULL,
  `date_ont` date NOT NULL,
  `code` int(11) NOT NULL DEFAULT 0,
  `intervenant` varchar(50) NOT NULL,
  `matricule` varchar(50) NOT NULL,
  `montant` decimal(10,2) NOT NULL,
  `type_bon` int(11) NOT NULL,
  `source` varchar(30) NOT NULL,
  `id_source` int(11) NOT NULL,
  `id_creation` int(11) DEFAULT NULL,
  `date_creation` int(11) DEFAULT NULL,
  `id_etat` int(11) NOT NULL DEFAULT 0,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_general_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

