Regalamiunsorriso/rus/admin/anag/_inc_clifor_est.jsp
2026-03-14 20:04:39 +01:00

92 lines
4.7 KiB
Text

<%@ taglib uri="/WEB-INF/ablia.tld" prefix="ab" %>
<%@ page language="java" import="com.ablia.jsp.*" %>
<%-- DICHIARAZIONE BEAN --%>
<jsp:useBean id="bean" class="com.ablia.anag.Clifor" type="com.ablia.anag.Clifor" scope="request" >
</jsp:useBean>
<jsp:useBean id="nf" scope="request" type="java.text.NumberFormat" >
</jsp:useBean>
<jsp:useBean id="df" class="com.ablia.util.SimpleDateFormat" scope="request" type="com.ablia.util.SimpleDateFormat" ></jsp:useBean>
<jsp:useBean id="listaPagamenti" class="com.ablia.util.Vectumerator" type="com.ablia.util.Vectumerator" scope="request" >
</jsp:useBean>
<jsp:useBean id="CRDP" class="com.ablia.contab.DocumentoPagamentoCR" type="com.ablia.contab.DocumentoPagamentoCR" scope="request" >
</jsp:useBean>
<jsp:useBean id="CRese" class="com.ablia.anag.EsercizioCR" type="com.ablia.anag.EsercizioCR" scope="request" >
</jsp:useBean>
<%-- FINE DICHIARAZIONE BEAN --%>
<%-- RIGA 1 --%>
<div class="row">
<div class="col-lg-4">
<label for="descrizione">Esercizio:</label>
<br>
<select name="id_esercizio" id="id_esercizio" onchange="refresh()" class="form-control input-sm">
<ab:optionvec boundcolumn="id_esercizio" desccolumn="id_esercizio" vectumerator="listaEsercizi" value="<%=CRese.getId_esercizio()%>">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</ab:optionvec>
</select>
</div>
<div class="col-lg-4">
<label for="descrizione">Tipo:</label>
<br>
<select id="flgTipoSaldo" name="flgTipoSaldo" onchange="refresh()" class="form-control input-sm">
<option value="0" selected <%=CRDP.getFlgTipoSaldo()==0?"selected":""%>>Tutte</option>
<option value="1" <%=CRDP.getFlgTipoSaldo()==1?"selected":""%>>Aperte</option>
<option value="2" <%=CRDP.getFlgTipoSaldo()==2?"selected":""%>>Chiuse</option>
</select>
</div>
<div class="col-lg-4"> <a class="btn btn-success btn-associative" href="javascript:vediPagamenti()">VAI ALLA PAGINA DEI PAGAMENTI</a> </div>
</div>
<%-- TABELLA --%>
<div class="row">
<div class="col-lg-12" id="no-more-tables">
<table class="table table-bordered table-hover table-striped dataTable table-condensed">
<thead>
<tr>
<th>Cliente/Fornitore</th>
<th>Documento</th>
<th>Data Documento</th>
<th>Tipo Documento</th>
<th>Acconto/Saldo</th>
<th>Importo</th>
<th>Nota</th>
</tr>
</thead>
<ab:whilevec rowbeanclass="com.ablia.contab.DocumentoPagamento" vectumerator="listaPagamenti" rowbeanname="row" columntosum="importo" headercolumn="id_documento">
<ab:wvheader vectumerator="listaPagamenti">
<% listaPagamenti.resetAllPartialResults(); %>
</ab:wvheader>
<tr>
<td data-title="Cliente/Fornitore"><ab:if wherecondition="<%= row.getTipoMovimento() == 1 %>"> <%= row.getDocumento().getClifor().getNominativoCompleto() %> </ab:if>
<ab:else> &nbsp; </ab:else></td>
<td data-title="Documento"><ab:if wherecondition="<%= row.getTipoMovimento() == 1 %>"> <%= row.getDocumento().getNumeroDocumentoCompleto() %> </ab:if>
<ab:else> &nbsp; </ab:else></td>
<td align="center" data-title="Data Documento"><ab:if wherecondition="<%= row.getTipoMovimento() == 1 %>"> <%= df.format(row.getDocumento().getDataDocumento()) %> </ab:if>
<ab:else> <%= df.format(row.getData()) %> </ab:else></td>
<td data-title="Tipo Documento"><ab:if wherecondition="<%= row.getTipoMovimento() == 1 %>"> <%= row.getDocumento().getTipoDocumento().getDescrizione() %> </ab:if>
<ab:else> Pagamento - <%= row.getTipoPagamento().getDescrizione() %> </ab:else></td>
<td align="left" data-title="Acconto/Saldo"><ab:if wherecondition="<%= row.getTipoMovimento()!=1 %>"> <%= row.getDescrizioneFlgTipoIncasso() %> </ab:if></td>
<td align="right" data-title="Importo"><span class='<%= row.getImporto() < 0 ? "red" : "" %>'> <%= nf.format(row.getImporto()) %> </span></td>
<td data-title="Nota"><%= row.getNota() %></td>
</tr>
<ab:wvfooter vectumerator="listaPagamenti">
<tr>
<td><b>Totale</b></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td align="right"><b> <%= nf.format(listaPagamenti.getSumPartialResult("importo")) %> </b></td>
<td>&nbsp;</td>
</tr>
</ab:wvfooter>
</ab:whilevec>
<tr>
<td><span class="msg">Totale da Pagare</span></td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td>&nbsp;</td>
<td align="right"><span class="msg"> <%= nf.format(listaPagamenti.getSumResult("importo")) %> </span></td>
<td>&nbsp;</td>
</tr>
</table>
</div>
</div>