CREATE DATABASE  IF NOT EXISTS `bd_mesavoirs` /*!40100 DEFAULT CHARACTER SET utf8 */;
USE `bd_mesavoirs`;
-- MySQL dump 10.13  Distrib 5.7.9, for Win64 (x86_64)
--
-- Host: localhost    Database: bd_mesavoirs
-- ------------------------------------------------------
-- Server version	5.6.31-log

/*!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 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 `actifs`
--

DROP TABLE IF EXISTS `actifs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `actifs` (
  `no_id` int(11) NOT NULL AUTO_INCREMENT,
  `symbole` varchar(15) DEFAULT NULL,
  `libelle` varchar(45) DEFAULT NULL,
  `classe` varchar(15) DEFAULT 'Europe Large',
  `nombre` int(11) DEFAULT '1',
  `cours` decimal(11,3) DEFAULT '0.000',
  `pru` decimal(11,3) DEFAULT '0.000',
  `valeur` decimal(11,2) DEFAULT '0.00',
  `plus_value` decimal(11,2) DEFAULT '0.00',
  `pc_plusvalue` decimal(5,1) DEFAULT '0.0',
  `pc_allocation` decimal(5,1) DEFAULT '0.0',
  `ter` decimal(4,2) DEFAULT '0.00',
  `ter_pondere` decimal(4,3) DEFAULT '0.000',
  `devise` char(3) DEFAULT 'EUR',
  `parite` decimal(6,4) DEFAULT '1.0000',
  `rdt` decimal(4,2) DEFAULT '0.00',
  PRIMARY KEY (`no_id`),
  KEY `SYMBOLE` (`symbole`)
) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `actifs`
--

LOCK TABLES `actifs` WRITE;
/*!40000 ALTER TABLE `actifs` DISABLE KEYS */;
INSERT INTO `actifs` VALUES (3,'VEUR.AS','VANGUARD FTSE EUR','Europe Large',1190,30.050,28.077,35759.50,2347.87,6.6,20.5,0.12,0.000,'EUR',1.0000,3.12),(5,'SMC.PA','SPDR EU SM.CAP','Europe Small',30,216.750,204.582,6502.50,365.04,5.6,3.7,0.30,0.000,'EUR',1.0000,0.00),(6,'CSPX.AS','iSHR S&P500 B A','US Large',95,203.298,204.846,19313.31,-147.06,-0.8,11.1,0.07,0.000,'EUR',1.0000,0.00),(7,'VYM','Vanguard High Dividend Yield ET','US Large',70,79.190,71.703,4761.69,-257.52,-5.4,2.7,0.08,0.000,'USD',0.8590,2.90),(9,'R2US.PA','SPDR RUSSELL 2K','US Small',338,33.430,33.833,11299.34,-136.21,-1.2,6.5,0.30,0.000,'EUR',1.0000,0.00),(10,'SHLD','Sears Holdings Corporation','US Small',750,8.720,8.762,5617.86,-953.64,-17.0,3.2,0.00,0.000,'USD',0.8590,0.00),(11,'VER','VEREIT, Inc.','US REIT',1000,8.355,8.085,7176.95,-908.05,-12.7,4.1,0.00,0.000,'USD',0.8590,6.60),(12,'VNQ','Vanguard REIT ETF - DNQ','US REIT',210,83.700,72.762,15098.64,-181.38,-1.2,8.6,0.12,0.000,'USD',0.8590,4.40),(13,'LIVRETS','Livrets A, LDD, etc ....','Monétaires',1000,14.530,14.530,14530.00,0.00,0.0,8.3,0.00,0.000,'EUR',1.0000,0.75),(14,'BOURSO.VIE1','Boursorama Vie CTP','Obligations',1000,22.005,21.000,22005.00,1005.00,4.6,12.6,0.00,0.000,'EUR',1.0000,2.30),(15,'BOURSO.VIE2','Boursorama Vie CKT','Obligations',1000,20.122,19.300,20122.00,822.00,4.1,11.5,0.00,0.000,'EUR',1.0000,2.30),(16,'CASH','Liquidité CTO','Monétaires',1000,5.724,5.724,5724.00,0.00,0.0,3.3,0.00,0.000,'EUR',1.0000,0.00);
/*!40000 ALTER TABLE `actifs` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`127.0.0.1`*/ /*!50003 TRIGGER `bd_mesavoirs`.`actifs_BEFORE_INSERT` BEFORE INSERT ON `actifs` FOR EACH ROW
BEGIN

	SET NEW.valeur = NEW.cours * NEW.parite * NEW.nombre;
    SET NEW.plus_value = NEW.valeur - (NEW.pru * NEW.nombre);
    SET NEW.pc_plusvalue = NEW.plus_value / NEW.valeur * 100;
   
END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`127.0.0.1`*/ /*!50003 TRIGGER `bd_mesavoirs`.`actifs_BEFORE_UPDATE` BEFORE UPDATE ON `actifs` FOR EACH ROW
BEGIN

	SET NEW.valeur = NEW.cours * NEW.parite * NEW.nombre;
    SET NEW.plus_value = NEW.valeur - (NEW.pru * NEW.nombre);
    SET NEW.pc_plusvalue = NEW.plus_value / NEW.valeur * 100;

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `allocation`
--

DROP TABLE IF EXISTS `allocation`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `allocation` (
  `no_cat` int(11) NOT NULL AUTO_INCREMENT,
  `classe` varchar(20) NOT NULL,
  `pc_cible` smallint(6) DEFAULT '0',
  `pc_atteint` decimal(5,1) DEFAULT '0.0',
  `valeur` decimal(11,2) DEFAULT '0.00',
  PRIMARY KEY (`no_cat`),
  KEY `categorie` (`classe`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `allocation`
--

LOCK TABLES `allocation` WRITE;
/*!40000 ALTER TABLE `allocation` DISABLE KEYS */;
INSERT INTO `allocation` VALUES (1,'Europe Large',20,20.5,35759.50),(2,'US Large',24,17.6,30759.15),(3,'US REIT',8,12.8,22275.59),(4,'Monétaires',5,11.6,20254.00),(5,'Obligations',30,24.1,42127.00),(8,'Europe Small',5,3.7,6502.50),(9,'US Small',8,9.7,16917.20);
/*!40000 ALTER TABLE `allocation` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `classes`
--

DROP TABLE IF EXISTS `classes`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `classes` (
  `classe` varchar(20) NOT NULL,
  `type` varchar(10) NOT NULL DEFAULT 'ACTION',
  `ordre` smallint(6) DEFAULT '1',
  `bg_color` varchar(20) DEFAULT 'info',
  PRIMARY KEY (`classe`),
  KEY `ordre` (`ordre`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `classes`
--

LOCK TABLES `classes` WRITE;
/*!40000 ALTER TABLE `classes` DISABLE KEYS */;
INSERT INTO `classes` VALUES ('Emergents','ACTION',30,'warning'),('Europe Large','ACTION',1,'info'),('Europe REIT','ACTION',3,'info'),('Europe Small','ACTION',2,'info'),('Monétaires','AUTRE',50,'success'),('Obligations','AUTRE',40,'success'),('US Large','ACTION',10,'danger'),('US REIT','ACTION',12,'danger'),('US Small','ACTION',11,'danger');
/*!40000 ALTER TABLE `classes` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `docs`
--

DROP TABLE IF EXISTS `docs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `docs` (
  `doc_id` smallint(6) NOT NULL AUTO_INCREMENT,
  `theme` varchar(10) NOT NULL DEFAULT '',
  `intitule` varchar(50) NOT NULL DEFAULT '',
  `texte` mediumtext,
  `cree_le` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `modif_le` timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`doc_id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='Liste des documents';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `docs`
--

LOCK TABLES `docs` WRITE;
/*!40000 ALTER TABLE `docs` DISABLE KEYS */;
INSERT INTO `docs` VALUES (2,'FINANCE','Mouvements du portefeuille','.\r\n\r\n**Juillet 2017**\r\n  - Renforcer : 5 **SPDR ETFs MSCI Europe Small Cap UCITS** @ 212,50 (1 067,50 €)\r\n  - Alléger : 500 **Sears Holdings Corp** @ 10,41 $ (5 194,00 $)\r\n  - Liquider : 45 **Berkshire Hathaway Inc -B-** @ 173,75 $ (7 805,05 $)\r\n\r\n**Avril 2017**\r\n  - Achat : 70 **Vanguard High Dividend Yield ETF** @ 77,75 $ (5 453,38 $)\r\n  - Renforcer : 500 **VEREIT Inc** @ 7,50 $ (3 759,23 $)\r\n  - Renforcer : 500 **Sears Holdings Corp** @ 6,45 $ (3 233,85 $)\r\n\r\n**Mars 2017**\r\n  - Alléger : 300 **Sears Holdings Corp** @ 9,3201 $ (2 787,78 $)\r\n  - Renforcer : 40 **iShares Core S&P 500 UCITS ETF** @ 210.80 (8 442,00 €)\r\n  - Renforcer : 20 **SPDR ETFs MSCI Europe Small Cap UCITS** @ 204,19 (4 088,80 €)\r\n\r\n**Février 2017**\r\n  - Renforcer : 40 **iShares Core S&P 500 UCITS ETF** @ 199,289 (7 981,56 €)\r\n  - Renforcer : 248 **SPDR Russell 2000 U.S. Small Cap ETF** @ 33,73 (8 375,04 €)\r\n\r\n**Janvier 2017**\r\n  - Achat : 90 **SPDR Russell 2000 U.S. Small Cap ETF** @ 33,95 (3 060,50 €)\r\n  - Achat : 15 **iShares Core S&P 500 UCITS ETF** @ 202,119 (3 036,79 €)\r\n  - Achat : 5 **SPDR ETFs MSCI Europe Small Cap UCITS** @ 195,73 € (981,15 €)\r\n  - Alléger : 110 **Vanguard High Dividend Yield** @ 75,67 $ (8 310,07 $)\r\n  - Alléger : 85 **Vanguard Div Appreciation Index Fd** @ 85,922 $ (7 290,74 $)\r\n  - Liquider : 90 **Vanguard FTSE Emerging Markets**   31 GBP	(4 194,40 €)\r\n  - Liquider : 10 **Unibail-Rodamco** @ 222,00 € (2 215,00 €)\r\n  - Liquider : 100 **Vanguard High Dividend Yield** @ 75,3508 $ (7 522,17 $)\r\n  - Liquider : 90 **Vanguard Div Appreciation Index Fd** @ 86,152 $ (7 740,54 $)\r\n**Décembre 2016**\r\n  - Renforcer : 300 **Sears Holdings Corp** @ 8,60 $ (2 587,80 $)\r\n  - Achat : 10 **Unibail-Rodamco** @ 214,35€ (2 148,50 €)\r\n  - Vente : 4 **Markel Corp.** @ 901,50 $ (3 597,19 $)\r\n  - Vente : 4 **Markel Corp.** @ 906,434 $ (3 616,88 $)\r\n\r\n**Novembre 2016**\r\n  - Alléger: 150 **Sears Holdings Corp** @ 12,97 $ (1 938,24 $)\r\n\r\n**Septembre 2016**\r\n  - Renforcer : 150 **Sears Holdings Corp** @ 11,76 $ (1 771,35 $)\r\n  - Renforcer : 90 **Vanguard High Dividend Yield** @ 71,953 $ (6 487,85 $)\r\n  - Renforcer : 75 **Vanguard Div Appreciation ETF** @ 83,249 $ (6 255,53 $)\r\n  - Achat : 750 **Sears Holdings Corp** @ 13,38 $ (10 050,61 $)\r\n  - Vente : 750 **Sears Holdings Corp** @ 13,6002 $ (10 184,37 $) **Externaliser MV** de -10 184,37 $\r\n\r\n**Août 2016**\r\n  - Alléger : 30 **Berkshire Hathaway Inc -B-**   148,50 USD (4 444,91 $)\r\n  - Alléger : 500 **VEREIT Inc**   10,45 USD (5 214,19 $)\r\n  - Liquider : 1250 **Amundi ETF MSCI Emerging Markets**   3,44 EUR (4 300.34€) PV +1%\r\n\r\n**Juillet 2016**\r\n  - Alléger : 265 **Sears Holdings Corporation** 14,85 USD (3 925,77 $)\r\n\r\n**Juin 2016**\r\n  - Renforcer : 80 **Vanguard FTSE Developed Europe**   26,54 EUR (2 123,20 €)\r\n  - Renforcer : 150 **Vanguard FTSE Developed Europe**   27,15 EUR (4 077,50 €)\r\n  - Renforcer : 62 **Vanguard High Dividend Yield ETF**   69,69 USD ($3 857,56)\r\n  - Renforcer : 50 **Vanguard Dividend Appreciation ETF**  80,95 USD ($3 905,90)	\r\n\r\n**Mai 2016**\r\n  - Acheter : 90 **Vanguard FTSE Emerging Markets**   38.80 €	(3 497,00 €)\r\n  - Renforcer : 200 **Sears Holdings Corporation** 14,60 USD (2 928,66 $)\r\n  - Liquider : 90 **Vanguard FTSE Emerging Markets**   31 GBP	(3 505,89 €)\r\n\r\n**Avril 2016**\r\n  - Alléger : 200 **Sears Holdings Corporation** 18,25 USD (3 650 $) PV 23%\r\n  - Renforcer : 200 **Sears Holdings Corporation** 14,82 USD (2 972,66 $)\r\n  - Liquider : 250 **Royal Dutch Shell PLC -B-**   18,185 £ (5 693,54 €) PV +344 €\r\n**Mars 2016**\r\n  - Alléger : 7 **Markel Corporation**   884 USD	(6 176,31 $)\r\n  - Alléger : 37 **Berkshire Hathaway Inc -B-**   140,10 USD	\r\n\r\n**Janvier 2016**\r\n  - Renforcer : 125 **Royal Dutch Shell PLC -B-**   1.378,00 PNC (2 282,35 €)\r\n  - Renforcer : 40 **Vanguard REIT ETF**   76,65 USD ($3 074,50)\r\n	\r\n**Décembre 2015**\r\n  - Achat : 58 **Vanguard High Dividend Yield ETF**   66,35 USD ($3 857,56)\r\n  - Achat : 50 **Vanguard Dividend Appreciation ETF**  77,93 USD ($3 905,90)	\r\n  - Renforcer : 100 **Vanguard FTSE Developed Europe**   28,73 EUR (2.878,00 €)\r\n  - Renforcer : 100 **Vanguard FTSE Developed Europe**   29,22 EUR (2.927,00 €)\r\n  - Renforcer : 40 **Vanguard REIT ETF**   78,25 USD	($3 138,64)\r\n  - Liquider : 45 **Procter & Gamble Co.**   79,78 USD	($3 581,04)\r\n  - Liquider : 22 **IBM Corporation**   139,24 USD ($3 054,76)\r\n\r\n**Novembre 2015**\r\n  - Achat : 90 **Vanguard FTSE Emerging Markets**   30,40 GBP	(3 912,60 €)\r\n  - Renforcer : 40 **Vanguard REIT ETF**   78,93 USD ($3 165,67)	\r\n  - Renforcer : 160 **Sears Holdings Corporation** 20,87 USD ($3 347,65)\r\n  - Renforcer : 100 **Vanguard FTSE Developed Europe**   29,82 EUR (2.987,00 €)\r\n  - Alléger : 1250 **Amundi ETF MSCI Emerging Markets**   3,22 EUR (4 017,50€)\r\n  - Liquider : 45 **Exxon Mobil Corporation**   82,19 USD ($3 689,52)	\r\n  - Liquider : 67 **Emerson Electric Co.**   48,70 USD	($3 254,31)\r\n  - Liquider : 55 **Wal-Mart Stores Inc.**   58,36 USD	($3 201,21)		\r\n  - Liquider : 290 **WP GLIMCHER Inc**   12,37 USD	($3 579,30)	\r\n  - Liquider : 500 **CYS Investments Inc.**   7,72 USD	($3 851,25)\r\n  - Liquider : 129 **GlaxoSmithKline PLC**   1.400,00 PNC	(2 531,99 €)\r\n	\r\n**Octobre 2015**\r\n  - Achat : 22 **IBM Corporation**   141,06 USD	($3 112,09)\r\n  - Achat : 55 **Wal-Mart Stores Inc.**   58,87 USD	($3 246,78)	\r\n  - Alléger : 4 **Markel Corporation**   807,99 USD	($3 223,03)\r\n  - Alléger : 23 **Berkshire Hathaway Inc -B-**   133,60 USD	($3 064,05)\r\n  - Liquider : 65 **Unilever PLC**   2.932,00 PNC	(2 638,60 €)\r\n\r\n**Septembre 2015**\r\n  - Alléger : 40 **Vanguard REIT ETF**   76,58 USD ($3 054,47)\r\n  - Liquider : 20 **SPDR ETFs MSCI Europe Small Cap** 185,45 EUR (3 704 €)\r\n  - Achat : 65 **Unilever PLC**   2.605,00 PNC (2 349,38 €)\r\n  - Achat : 129 **GlaxoSmithKline PLC**   1.287,50 PNC (2 308,92 €)\r\n  - Achat : 290 **WP GLIMCHER Inc**   11,98 USD	($3 483,32)	\r\n\r\n**Août 2015**\r\n  - Achat : 45 **Exxon Mobil Corporation**   77,00 USD	($3 473,90)\r\n  - Achat : 67 **Emerson Electric Co.**   48,95 USD	($3 288,44)\r\n  - Alléger : 400 **CYS Investments Inc.**   7,81 USD	($3 115,35)	\r\n\r\n**Juillet 2015**\r\n  - Achat : 45 **Procter & Gamble Co.**   77,30 USD (3 487,50$)\r\n  - Achat : 125 **Royal Dutch Shell PLC -B-**   1.760,00 PNC (3 122,78€)\r\n  - Renforcer : 160 **Sears Holdings Corporation**   25,50 USD ($4 089,62)\r\n  - Alléger : 18 **SPDR ETFs MSCI Europe Small Cap**  191,10 EUR (3 434,80€)\r\n  - Liquider : 60 **Vanguard Total Stock Market ETF**   109,07 USD ($6 532,11)\r\n\r\n**Juin 2015**\r\n  - Renforcer : 160 **Sears Holdings Corporation**   30,17 USD ($4 836,88)\r\n  - Renforcer : 10 **SPDR ETFs MSCI Europe Small Cap**  190,80 EUR (1 913,00€)\r\n  - Renforcer : 95 **Vanguard FTSE Developed Europe**   31,65 EUR (3 011,75€)\r\n  - Alléger : 40 **Vanguard Total Stock Market ETF**   109,53 USD ($4371,16)\r\n\r\n**Mai 2015**\r\n  - Renforcer : 700 **Amundi ETF MSCI Emerging Markets**   3,74 EUR (2623,00€)\r\n  - Liquider : 1.890 **Centrica PLC**   279,00 PNC (7264,07€) PV +7%\r\n\r\n**Avril 2015**\r\n  - Renforcer : 13 **SPDR ETFs MSCI Europe Small Cap**   191,40 EUR (2 493,20€)\r\n  - Renforcer : 7 **Markel Corporation**   770,75 USD	($5 406,01)\r\n  - Renforcer : 50 **Vanguard REIT ETF**   82,48 USD ($4 133,44)	\r\n  - Alléger : 105 **HCP Inc.**   43,99 USD ($4 608,40)\r\n  - Liquider : 120 **HCP Inc.**   43,32 USD ($5 187,23) PV +14%	\r\n\r\n**Mars 2015**\r\n  - Achater : 15 **SPDR ETFs MSCI Europe Small Cap** 181,90 EUR (2 733,50€)\r\n  - Renforcer : 55 **Sears Holdings Corporation** 37,90 USD ($2092,00)\r\n  - Renforcer : 65 **Vanguard FTSE Developed Europe** 31,73 EUR	(2 067,45€)	\r\n  - Renforcer : 630 **Centrica PLC**   243,80 PNC (2 157,43€)\r\n  - Liquider : 360 **Standard Chartered PLC**   1.054,00 PNC (5209,22€) PV +16%	\r\n\r\n**Février 2015**\r\n  - Renforcer : 630 **Centrica PLC**   252,40 PNC (€2 186,79)\r\n  - Renforcer : 30 **Vanguard REIT ETF**   83,97 USD ($2 527,30)\r\n  - Renforcer : 20 **Vanguard REIT ETF**   83,50 USD ($1 677,33)	\r\n  - Liquider : 75 **Royal Dutch Shell PLC**   2.201,50 PNC (€2 218,11) PV +8%\r\n  - Liquider : 120 **BHP Billiton PLC**   1.600,00 PNC (2 616,85 €) PV +31%\r\n\r\n**Janvier 2015**\r\n  - Renforcer : 180 **Standard Chartered PLC**   920,80 PNC (2248,62€)	\r\n  - Renforcer : 70 **Sears Holdings Corporation**   32,62 USD ($2291,33)	\r\n  - Renforcer : 15 **Berkshire Hathaway Inc**   147,80 USD ($2224,89)\r\n  - Achat : 180 **Standard Chartered PLC** 952,90 PNC (2293,60€)\r\n  - Achat : 75 **Royal Dutch Shell PLC -B-**   2.080,00 PNC (2044,82€)\r\n  - Achat : 120 **BHP Billiton PLC**   1.280,00 PNC (2013,51€)\r\n  - Liquider : 35 **SPDR ETFs MSCI Europe ETF** 161,52 EUR (5 645,70€) PV +0\r\n  - Liquider : 1.600 **Tesco PLC**   203,65 PNC (4 154,79€) PV +24%\r\n  - Liquider : 51 **Sears Canada Inc (US)**   9,66 USD ($486,16)\r\n\r\n**Décembre 2014**\r\n  - Liquider : 115 **Digital Realty Trust Inc.** 66,31 USD ($7611,93) PV +57%\r\n  - Achat : 30 **Vanguard REIT ETF**   81,30 USD ($2447.66)\r\n  - Renforcement  : 2 **Markel Corporation**   670,00 USD ($1347,58)\r\n  - Renforcement : 75 **Sears Holdings Corporation**   32,80 USD ($2468,65)\r\n  - Renforcement : 100 **Vanguard FTSE Developed Europe**   26,70 EUR (2675,00€)\r\n  - Renforcement : 200 **Vanguard FTSE Developed Europe**   27,75 EUR (5557,50€)\r\n\r\n**Novembre 2014**\r\n  - Renforcement : 5 **Markel Corporation**   692,50 USD ($3472,20)\r\n  - Obtention : 51 **Sears Canada Inc. (US)** 9,50 USD ($484.50)\r\n  - Allégement : 300 **CYS Investments Inc.**   9,15 USD ($2 735,98)\r\n  - Liquidation : 90 **HSBC EURO STOXX 50 ETF**   32,09 EUR (2883,10€)\r\n  - Liquidation : 20 **SPDR MSCI Europe Small Cap ETF**   151,45 EUR (3024,00€)\r\n	\r\n**Octobre 2014**\r\n  - Achat : 1.600 **Tesco PLC**   166,60 PNC (-3 426,38€)\r\n  - Achat : 100 **Vanguard FTSE Developed Europe**   26,14 EUR	(2 619 €)\r\n  - Achat : 630 **Centrica PLC**   305,30 PNC (-2 494,41€)	\r\n  - Achat : 140 **GlaxoSmithKline PLC**   1.413,50 PNC (-2 565,21€)	\r\n  - Renforcer : 100 **Vanguard FTSE Developed Europe**   24,78 EUR (2 483 €)\r\n  - Liquidation : 3.100 **Tesco PLC**   179,25 PNC (7 109,20€)  **-- Investigated by FCA --**\r\n  - Liquidation : 140 **GlaxoSmithKline PLC**   1.411,50 PNC (2493,54€)	\r\n\r\n**Septembre 2014**\r\n  - Achat : 5 **Markel Corporation**   641,53 USD ($3 217,27)\r\n  - Achat : 900 **Amundi ETF MSCI Emerging Markets**   3,24 EUR (€2 921,00)\r\n  - Achat : 900 **Amundi ETF MSCI Emerging Markets**   3,33 EUR (€3 004,70)\r\n  - Renforcer  : 18 **SPDR MSCI Europe ETF**   163,20 EUR (€2 942,60)\r\n  - Liquider : 20 **Amundi ETF Stoxx Europe 600 ETF**   65,35 EUR (€1 302,00)\r\n  - Alléger  : 35 **Vanguard Total Stock Market ETF**   104,10 USD ($3 633,43)	\r\n  - Alléger  : 70 **Amundi ETF Stoxx Europe 600 ETF**   65,07 EUR (€4 549,90)	\r\n  - Alléger : 90 **HSBC EURO STOXX 50 ETF**   33,10 EUR ($2 974,00)	\r\n\r\n**Août 2014**\r\n  - Achat : 45 **Sears Holdings Corporation**   35,50 USD ($1 605,78)	\r\n  - Renforcer : 65 **HCP Inc.**   41,47 USD	($-2 704,94)\r\n  - Renforcer : 90 **Sears Holdings Corporation**   36,40 USD (3 285,90)	\r\n  - Renforcer : 1.000 **Tesco PLC**   245,50 PNC	(€-3128,88)		\r\n  - Alléger : 35 **Vanguard Total Stock Market ETF**   102,67 USD ($3 583,18)\r\n  - Alléger : 70 **Amundi ETF Stoxx Europe 600 ETF**   63,22 EUR (€4 420,40)\r\n  - Alléger : 18 **SPDR MSCI Europe Small Cap ETF**   155,36 EUR (€2 791,48)	\r\n\r\n**Juillet 2014**\r\n  - Renforcer  : 330 **American Realty Capital Properties** 12,40 USD ($4102,89)\r\n\r\n**Juin 2014**\r\n  - Renforcer : 30 **Amundi ETF Stoxx Europe 600 ETF**   64,89 EUR	(€-1951,70)	\r\n  - Renforcer : 60 **HSBC EURO STOXX 50 ETF**   34,35 EUR	(€-2066,00)\r\n  - Renforcer : 13 **SPDR MSCI Europe Small Cap  ETF**   158,00 EUR	(€-2061.50)\r\n  - Renforcer : 250 **American Realty Capital Properties Inc.** 12,39 USD ($3107,42)\r\n  - Vente : 360 **Cominar Real Estate Investment Trust**   18,99 CAD	(4641,25€)\r\n  - Liquider : 22 **Vanguard Mid-Cap ETF**   116,00 USD (PV:3,5%, 2542,65 €)\r\n  - Liquider : 1.200 **CYS Investments Inc.**   9,16 USD (PV:-19.6%, $10979,44)\r\n  - Vente : 1.200 **CYS Investments Inc.**   9,16 USD	($10979,44)\r\n  - Achat : 1.200 **CYS Investments Inc.**   9,11 USD	($-10949,70)\r\n\r\n**Mai 2014**\r\n  - Achat : 420 **American Realty Capital Properties Inc.** 13,08 USD ($5505,95)\r\n  - Achat : 25 **SPDR MSCI Europe Small Cap ETF** 151,15 EUR	(3783,75 €)	\r\n  - Achat : 22 **Vanguard Mid-Cap ETF**   112,14 USD	($2476,50)\r\n  - Renforcer : 24 **Berkshire Hathaway Inc -B-**   125,10 USD ($3012,36)\r\n  - Renforcer : 700 **Tesco PLC**   285,50 PNC (2467,65 €)\r\n  - Liquider : 70 **Baxter International Inc.**   75,00 USD (PV:34%, $5237,81)\r\n  - Liquider : 150 **Microsoft Corporation** 39,65 USD	(PV:44%, $5935,38)\r\n  - Liquider : 90 **Total SA**   52,45 EUR (PV:45%, 4715,50 €)\r\n\r\n**Avril 2014**\r\n  - Achat : 120 **HSBC EURO STOXX 50  ETF**   31,90 EUR\r\n  - Renforcer : 25 **Berkshire Hathaway Inc -B-**   121,40 USD\r\n  - Renforcer : 80 **American Campus Communities Inc. REIT**   37,19 USD\r\n  - Renforcer : 30 **Vanguard Total Stock Market ETF**   95,78 USD\r\n  - Renforcer : 35 **Vanguard Total Stock Market ETF**   97,25 USD\r\n  - Renforcer : 500 **Tesco PLC**   292,50 PNC\r\n  - Liquider : 55 **Technip SA**   74,62 EUR (PV 1%)\r\n  - Liquider : 60 **McDonald\'s Corporation**   98,09 USD (PV 7.6%)\r\n  - Liquider : 70 **Philip Morris International Inc.**   82,98 USD (PV +5.5%)\r\n\r\n**Mars 2014**\r\n  - Renforcer : 30 **Digital Realty Trust Inc.**   49,89 USD\r\n  - Renforcer : 40 **Vanguard Total Stock Market ETF**   98,35 USD\r\n  - Renforcer : 25 **Digital Realty Trust Inc.**   52,38 USD\r\n  - Renforcer : 48 **Amundi ETF Stoxx Europe 600  ETF**   61,35 EUR\r\n  - Renforcer : 90 **Cominar Real Estate Investment Trust**   18,16 CAD\r\n  - Renforcer : 16 **Amundi ETF Stoxx Europe 600  ETF**   60,70 EUR\r\n  - Liquider : 50 **British American Tobacco PLC**   3.345,00 PNC (PV +1%)\r\n  - Liquider : 130 **Orange SA**   9,61 EUR (PV -40%)\r\n  - Liquider : 90 **Unilever PLC**   2.571,00 PNC (PV +1%)\r\n\r\n**Février 2014**\r\n  - Achat : 70 **American Campus Communities Inc. REIT**   36,18 USD\r\n  - Alléger : 90 **Coca-Cola Co.**   37,95 USD (MV -5%)\r\n  - Renforcer : 16 **Amundi ETF Stoxx Europe 600 ETF**   59,60 EUR\r\n  - Renforcer : 20 **Vanguard Total Stock Market ETF**   95,95 USD\r\n  - Renforcer : 17 **Berkshire Hathaway Inc -B-**   113,95 USD\r\n  - Renforcerx : 80 **HCP Inc.**   37,76 USD\r\n  - Liquider : 90 **Coca-Cola Co.**   38,35 USD (MV -4%)\r\n  - Liquider : 40 **Exxon Mobil Corporation**   89,91 USD (PV 0%)\r\n  - Liquider : 80 **Kellogg Co.**   59,80 USD (PV +24%)\r\n  - Liquider : 100 **GlaxoSmithKline PLC**   1.692,00 PNC (PV 9%)\r\n  - Liquider : 50 **Sanofi** 75,13 EUR (PV 0%)\r\n\r\n**Janvier 2014**\r\n  - Achat : 15 **Vanguard Total Stock Market ETF**   92,75 USD\r\n  - Achat : 16 **Amundi ETF Stoxx Europe 600 ETF**   61,60 EUR\r\n  - Renforcer : 30 **Vanguard Total Stock Market ETF**   93,18 USD\r\n  - Renforcer : 14 **Berkshire Hathaway Inc -B-**   114,00 USD\r\n  - Renforcer : 34 **Amundi ETF Stoxx Europe 600 ETF**   61,50 EUR\r\n  - Renforcer : 10 **LVMH - Moët Hennessy Louis Vuitton SA**   123,55 EUR\r\n  - Renforcer : 85 **Cominar Real Estate Investment Trust**   18,45 CAD\r\n  - Liquider : 120 **Royal Dutch Shell PLC -B-**   2.230,50 PNC (PV 5%)\r\n  - Liquider : 30 **LVMH - Moët Hennessy Louis Vuitton SA**   131,10 EUR (PV 9%)\r\n  - Liquider : 6 **Apple Inc.**   499,35 USD (PV 16%)\r\n\r\n**Décembre 2013**\r\n  - Achat : 185 **Cominar Real Estate Investment Trust**   17,77 CAD\r\n  - Achat : 60 **Digital Realty Trust Inc.**   44,56 USD\r\n  - Achat : 80 **HCP Inc.**   36,21 USD\r\n  - Liquider : 10 **IBM Corporation**   182,67 USD\r\n  - Liquider : 150 **Intel Corporation**   24,68 USD (PV 0%)\r\n  - Liquider : 30 **Express Scripts Holding Co.**   67,44 USD (PV +10%)\r\n  - Liquider : 70 **Abbott Laboratories Inc.**   37,18 USD (PV +31%)\r\n  - Liquider : 70 **Diageo PLC**   1.951,00 PNC\r\n  - Liquider : 22 **Dassault Systemes SA**   84,38 EUR (PV -1%)\r\n  - Renforcer : 15 **Berkshire Hathaway Inc -B-**   114,27 USD\r\n  - Renforcer : 28 **Technip SA**   71,12 EUR\r\n  - Renforcer : 440 **Tesco PLC**   334,55 PNC\r\n\r\n**Novembre 2013**\r\n  - Liquider : 37 **Lyxor ETF DJ Stoxx 600 Food & Beverage**   52,09 EUR (PV -1%)\r\n  - Liquider : 11 **Pernod-Ricard SA**   88,59 EUR (PV +2%)\r\n  - Renforcer : 15 **Berkshire Hathaway Inc -B-**   114,72 USD\r\n  - Renforcer : 15 **Technip SA**   77,26 EUR\r\n  - Achat : 12 **Technip SA**   76,49 EUR\r\n\r\n**Octobre 2013**\r\n  - Achat : 30 **Express Scripts Holding Co.**   61,10 USD\r\n  - Achat : 22 **Dassault Systemes SA**   84,81 EUR\r\n  - Achat : 10 **Berkshire Hathaway Inc -B-**   111,91 USD\r\n  - Renforcer  : 60 **Coca-Cola Co.**   37,13 USD\r\n  - Liquider : 40 **PepsiCo Inc.**   79,57 USD (PV +26%)\r\n  - Liquider : 70 **AbbVie Inc.**   48,40 USD (PV +70%)\r\n\r\n**Septembre 2013**\r\n  - Achat : 100 **GlaxoSmithKline PLC**   1.569,50 PNC\r\n  - Renforcer : 13 **Sanofi**   73,15 EUR\r\n  - Renforcer : 3 **Apple Inc.**   467,00 USD\r\n  - Renforcer : 20 **Philip Morris International Inc.**   83,75 USD\r\n  - Liquider : 1.200 **Nokia OYJ** (NL)   4,25 EUR (PV +59%)\r\n\r\n**Août 2013**\r\n  - Achat : 20 **Exxon Mobil Corporation**   89,13 USD\r\n  - Achat : 10 **IBM Corporation**   187,50 USD\r\n  - Achat : 12 **Sanofi**   77,99 EUR\r\n  - Achat : 50 **British American Tobacco PLC**   3.434,00 PNC\r\n  - Renforcer : 20 **Exxon Mobil Corporation**   86,94 USD\r\n  - Renforcer : 40 **Royal Dutch Shell PLC**   2.123,00 PNC\r\n  - Renforcer : 45 **Unilever PLC**   2.543,00 PNC\r\n  - Alléger : 120 **Orange SA**   8,35 EUR (MV -47%)\r\n  - Liquider : 206 **Vivendi SA**   16,20 EUR (PV +20%)\r\n\r\n**Juillet 2013**\r\n  - Vente : 80 **Eli Lilly & Co.**   52,49 USD (PV +27,3%)\r\n  - Vente : 330 **Capstead Mortgage Corporation**   11,76 USD (MV -3,5%)\r\n  - Vente : 34 **Lyxor ETF DJ Stoxx 600 Health Care**   58,00 EUR\r\n  - Achat : 11 **Pernod-Ricard**   87,81 EUR\r\n\r\n**Juin 2013**\r\n  - Achat :  45 **Unilever PLC**   2.629,00 PNC\r\n  - Achat : 3 **Apple Inc.**   394,90 USD\r\n  - Renforcer : 17 **Lyxor ETF DJ Stoxx 600 Health Care** 57,63 EUR\r\n  - Renforcer : 20 **McDonald\'s Corporation**   97,01 USD\r\n  - Renforcer : 40 **Coca-Cola Co.**   39,64 USD\r\n  - Alléger : 300 **Nokia OYJ** (NL)   2,97 EUR (PV +10%)\r\n  - Liquider : 70 **Imperial Tobacco Group PLC**   2.369,00 PNC \r\n\r\n**Mai 2013**\r\n  - Achat : 17 **Lyxor ETF DJ Stoxx 600 Health Care**   58,52 EUR\r\n  - Renforcer : 300 **CYS Investments Inc.**   10,52 USD\r\n  - Renforcer : 200 **CYS Investments Inc.**   11,67 USD\r\n  - Renforcer : 18 **Lyxor ETF DJ Stoxx 600 Food & Beverage**   52,81 EUR\r\n  - Alléger : 25 **McDonald\'s Corporation**   102,80 USD\r\n  - Alléger : 130 **Intel Corporation**   24,27 USD\r\n  - Liquider : 15 **Lyxor ETF DAX**   77,17 EUR (PV : +4,5%)\r\n\r\n\r\n**Avril 2013**\r\n  - Achat : 19 **Lyxor ETF Stoxx Food & Beverage**   52,10 EUR\r\n  - Achat : 70 **Diageo PLC**   1.975,00 PNC\r\n  - Renforcer : 150 **CYS Investments Inc.**   11,68 USD\r\n  - Liquider : 116 **GDF Suez SA**   16,11 EUR (MV: -30%)\r\n  - Liquider : 18 **Air Liquide SA**   96,55 EUR (PV: 0,5%)\r\n\r\n**Mars 2013**\r\n  - Renforcement : 740 **Nokia OYJ** (NL)   2,57 EUR\r\n  - Renforcement : 360 **Nokia OYJ** (NL)   2,68 EUR\r\n  - Achat : 460 **Tesco PLC**   375,89 PNC\r\n  - Liquidation : 200 **Affine SA**   13,50 EUR (MV : -34%)\r\n  - Achat : 400 **Nokia OYJ** (NL)   2,83 EUR\r\n  - Liquidation : 60 **Danone**  54,20 EUR (PV : +15%)\r\n  - Renforcement : 180 **CYS Investments Inc.**   11,65 USD\r\n  - Achat : 370 **CYS Investments Inc.**   11,71 USD\r\n  - Liquidation : 220 **Annaly Capital Management Inc.**   16,01 USD (PV : +8%)\r\n  - Renforcement : 100 **Capstead Mortgage Corporation**   12,38 USD\r\n  - Liquidation : 70 **Bristol Myers Squibb Co.**   37,10 USD (PV : +13%)\r\n  \r\n\r\n**Février 2013**\r\n  - Achat : 70 **Imperial Tobacco Group PLC**   2.340,00 PNC\r\n  - Achat : 15 **Lyxor ETF DAX**   73,80 EUR\r\n  - Achat : 150 **Capstead Mortgage Corporation**   12,28 USD\r\n  - Liquidation : 200 **Western Union Corporation**   14,32 USD (PV : +16%)\r\n  - Achat : 220 **Annaly Capital Management Inc.**   14,79 USD\r\n  - Liquidation : 80 **AIG American International Group Inc.**   38,41 USD (PV : +9%)\r\n\r\n**Janvier 2013**\r\n  - Renforcem. 40 **AIG American International Group Inc.**   35,49 USD\r\n  - Achat : 40 **AIG American International Group Inc.**   34,87 USD\r\n\r\n**Décembre 2012**\r\n  - liquidation 100 **Senior Housing Properties**   23,52 USD\r\n\r\n**Novembre 2012**\r\n  - renforcement 30 **Royal Dutch Shell PLC -B-**   2.200,00 PNC\r\n  - renforcement 25 **McDonald\'s Corporation**   84,45 USD\r\n  - achat 200 **Western Union Corporation**   12,31 USD\r\n  - achat 50 **Royal Dutch Shell** -B- 2.141,50 GBX\r\n  - liquidation 35 **CH Robinson Worldwide Inc.**   61,69 USD \r\n  - liquidation 20 **L\'Oréal SA**   99,90 EUR\r\n\r\n**Octobre 2012**\r\n  - renforcement 110 **Intel Corporation**   21,76 USD\r\n  - renforcement 20 **Abbott Laboratories**   66,64 USD \r\n  - renforcement 20 **Philip Morris**        88,06 USD \r\n  - renforcement 20 **Microsoft Corp**       28,01 USD \r\n  - renforcement 20 **Danone**           46,86 EUR \r\n  - renforcement 6 **GDF Suez SA**   16,86 EUR (dividendes)\r\n  - achat 18 **Air Liquide SA**   95,96 EUR\r\n  - liquidation 45 **Johnson & Johnson Co.**   69,43 USD \r\n  - liquidation 50 **Procter & Gamble Co.**   69,45 USD \r\n  - liquidation 200 **M6 Metropole Television**    10,76 EUR  \r\n  \r\n**Septembre 2012**\r\n  - renforcement 60 **Intel Corporation**   24,29 USD\r\n  - renforcement 10 **LVMH SA**   122,05 EUR\r\n  - liquidation 40 **Unilever NV Cert.**   27,99 EUR\r\n\r\n**Août 2012**\r\n  - renforcement 40 **Coca-Cola Co.**   37,98 USD\r\n  - renforcement 46 **Eli Lilly & Co.** 42,74 USD\r\n  - achat 70 **Bristol Myers**   32,75 USD\r\n  - achat 20 **L\'Oréal SA**      96,36 EUR\r\n  - allégement 80 **Vivendi SA**      15,85 EUR\r\n\r\n**Juillet 2012**\r\n  - achat 10 **LVMH SA**                     114,40 EUR\r\n  - achat 45 **Kellogg Co.**                  48,66 USD\r\n  - renforcement **35 Kellogg Co.**                  47,76 USD\r\n  - liquidation 50 **Exelon Corporation**   38,53 USD\r\n  - liquidation 40 **Tour Eiffel SA**      41,40 EUR\r\n\r\n**Juin 2012**\r\n  - achat 40 **Danone**                       47,07 EUR\r\n  - achat 35 **CH Robinson Worldwide Inc.**   56,21 USD\r\n  - allégement 50 **Total SA**           35,52 EUR\r\n  - allégement 25 **Vivendi SA**         13,89 EUR\r\n  - allégement 58 **Vivendi SA**         14,38 EUR\r\n  - liquidation 371 **ABC Arbitrage SA**   6,79 EUR\r\n  - liquidation 20 **Fonc. des Régions**  54,80 EUR\r\n						','2017-07-23 10:40:38','2017-07-28 16:49:01'),(3,'FINANCE','ETF profiles','.\r\n\r\nVanguard FTSE Emerging Markets ETF\r\n==================================\r\n  - `Morningstar : Portfolio Profile for VFEM (EUR) <http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=0P0000YXJQ>`_\r\n  - `Fidelity : Portfolio Profile for VWO (USD) <https://screener.fidelity.com/ftgw/etf/snapshot/portfolioComposition.jhtml?symbols=VWO>`_\r\n\r\n\r\n.\r\n\r\nVanguard FTSE Developed Europe ETF\r\n==================================\r\n  - `Morningstar : Portfolio Profile for VEUR (EUR) <http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=0P0000YVD4>`_\r\n  - `Fidelity : Portfolio Profile for VGK (USD) <https://screener.fidelity.com/ftgw/etf/snapshot/portfolioComposition.jhtml?symbols=VGK>`_\r\n\r\n.\r\n\r\nVanguard Dividend Appreciation ETF\r\n==================================\r\n  - `Morningstar : Portfolio Profile for VIG (USD) <http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=0P00002DER>`_\r\n  - `Fidelity : Portfolio Profile for VIG (USD) <https://screener.fidelity.com/ftgw/etf/goto/snapshot/portfolioComposition.jhtml?symbols=VIG>`_\r\n\r\n.\r\n\r\nVanguard High Dividend Yield Index ETF \r\n======================================\r\n  - `Morningstar : Portfolio Profile for VYM (USD) <http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=0P00006A9F>`_\r\n  - `Fidelity : Portfolio Profile for VYM (USD) <https://screener.fidelity.com/ftgw/etf/goto/snapshot/portfolioComposition.jhtml?symbols=VYM>`_\r\n\r\n.\r\n\r\nVanguard REIT Index Fund ETF \r\n============================\r\n\r\n  - `Morningstar : Portfolio Profile for VNQ (USD) <http://www.morningstar.co.uk/uk/etf/snapshot/snapshot.aspx?id=0P00002DCS>`_\r\n  - `Fidelity : Portfolio Profile for VNQ (USD) <https://screener.fidelity.com/ftgw/etf/goto/snapshot/portfolioComposition.jhtml?symbols=VNQ>`_\r\n\r\n','2017-07-23 10:58:58','2017-07-25 15:34:13'),(4,'MAISON','ENTRETIEN MAISON','REMPLACEMENT \r\n============\r\n\r\n - 25-07-2017 : **Filtre charbon hotte** (réf. 02859391, Leroy Merlin)\r\n						\r\n						','2017-07-25 17:38:48','2017-07-25 15:40:39'),(5,'VOITURE','Codes secrets','CARTES GRISES\r\n=============\r\n\r\n  - CR-708-DA, TOYOTA, code confidentiel : **55202**\r\n						\r\n						','2017-07-26 10:31:16','2017-07-26 08:31:28');
/*!40000 ALTER TABLE `docs` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`127.0.0.1`*/ /*!50003 TRIGGER `bd_mesavoirs`.`docs_BEFORE_INSERT` BEFORE INSERT ON `docs` FOR EACH ROW
BEGIN

  set NEW.cree_le = NOW();
  set NEW.modif_le = NOW();
  
END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `histo`
--

DROP TABLE IF EXISTS `histo`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `histo` (
  `no_id` int(11) NOT NULL AUTO_INCREMENT,
  `date` date NOT NULL,
  `mvt_cash` decimal(9,2) DEFAULT '0.00',
  `valeur_pf` decimal(9,2) DEFAULT '0.00',
  `nb_part` decimal(9,3) DEFAULT '0.000',
  `val_part` decimal(9,3) DEFAULT '0.000',
  `nb_part_ref` decimal(9,3) DEFAULT '0.000',
  `val_part_ref` decimal(9,3) DEFAULT '0.000',
  PRIMARY KEY (`no_id`,`date`)
) ENGINE=InnoDB AUTO_INCREMENT=129 DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `histo`
--

LOCK TABLES `histo` WRITE;
/*!40000 ALTER TABLE `histo` DISABLE KEYS */;
INSERT INTO `histo` VALUES (1,'2012-01-01',0.00,53950.00,539.500,100.000,813160.000,100.000),(2,'2012-01-01',0.00,53950.00,539.500,100.000,813.160,100.000),(3,'2012-02-01',0.00,55145.26,539.500,102.215,856.604,105.343),(4,'2012-02-25',0.00,57677.72,539.500,106.910,890.157,109.469),(5,'2012-04-04',0.00,56619.82,539.500,104.949,872.208,107.262),(6,'2012-05-01',0.00,55364.61,539.500,102.622,856.121,105.283),(7,'2012-06-01',0.00,55319.73,539.500,102.539,854.014,105.024),(8,'2012-06-29',0.00,57539.57,539.500,106.654,833.411,102.490),(9,'2012-07-26',3000.00,62356.72,566.767,110.022,852.890,104.886),(10,'2012-07-31',0.00,63181.67,566.767,111.477,864.443,106.307),(11,'2012-08-31',0.00,63293.25,566.767,111.674,847.570,104.232),(12,'2012-09-30',0.00,61808.83,566.767,109.055,877.620,107.927),(13,'2012-11-01',0.00,61670.32,566.767,108.811,860.404,105.810),(14,'2012-11-30',0.00,61768.50,566.767,108.984,876.050,107.734),(15,'2012-12-31',0.00,61572.99,566.767,108.639,876.960,107.846),(16,'2013-02-01',0.00,62983.57,566.767,111.128,904.630,111.249),(17,'2013-02-22',3000.00,66843.62,593.400,112.645,896.240,110.217),(18,'2013-02-28',0.00,67749.27,593.400,114.171,901.240,110.832),(19,'2013-03-19',3000.00,72109.77,619.159,116.464,927.200,114.024),(20,'2013-03-29',0.00,73521.87,619.159,118.745,931.070,114.500),(21,'2013-04-30',0.00,74918.09,619.159,121.000,936.820,115.207),(22,'2013-06-01',0.00,73060.36,619.159,117.999,957.870,117.796),(23,'2013-06-06',3000.00,74879.53,645.000,116.092,921.930,113.376),(24,'2013-06-29',0.00,74038.76,645.000,114.789,903.570,111.118),(25,'2013-07-31',0.00,74358.74,645.000,115.285,926.030,113.880),(26,'2013-08-31',0.00,72347.78,645.000,112.167,920.240,113.168),(27,'2013-09-30',0.00,74465.15,645.000,115.450,946.420,116.388),(28,'2013-10-31',0.00,77198.07,645.000,119.687,971.900,119.521),(29,'2013-11-30',0.00,76842.48,645.000,119.136,991.550,121.938),(30,'2013-12-23',0.00,75689.64,645.000,117.348,991.600,121.944),(31,'2013-12-31',3000.00,76580.41,671.298,114.078,1001.930,123.214),(32,'2013-12-31',0.00,79730.62,671.298,118.771,1001.930,123.214),(33,'2014-01-31',0.00,77970.27,671.298,116.149,967.290,118.954),(34,'2014-02-28',0.00,80050.85,671.298,119.248,982.990,120.885),(35,'2014-03-07',2000.00,81465.33,688.193,118.376,992.720,122.082),(36,'2014-03-31',0.00,83179.98,688.193,120.867,968.530,119.107),(37,'2014-04-30',0.00,84958.13,688.193,123.451,965.020,118.675),(38,'2014-05-30',0.00,87931.27,688.193,127.771,993.910,122.228),(39,'2014-06-29',0.00,87413.29,688.193,127.019,1013.190,124.599),(40,'2014-07-20',2500.00,91931.86,707.431,129.952,1002.160,123.243),(41,'2014-09-30',0.00,90768.83,707.431,128.308,1047.560,128.826),(42,'2014-10-17',2500.00,89614.90,727.733,123.143,1003.530,123.411),(43,'2014-10-31',0.00,94990.34,727.733,130.529,1057.520,130.051),(44,'2014-12-31',0.00,97002.85,727.733,133.295,1109.250,136.412),(45,'2015-01-31',0.00,105928.92,727.733,145.560,1194.770,146.929),(46,'2015-02-28',0.00,111207.76,727.733,152.814,1244.210,153.009),(47,'2015-03-08',2000.00,114736.95,740.643,154.915,1277.020,157.044),(48,'2015-04-01',0.00,118303.56,740.643,159.731,1297.400,159.550),(49,'2015-04-30',0.00,112769.03,740.643,152.258,1289.820,158.618),(50,'2015-05-30',0.00,117850.06,740.643,159.119,1305.880,160.593),(51,'2015-06-01',0.00,117710.07,740.643,158.930,1291.480,158.822),(52,'2015-06-24',3000.00,114176.64,760.629,150.108,1298.130,159.640),(53,'2015-06-30',0.00,110825.37,760.629,145.702,1252.610,154.042),(54,'2015-07-31',0.00,113151.13,760.629,148.760,1267.310,155.850),(55,'2015-08-26',600.00,102191.84,765.121,133.563,1092.400,134.340),(56,'2015-09-01',0.00,104910.02,765.121,137.116,1116.900,137.353),(57,'2015-09-30',0.00,103261.28,765.121,134.961,1059.130,130.249),(58,'2015-12-31',0.00,109198.88,765.121,142.721,1127.820,138.696),(59,'2016-01-19',2000.00,101815.25,780.452,130.457,1057.730,130.076),(60,'2016-03-31',0.00,105908.74,780.452,135.702,1062.850,130.706),(61,'2016-04-30',0.00,108008.04,780.452,138.392,1075.170,132.221),(62,'2016-05-31',0.00,108973.48,780.452,139.629,1098.260,135.061),(63,'2016-06-30',0.00,110238.80,780.452,141.250,1098.180,135.051),(64,'2016-07-18',37800.00,153179.23,1036.140,147.836,1142.160,140.459),(65,'2016-07-29',0.00,154011.09,1036.140,148.639,1150.190,141.447),(66,'2016-09-30',0.00,150172.30,1036.140,144.934,1131.510,139.150),(67,'2016-10-07',2000.00,151820.61,1049.971,144.595,1130.520,139.028),(68,'2016-11-30',0.00,156471.07,1049.971,149.024,1117.890,137.475),(69,'2016-12-27',2000.00,156845.04,1063.533,147.475,1163.700,143.108),(70,'2016-12-31',0.00,159667.80,1063.533,150.130,1160.380,142.700),(71,'2017-03-31',0.00,164060.54,1063.533,154.260,1195.630,147.035),(72,'2017-04-29',0.00,163249.09,1063.533,153.497,1208.870,148.663),(73,'2017-07-02',0.00,156437.30,1063.533,147.092,1205.620,148.264),(74,'2017-07-12',16000.00,166505.02,1176.596,141.514,1222.860,150.384),(75,'2017-07-21',0.00,174328.48,1176.596,148.163,1234.690,151.839);
/*!40000 ALTER TABLE `histo` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `members`
--

DROP TABLE IF EXISTS `members`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `members` (
  `email` varchar(55) NOT NULL,
  `nom` varchar(45) DEFAULT 'UTILISATEUR 000',
  `prenom` varchar(45) DEFAULT NULL,
  `mdp` varchar(128) DEFAULT NULL,
  `mdp_oublie` varchar(128) DEFAULT NULL,
  `mdp_oublie_date` datetime DEFAULT NULL,
  `acces` varchar(25) DEFAULT 'MEMBRE',
  `expire_le` datetime DEFAULT NULL,
  `cree_le` datetime DEFAULT NULL,
  `modif_le` timestamp NULL DEFAULT NULL ON UPDATE CURRENT_TIMESTAMP,
  `dern_cnx_le` datetime DEFAULT NULL,
  PRIMARY KEY (`email`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Liste des Membres';
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `members`
--

LOCK TABLES `members` WRITE;
/*!40000 ALTER TABLE `members` DISABLE KEYS */;
INSERT INTO `members` VALUES ('ctphuoc@gmail.com','CAO ','Thien Phuoc','a12ecaa430207687ad18a72564609d4f313184bd',NULL,NULL,'ADMIN',NULL,'2017-07-23 08:08:31','2017-07-28 16:44:04','2017-07-28 18:44:04'),('phuoc@caotek.fr','MEMBER','Lambda-One','a12ecaa430207687ad18a72564609d4f313184bd',NULL,NULL,'MEMBRE',NULL,'2017-07-23 08:35:47','2017-07-23 06:38:28','2017-07-23 08:38:28'),('toa.armorial@gmail.com','CAO ','Thien-An','a12ecaa430207687ad18a72564609d4f313184bd',NULL,NULL,'ADMIN',NULL,'2017-07-22 17:18:51','2017-07-26 08:31:49','2017-07-26 10:31:49');
/*!40000 ALTER TABLE `members` ENABLE KEYS */;
UNLOCK TABLES;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`127.0.0.1`*/ /*!50003 TRIGGER `bd_mesavoirs`.`members_BEFORE_INSERT` BEFORE INSERT ON `members` FOR EACH ROW
BEGIN

  set NEW.cree_le = NOW();
  set NEW.modif_le = NOW();
  SET NEW.nom = UCASE(NEW.nom);
  SET NEW.prenom = Capitalize(NEW.prenom);
  
END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`localhost`*/ /*!50003 TRIGGER `bd_mesavoirs`.`members_BEFORE_UPDATE` BEFORE UPDATE ON `members` FOR EACH ROW
BEGIN

  SET NEW.nom = UCASE(NEW.nom);
  SET NEW.prenom = Capitalize(NEW.prenom);

END */;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;

--
-- Table structure for table `valeur_part`
--

DROP TABLE IF EXISTS `valeur_part`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `valeur_part` (
  `date` datetime DEFAULT NULL,
  `mvt_cash` int(11) DEFAULT NULL,
  `valeur_pf` decimal(13,7) DEFAULT NULL,
  `nb_part` decimal(13,9) DEFAULT NULL,
  `Val_part` decimal(12,9) DEFAULT NULL,
  `nb_part_ref` decimal(7,3) DEFAULT NULL,
  `Val_part_ref` decimal(12,9) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `valeur_part`
--

LOCK TABLES `valeur_part` WRITE;
/*!40000 ALTER TABLE `valeur_part` DISABLE KEYS */;
INSERT INTO `valeur_part` VALUES ('2012-01-01 00:00:00',NULL,53950.0000000,539.500000000,100.000000000,813.160,100.000000000),('2012-02-01 09:36:30',NULL,55145.2589620,539.500000000,102.215493905,856.604,105.342614000),('2012-02-25 20:59:55',NULL,57677.7168040,539.500000000,106.909577023,890.157,109.468862217),('2012-04-04 15:09:53',NULL,56619.8153360,539.500000000,104.948684589,872.208,107.261547543),('2012-05-01 07:43:23',NULL,55364.6063490,539.500000000,102.622069229,856.121,105.283216095),('2012-06-01 09:24:47',NULL,55319.7262800,539.500000000,102.538880964,854.014,105.024103497),('2012-06-29 22:14:14',NULL,57539.5650742,539.500000000,106.653503381,833.411,102.490407792),('2012-07-26 22:50:46',3000,62356.7164952,566.767343876,110.021717322,852.890,104.885877318),('2012-07-31 18:12:38',NULL,63181.6710720,566.767343876,111.477260916,864.443,106.306630921),('2012-08-31 22:18:42',NULL,63293.2452467,566.767343876,111.674121543,847.570,104.231639530),('2012-09-30 21:24:39',NULL,61808.8254000,566.767343876,109.055022432,877.620,107.927099218),('2012-11-01 09:00:12',NULL,61670.3167650,566.767343876,108.810638847,860.404,105.809926706),('2012-11-30 22:36:30',NULL,61768.4955950,566.767343876,108.983864830,876.050,107.734025284),('2012-12-31 21:30:46',NULL,61572.9938777,566.767343876,108.638923084,876.960,107.845934379),('2013-02-01 22:08:11',NULL,62983.5663428,566.767343876,111.127726436,904.630,111.248708741),('2013-02-22 21:43:11',3000,66843.6203632,593.399637313,112.645199222,896.240,110.216931477),('2013-02-28 22:09:01',NULL,67749.2711800,593.399637313,114.171406452,901.240,110.831816617),('2013-03-19 22:36:30',3000,72109.7733910,619.158641063,116.464131498,927.200,114.024300261),('2013-03-29 17:02:14',NULL,73521.8703080,619.158641063,118.744802110,931.070,114.500221359),('2013-04-30 22:10:55',NULL,74918.0911230,619.158641063,120.999831310,936.820,115.207339269),('2013-06-01 08:16:52',NULL,73060.3647590,619.158641063,117.999426825,957.870,117.796005706),('2013-06-06 22:29:32',3000,74879.5250400,645.000157436,116.092258547,921.930,113.376211324),('2013-06-29 16:15:26',NULL,74038.7592220,645.000157436,114.788745969,903.570,111.118353092),('2013-07-31 22:12:37',NULL,74358.7356370,645.000157436,115.284833313,926.030,113.880417138),('2013-08-31 09:01:52',NULL,72347.7826896,645.000157436,112.167077567,920.240,113.168380147),('2013-09-30 20:03:58',NULL,74465.1517570,645.000157436,115.449819506,946.420,116.387918737),('2013-10-31 21:12:02',NULL,77198.0656467,645.000157436,119.686894269,971.900,119.521373407),('2013-11-30 13:38:48',NULL,76842.4848480,645.000157436,119.135606344,991.550,121.937872006),('2013-12-23 23:08:30',NULL,75689.6422400,645.000157436,117.348253899,991.600,121.944020857),('2013-12-31 22:46:53',3000,76580.4094550,671.297924554,114.078126349,1001.930,123.214373555),('2013-12-31 22:57:42',NULL,79730.6194550,671.297924554,118.770841587,1001.930,123.214373555),('2014-01-31 22:03:09',NULL,77970.2653710,671.297924554,116.148527381,967.290,118.954449309),('2014-02-28 22:25:53',NULL,80050.8461320,671.297924554,119.247867756,982.990,120.885188647),('2014-03-07 17:30:11',2000,81465.3326340,688.193290176,118.375656661,992.720,122.081755128),('2014-03-31 22:15:53',NULL,83179.9823951,688.193290176,120.867180169,968.530,119.106940823),('2014-04-30 22:12:59',NULL,84958.1318788,688.193290176,123.450973864,965.020,118.675291456),('2014-05-30 22:45:16',NULL,87931.2716340,688.193290176,127.771184185,993.910,122.228097791),('2014-06-29 08:10:53',NULL,87413.2875450,688.193290176,127.018511794,1013.190,124.599094889),('2014-07-20 17:53:46',2500,91931.8582100,707.431213438,129.951656732,1002.160,123.242658271),('2014-09-30 22:12:44',NULL,90768.8314000,707.431213438,128.307642744,1047.560,128.825815338),('2014-10-17 20:45:54',2500,89614.8966823,727.732885149,123.142568532,1003.530,123.411136800),('2014-10-31 21:47:27',NULL,94990.3412100,727.732885149,130.529131153,1057.520,130.050666535),('2014-12-31 21:22:13',NULL,97002.8475375,727.732885149,133.294577608,1109.250,136.412268188),('2015-01-31 09:10:56',NULL,105928.9168210,727.732885149,145.560162227,1194.770,146.929263614),('2015-02-28 07:18:25',NULL,111207.7579330,727.732885149,152.813979143,1244.210,153.009247872),('2015-03-08 13:27:04',2000,114736.9463280,740.643167161,154.915283655,1277.020,157.044124158),('2015-04-01 22:53:45',NULL,118303.5611680,740.643167161,159.730848016,1297.400,159.550395986),('2015-04-30 22:07:48',NULL,112769.0334820,740.643167161,152.258251317,1289.820,158.618230115),('2015-05-30 18:28:57',NULL,117850.0551520,740.643167161,159.118534238,1305.880,160.593241183),('2015-06-01 23:07:56',NULL,117710.0739260,740.643167161,158.929534687,1291.480,158.822371981),('2015-06-24 18:45:38',3000,114176.6369570,760.628746527,150.108232799,1298.130,159.640169216),('2015-06-30 23:35:05',NULL,110825.3664430,760.628746527,145.702311343,1252.610,154.042254907),('2015-07-31 22:14:04',NULL,113151.1346400,760.628746527,148.760003033,1267.310,155.850017217),('2015-08-26 16:13:27',600,102191.8438470,765.121009199,133.562982350,1092.400,134.340105268),('2015-09-01 22:57:00',NULL,104910.0157800,765.121009199,137.115586317,1116.900,137.353042452),('2015-09-30 22:19:53',NULL,103261.2835520,765.121009199,134.960721651,1059.130,130.248659550),('2015-12-31 21:54:59',NULL,109198.8753210,765.121009199,142.721051975,1127.820,138.695951596),('2016-01-19 22:18:55',2000,101815.2493230,780.451753036,130.456814180,1057.730,130.076491711),('2016-03-31 22:14:31',NULL,105908.7399320,780.451753036,135.701841299,1062.850,130.706134094),('2016-04-30 09:13:44',NULL,108008.0437250,780.451753036,138.391698532,1075.170,132.221211078),('2016-05-31 22:46:38',NULL,108973.4779940,780.451753036,139.628718329,1098.260,135.060750652),('2016-06-30 23:51:23',NULL,110238.8015120,780.451753036,141.249988975,1098.180,135.050912490),('2016-07-18 22:35:13',37800,153179.2345990,1036.139670950,147.836473107,1142.160,140.459442176),('2016-07-29 22:15:01',NULL,154011.0917550,1036.139670950,148.639315792,1150.190,141.446947710),('2016-09-30 23:17:50',NULL,150172.3038970,1036.139670950,144.934421592,1131.510,139.149736829),('2016-10-07 08:28:40',2000,151820.6054390,1049.971408820,144.594990077,1130.520,139.027989572),('2016-11-30 22:10:52',NULL,156471.0656960,1049.971408820,149.024120449,1117.890,137.474789709),('2016-12-27 21:23:50',2000,156845.0420460,1063.532984890,147.475484328,1163.700,143.108367357),('2016-12-31 10:12:10',NULL,159667.8022400,1063.532984890,150.129619399,1160.380,142.700083624),('2017-03-31 22:48:25',NULL,164060.5395000,1063.532984890,154.259944760,1195.630,147.035023858),('2017-04-29 08:04:42',NULL,163249.0893700,1063.532984890,153.496968772,1208.870,148.663239707),('2017-07-02 18:02:50',NULL,156437.2984800,1063.532984890,147.092098414,1205.620,148.263564366),('2017-07-12 22:23:37',16000,166505.0165900,1176.595845810,141.514197235,1222.860,150.383688327),('2017-07-21 23:22:38',NULL,174328.4768000,1176.595845810,148.163430477,1234.690,151.838506567);
/*!40000 ALTER TABLE `valeur_part` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Dumping events for database 'bd_mesavoirs'
--

--
-- Dumping routines for database 'bd_mesavoirs'
--
/*!50003 DROP FUNCTION IF EXISTS `Capitalize` */;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`127.0.0.1` FUNCTION `Capitalize`(input VARCHAR(255)) RETURNS varchar(255) CHARSET utf8
    DETERMINISTIC
BEGIN

    DECLARE len INT;
    DECLARE i INT;
    DECLARE charnum INT;
    declare SortedName varchar(255);

    SET len   = CHAR_LENGTH(input);
    SET input = LOWER(input);
    SET i = 1;
    set charnum = 1;
    set SortedName = '';


    WHILE (i <= len) DO
        if charnum = 1 then
            set SortedName = concat(SortedName,upper(mid(input,i,1)));
            set charnum = charnum + 1;
        else
            if mid(input,i,1) = ' ' OR mid(input,i,1) = '-' then
                set SortedName = concat(SortedName, mid(input,i,1));
                set charnum = 1;
            else
                set SortedName = concat(SortedName,mid(input,i,1));
                set charnum = charnum + 1;
            end if;

        end if;


        SET i = i + 1;
    END WHILE;

    RETURN SortedName;
RETURN 1;
END ;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;
/*!50003 DROP PROCEDURE IF EXISTS `spUPD_PORTEFEUILLE` */;
/*!50003 SET @saved_cs_client      = @@character_set_client */ ;
/*!50003 SET @saved_cs_results     = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
/*!50003 SET character_set_client  = utf8 */ ;
/*!50003 SET character_set_results = utf8 */ ;
/*!50003 SET collation_connection  = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode       = @@sql_mode */ ;
/*!50003 SET sql_mode              = 'STRICT_TRANS_TABLES,NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`127.0.0.1` PROCEDURE `spUPD_PORTEFEUILLE`()
BEGIN

    SET @TotalValue = (SELECT SUM(valeur) FROM actifs);
	-- MAJ du pourcentage par actifs
    UPDATE actifs SET pc_allocation = valeur / @TotalValue * 100;
    
     UPDATE categories SET valeur = (SELECT SUM(valeur) FROM actifs WHERE categorie=categories.categorie);
 	-- MAJ des pourcentage par allocation
     UPDATE categories SET pc_atteint = valeur / @TotalValue * 100;
 
END ;;
DELIMITER ;
/*!50003 SET sql_mode              = @saved_sql_mode */ ;
/*!50003 SET character_set_client  = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection  = @saved_col_connection */ ;
/*!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 2017-07-29  8:22:52
