From 394546dc674680b757213868c69400297de26ee9 Mon Sep 17 00:00:00 2001 From: aminhashemi92 Date: Tue, 9 Sep 2025 16:42:22 +0330 Subject: [PATCH] fix final step --- certificates/models.py | 4 + .../templates/certificates/print.html | 89 +++++++++++++----- certificates/templates/certificates/step.html | 46 +++++---- certificates/views.py | 17 +++- db.sqlite3 | Bin 3088384 -> 3133440 bytes .../invoices/final_settlement_step.html | 4 +- invoices/views.py | 29 +----- processes/admin.py | 4 +- .../templates/processes/instance_summary.html | 26 +++-- 9 files changed, 137 insertions(+), 82 deletions(-) diff --git a/certificates/models.py b/certificates/models.py index 64d53f9..1b3dcaf 100644 --- a/certificates/models.py +++ b/certificates/models.py @@ -1,6 +1,7 @@ from django.db import models from django.contrib.auth import get_user_model from common.models import BaseModel +from _helpers.utils import jalali_converter2 User = get_user_model() @@ -35,4 +36,7 @@ class CertificateInstance(BaseModel): def __str__(self): return f"گواهی {self.process_instance.code}" + def jissued_at(self): + return jalali_converter2(self.issued_at) + diff --git a/certificates/templates/certificates/print.html b/certificates/templates/certificates/print.html index 5bd26c2..d5ef11f 100644 --- a/certificates/templates/certificates/print.html +++ b/certificates/templates/certificates/print.html @@ -1,28 +1,71 @@ -{% extends '_base.html' %} + + + + + + تاییدیه - {{ instance.code }} + {% load static %} -{% block content %} -
-
- {% if template.company and template.company.logo %} - logo - {% endif %} -

{{ cert.rendered_title }}

- {% if template.company %}
{{ template.company.name }}
{% endif %} -
-
- {{ cert.rendered_body|safe }} -
-
-
تاریخ: {{ cert.issued_at }}
-
- {% if template.company and template.company.signature %} - seal + + + + + + + + + + + + + + +
+ +
+
+
شماره درخواست: {{ instance.code }}
+
تاریخ: {{ cert.jissued_at }}
+
+
+ + +
+ {% if template.company and template.company.logo %} + logo {% endif %} -
مهر و امضای شرکت
+

{{ cert.rendered_title }}

+ {% if template.company %} +
{{ template.company.name }}
+ {% endif %} +
+ + +
+ {{ cert.rendered_body|safe }} +
+ + +
+
+
مهر و امضای تایید کننده
+
{{ template.company.name }}
+ {% if template.company and template.company.signature %} + seal + {% endif %} +
-
- -{% endblock %} - + + + diff --git a/certificates/templates/certificates/step.html b/certificates/templates/certificates/step.html index b8923c2..0027d18 100644 --- a/certificates/templates/certificates/step.html +++ b/certificates/templates/certificates/step.html @@ -18,40 +18,49 @@ - {% endblock %} {% block content %} {% include '_toasts.html' %} + + + {% instance_info_modal instance %} + {% csrf_token %}
-
+

{{ step.name }}: {{ instance.process.name }}

- اشتراک آب: {{ instance.well.water_subscription_number|default:"-" }} - | نماینده: {{ instance.representative.profile.national_code|default:"-" }} + {% instance_info instance %}
-
+
{% stepper_header instance step %}
+
+
+
شماره درخواست: {{ instance.code }}
+
تاریخ: {{ cert.jissued_at }}
+
+
{% if template.company and template.company.logo %} logo @@ -62,21 +71,22 @@
{{ cert.rendered_body|safe }}
-
-
-
تاریخ صدور: {{ cert.issued_at }}
-
+
+
مهر و امضای تایید کننده
+
{{ template.company.name }}
{% if template.company and template.company.signature %} - seal + seal {% endif %} -
مهر و امضای شرکت