|
|
|
|
@ -16,17 +16,6 @@ def invoice_signal(instance, **kwargs): |
|
|
|
|
|
|
|
|
|
course = Course.objects.get(token=instance.bill.course_token) |
|
|
|
|
|
|
|
|
|
if instance.yandex_pay and instance.method == 'Y' and instance.status == 'P': |
|
|
|
|
msg = EmailMessage( |
|
|
|
|
'Вам выставлен новый счёт', |
|
|
|
|
"""%s для оплаты перейдите по ссылке |
|
|
|
|
%s/api/v1/finance/payment/%s/""" % (instance.get_comment(), settings.DOMAIN, instance.yandex_pay.id), |
|
|
|
|
to=[instance.yandex_pay.cps_email], |
|
|
|
|
bcc=[instance.bill.opener.email], |
|
|
|
|
reply_to=[instance.bill.opener.email], |
|
|
|
|
) |
|
|
|
|
msg.send() |
|
|
|
|
|
|
|
|
|
if instance.status == 'F': |
|
|
|
|
if instance.is_open: |
|
|
|
|
try: |
|
|
|
|
|