Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/softwaresaved/lowfat
Browse files Browse the repository at this point in the history
  • Loading branch information
gperu committed Oct 10, 2024
2 parents 2688922 + 8f7f067 commit 19279bf
Show file tree
Hide file tree
Showing 18 changed files with 512 additions and 13 deletions.
409 changes: 409 additions & 0 deletions docs/commits.since.v1.19.0.txt

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lowfat/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,7 @@ class ClaimantAdmin(ExportMixin, SimpleHistoryAdmin):
"attended_inaugural_meeting",
"attended_collaborations_workshop",
"notes_from_admin",
"supplier_number",
],
},
),
Expand All @@ -161,7 +162,7 @@ class ClaimantAdmin(ExportMixin, SimpleHistoryAdmin):
'affiliation',
'funding',
'funding_notes',
'work_description'
'work_description',
]
list_filter = [
'fellow',
Expand Down
3 changes: 2 additions & 1 deletion lowfat/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,7 +308,7 @@ class Meta:
'budget_request_venue_hire': "Venue hire",
'budget_request_catering': "Catering",
'budget_request_others': "Other costs",
'direct_invoice': "Will expenses related to this request need to be claimed directly via an invoice from your institution or supplier and the Institute?",
'direct_invoice': "Will expenses related to this request require a purchase order?",
'justification': "For requests from individual £3000 Fellowship awards, please justify how this activity is in scope of your proposed Fellowship plans or how it furthers your goals for the Fellowship. For requests from the communal pot of funding, please justify how this activity supports the goals of the Institute (https://software.ac.uk/about). For requests relating to a Fellows Inaugural Meeting or Collaborations Workshop, please give a brief justification for the request.",
'success_targeted': "Please specify what outputs (what may be produced) and outcomes (what change it could lead to) are likely to be produced from your participation in this event. These can include learning goals being met, collaborations, reports etc.",
'additional_info': "Please specify details and breakdown of the costs. For example, indicating the mode(s) of travel and its associated cost. You can also add any other additional information here.",
Expand Down Expand Up @@ -413,6 +413,7 @@ def __init__(self, *args, **kwargs):
disabled=True,
value=0.00
),
HTML('<h2>Is a Purchase Order Required?</h2><p>If the payment is for a third-party organisation or individual, a purchase order (PO) may be required. If a PO is required, this must be raised <b>before</b> the event takes place.</p><p>For us to raise a PO, we need to know who we are paying (name/address etc.), what we are buying and how much it is going to cost e.g. Catering for an event on 28th May for 20 people, costing £160 plus VAT, provided by XYZ Catering.</p><p>If the supplier already exists on our system, there should be minimal delay in getting the PO issued. If the supplier is a new supplier, the accounts payable team will contact the supplier for additional information, and it can take up to 3 months for the PO to be issued.</p><p>If you are paying an individual to reimburse their out-of-pocket expenses, this is done after the event using a simple claim form, but <b>you</b> need to upload the claim form onto lowFAT as it will be offset against your funding request. It can take up to six weeks for these expenses to be reimbursed.</p><p>If you are paying an individual for their time e.g. 3 hours at £30 per hour to provide training or a workshop, this is treated by the University of Edinburgh as an appointment or engagement and requires an Employment Status Check to be completed <b>before</b> any work is started. It can take up to 3 months for the Employment Status Check to be completed. Any work undertaken before these checks are completed will not be paid. The way the payment is made depends on the outcome of these checks. The person undertaking this work will be required to have registered with HMRC for self assessment tax and must be able to provide a Unique Tax Reference No (UTR). Again, <b>you</b> should upload the claim form to lowFAT as it will be offset against your funding request.</p><p><b>Please make sure you tick the box below if a purchase order may be required</b></p>'),
'direct_invoice',
HTML('<h2>Justification for attending or organising the event</h2><p>When filling in the questions below please consider the following points:</p><ul><li>For attending conferences/workshops: will the conference focus on a significant field, will you meet significant researchers, will there be a focus on research software?</li><li>For organising workshops: how will the event help your domain, how will the event help the Institute, how will the event help you?</li><li>For policy related work: how might participation or organisation help the policy goals of the Institute, such as improving software and improved research (this can include people and tools perspectives)?</li><li>For other: please state reasons - note it may be good to discuss with the Institute Community Team before filling the form to make sure the rationale is aligned to the Institute and to your own objectives.</li></ul>'),
HTML('<h4>Justification</h4>'),
Expand Down
54 changes: 54 additions & 0 deletions lowfat/migrations/0160_alter_claimant_application_year_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Generated by Django 4.2 on 2024-07-18 15:49

import datetime
from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('lowfat', '0159_auto_20230824_1428'),
]

operations = [
migrations.AlterField(
model_name='claimant',
name='application_year',
field=models.IntegerField(default=2024),
),
migrations.AlterField(
model_name='claimant',
name='inauguration_grant_expiration',
field=models.DateField(default=datetime.date(2026, 3, 31)),
),
migrations.AlterField(
model_name='expense',
name='status',
field=models.CharField(choices=[('S', 'Submitted'), ('C', 'Processing'), ('A', 'Approved'), ('R', 'Rejected'), ('X', 'Removed')], default='S', max_length=1),
),
migrations.AlterField(
model_name='fund',
name='status',
field=models.CharField(choices=[('U', 'Unprocessed'), ('P', 'Processing'), ('A', 'Approved'), ('M', 'Approved by machine'), ('R', 'Rejected'), ('F', 'Archived'), ('C', 'Cancelled'), ('X', 'Removed')], default='U', max_length=1),
),
migrations.AlterField(
model_name='historicalclaimant',
name='application_year',
field=models.IntegerField(default=2024),
),
migrations.AlterField(
model_name='historicalclaimant',
name='inauguration_grant_expiration',
field=models.DateField(default=datetime.date(2026, 3, 31)),
),
migrations.AlterField(
model_name='historicalexpense',
name='status',
field=models.CharField(choices=[('S', 'Submitted'), ('C', 'Processing'), ('A', 'Approved'), ('R', 'Rejected'), ('X', 'Removed')], default='S', max_length=1),
),
migrations.AlterField(
model_name='historicalfund',
name='status',
field=models.CharField(choices=[('U', 'Unprocessed'), ('P', 'Processing'), ('A', 'Approved'), ('M', 'Approved by machine'), ('R', 'Rejected'), ('F', 'Archived'), ('C', 'Cancelled'), ('X', 'Removed')], default='U', max_length=1),
),
]
23 changes: 23 additions & 0 deletions lowfat/migrations/0161_claimant_supplier_number_and_more.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 4.2 on 2024-08-30 15:25

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('lowfat', '0160_alter_claimant_application_year_and_more'),
]

operations = [
migrations.AddField(
model_name='claimant',
name='supplier_number',
field=models.CharField(blank=True, max_length=120),
),
migrations.AddField(
model_name='historicalclaimant',
name='supplier_number',
field=models.CharField(blank=True, max_length=120),
),
]
4 changes: 4 additions & 0 deletions lowfat/models/claimant.py
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,10 @@ class Meta:
null=True,
blank=True
)
supplier_number = models.CharField(
max_length=MAX_CHAR_LENGTH,
blank=True
)

# Application
screencast_url = models.CharField(
Expand Down
2 changes: 1 addition & 1 deletion lowfat/models/expense.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
('C', 'Processing'),
('A', 'Approved'),
('R', 'Rejected'), # When expense was rejected.
('X', 'Remove'), # When the fellow decided to remove their request.
('X', 'Removed'), # When the fellow decided to remove their request.
)

GRANT_HEADING = (
Expand Down
3 changes: 2 additions & 1 deletion lowfat/models/fund.py
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@
('R', 'Rejected'), # Fund was rejected.
('F', 'Archived'), # Approved funds with all claims and blog posts were processed. No funds are reserved.
('C', 'Cancelled'), # When the fellow decided to cancel their request.
('X', 'Remove'), # When the fellow decided to remove their request.
('X', 'Removed'), # When the fellow decided to remove their request.
)

#: Set of statuses which constitute an approved fund
Expand All @@ -64,6 +64,7 @@
'R': "Your fund request was declided.",
'F': "We archived your fund request since all the expense claims were processed.",
'C': "You decided to cancel this request for any reason.",
'X': "You decided to remove this request.",
}

GRANT_HEADING = (
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/blog_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ <h1>Blog Detail (Funding Request ID: {{ blog.fund.id }})
{% endif %}
{% if user.is_staff or blog.status == "U" %}
<a title="Edit" class="btn btn-outline-dark" href="{% url 'blog_edit' blog.id %}" role="button"><span class="fa-solid fa-edit" aria-hidden="true"></span> Edit</a>
<a title="Remove" class="btn btn-outline-dark" href="{% url 'blog_remove' blog.id %}?next={% url 'dashboard' %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a>
{% comment %} <a title="Remove" class="btn btn-outline-dark" href="{% url 'blog_remove' blog.id %}?next={% url 'dashboard' %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a> {% endcomment %}
{% endif %}
{% endif %}
</h1>
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/blog_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ <h1>
{% endif %}
{% if user.is_staff %}
<a title="Edit" class="btn btn-outline-dark" href="{% url 'blog_edit' blog.id %}" role="button"><span class="fa-solid fa-edit" aria-hidden="true"></span> Edit</a>
<a title="Remove" class="btn btn-outline-dark" href="{% url 'blog_remove' blog.id %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a>
{% comment %} <a title="Remove" class="btn btn-outline-dark" href="{% url 'blog_remove' blog.id %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a> {% endcomment %}
{% endif %}
</h1>
<iframe class="blog-review-html" src="{{ blog.draft_url }}">
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/blogs.html
Original file line number Diff line number Diff line change
Expand Up @@ -146,7 +146,7 @@ <h2>
{% endif %}
{% if user.is_staff or blog.status == "U" %}
<a title="Edit" href="{% url 'blog_edit' blog.id %}"><span class="fa-solid fa-edit" aria-hidden="true"></span></a>
<a title="Remove" href="{% url 'blog_remove' blog.id %}?next={{ request.path }}"><span class="fa-solid fa-remove" aria-hidden="true"></span></a>
{% comment %} <a title="Remove" href="{% url 'blog_remove' blog.id %}?next={{ request.path }}"><span class="fa-solid fa-remove" aria-hidden="true"></span></a> {% endcomment %}
{% endif %}
</td>
{% endif %}
Expand Down
6 changes: 6 additions & 0 deletions lowfat/templates/lowfat/claimant_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ <h1>
<td>{{ claimant.work_description | markdown | safe }}</td>
</tr>
{% endif %}
{% if user.is_staff or claimant and user == claimant.user %}
<tr>
<th>Supplier Number</th>
<td>{{ claimant.supplier_number | markdown | safe }}</td>
</tr>
{% endif %}
</table>
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/expense_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ <h1>Expense Detail (Funding Request ID: {{ expense.fund.id }})
{% endif %}
{% if user.is_staff or expense.status in "SC" %}
<a title="Edit" class="btn btn-outline-dark" href="{% url 'expense_edit_relative' expense.fund.id expense.relative_number %}"><span class="fa-solid fa-edit" aria-hidden="true"></span> Edit</a>
<a title="Remove" class="btn btn-outline-dark" href="{% url 'expense_remove_relative' expense.fund.id expense.relative_number %}?next={% url 'dashboard' %}"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a>
{% comment %} <a title="Remove" class="btn btn-outline-dark" href="{% url 'expense_remove_relative' expense.fund.id expense.relative_number %}?next={% url 'dashboard' %}"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a> {% endcomment %}
{% endif %}
{% endif %}
</h1>
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/expense_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ <h1>
{% if user.is_staff %}
<a title="View" class="btn btn-outline-dark" href="{% url 'expense_detail_relative' expense.fund.id expense.relative_number %}" role="button"><span class="fa-solid fa-eye" aria-hidden="true"></span> View</a>
<a title="Edit" class="btn btn-outline-dark" href="{% url 'expense_edit_relative' expense.fund.id expense.relative_number %}" role="button"><span class="fa-solid fa-edit" aria-hidden="true"></span> Edit</a>
<a title="Remove" class="btn btn-outline-dark" href="{% url 'expense_remove_relative' expense.fund.id expense.relative_number %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a>
{% comment %} <a title="Remove" class="btn btn-outline-dark" href="{% url 'expense_remove_relative' expense.fund.id expense.relative_number %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a> {% endcomment %}
{% endif %}
</h1>

Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/expenses.html
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ <h2>
{% endif %}
{% if user.is_staff or expense.status in "SC" %}
<a title="Edit" href="{% url 'expense_edit_relative' expense.fund.id expense.relative_number %}"><span class="fa-solid fa-edit" aria-hidden="true"></span></a>
<a title="Remove" href="{% url 'expense_remove_relative' expense.fund.id expense.relative_number %}?next={{ request.path }}"><span class="fa-solid fa-remove" aria-hidden="true"></span></a>
{% comment %} <a title="Remove" href="{% url 'expense_remove_relative' expense.fund.id expense.relative_number %}?next={{ request.path }}"><span class="fa-solid fa-remove" aria-hidden="true"></span></a> {% endcomment %}
</td>
{% endif %}
{% endif %}
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/fund_detail.html
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ <h1>Funding request #{{ fund.id }}
{% endif %}
{% if user.is_staff or fund.status in "UP" %}
<a title="Edit" class="btn btn-outline-dark" href="{% url 'fund_edit' fund.id %}"><span class="fa-solid fa-edit" aria-hidden="true"></span> Edit</a>
<a title="Remove" class="btn btn-outline-dark" href="{% url 'fund_remove' fund.id %}?next={% url 'dashboard' %}"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a>
{% comment %} <a title="Remove" class="btn btn-outline-dark" href="{% url 'fund_remove' fund.id %}?next={% url 'dashboard' %}"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a> {% endcomment %}
{% endif %}
{% endif %}
</h1>
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/fund_review.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ <h1>
{% if user.is_staff %}
<a title="View" class="btn btn-outline-dark" href="{% url 'fund_detail' fund.id %}" role="button"><span class="fa-solid fa-eye" aria-hidden="true"></span> View</a>
<a title="Edit" class="btn btn-outline-dark" href="{% url 'fund_edit' fund.id %}" role="button"><span class="fa-solid fa-edit" aria-hidden="true"></span> Edit</a>
<a title="Remove" class="btn btn-outline-dark" href="{% url 'fund_remove' fund.id %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a>
{% comment %} <a title="Remove" class="btn btn-outline-dark" href="{% url 'fund_remove' fund.id %}" role="button"><span class="fa-solid fa-remove" aria-hidden="true"></span> Remove</a> {% endcomment %}
{% endif %}
</h1>
{% if fund.access_token %}
Expand Down
2 changes: 1 addition & 1 deletion lowfat/templates/lowfat/funds.html
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@
{% endif %}
{% if user.is_staff or fund.status in "UP" %}
<a title="Edit" href="{% url 'fund_edit' fund.id %}"><span class="fa-solid fa-edit" aria-hidden="true"></span></a>
<a title="Remove" href="{% url 'fund_remove' fund.id %}?next={{ request.path }}"><span class="fa-solid fa-remove" aria-hidden="true"></span></a>
{% comment %} <a title="Remove" href="{% url 'fund_remove' fund.id %}?next={{ request.path }}"><span class="fa-solid fa-remove" aria-hidden="true"></span></a> {% endcomment %}
{% endif %}
</td>
{% endif %}
Expand Down

0 comments on commit 19279bf

Please sign in to comment.