8 [% PROCESS 'accounts.inc' %]
10 [% INCLUDE 'doc-head-open.inc' %]
11 <title>Create manual invoice › Patrons › Koha</title>
12 [% INCLUDE 'doc-head-close.inc' %]
15 <body id="pat_maninvoice" class="pat">
16 [% INCLUDE 'header.inc' %]
17 [% INCLUDE 'patron-search-header.inc' %]
19 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
22 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
25 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
28 <a href="#" aria-current="page">
35 <div class="main container-fluid">
37 <div class="col-sm-10 col-sm-push-2">
41 [% INCLUDE 'members-toolbar.inc' %]
43 <h1>Manual invoice</h1>
45 <!-- The manual invoice and credit buttons -->
46 <div class="statictabs">
48 <li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]">Transactions</a></li>
49 <li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
50 <li class="active"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
51 <li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
53 <div class="tabs-container">
55 [% IF error == 'itemnumber' %]
56 <div id="error_message" class="dialog alert">
57 Error: Invalid barcode entered, please try again
60 <div id="error_message" class="dialog alert">
61 An error occurred, please try again: [% error | html %]
64 <form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice">
65 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
66 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
67 <fieldset class="rows">
68 <legend>Manual invoice</legend>
71 <label for="type">Type: </label>
72 <select name="type" id="type">
73 [% FOREACH debit_type IN debit_types %]
74 [% IF debit_type.code == type %]
75 <option value="[% debit_type.code | html %]" selected="selected">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
77 <option value="[% debit_type.code | html %]">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
82 <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" value="[% barcode | html %]" /></li>
83 <li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" value="[% desc | html %]" /></li>
84 <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" value="[% note | html %]" /></li>
85 <li><label for="amount">Amount: </label><input type="text" inputmode="decimal" pattern="^\d+(\.\d{2})?$" name="amount" id="amount" required="required" min="0" value="[% amount | $Price on_editing => 1 %]" /> Example: 5.00</li>
88 <fieldset class="action">
89 <button type="submit" name="add" value="save">Save</button>
90 <button type="submit" name="add" value="save and pay">Save and pay</button>
91 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
99 </div> <!-- /.col-sm-10.col-sm-push-2 -->
101 <div class="col-sm-2 col-sm-pull-10">
103 [% INCLUDE 'circ-menu.inc' %]
105 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
106 </div> <!-- /.row -->
108 [% MACRO jsinclude BLOCK %]
109 [% INCLUDE 'str/members-menu.inc' %]
110 [% Asset.js("js/members-menu.js") | $raw %]
113 [% FOREACH debit_type IN debit_types %]
114 type_fees['[% debit_type.code | html %]'] = "[% IF debit_type.default_amount %][% debit_type.default_amount | $Price %][% END %]";
116 $(document).ready(function(){
117 $('#maninvoice').preventDoubleFormSubmit();
118 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
119 $("#invoice_type").on("change",function(){
120 this.form.desc.value = this.options[this.selectedIndex].value;
121 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
123 [% UNLESS amount.defined %]
124 $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
125 $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
127 $("#maninvoice #type").change(function(){
128 $("#maninvoice #desc").val($(this).find("option:selected").text());
129 $("#maninvoice #amount").val(type_fees[$(this).val()]);
135 [% INCLUDE 'intranet-bottom.inc' %]