From d33d9947463669c58c9c45a5e7f27f3974772c3b Mon Sep 17 00:00:00 2001 From: houssine Date: Tue, 27 Mar 2018 21:29:31 +0200 Subject: [PATCH] [IMP] send just the certificate for the eligible subscription --- .../models/tax_shelter_declaration.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py index 0951b6c..a7cf496 100644 --- a/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py +++ b/easy_my_coop_taxshelter_report/models/tax_shelter_declaration.py @@ -140,9 +140,9 @@ class TaxShelterCertificate(models.Model): def generate_certificates_report(self): attachments = [] - if self.total_amount_subscribed > 0: - if self.total_amount_resold == 0 and self.total_amount_transfered == 0: - attachments.append(self.generate_pdf_report('subscription')) + if self.total_amount_eligible > 0: + #if self.total_amount_resold == 0 and self.total_amount_transfered == 0: + attachments.append(self.generate_pdf_report('subscription')) if self.total_amount_previously_subscribed > 0: attachments.append(self.generate_pdf_report('shares')) #if self.total_amount_resold > 0 or self.total_amount_transfered > 0: