From 8fe781bcc3907ee25c6ce633ea80697ff28eb2d5 Mon Sep 17 00:00:00 2001 From: sergei kasianenko Date: Wed, 10 Jul 2024 18:27:54 +0800 Subject: [PATCH] fix HL7 --- ftp_orders/main.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/ftp_orders/main.py b/ftp_orders/main.py index 34a51c0020..6d31e0b2f4 100644 --- a/ftp_orders/main.py +++ b/ftp_orders/main.py @@ -525,7 +525,11 @@ def push_order(self, direction: Napravleniya): else: price_code_value = direction.price_name.symbol_code pv.PV1.PV1_20.value = f"Договор^^{direction.price_name.title}^{price_code_value}" - pv.PV1.PV1_7.value = f"{price_code_value}" + if direction.doc_who_create.podrazdeleniye.oid: + department_code = direction.doc_who_create.podrazdeleniye.oid + else: + department_code = l2_price_code + pv.PV1.PV1_7.value = f"{department_code}" else: pv.PV1.PV1_20.value = "Наличные" pv.PV1.PV1_44.value = direction.data_sozdaniya.strftime("%Y%m%d")