From 982a209e7dd226a1a381744d86bb9fffb4589109 Mon Sep 17 00:00:00 2001 From: Pierre de La Morinerie Date: Wed, 4 May 2022 15:18:59 +0000 Subject: [PATCH] dossiers: use the depose_at date in the deposit recepit A dossier has several submission dates: - `depose_at` is the first date at which the dossier was submitted - `en_construction_at` is the last date at which the dossier was submitted OR reverted from `en_instruction` to `en_construction`. For now we prefer to display the earliest date: - it gives more rights to the user, - en_construction_at means the administration can reset at will the date printed on deposit receipts (by moving the dossier `en_instruction` and then back), which we don't want. --- app/views/users/dossiers/papertrail.pdf.prawn | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/users/dossiers/papertrail.pdf.prawn b/app/views/users/dossiers/papertrail.pdf.prawn index 937c86b2b..825f42f90 100644 --- a/app/views/users/dossiers/papertrail.pdf.prawn +++ b/app/views/users/dossiers/papertrail.pdf.prawn @@ -70,7 +70,7 @@ prawn_document(margin: [top_margin, right_margin, bottom_margin, left_margin], p pdf.fill_color grey pdf.pad_top(7) do pdf.text "#{Dossier.human_attribute_name(:id)} : #{@dossier.id.to_s}", size: 10, character_spacing: -0.2, align: :justify - pdf.text t('.file_submitted_at') + ' : ' + l(@dossier.en_construction_at, format: '%e %B %Y'), size: 10, character_spacing: -0.2, align: :justify + pdf.text t('.file_submitted_at') + ' : ' + l(@dossier.depose_at, format: '%e %B %Y'), size: 10, character_spacing: -0.2, align: :justify pdf.text t('.dossier_state') + ' : ' + papertrail_dossier_state(@dossier), size: 10, character_spacing: -0.2, align: :justify end