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 <input type="submit" name="add" value="Save" /> <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
73 </div> <!-- /.col-sm-10.col-sm-push-2 -->
75 <div class="col-sm-2 col-sm-pull-10">
77 [% INCLUDE 'circ-menu.inc' %]
79 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
82 [% MACRO jsinclude BLOCK %]
83 [% INCLUDE 'str/members-menu.inc' %]
84 [% Asset.js("js/members-menu.js") | $raw %]
87 [% FOREACH debit_type IN debit_types %]
88 type_fees['[% debit_type.code | html %]'] = "[% debit_type.default_amount | $Price %]";
90 $(document).ready(function(){
91 $('#maninvoice').preventDoubleFormSubmit();
92 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
93 $("#invoice_type").on("change",function(){
94 this.form.desc.value = this.options[this.selectedIndex].value;
95 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
97 $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
98 $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
99 $("#maninvoice #type").change(function(){
100 $("#maninvoice #desc").val($(this).find("option:selected").text());
101 $("#maninvoice #amount").val(type_fees[$(this).val()]);
107 [% INCLUDE 'intranet-bottom.inc' %]