calcolaCanone.jsp 1.22 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
<%@ include file="/project/include.jsp" %>	

<script type="text/javascript">
	function calcolaCanoneAlloggio() {
		var selRow = shellGetMasterSelectedRowAndAlertIfNotSelected();
		if (selRow < 0) {
			return;
		}

		if (confirm("Calcolare il canone dell'alloggio?")) {
			var id = cpGetMasterColumnValueOfCurrentRow('id');
			result = jsLoadString(
					'it.cedaf.icare.customers.zcomalg.control.action.CalcolaCanoneExecutor',
					'&id=' + id);
			if (result == "true") {
				cpReload();
				alert("Quota calcolata per l'anno corrente.");
			} else if (result == "false") {
				alert("Si  verificato un errore");
			} else if (result == "liq") {
				alert("Quota gi calcolata per l'anno corrente. Non  possibile ricalcolarla in quanto esiste una liquidazione nel periodo");
			}
			else if (result == "ERR(determina)") {
				alert("Inserire Data determina");
			}
		}
	}
</script>

<tr>
	<td class="form-label"><shell:label prop="calcolaCanone" /></td>
	<td class="form-values"><bui:out modes="view">
			<j:tile name="shell.plaintext" prop="calcolaCanone" />
			<shell:button id="btnCalcolaCanone"
				href="javascript:calcolaCanoneAlloggio();" text="Calcola"
				title="Calcola il canone annuale" img="commons.flag_green" />
		</bui:out></td>
</tr>