summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/income/models.py5
-rw-r--r--design/templates/admin/income_month.html8
2 files changed, 11 insertions, 2 deletions
diff --git a/app/income/models.py b/app/income/models.py
index 670b0a5..59c73cd 100644
--- a/app/income/models.py
+++ b/app/income/models.py
@@ -1,3 +1,4 @@
+import datetime
from django.db import models
from django.utils import timezone
@@ -37,3 +38,7 @@ class Gig(models.Model):
def __str__(self):
return self.title
+
+ def get_pay_date(self):
+ days = self.publisher.payment_time * 7
+ return self.invoice_date + datetime.timedelta(float(days))
diff --git a/design/templates/admin/income_month.html b/design/templates/admin/income_month.html
index ce500a8..125e435 100644
--- a/design/templates/admin/income_month.html
+++ b/design/templates/admin/income_month.html
@@ -40,7 +40,7 @@
<h2>{% trans "Billed" %}</h2>
-<div style="float: left; width: 40%">
+<div style="float: left; width: 45%">
<div class="results">
<table id="result_list">
<thead>
@@ -62,13 +62,17 @@
<div class="text"><a href="?o=5">Date Invoiced</a></div>
<div class="clear"></div>
</th>
+<th scope="col" class="sortable column-status">
+ <div class="text"><a href="?o=5">Expected Pay Date</a></div>
+ <div class="clear"></div>
+</th>
</tr>
</thead>
<tbody>
{% for gig in billed %}
-<tr class="{% cycle 'row1' 'row2' %}"><th class="field-title"><a href="/admin/income/gig/{{gig.pk}}/">{{gig.title}}</a></th><td class="field-status">${{gig.payment}}</td><td class="field-payment_status">{{gig.publisher}}</td><td class="field-pub_date nowrap">{{gig.invoice_date}}</td></tr>
+<tr class="{% cycle 'row1' 'row2' %}"><th class="field-title"><a href="/admin/income/gig/{{gig.pk}}/">{{gig.title}}</a></th><td class="field-status">${{gig.payment}}</td><td class="field-payment_status">{{gig.publisher}}</td><td class="field-pub_date nowrap">{{gig.invoice_date|date:"M d, Y"}}</td><td class="field-payment_status">{{gig.get_pay_date|date:"M d, Y"}}</td></tr>
{%endfor%}
<tr class="row2"><th class="field-title">&nbsp;</th><td class="field-status"></td><td class="field-payment_status"></td><td class="field-pub_date nowrap"></td></tr>
<tr class="row2"><th class="field-title">Total Billed:</th><td class="field-status">${{billed_total.total_payment}}</td><td class="field-payment_status"></td><td class="field-pub_date nowrap"></td></tr>