tariffarioDetail.jsp 3.67 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131
<%@ include file="/project/include.jsp" %>

<script type="text/javascript">
	function changeTipoRegola(elem) {
		showInfoGiornaliere(elem.value == 'D' && elem.checked);
	}
	
	function eformat_cpmt_importoFestivi(element, value) {
		if (bui_datamanagement.getMode().isView()) {
			element.innerHTML = value;
		}
		var tipoRegolaCode = cpGetMasterColumnValueOfCurrentRow('tipoRegolaCode');
		showInfoGiornaliere(tipoRegolaCode == 'D');
	}
	
	function showInfoGiornaliere(value) {
		var display = (value ? '' : 'none');
		document.getElementById('trImportoFestivi').style.display = display;
		if (!value && bui_datamanagement.getMode().isCreate()) {
			buiForm['importoFestivi'].value = '';
		}
	}
</script>
		
<shell:fieldset title="Informazioni generali">
	<table border="0" cellspacing="3" cellpadding="0" >
		<tr>
			<td class="form-label">
				<shell:label prop="descrizione" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="descrizione" />
				</bui:out>
				<bui:out modes="create, update">
					<j:bind prop="descrizione">
						<j:text class="form-long-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>						
		</tr>
		<tr>
			<td class="form-label">
				<shell:label prop="tipoRegola" />
			</td>
			<td class="form-values">
				<bui:out modes="view, update">
					<j:tile name="shell.plaintext" prop="tipoRegola" />
				</bui:out>
				<bui:out modes="create">
					<j:bind prop="tipoRegola">
						<j:valueSetIterator>
							<j:radio onclick="javascript:changeTipoRegola(this);"/> ${j:getValueSetItem().description}<br/>
						</j:valueSetIterator>
						<shell:error />
					</j:bind>
				</bui:out>
			</td>						
		</tr>	
		<tr>
			<td class="form-label">
				<shell:label prop="codice" />
			</td>
			<td class="form-values">
				<bui:out modes="view">
					<j:tile name="shell.plaintext" prop="codice" />
				</bui:out>
				<bui:out modes="create, update">
					<j:bind prop="codice">
						<j:text class="form-short-text" />
						<shell:error />
					</j:bind>
				</bui:out>
			</td>						
		</tr>
				   			
	</table>
</shell:fieldset>

<shell:fieldset title="Tariffa">
	<table border="0" cellspacing="3" cellpadding="0" width="100%">
		<tr>
			<td class="form-label">
	    		<shell:label prop="importo" />
	    	</td>
	    	<td class="form-values">
	    		<bui:out modes="view">   
			  		<j:tile name="shell.plaintext" prop="importo" />
				</bui:out>
				<bui:out modes="update,create">
			    	<j:bind prop="importo">
						<j:text class="form-short-text" />
						<shell:error />
					</j:bind>
		   		</bui:out>
		   	</td>
		</tr>
					
		<tr id="trImportoFestivi" style="display: none">   
	      	<td class="form-label">
	    		<shell:label prop="importoFestivi" />
	    	</td>
	    	<td class="form-values">
	    		<bui:out modes="view">   
			  		<j:tile name="shell.plaintext" prop="importoFestivi" />
				</bui:out>
				<span id="cpmt_importoFestivi">
				<bui:out modes="update,create">
			    	<j:bind prop="importoFestivi">
						<j:text class="form-short-text" />
						<shell:error />
					</j:bind>
		   		</bui:out>
		   	</td>
		</tr>
		
		<bui:out modes="view">
			<tr>
				<td class="form-label">Visualizza storico</td>
				<td class="form-values">
					<icare:viewStorico prop="vsImporto" provider="it.cedaf.icare.commons.supports.HqlByNamedQueryStoricoInfoProvider" idField="id" 
						params="stQueryName=interventi.Tariffario&stColumns=importo;50;it.cedaf.icare.commons.control.binding.requestbean.formatters.ImportoFormatter|importoFestivi;50;it.cedaf.icare.commons.control.binding.requestbean.formatters.ImportoFormatter"/>
				</td>
			</tr>
		</bui:out>
		<icare:storicizza2 prop="storicizzaImporti" />
	
	</table>
</shell:fieldset>