|
|
|
|
@ -95,6 +95,7 @@ class InvoiceDetailView(APIView): |
|
|
|
|
method = request.JSON.get('method', None) |
|
|
|
|
status = request.JSON.get('status', None) |
|
|
|
|
price = request.JSON.get('price', None) |
|
|
|
|
comment = request.JSON.get('comment', None) |
|
|
|
|
real_price = request.JSON.get('real_price', None) |
|
|
|
|
|
|
|
|
|
if bill_id is None: |
|
|
|
|
@ -136,6 +137,7 @@ class InvoiceDetailView(APIView): |
|
|
|
|
invoice.real_price = None |
|
|
|
|
invoice.method = method |
|
|
|
|
invoice.status = status |
|
|
|
|
|
|
|
|
|
if invoice.status == "F": |
|
|
|
|
invoice.real_price = invoice.real_price if real_price is None else real_price |
|
|
|
|
|
|
|
|
|
@ -145,6 +147,7 @@ class InvoiceDetailView(APIView): |
|
|
|
|
|
|
|
|
|
invoice.price = price |
|
|
|
|
invoice.is_open = is_open |
|
|
|
|
invoice.comment = comment if comment else None |
|
|
|
|
|
|
|
|
|
if invoice.method == 'Y' and invoice.yandex_pay is None: |
|
|
|
|
yandex_pay = Payment.objects.create( |
|
|
|
|
|