Skip to content

Commit

Permalink
rechcking ML and AUA applications status for approval
Browse files Browse the repository at this point in the history
  • Loading branch information
NishantPhour committed Dec 30, 2024
1 parent 5424552 commit 11f922e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mooringlicensing/components/payments_ml/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -207,6 +207,9 @@ def get(self, request, *args, **kwargs):
return_url = request.build_absolute_uri(reverse('fee_success', kwargs={"uuid": application_fee.uuid}))
fallback_url = request.build_absolute_uri(reverse("external"))
payment_session = ledger_api_client.utils.generate_payment_session(request, invoice.reference, return_url, fallback_url)
proposal = application_fee.proposal
request.session["payment_pk"] = proposal.pk
request.session["payment_model"] = "proposal"
return HttpResponseRedirect(payment_session['payment_url'])


Expand Down Expand Up @@ -829,6 +832,9 @@ def get(self, request, uuid, *args, **kwargs):
if type(proposal.child_obj) in [WaitingListApplication, AnnualAdmissionApplication]:
if proposal.auto_approve:
proposal.final_approval_for_WLA_AAA(request, details={})
elif type(proposal.child_obj) in [MooringLicenceApplication, AuthorisedUserApplication]:
if proposal.processing_status == Proposal.PROCESSING_STATUS_AWAITING_PAYMENT:
proposal.final_approval_for_AUA_MLA(request)

wla_or_aaa = True if proposal.application_type.code in [WaitingListApplication.code, AnnualAdmissionApplication.code,] else False
invoice = Invoice.objects.get(reference=application_fee.invoice_reference)
Expand Down

0 comments on commit 11f922e

Please sign in to comment.