Line 0
Link Here
|
|
|
1 |
[% INCLUDE 'doc-head-open.inc' %] |
2 |
<title>Koha › Reports [% IF ( do_it ) %]› Cash Register Statistics › Results[% ELSE %]› Cash Register Statistics[% END %]</title> |
3 |
[% INCLUDE 'doc-head-close.inc' %] |
4 |
[% INCLUDE 'calendar.inc' %] |
5 |
<script type="text/javascript"> |
6 |
//<![CDATA[ |
7 |
actTotal = ""; |
8 |
|
9 |
function isNull(f,noalert) { |
10 |
if (f.value.length > 0) { |
11 |
return false; |
12 |
} |
13 |
return true; |
14 |
} |
15 |
|
16 |
function Check(ff) { |
17 |
var ok=0; |
18 |
var _alertString= _("Form not submitted because of the following problem(s)")+"\n"; |
19 |
|
20 |
_alertString +="-------------------------------------------------------------------\n\n"; |
21 |
|
22 |
if ( isNull(ff.fromRO,1) || isNull(ff.toRO,1) ){ |
23 |
ok=1; |
24 |
_alertString += "\n- " + _("Dates cannot be empty"); |
25 |
} |
26 |
|
27 |
if (ok) { |
28 |
alert(_alertString); |
29 |
}else{ |
30 |
ff.submit(); |
31 |
} |
32 |
|
33 |
} |
34 |
|
35 |
//]]> |
36 |
</script> |
37 |
|
38 |
</head> |
39 |
<body> |
40 |
[% INCLUDE 'header.inc' %] |
41 |
[% INCLUDE 'cat-search.inc' %] |
42 |
|
43 |
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a> [% IF ( do_it ) %]› <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash Register Statistics</a> › Results[% ELSE %] › Cash Register Statistics [% END %]</div> |
44 |
|
45 |
<div id="doc3" class="yui-t2"> |
46 |
|
47 |
<div id="bd"> |
48 |
<div id="yui-main"> |
49 |
<div class="yui-b"> |
50 |
|
51 |
[% IF ( do_it ) %] |
52 |
<h1>Cash register statistics</h1> |
53 |
<form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl"> |
54 |
<fieldset class="rows"> |
55 |
<legend>Cash Register statistics [% beginDate %] to [% endDate %]</legend> |
56 |
<table> |
57 |
<thead> |
58 |
<tr> |
59 |
<th>Interval</th> |
60 |
</tr> |
61 |
</thead> |
62 |
<tbody> |
63 |
|
64 |
<tr> |
65 |
<td> From <input type="text" size="10" id="fromRO" name="Filter" value="[% beginDate %]" /> |
66 |
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" /> |
67 |
<script type="text/javascript"> |
68 |
//<![CDATA[ |
69 |
function validate1(date) { |
70 |
var day = date.getDate(); |
71 |
var month = date.getMonth() + 1; |
72 |
var year = date.getFullYear(); |
73 |
var weekDay = date.getDay(); |
74 |
var dayMonth = month + '-' + day; |
75 |
var dateString = year + '-' + month + '-' + day; |
76 |
var dateTo = document.getElementById('toRO').value.split("-"); |
77 |
var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]); |
78 |
if (date > limitDate) { |
79 |
return true; |
80 |
} else { |
81 |
return false; |
82 |
} |
83 |
} |
84 |
|
85 |
Calendar.setup( |
86 |
{ |
87 |
inputField : "fromRO", |
88 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
89 |
button : "openCalendarFromRO", |
90 |
disableFunc : validate1, |
91 |
dateStatusFunc : validate1 |
92 |
} |
93 |
); |
94 |
//]]> |
95 |
</script> |
96 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
97 |
To <input type="text" size="10" id="toRO" name="Filter" value="[% endDate %]" /> |
98 |
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarToRO" style="cursor: pointer;" border="0" /> |
99 |
<script type="text/javascript"> |
100 |
//<![CDATA[ |
101 |
function validate2(date) { |
102 |
var day = date.getDate(); |
103 |
var month = date.getMonth() + 1; |
104 |
var year = date.getFullYear(); |
105 |
var weekDay = date.getDay(); |
106 |
var dayMonth = month + '-' + day; |
107 |
var dateString = year + '-' + month + '-' + day; |
108 |
var dateFrom = document.getElementById('fromRO').value.split("-"); |
109 |
var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]); |
110 |
if (limitDate > date) { |
111 |
return true; |
112 |
} else { |
113 |
return false; |
114 |
} |
115 |
} |
116 |
|
117 |
Calendar.setup( |
118 |
{ |
119 |
inputField : "toRO", |
120 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
121 |
button : "openCalendarToRO", |
122 |
disableFunc : validate2, |
123 |
dateStatusFunc : validate2 |
124 |
} |
125 |
); |
126 |
//]]> |
127 |
</script> |
128 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
129 |
</td> |
130 |
</tr> |
131 |
|
132 |
</tbody> |
133 |
</table><br /> |
134 |
</fieldset> |
135 |
|
136 |
<fieldset class="rows"> |
137 |
<legend>Output</legend> |
138 |
<ol> |
139 |
<li> |
140 |
<label for="outputscreen">To screen into the browser: </label> |
141 |
<input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> |
142 |
</li> |
143 |
<li> |
144 |
<label for="outputfile">To a file:</label> |
145 |
<input type="radio" name="output" value="file" id="outputfile" /> |
146 |
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> |
147 |
<label class="inline" for="MIME">Into an application</label>[% CGIextChoice %] |
148 |
[% CGIsepChoice %] |
149 |
</li> |
150 |
</ol> |
151 |
</fieldset> |
152 |
|
153 |
<fieldset class="action"> |
154 |
<input type="button" value="Submit" onclick="Check(this.form)"/> |
155 |
<input type="hidden" name="report_name" value="[% report_name %]" /> |
156 |
<input type="hidden" name="do_it" value="1" /> |
157 |
</fieldset> |
158 |
</form> |
159 |
|
160 |
<table style="margin-top:30px;"> |
161 |
<tr > |
162 |
<th>Borrower Number</th> |
163 |
<th>Date</th> |
164 |
<th>Surname</th> |
165 |
<th>Firstname</th> |
166 |
<th>Amount</th> |
167 |
</tr> |
168 |
[% FOREACH loopresul IN loopresult %] |
169 |
<tr> |
170 |
<td>[% loopresul.borrowernumber %]</td> |
171 |
<td>[% loopresul.date %]</td> |
172 |
<td>[% loopresul.surname %]</td> |
173 |
<td>[% loopresul.firstname %]</td> |
174 |
<td style="text-align:right;">[% loopresul.amount %]</td> |
175 |
</tr> |
176 |
[% END %] |
177 |
<tr> |
178 |
<th colspan="4" style="text-align:right;">TOTAL</th> |
179 |
<th style="text-align:right;">[% total %]</th> |
180 |
</tr> |
181 |
|
182 |
</table> |
183 |
|
184 |
[% ELSE %] |
185 |
<h1>Cash register report</h1> |
186 |
<form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl"> |
187 |
<fieldset class="rows"> |
188 |
<legend>Cash Register statistics</legend> |
189 |
<table> |
190 |
<thead> |
191 |
<tr> |
192 |
<th>Interval</th> |
193 |
</tr> |
194 |
</thead> |
195 |
<tbody> |
196 |
|
197 |
<tr> |
198 |
<td> From <input type="text" size="10" id="fromRO" name="Filter" value="" /> |
199 |
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" border="0" id="openCalendarFromRO" style="cursor: pointer;" /> |
200 |
<script type="text/javascript"> |
201 |
//<![CDATA[ |
202 |
function validate1(date) { |
203 |
var day = date.getDate(); |
204 |
var month = date.getMonth() + 1; |
205 |
var year = date.getFullYear(); |
206 |
var weekDay = date.getDay(); |
207 |
var dayMonth = month + '-' + day; |
208 |
var dateString = year + '-' + month + '-' + day; |
209 |
var dateTo = document.getElementById('toRO').value.split("-"); |
210 |
var limitDate = new Date(dateTo[0], (dateTo[1] - 1), dateTo[2]); |
211 |
if (date > limitDate) { |
212 |
return true; |
213 |
} else { |
214 |
return false; |
215 |
} |
216 |
} |
217 |
|
218 |
Calendar.setup( |
219 |
{ |
220 |
inputField : "fromRO", |
221 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
222 |
button : "openCalendarFromRO", |
223 |
disableFunc : validate1, |
224 |
dateStatusFunc : validate1 |
225 |
} |
226 |
); |
227 |
//]]> |
228 |
</script> |
229 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
230 |
To <input type="text" size="10" id="toRO" name="Filter" value="" /> |
231 |
<img src="[% themelang %]/lib/calendar/cal.gif" alt="Show Calendar" id="openCalendarToRO" style="cursor: pointer;" border="0" /> |
232 |
<script type="text/javascript"> |
233 |
//<![CDATA[ |
234 |
function validate2(date) { |
235 |
var day = date.getDate(); |
236 |
var month = date.getMonth() + 1; |
237 |
var year = date.getFullYear(); |
238 |
var weekDay = date.getDay(); |
239 |
var dayMonth = month + '-' + day; |
240 |
var dateString = year + '-' + month + '-' + day; |
241 |
var dateFrom = document.getElementById('fromRO').value.split("-"); |
242 |
var limitDate = new Date(dateFrom[0], (dateFrom[1] - 1), dateFrom[2]); |
243 |
if (limitDate > date) { |
244 |
return true; |
245 |
} else { |
246 |
return false; |
247 |
} |
248 |
} |
249 |
|
250 |
Calendar.setup( |
251 |
{ |
252 |
inputField : "toRO", |
253 |
ifFormat : "[% DHTMLcalendar_dateformat %]", |
254 |
button : "openCalendarToRO", |
255 |
disableFunc : validate2, |
256 |
dateStatusFunc : validate2 |
257 |
} |
258 |
); |
259 |
//]]> |
260 |
</script> |
261 |
<span class="hint">[% INCLUDE 'date-format.inc' %]</span> |
262 |
</td> |
263 |
</tr> |
264 |
|
265 |
</tbody> |
266 |
</table><br /> |
267 |
</fieldset> |
268 |
|
269 |
<fieldset class="rows"> |
270 |
<legend>Output</legend> |
271 |
<ol> |
272 |
<li> |
273 |
<label for="outputscreen">To screen into the browser: </label> |
274 |
<input type="radio" checked="checked" name="output" id="outputscreen" value="screen" /> |
275 |
</li> |
276 |
<li> |
277 |
<label for="outputfile">To a file:</label> |
278 |
<input type="radio" name="output" value="file" id="outputfile" /> |
279 |
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" /> |
280 |
<label class="inline" for="MIME">Into an application</label>[% CGIextChoice %] |
281 |
[% CGIsepChoice %] |
282 |
</li> |
283 |
</ol> |
284 |
</fieldset> |
285 |
|
286 |
<fieldset class="action"> |
287 |
<input type="button" value="Submit" onclick="Check(this.form)"/> |
288 |
<input type="hidden" name="report_name" value="[% report_name %]" /> |
289 |
<input type="hidden" name="do_it" value="1" /> |
290 |
</fieldset> |
291 |
</form> |
292 |
[% END %] |
293 |
</div> |
294 |
</div> |
295 |
<div class="yui-b"> |
296 |
[% INCLUDE 'reports-menu.inc' %] |
297 |
</div> |
298 |
</div> |
299 |
[% INCLUDE 'intranet-bottom.inc' %] |