private static void createPaymentSituation( PastDiplomaRequest request, DocumentRequestCreateBean bean) { if (isPayed(bean)) { PastDegreeDiplomaRequestEvent event = new PastDegreeDiplomaRequestEvent( request.getAdministrativeOffice(), request.getPerson(), request, bean.getPastPaymentAmount()); event.depositAmount( AccessControl.getPerson().getUser(), bean.getPastPaymentAmount(), createTransactionDetailDTO(bean)); } }
private static boolean isPayed(DocumentRequestCreateBean bean) { return bean.getPastPaymentAmount() != null && bean.getPastPaymentAmount().isPositive(); }