Skip to content

Commit

Permalink
Merge pull request #1693 from ricardorcr/preventPaymentsInFuture/ACDM…
Browse files Browse the repository at this point in the history
…-1815

Preventing registering payments in the future ACDM-1815 #resolve
  • Loading branch information
Luis-Cruz authored Oct 30, 2020
2 parents 0f8944d + 2d273d8 commit da96f5a
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,10 @@ private void checkParameters(DateTime whenRegistered, PaymentMethod paymentMetho
if (whenRegistered == null) {
throw new DomainException("error.accounting.AccountingTransactionDetail.whenRegistered.cannot.be.null");
}

if (whenRegistered.isAfter(new DateTime())) {
throw new DomainException("error.accounting.AccountingTransactionDetail.whenRegistered.cannot.be.after.now");
}

if (paymentMethod == null) {
throw new DomainException("error.accounting.AccountingTransactionDetail.paymentMethod.cannot.be.null");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -439,6 +439,7 @@ email.request.room.subject.edit = Change : [{0}] Room request for {1}
employee = Employee
enderecoWeb = Homepage
erasmus.label.email.confirmation = Confirm Email
error.accounting.AccountingTransactionDetail.whenRegistered.cannot.be.after.now = The payment can not be registered in the future.
error.AccountingEventsManager.invalid.degree.curricular.plan.type = Can not create debt for old plans
error.AdministrativeOfficeDocument.registration.not.found = Can't find registration for document. Please contact the support team.
error.AlreadyAcceptedProposal = The discipline which is making the proposal is already part of the chairs that have this grouping, as has already been realized and accepted this proposal.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,7 @@ employee = Funcionário
enderecoWeb = Homepage
erasmus.label.email.confirmation = Confirm Email
error.AdministrativeOfficeDocument.registration.not.found = Não é possível encontrar a matrícula para este pedido. Por favor contacte o suporte.
error.accounting.AccountingTransactionDetail.whenRegistered.cannot.be.after.now = O pagamento não pode ser registado no futuro.
error.AccountingEventsManager.invalid.degree.curricular.plan.type = Não é possível criar dívidas para os planos antigos
error.AlreadyAcceptedProposal = A disciplina à qual está a fazer a proposta já faz parte das cadeiras que possuem este agrupamento, uma vez que já foi realizada e aceite esta proposta.
error.CandidacyInformationBean.conclusionGrade.invalid.format = Formato inválido.<br/>Introduza até 2 dígitos (0-20)
Expand Down

0 comments on commit da96f5a

Please sign in to comment.