<!-- TMPL_INCLUDE NAME="doc-head-open.inc" -->Koha -- 系統管理: 
<!-- TMPL_IF NAME="add_form" --><!-- TMPL_IF NAME="searchfield" -->修改匯率 '<!-- TMPL NAME="searchfield" -->'<!-- TMPL_ELSE -->新增匯率<!-- /TMPL_IF --><!-- /TMPL_IF -->
<!-- TMPL_IF NAME="add_validate" -->資料已經被記錄<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirm" -->確認刪除匯率 '<!-- TMPL_VAR NAME="searchfield" -->'<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="delete_confirmed" -->匯率被刪除<!-- /TMPL_IF -->
<!-- TMPL_IF NAME="else" -->匯率<!-- /TMPL_IF -->
<!-- TMPL_INCLUDE NAME="doc-head-close.inc" -->
<!-- TMPL_INCLUDE NAME="masthead.inc" -->
<!-- TMPL_INCLUDE NAME="admin-topmenu.inc" -->
<!-- TMPL_INCLUDE NAME="intranet-nav.inc" -->

<div id="main">
<!-- TMPL_IF NAME=add_form -->
        <script>
        //
        function isNotNull(f,noalert) {
                if (f.value.length ==0) {
   return false;
                }
                return true;
        }
        //
        function toUC(f) {
                var x=f.value.toUpperCase();
                f.value=x;
                return true;
        }
        //
        function isNum(v,maybenull) {
        var n = new Number(v.value);
        if (isNaN(n)) {
                return false;
                }
        if (maybenull=="0" && v.value=="") {
                return false;
        }
        return true;
        }
        //
        function isDate(f) {
                var t = Date.parse(f.value);
                if (isNaN(t)) {
                        return false;
                }
        }
        //
        function Check(f) {
                var ok=1;
                var _alertString="";
                var alertString2;
                if (f.currency.value.length==0) {
                        _alertString += "- 匯率名稱遺失\\n";
                }
                if (f.rate.value.length==0) {
                        _alertString += "- 利率遺失\\n";
                }
                if (_alertString.length==0) {
                        document.Aform.submit();
                } else {
                        alertString2 = "表格無法寄送，因為接下來的問題\\n";
                        alertString2 += "------------------------------------------------------------------------------------\\n\\n";
                        alertString2 += _alertString;
                        alert(alertString2);
                }
        }
        </SCRIPT>

        <form action="<!-- TMPL_VAR NAME=script_name -->" name="Aform" method="post">
        <input type="hidden" name="op" value="add_validate" />

<div class="data">	<table>
	<caption><!-- TMPL_IF NAME=searchfield -->
		修改匯率
	<!-- TMPL_ELSE -->
		新增匯率
	<!-- /TMPL_IF --></caption>
	<!-- TMPL_IF NAME="searchfield" -->
		<tr>
			<th>匯率</th>
			<td>
				<input type="hidden" name="currency" value="<!-- TMPL_VAR NAME="searchfield" -->" /><!-- TMPL_VAR NAME="searchfield" -->
			</td>
		</tr>
	<!-- TMPL_ELSE -->
		<tr>
			<th>匯率</th>
			<td>
				<input type="text" name="currency" size="50" maxlength="50" onblur="toUC(this);" />
			</td>
		</tr>
	<!-- /TMPL_IF -->

        	<tr>
			<th>利率</th	>
			<td>
				<input type="text" name="rate" size="10" maxlength="10" value="<!-- TMPL_VAR NAME="rate" -->" />
			</td>
		</tr>
        </table></div>
		
		<input type="button" value="更新" onClick="Check(this.form)" class="submit" /> <input type="button" class="cancel" value="取消" onclick="location.href='<!-- TMPL_VAR NAME="script_name" -->'; return false;" />
        </form>

<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="add_validate" -->
<h3>資料被記錄</h3>
<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="submit" value="完成" class="submit" />
        </form>
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="delete_confirm" -->
<div class="table details">	<table><caption>確認刪除匯率 <em><!-- TMPL_VAR NAME="searchfield" --></em></caption>

		<tr>
			<th>匯率</th>
			<td><!-- TMPL_VAR NAME="searchfield" --></td>
		</tr>


        
        	<tr>
			<th>利率</th>
			<td><!-- TMPL_VAR NAME="rate" --></td>
		</tr>
		</table></div>
		<!-- TMPL_IF NAME="totalgtzero" -->

				<span class="alert">這個匯率已經被使用 <!-- TMPL_VAR NAME="total" --> 次。無法刪除</span>
				<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
					<input type="submit" value="完成" class="submit" />
				</form>
		<!-- TMPL_ELSE -->
<div class="tabitem">     	<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
			<input type="hidden" name="op" value="delete_confirmed" />
			<input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="searchfield" -->" />
				<input type="submit" value="刪除這個匯率" class="cancel" />
				</form>
				<form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
					<input type="submit" value="無法刪除" class="submit" />
				</form></div>
		<!-- /TMPL_IF -->
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="delete_confirmed" -->
<h3>匯率刪除</h3>
<div class="form"><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post">
		<input type="submit" value="完成" class="submit" />
	</form></div>
<!-- /TMPL_IF -->

<!-- TMPL_IF NAME="else" -->

<h2>匯率管理</h2>
	<div class="table"><table>
		<tr>
			<th>匯率</th>
			<th>利率</th>
			<th colspan="2">&nbsp;</th>
		</tr>
		<!-- TMPL_LOOP NAME="loop" -->
		<tr>
			<td><!-- TMPL_VAR NAME="currency" --></td>
			<td><!-- TMPL_VAR NAME="rate" --></td>
			<td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="post"><input type="hidden" name="op" value="add_form" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" class="submit" value="編輯" /></form></td>
                        <td><form action="<!-- TMPL_VAR NAME="script_name" -->" method="get"><input type="hidden" name="op" value="delete_confirm" /><input type="hidden" name="searchfield" value="<!-- TMPL_VAR NAME="currency" -->" /><input type="submit" value="刪除" class="delete" /></form></td>
		</tr>
		<!-- /TMPL_LOOP -->
	</table></div>
<form action="<!-- TMPL_VAR NAME=script_name -->" method="post">
        <input type="hidden" name="op" value="add_form" /><input type="submit" class="submit" value="新增匯率" />
        </form>

	
	<!-- TMPL_IF NAME="offsetgtzero" -->
		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="prevpage" -->">&lt;&lt; 前一頁</a>
	<!-- /TMPL_IF -->


	<!-- TMPL_IF NAME="ltcount" -->
		<a href="<!-- TMPL_VAR NAME="script_name" -->?offset=<!-- TMPL_VAR NAME="nextpage" -->">下一頁 &gt;&gt;</a>	
	<!-- /TMPL_iF -->

<!-- /TMPL_IF --></div>


<!-- TMPL_INCLUDE NAME="intranet-bottom.inc" -->
