7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Patrons › Create manual invoice</title>
9 [% INCLUDE 'doc-head-close.inc' %]
12 <body id="pat_maninvoice" class="pat">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'patron-search.inc' %]
16 <div id="breadcrumbs">
17 <a href="/cgi-bin/koha/mainpage.pl">Home</a> ›
18 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> ›
22 <div class="main container-fluid">
24 <div class="col-sm-10 col-sm-push-2">
27 [% INCLUDE 'members-toolbar.inc' %]
29 <!-- The manual invoice and credit buttons -->
30 <div class="statictabs">
32 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Transactions</a></li>
33 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
34 <li class="active"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
35 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
37 <div class="tabs-container">
40 [% IF ( ITEMNUMBER ) %]
41 ERROR an invalid itemnumber was entered, please hit back and try again
44 <form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice"><input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
45 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
46 <fieldset class="rows">
47 <legend>Manual invoice</legend>
50 <label for="type">Type: </label>
51 <select name="type" id="type">
52 [% FOREACH debit_type IN debit_types %]
53 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
57 <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" /></li>
58 <li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" /></li>
59 <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li>
60 <li><label for="amount">Amount: </label><input type="number" name="amount" id="amount" required="required" value="" step="any" min="0" /> Example: 5.00</li>
63 <fieldset class="action">
64 <button type="submit" name="add" value="save">Save</button>
65 <button type="submit" name="add" value="save and pay">Save and pay</button>
66 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
75 </div> <!-- /.col-sm-10.col-sm-push-2 -->
77 <div class="col-sm-2 col-sm-pull-10">
79 [% INCLUDE 'circ-menu.inc' %]
81 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
84 [% MACRO jsinclude BLOCK %]
85 [% INCLUDE 'str/members-menu.inc' %]
86 [% Asset.js("js/members-menu.js") | $raw %]
89 [% FOREACH debit_type IN debit_types %]
90 type_fees['[% debit_type.code | html %]'] = "[% debit_type.default_amount | $Price %]";
92 $(document).ready(function(){
93 $('#maninvoice').preventDoubleFormSubmit();
94 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
95 $("#invoice_type").on("change",function(){
96 this.form.desc.value = this.options[this.selectedIndex].value;
97 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
99 $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
100 $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
101 $("#maninvoice #type").change(function(){
102 $("#maninvoice #desc").val($(this).find("option:selected").text());
103 $("#maninvoice #amount").val(type_fees[$(this).val()]);
109 [% INCLUDE 'intranet-bottom.inc' %]