source: remit/vouchers/models.py @ 2ff0d60

client
Last change on this file since 2ff0d60 was 92ca60e, checked in by Alex Dehnert <adehnert@…>, 15 years ago

Rename treasury to remit

  • Property mode set to 100644
File size: 2.2 KB
Line 
1from django.db import models
2import settings
3from finance_core.models import BudgetArea, BudgetTerm
4
5import datetime
6
7APPROVAL_STATES = (
8    ( 0, 'None'),
9    ( 1, 'Approved'),
10    (-1, 'Rejected'),
11)
12
13class ReimbursementRequest(models.Model):
14    submitter = models.CharField(max_length=10) # MIT username of submitter
15    check_to_name = models.CharField(max_length=50, verbose_name="check recipient's name")
16    check_to_email = models.EmailField(verbose_name="email address for check pickup")
17    check_to_addr = models.TextField(blank=True, verbose_name="address for check mailing", help_text="For most requests, this should be blank for pickup in SAO (W20-549)")
18    amount = models.DecimalField(max_digits=7, decimal_places=2, help_text='Do not include "$"')
19    budget_area = models.ForeignKey(BudgetArea, related_name='as_budget_area')
20    budget_term = models.ForeignKey(BudgetTerm)
21    expense_area = models.ForeignKey(BudgetArea, related_name='as_expense_area') # ~GL
22    request_time = models.DateTimeField(default=datetime.datetime.now)
23    approval_time = models.DateTimeField(blank=True, null=True,)
24    approval_status = models.IntegerField(default=0, choices=APPROVAL_STATES)
25    printing_time = models.DateTimeField(blank=True, null=True,)
26    name = models.CharField(max_length=50, verbose_name='short description', )
27    description = models.TextField(blank=True, verbose_name='long description', )
28
29    def __unicode__(self, ):
30        return "%s: %s (%s) (by %s) for $%s in %s during %s" % (
31            self.name,
32            self.check_to_name,
33            self.check_to_email,
34            self.submitter,
35            self.amount,
36            self.budget_area.name,
37            self.budget_term.name,
38        )
39
40
41class Voucher(models.Model):
42    group_name = models.CharField(max_length=10)
43    account = models.IntegerField()
44    signatory = models.CharField(max_length=50)
45    first_name = models.CharField(max_length=20)
46    last_name = models.CharField(max_length=20)
47    email_address = models.EmailField(max_length=50)
48    mailing_address = models.TextField()
49    amount = models.DecimalField(max_digits=7, decimal_places=2,)
50    description = models.TextField()
51    gl = models.IntegerField()
Note: See TracBrowser for help on using the repository browser.