Main Koha release repository https://koha-community.org
選択できるのは25トピックまでです。 トピックは、先頭が英数字で、英数字とダッシュ('-')を使用した35文字以内のものにしてください。
 
 
 
 
 
 

250 行
10 KiB

  1. [% USE raw %]
  2. [% USE Asset %]
  3. [% USE Branches %]
  4. [% USE Koha %]
  5. [% USE KohaDates %]
  6. [% USE Price %]
  7. [% USE ItemTypes %]
  8. [% USE Registers %]
  9. [% SET footerjs = 1 %]
  10. [% PROCESS 'accounts.inc' %]
  11. [% INCLUDE 'doc-head-open.inc' %]
  12. <title>Koha &rsaquo; Reports [% IF ( do_it ) %]&rsaquo; Cash register statistics &rsaquo; Results[% ELSE %]&rsaquo; Cash register statistics[% END %]</title>
  13. [% INCLUDE 'doc-head-close.inc' %]
  14. </head>
  15. <body id="cash_register_stats" class="rep">
  16. [% INCLUDE 'header.inc' %]
  17. [% INCLUDE 'cat-search.inc' %]
  18. <div id="breadcrumbs">
  19. <a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
  20. &rsaquo;
  21. [% IF ( do_it ) %]
  22. <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a> &rsaquo; Results
  23. [% ELSE %]
  24. Cash register statistics
  25. [% END %]
  26. </div>
  27. <div class="main container-fluid">
  28. <div class="row">
  29. <div class="col-sm-10 col-sm-push-2">
  30. <main>
  31. <h1>Cash register statistics</h1>
  32. <form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
  33. <fieldset class="rows">
  34. <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
  35. <ol>
  36. <br>
  37. <li>
  38. <label for="from">From: </label>
  39. <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="datepickerfrom" />
  40. <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
  41. </li>
  42. <li>
  43. <label for="to">To: </label>
  44. <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="datepickerto" />
  45. <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
  46. </li>
  47. <li>
  48. <label for="">Transaction type:</label>
  49. <select name="transaction_type" id="transaction_type">
  50. [% IF transaction_type == "ALL" %]
  51. <option value="ALL" selected="selected">All transactions</option>
  52. [% ELSE %]
  53. <option value="ALL">All transactions</option>
  54. [% END %]
  55. [% IF transaction_type == "ACT" %]
  56. <option value="ACT" selected="selected">All payments to the library</option>
  57. [% ELSE %]
  58. <option value="ACT">All payments to the library</option>
  59. [% END %]
  60. [% IF transaction_type == "FORW" %]
  61. <option value="FORW" selected="selected">Write off</option>
  62. [% ELSE %]
  63. <option value="FORW">Write off</option>
  64. [% END %]
  65. [% FOREACH debit_type IN debit_types %]
  66. [% IF transaction_type == debit_type.code %]
  67. <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
  68. [% ELSE %]
  69. <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
  70. [% END %]
  71. [% END %]
  72. [% FOREACH credit_type IN credit_types %]
  73. [% IF transaction_type == credit_type.code %]
  74. <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
  75. [% ELSE %]
  76. <option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
  77. [% END %]
  78. [% END %]
  79. </select>
  80. </li>
  81. <li>
  82. <label>Transaction library</label>
  83. <select name="branch" id="branch">
  84. <option value="ALL">All</option>
  85. [% FOREACH branchloo IN branchloop %]
  86. [% IF ( branchloo.selected ) %]
  87. <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
  88. [% ELSE %]
  89. <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
  90. [% END %]
  91. [% END %]
  92. </select>
  93. </li>
  94. [% IF Koha.Preference('UseCashRegisters') %]
  95. <li>
  96. <label for="registerid">Cash register: </label>
  97. <select name="registerid" id="registerid">
  98. <option id="noregister" selected="selected" value="">-- All --</option>
  99. [% PROCESS options_for_registers registers => Registers.all( selected => registerid ) %]
  100. </select>
  101. </li>
  102. [% END %]
  103. </ol>
  104. </fieldset>
  105. <fieldset class="rows">
  106. <legend>Output</legend>
  107. <ol>
  108. <li>
  109. <label for="outputscreen">To screen into the browser: </label>
  110. <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
  111. </li>
  112. <li>
  113. <label for="outputfile">To a file:</label>
  114. <input type="radio" name="output" value="file" id="outputfile" />
  115. <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
  116. </li>
  117. </ol>
  118. </fieldset>
  119. <fieldset class="action">
  120. <input type="submit" value="Submit" name="do_it" />
  121. </fieldset>
  122. </form>
  123. [% IF ( do_it ) %]
  124. <div>&nbsp;</div>
  125. <table id="tbl_cash_register_stats">
  126. <thead>
  127. <tr>
  128. <th>Manager name</th>
  129. <th>Patron card number</th>
  130. <th>Patron name</th>
  131. <th>Transaction library</th>
  132. <th>Transaction date</th>
  133. <th>Transaction type</th>
  134. <th>Notes</th>
  135. <th>Amount</th>
  136. <th>Bibliographic record title</th>
  137. <th>Barcode</th>
  138. <th>Item type</th>
  139. </tr>
  140. </thead>
  141. [% FOREACH loopresul IN loopresult %]
  142. <tr>
  143. <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
  144. <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
  145. <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
  146. <td>[% loopresul.branchname | html %]</td>
  147. <td>[% loopresul.date | $KohaDates %]</td>
  148. <td>
  149. [% IF loopresul.credit_type == "ACT" %]
  150. <span>All payments to the library</span>
  151. [% ELSE %]
  152. [%- PROCESS account_type_description account=loopresul -%]
  153. [% END %]
  154. </td>
  155. <td>[% loopresul.note | html %]</td>
  156. <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
  157. <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
  158. <td>[% loopresul.barcode | html %]</td>
  159. <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
  160. </tr>
  161. [% END %]
  162. <tfoot>
  163. <tr>
  164. [% IF transaction_type == "ACT" %]
  165. <th colspan="7" style="text-align:right;">TOTAL</th>
  166. <th style="text-align:right;">[% total | $Price %]</th>
  167. <th colspan="3">&nbsp;</th>
  168. [% END %]
  169. </tr>
  170. </tfoot>
  171. </table>
  172. [% END %] [%# do_it %]
  173. </main>
  174. </div> <!-- /.col-sm-10.col-sm-push-2 -->
  175. <div class="col-sm-2 col-sm-pull-10">
  176. <aside>
  177. [% INCLUDE 'reports-menu.inc' %]
  178. </aside>
  179. </div> <!-- /.col-sm-2.col-sm-pull-10 -->
  180. </div> <!-- /.row -->
  181. [% MACRO jsinclude BLOCK %]
  182. [% Asset.js("js/register_selection.js") | $raw %]
  183. [% INCLUDE 'datatables.inc' %]
  184. <script id="js">
  185. $(document).ready(function() {
  186. $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
  187. "iDisplayLength": 50,
  188. "sPaginationType": "full_numbers"
  189. }));
  190. });
  191. </script>
  192. [% INCLUDE 'calendar.inc' %]
  193. <script>
  194. actTotal = "";
  195. $(document).ready(function() {
  196. // http://jqueryui.com/demos/datepicker/#date-range
  197. var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
  198. changeMonth: true,
  199. numberOfMonths: 1,
  200. onSelect: function( selectedDate ) {
  201. var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
  202. instance = $( this ).data( "datepicker" );
  203. date = $.datepicker.parseDate(
  204. instance.settings.dateFormat ||
  205. $.datepicker._defaults.dateFormat,
  206. selectedDate, instance.settings );
  207. dates.not( this ).datepicker( "option", option, date );
  208. }
  209. });
  210. $('#frmCashRegister').submit(function() {
  211. var isFormValid = true;
  212. var alertString= _("Form not submitted because of the following problem(s)")+"\n";
  213. alertString +="-------------------------------------------------------------------\n\n";
  214. if ( !$('#from').val() || !$('#to').val()){
  215. isFormValid = false;
  216. alertString += "\n- " + _("Dates cannot be empty");
  217. }
  218. if (!isFormValid) {
  219. alert(alertString);
  220. return false;
  221. }
  222. });
  223. });
  224. </script>
  225. [% END %]
  226. [% INCLUDE 'intranet-bottom.inc' %]