|
@@ -0,0 +1,102 @@
|
|
|
|
|
+<!DOCTYPE html>
|
|
|
|
|
+<html lang="fr">
|
|
|
|
|
+<head>
|
|
|
|
|
+ <meta charset="UTF-8">
|
|
|
|
|
+ <meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
|
|
|
+ <title>Détail client - dirCops</title>
|
|
|
|
|
+ <script src="https://cdn.tailwindcss.com"></script>
|
|
|
|
|
+</head>
|
|
|
|
|
+<body class="bg-gray-50 min-h-screen">
|
|
|
|
|
+ <div class="max-w-5xl mx-auto px-4 py-8">
|
|
|
|
|
+ <header class="flex justify-between items-center mb-8">
|
|
|
|
|
+ <h1 class="text-2xl font-semibold text-gray-800">dirCops</h1>
|
|
|
|
|
+ <nav class="space-x-4">
|
|
|
|
|
+ <a href="index.html" class="text-gray-600 hover:text-blue-600">Clients</a>
|
|
|
|
|
+ <a href="dashboard.html" class="text-gray-600 hover:text-blue-600">Tableau de bord</a>
|
|
|
|
|
+ <a href="top-clients.html" class="text-gray-600 hover:text-blue-600">Top clients</a>
|
|
|
|
|
+ <a href="quantites-clients.html" class="text-gray-600 hover:text-blue-600">Quantités</a>
|
|
|
|
|
+ </nav>
|
|
|
|
|
+ </header>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="error-message" class="hidden mb-4 p-3 bg-red-100 text-red-700 rounded"></div>
|
|
|
|
|
+
|
|
|
|
|
+ <div id="client-header" class="mb-8">
|
|
|
|
|
+ <p class="text-gray-500">Chargement...</p>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="bg-white rounded-lg shadow p-6 mb-8">
|
|
|
|
|
+ <h2 class="text-lg font-medium text-gray-800 mb-4">Factures</h2>
|
|
|
|
|
+ <div id="factures-list" class="overflow-x-auto -mx-2 px-2">Chargement...</div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="bg-white rounded-lg shadow p-6 mb-8">
|
|
|
|
|
+ <h2 class="text-lg font-medium text-gray-800 mb-4">Ajouter une facture (suivi)</h2>
|
|
|
|
|
+ <p class="text-sm text-gray-500 mb-4">La facturation provient de Pennylane ; saisir ici les données pour le suivi (même structure que l’onglet Factures Excel).</p>
|
|
|
|
|
+ <form id="form-facture" class="flex flex-wrap gap-4 items-end">
|
|
|
|
|
+ <input type="hidden" id="facture_client_id" name="client_id" value="">
|
|
|
|
|
+ <div><label for="n_facture" class="block text-sm text-gray-600 mb-1">N° FACTURE</label><input type="text" id="n_facture" name="n_facture" class="border border-gray-300 rounded px-3 py-2" required></div>
|
|
|
|
|
+ <div><label for="n_vente" class="block text-sm text-gray-600 mb-1">N° DE VENTE</label><input type="text" id="n_vente" name="n_vente" class="border border-gray-300 rounded px-3 py-2"></div>
|
|
|
|
|
+ <div><label for="date_facture" class="block text-sm text-gray-600 mb-1">DATE FACTUR</label><input type="date" id="date_facture" name="date_facture" class="border border-gray-300 rounded px-3 py-2" required></div>
|
|
|
|
|
+ <div><label for="type_produit" class="block text-sm text-gray-600 mb-1">TYPE (NEG.)</label><select id="type_produit" name="type_produit" class="border border-gray-300 rounded px-3 py-2"><option value="">—</option><option value="alevins">Alevin Bar</option><option value="larves">Larve Bar</option></select></div>
|
|
|
|
|
+ <div><label for="cycle" class="block text-sm text-gray-600 mb-1">CYCLE</label><input type="text" id="cycle" name="cycle" placeholder="24-25 ou 25-26" class="border border-gray-300 rounded px-3 py-2"></div>
|
|
|
|
|
+ <div><label for="quantites" class="block text-sm text-gray-600 mb-1">QTE FACT</label><input type="number" id="quantites" name="quantites" step="0.01" min="0" class="border border-gray-300 rounded px-3 py-2" placeholder="Qté facturée"></div>
|
|
|
|
|
+ <div><label for="qte_livree" class="block text-sm text-gray-600 mb-1">QTE LIVREE</label><input type="number" id="qte_livree" name="qte_livree" step="0.01" min="0" class="border border-gray-300 rounded px-3 py-2" placeholder="Qté livrée"></div>
|
|
|
|
|
+ <div><label for="montant_ht" class="block text-sm text-gray-600 mb-1">CA FACTURE HT (€)</label><input type="number" id="montant_ht" name="montant_ht" step="0.01" min="0.01" class="border border-gray-300 rounded px-3 py-2" required></div>
|
|
|
|
|
+ <button type="submit" class="px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700">Ajouter la facture</button>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="bg-white rounded-lg shadow p-6 mb-8">
|
|
|
|
|
+ <h2 class="text-lg font-medium text-gray-800 mb-4">Écheancier de paiement</h2>
|
|
|
|
|
+ <p class="text-sm text-gray-500 mb-4">Associer à une facture un plan de paiement échelonné (échéances mensuelles). Le montant de l’encours sera réparti équitablement sur le nombre d’échéances.</p>
|
|
|
|
|
+ <div id="echeanciers-list" class="mb-4">—</div>
|
|
|
|
|
+ <form id="form-echeancier" class="flex flex-wrap gap-4 items-end">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="echeancier_facture_id" class="block text-sm text-gray-600 mb-1">Facture</label>
|
|
|
|
|
+ <select id="echeancier_facture_id" name="facture_id" class="border border-gray-300 rounded px-3 py-2 min-w-[200px]" required></select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="nb_echeances" class="block text-sm text-gray-600 mb-1">Nombre d’échéances</label>
|
|
|
|
|
+ <input type="number" id="nb_echeances" name="nb_echeances" min="1" class="border border-gray-300 rounded px-3 py-2" required>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="date_debut_echeancier" class="block text-sm text-gray-600 mb-1">Date de début</label>
|
|
|
|
|
+ <input type="date" id="date_debut_echeancier" name="date_debut_echeancier" class="border border-gray-300 rounded px-3 py-2" required>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button type="submit" class="px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700">Ajouter l’écheancier</button>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ <div id="apercu-echeancier"></div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="bg-white rounded-lg shadow p-6 mb-8">
|
|
|
|
|
+ <h2 class="text-lg font-medium text-gray-800 mb-4">Enregistrer un paiement</h2>
|
|
|
|
|
+ <form id="form-paiement" class="flex flex-wrap gap-4 items-end">
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="facture_id" class="block text-sm text-gray-600 mb-1">Facture</label>
|
|
|
|
|
+ <select id="facture_id" name="facture_id" class="border border-gray-300 rounded px-3 py-2 min-w-[200px]" required></select>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="montant" class="block text-sm text-gray-600 mb-1">Montant (€)</label>
|
|
|
|
|
+ <input type="number" id="montant" name="montant" step="0.01" min="0.01" class="border border-gray-300 rounded px-3 py-2" required>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <div>
|
|
|
|
|
+ <label for="date_paiement" class="block text-sm text-gray-600 mb-1">Date</label>
|
|
|
|
|
+ <input type="date" id="date_paiement" name="date_paiement" class="border border-gray-300 rounded px-3 py-2" required>
|
|
|
|
|
+ </div>
|
|
|
|
|
+ <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Enregistrer</button>
|
|
|
|
|
+ </form>
|
|
|
|
|
+ </section>
|
|
|
|
|
+
|
|
|
|
|
+ <section class="bg-white rounded-lg shadow p-6 mb-8">
|
|
|
|
|
+ <h2 class="text-lg font-medium text-gray-800 mb-4">Paiements</h2>
|
|
|
|
|
+ <div id="paiements-list">Chargement...</div>
|
|
|
|
|
+ </section>
|
|
|
|
|
+ </div>
|
|
|
|
|
+
|
|
|
|
|
+ <script src="js/utils.js"></script>
|
|
|
|
|
+ <script src="js/client-detail.js"></script>
|
|
|
|
|
+ <script src="js/facture-form.js"></script>
|
|
|
|
|
+ <script src="js/echeancier-form.js"></script>
|
|
|
|
|
+ <script src="js/paiements.js"></script>
|
|
|
|
|
+</body>
|
|
|
|
|
+</html>
|