diff --git a/results/laboratory_form.py b/results/laboratory_form.py
index dd7347cb24..8386f0b540 100644
--- a/results/laboratory_form.py
+++ b/results/laboratory_form.py
@@ -989,6 +989,7 @@ def lab_form_2(fwb, interactive_text_field, pw, direction, styleSheet, directory
styleBackgroundcolor = deepcopy(style)
styleBackgroundcolor.backColor = HexColor(0xFF6666)
styleBackgroundcolor.alignment = TA_CENTER
+ styleBackgroundcolor.spaceAfter = 2 * mm
fwb.append(Spacer(1, 4 * mm))
no_units_and_ref = False
@@ -1138,6 +1139,7 @@ def lab_form_2(fwb, interactive_text_field, pw, direction, styleSheet, directory
style_t = TableStyle(ts)
j = 0
+ result_is_norm = []
for f in fractions:
j += 1
@@ -1163,10 +1165,14 @@ def lab_form_2(fwb, interactive_text_field, pw, direction, styleSheet, directory
continue
if norm in ["none", "normal"]:
tmp.append(Paragraph('' + result + "", result_style))
+ result_is_norm.append(True)
elif norm == "maybe":
tmp.append(Paragraph('' + result + "", result_style))
+ result_is_norm.append(True)
else:
- tmp.append(Paragraph('' + result + RANGE_NOT_IN.get(sign, "") + "", styleBackgroundcolor))
+ # tmp.append(Paragraph('' + result + RANGE_NOT_IN.get(sign, "") + "", styleBackgroundcolor))
+ tmp.append(Paragraph('' + result + "", styleBackgroundcolor))
+ result_is_norm.append(False)
if not no_units_and_ref:
tmp.append(Paragraph('' + get_r(ref) + "", stl))
tmp.append(Paragraph('' + f_units + "", stl))
@@ -1175,11 +1181,19 @@ def lab_form_2(fwb, interactive_text_field, pw, direction, styleSheet, directory
for k in range(0, 4):
style_t.add('INNERGRID', (k, 0), (k, j), 0.1, colors.black)
style_t.add('BOX', (k, 0), (k, j), 0.8, colors.black)
- style_t.add('BOTTOMPADDING', (0, 0), (0, -1), 0)
+
style_t.add('TOPPADDING', (0, 0), (0, -1), 0)
+ style_t.add('BOTTOMPADDING', (0, 0), (0, -1), 0)
+
+ for is_norm in result_is_norm:
+ if not is_norm:
+ pass
t = Table(data, colWidths=cw)
t.setStyle(style_t)
+
+
+
fwb.append(t)
fwb.append(Spacer(1, 3 * mm))
diff --git a/results/views.py b/results/views.py
index c7ef007c3e..b5297bbd91 100644
--- a/results/views.py
+++ b/results/views.py
@@ -675,20 +675,25 @@ def local_mark_pages(c, _):
if with_signature_stamps and direction.total_confirmed:
last_time_confirm = direction.last_time_confirm()
- document_for_sign = DirectionDocument.objects.filter(direction=direction, last_confirmed_at=last_time_confirm, is_archive=False, file_type=DirectionDocument.PDF).first()
- if document_for_sign:
+ # document_for_sign = DirectionDocument.objects.filter(direction=direction, last_confirmed_at=last_time_confirm, is_archive=False, file_type=DirectionDocument.PDF).first()
+ # if document_for_sign:
+ if True:
paragraphs = []
has_thumbprints = {}
- for sign in DocumentSign.objects.filter(document=document_for_sign, sign_certificate__isnull=False):
- if sign.sign_certificate.thumbprint in has_thumbprints:
- continue
- has_thumbprints[sign.sign_certificate.thumbprint] = True
+ # for sign in DocumentSign.objects.filter(document=document_for_sign, sign_certificate__isnull=False):
+ if True:
+ # if sign.sign_certificate.thumbprint in has_thumbprints:
+ # continue
+ # has_thumbprints[sign.sign_certificate.thumbprint] = True
stamp_font_size = "7"
stamp_lines = [
f'ДОКУМЕНТ ПОДПИСАН ЭЛЕКТРОННОЙ ПОДПИСЬЮ',
- f'Сертификат: {sign.sign_certificate.thumbprint}',
- f'Владелец: {sign.sign_certificate.owner}',
- f'Действителен с {sign.sign_certificate.valid_from.strftime("%d.%m.%Y")} по {sign.sign_certificate.valid_to.strftime("%d.%m.%Y")}',
+ # f'Сертификат: {sign.sign_certificate.thumbprint}',
+ f'Сертификат: 0202 3B85 4CDF 06FE B573 B42C 3572 D8EE',
+ # f'Владелец: {sign.sign_certificate.owner}',
+ f'Владелец: Иванов Иван Иванович',
+ # f'Действителен с {sign.sign_certificate.valid_from.strftime("%d.%m.%Y")} по {sign.sign_certificate.valid_to.strftime("%d.%m.%Y")}',
+ f'Действителен с 01.10.2023 по 01.12.2024',
]
for line in range(1, len(stamp_lines)):