<%@ include file="/project/include.jsp" %>

<script type="text/javascript">
	function rileggiCombo(ancheVociBudget) {
		mostraPagamentoOIncasso();
		var params = "refreshVB=" + ancheVociBudget + "&segno=" + getRadioCheckedValue('segno') + 
			"&idVoceBudget=" + document.getElementById('comboBudget').value + 
			"&idPolo=" + document.getElementById('comboPolo').value;
		jsLoadMultipleSelectOptions('it.cedaf.icare.liquidazioni.commons.LoadVociBudgetMultiSelectOptions', params, JS_SYNC);		
		
	}
	
	var _mode = bui_datamanagement.getMode();
	if (_mode.isCreate() || _mode.isUpdate()) {					
		registerOnDocumentLoad(function() {
			mostraPagamentoOIncasso();
		});	
	}

	function cpCheckEmptyCustomTable_cpst_righe_TABLE_ivaPerGruppi(empty) {
		if (empty) {
			$('#div_ivaPerGruppi').hide();
		} else {
			$('#div_ivaPerGruppi').show();
		}
	}
	
	function cpCheckEmptyCustomTable_cpst_righe_TABLE_rimborsi(empty) {
		if (empty) {
			$('#div_rimborsi').hide();
		} else {
			$('#div_rimborsi').show();
		}
	}
	
 	function mostraPagamentoOIncasso() {
 		var trTipoPagamento = document.getElementById('tipoPagamentoTr');
		var trTipoIncasso = document.getElementById('tipoIncassoTr');
 		if (getRadioCheckedValue('segno') == 'S') {
 			trTipoPagamento.style.display = '';
 			trTipoIncasso.style.display = 'none';
 			if (document.getElementById('comboTipoIncasso')) {
 				document.getElementById('comboTipoIncasso').selectedIndex = -1;
 			}
 		} else {
 			trTipoPagamento.style.display = 'none';
 			trTipoIncasso.style.display = '';
 			if (document.getElementById('comboTipoPagamento')) {
 				document.getElementById('comboTipoPagamento').selectedIndex = -1;
 			}
 		}
 	}

	registerOnChangeLookup('filialeLookup', function() {
		document.getElementById('txtBanca').value = document.getElementById('banca_filialeLookup').value;	
		document.getElementById('txtIndirizzoBanca').value = document.getElementById('indirizzo_filialeLookup').value;
		document.getElementById('txtComuneBanca').value = document.getElementById('comune_filialeLookup').value;
		document.getElementById('txtCapBanca').value = document.getElementById('cap_filialeLookup').value;
		document.getElementById('b_abi').value = document.getElementById('abi_filialeLookup').value;
		document.getElementById('b_cab').value = document.getElementById('cab_filialeLookup').value;
		f_iban(document.getElementById('b_abi'));
	});
	
	registerOnClearLookup('filialeLookup', function() {
		document.getElementById('txtBanca').value = '';	
		document.getElementById('txtIndirizzoBanca').value = '';
		document.getElementById('txtComuneBanca').value = '';
		document.getElementById('txtCapBanca').value = '';
		document.getElementById('b_abi').value = '';
		document.getElementById('b_cab').value = '';
		f_iban(document.getElementById('b_abi'));
	});
	
	/** Gestione dell'iban */
	function f_iban(element) {		
		if (element.id == 'b_iban') {
			var text = element.value;
			
			document.getElementById('b_cp').value = text.substring(0,2);
			document.getElementById('b_nc').value = text.substring(2,4);
			document.getElementById('b_cin').value = text.substring(4,5);
			document.getElementById('b_abi').value = text.substring(5,10);
			document.getElementById('b_cab').value = text.substring(10,15);
			document.getElementById('b_cc').value = text.substring(15);	
			ricercaBanca(document.getElementById('b_abi').value, document.getElementById('b_cab').value);		
			return;
		}
		
		if (element.id == 'b_abi' || element.id == 'b_cab') {
			var text = element.value;
			if (text != '') {
				text = fillString(text, 5, '0', true);
				element.value = text;
				ricercaBanca(document.getElementById('b_abi').value, document.getElementById('b_cab').value);
			}
		}
		if (element.id == 'b_cc') {
			var text = element.value;
			if (text != '') {
				text = fillString(text, 12, '0', true);
				element.value = text;
			}
		}
		if (element.id == 'b_cp' || element.id == 'b_nc') {
			var text = element.value;
			if (text != '') {
				text = fillString(text, 2, ' ', false);
				element.value = text;
			}
		}
		
		var c_iban = fillString(document.getElementById('b_cp').value, 2, '_', true) +
			fillString(document.getElementById('b_nc').value, 2, '_', true) + 
			fillString(document.getElementById('b_cin').value, 1, '_', true) + 
			fillString(document.getElementById('b_abi').value, 5, '_', true) + 
			fillString(document.getElementById('b_cab').value, 5, '_', true) + 
			fillString(document.getElementById('b_cc').value, 12, '_', true);
		if (c_iban == fillString('', 27, '_', true)) c_iban = '';
		document.getElementById('b_iban').value = c_iban;		
	}
	
	function fillString (input, length, ch, before) {
		var vRet = input;
		for (; vRet.length < length; ) {
			if (before) {
				vRet = ch + vRet;
			} else {
				vRet = vRet + ch;
			}
		}
		return vRet;
	}
	
	/** Ricerca della banca */
	function ricercaBanca(abi, cab) {
		if(abi != '' && cab != '') {
			jsLoadMap('it.cedaf.icare.commons.control.action.RicercaBancaAbiCabExecutor',  '&abi=' + abi + '&cab=' + cab, '_ricercaBancaHandler');
		}
	}
	
	function _ricercaBancaHandler(map) {
		if(map.get('find') == 'yes') {
			var banca = map.get('banca');
			var filiale = map.get('filiale');
			if (filiale != '') banca += ' - ' + filiale;
			document.getElementById('txtBanca').value = banca;
			document.getElementById('txtIndirizzoBanca').value = map.get('indirizzo');
			document.getElementById('txtComuneBanca').value = map.get('comune');
			document.getElementById('txtCapBanca').value = map.get('cap');						
		}
	}

</script>


<bui:out modes="create, update" slave="righe">
	<input type="hidden" id="banca_filialeLookup" class="helper"/>
	<input type="hidden" id="indirizzo_filialeLookup" class="helper"/>
	<input type="hidden" id="comune_filialeLookup" class="helper"/>
	<input type="hidden" id="cap_filialeLookup" class="helper"/>
	<input type="hidden" id="abi_filialeLookup" class="helper"/>
	<input type="hidden" id="cab_filialeLookup" class="helper"/>
</bui:out>

<j:tile slave="righe" name="shell.slaveToolbar" />
<%--  <shell:grid slave="righe" description="intestatario,51%; segno,15%; importoNetto,8%,-1,right;quotaFRNA,8%,-1,right;imponibileIva,8%,-1,right;aliquotaIva,5%,-1,right;importoIva,5%,-1,right;importo,8%,-1,right" />  --%>

<shell:grid slave="righe" description="intestatario,51%; segno,15%; importoNetto,9%,-1,right;imponibileIva,9%,-1,right;aliquotaIva,6%,-1,right;importoIva,9%,-1,right;importo,9%,-1,right" />

<shell:fieldset title="${j:bundle('LBL_liquidazioni_righe_infogen_SET')}">
	<table border="0" cellspacing="3" cellpadding="0" >	
		<tr>
			<td class="form-label">
				<shell:label prop="segno" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="segno" />
				</bui:out>
				<bui:out modes="create, update" slave="righe">
					<j:bind prop="segno">
						<j:valueSetIterator>
							<j:radio onclick="rileggiCombo(true);"/> ${j:getValueSetItem().description}<br/>
						</j:valueSetIterator>				
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="importo" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="importo" />
				</bui:out>
				<bui:out modes="create, update" slave="righe">
					<j:bind prop="importo">
						<j:text class="form-normal-text" />					
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<bui:out modes="view" slave="righe">	
			<tr>
				<td class="form-label">
					<shell:label prop="intervento" />
				</td>
				<td class="form-values">
					<j:tile slave="righe" name="shell.plaintext" prop="intervento" />
				</td>
			</tr>
		</bui:out>
		<tr>
			<td class="form-label">
				<shell:label prop="enteErogatore" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="enteErogatore" />
				</bui:out>
				<bui:out modes="create, update" slave="righe">
					<j:bind prop="enteErogatore">
						<j:select class="form-input" emptyOptionDescr=" " />				
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="voceBudget" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="voceBudget" />
				</bui:out>
				<bui:out modes="create, update" slave="righe">
					<j:bind prop="voceBudget">
						<j:select id="comboBudget" onchange="rileggiCombo(false);" class="form-input" emptyOptionDescr=" " />				
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="polo" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="polo" />
				</bui:out>
				<bui:out modes="create, update" slave="righe">
					<j:bind prop="polo">
						<j:select id="comboPolo" class="form-input" emptyOptionDescr=" " />				
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
 	</table> 
 	</td>
 	<td width="50%" valign="top">
 	<table border="0" cellspacing="3" cellpadding="0" >
		<tr>
			<td class="form-label">
				<shell:label prop="importoNetto" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="importoNetto" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="quotaFRNA" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="quotaFRNA" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="imponibileIva" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="imponibileIva" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="aliquotaIva" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="aliquotaIva" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="importoIva" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="importoIva" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="importoEsenteIva" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="importoEsenteIva" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="importo" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="importo_0" />
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="ivaPerGruppi" />
			</td>
			<td class="form-values">
				<div id="div_ivaPerGruppi" style="display: none;">
					<bui:out modes="view" slave="righe">
						<shell:grid slave="righe" numOfRows="4" property="ivaPerGruppi" description="codice;descrizione;importo;imponibileIva;aliquotaIva;importoIva" />
					</bui:out>
				</div>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="rimborsi" />
			</td>
			<td class="form-values">
				<div id="div_rimborsi" style="display: none;">
					<bui:out modes="view" slave="righe">
						<shell:grid slave="righe" numOfRows="2" property="rimborsi" description="descrizione;dataDa;dataA;importo" />
					</bui:out>
				</div>
			</td>
		</tr>
 	</table>	
</shell:fieldset>

<shell:fieldset title="${j:bundle('LBL_liquidazioni_righe_infocont_SET')}">
	<table border="0" cellspacing="3" cellpadding="0" >	
		<tr>
			<td class="form-label">
				<shell:label prop="codiceContabilita" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="righe">
					<j:tile slave="righe" name="shell.plaintext" prop="codiceContabilita" />
				</bui:out>
				<bui:out modes="create, update" slave="righe">
					<j:bind prop="codiceContabilita">
						<j:text class="form-normal-text" />		
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<icare:ifOptional prop="Impegno">
		<tr>
			<td class="form-label">
				<shell:label prop="annoImpegno" />
			</td>
			<td class="form-values">
				<j:tile slave="righe" name="shell.plaintext" prop="annoImpegno" />
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="numeroImpegno" />
			</td>
			<td class="form-values">
				<j:tile slave="righe" name="shell.plaintext" prop="numeroImpegno" />
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="subImpegno" />
			</td>
			<td class="form-values">
				<j:tile slave="righe" name="shell.plaintext" prop="subImpegno" />
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="cigImpegno" />
			</td>
			<td class="form-values">
				<j:tile slave="righe" name="shell.plaintext" prop="cigImpegno" />
			</td>
		</tr>
		</icare:ifOptional>
 	</table>
</shell:fieldset>

<shell:fieldset title="${j:bundle('LBL_liquidazioni_righe_modpag_SET')}">


	<table align="center" width="100%">
		<tr>
			<td class="form-label">
				<shell:label prop="cognomeBeneficiario" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="cognomeBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="cognomeBeneficiario">
						<j:text class="form-normal-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>			
		</tr>		
		<tr>
			<td class="form-label">
				<shell:label prop="nomeBeneficiario"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="nomeBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="nomeBeneficiario">
						<j:text class="form-normal-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="codiceFiscaleBeneficiario"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="codiceFiscaleBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="codiceFiscaleBeneficiario">
						<j:text class="form-normal-text" style="width:16em;"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="indirizzoBeneficiario"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="indirizzoBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="indirizzoBeneficiario">
						<j:text class="form-long-text"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="civicoBeneficiario"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="civicoBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="civicoBeneficiario">
						<j:text class="form-short-text"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>		
		<tr>
			<td class="form-label">
				<shell:label prop="comuneBeneficiario"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="comuneBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="comuneBeneficiario">
						<j:text class="form-long-text"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="capBeneficiario" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="capBeneficiario" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="capBeneficiario">
						<j:text class="form-short-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>			
		</tr>		
	</table>

	<table  border="0" cellspacing="3" cellpadding="0" >	
		<tr id="tipoPagamentoTr">
			<td class="form-label">
				<shell:label prop="tipoPagamento"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="tipoPagamento" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="tipoPagamento">
						<j:select class="form-input" emptyOptionDescr=" " id="comboTipoPagamento"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr id="tipoIncassoTr">
			<td class="form-label">
				<shell:label prop="tipoIncasso"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="tipoIncasso" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="tipoIncasso">
						<j:select class="form-input" emptyOptionDescr=" " id="comboTipoIncasso"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>		
		<tr id="convenzioneTr">
			<td class="form-label">
				<shell:label prop="convenzione"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile slave="${_slave}" name="shell.plaintext" prop="convenzione" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="convenzione">
						<j:select class="form-input" emptyOptionDescr=" " id="comboConvenzione"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>		
		<tr id="coordinateBancarieTr">			
			<td colspan="2">
				<table align="left" border="0" cellspacing="3" cellpadding="0">
					<tr>
						<td class="form-label">
							<shell:label prop="banca"/>							
						</td>
						<td class="form-values" colspan="6">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="banca" />
							</bui:out>
							<bui:out modes="create,update" slave="${_slave}">
								<j:bind prop="banca">
									<j:text class="form-long-text" id="txtBanca"/>
									<shell:error />
								</j:bind>
								<shell:lookup lookupId="filialeLookup" identifier="tabelle.filialeBanca" />
							</bui:out>
						</td>						
					</tr>
					<tr>
						<td class="form-label">
							<shell:label prop="indirizzoBanca"/>							
						</td>
						<td class="form-values" colspan="6">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="indirizzoBanca" />
							</bui:out>
							<bui:out modes="create,update" slave="${_slave}">
								<j:bind prop="indirizzoBanca">
									<j:text class="form-long-text" id="txtIndirizzoBanca" />
									<shell:error />
								</j:bind>
							</bui:out>
						</td>						
					</tr>
					<tr>
						<td class="form-label">
							<shell:label prop="comuneBanca"/>
						</td>
						<td class="form-values" colspan="6">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="comuneBanca" />
							</bui:out>
							<bui:out modes="create,update" slave="${_slave}">
								<j:bind prop="comuneBanca">
									<j:text class="form-long-text" id="txtComuneBanca" />
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
					</tr>
					<tr>
						<td class="form-label">
							<shell:label prop="capBanca" />
						</td>
						<td class="form-values" colspan="6">
							<bui:out modes="view" slave="${_slave}">
								<j:tile slave="${_slave}" name="shell.plaintext" prop="capBanca" />
							</bui:out>
							<bui:out modes="create,update" slave="${_slave}">
								<j:bind prop="capBanca">
									<j:text class="form-short-text" id="txtCapBanca" />
									<shell:error />
								</j:bind>
							</bui:out>
						</td>			
					</tr>					
					<tr>
						<td class="form-label" rowspan="4">
							<shell:label prop="coordinateBancarie"/>							
						</td>						
						<td class="form-values" align="right">
							ABI:
						</td>
						<td class="form-values">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="abi" />
							</bui:out>
							<bui:out slave="${_slave}" modes="create,update">
								<j:bind prop="abi">
									<j:text class="form-short-text" style="width:5em;" id="b_abi" onchange="f_iban(this);"/>
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
						<td class="form-values" align="right">
							CAB:
						</td>
						<td class="form-values">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="cab" />
							</bui:out>
							<bui:out modes="create,update" slave="${_slave}">
								<j:bind prop="cab">
									<j:text class="form-short-text" style="width:5em;" id="b_cab" onchange="f_iban(this);"/>
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
						<td class="form-values" align="right">
							&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CIN:
						</td>
						<td class="form-values">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="cin" />
							</bui:out>
							<bui:out modes="create,update" slave="${_slave}">
								<j:bind prop="cin">
									<j:text class="form-short-text" style="width:2em;"  id="b_cin" onchange="f_iban(this);"/>
									<shell:error />
								</j:bind>
							</bui:out>
						</td>
					</tr>
					<tr>
						<td class="form-values" align="right">
							${j:bundle('LBL_liquidazioni_righe_concor')} 
						</td>
						<td class="form-values" colspan="5">						
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="contoCorrente" />
							</bui:out>
						 	<bui:out modes="create,update" slave="${_slave}">
						 		<j:bind prop="contoCorrente">
						 			<j:text class="form-normal-text" style="width:12em;" id="b_cc" onchange="f_iban(this);"/>
						 			<shell:error />
						 		</j:bind>
						 	</bui:out>
						</td>
					</tr>
					<tr>
						<td class="form-values" align="right">
							${j:bundle('LBL_liquidazioni_righe_codpae')}  
						</td>
						<td class="form-values">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="codicePaese"/>								
							</bui:out>
						 	<bui:out modes="create,update" slave="${_slave}">
						 		<j:bind prop="codicePaese">
						 			<j:text class="form-short-text" style="width:2em;" id="b_cp" onchange="f_iban(this);"/>
						 			<shell:error />
						 		</j:bind>
						 	</bui:out>
						</td>
						<td class="form-values" align="right" colspan="3">
							${j:bundle('LBL_liquidazioni_righe_numcon')}
						</td>
						<td class="form-values">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="numeroControllo"/>								
							</bui:out>
						 	<bui:out modes="create,update" slave="${_slave}">
						 		<j:bind prop="numeroControllo">
						 			<j:text class="form-short-text" style="width:2em;" id="b_nc" onchange="f_iban(this);"/>
						 			<shell:error />
						 		</j:bind>
						 	</bui:out>
						</td>
					</tr>
					<tr>
						<td class="form-values" align="right">
							IBAN: 
						</td>
						<td class="form-values" colspan="5">
							<bui:out modes="view" slave="${_slave}">
								<j:tile  slave="${_slave}" name="shell.plaintext" prop="iban"/>
							</bui:out>
						 	<bui:out modes="create,update" slave="${_slave}">
						 		<j:bind prop="iban">
						 			<j:text class="form-long-text" style="width:27em;" id="b_iban" onchange="f_iban(this);"/>
						 			<shell:error />
						 		</j:bind>
						 	</bui:out>
						</td>
					</tr>
				</table>
			</td>
		</tr>
		<tr>
			<td class="form-label" >
				${j:bundle('LBL_liquidazioni_righe_ccpos')}
			</td>
			<td class="form-values" colspan="5">						
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="ccp" />
				</bui:out>
			 	<bui:out modes="create,update" slave="${_slave}">
			 		<j:bind prop="ccp">
			 			<j:text class="form-normal-text"/>
			 			<shell:error />
			 		</j:bind>
			 	</bui:out>
			</td>
		</tr>
		<tr id="causaleTr">
			<td class="form-label">
				<shell:label prop="causale"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="causale" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="causale">
						<j:textarea class="form-long-text" id="txtCausale"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>			
		<tr id="delegatoTr">
			<td class="form-label">
				<shell:label prop="delegato"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="delegato" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="delegato">
						<j:textarea class="form-normal-textarea" id="txtDelegato"/>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>
		</tr>
		<tr id="quietanzanteTr">
			<td class="form-label">
				<shell:label prop="nominativoQuietanzante"/>
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="nominativoQuietanzante" />
				</bui:out>
				<bui:out modes="create,update" slave="${_slave}">
					<j:bind prop="nominativoQuietanzante">
						<j:text class="form-normal-text" readonly="true" id="nominativo_quietanzanteLookup" />
						<shell:error />
					</j:bind>
				  	<j:bind prop="idQuietanzante">
						<j:hidden id="id_quietanzanteLookup"/>						
					</j:bind>					
					<span>
						<shell:lookup lookupId="quietanzanteLookup" identifier="anagrafiche.soggetto" 
							init="it.cedaf.icare.anagrafiche.model.datamanagement.SoggettoLookupInitializer" 
							params="disableComplete=true&onlySearch=true" clearVisible="false" />
					</span>
					<span>
						&nbsp; <a id="quietanzanteLookup_clear" href="javascript:clearLookup('quietanzanteLookup');"><img id="quietanzanteLookup_clear_img" src="${j:getResourceUrlOfModule('shell', 'img/lookup/clear.gif')}" alt="Cancella" align="absmiddle" border="0"></a>
					</span>	
				</bui:out>
			</td>
		</tr>
		
		<tr>
			<td class="form-label">
				<shell:label prop="note" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="notePagamento" />
				</bui:out>				
				<bui:out modes="create,update" slave="${_slave}">									
					<j:bind prop="notePagamento">
						<j:textarea class="form-normal-textarea" />	
						<shell:error />					
					</j:bind>
				</bui:out>
			</td>
		</tr>
		
		<tr>
			<td class="form-label">
				<shell:label prop="noteRiga" />
			</td>
			<td class="form-values">
				<bui:out modes="view" slave="${_slave}">
					<j:tile  slave="${_slave}" name="shell.plaintext" prop="note" />
				</bui:out>				
				<bui:out modes="create,update" slave="${_slave}">									
					<j:bind prop="note">
						<j:textarea class="form-normal-textarea" />	
						<shell:error />					
					</j:bind>
				</bui:out>
			</td>
		</tr>
	</table>	
</shell:fieldset>