Bug 23805: (QA follow-up) Corrections for cash_register_stats

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
Martin Renvoize 2019-10-31 17:49:29 +00:00
parent f72087c3d4
commit 5dfbe1c8cd
No known key found for this signature in database
GPG Key ID: 422B469130441A0F
2 changed files with 11 additions and 18 deletions

View File

@ -61,30 +61,12 @@
<option value="ACT">All payments to the library</option>
[% END %]
[% IF transaction_type == "C" %]
<option value="C" selected="selected">Credit</option>
[% ELSE %]
<option value="C">Credit</option>
[% END %]
[% IF transaction_type == "CR" %]
<option value="CR" selected="selected">Credit (item returned)</option>
[% ELSE %]
<option value="CR">Credit (item returned)</option>
[% END %]
[% IF transaction_type == "FORW" %]
<option value="FORW" selected="selected">Write off</option>
[% ELSE %]
<option value="FORW">Write off</option>
[% END %]
[% IF transaction_type == "PAY" %]
<option value="PAY" selected="selected">Payment</option>
[% ELSE %]
<option value="PAY">Payment</option>
[% END %]
[% FOREACH debit_type IN debit_types %]
[% IF transaction_type == debit_type.code %]
<option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
@ -92,6 +74,14 @@
<option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
[% END %]
[% END %]
[% FOREACH credit_type IN credit_types %]
[% IF transaction_type == credit_type.code %]
<option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
[% ELSE %]
<option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
[% END %]
[% END %]
</select>
</li>
<li>

View File

@ -58,6 +58,8 @@ my $toDate = dt_from_string;
my @debit_types =
Koha::Account::DebitTypes->search()->as_list;
my @credit_types =
Koha::Account::CreditTypes->search()->as_list;
if ($do_it) {
@ -187,6 +189,7 @@ $template->param(
transaction_type => $transaction_type,
branchloop => Koha::Libraries->search({}, { order_by => ['branchname'] })->unblessed,
debit_types => \@debit_types,
credit_types => \@credit_types,
CGIsepChoice => GetDelimiterChoices,
);