Taux TVA auto + seed enrichi + import photo collee
This commit is contained in:
@@ -45,7 +45,7 @@
|
||||
{% endif %}
|
||||
|
||||
{% if not lignes %}
|
||||
<form method="post" enctype="multipart/form-data" class="card">
|
||||
<form method="post" enctype="multipart/form-data" class="card" id="srcForm">
|
||||
{% csrf_token %}
|
||||
<div class="grid3">
|
||||
<div>
|
||||
@@ -59,8 +59,9 @@
|
||||
<input type="number" name="annee" value="{{ annee_defaut }}">
|
||||
</div>
|
||||
<div>
|
||||
<label>Capture d'écran (OCR)</label>
|
||||
<input type="file" name="image" accept="image/*">
|
||||
<label>Photo / capture (OCR) — fichier, appareil photo, ou <b>coller</b> (Ctrl/Cmd+V)</label>
|
||||
<input type="file" name="image" id="imgInput" accept="image/*" capture="environment">
|
||||
<div id="pasteInfo" class="sub" style="margin-top:4px"></div>
|
||||
</div>
|
||||
</div>
|
||||
<label>…ou fichier CSV</label>
|
||||
@@ -110,5 +111,24 @@
|
||||
</div>
|
||||
</form>
|
||||
{% endif %}
|
||||
|
||||
<script>
|
||||
window.addEventListener('paste', function(e){
|
||||
var input = document.getElementById('imgInput');
|
||||
if(!input || !e.clipboardData) return;
|
||||
for(var i=0; i<e.clipboardData.items.length; i++){
|
||||
var it = e.clipboardData.items[i];
|
||||
if(it.type && it.type.indexOf('image') === 0){
|
||||
var dt = new DataTransfer();
|
||||
dt.items.add(it.getAsFile());
|
||||
input.files = dt.files;
|
||||
var info = document.getElementById('pasteInfo');
|
||||
if(info){ info.textContent = 'Image collée — clique « Analyser ».'; info.style.color = '#34d399'; }
|
||||
e.preventDefault();
|
||||
break;
|
||||
}
|
||||
}
|
||||
});
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
<body>
|
||||
<h1>Saisie d'une opération</h1>
|
||||
<div class="sub">Montant <b>négatif</b> = dépense · <b>positif</b> = vente/encaissement.
|
||||
· <a href="/dashboard/">← Tableau de bord</a></div>
|
||||
· <a href="/dashboard/">← Tableau de bord</a> · <a href="/import/">Importer un relevé</a></div>
|
||||
|
||||
{% if messages %}{% for m in messages %}<div class="msg {{ m.tags }}">{{ m }}</div>{% endfor %}{% endif %}
|
||||
|
||||
@@ -83,13 +83,12 @@
|
||||
<table>
|
||||
<thead>
|
||||
<tr>
|
||||
<th style="width:22%">Libellé / vendeur</th>
|
||||
<th style="width:24%">Libellé / vendeur</th>
|
||||
<th style="width:16%">Catégorie</th>
|
||||
<th style="width:14%">Activité</th>
|
||||
<th style="width:15%">Activité</th>
|
||||
<th style="width:16%">Régime TVA</th>
|
||||
<th style="width:7%">Taux %</th>
|
||||
<th style="width:11%">Montant €</th>
|
||||
<th style="width:11%">TVA déduct.</th>
|
||||
<th style="width:9%">Taux TVA</th>
|
||||
<th style="width:13%">Montant €</th>
|
||||
<th></th>
|
||||
</tr>
|
||||
</thead>
|
||||
@@ -125,7 +124,10 @@
|
||||
</div>
|
||||
<div>
|
||||
<label>Taux TVA (%)</label>
|
||||
<input type="number" step="0.01" name="v_taux" value="20">
|
||||
<select name="v_taux">
|
||||
<option value="20">20 %</option><option value="10">10 %</option>
|
||||
<option value="5.5">5,5 %</option><option value="0">0 %</option>
|
||||
</select>
|
||||
</div>
|
||||
<div>
|
||||
<label>Désignation</label>
|
||||
@@ -139,9 +141,8 @@
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="hint">Le montant TTC encaissé = le montant signé saisi plus haut. HT et TVA
|
||||
sont calculés depuis le taux. Si tu choisis une catégorie <b>neutre</b>, aucune facture
|
||||
n'est créée (simple mouvement de trésorerie).</div>
|
||||
<div class="hint">Le montant TTC encaissé = le montant signé saisi plus haut.
|
||||
Une catégorie <b>neutre</b> n'enregistre pas de vente (mouvement de trésorerie).</div>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
@@ -169,9 +170,13 @@
|
||||
{% for val,lab in regimes %}<option value="{{ val }}">{{ lab }}</option>{% endfor %}
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="number" step="0.01" name="l_taux" value="0" class="num"></td>
|
||||
<td>
|
||||
<select name="l_taux">
|
||||
<option value="20">20 %</option><option value="10">10 %</option>
|
||||
<option value="5.5">5,5 %</option><option value="0">0 %</option>
|
||||
</select>
|
||||
</td>
|
||||
<td><input type="number" step="0.01" name="l_montant" class="num montant" oninput="recalc()"></td>
|
||||
<td><input type="number" step="0.01" name="l_tva" value="0" class="num"></td>
|
||||
<td><button type="button" class="mini" onclick="this.closest('tr').remove();recalc()">✕</button></td>
|
||||
</tr>
|
||||
</template>
|
||||
|
||||
Reference in New Issue
Block a user