From c47721a42c6e4ec8c1927d4d9e3d208646a14036 Mon Sep 17 00:00:00 2001 From: Tom Price Date: Wed, 21 Jan 2015 16:38:02 +0000 Subject: [PATCH] Untested changes to models and adding a new finance system. Cannot test ATM so will do so ASAP. --- RIGS/finanace.py | 0 RIGS/models.py | 27 +++++++++++++++++++++++++++ 2 files changed, 27 insertions(+) create mode 100644 RIGS/finanace.py diff --git a/RIGS/finanace.py b/RIGS/finanace.py new file mode 100644 index 00000000..e69de29b diff --git a/RIGS/models.py b/RIGS/models.py index 7c7823f2..a7d2d50f 100644 --- a/RIGS/models.py +++ b/RIGS/models.py @@ -278,3 +278,30 @@ class EventCrew(models.Model): run = models.BooleanField(default=False) derig = models.BooleanField(default=False) notes = models.TextField(blank=True, null=True) + + +class Invoice(models.Model): + event = models.OneToOneField('Event') + invoice_date = models.DateField(auto_now_add=True) + void = models.BooleanField() + + + +class Payment(models.Model): + CASH = 'C' + INTERNAL = 'I' + EXTERNAL = 'E' + SUCORE = 'SU' + MEMBERS = 'M' + METHODS = ( + (CASH, 'Cash'), + (INTERNAL, 'Internal'), + (EXTERNAL, 'External'), + (SUCORE, 'SU Core'), + (MEMBERS, 'Members'), + ) + + invoice = models.ForeignKey('Invoice') + date = models.DateField() + amount = models.DecimalField(max_digits=10, decimal_places=2, help_text='Please use ex. VAT') + method = models.CharField(max_length=2, choices=METHODS) \ No newline at end of file