]> git.parisson.com Git - teleforma.git/commitdiff
Second hotfix for fake option Aucune
authorGael Le Mignot <gael@pilotsystems.net>
Mon, 18 May 2020 08:51:46 +0000 (10:51 +0200)
committerGael Le Mignot <gael@pilotsystems.net>
Mon, 18 May 2020 08:51:46 +0000 (10:51 +0200)
teleforma/views/crfpa.py

index b463ddf4f93e71070a049e9e1a2c0b176d4d77a3..7497970a943aebb6ec0fdc1953ca3f898a0ee331 100644 (file)
@@ -677,14 +677,16 @@ class ReceiptPDFView(PDFTemplateResponseMixin, TemplateView):
                                                                 period.date_begin.strftime('%d/%m/%Y'),
                                                                 period.date_end.strftime('%d/%m/%Y'),)
 
-        if student.oral_1:
+        oral_1 = student.oral_1 and student.oral_1.title != 'Aucune'
+        
+        if oral_1:
             substract += ORAL_OPTION_PRICE            
         
         items.append({ 'label': label,
                        'unit_price': student.total_fees - substract - student.total_discount,
                        'amount': 1,
                        'discount': student.total_discount, }, )
-        if student.oral_1 and student.oral_1.title != 'Aucune':
+        if oral_1:
             items.append({ 'label': "<b>Option langue</b>",
                            'unit_price': ORAL_OPTION_PRICE,
                            'amount': 1,