Koha/koha-tmpl/intranet-tmpl/prog/en/modules/members/maninvoice.tt
Martin Renvoize cd83a9b6bc Bug 26398: Restore translations for credit/debit type dropdown
1) run ./translate update xx-XX
2) Translate this big chunk in your xx-XX-staff-prog.po or make sure it's translated

msgid ""
"%s %s %sPayment %sWriteoff %sForgiven %sCredit %sLost item fee refund "
"%sRefund %s%s %s %s %s %sAccount creation fee %sAccount renewal fee %sLost "
"item %sManual fee %sNew card %sFine %sLost item processing fee %sRental fee "
"%sDaily rental fee %sRenewal of rental item %sRenewal of daily rental item "
"%sHold fee %sHold waiting too long %sPayout %s%s %s %s %s "

(tip: I search the po file for "Forgiven", there are only two occurrences)

3) run ./translate install xx-XX
4) In your staff interface in your other language, go to a patron's account > Accounting > Create manual Credit
5) Check that the values in the credit drop down are in English
6) Apply patch
7) redo steps 1-4 (careful, the string to be translated changes)
8) Do a hard refresh (Ctrl+F5) (I guess you'd have to restart plack if you have it)
9) Values in the credit drop down are translated

Signed-off-by: Caroline Cyr La Rose <caroline.cyr-la-rose@inlibro.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
2020-11-03 10:57:35 +01:00

122 lines
5.9 KiB
Text

[% USE raw %]
[% USE Asset %]
[% USE Koha %]
[% USE Price %]
[% USE Branches %]
[% SET footerjs = 1 %]
[% PROCESS 'accounts.inc' %]
[% INCLUDE 'doc-head-open.inc' %]
<title>Koha &rsaquo; Patrons &rsaquo; Create manual invoice</title>
[% INCLUDE 'doc-head-close.inc' %]
</head>
<body id="pat_maninvoice" class="pat">
[% INCLUDE 'header.inc' %]
[% INCLUDE 'patron-search.inc' %]
<div id="breadcrumbs">
<a href="/cgi-bin/koha/mainpage.pl">Home</a> &rsaquo;
<a href="/cgi-bin/koha/members/members-home.pl">Patrons</a> &rsaquo;
Manual invoice
</div>
<div class="main container-fluid">
<div class="row">
<div class="col-sm-10 col-sm-push-2">
<main>
[% 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 | uri %]">Transactions</a></li>
<li><a href="/cgi-bin/koha/members/pay.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Make a payment</a></li>
<li class="active"><a href="/cgi-bin/koha/members/maninvoice.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual invoice</a></li>
<li><a href="/cgi-bin/koha/members/mancredit.pl?borrowernumber=[% patron.borrowernumber | uri %]" >Create manual credit</a></li>
</ul>
<div class="tabs-container">
[% IF error == 'itemnumber' %]
<div id="error_message" class="dialog alert">
Error: Invalid barcode entered, please try again
</div>
[% ELSIF error %]
<div id="error_message" class="dialog alert">
An error occurred, please try again: [% error | html %]
</div>
[% END %]
<form action="/cgi-bin/koha/members/maninvoice.pl" method="post" id="maninvoice">
<input type="hidden" name="borrowernumber" id="borrowernumber" value="[% patron.borrowernumber | html %]" />
<input type="hidden" name="csrf_token" value="[% csrf_token | html %]" />
<fieldset class="rows">
<legend>Manual invoice</legend>
<ol>
<li>
<label for="type">Type: </label>
<select name="type" id="type">
[% FOREACH debit_type IN debit_types %]
[% IF debit_type.code == type %]
<option value="[% debit_type.code | html %]" selected="selected">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
[% ELSE %]
<option value="[% debit_type.code | html %]">[%- PROCESS debit_type_description debit_type=debit_type -%]</option>
[% END %]
[% END %]
</select>
</li>
<li><label for="barcode">Barcode: </label><input type="text" name="barcode" id="barcode" value="[% barcode | html %]" /></li>
<li><label for="desc">Description: </label><input type="text" name="desc" id="desc" size="50" value="[% desc | html %]" /></li>
<li><label for="note">Note: </label><input type="text" name="note" size="50" id="note" value="[% note | html %]" /></li>
<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>
</ol>
</fieldset>
<fieldset class="action">
<button type="submit" name="add" value="save">Save</button>
<button type="submit" name="add" value="save and pay">Save and pay</button>
<a class="cancel" href="/cgi-bin/koha/members/boraccount.pl?borrowernumber=[% patron.borrowernumber | html %]">Cancel</a>
</fieldset>
</form>
</div>
</div>
</main>
</div> <!-- /.col-sm-10.col-sm-push-2 -->
<div class="col-sm-2 col-sm-pull-10">
<aside>
[% INCLUDE 'circ-menu.inc' %]
</aside>
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
</div> <!-- /.row -->
[% MACRO jsinclude BLOCK %]
[% INCLUDE 'str/members-menu.inc' %]
[% Asset.js("js/members-menu.js") | $raw %]
<script>
var type_fees = {};
[% FOREACH debit_type IN debit_types %]
type_fees['[% debit_type.code | html %]'] = "[% debit_type.default_amount | $Price %]";
[% END %]
$(document).ready(function(){
$('#maninvoice').preventDoubleFormSubmit();
$("fieldset.rows input, fieldset.rows select").addClass("noEnterSubmit");
$("#invoice_type").on("change",function(){
this.form.desc.value = this.options[this.selectedIndex].value;
this.form.amount.value = type_fees[this.options[this.selectedIndex].value];
});
[% UNLESS amount.defined %]
$("#maninvoice #desc").val($("#maninvoice #type option:selected").text());
$("#maninvoice #amount").val(type_fees[$("#maninvoice #type option:selected").val()]);
[% END %]
$("#maninvoice #type").change(function(){
$("#maninvoice #desc").val($(this).find("option:selected").text());
$("#maninvoice #amount").val(type_fees[$(this).val()]);
});
});
</script>
[% END %]
[% INCLUDE 'intranet-bottom.inc' %]