client.html 6.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102
  1. <!DOCTYPE html>
  2. <html lang="fr">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  6. <title>Détail client - Suivi FTI EMGI</title>
  7. <script src="https://cdn.tailwindcss.com"></script>
  8. </head>
  9. <body class="bg-gray-50 min-h-screen">
  10. <div class="max-w-5xl mx-auto px-4 py-8">
  11. <header class="flex justify-between items-center mb-8">
  12. <h1 class="text-2xl font-semibold text-gray-800">Suivi FTI EMGI</h1>
  13. <nav class="space-x-4">
  14. <a href="index.html" class="text-gray-600 hover:text-blue-600">Clients</a>
  15. <a href="dashboard.html" class="text-gray-600 hover:text-blue-600">Tableau de bord</a>
  16. <a href="top-clients.html" class="text-gray-600 hover:text-blue-600">Top clients</a>
  17. <a href="quantites-clients.html" class="text-gray-600 hover:text-blue-600">Quantités</a>
  18. </nav>
  19. </header>
  20. <div id="error-message" class="hidden mb-4 p-3 bg-red-100 text-red-700 rounded"></div>
  21. <div id="client-header" class="mb-8">
  22. <p class="text-gray-500">Chargement...</p>
  23. </div>
  24. <section class="bg-white rounded-lg shadow p-6 mb-8">
  25. <h2 class="text-lg font-medium text-gray-800 mb-4">Factures</h2>
  26. <div id="factures-list" class="overflow-x-auto -mx-2 px-2">Chargement...</div>
  27. </section>
  28. <section class="bg-white rounded-lg shadow p-6 mb-8">
  29. <h2 class="text-lg font-medium text-gray-800 mb-4">Ajouter une facture (suivi)</h2>
  30. <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>
  31. <form id="form-facture" class="flex flex-wrap gap-4 items-end">
  32. <input type="hidden" id="facture_client_id" name="client_id" value="">
  33. <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>
  34. <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>
  35. <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>
  36. <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>
  37. <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>
  38. <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>
  39. <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>
  40. <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>
  41. <button type="submit" class="px-4 py-2 bg-green-600 text-white rounded hover:bg-green-700">Ajouter la facture</button>
  42. </form>
  43. </section>
  44. <section class="bg-white rounded-lg shadow p-6 mb-8">
  45. <h2 class="text-lg font-medium text-gray-800 mb-4">Écheancier de paiement</h2>
  46. <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>
  47. <div id="echeanciers-list" class="mb-4">—</div>
  48. <form id="form-echeancier" class="flex flex-wrap gap-4 items-end">
  49. <div>
  50. <label for="echeancier_facture_id" class="block text-sm text-gray-600 mb-1">Facture</label>
  51. <select id="echeancier_facture_id" name="facture_id" class="border border-gray-300 rounded px-3 py-2 min-w-[200px]" required></select>
  52. </div>
  53. <div>
  54. <label for="nb_echeances" class="block text-sm text-gray-600 mb-1">Nombre d’échéances</label>
  55. <input type="number" id="nb_echeances" name="nb_echeances" min="1" class="border border-gray-300 rounded px-3 py-2" required>
  56. </div>
  57. <div>
  58. <label for="date_debut_echeancier" class="block text-sm text-gray-600 mb-1">Date de début</label>
  59. <input type="date" id="date_debut_echeancier" name="date_debut_echeancier" class="border border-gray-300 rounded px-3 py-2" required>
  60. </div>
  61. <button type="submit" class="px-4 py-2 bg-indigo-600 text-white rounded hover:bg-indigo-700">Ajouter l’écheancier</button>
  62. </form>
  63. <div id="apercu-echeancier"></div>
  64. </section>
  65. <section class="bg-white rounded-lg shadow p-6 mb-8">
  66. <h2 class="text-lg font-medium text-gray-800 mb-4">Enregistrer un paiement</h2>
  67. <form id="form-paiement" class="flex flex-wrap gap-4 items-end">
  68. <div>
  69. <label for="facture_id" class="block text-sm text-gray-600 mb-1">Facture</label>
  70. <select id="facture_id" name="facture_id" class="border border-gray-300 rounded px-3 py-2 min-w-[200px]" required></select>
  71. </div>
  72. <div>
  73. <label for="montant" class="block text-sm text-gray-600 mb-1">Montant (€)</label>
  74. <input type="number" id="montant" name="montant" step="0.01" min="0.01" class="border border-gray-300 rounded px-3 py-2" required>
  75. </div>
  76. <div>
  77. <label for="date_paiement" class="block text-sm text-gray-600 mb-1">Date</label>
  78. <input type="date" id="date_paiement" name="date_paiement" class="border border-gray-300 rounded px-3 py-2" required>
  79. </div>
  80. <button type="submit" class="px-4 py-2 bg-blue-600 text-white rounded hover:bg-blue-700">Enregistrer</button>
  81. </form>
  82. </section>
  83. <section class="bg-white rounded-lg shadow p-6 mb-8">
  84. <h2 class="text-lg font-medium text-gray-800 mb-4">Paiements</h2>
  85. <div id="paiements-list">Chargement...</div>
  86. </section>
  87. </div>
  88. <script src="js/utils.js"></script>
  89. <script src="js/client-detail.js"></script>
  90. <script src="js/facture-form.js"></script>
  91. <script src="js/echeancier-form.js"></script>
  92. <script src="js/paiements.js"></script>
  93. </body>
  94. </html>