From 91ee071fba7c50c2ec1923ba1520eeafa26cb213 Mon Sep 17 00:00:00 2001 From: Mattia Gosetto Date: Fri, 21 May 2021 11:07:07 +0200 Subject: [PATCH] form bollettino --- .../portos/bo/portlet/FascicoloPortlet.java | 26 ++++++++++++ .../docroot/WEB-INF/src/service.properties | 4 +- .../docroot/html/pagamenti/view.jsp | 36 +++++++++++++++- .../pagamenti/view_panel_form_bollettino.jsp | 42 +++++++++++++++++++ .../pagamenti/view_panel_pagamenti_bolli.jsp | 6 +++ 5 files changed, 111 insertions(+), 3 deletions(-) create mode 100644 liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_form_bollettino.jsp diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java index 657a6a03..01d29659 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java @@ -5,6 +5,7 @@ import it.tref.liferay.portos.bo.model.DettPratica; import it.tref.liferay.portos.bo.model.DocPratica; import it.tref.liferay.portos.bo.model.HistoryWorkflowAction; import it.tref.liferay.portos.bo.model.IntPratica; +import it.tref.liferay.portos.bo.model.Pagamento; import it.tref.liferay.portos.bo.model.Provincia; import it.tref.liferay.portos.bo.model.Soggetto; import it.tref.liferay.portos.bo.model.Territorio; @@ -15,6 +16,7 @@ import it.tref.liferay.portos.bo.service.DocPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.HistoryWorkflowActionLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaLocalServiceUtil; import it.tref.liferay.portos.bo.service.IntPraticaServiceUtil; +import it.tref.liferay.portos.bo.service.PagamentoLocalServiceUtil; import it.tref.liferay.portos.bo.service.ParereGeologoServiceUtil; import it.tref.liferay.portos.bo.service.ProvinciaLocalServiceUtil; import it.tref.liferay.portos.bo.service.SoggettoLocalServiceUtil; @@ -512,4 +514,28 @@ public class FascicoloPortlet extends MVCPortlet { } return sb.toString(); } + + public void setBollettinoImposta(ActionRequest actionRequest, ActionResponse actionResponse) throws PortalException, + SystemException { + + try { + long idPagamento = ParamUtil.getLong(actionRequest, "idPagamento"); + String numeroBollettino = ParamUtil.getString(actionRequest, "numeroBollettino"); + Pagamento pagamento = PagamentoLocalServiceUtil.fetchPagamento(idPagamento); + if (Validator.isNotNull(pagamento)) { + pagamento.setNumeroBollettino(numeroBollettino); + PagamentoLocalServiceUtil.updatePagamento(pagamento); + } + //PortalUtil.copyRequestParameters(actionRequest, actionResponse); + String redirectURL = ParamUtil.getString(actionRequest, "redirect"); + if (Validator.isNotNull(redirectURL)) { + actionResponse.sendRedirect(redirectURL); + } + } catch (Exception e) { + PortalUtil.copyRequestParameters(actionRequest, actionResponse); + _log.error("Error", e); + throw new SystemException(e); + } + } + } diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties index 002a5478..c1d47a26 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties @@ -13,8 +13,8 @@ ## build.namespace=portos_bo - build.number=3143 - build.date=1621522310640 + build.number=3144 + build.date=1621580624659 build.auto.upgrade=true ## diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view.jsp index fda63bdd..bada833c 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view.jsp @@ -80,6 +80,39 @@ + + <% + String[] notAllowed = new String[]{PagamentoConstants.UTILIZZATA_SOSTITUITA, PagamentoConstants.UTILIZZATA_RIFIUTATA, PagamentoConstants.UTILIZZATA_NON_PAGABILE}; + %> + + <% + String buttonFormId = "pagamentoFormButton_"+index; + String contentFormId = "pagamentoFormContent_"+index; + %> + + + +
+ + + + +
+ + + + + + + +
+
<% String[] notAllowed = new String[]{PagamentoConstants.UTILIZZATA_SOSTITUITA, PagamentoConstants.UTILIZZATA_RIFIUTATA, PagamentoConstants.UTILIZZATA_NON_PAGABILE}; @@ -121,9 +154,10 @@ + - + diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_form_bollettino.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_form_bollettino.jsp new file mode 100644 index 00000000..0aabe85d --- /dev/null +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_form_bollettino.jsp @@ -0,0 +1,42 @@ +<%@page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%> +<%@page import="java.util.Locale"%> +<%@page import="it.tref.liferay.portos.bo.util.PagamentiCommonUtil"%> +<%@page import="com.liferay.portal.kernel.util.Validator"%> +<%@page import="java.text.NumberFormat"%> +<%@page import="java.math.BigDecimal"%> +<%@page import="com.liferay.portal.kernel.bean.BeanPropertiesUtil"%> +<%@page import="it.tref.liferay.portos.bo.shared.util.PagamentoConstants"%> +<%@page import="com.liferay.portal.kernel.language.LanguageUtil"%> + +<%@ include file="/html/init.jsp" %> + +<% + long dettPraticaId = ParamUtil.getLong(request, "dettPraticaId",0l); + long idPagamento = ParamUtil.getLong(request, "idPagamento", 0l); + + DettPratica dettPratica = DettPraticaLocalServiceUtil.getDettPratica(dettPraticaId); + Pagamento objPagamento = PagamentoLocalServiceUtil.fetchPagamento(idPagamento); + + long companyId = company.getCompanyId(); + + String portletNamespace = renderResponse.getNamespace(); + String redirect = currentURL+"#"+portletNamespace+"tab="+portletNamespace+"page_pagamenti"; + +%> + + +
+ + + + + + + + + + + +
+
\ No newline at end of file diff --git a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_pagamenti_bolli.jsp b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_pagamenti_bolli.jsp index 14ffbb73..508cdff9 100644 --- a/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_pagamenti_bolli.jsp +++ b/liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_pagamenti_bolli.jsp @@ -94,6 +94,12 @@ +
+ + + + +
\ No newline at end of file