Sfoglia il codice sorgente

form bollettino

master
Mattia Gosetto 4 anni fa
parent
commit
91ee071fba
  1. 26
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/it/tref/liferay/portos/bo/portlet/FascicoloPortlet.java
  2. 4
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/WEB-INF/src/service.properties
  3. 36
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view.jsp
  4. 42
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_form_bollettino.jsp
  5. 6
      liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_pagamenti_bolli.jsp

26
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);
}
}
}

4
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
##

36
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view.jsp

@ -80,6 +80,39 @@
</c:if>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text>
<%
String[] notAllowed = new String[]{PagamentoConstants.UTILIZZATA_SOSTITUITA, PagamentoConstants.UTILIZZATA_RIFIUTATA, PagamentoConstants.UTILIZZATA_NON_PAGABILE};
%>
<c:if test="<%= !Arrays.asList(notAllowed).contains(pagamento.getUtilizzata()) %>">
<%
String buttonFormId = "pagamentoFormButton_"+index;
String contentFormId = "pagamentoFormContent_"+index;
%>
<liferay-ui:icon-menu showWhenSingleIcon="<%= false %>" extended="false" showExpanded="true" cssClass="inline_toolbar" >
<liferay-ui:icon
id='<%=buttonFormId %>'
iconCssClass="fa fa-edit"
message=""
url="javascript:void(0)"
linkCssClass="btn btn-action"
/>
</liferay-ui:icon-menu>
<div id="<portlet:namespace /><%= contentFormId %>" class="hide" >
<liferay-util:include page="/html/pagamenti/view_panel_form_bollettino.jsp" servletContext='<%= application %>'>
<liferay-util:param name="idPagamento" value="<%= String.valueOf(pagamento.getPagamentoId()) %>"></liferay-util:param>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(pagamento.getClassPk()) %>"></liferay-util:param>
</liferay-util:include>
</div>
<liferay-util:include page="/html/common/confirm_window.jsp" servletContext="<%= application %>" >
<liferay-util:param name="titolo" value="Dettaglio Pagamento"></liferay-util:param>
<liferay-util:param name="buttonId" value="<%=buttonFormId%>"></liferay-util:param>
<liferay-util:param name="contentDiv" value="<%=contentFormId%>"></liferay-util:param>
<liferay-util:param name="width" value="750"></liferay-util:param>
</liferay-util:include>
</c:if>
</liferay-ui:search-container-column-text>
<liferay-ui:search-container-column-text>
<%
String[] notAllowed = new String[]{PagamentoConstants.UTILIZZATA_SOSTITUITA, PagamentoConstants.UTILIZZATA_RIFIUTATA, PagamentoConstants.UTILIZZATA_NON_PAGABILE};
@ -121,9 +154,10 @@
<liferay-util:param name="contentDiv" value="<%=contentId%>"></liferay-util:param>
<liferay-util:param name="width" value="750"></liferay-util:param>
</liferay-util:include>
</c:if>
</liferay-ui:search-container-column-text>
</c:if>
</liferay-ui:search-container-row>

42
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";
%>
<c:if test="<%= Validator.isNotNull(objPagamento) %>">
<div class="col-sm-12 col-md-12">
<liferay-portlet:actionURL name="setBollettinoImposta" var="setBollettinoImpostaURL">
<liferay-portlet:param name="idPagamento" value="<%=String.valueOf(idPagamento) %>"/>
<liferay-portlet:param name="dettPraticaId" value="<%=String.valueOf(dettPraticaId) %>"/>
<liferay-portlet:param name="redirect" value="<%= redirect %>" />
<liferay-portlet:param name="mvcPath" value="/html/pagamenti/view_panel_form_bollettino.jsp"/>
</liferay-portlet:actionURL>
<aui:form name="fm4-pagamenti" method="post" action="<%= setBollettinoImpostaURL %>">
<aui:input name="numeroBollettino" type="text"
label="label-codice-bollettino" value="<%= objPagamento.getNumeroBollettino() %>"/>
<aui:button type="submit" value="Salva" cssClass="btn btn-primary"/>
</aui:form>
</div>
</c:if>

6
liferay-plugins-sdk-6.2/portlets/portos-bo-portlet/docroot/html/pagamenti/view_panel_pagamenti_bolli.jsp

@ -94,6 +94,12 @@
</div>
</div>
</c:if>
<div class="row">
<liferay-util:include page="/html/pagamenti/child_panel_form_pagamenti.jsp" servletContext='<%= application %>'>
<liferay-util:param name="idPagamento" value="<%= String.valueOf(dettPratica.getPagamentoIdBolli()) %>"></liferay-util:param>
<liferay-util:param name="dettPraticaId" value="<%= String.valueOf(dettPratica.getDettPraticaId()) %>"></liferay-util:param>
</liferay-util:include>
</div>
</div>
</c:if>
Caricamento…
Annulla
Salva