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">
39 [% IF error == 'itemnumber' %]
40 <div id="error_message" class="dialog alert">
41 Error: Invalid barcode entered, please try again
44 <div id="error_message" class="dialog alert">
45 An error occurred, please try again: [% error | html %]
48 <form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice">
49 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
50 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
51 <fieldset class="rows">
52 <legend>Manual invoice</legend>
55 <label for="type">Type: </label>
56 <select name="type" id="type">
57 [% FOREACH debit_type IN debit_types %]
58 [% IF debit_type.code == type %]
59 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
61 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
66 <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" value="[% barcode | html %]" /></li>
67 <li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" value="[% desc | html %]" /></li>
68 <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" value="[% note | html %]" /></li>
69 <li><label for="amount">Amount: </label><input type="number" name="amount" id="amount" required="required" step="any" min="0" value="[% amount | $Price on_editing => 1 %]" /> Example: 5.00</li>
72 <fieldset class="action">
73 <button type="submit" name="add" value="save">Save</button>
74 <button type="submit" name="add" value="save and pay">Save and pay</button>
75 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
83 </div> <!-- /.col-sm-10.col-sm-push-2 -->
85 <div class="col-sm-2 col-sm-pull-10">
87 [% INCLUDE 'circ-menu.inc' %]
89 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
92 [% MACRO jsinclude BLOCK %]
93 [% INCLUDE 'str/members-menu.inc' %]
94 [% Asset.js("js/members-menu.js") | $raw %]
97 [% FOREACH debit_type IN debit_types %]
98 type_fees['[% debit_type.code | html %]'] = "[% debit_type.default_amount | $Price %]";
100 $(document).ready(function(){
101 $('#maninvoice').preventDoubleFormSubmit();
102 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
103 $("#invoice_type").on("change",function(){
104 this.form.desc.value = this.options[this.selectedIndex].value;
105 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
107 [% UNLESS amount.defined %]
108 $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
109 $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
111 $("#maninvoice #type").change(function(){
112 $("#maninvoice #desc").val($(this).find("option:selected").text());
113 $("#maninvoice #amount").val(type_fees[$(this).val()]);
119 [% INCLUDE 'intranet-bottom.inc' %]