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