Skip to content

Commit

Permalink
Merge pull request #3438 from mikhailprivalov/fix-get-biomat
Browse files Browse the repository at this point in the history
Прием биоматериала - fixы
  • Loading branch information
urchinpro authored Jan 26, 2024
2 parents 6bb9445 + 345bcb5 commit 6e5dee9
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions api/directions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -3628,8 +3628,9 @@ def tubes_register_get(request):
if issledovanie_in_tube:
all_issledovania = Issledovaniya.objects.filter(napravleniye_id=issledovanie_in_tube.napravleniye_id)
for issledovanie in all_issledovania:
issledovanie.tubes.add(val.pk)
issledovanie.save()
if len(issledovanie.tubes.all()) == 0:
issledovanie.tubes.add(val.pk)
issledovanie.save()
if not val.doc_get and not val.time_get:
val.set_get(request.user.doctorprofile)
get_details[pk] = val.get_details()
Expand Down
5 changes: 3 additions & 2 deletions directions/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -964,7 +964,7 @@ def print_history(request):
research_tmp = research_tmp[0 : -(len(research_tmp) - 38)] + "..."
tmp.append(Paragraph(research_tmp, styleSheet["BodyText"]))
if shownum:
bcd = createBarcodeDrawing('Code128', value=obj["tube_id"], humanReadable=0, barHeight=5 * mm, barWidth=0.7)
bcd = createBarcodeDrawing('Code128', value=obj["tube_id"], humanReadable=0, barHeight=3.1 * mm, barWidth=0.7)
tmp.append(bcd)

data.append(tmp)
Expand All @@ -985,9 +985,10 @@ def print_history(request):
)
for span in merge_list: # Цикл объединения ячеек
for pos in range(0, 6):

style.add('INNERGRID', (pos, merge_list[span][0]), (pos, merge_list[span][0] + len(merge_list[span])), 0.28, colors.white)
style.add('BOX', (pos, merge_list[span][0]), (pos, merge_list[span][0] + len(merge_list[span])), 0.2, colors.black)
t = Table(data, colWidths=[int(tw * 0.03), int(tw * 0.21), int(tw * 0.1), int(tw * 0.23), int(tw * 0.29), int(tw * 0.17)], style=style)
t = Table(data, colWidths=[int(tw * 0.03), int(tw * 0.21), int(tw * 0.1), int(tw * 0.23), int(tw * 0.33), int(tw * 0.13)], style=style)

t.canv = c
wt, ht = t.wrap(0, 0)
Expand Down

0 comments on commit 6e5dee9

Please sign in to comment.