Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
urchinpro committed May 3, 2024
1 parent a6a59bc commit 010ad37
Showing 1 changed file with 4 additions and 13 deletions.
17 changes: 4 additions & 13 deletions api/contracts/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
from directions.models import Issledovaniya
from directory.models import Researches
from laboratory.decorators import group_required
from statistic.sql_func import statistics_research_by_hospital_for_external_orders
from utils.response import status_response


Expand Down Expand Up @@ -57,14 +56,6 @@ def confirm_billing(request):
return JsonResponse({"ok": is_confirm_billing and set_billing_id_for_iss and raw_document_pk})


@login_required
@group_required("Счет: проект")
def get_data_for_confirmed_billing(request):
body = json.loads(request.body)
billing_id = body.get("billingId")
return JsonResponse({"ok": True})


@login_required
@group_required("Счет: проект")
def change_visibility_research(request):
Expand All @@ -77,8 +68,8 @@ def change_visibility_research(request):
@group_required("Счет: проект")
def get_billings(request):
request_data = json.loads(request.body)
hospital_id = request_data.get('hospitalId')
company_id = request_data.get('companyId')
hospital_id = request_data.get("hospitalId")
company_id = request_data.get("companyId")
result = BillingRegister.get_billings(hospital_id, company_id)
return JsonResponse({"result": result})

Expand All @@ -87,9 +78,9 @@ def get_billings(request):
@group_required("Счет: проект")
def get_billing(request):
request_data = json.loads(request.body)
billing_id = request_data.get('billingId')
billing_id = request_data.get("billingId")
result = BillingRegister.get_billing(billing_id)
type_price = request_data.get("typeCompany")
data = researches_for_billing(type_price, result["hospitalId"], result["dateStart"], result["dateEnd"])
data = researches_for_billing(type_price, result["hospitalId"], result["dateStart"], result["dateEnd"])
structure_data = structure_table(data)
return JsonResponse({"result": result, **structure_data})

0 comments on commit 010ad37

Please sign in to comment.