FEAT: correccion IVA y Boletas, filtro categorias, vista previa evidencia y proveedor de servicios

This commit is contained in:
Nachou-u
2026-09-09 14:35:10 -03:00
parent acb3a1eaad
commit 522d5337f4
8 changed files with 112 additions and 13 deletions
+24
View File
@@ -167,5 +167,29 @@
});
</script>
{% block extra_js %}{% endblock %}
<!-- Modal Vista Previa -->
<div id="previewModal" style="display:none; position:fixed; z-index:9999; left:0; top:0; width:100%; height:100%; overflow:auto; background-color:rgba(0,0,0,0.8); align-items:center; justify-content:center;">
<div style="background:#fff; margin:auto; padding:20px; border-radius:8px; width:80%; max-width:800px; max-height:90vh; display:flex; flex-direction:column; position:relative;">
<span onclick="closePreview()" style="position:absolute; right:15px; top:10px; font-size:24px; cursor:pointer; font-weight:bold;">&times;</span>
<h3 id="previewTitle" style="margin-top:0;">Vista Previa</h3>
<div id="previewContent" style="flex:1; overflow:hidden; display:flex; justify-content:center; align-items:center; min-height:400px;"></div>
</div>
</div>
<script>
function openPreview(url, title) {
document.getElementById("previewTitle").innerText = "Evidencia: " + title;
let contentDiv = document.getElementById("previewContent");
if(url.toLowerCase().endsWith(".pdf")) {
contentDiv.innerHTML = "<iframe src=\"" + url + "\" style=\"width:100%; height:100%; min-height:600px; border:none;\"></iframe>";
} else {
contentDiv.innerHTML = "<img src=\"" + url + "\" style=\"max-width:100%; max-height:600px; object-fit:contain;\">";
}
document.getElementById("previewModal").style.display = "flex";
}
function closePreview() {
document.getElementById("previewModal").style.display = "none";
document.getElementById("previewContent").innerHTML = "";
}
</script>
</body>
</html>
+5 -2
View File
@@ -14,8 +14,11 @@
<div style="margin-top: 0.25rem; display: flex; flex-direction: column; gap: 0.2rem;">
{% for doc in expense.documents.all %}
<div style="display:inline-flex; align-items:center; gap:0.3rem;">
<a href="{{ doc.file.url }}" target="_blank" style="font-size:0.65rem; color:var(--efintel-blue); text-decoration:none;" title="{{ doc.title|default:doc.file.name }}">
<i data-lucide="paperclip" style="width:10px;"></i> {{ doc.title|default:doc.file.name|truncatechars:20 }}
<a href="javascript:void(0);" onclick="openPreview('{{ doc.file.url }}', '{{ doc.title|default:doc.file.name|escapejs }}')" style="font-size:0.65rem; color:var(--efintel-blue); text-decoration:none;" title="Ver Evidencia">
<i data-lucide="eye" style="width:10px;"></i> {{ doc.title|default:doc.file.name|truncatechars:20 }}
</a>
<a href="{{ doc.file.url }}" target="_blank" style="font-size:0.65rem; color:var(--efintel-gray);" title="Descargar">
<i data-lucide="download" style="width:10px;"></i>
</a>
</div>
{% endfor %}