<div class="modal fade" id="ajouterProduitFiniModal" tabindex="-1" aria-labelledby="ajouterProduitFiniModalLabel" aria-hidden="true">
  <div class="modal-dialog">
    <form method="POST" action="/eagle_client_istanbulcups/api/production/ajouter_produit_fini.php">
      <div class="modal-content">
        <div class="modal-header bg-primary text-white">
          <h5 class="modal-title">Ajouter Produit Fini</h5>
          <button type="button" class="btn-close" data-bs-dismiss="modal"></button>
        </div>
        <div class="modal-body">
          <div class="mb-3">
            <label for="produit_id_pf" class="form-label">Produit</label>
            <select name="produit_id" id="produit_id_pf" class="form-select" required>
              <?php
              foreach ($produits as $p) {
                  echo "<option value='{$p['id']}'>" . htmlspecialchars($p['nom']) . "</option>";
              }
              ?>
            </select>
          </div>
          <div class="mb-3">
            <label for="quantite_pf" class="form-label">Quantité</label>
            <input type="number" name="quantite" id="quantite_pf" class="form-control" min="1" required>
          </div>
        </div>
        <div class="modal-footer">
          <button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Fermer</button>
          <button type="submit" class="btn btn-primary">Ajouter</button>
        </div>
      </div>
    </form>
  </div>
</div>
