Skip to content

Commit

Permalink
Utilisation du 'numAdmPrestaDoss' pour l'affichage du numéro de prest…
Browse files Browse the repository at this point in the history
…ation dossier (#1335)
  • Loading branch information
tnicolas1 authored Jan 17, 2025
1 parent 9b60475 commit 106032b
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
8 changes: 8 additions & 0 deletions app/models/pfmp.rb
Original file line number Diff line number Diff line change
Expand Up @@ -99,6 +99,14 @@ def administrative_number
schooling.attributive_decision_number + index
end

def num_presta_doss
transition = latest_payment_request.last_transition_to(:integrated)

return nil if transition.nil?

transition.metadata["numAdmPrestaDoss"]
end

def within_schooling_dates?
return true if (schooling.open? && start_date >= schooling.start_date) || schooling.no_dates?

Expand Down
6 changes: 4 additions & 2 deletions app/views/pfmps/_payment_requests_history.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,10 @@
Coordonnées bancaires utilisées :
%strong= payment_request.rib&.iban || payment_request.reconstructed_iban || payment_request.student.rib(current_establishment)&.iban || "manquantes"
.fr-mt-2w.gray-text
Numéro de prestation dossier :
%strong= @pfmp.administrative_number
- num_presta_doss = @pfmp.num_presta_doss
- if !num_presta_doss.nil?
Numéro de prestation dossier :
%strong= num_presta_doss
.fr-mt-2w.gray-text
Dernière mise à jour le
= l(payment_request.last_transition&.updated_at || payment_request.updated_at, format: :long)

0 comments on commit 106032b

Please sign in to comment.