diff --git a/api/letter_templates/context_generator.py b/api/letter_templates/context_generator.py index aaa92178c1..d2b90ee71d 100644 --- a/api/letter_templates/context_generator.py +++ b/api/letter_templates/context_generator.py @@ -148,7 +148,7 @@ class Meta: class LicenceSerializer(serializers.ModelSerializer): class Meta: model = Licence - fields = ["duration", "start_date", "end_date"] + fields = ["duration", "start_date", "end_date", "reference_code"] start_date = serializers.DateField(format=DATE_FORMAT, input_formats=None) end_date = serializers.SerializerMethodField() diff --git a/api/letter_templates/templates/letter_templates/siel.html b/api/letter_templates/templates/letter_templates/siel.html index b7ccb4b747..39833594bd 100644 --- a/api/letter_templates/templates/letter_templates/siel.html +++ b/api/letter_templates/templates/letter_templates/siel.html @@ -37,7 +37,7 @@

Standard Individual Export Licence

2. Licence number - {{ case_reference }} + {{ licence.reference_code }} 3a. Commencement date @@ -242,7 +242,7 @@

Standard Individual Export Licence

2. Licence number - {{ case_reference }} + {{ licence.reference_code }} 3a. Commencement date @@ -349,7 +349,7 @@

Standard Individual Export Licence

2. Licence number - {{ case_reference }} + {{ licence.reference_code }} 3a. Commencement date @@ -541,7 +541,7 @@

Standard Individual Export Licence

2. Licence number - {{ case_reference }} + {{ licence.reference_code }} 3a. Commencement date diff --git a/api/letter_templates/tests/test_context_generation.py b/api/letter_templates/tests/test_context_generation.py index 8147abf6a1..a325cba470 100644 --- a/api/letter_templates/tests/test_context_generation.py +++ b/api/letter_templates/tests/test_context_generation.py @@ -89,6 +89,7 @@ def _assert_licence(self, context, licence): self.assertEqual(context["start_date"], licence.start_date.strftime(DATE_FORMAT)) self.assertEqual(context["duration"], licence.duration) self.assertEqual(context["end_date"], add_months(licence.start_date, licence.duration)) + self.assertEqual(context["reference_code"], licence.reference_code) def _assert_party(self, context, party): self.assertEqual(context["name"], party.name)