Bug 20538: Remove the need of writing [% KOHA_VERSION %] everywhere
[koha.git] / koha-tmpl / intranet-tmpl / prog / en / modules / members / maninvoice.tt
1 [% USE Asset %]
2 [% USE Koha %]
3 [% SET footerjs = 1 %]
4 [% INCLUDE 'doc-head-open.inc' %]
5 <title>Koha &rsaquo; Patrons &rsaquo; Create manual invoice</title>
6 [% INCLUDE 'doc-head-close.inc' %]
7 </head>
8
9 <body id="pat_maninvoice" class="pat">
10 [% INCLUDE 'header.inc' %]
11 [% INCLUDE 'patron-search.inc' %]
12
13 <div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo; <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>  &rsaquo; Manual invoice</div>
14
15 <div id="doc3" class="yui-t2">
16    
17    <div id="bd">
18         <div id="yui-main">
19         <div class="yui-b">
20 [% INCLUDE 'members-toolbar.inc' %]
21
22 <!-- The manual invoice and credit buttons -->
23 <div class="statictabs">
24 <ul>
25     <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
26     <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
27     <li class="active"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
28     <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
29 </ul>
30 <div class="tabs-container">
31
32 [% IF ( ERROR ) %]
33 [% IF ( ITEMNUMBER ) %]
34   ERROR an invalid itemnumber was entered, please hit back and try again
35 [% END %]
36 [% ELSE %]
37 <form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
38         <fieldset class="rows">
39         <legend>Manual invoice</legend>
40         <ol>
41       <li>
42         <label for="type">Type: </label>
43         <select name="type" id="invoice_type">
44           <option value="L">Lost item</option>
45           <option value="F">Fine</option>
46           <option value="A">Account management fee</option>
47           <option value="N">New card</option>
48           <option value="M">Sundry</option>
49           [% FOREACH invoice_types_loo IN invoice_types_loop %]
50             <option value="[% invoice_types_loo.authorised_value %]">[% invoice_types_loo.authorised_value %]</option>
51           [% END %]
52         </select>
53       </li>
54         <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" /></li>
55         <li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" /></li>
56     <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li>
57     <li><label for="amount">Amount: </label><input type="number" name="amount" id="amount" required="required" value="" step="any" min="0" /> Example: 5.00</li>
58         </ol></fieldset>
59 <fieldset class="action"><input type="submit" name="add" value="Save" /> <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a></fieldset>
60 </form>
61
62 [% END %]
63 </div></div>
64
65 </div>
66 </div>
67
68 <div class="yui-b">
69 [% INCLUDE 'circ-menu.inc' %]
70 </div>
71 </div>
72
73 [% MACRO jsinclude BLOCK %]
74     [% Asset.js("js/members-menu.js") %]
75     <script type="text/javascript">
76         var type_fees = {'L':'','F':'','A':'','N':'','M':''};
77         [% FOREACH invoice_types_loo IN invoice_types_loop %]
78             type_fees['[% invoice_types_loo.authorised_value %]'] = "[% invoice_types_loo.lib %]";
79         [% END %]
80         $(document).ready(function(){
81             $('#maninvoice').preventDoubleFormSubmit();
82             $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
83             $("#invoice_type").on("change",function(){
84                 this.form.desc.value = this.options[this.selectedIndex].value;
85                 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
86             });
87         });
88     </script>
89 [% END %]
90
91 [% INCLUDE 'intranet-bottom.inc' %]