diff --git a/Backend/pre_cuentas/migrations/0002_alter_foreigntransfer_transfer_abroad.py b/Backend/pre_cuentas/migrations/0002_alter_foreigntransfer_transfer_abroad.py new file mode 100644 index 0000000..b90cd99 --- /dev/null +++ b/Backend/pre_cuentas/migrations/0002_alter_foreigntransfer_transfer_abroad.py @@ -0,0 +1,18 @@ +# Generated by Django 3.2.7 on 2021-09-19 00:41 + +from django.db import migrations, models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pre_cuentas', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='foreigntransfer', + name='transfer_abroad', + field=models.BooleanField(), + ), + ] diff --git a/Backend/pre_cuentas/migrations/0003_merge_20210918_2247.py b/Backend/pre_cuentas/migrations/0003_merge_20210918_2247.py new file mode 100644 index 0000000..b40cf4b --- /dev/null +++ b/Backend/pre_cuentas/migrations/0003_merge_20210918_2247.py @@ -0,0 +1,14 @@ +# Generated by Django 3.2.7 on 2021-09-19 02:47 + +from django.db import migrations + + +class Migration(migrations.Migration): + + dependencies = [ + ('pre_cuentas', '0002_alter_foreigntransfer_transfer_abroad'), + ('pre_cuentas', '0002_auto_20210918_2136'), + ] + + operations = [ + ] diff --git a/Backend/pre_cuentas/models.py b/Backend/pre_cuentas/models.py index 0ba83c3..42a9a08 100644 --- a/Backend/pre_cuentas/models.py +++ b/Backend/pre_cuentas/models.py @@ -118,7 +118,7 @@ class Request(models.Model): transfer_destiny = models.CharField(max_length=3, choices=COUNTRIES, default="Ven") state = models.CharField(max_length=1, default='A') # Faltan opciones def __str__(self): - return self.code + return str(self.code) class Meta: db_table = 'Request' diff --git a/Backend/pre_cuentas/views.py b/Backend/pre_cuentas/views.py index 0d0d3b0..7376dea 100644 --- a/Backend/pre_cuentas/views.py +++ b/Backend/pre_cuentas/views.py @@ -5,6 +5,7 @@ from .models import * from django.core.exceptions import ObjectDoesNotExist from django.contrib.auth import authenticate, login +"""from django.db.models import Request;""" def client_view(request): context ={} @@ -73,7 +74,15 @@ def form2SC(request): return render(request, 'components/Form2SC.html') def seeQuote(request): - return render(request, 'components/SeeQuote.html') + client = request.user.client + + consultQuote = Request.objects.select_related('office_code').filter(client_document_id = client) + + return render(request, 'components/SeeQuote.html',{'consultQuote' : consultQuote} ) def visualize(request): - return render(request, 'components/Visualize.html') \ No newline at end of file + client = request.user.client + + consultVoucher = Request.objects.select_related('client_document_id', 'office_code').filter(client_document_id = client) + + return render(request, 'components/Visualize.html', {'consultVoucher' : consultVoucher} ) \ No newline at end of file diff --git a/Frontend/template/components/SeeQuote.html b/Frontend/template/components/SeeQuote.html index 0de0a49..5dbb36f 100644 --- a/Frontend/template/components/SeeQuote.html +++ b/Frontend/template/components/SeeQuote.html @@ -13,9 +13,21 @@ - G5D46S4 - 12/09/2021 - Los Leones-Barquisimeto + {%if consultQuote%} + {%for cq in consultQuote%} + {{cq.code}} + {{cq.date_issue.day}} / {{cq.date_issue.month}} / {{cq.date_issue.year}} + {{cq.office_code.address}} + {% endfor %} + {% else %} + + {% endif %} + + + + diff --git a/Frontend/template/components/visualize.html b/Frontend/template/components/visualize.html index cc9b487..7dccdd7 100644 --- a/Frontend/template/components/visualize.html +++ b/Frontend/template/components/visualize.html @@ -3,7 +3,9 @@ {% block content %}
-

COMPROBANTE N*09005357

+ {% for cv in consultVoucher %} +

COMPROBANTE N*{{cv.code}}

+ {% endfor %}
@@ -15,9 +17,12 @@

COMPROBANTE N*09005357

- - - + {% for cv in consultVoucher %} + + + + {% endfor %} +
MARIHEC ESTER MIRANDA TOVAR26.120.07513/09/2021{{cv.client_document_id.first_name}} {{cv.client_document_id.last_name}}{{cv.client_document_id.document_type}} - {{cv.client_document_id.document_number}}{{cv.date_issue.day}} / {{cv.date_issue.month}} / {{cv.date_issue.year}}
@@ -33,9 +38,11 @@

COMPROBANTE N*09005357

- CUENTA CORRIENTE - LOS LEONES-Barquisimeto - 0315 + {% for cv in consultVoucher %} + {{cv.account_type}} + {{cv.office_code.name}} + {{cv.office_code.id}} + {% endfor %} @@ -49,7 +56,9 @@

COMPROBANTE N*09005357

- Av. Los Leones, CC Los Leones, PB, Locales 1, 2 y 3, sector Este, Municipio Iribarren. + {% for cv in consultVoucher %} + {{cv.office_code.address}} + {% endfor %} diff --git a/Frontend/template/pages/LandingPage.html b/Frontend/template/pages/LandingPage.html index 5f4af29..e85b8b6 100644 --- a/Frontend/template/pages/LandingPage.html +++ b/Frontend/template/pages/LandingPage.html @@ -38,7 +38,7 @@ @@ -81,7 +81,7 @@

Sistema de pre-apertura

de cuenta Bancaria

Realiza tu solicitud desde la comodidad de tu hogar, con el sistema más seguro de todo el País

- Me Interesa + Me Interesa