Member payment interface change.
[fsij-members-webapp.git] / membership / models.py
index 5f5bb0c..11424ce 100644 (file)
@@ -54,14 +54,20 @@ class MemberAddress(models.Model):
 class MemberPayment(models.Model):
     member = models.ForeignKey(Member)
     date = models.DateField()
-    fee_year = models.IntegerField() # 9999 means Admission fee
+    #
+    # FEE_YEAR: Financial year to which this payment is connected
+    #           9999 means Admission-fee, 0 means Advance-payment
+    #
+    fee_year = models.IntegerField()
     # member type as of payment time
     member_type = models.CharField(max_length=1, choices=MEMBER_TYPE)
     # contribution as of payment time, valid if member_type == 'A'
     contribution = models.IntegerField() # Kuchi-Suu in Japanese
     le = models.ForeignKey(LedgerEntry, unique=True, blank=True, null=True)
     def __unicode__(self):
-        if self.fee_year == 9999:
+        if self.fee_year == 0:
+            payment_fee_str = u'前受金'
+        elif self.fee_year == 9999:
             payment_fee_str = u'入会金'
         else:
             payment_fee_str = "%04d" % self.fee_year