WIP: bolsa V 1.0
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once __DIR__ . '/db.php';
|
||||
$db = (new App\Database\Database())->getConnection();
|
||||
|
||||
// Insertion dans la table ordreJFG_pied
|
||||
$sql = "INSERT INTO ordreJFG_pied (Id_entete, Date_op, Quantite, Prix_brut, Frais_brocker, Frais_etat, Frais_autre, Ordre, Type, Etat)
|
||||
VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)";
|
||||
|
||||
$stmt = $db->prepare($sql);
|
||||
|
||||
$success = $stmt->execute([
|
||||
$_POST['Id_entete'],
|
||||
$_POST['Date_op'],
|
||||
$_POST['Quantite'],
|
||||
$_POST['Prix_brut'],
|
||||
$_POST['Frais_brocker'],
|
||||
$_POST['Frais_etat'],
|
||||
$_POST['Frais_autre'],
|
||||
$_POST['Ordre'],
|
||||
$_POST['Type'],
|
||||
$_POST['Etat']
|
||||
]);
|
||||
|
||||
echo json_encode(['success' => $success]);
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
|
||||
require_once __DIR__ . '/db.php';
|
||||
$db = (new App\Database\Database())->getConnection();
|
||||
|
||||
// Insertion dans la table ordreJFG
|
||||
$stmt = $db->prepare("INSERT INTO ordreJFG (isin, Nom, ticker, code_yahoo) VALUES (?, ?, ?, ?)");
|
||||
$success = $stmt->execute([$_POST['isin'], $_POST['Nom'], $_POST['ticker'], $_POST['code_yahoo']]);
|
||||
|
||||
echo json_encode(['success' => $success]);
|
||||
@@ -0,0 +1,47 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
require_once __DIR__ . '/db.php';
|
||||
|
||||
header('Content-Type: application/json');
|
||||
|
||||
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
|
||||
try {
|
||||
$db = (new App\Database\Database())->getConnection();
|
||||
|
||||
// Mise à jour de la table ordreJFG_pied
|
||||
$sql = "UPDATE ordreJFG_pied SET
|
||||
Date_op = :date,
|
||||
Quantite = :qte,
|
||||
Prix_brut = :prix,
|
||||
Frais_brocker = :f_b,
|
||||
Frais_etat = :f_e,
|
||||
Frais_autre = :f_a,
|
||||
Ordre = :ordre,
|
||||
Type = :type,
|
||||
Etat = :etat
|
||||
WHERE Id = :id";
|
||||
|
||||
$stmt = $db->prepare($sql);
|
||||
|
||||
$stmt->execute([
|
||||
':date' => $_POST['Date_op'],
|
||||
':qte' => $_POST['Quantite'],
|
||||
':prix' => $_POST['Prix_brut'],
|
||||
':f_b' => $_POST['Frais_brocker'],
|
||||
':f_e' => $_POST['Frais_etat'],
|
||||
':f_a' => $_POST['Frais_autre'],
|
||||
':ordre' => $_POST['Ordre'],
|
||||
':type' => $_POST['Type'],
|
||||
':etat' => $_POST['Etat'],
|
||||
':id' => $_POST['id']
|
||||
]);
|
||||
|
||||
echo json_encode(['success' => true]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode([
|
||||
'success' => false,
|
||||
'message' => $e->getMessage()
|
||||
]);
|
||||
}
|
||||
}
|
||||
@@ -10,7 +10,7 @@ $nom = $_POST['nom'];
|
||||
$ticker = $_POST['ticker'];
|
||||
|
||||
try {
|
||||
$stmt = $db->prepare("UPDATE ordres SET nom = ?, ticker = ? WHERE id = ?");
|
||||
$stmt = $db->prepare("UPDATE ordreGF SET nom = ?, ticker = ? WHERE id = ?");
|
||||
$stmt->execute([$nom, $ticker, $id]);
|
||||
|
||||
echo json_encode(['success' => true]);
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/db.php';
|
||||
header('Content-Type: application/json');
|
||||
|
||||
$db = (new App\Database\Database())->getConnection();
|
||||
|
||||
// Récupération des données POST
|
||||
$id = $_POST['id'];
|
||||
$nom = $_POST['nom'];
|
||||
$ticker = $_POST['ticker'];
|
||||
|
||||
try {
|
||||
// Mise à jour de la table ordreJFG
|
||||
$stmt = $db->prepare("UPDATE ordreJFG SET Nom = ?, ticker = ? WHERE ID = ?");
|
||||
$stmt->execute([$nom, $ticker, $id]);
|
||||
|
||||
echo json_encode(['success' => true]);
|
||||
} catch (Exception $e) {
|
||||
echo json_encode(['success' => false, 'message' => $e->getMessage()]);
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/db.php';
|
||||
|
||||
$isin = $_GET['isin'] ?? '';
|
||||
$db = (new App\Database\Database())->getConnection();
|
||||
|
||||
// Si vous avez aussi une table actions_jfg spécifique, remplacez 'actions' par 'actions_jfg'
|
||||
$stmt = $db->prepare("SELECT * FROM actions WHERE isin = ?");
|
||||
$stmt->execute([$isin]);
|
||||
$action = $stmt->fetch(PDO::FETCH_ASSOC);
|
||||
|
||||
echo json_encode($action ? ['success' => true, ...$action] : ['success' => false]);
|
||||
+58
-59
@@ -17,71 +17,70 @@ $bodyClass = 'menu-page';
|
||||
require_once __DIR__ . '/header.php';
|
||||
?>
|
||||
|
||||
<section class="menu-shell">
|
||||
<article class="menu-card">
|
||||
<header class="menu-card__header">
|
||||
<div>
|
||||
<h2 class="menu-card__title">Espace de gestion</h2>
|
||||
<p class="menu-card__subtitle">Accédez aux fonctions clés de l'application financière.</p>
|
||||
<section class="menu-shell">
|
||||
<article class="menu-card">
|
||||
<header class="menu-card__header">
|
||||
<div>
|
||||
<h2 class="menu-card__title">Espace de gestion</h2>
|
||||
<p class="menu-card__subtitle">Accédez aux fonctions clés de l'application financière.</p>
|
||||
</div>
|
||||
<span class="menu-card__badge">v1.0</span>
|
||||
</header>
|
||||
|
||||
<form name="menu" class="menu-grid" action="#" method="post" autocomplete="off" novalidate>
|
||||
<button type="button" class="menu-button" data-target="/php/ordreGF.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Ordre GF</span>
|
||||
<span class="menu-button__text">Voir et modifier les ordres GF</span>
|
||||
</div>
|
||||
<span class="menu-card__badge">v1.0</span>
|
||||
</header>
|
||||
<span class="menu-button__icon">⇄</span>
|
||||
</button>
|
||||
|
||||
<form name="menu" class="menu-grid" action="#" method="post" autocomplete="off" novalidate>
|
||||
<button type="button" class="menu-button" data-target="/php/ordreGF.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Ordre GF</span>
|
||||
<span class="menu-button__text">Voir et modifier les ordres GF</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⇄</span>
|
||||
</button>
|
||||
<button type="button" class="menu-button" data-target="/php/ordreJFG.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Ordre JFG</span>
|
||||
<span class="menu-button__text">Voir et modifier les ordres JFG</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⇄</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/order_jfg.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Ordre JFG</span>
|
||||
<span class="menu-button__text">Voir et modifier les ordres JFG</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⇄</span>
|
||||
</button>
|
||||
<button type="button" class="menu-button" data-target="/php/compteGF.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Compte GF</span>
|
||||
<span class="menu-button__text">Voir et modifier le compte GF</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">💼</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/compteGF.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Compte GF</span>
|
||||
<span class="menu-button__text">Voir et modifier le compte GF</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">💼</span>
|
||||
</button>
|
||||
<button type="button" class="menu-button" data-target="/php/compteJFG.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Compte JFG</span>
|
||||
<span class="menu-button__text">Voir et modifier le compte JFG</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">💼</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/compteJFG.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Compte JFG</span>
|
||||
<span class="menu-button__text">Voir et modifier le compte JFG</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">💼</span>
|
||||
</button>
|
||||
<button type="button" class="menu-button" data-target="/php/actions.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Actions</span>
|
||||
<span class="menu-button__text">Créer, voir et modifier les actions</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⚡</span>
|
||||
</button>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/actions.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">Actions</span>
|
||||
<span class="menu-button__text">Créer, voir et modifier les actions</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">⚡</span>
|
||||
</button>
|
||||
<button type="button" class="menu-button" data-target="/php/csv.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">CSV</span>
|
||||
<span class="menu-button__text">Importer / exporter les actions</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">📁</span>
|
||||
</button>
|
||||
</form>
|
||||
|
||||
<button type="button" class="menu-button" data-target="/php/csv.php">
|
||||
<div class="menu-button__content">
|
||||
<span class="menu-button__title">CSV</span>
|
||||
<span class="menu-button__text">Importer / exporter les actions</span>
|
||||
</div>
|
||||
<span class="menu-button__icon">📁</span>
|
||||
</button>
|
||||
</form>
|
||||
<p class="menu-note">Giraud Finance : Accès sécurisé. Veillez à fermer votre session après chaque utilisation.</p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<p class="menu-note">Giraud Finance : Accès sécurisé. Veillez à fermer votre session après chaque utilisation.</p>
|
||||
</article>
|
||||
</section>
|
||||
|
||||
<script src="/js/menu.js" defer></script>
|
||||
|
||||
<?php require_once __DIR__ . '/footer.php'; ?>
|
||||
<script src="/js/menu.js" defer></script>
|
||||
|
||||
<?php require_once __DIR__ . '/footer.php'; ?>
|
||||
@@ -0,0 +1,337 @@
|
||||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
require_once __DIR__ . '/session.php';
|
||||
require_once __DIR__ . '/db.php';
|
||||
|
||||
if (empty($_SESSION['user_id'])) {
|
||||
header('Location: ../index.php');
|
||||
exit;
|
||||
}
|
||||
|
||||
/*A supprimer quand la page fonctionnera correctement*/
|
||||
ini_set('display_errors', 1);
|
||||
error_reporting(E_ALL);
|
||||
/**************************************************** */
|
||||
|
||||
$pageStylesheets = ['/css/ordreJFG.css'];
|
||||
$bodyClass = 'ordrejfg-page';
|
||||
|
||||
$database = new App\Database\Database();
|
||||
$connection = $database->getConnection();
|
||||
|
||||
function fetchOrdreJFG(PDO $connection): array
|
||||
{
|
||||
$stmt = $connection->query('SELECT * FROM `ordreJFG` ORDER BY `ID` DESC');
|
||||
return $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
||||
}
|
||||
|
||||
function fetchOrdreJFGPied(PDO $connection, string $masterId): array
|
||||
{
|
||||
$stmt = $connection->prepare('SELECT * FROM `ordreJFG_pied` WHERE `Id_entete` = :masterId ORDER BY `Id` ASC');
|
||||
$stmt->execute([':masterId' => $masterId]);
|
||||
return $stmt->fetchAll(PDO::FETCH_ASSOC) ?: [];
|
||||
}
|
||||
|
||||
$ordres = fetchOrdreJFG($connection);
|
||||
|
||||
require_once __DIR__ . '/header.php';
|
||||
?>
|
||||
|
||||
<section class="ordrejfg-shell">
|
||||
<div class="ordrejfg-card">
|
||||
<header class="ordrejfg-card-header" style="display: flex; justify-content: space-between; align-items: center; margin-bottom: 28px;">
|
||||
<h1 class="ordrejfg-title">Gestion des ordres JFG</h1>
|
||||
<div style="display: flex; gap: 10px;">
|
||||
<button type="button" class="ordrejfg-btn-creer" onclick="document.getElementById('modalCreerOrdre').showModal();">Créer un ordre</button>
|
||||
<button type="button" class="ordrejfg-btn-menu" onclick="window.location.href='/php/menu.php';">Retour au menu</button>
|
||||
</div>
|
||||
</header>
|
||||
|
||||
<div class="ordrejfg-table-wrapper">
|
||||
<table class="ordrejfg-table">
|
||||
<tbody>
|
||||
<?php foreach ($ordres as $ordre): ?>
|
||||
<?php
|
||||
$details = fetchOrdreJFGPied($connection, (string)$ordre['ID']);
|
||||
$totalQ = 0;
|
||||
|
||||
// Détection d'un ordre annulé
|
||||
$isCanceled = false;
|
||||
foreach ($details as $d) {
|
||||
if (strtolower($d['Etat'] ?? '') === 'annulé') {
|
||||
$isCanceled = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// 1. Calcul du total des quantités actives
|
||||
foreach ($details as $d) {
|
||||
if (strtolower($d['Etat'] ?? '') === 'actif') {
|
||||
$q = (int)($d['Quantite'] ?? 0);
|
||||
$oType = strtolower($d['Ordre'] ?? '');
|
||||
$tOp = strtolower($d['Type'] ?? '');
|
||||
$signe = ($tOp === 'long') ? ($oType === 'achat' ? 1 : -1) : ($oType === 'achat' ? -1 : 1);
|
||||
$totalQ += ($q * $signe);
|
||||
}
|
||||
}
|
||||
|
||||
// 2. Calcul Plus-Value et Mise à jour statut
|
||||
$plusvalue = 0.0000;
|
||||
if ($isCanceled) {
|
||||
$plusvalue = 0;
|
||||
if ((float)$ordre['PlusValue'] != 0) {
|
||||
$connection->prepare("UPDATE ordreJFG SET PlusValue = 0 WHERE ID = ?")->execute([$ordre['ID']]);
|
||||
$ordre['PlusValue'] = 0;
|
||||
}
|
||||
}
|
||||
|
||||
$isSold = (!$isCanceled && $totalQ === 0 && count($details) > 0);
|
||||
if ($isSold) {
|
||||
foreach ($details as $detail) {
|
||||
$qte = (int)$detail['Quantite'];
|
||||
$fraisDetail = (float)$detail['Frais_brocker'] + (float)$detail['Frais_etat'] + (float)$detail['Frais_autre'];
|
||||
$oType = strtolower($detail['Ordre']);
|
||||
$prixNet = ($oType === 'vente') ? (float)$detail['Prix_brut'] - $fraisDetail : (float)$detail['Prix_brut'] + $fraisDetail;
|
||||
$tOp = strtolower($detail['Type']);
|
||||
$signePV = ($oType === 'vente') ? 1 : -1;
|
||||
$plusvalue += ($qte * $prixNet * $signePV);
|
||||
}
|
||||
$plusvalue = round($plusvalue, 4);
|
||||
|
||||
if (abs((float)$ordre['PlusValue'] - $plusvalue) > 0.0001) {
|
||||
$connection->prepare("UPDATE ordreJFG SET PlusValue = ? WHERE ID = ?")->execute([$plusvalue, $ordre['ID']]);
|
||||
$ordre['PlusValue'] = $plusvalue;
|
||||
}
|
||||
|
||||
$connection->prepare("UPDATE ordreJFG_pied SET Etat = 'soldé' WHERE Id_entete = ? AND Etat = 'actif'")->execute([$ordre['ID']]);
|
||||
$details = fetchOrdreJFGPied($connection, (string)$ordre['ID']);
|
||||
}
|
||||
|
||||
$isDisabled = $isCanceled || abs((float)$ordre['PlusValue']) > 0.0001;
|
||||
$disabledAttr = $isDisabled ? 'disabled style="opacity:0.5; cursor:not-allowed;"' : '';
|
||||
?>
|
||||
|
||||
<tr class="ordrejfg-master-row ordrejfg-header-style">
|
||||
<td colspan="11" style="font-weight: bold; font-size: 1.1em; color: #fff;">
|
||||
<?php echo htmlspecialchars((string)$ordre['isin']) . ' --- ' . htmlspecialchars((string)$ordre['Nom']) . ' ( ' . htmlspecialchars((string)$ordre['ticker']) . ' )'; ?>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr class="ordrejfg-detail-block">
|
||||
<td colspan="11">
|
||||
<table class="ordrejfg-detail-table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Date</th>
|
||||
<th>Qté</th>
|
||||
<th>Prix Brut</th>
|
||||
<th>Frais</th>
|
||||
<th>Prix Net</th>
|
||||
<th>Eng. Brut</th>
|
||||
<th>Eng. Net</th>
|
||||
<th>Ordre</th>
|
||||
<th>Type</th>
|
||||
<th>Etat</th>
|
||||
<th style="text-align: right;"><button type="button" class="ordrejfg-btn-creer-petit ordrejfg-btn-petit" <?= $disabledAttr ?> onclick="document.getElementById('Id_entete_detail').value='<?= $ordre['ID'] ?>'; document.getElementById('modalCreerDetail').showModal();">Créer</button></th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<?php
|
||||
$engaBrut = 0;
|
||||
$engaNet = 0;
|
||||
foreach ($details as $detail):
|
||||
$qte = (int)($detail['Quantite'] ?? 0);
|
||||
$prix = (float)($detail['Prix_brut'] ?? 0);
|
||||
$frais = (float)($detail['Frais_brocker'] ?? 0) + (float)($detail['Frais_etat'] ?? 0) + (float)($detail['Frais_autre'] ?? 0);
|
||||
$ordreType = strtolower($detail['Ordre'] ?? '');
|
||||
$prixNet = ($ordreType === 'vente') ? $prix - $frais : $prix + $frais;
|
||||
$date = !empty($detail['Date_op']) ? date('d/m/Y', strtotime($detail['Date_op'])) : '--/--/----';
|
||||
if (strtolower($detail['Etat'] ?? '') === 'actif') {
|
||||
$mult = (strtolower($detail['Type'] ?? '') === 'long' ? 1 : -1) * (strtolower($detail['Ordre'] ?? '') === 'achat' ? 1 : -1);
|
||||
$engaBrut += ($qte * $prix) * $mult;
|
||||
$engaNet += ($qte * $prixNet) * $mult;
|
||||
}
|
||||
?>
|
||||
<tr>
|
||||
<td><?= htmlspecialchars($date) ?></td>
|
||||
<td class="text-right"><?= $qte ?></td>
|
||||
<td class="text-right"><?= number_format($prix, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($frais, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($prixNet, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($qte * $prix, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($qte * $prixNet, 3, ',', ' ') ?></td>
|
||||
<td style="text-align: center"><?= htmlspecialchars($detail['Ordre'] ?? '') ?></td>
|
||||
<td style="text-align: center"><?= htmlspecialchars($detail['Type'] ?? '') ?></td>
|
||||
<td style="text-align: center"><?= htmlspecialchars($detail['Etat'] ?? '') ?></td>
|
||||
<td style="text-align: center"><button type="button" class="ordrejfg-btn-petit ordrejfg-btn-modifier-petit" <?= $disabledAttr ?> data-detail='<?= htmlspecialchars(json_encode($detail), ENT_QUOTES, 'UTF-8') ?>'>Modifier</button></td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
|
||||
<tr style="background-color: rgba(255, 255, 255, 0.08); font-weight: bold;">
|
||||
<?php if ($isDisabled): ?>
|
||||
<td colspan="6" style="text-align: right;">Plus value :</td>
|
||||
<td style="color: <?= (float)$ordre['PlusValue'] < 0 ? 'red' : 'green' ?>;"><?= number_format((float)$ordre['PlusValue'], 3, ',', ' ') ?></td>
|
||||
<td colspan="4"></td>
|
||||
<?php else: ?>
|
||||
<td style="text-align: right;">TOTAL :</td>
|
||||
<td class="text-right"><?= number_format($totalQ, 0, ',', ' ') ?></td>
|
||||
<?php if ($totalQ == 0): ?>
|
||||
<td colspan="3" class="text-right">0</td>
|
||||
<?php else: ?>
|
||||
<td class="text-right"><?= number_format($engaBrut / $totalQ, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($engaNet / $totalQ - $engaBrut / $totalQ, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($engaNet / $totalQ, 3, ',', ' ') ?></td>
|
||||
<?php endif; ?>
|
||||
<td class="text-right"><?= number_format($engaBrut, 3, ',', ' ') ?></td>
|
||||
<td class="text-right"><?= number_format($engaNet, 3, ',', ' ') ?></td>
|
||||
<td colspan="4"></td>
|
||||
<?php endif; ?>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
<?php endforeach; ?>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
<dialog id="modalCreerOrdre" class="ordrejfg-modal">
|
||||
<form id="formCreerOrdre">
|
||||
<h2>Créer un nouvel ordre</h2>
|
||||
<div class="form-group">
|
||||
<label>ISIN</label>
|
||||
<input type="text" id="isinRecherche" name="isin" required>
|
||||
<button type="button" id="btnRechercher">Rechercher</button>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Nom :</label>
|
||||
<input type="text" name="Nom" id="Nom" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Ticker :</label>
|
||||
<input type="text" name="ticker" id="ticker" readonly>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Code Yahoo :</label>
|
||||
<input type="text" name="code_yahoo" id="code_yahoo" readonly>
|
||||
</div>
|
||||
<div class="modal-actions" style="margin-top: 20px;">
|
||||
<button type="button" id="btnAnnuler">Annuler</button>
|
||||
<button type="submit" id="btnValider" disabled>Valider</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<dialog id="modalCreerDetail" class="ordrejfg-modal">
|
||||
<form id="formCreerDetail">
|
||||
<input type="hidden" name="Id_entete" id="Id_entete_detail">
|
||||
<h2>Ajouter un mouvement</h2>
|
||||
<div class="form-group">
|
||||
<label>Date :</label>
|
||||
<input type="date" name="Date_op" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Quantité :</label>
|
||||
<input type="number" name="Quantite" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Prix Brut :</label>
|
||||
<input type="number" step="0.001" name="Prix_brut" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Frais</label>
|
||||
<div class="triple">
|
||||
<input type="number" step="0.01" name="Frais_brocker" placeholder="Broker">
|
||||
<input type="number" step="0.01" name="Frais_etat" placeholder="État">
|
||||
<input type="number" step="0.01" name="Frais_autre" placeholder="Autre">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Ordre (Achat/Vente) :</label>
|
||||
<select name="Ordre">
|
||||
<option value="achat">achat</option>
|
||||
<option value="vente">vente</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Type (Long/Short) :</label>
|
||||
<select name="Type">
|
||||
<option value="long">long</option>
|
||||
<option value="short">short</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Etat :</label>
|
||||
<select name="Etat">
|
||||
<option value="actif">actif</option>
|
||||
<option value="annulé">annulé</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="modal-actions" style="margin-top: 20px;">
|
||||
<button type="button" onclick="document.getElementById('modalCreerDetail').close()">Annuler</button>
|
||||
<button type="submit">Valider</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<dialog id="modalModifierDetail" class="ordrejfg-modal">
|
||||
<form id="formModifierDetail">
|
||||
<input type="hidden" name="id" id="edit_id">
|
||||
<input type="hidden" name="Id_entete" id="edit_Id_entete">
|
||||
<h2>Modifier le mouvement</h2>
|
||||
<div class="form-group">
|
||||
<label>Date :</label>
|
||||
<input type="date" name="Date_op" id="edit_date" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Quantité :</label>
|
||||
<input type="number" name="Quantite" id="edit_quantite" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Prix Brut :</label>
|
||||
<input type="number" step="0.001" name="Prix_brut" id="edit_prix" required>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Frais</label>
|
||||
<div class="triple">
|
||||
<input type="number" step="0.01" name="Frais_brocker" id="edit_frais_broker" placeholder="Broker">
|
||||
<input type="number" step="0.01" name="Frais_etat" id="edit_frais_etat" placeholder="État">
|
||||
<input type="number" step="0.01" name="Frais_autre" id="edit_frais_autre" placeholder="Autre">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Ordre :</label>
|
||||
<select name="Ordre" id="edit_ordre">
|
||||
<option value="achat">achat</option>
|
||||
<option value="vente">vente</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Type :</label>
|
||||
<select name="Type" id="edit_type">
|
||||
<option value="long">long</option>
|
||||
<option value="short">short</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label>Etat :</label>
|
||||
<select name="Etat" id="edit_etat">
|
||||
<option value="actif">actif</option>
|
||||
<option value="annulé">annulé</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="modal-actions" style="margin-top: 20px;">
|
||||
<button type="button" onclick="document.getElementById('modalModifierDetail').close()">Annuler</button>
|
||||
<button type="submit">Enregistrer</button>
|
||||
</div>
|
||||
</form>
|
||||
</dialog>
|
||||
|
||||
<script src="/js/ordreJFG.js" defer></script>
|
||||
|
||||
<?php require_once __DIR__ . '/footer.php'; ?>
|
||||
Reference in New Issue
Block a user