Skip to content

Commit

Permalink
Merge pull request #3660 from unicef/ch34541-face-report-dates
Browse files Browse the repository at this point in the history
[FAM] Face Report Dates add to Spot Checks
  • Loading branch information
robertavram authored Jun 7, 2024
2 parents 4dbb545 + a8a19ea commit 2b2db1a
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -62,9 +62,6 @@ class Command(BaseCommand):
'audit.engagement.status',
'audit.engagement.status_date',

'audit.spotcheck.face_form_start_date',
'audit.spotcheck.face_form_end_date',

'purchase_order.purchaseorder.*',
'purchase_order.auditorfirm.*',
]
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Generated by Django 3.2.19 on 2024-05-07 10:59

from django.db import migrations, models


class Migration(migrations.Migration):

dependencies = [
('audit', '0030_engagement_send_back_comment'),
]

operations = [
migrations.AlterField(
model_name='engagement',
name='end_date',
field=models.DateField(blank=True, null=True, verbose_name='Start date of first reporting FACE'),
),
migrations.AlterField(
model_name='engagement',
name='start_date',
field=models.DateField(blank=True, null=True, verbose_name='End date of last reporting FACE'),
),
]
4 changes: 2 additions & 2 deletions src/etools/applications/audit/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,8 +111,8 @@ class Engagement(InheritedModelMixin, TimeStampedModel, models.Model):
)
partner_contacted_at = models.DateField(verbose_name=_('Date IP was contacted'), blank=True, null=True)
engagement_type = models.CharField(verbose_name=_('Engagement Type'), max_length=10, choices=TYPES)
start_date = models.DateField(verbose_name=_('Period Start Date'), blank=True, null=True)
end_date = models.DateField(verbose_name=_('Period End Date'), blank=True, null=True)
start_date = models.DateField(verbose_name=_('Start date of first reporting FACE'), blank=True, null=True)
end_date = models.DateField(verbose_name=_('End date of last reporting FACE'), blank=True, null=True)
total_value = models.DecimalField(
verbose_name=_('Total value of selected FACE form(s)'), default=0, decimal_places=2, max_digits=20
)
Expand Down
9 changes: 5 additions & 4 deletions src/etools/applications/audit/serializers/engagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -257,6 +257,9 @@ class EngagementSerializer(
WritableNestedParentSerializerMixin,
EngagementListSerializer
):
face_form_start_date = serializers.DateField(label='FACE Form(s) Start Date', read_only=True, source='start_date')
face_form_end_date = serializers.DateField(label='FACE Form(s) End Date', read_only=True, source='end_date')

staff_members = SeparatedReadWriteField(
read_field=serializers.SerializerMethodField(),
label=_('Audit Staff Team Members')
Expand Down Expand Up @@ -287,6 +290,7 @@ class EngagementSerializer(

class Meta(EngagementListSerializer.Meta):
fields = EngagementListSerializer.Meta.fields + [
'face_form_start_date', 'face_form_end_date',
'total_value', 'staff_members', 'active_pd', 'authorized_officers', 'users_notified',
'joint_audit', 'year_of_audit', 'shared_ip_with', 'exchange_rate', 'currency_of_report',
'start_date', 'end_date', 'partner_contacted_at', 'date_of_field_visit', 'date_of_draft_report_to_ip',
Expand Down Expand Up @@ -399,16 +403,13 @@ class Meta(WritableNestedSerializerMixin.Meta):
class SpotCheckSerializer(ActivePDValidationMixin, EngagementSerializer):
findings = FindingSerializer(many=True, required=False)

face_form_start_date = serializers.DateField(label='FACE Form(s) Start Date', read_only=True, source='start_date')
face_form_end_date = serializers.DateField(label='FACE Form(s) End Date', read_only=True, source='end_date')

pending_unsupported_amount = serializers.DecimalField(20, 2, label=_('Pending Unsupported Amount'), read_only=True)

class Meta(EngagementSerializer.Meta):
model = SpotCheck
fields = EngagementSerializer.Meta.fields + [
'total_amount_tested', 'total_amount_of_ineligible_expenditure',
'internal_controls', 'findings', 'face_form_start_date', 'face_form_end_date',
'internal_controls', 'findings',
'amount_refunded', 'additional_supporting_documentation_provided',
'justification_provided_and_accepted', 'write_off_required', 'pending_unsupported_amount',
'explanation_for_additional_information'
Expand Down

0 comments on commit 2b2db1a

Please sign in to comment.