C&E correction
This commit is contained in:
@@ -225,11 +225,12 @@ def pageFunc(page,qs,per_page):
|
|||||||
@login_required
|
@login_required
|
||||||
@is_staff_access()
|
@is_staff_access()
|
||||||
def timbres_cliente(request, RFC):
|
def timbres_cliente(request, RFC):
|
||||||
|
RFC = urllib.parse.unquote(RFC)
|
||||||
if request.user.is_staff:
|
if request.user.is_staff:
|
||||||
lista = Timbres.objects.filter(rfcc=RFC)
|
lista = Timbres.objects.filter(rfcc=RFC)
|
||||||
else:
|
else:
|
||||||
lista = Timbres.objects.filter(rfcc=RFC,modo='Normal')
|
lista = Timbres.objects.filter(rfcc=RFC,modo='Normal')
|
||||||
|
|
||||||
mes = request.GET.get('mes', None)
|
mes = request.GET.get('mes', None)
|
||||||
year = request.GET.get('year',None)
|
year = request.GET.get('year',None)
|
||||||
|
|
||||||
@@ -243,7 +244,7 @@ def timbres_cliente(request, RFC):
|
|||||||
datepickerFin = request.GET.get('datepickerFin', None)
|
datepickerFin = request.GET.get('datepickerFin', None)
|
||||||
tipo = request.GET.get('tipo',None)
|
tipo = request.GET.get('tipo',None)
|
||||||
PAC= request.GET.get('PAC',None)
|
PAC= request.GET.get('PAC',None)
|
||||||
|
|
||||||
if PAC is not None and PAC !='00':
|
if PAC is not None and PAC !='00':
|
||||||
lista = lista.filter(rfcp=PAC)
|
lista = lista.filter(rfcp=PAC)
|
||||||
|
|
||||||
@@ -296,7 +297,7 @@ def timbres_cliente(request, RFC):
|
|||||||
'lista':lista,
|
'lista':lista,
|
||||||
'conteo':conteo,
|
'conteo':conteo,
|
||||||
'RFC':RFC,
|
'RFC':RFC,
|
||||||
'PAC':PAC,
|
'PAC': PAC,
|
||||||
'filters':filters
|
'filters':filters
|
||||||
}
|
}
|
||||||
return render(request, 'Clientes/timbres_cliente.html', context)
|
return render(request, 'Clientes/timbres_cliente.html', context)
|
||||||
@@ -373,6 +374,7 @@ def PACS_Retrive_RFCS(request):
|
|||||||
status = 200
|
status = 200
|
||||||
if request.method == 'GET':
|
if request.method == 'GET':
|
||||||
RFC= request.GET.get('RFC','')
|
RFC= request.GET.get('RFC','')
|
||||||
|
rfcp = urllib.parse.unquote(RFC)
|
||||||
|
|
||||||
if RFC !='':
|
if RFC !='':
|
||||||
timbres =list(Timbres.objects.values('rfcp').filter(rfcc__in=[RFC]))
|
timbres =list(Timbres.objects.values('rfcp').filter(rfcc__in=[RFC]))
|
||||||
@@ -380,6 +382,7 @@ def PACS_Retrive_RFCS(request):
|
|||||||
timbres =list(Timbres.objects.values('rfcp').filter(rfcp__isnull=False))
|
timbres =list(Timbres.objects.values('rfcp').filter(rfcp__isnull=False))
|
||||||
else:
|
else:
|
||||||
status=403
|
status=403
|
||||||
|
|
||||||
return JsonResponse({'PACS':timbres},status=status)
|
return JsonResponse({'PACS':timbres},status=status)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -105,7 +105,7 @@ Timbres disponibles Comercio Digital: {{saldo}}
|
|||||||
</button>
|
</button>
|
||||||
<div class="dropdown-menu">
|
<div class="dropdown-menu">
|
||||||
|
|
||||||
<a class="btn btn-outline-info w-100" href="{% url 'timbres_cliente' obj.RFC %}" >
|
<a class="btn btn-outline-info w-100" href="{% url 'timbres_cliente' obj.RFC|urlencode %}" >
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
|
<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-eye" viewBox="0 0 16 16">
|
||||||
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
<path d="M16 8s-3-5.5-8-5.5S0 8 0 8s3 5.5 8 5.5S16 8 16 8zM1.173 8a13.133 13.133 0 0 1 1.66-2.043C4.12 4.668 5.88 3.5 8 3.5c2.12 0 3.879 1.168 5.168 2.457A13.133 13.133 0 0 1 14.828 8c-.058.087-.122.183-.195.288-.335.48-.83 1.12-1.465 1.755C11.879 11.332 10.119 12.5 8 12.5c-2.12 0-3.879-1.168-5.168-2.457A13.134 13.134 0 0 1 1.172 8z"/>
|
||||||
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
<path d="M8 5.5a2.5 2.5 0 1 0 0 5 2.5 2.5 0 0 0 0-5zM4.5 8a3.5 3.5 0 1 1 7 0 3.5 3.5 0 0 1-7 0z"/>
|
||||||
|
|||||||
@@ -81,8 +81,10 @@
|
|||||||
function get_pacs(){
|
function get_pacs(){
|
||||||
|
|
||||||
let rfc = '{{request.path}}'
|
let rfc = '{{request.path}}'
|
||||||
rfc= Object.values(rfc.split('/'))
|
let part = encodeURIComponent(rfc)
|
||||||
url = `{% url 'PACS_Retrive_RFCS' %}?RFC=${rfc[2]}`
|
rfc= Object.values(rfc.split('/'))
|
||||||
|
|
||||||
|
url = `{% url 'PACS_Retrive_RFCS' %}?RFC=${rfc[2]}`
|
||||||
fetch(url, {
|
fetch(url, {
|
||||||
method: 'GET',
|
method: 'GET',
|
||||||
headers:{
|
headers:{
|
||||||
|
|||||||
Reference in New Issue
Block a user