help_text='The camp to which this revenue belongs',
)
user=models.ForeignKey(
'auth.User',
on_delete=models.PROTECT,
related_name='revenues',
help_text='The user who submitted this revenue',
)
amount=models.DecimalField(
decimal_places=2,
max_digits=12,
help_text='The amount of this revenue in DKK. Must match the amount on the documentation uploaded below.',
)
description=models.CharField(
max_length=200,
help_text='A short description of this revenue. Please keep it meningful as it helps the Economy team a lot when categorising revenue. 200 characters or fewer.',
)
invoice=models.ImageField(
help_text='The invoice file for this revenue. Please make sure the amount on the invoice matches the amount you entered above. All common image formats are accepted, as well as PDF.',
upload_to='revenues/',
)
invoice_fk=models.ForeignKey(
'shop.Invoice',
on_delete=models.PROTECT,
related_name='revenues',
help_text='The Invoice object to which this Revenue object relates. Can be None if this revenue does not have a related BornHack Invoice.',
blank=True,
null=True,
)
responsible_team=models.ForeignKey(
'teams.Team',
on_delete=models.PROTECT,
related_name='revenues',
help_text='The team to which this revenue belongs. When in doubt pick the Economy team.'
)
approved=models.NullBooleanField(
default=None,
help_text='True if this Revenue has been approved by the responsible team. False if it has been rejected. Blank if noone has decided yet.'
)
notes=models.TextField(
blank=True,
help_text='Economy Team notes for this revenue. Only visible to the Economy team and the submitting user.'
)
defclean(self):
ifself.amount<0:
raiseValidationError('Amount of a Revenue object can not be negative')
help_text='A short description of this expense. Please keep it meningful as it helps the Economy team a lot when categorising expenses. 200 characters or fewer.',
)
paid_by_bornhack=models.BooleanField(
default=True,
help_text="Leave checked if this expense was paid by BornHack. Uncheck if you need a reimbursement for this expense.",
)
invoice=models.ImageField(
help_text='The invoice for this expense. Please make sure the amount on the invoice matches the amount you entered above. All common image formats are accepted.',
upload_to='expenses/',
)
responsible_team=models.ForeignKey(
'teams.Team',
on_delete=models.PROTECT,
related_name='expenses',
help_text='The team to which this Expense belongs. A team responsible will need to approve the expense. When in doubt pick the Economy team.'
)
approved=models.NullBooleanField(
default=None,
help_text='True if this expense has been approved by the responsible team. False if it has been rejected. Blank if noone has decided yet.'
)
reimbursement=models.ForeignKey(
'economy.Reimbursement',
on_delete=models.PROTECT,
related_name='expenses',
null=True,
blank=True,
help_text='The reimbursement for this expense, if any. This is a dual-purpose field. If expense.paid_by_bornhack is true then expense.reimbursement references the reimbursement which this expense is created to cover. If expense.paid_by_bornhack is false then expense.reimbursement references the reimbursement which reimbursed this expense.'
)
notes=models.TextField(
blank=True,
help_text='Economy Team notes for this expense. Only visible to the Economy team and the submitting user.'