-- MySQL dump 10.13  Distrib 8.0.41, for Win64 (x86_64)
--
-- Host: 127.0.0.1    Database: db_access_02709
-- ------------------------------------------------------
-- Server version	8.0.40

/*!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 */;
/*!50503 SET NAMES utf8 */;
/*!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 */;

--
-- Table structure for table `stk_tbl_facture`
--

DROP TABLE IF EXISTS `stk_tbl_facture`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `stk_tbl_facture` (
  `id` int NOT NULL AUTO_INCREMENT,
  `type_facture` enum('achat','vente') NOT NULL,
  `num_facture` varchar(30) NOT NULL COMMENT 'nomenclature interne',
  `ref_facture` varchar(50) DEFAULT NULL COMMENT 'ref facture reçue',
  `date_facture` date NOT NULL,
  `fk_tiers_id` int NOT NULL,
  `intitule` varchar(100) DEFAULT NULL,
  `montant` decimal(13,2) NOT NULL,
  `devise` varchar(3) NOT NULL,
  `fk_idworkday` int NOT NULL,
  `solde` decimal(13,2) NOT NULL DEFAULT '0.00' COMMENT 'solde à payer',
  `statut_facture` enum('PAID','UNPAID') DEFAULT NULL COMMENT 'Null pour les fact type Achat',
  `is_active` tinyint(1) DEFAULT '1',
  `user_crea` varchar(30) NOT NULL,
  `date_crea` timestamp NULL DEFAULT CURRENT_TIMESTAMP,
  `id_app` int DEFAULT '0' COMMENT 'cfr id Société',
  PRIMARY KEY (`id`),
  UNIQUE KEY `fac_idx_uq_numFacture` (`num_facture`,`id_app`),
  KEY `fac_fk_tiers_id` (`fk_tiers_id`),
  KEY `fac_fk_idworkday` (`fk_idworkday`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8mb3;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `stk_tbl_facture`
--

LOCK TABLES `stk_tbl_facture` WRITE;
/*!40000 ALTER TABLE `stk_tbl_facture` DISABLE KEYS */;
INSERT INTO `stk_tbl_facture` VALUES (1,'achat','01','01','2024-05-17',1,'prise en charge medicale pour ndjate , art en action et morel',610.00,'USD',1,0.00,NULL,1,'admin','2024-05-17 12:17:00',2),(2,'achat','02','02','2024-05-17',1,'prise en charge médicale pour matondo et ndjike',90.00,'USD',1,90.00,NULL,1,'admin','2024-05-17 12:19:02',2),(3,'achat','03','03','2024-05-17',1,'prise en charge medicale pour BRP',265.00,'USD',1,265.00,NULL,1,'admin','2024-05-17 12:20:26',2),(4,'achat','04','04','2024-05-17',1,'prise en charge medicale pour TAnk',210.00,'USD',1,210.00,NULL,1,'admin','2024-05-17 12:21:09',2),(5,'achat','05','05','2024-05-17',1,'prise en charge medicale pour servtec',425.00,'USD',1,425.00,NULL,1,'admin','2024-05-17 12:21:47',2),(6,'achat','06','06','2024-05-17',1,'prise en charge medicale mois de janvier',685.00,'USD',1,685.00,NULL,1,'admin','2024-05-17 12:22:51',2),(7,'achat','07','07','2024-05-17',1,'prise en charge medicale pour BUO, im Congo et SQL',965.00,'USD',1,965.00,NULL,1,'admin','2024-05-17 12:23:59',2),(12,'achat','08','08','2024-05-17',1,'prise en charge medicale pour si jeunesse savait, servtec veritas',550.00,'USD',1,550.00,NULL,1,'admin','2024-05-17 12:27:13',2),(13,'achat','09','09','2024-05-17',1,'prise en charge medicale pour mongu, polytra, art en action',750.00,'USD',1,750.00,NULL,1,'admin','2024-05-17 12:29:06',2),(14,'achat','10','10','2024-05-17',1,'prise en charge medicale Congo American',550.00,'USD',1,550.00,NULL,1,'admin','2024-05-17 12:29:46',2),(15,'vente','01','01','2023-06-01',7,'vente Eau',85678.18,'USD',17,0.00,'UNPAID',1,'pathy','2024-06-04 20:02:23',5),(16,'achat','02','02','2023-06-02',8,'Achat fournitures',51148.82,'USD',17,51148.82,NULL,1,'pathy','2024-06-04 20:51:40',5),(17,'achat','03','03','2023-06-03',8,'Achat fournitures',1795.60,'USD',17,1795.60,NULL,1,'pathy','2024-06-04 21:00:48',5);
/*!40000 ALTER TABLE `stk_tbl_facture` ENABLE KEYS */;
UNLOCK TABLES;
/*!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 */;

-- Dump completed on 2025-05-06 22:45:26
