source: treasury/vouchers/models.py @ 93e2ab9

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

Add time fields to ReimbursementRequest?

  • Property mode set to 100644
File size: 1.2 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)
14    budget_area = models.ForeignKey(BudgetArea)
15    budget_term = models.ForeignKey(BudgetTerm)
16    request_time = models.DateTimeField(default=datetime.datetime.now)
17    approval_time = models.DateTimeField(blank=True)
18    printing_time = models.DateTimeField(blank=True)
19
20    def __unicode__(self, ):
21        return "%s (%s) (by %s) for $%s in %s during %s" % (
22            self.check_to_name,
23            self.check_to_email,
24            self.submitter,
25            self.amount,
26            self.budget_area.name,
27            self.budget_term.name,
28        )
Note: See TracBrowser for help on using the repository browser.