Tomas Cohen Arazi
cc30dc39bf
This patch makes creating a manual credit from the UI record the account offset as 'Manual Credit', and properly set account_offsets.credit_id instead of account_offsets.debit_id. To test: - Create a manual credit (of 'Credit' type) for a known patron (acevedo?) - Run: $ sudo koha-mysql kohadev > SELECT * FROM account_offsets; => FAIL: The account offset for the manual credit has type=Manual Debit, credit_id=NULL and debit_id=accountlines_id - Run the atomic update: $ updatedatabase - Run: $ sudo koha-mysql kohadev > SELECT * FROM account_offsets; => SUCCESS: The account offset has been corrected and now has type=Manual Credit, credit_id=accountlines_id and debit_id=NULL - Create a new manual credit (of 'Forgiven' type) for a known patron - Run: $ sudo koha-mysql kohadev > SELECT * FROM account_offsets; => SUCCESS: The account offset has been stored correctly as a credit! - Sign off :-D Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
72 lines
2.8 KiB
Text
72 lines
2.8 KiB
Text
[% USE Asset %]
|
|
[% USE Koha %]
|
|
[% USE Branches %]
|
|
[% SET footerjs = 1 %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Patrons › Create manual credit</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="pat_mancredit" class="pat">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'patron-search.inc' %]
|
|
|
|
<div id="breadcrumbs"><a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> › Manual credit</div>
|
|
|
|
<div id="doc3" class="yui-t2">
|
|
|
|
<div id="bd">
|
|
<div id="yui-main">
|
|
<div class="yui-b">
|
|
[% INCLUDE 'members-toolbar.inc' %]
|
|
|
|
<!-- The manual invoice and credit buttons -->
|
|
<div class="statictabs">
|
|
<ul>
|
|
<li><a href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Account</a></li>
|
|
<li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber %]" >Pay fines</a></li>
|
|
<li><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual invoice</a></li>
|
|
<li class="active"><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber %]" >Create manual credit</a></li>
|
|
</ul>
|
|
<div class="tabs-container">
|
|
|
|
<form action="/cgi-bin/koha/members/mancredit.pl" method="post" id="mancredit">
|
|
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber %]" />
|
|
<input type="hidden" name="csrf_token" value="[% csrf_token %]" />
|
|
|
|
<fieldset class="rows">
|
|
<legend>Manual credit</legend><ol>
|
|
<li><label for="type">Credit type: </label><select name="type" id="type">
|
|
<option value="credit">Credit</option>
|
|
<option value="forgiven">Forgiven</option>
|
|
</select></li>
|
|
<li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" /></li>
|
|
<li><label for="desc">Description: </label><input type="text" name="desc" size="50" id="desc" /></li>
|
|
<li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" /></li>
|
|
<li><label for="amount">Amount: </label><input type="number" name="amount" id="amount" required="required" value="" step="any" min="0" /> Example: 5.00</li>
|
|
</ol></fieldset>
|
|
|
|
<fieldset class="action"><input type="submit" name="add" value="Add credit" /> <a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber %]">Cancel</a></fieldset>
|
|
</form>
|
|
|
|
</div></div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
<div class="yui-b">
|
|
[% INCLUDE 'circ-menu.inc' %]
|
|
</div>
|
|
</div>
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% Asset.js("js/members-menu.js") %]
|
|
<script type="text/javascript">
|
|
$(document).ready(function(){
|
|
$('#mancredit').preventDoubleFormSubmit();
|
|
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|