Ajoute la possibilité de créer des devis pour un client donné, avec gestion des numéros de devis et des lignes de devis.
98 lines
6.4 KiB
Twig
98 lines
6.4 KiB
Twig
{% extends 'artemis/base.twig' %}
|
|
{% block title %}Intranet - Client - {{ customer.raisonSocial }} - Création devis / avis de paiement / facture{% endblock %}
|
|
{% block content %}
|
|
<div class="flex justify-between items-center mb-6">
|
|
<h2 class="text-3xl font-semibold text-gray-800 dark:text-gray-200">Client - {{ customer.raisonSocial }} - Création devis / avis de paiement / facture</h2>
|
|
</div>
|
|
|
|
<form method="post" class="mt-5 bg-gray-800 rounded-lg shadow-lg p-6 space-y-4">
|
|
<div class="flex space-x-4" is="order-ctrl">
|
|
<div class="flex-1">
|
|
<div class="mb-5">
|
|
<label for="type" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Type</label>
|
|
<select id="type" name="type" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500">
|
|
|
|
<option value="avis">Avis de paiement</option>
|
|
<option value="devis">Devis</option>
|
|
<option value="facture">Facture</option>
|
|
</select>
|
|
</div>
|
|
</div>
|
|
<div class="flex-1">
|
|
<div class="mb-5">
|
|
<label for="num" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Numéro</label>
|
|
<input type="text" name="num" id="num_devis" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required value="AVIS-" />
|
|
</div>
|
|
</div>
|
|
<div class="flex-1">
|
|
<div class="mb-5">
|
|
<label for="date" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Date</label>
|
|
<input type="datetime-local" name="date" id="date" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required />
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
<fieldset class="form-section">
|
|
<legend>
|
|
<h2>Ligne(s)</h2>
|
|
</legend>
|
|
|
|
<div class="form-repeater" data-component="repeater" is="repeat-line">
|
|
<ol class="form-repeater__rows" data-ref="rows" tabindex="0">
|
|
<!-- This element will be repeated: -->
|
|
<li class="form-repeater__row">
|
|
<fieldset class="form-group form-group--horizontal">
|
|
<div class="flex space-x-4">
|
|
<div class="flex-1">
|
|
<div class="form-field">
|
|
<div class="mb-1">
|
|
<label for="titre" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Titre</label>
|
|
<input type="text" name="lines[0][title]" id="lines[0][title]" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required />
|
|
</div>
|
|
<div class="mb-1">
|
|
<label for="price" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Prix TTC</label>
|
|
<input type="number" step="0.1" name="lines[0][price]" id="lines[0][price]" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required />
|
|
</div>
|
|
<button
|
|
class="w-full form-repeater__remove-button bg-red-600 hover:bg-red-700 text-white px-3 py-1 rounded"
|
|
data-ref="removeButton"
|
|
type="button"
|
|
>
|
|
Supprimer la ligne
|
|
</button>
|
|
</div>
|
|
</div>
|
|
<div class="flex-1">
|
|
<div class="form-field">
|
|
<div class="mb-5">
|
|
<label for="description" class="block mb-2 text-sm font-medium text-gray-900 dark:text-white">Description</label>
|
|
<textarea rows="7" type="text" name="lines[0][description]" id="lines[0][description]" class="bg-gray-50 border border-gray-300 text-gray-900 text-sm rounded-lg focus:ring-blue-500 focus:border-blue-500 block w-full p-2.5 dark:bg-gray-700 dark:border-gray-600 dark:placeholder-gray-400 dark:text-white dark:focus:ring-blue-500 dark:focus:border-blue-500" required></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</fieldset>
|
|
|
|
</li>
|
|
</ol>
|
|
|
|
<button
|
|
class="form-repeater__add-button w-full bg-purple-600 hover:bg-purple-700 text-white px-3 py-1 rounded"
|
|
data-ref="addButton"
|
|
type="button"
|
|
>
|
|
+ Ajouter une ligne
|
|
</button>
|
|
</div>
|
|
</fieldset>
|
|
|
|
<button
|
|
class="w-full bg-purple-600 hover:bg-purple-700 text-white px-3 py-1 rounded"
|
|
type="submit"
|
|
>
|
|
Enregistrer
|
|
</button>
|
|
</form>
|
|
{% endblock %}
|