|
|
|
@ -147,7 +147,7 @@ class InvoiceDetailView(APIView): |
|
|
|
|
|
|
|
|
|
|
|
invoice.price = price |
|
|
|
invoice.price = price |
|
|
|
invoice.is_open = is_open |
|
|
|
invoice.is_open = is_open |
|
|
|
invoice.comment = comment if comment else None |
|
|
|
invoice.comment = comment |
|
|
|
|
|
|
|
|
|
|
|
if invoice.method == 'Y' and invoice.yandex_pay is None: |
|
|
|
if invoice.method == 'Y' and invoice.yandex_pay is None: |
|
|
|
yandex_pay = Payment.objects.create( |
|
|
|
yandex_pay = Payment.objects.create( |
|
|
|
@ -175,7 +175,7 @@ class InvoiceDetailView(APIView): |
|
|
|
text_content = plaintext.render(context) |
|
|
|
text_content = plaintext.render(context) |
|
|
|
html_content = html.render(context) |
|
|
|
html_content = html.render(context) |
|
|
|
|
|
|
|
|
|
|
|
msg = EmailMultiAlternatives(subject, text_content, from_email, [to], bcc=['dmitry.dolya@skillbox.ru'],) |
|
|
|
msg = EmailMultiAlternatives(subject, text_content, from_email, [to], bcc=['dmitry.dolya@skillbox.ru']) |
|
|
|
msg.attach_alternative(html_content, "text/html") |
|
|
|
msg.attach_alternative(html_content, "text/html") |
|
|
|
msg.send() |
|
|
|
msg.send() |
|
|
|
|
|
|
|
|
|
|
|
|