summaryrefslogtreecommitdiff
path: root/design/templates/admin/income_month.html
blob: 125e435a799da75283be874edb5323702d83b541 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
{% extends "admin/base_site.html" %}
{% load i18n admin_urls admin_static %}

{# Admin styling code largely taken from http://www.dmertl.com/blog/?p=116 #}

{% block extrastyle %}
	{{ block.super }}
<script type="text/javascript" src="/admin/jsi18n/"></script>
<script type="text/javascript" src="/static/admin/js/core.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/RelatedObjectLookups.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.js"></script>
<script type="text/javascript" src="/static/admin/js/jquery.init.js"></script>
<script type="text/javascript" src="/static/admin/js/actions.js"></script>
<script type="text/javascript" src="/static/admin/js/calendar.js"></script>
<script type="text/javascript" src="/static/admin/js/admin/DateTimeShortcuts.js"></script>
    <link rel="stylesheet" type="text/css" href="{% static "admin/css/forms.css" %}"/>
    <style>
    .field-title {min-width: 200px;}
    .results {margin-bottom: 4em;}
    </style>
{% endblock %}

{% block bodyclass %}{{ opts.app_label }}-{{ opts.object_name.lower }} change-form{% endblock %}

{% block breadcrumbs %}
    <div class="breadcrumbs">
        <a href="{% url 'admin:index' %}">{% trans 'Home' %}</a>
        &rsaquo; <a href="{% url 'admin:app_list' app_label=opts.app_label %}">{{ app_label|capfirst|escape }}</a>
        &rsaquo; {% if has_change_permission %}<a href="{% url opts|admin_urlname:'changelist' %}">
        {{ opts.verbose_name_plural|capfirst }}</a>{% else %}{{ opts.verbose_name_plural|capfirst }}{% endif %}
    &rsaquo; {% trans 'Income for' %} {{date|date:"F Y"}}
    </div>
{% endblock %}

{% block content_title %}{% endblock %}

{% block content %}
	
<h1>{% trans "Income for the month of" %} {{date|date:"F Y"}}</h1>
<h2>{% trans "Billed" %}</h2>


<div style="float: left; width: 45%">
<div class="results">
<table id="result_list">
<thead>
<tr>

<th scope="col" class="sortable column-title">
   <div class="text"><a href="?o=1">Title</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Amount</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Source</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <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|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>
</tbody>
</table>
</div>

<h2>{% trans "Unbilled" %}</h2>
<div class="results">
<table id="result_list_2">
<thead>
<tr>

<th scope="col" class="sortable column-title">
   <div class="text"><a href="?o=1">Title</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Amount</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Source</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Article status</a></div>
   <div class="clear"></div>
</th>
</tr>
</thead>
<tbody>

{% for gig in unbilled %}

<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.get_status_display}}</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">${{unbilled_total.total_payment}}</td><td class="field-payment_status"></td><td class="field-pub_date nowrap"></td></tr>
</tbody>
</table>
</div>
<h2>{% trans "Total Outstanding:" %} ${{total_outstanding.total_payment}}</h2>
<h4 style="margin-top: 3em;">Also have these stories pitched, but not accepted</h4>
<div class="results">
<table id="result_list_2">
<thead>
<tr>

<th scope="col" class="sortable column-title">
   <div class="text"><a href="?o=1">Title</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Amount</a></div>
   <div class="clear"></div>
</th>
<th scope="col" class="sortable column-status">
   <div class="text"><a href="?o=5">Source</a></div>
   <div class="clear"></div>
</th>
</tr>
</thead>
<tbody>

{% for gig in pitched %}

<tr class="{% cycle 'row1' 'row2' %}"><th class="field-title">{{gig.title}}</th><td class="field-status">${{gig.payment}}</td><td class="field-payment_status">{{gig.publisher}}</td></tr>
{%endfor%}
</tbody>
</table>
</div>

<h2>{% trans "" %} {% with total_outstanding.total_payment|add:"-2000" as underover %}{% if underover > 0 %}${{underover}} more than budget{%else%}Need to generate another ${{underover|cut:"-"}} to cover expenses{%endif%}{%endwith%}</h2>

</div>

<div style="float:left; margin-left: 4em;">
<h3>{% trans "Income by Month" %}</h3>
<ul>{% for month in months %}
<li><a href="?m={{month|date:"Y-m"|slugify}}">{{month|date:"F Y"}}</a></li>
{%endfor%}</ul>
</div>
{% endblock %}