2 [% USE ColumnsSettings %]
3 [% INCLUDE 'doc-head-open.inc' %]
4 <title>Koha › Administration › Currencies & Exchange rates ›
5 [% IF op == 'add_form' %][% IF currency %]Modify currency '[% currency.currency %]'[% ELSE %]New currency[% END %][% END %]
6 [% IF op == 'delete_' %]Confirm deletion of currency '[% searchfield %]'[% END %]
7 [% IF op == 'list' %]Currencies[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 <link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
10 [% INCLUDE 'datatables.inc' %]
11 [% INCLUDE 'columns_settings.inc' %]
12 <script type="text/javascript">
15 function check_currency(val) {
17 $("#active").removeAttr('disabled');
20 $("#active").removeAttr('checked');
21 $("#active").attr('disabled','disabled');
22 $("#hint").html(_("The active currency must have a rate of 1.0"));
26 $(document).ready(function() {
27 columns_settings = [% ColumnsSettings.GetColumns( 'admin', 'currency', 'currencies-table', 'json' ) %]
28 var issuest = KohaTable("#currencies-table", {
29 dom: 'B<"clearfix">t',
31 { "aTargets": [ -1 ], "bSortable": false, "bSearchable": false },
32 { "sType": "title-string", "aTargets" : [ "title-string" ] }
34 }, columns_settings );
36 // prevents users to check active with a currency != 1
37 $("#rate").keyup(function() {
38 check_currency( $(this).val() );
40 check_currency( $("#rate").val() );
45 <body id="admin_currency" class="admin">
46 [% INCLUDE 'header.inc' %]
47 [% INCLUDE 'currencies-admin-search.inc' %]
51 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> › <a href="/cgi-bin/koha/admin/currency.pl">Currencies & Exchange rates</a> › [% IF op == 'add_form' %][% IF currency %]Modify currency '[% currency.currency %]'[% ELSE %]New currency[% END %][% END %]
52 [% IF op == 'delete_confirm' %]Confirm deletion of currency '<span class="ex">[% searchfield %]</span>'
53 [% ELSIF op == 'list' %]Currencies
57 <div id="doc3" class="yui-t2">
63 <div id="toolbar" class="btn-toolbar">
64 <a class="btn btn-small" id="newcurrency" href="/cgi-bin/koha/admin/currency.pl?op=add_form"><i class="fa fa-plus"></i> New currency</a>
68 [% IF op == 'add_form' %]
70 <form action="/cgi-bin/koha/admin/currency.pl" name="Aform" method="post" class="validated">
71 <input type="hidden" name="op" value="add_validate" />
72 <fieldset class="rows">
83 <span class="label">Currency: </span>
84 <input type="hidden" name="is_a_modif" value="1" />
85 <input type="hidden" name="currency_code" id="currency" value="[% currency.currency %]" />[% currency.currency %]
87 <label for="currency_code" class="required">Currency: </label>
88 <input type="text" name="currency_code" id="currency_code" size="50" maxlength="50" onblur="toUC(this);" required="required" class="required" /> <span class="required">Required</span>
92 <label for="rate" class="required">Rate: </label>
93 <input type="text" name="rate" id="rate" size="10" maxlength="10" value="[% currency.rate %]" required="required" class="required" /> <span class="required">Required</span>
96 <label for="symbol" class="required">Symbol: </label>
97 <input type="text" name="symbol" id="symbol" size="5" maxlength="5" value="[% currency.symbol %]" required="required" class="required" /> <span class="required">Required</span>
100 <label for="isocode">ISO code: </label>
101 <input type="text" name="isocode" id="isocode" size="5" maxlength="5" value="[% currency.isocode %]" />
104 <span class="label">Last updated: </span>[% currency.timestamp | $KohaDates %]
107 <label for="active">Active: </label>
108 [% IF currency.active %]
109 <input type="checkbox" id="active" name="active" value="1" checked="checked" />
111 <input type="checkbox" id="active" name="active" value="1" />
113 <span id="hint" class="hint"></span>
118 <fieldset class="action">
119 <input type="submit" value="Submit" />
120 <a href="/cgi-bin/koha/admin/currency.pl" class="cancel">Cancel</a>
126 [% IF op =='delete_confirm' %]
127 [% IF nb_of_orders %]
128 <div class="dialog alert">
129 <h3>Cannot delete currency <span class="ex">'[% currency.currency %]'</span></h3>
130 <p>This currency is used by [% nb_of_orders %] orders. Deletion not possible</p>
131 <form action="/cgi-bin/koha/admin/currency.pl" method="post">
132 <input type="submit" value="OK" class="approve" />
136 <div class="dialog alert">
137 <h3>Confirm deletion of currency <span class="ex">'[% currency.currency %]'</span></h3>
139 <tr><th>Currency</th>
140 <td>[% currency.currency %]</td>
143 <td>[% currency.rate %]</td>
146 <form action="/cgi-bin/koha/admin/currency.pl" method="post">
147 <input type="hidden" name="op" value="delete_confirmed" />
148 <input type="hidden" name="currency_code" value="[% currency.currency_code %]" />
149 <input type="submit" class="approve" value="Delete this currency" />
151 <form action="/cgi-bin/koha/admin/currency.pl" method="post">
152 <input type="submit" class="deny" value="No, do not delete" />
158 [% IF op == 'list' %]
160 <h2>Currencies and exchange rates</h2>
162 [% IF currencies and no_active_currency %]
163 <div class="dialog alert"><h3>No active currency is defined</h3><p>Please edit one currency and mark it as active.</p></div>
167 You searched for [% searchfield %]</span>
170 <table id='currencies-table'>
177 <th class="title-string">Last updated</th>
183 [% FOREACH currency IN currencies %]
185 <td>[% currency.currency %]</td>
186 <td>[% currency.rate %]</td>
187 <td>[% currency.symbol |html %]</td>
188 <td>[% currency.isocode |html %]</td>
189 <td><span title="[% currency.timestamp %]">[% currency.timestamp | $KohaDates %]</span></td>
190 <td style="color:green;">[% IF currency.active %]✓[% END %]</td>
192 <a href="/cgi-bin/koha/admin/currency.pl?op=add_form&currency_code=[% currency.currency %]">Edit</a>
194 <a href="/cgi-bin/koha/admin/currency.pl?op=delete_confirm&currency_code=[% currency.currency %]">Delete</a>
204 When importing MARC files via the staging tools, the tool will attempt to find and use the price of the currently active currency.
207 Some examples of compatible price fields include "$9.99", "9.99 USD", "$9.99 USD", "9.99 USD (10.00 CAN)", "$9.99 USD (paperback)".
208 These examples assume USD is the active currency.
217 [% INCLUDE 'admin-menu.inc' %]
220 [% INCLUDE 'intranet-bottom.inc' %]