From a37a92d9db3ff3b7c8fbd3f17bf5956852b09e5b Mon Sep 17 00:00:00 2001 From: Sam Dudley Date: Tue, 19 Nov 2024 10:21:51 +0000 Subject: [PATCH] wip --- .../0007_data_test_multiple_concurrent.py | 25 ------------------- payroll/models.py | 5 ++-- payroll/services/payroll.py | 1 + 3 files changed, 4 insertions(+), 27 deletions(-) delete mode 100644 gifthospitality/migrations/0007_data_test_multiple_concurrent.py diff --git a/gifthospitality/migrations/0007_data_test_multiple_concurrent.py b/gifthospitality/migrations/0007_data_test_multiple_concurrent.py deleted file mode 100644 index fd7d73a6a..000000000 --- a/gifthospitality/migrations/0007_data_test_multiple_concurrent.py +++ /dev/null @@ -1,25 +0,0 @@ -# Generated by Django 4.2.16 on 2024-11-14 15:11 - -import time - -from django.db import migrations - - -def forward(apps, schema_editor): - Grade = apps.get_model("gifthospitality", "Grade") - - -def reverse(apps, schema_editor): - Grade = apps.get_model("gifthospitality", "Grade") - - -class Migration(migrations.Migration): - - dependencies = [ - ( - "gifthospitality", - "0006_alter_simplehistorygiftandhospitality_options_and_more", - ), - ] - - operations = [migrations.RunPython(forward, reverse)] diff --git a/payroll/models.py b/payroll/models.py index 0b5bcc2e0..c5c89322d 100644 --- a/payroll/models.py +++ b/payroll/models.py @@ -44,7 +44,7 @@ class Employee(models.Model): fte = models.FloatField(default=1.0) assignment_status = models.CharField(max_length=32) - # TODO: Missing fields from Admin Tool + # TODO: Missing fields from Admin Tool which aren't required yet. # EU/Non-EU (from programme code model) objects = EmployeeQuerySet.as_manager() @@ -95,7 +95,8 @@ class Meta: period_10 = models.BooleanField(default=True) period_11 = models.BooleanField(default=True) period_12 = models.BooleanField(default=True) - # FIXME + + # TODO: Missing fields from Admin Tool which aren't required yet. # capital (Real colour of money) # recharge = models.CharField(max_length=50, null=True, blank=True) # recharge_reason = models.CharField(max_length=100, null=True, blank=True) diff --git a/payroll/services/payroll.py b/payroll/services/payroll.py index 116d47bc5..b34994232 100644 --- a/payroll/services/payroll.py +++ b/payroll/services/payroll.py @@ -99,6 +99,7 @@ def get_payroll_data( budget_type=obj.programme_code.budget_type.budget_type_display, assignment_status=obj.assignment_status, basic_pay=obj.basic_pay, + # `first` is OK as there should only be one `pay_periods` with the filters. pay_periods=obj.pay_periods.first().periods, )