mas reportes
This commit is contained in:
@@ -22,13 +22,16 @@ Timbres disponibles Comercio Digital: {{saldo.saldo}}
|
||||
<th>Totales Mes {{fecha|date:"F"}}</th>
|
||||
<th>Estado</th>
|
||||
<th scope="col">actions</th>
|
||||
<th>
|
||||
<a target="_blank" rel="noopener noreferrer" href="{% url 'export_Excel' %}">Excel Todos los clientes X Mes </a>
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for obj in lista %}
|
||||
<tr class="{% if not obj.Activo %}table-danger{% endif %}">
|
||||
<td>
|
||||
<a href="{% url 'update_cliente' obj.pk %}">{{obj.RFC}}</a>
|
||||
<td >
|
||||
<a href="{% url 'update_cliente' obj.pk %}">{{obj.RFC}}</a>
|
||||
</td>
|
||||
<td>{{obj.Nombre}} </td>
|
||||
<td>{{obj.timbres_mes_count}}</td>
|
||||
@@ -46,7 +49,10 @@ Timbres disponibles Comercio Digital: {{saldo.saldo}}
|
||||
<a href="{% url 'timbres_cliente' obj.RFC %}" class="btn btn-info">Ver Timbres</a>
|
||||
{% endif %}
|
||||
</td>
|
||||
<td><a target="_blank" rel="noopener noreferrer" href="{% url 'export_Excel' %}?RFC={{obj.RFC}}">Excel</a></td>
|
||||
<td>
|
||||
<button class="btn btn-outline-info" id ="id_b_{{obj.RFC}}" onclick="aclick(event, '{{obj.RFC}}','{{obj.timbres_mes_count}}')">Excel</button>
|
||||
<a style="display: none;" id="id_a_{{obj.RFC}}" target="_blank" rel="noopener noreferrer" href="{% url 'export_Excel' %}?RFC={{obj.RFC}}">Excel</a>
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
@@ -55,11 +61,22 @@ Timbres disponibles Comercio Digital: {{saldo.saldo}}
|
||||
|
||||
{% block scripts %}
|
||||
<script>
|
||||
function aclick(event,RFC ,cuantos){
|
||||
|
||||
if( parseInt(cuantos)===0){
|
||||
|
||||
alert(`No hay timbres de este mes para el cliente ${RFC}`)
|
||||
}else{
|
||||
document.getElementById(`id_a_${RFC}`).click()
|
||||
}
|
||||
}
|
||||
|
||||
table_rfcc.addEventListener('click',(event)=>{
|
||||
document.getElementById('rfcc').checked= table_rfcc.checked? true:false;
|
||||
})
|
||||
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
{% endblock scripts %}
|
||||
Reference in New Issue
Block a user