def send_receipt(cls, email, year):
Contact = apps.get_model('messaging', 'Contact')
Funding = apps.get_model('funding', 'Funding')
+ BillingAgreement = apps.get_model('paypal', 'BillingAgreement')
payments = []
try:
'amount': order.get_amount(),
})
+ for ba in BillingAgreement.objects.filter(schedule__email=email):
+ payments.extend(ba.get_donations(year))
+
fundings = Funding.objects.filter(
email=email,
payed_at__year=year
})
message = EmailMessage(
- f'Odlicz od podatku swoje darowizny przekazane dla Wolnych Lektur',
+ 'Odlicz darowiznÄ™ na Wolne Lektury od podatku',
template.loader.render_to_string('club/receipt_email.txt', ctx),
settings.CONTACT_EMAIL, [email]
)