Skip to content

Commit

Permalink
Merge pull request #3651 from mikhailprivalov/fixMoneyTotal
Browse files Browse the repository at this point in the history
003/у- 530
  • Loading branch information
Wellheor1 authored Mar 24, 2024
2 parents 1544e8d + 143e5d6 commit 7e8060d
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 3 deletions.
2 changes: 1 addition & 1 deletion api/dashboards/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ def cash_register(request):
data[f"Терминал {qr.department_id}"][qr.char_day] = f"{qr.received_terminal:,.2f}"
data[f"Возврат нал {qr.department_id}"][qr.char_day] = f"{qr.return_cash:,.2f}"
data[f"Возврат терм {qr.department_id}"][qr.char_day] = f"{qr.return_terminal:,.2f}"
data[f"Итого {qr.department_id}"][qr.char_day] = qr.received_cash + qr.received_terminal - qr.return_cash - qr.return_terminal
data[f"Итого {qr.department_id}"][qr.char_day] = f"{(qr.received_cash + qr.received_terminal - qr.return_cash - qr.return_terminal):,.2f}"
table_data = [v for v in data.values()]

return JsonResponse({"columns": columns, "tableData": table_data})
Expand Down
9 changes: 7 additions & 2 deletions directions/forms/forms580.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,11 @@
from laboratory.utils import strdate, strtime
from podrazdeleniya.models import Podrazdeleniya
from utils import xh
from utils.xh import translation_number_from_decimal
from reportlab.graphics.barcode import qr
from reportlab.graphics.barcode import createBarcodeDrawing
from django.utils.text import Truncator

from django.core.paginator import Paginator
from reportlab.platypus.flowables import HRFlowable


def form_01(request_data):
Expand Down Expand Up @@ -276,13 +276,18 @@ def form_01(request_data):
objs.append(tbl)
if is_laboratory:
objs.append(Spacer(1, 8 * cm))
objs.append(Spacer(1, 7 * mm))
if not dir.imported_from_rmis:
if dir.doc_who_create and dir.doc_who_create != dir.doc:
objs.append(Paragraph(f"Выписал:{dir.doc_who_create.get_fio()} {dir.doc_who_create.podrazdeleniye.title}", style))

if dir.doc:
objs.append(Paragraph(f"Отделение: {dir.get_doc_podrazdeleniye_title}", style))
objs.append(Paragraph(f"Л/врач: {dir.doc.get_fio()}", style))
objs.append(Spacer(1, 7 * mm))
objs.append(Paragraph("Всего назначено: " + str(len(issledovaniya)), style))
objs.append(Spacer(1, 3 * mm))
objs.append(HRFlowable(width=80 * mm, spaceAfter=3 * mm, spaceBefore=3 * mm, color=colors.black))
objs.append(PageBreak())

doc.build(objs)
Expand Down
9 changes: 9 additions & 0 deletions l2-frontend/src/pages/Stationar/index.vue
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,15 @@
target="_blank"
> 003/у </a>
</div>
<div
class="inner-card"
>
<a
:href="`/forms/pdf?type=106.02&dir_pk=${direction}`"
class="a-under"
target="_blank"
> 530 (003/у) </a>
</div>
<div
v-if="!every"
class="inner-card"
Expand Down

0 comments on commit 7e8060d

Please sign in to comment.