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 [% WRAPPER 'header.inc' %]
17 [% INCLUDE 'patron-search-header.inc' %]
20 [% WRAPPER 'sub-header.inc' %]
21 [% WRAPPER breadcrumbs %]
22 [% WRAPPER breadcrumb_item %]
23 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
25 [% WRAPPER breadcrumb_item %]
26 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
28 [% WRAPPER breadcrumb_item bc_active= 1 %]
29 <span>Manual invoice</span>
31 [% END #/ WRAPPER breadcrumbs %]
32 [% END #/ WRAPPER sub-header.inc %]
34 <div class="main container-fluid">
36 <div class="col-sm-10 col-sm-push-2">
40 [% INCLUDE 'members-toolbar.inc' %]
42 <h1>Manual invoice</h1>
44 <!-- The manual invoice and credit buttons -->
46 <ul class="nav nav-tabs" role="tablist">
47 <li role="presentation" class="transactions">
48 <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Transactions</a>
50 <li role="presentation" class="makepayment">
51 <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Make a payment</a>
53 <li role="presentation" class="manualinvoice active">
54 <a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Create manual invoice</a>
56 [% IF CAN_user_updatecharges_manual_credit %]
57 <li role="presentation" class="manualcredit">
58 <a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Create manual credit</a>
61 </ul> <!-- /.nav.nav-tabs -->
62 <div class="tab-content">
63 <div role="tabpanel" class="tab-pane active">
64 [% IF error == 'itemnumber' %]
65 <div id="error_message" class="dialog alert">
66 Error: Invalid barcode entered, please try again
69 <div id="error_message" class="dialog alert">
70 An error occurred, please try again: [% error | html %]
73 <form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice">
74 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
75 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
76 <fieldset class="rows">
77 <legend>Manual invoice</legend>
80 <label for="type">Type: </label>
81 <select name="type" id="type">
82 [% FOREACH debit_type IN debit_types %]
83 [% IF debit_type.code == type %]
84 <option value="[% debit_type.code | html %]" selected="selected">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
86 <option value="[% debit_type.code | html %]">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
91 <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" value="[% barcode | html %]" /></li>
92 <li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" value="[% desc | html %]" /></li>
93 <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" value="[% note | html %]" /></li>
94 <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>
98 [% IF available_additional_fields %]
99 [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %]
102 <fieldset class="action">
103 <button type="submit" name="add" class="btn btn-primary" value="save">Save</button>
104 <button type="submit" name="add" class="btn btn-primary" value="save and pay">Save and pay</button>
105 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
109 </div> <!-- /.tab-pane -->
110 </div> <!-- /.tab-content -->
111 </div> <!-- /.toptabs -->
114 </div> <!-- /.col-sm-10.col-sm-push-2 -->
116 <div class="col-sm-2 col-sm-pull-10">
118 [% INCLUDE 'circ-menu.inc' %]
120 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
121 </div> <!-- /.row -->
123 [% MACRO jsinclude BLOCK %]
124 [% INCLUDE 'str/members-menu.inc' %]
125 [% Asset.js("js/members-menu.js") | $raw %]
128 [% FOREACH debit_type IN debit_types %]
129 type_fees['[% debit_type.code | html %]'] = "[% IF debit_type.default_amount %][% debit_type.default_amount | $Price on_editing => 1 %][% END %]";
131 $(document).ready(function(){
132 $('#maninvoice').preventDoubleFormSubmit();
133 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
134 $("#invoice_type").on("change",function(){
135 this.form.desc.value = this.options[this.selectedIndex].value;
136 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
138 [% UNLESS amount.defined %]
139 $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
140 $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
142 $("#maninvoice #type").change(function(){
143 $("#maninvoice #desc").val($(this).find("option:selected").text());
144 $("#maninvoice #amount").val(type_fees[$(this).val()]);
150 [% INCLUDE 'intranet-bottom.inc' %]