source: treasury/vouchers/models.py @ 1732748

client
Last change on this file since 1732748 was 31bd056, checked in by Alex Dehnert <adehnert@…>, 16 years ago

Add voucher support (WIP WIP WIP)

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