6 [% PROCESS 'i18n.inc' %]
8 [% PROCESS 'accounts.inc' %]
9 [% INCLUDE 'doc-head-open.inc' %]
10 <title>[% FILTER collapse %]
11 [% t("Create manual invoice") | html %] ›
12 [% t("Patrons") | html %] ›
13 [% t("Koha") | html %]
15 [% INCLUDE 'doc-head-close.inc' %]
18 <body id="pat_maninvoice" class="pat">
19 [% WRAPPER 'header.inc' %]
20 [% INCLUDE 'patron-search-header.inc' %]
23 [% WRAPPER 'sub-header.inc' %]
24 [% WRAPPER breadcrumbs %]
25 [% WRAPPER breadcrumb_item %]
26 <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a>
28 [% WRAPPER breadcrumb_item %]
29 <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber | uri %]">[% INCLUDE 'patron-title.inc' %]</a>
31 [% WRAPPER breadcrumb_item bc_active= 1 %]
32 <span>Manual invoice</span>
34 [% END #/ WRAPPER breadcrumbs %]
35 [% END #/ WRAPPER sub-header.inc %]
37 <div class="main container-fluid">
39 <div class="col-sm-10 col-sm-push-2">
43 [% INCLUDE 'members-toolbar.inc' %]
45 <h1>Manual invoice</h1>
47 <!-- The manual invoice and credit buttons -->
49 <ul class="nav nav-tabs" role="tablist">
50 <li role="presentation" class="transactions">
51 <a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Transactions</a>
53 <li role="presentation" class="makepayment">
54 <a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Make a payment</a>
56 <li role="presentation" class="manualinvoice active">
57 <a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Create manual invoice</a>
59 [% IF CAN_user_updatecharges_manual_credit %]
60 <li role="presentation" class="manualcredit">
61 <a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" role="tab">Create manual credit</a>
64 </ul> <!-- /.nav.nav-tabs -->
65 <div class="tab-content">
66 <div role="tabpanel" class="tab-pane active">
67 [% IF error == 'itemnumber' %]
68 <div id="error_message" class="dialog alert">
69 Error: Invalid barcode entered, please try again
72 <div id="error_message" class="dialog alert">
73 An error occurred, please try again: [% error | html %]
76 <form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice">
77 <input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
78 <input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
79 <fieldset class="rows">
80 <legend>Manual invoice</legend>
83 <label for="type">Type: </label>
84 <select name="type" id="type">
85 [% FOREACH debit_type IN debit_types %]
86 [% IF debit_type.code == type %]
87 <option value="[% debit_type.code | html %]" selected="selected">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
89 <option value="[% debit_type.code | html %]">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
94 <li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" value="[% barcode | html %]" /></li>
95 <li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" value="[% desc | html %]" /></li>
96 <li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" value="[% note | html %]" /></li>
97 <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>
101 [% IF available_additional_fields %]
102 [% INCLUDE 'additional-fields-entry.inc' available=available_additional_fields values=additional_field_values %]
105 <fieldset class="action">
106 <button type="submit" name="add" class="btn btn-primary" value="save">Save</button>
107 <button type="submit" name="add" class="btn btn-primary" value="save and pay">Save and pay</button>
108 <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
112 </div> <!-- /.tab-pane -->
113 </div> <!-- /.tab-content -->
114 </div> <!-- /.toptabs -->
117 </div> <!-- /.col-sm-10.col-sm-push-2 -->
119 <div class="col-sm-2 col-sm-pull-10">
121 [% INCLUDE 'circ-menu.inc' %]
123 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
124 </div> <!-- /.row -->
126 [% MACRO jsinclude BLOCK %]
127 [% INCLUDE 'str/members-menu.inc' %]
128 [% Asset.js("js/members-menu.js") | $raw %]
131 [% FOREACH debit_type IN debit_types %]
132 type_fees['[% debit_type.code | html %]'] = "[% IF debit_type.default_amount %][% debit_type.default_amount | $Price on_editing => 1 %][% END %]";
134 $(document).ready(function(){
135 $('#maninvoice').preventDoubleFormSubmit();
136 $("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
137 $("#invoice_type").on("change",function(){
138 this.form.desc.value = this.options[this.selectedIndex].value;
139 this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
141 [% UNLESS amount.defined %]
142 $("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
143 $("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
145 $("#maninvoice #type").change(function(){
146 $("#maninvoice #desc").val($(this).find("option:selected").text());
147 $("#maninvoice #amount").val(type_fees[$(this).val()]);
153 [% INCLUDE 'intranet-bottom.inc' %]