filtros
This commit is contained in:
118
Templates/Clientes/timbres_cliente.html
Normal file
118
Templates/Clientes/timbres_cliente.html
Normal file
@@ -0,0 +1,118 @@
|
||||
|
||||
{% extends 'base.html' %}
|
||||
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>Timbres <strong>{{RFC}}</strong> </h1>
|
||||
<h2>Timbres totales: <strong></strong>{{conteo}}</strong></h2>
|
||||
|
||||
<br><br>
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th scope="col">UUID</th>
|
||||
|
||||
<th scope="col">PAC</th>
|
||||
<th scope="col">
|
||||
<input id="table_tipo" name="tipo" value="True" type="checkbox" class="form-check-input" >
|
||||
Tipo CFDI
|
||||
</th>
|
||||
<th scope="col">Serie/Folio</th>
|
||||
<th scope="col">
|
||||
<input id="table_fecha" name="fecha" value="True" type="checkbox" class="form-check-input" >
|
||||
Fecha
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in lista %}
|
||||
<tr class="">
|
||||
<th scope="row">{{obj.uuid}}</th>
|
||||
<td>{{obj.rfcp}}</td>
|
||||
<td>{{obj.tipo}}</td>
|
||||
<td>{{obj.serie}}/{{obj.folio}}</td>
|
||||
<td>{{obj.created_at|date:"d M Y"}}</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
{% if lista.has_other_pages %}
|
||||
<nav>
|
||||
<ul class="pagination justify-content-center">
|
||||
{% if lista.has_previous %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ lista.previous_page_number }}" aria-label="Previous">
|
||||
<span aria-hidden="true">«</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-hidden="true">«</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% for p in lista.paginator.page_range %}
|
||||
{% if lista.number == p %}
|
||||
<li class="page-item"><a class="page-link" style="color: red;" href="#">{{ p }}</a></li>
|
||||
{% else %}
|
||||
<li class="page-item"><a class="page-link" href="?page={{ p }}">{{ p }}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
|
||||
{% if lista.has_next %}
|
||||
<li class="page-item">
|
||||
<a class="page-link" href="?page={{ lista.next_page_number }}" aria-label="Next">
|
||||
<span aria-hidden="true">»</span>
|
||||
</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li class="page-item disabled">
|
||||
<span class="page-link" aria-hidden="true">»</span>
|
||||
</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
</nav>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endblock content %}
|
||||
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
table_tipo.addEventListener('click', (event)=>{
|
||||
document.getElementById('tipo').checked = table_tipo.checked? true:false;
|
||||
if(table_fecha.checked){
|
||||
table_fecha.click()
|
||||
}
|
||||
})
|
||||
|
||||
table_fecha.addEventListener('click', (event)=>{
|
||||
|
||||
|
||||
if(dates.hasAttribute("style")){
|
||||
dates.removeAttribute('style')
|
||||
datepicker.value=''
|
||||
datepicker.setAttribute("required",'')
|
||||
datepickerFin.value=''
|
||||
|
||||
datepickerFin.setAttribute('required','')
|
||||
search.setAttribute("style","display:none;")
|
||||
search.value=''
|
||||
|
||||
}else{
|
||||
dates.setAttribute("style","display:none;")
|
||||
search.removeAttribute('style')
|
||||
datepicker.removeAttribute('required')
|
||||
datepickerFin.removeAttribute('required')
|
||||
}
|
||||
if(table_tipo.checked && table_fecha.checked){
|
||||
table_tipo.checked=false
|
||||
}
|
||||
})
|
||||
</script>
|
||||
{% endblock scripts %}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user