]> git.parisson.com Git - teleforma.git/commitdiff
Merge branch 'master' of git.parisson.com:git/teleforma
authorYoan Le Clanche <yoan@ellington.pilotsystems.net>
Thu, 1 Feb 2018 11:10:30 +0000 (12:10 +0100)
committerYoan Le Clanche <yoan@ellington.pilotsystems.net>
Thu, 1 Feb 2018 11:10:30 +0000 (12:10 +0100)
Conflicts:
teleforma/views/crfpa.py

1  2 
teleforma/views/crfpa.py

index 55e554da65464a2947e0479df4343fb1361603c9,90ea5bd5dc450da67834220775baa9c74d3e3bd0..40e4359de51e85321eb5b2851f851cee46a01776
@@@ -242,35 -242,30 +242,33 @@@ class UserXLSBook(object)
                  student = Student.objects.get(user=user)
                  if profile:
                      profile = Profile.objects.get(user=user)
 -                    row.write(10, profile.address)
 -                    row.write(11, profile.address_detail)
 -                    row.write(12, profile.postal_code)
 -                    row.write(13, profile.city)
 -                    row.write(14, profile.telephone)
 +                    row.write(8, profile.address)
 +                    row.write(9, profile.address_detail)
 +                    row.write(10, profile.postal_code)
 +                    row.write(11, profile.city)
 +                    row.write(12, profile.telephone)
 +                    if profile.birthday:
 +                        row.write(13, profile.birthday.strftime("%d/%m/%Y"))
 +
 +                    row.write(14, student.level)
-                     row.write(15, profile.telephone)
 +
                      if student.date_subscribed:
-                         row.write(16, student.date_subscribed.strftime("%d/%m/%Y"))
+                         row.write(15, student.date_subscribed.strftime("%d/%m/%Y"))
  
                  if student.training:
                      training = student.training
                  else:
                      training = student.trainings.all()[0]
++                row.write(16, student.total_discount)
++                row.write(17, ', '.join([discount.description for discount in student.discounts.all()]))
  
 -                row.write(16, training.cost)
--                row.write(17, student.total_discount)
--                row.write(18, ', '.join([discount.description for discount in student.discounts.all()]))
--
--                row.write(19, student.total_payments)
--                row.write(20, student.total_fees)
--                row.write(21, student.balance)
--                row.write(22, student.total_paybacks)
++                row.write(18, student.total_payments)
++                row.write(19, student.total_fees)
++                row.write(20, student.balance)
++                row.write(21, student.total_paybacks)
  
                  payments = student.payments.all()
--                i = 23
++                i = 22
                  for month in months_choices:
                      payment = payments.filter(month=month[0])
                      if payment: