1 [% INCLUDE 'doc-head-open.inc' %]
2 [% INCLUDE 'doc-head-close.inc' %]
3 [% INCLUDE 'calendar.inc' %]
4 <script type="text/javascript" src="[% themelang %]/js/acq.js"></script>
5 <script type="text/javascript" src="[% themelang %]/lib/jquery/plugins/jquery.tablesorter.min.js"></script>
6 <script type="text/javascript">
7 // #################################################################################
9 // #################################################################################
10 function CheckDuplicateForm(f){
14 if(!(isNotNull(f.budget_period_startdate,1))){
15 _alertString += "\n- " + _("Start date missing");
17 if (!(isNotNull(f.budget_period_enddate,1))){
18 _alertString += "\n- " + _("End date missing");
20 if( f.budget_period_startdate > f.budget_period_enddate ) {
21 _alertString += "\n- " + _("Start date must be before end date");
24 if(_alertString.length==0){
27 alertString += _("Form not submitted because of the following problem(s)");
28 alertString += "\n-----------------------------------------\n";
29 alertString += _alertString;
38 if (!(isNotNull(f.budget_period_startdate,1))) {
39 _alertString += "\n- " + _("Start date missing");
42 if (!(isNotNull(f.budget_period_enddate,1))) {
43 _alertString += "\n- " + _("End date missing");
46 if ( f.budget_period_startdate > f.budget_period_enddate ) {
47 _alertString += "\n- " + _("Start date must be before end date");
50 if (!(isNotNull(f.budget_period_description,1))) {
51 _alertString += "\n- " + _("Description missing");
54 if (!(isNum(f.budget_period_total))) {
55 _alertString += "\n- " + _("Amount must be a valid number, or empty");
63 if (_alertString.length==0) {
66 alertString2 = _("Form not submitted because of the following problem(s)");
67 alertString2 += "\n------------------------------------------------------------------------------------\n";
68 alertString2 += _alertString;
72 $(document).ready(function() {
73 $("#periodsh").tablesorter({
76 headers: {6:{sorter:false}}
82 Koha › Administration › Budgets
84 [% IF ( add_form ) %]›
85 [% IF ( budget_period_id ) %]
86 Modify budget'[% budget_period_id %]'
91 [% IF ( duplicate_form ) %]› Duplicate budget[% END %]
92 [% IF ( delete_confirm ) %]›
93 Delete budget '[% budget_period_description %]'?
95 [% IF ( delete_confirmed ) %]›
103 <body id="admin_aqbudgetperiods" class="admin">
105 [% INCLUDE 'header.inc' %]
106 [% INCLUDE 'budgets-admin-search.inc' %]
108 <!-- ################################################################################# -->
110 <!-- ################################################################################# -->
112 <div id="breadcrumbs">
113 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
114 <a href="/cgi-bin/koha/admin/admin-home.pl">Administration</a> ›
116 <!-- add or modify a budget period -->
117 <!-- ####################################### -->
118 [% IF ( add_form ) %]
119 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budget</a> ›
120 [% IF ( budget_period_id ) %]
121 Modify budget [% budget_period_description %]
128 <!-- delete a budget period -->
129 <!-- ################################ -->
130 [% IF ( delete_confirm ) %]
131 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> ›
133 Cannot delete budget '[% budget_period_description %]'
135 Delete budget '[% budget_period_description %]'?
138 <!-- duplicate a budget -->
139 [% IF ( duplicate_form ) %]
140 <a href="/cgi-bin/koha/admin/aqbudgetperiods.pl">Budgets</a> › Duplicate budget
142 <!-- display budget periods list -->
143 <!-- ########################################## -->
145 Budgets administration
149 <div id="doc3" class="yui-t2">
154 [% INCLUDE 'budgets-admin-toolbar.inc' %]
156 [% IF ( duplicate_form ) %]
157 <h3>Duplicate budget</h3>
158 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
159 <fieldset class="rows">
160 <input type="hidden" name="op" value="duplicate_budget" />
161 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
166 <label class="required" for="from">Start date</label>
167 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate %]" class="datepickerfrom" />
168 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
172 <label class="required" for="to">End date</label>
173 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate %]" class="datepickerto" />
174 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
180 <fieldset class="action">
181 <input type="button" value="Save Changes" onclick="CheckDuplicateForm(this.form)" /> <a class="cancel" href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]">Cancel</a>
188 [% IF ( add_form ) %]
189 <!-- add or modify a budget period -->
191 [% IF ( budget_period_id ) %]
192 <h3>Modify budget</h3>
196 <form action="/cgi-bin/koha/admin/aqbudgetperiods.pl" name="f" method="post">
197 <fieldset class="rows">
198 <!-- ################################################################################# -->
199 <!-- display information about the budget period that must be added or modified -->
200 <!-- ################################################################################# -->
201 <input type="hidden" name="op" value="add_validate" />
202 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
205 <label class="required" for="from">Start date</label>
206 <input type="text" size="10" id="from" name="budget_period_startdate" value="[% budget_period_startdate %]" class="datepickerfrom" />
207 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
211 <label class="required" for="to">End date</label>
212 <input type="text" size="10" id="to" name="budget_period_enddate" value="[% budget_period_enddate %]" class="datepickerto" />
213 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
218 <!-- ############################## -->
219 <label class="required" for="budget_period_description">Description</label>
220 <input type="text" id="budget_period_description" name="budget_period_description"
221 size="48" maxlength="80" value="[% budget_period_description %]" />
226 <!-- ############################## -->
227 <label for="budget_period_total">Total amount</label>
228 <input type="text" id="budget_period_total" name="budget_period_total"
229 size="10" maxlength="80" value="[% budget_period_total %]" />
234 <!-- ############################## -->
235 <label for="budget_period_active">Make budget active</label>
236 [% IF ( budget_period_active ) %]<input type="checkbox" checked="checked" id="budget_period_active" name="budget_period_active" value="1" />[% ELSE %] <input type="checkbox" id="budget_period_active" name="budget_period_active" value="1"/> [% END %]
241 <!-- ############################## -->
242 <label for="budget_period_locked">Lock budget</label>
243 [% IF ( budget_period_locked ) %]<input type="checkbox" checked="checked" id="budget_period_locked" name="budget_period_locked" value="1" />[% ELSE %] <input type="checkbox" id="budget_period_locked" name="budget_period_locked" value="1"/> [% END %]
248 <fieldset class="action">
249 <!-- "save changes" button -->
250 <!-- ###################################### -->
251 <input type="button" value="Save changes" onclick="Check(this.form)" />
252 <!-- <input type="submit" value="Save Changes" /> -->
253 [% IF ( budget_period_id ) %]<a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% budget_period_id %]" class="cancel">Cancel</a>[% END %]
260 <!-- ####################################################################### -->
261 <!-- delete a budget period -->
262 <!-- ####################################################################### -->
264 [% IF ( delete_confirm ) %]
266 <div class="dialog message">
267 <h3>Cannot delete budget</h3>
268 <p><strong>This record is used [% total %] times</strong>
269 . Deletion is not possible.</p>
271 <div class="dialog alert">
272 <h3>Delete budget '[% budget_period_description %]'?</h3>
275 <!-- ############################################################# -->
276 <!-- "delete" and "cancel" buttons -->
277 <!-- ############################################################# -->
279 <form action="[% script_name %]" method="post">
280 <input type="hidden" name="op" value="delete_confirmed" />
281 <input type="hidden" name="budget_period_id" value="[% budget_period_id %]" />
282 <input type="submit" class="approve" value="Delete" />
285 <form action="[% script_name %]" method="post">
286 <input type="submit" class="deny" value="Cancel" />
291 <!-- DEFAULT display budget periods list -->
293 <h2>Budgets administration</h2>
295 [% INCLUDE 'budgets-active-currency.inc' %]
297 <table id="periodsh">
310 [% FOREACH period_loo IN period_loop %]
311 [% IF ( loop.odd ) %]
314 <tr class="highlight">
316 <td><a href="/cgi-bin/koha/admin/aqbudgets.pl?budget_period_id=[% period_loo.budget_period_id %]" title="View funds for [% period_loo.budget_period_description %]">[% period_loo.budget_period_description %]</a></td>
317 <td>[% period_loo.budget_period_startdate %]</td>
318 <td>[% period_loo.budget_period_enddate %]</td>
319 <td>[% IF ( period_loo.budget_period_active ) %]<span style="color:green;">Active</span> [% ELSE %][% END %] </td>
320 <td> [% IF ( period_loo.budget_period_locked ) %]<span style="color:green;">Locked</span> [% ELSE %][% END %] </td>
321 <td align='right'>[% period_loo.budget_period_total %]</td>
323 <a href="[% period_loo.script_name %]?op=add_form&budget_period_id=[% period_loo.budget_period_id |html %]">Edit</a>
324 <a href="[% period_loo.script_name %]?op=delete_confirm&budget_period_id=[% period_loo.budget_period_id %]">Delete</a>
325 <a href="/cgi-bin/koha/admin/aqbudgets.pl?op=add_form&budget_period_id=[% period_loo.budget_period_id %]">Add fund</a>
329 [% UNLESS ( period_loop ) %]
330 <tr><td colspan="7">No budget</td></tr>
334 <div class="pages">[% pagination_bar %]</div>
341 [% INCLUDE 'acquisitions-menu.inc' %]
345 [% INCLUDE 'intranet-bottom.inc' %]