Bug 23674: Add ability to add a note to issue refund
To test: 1) Apply patch, restart_all 2) From patron accounting page -> Create manual invoice. Enter some amount and select save and pay. Press confirm. 3) In the transactions tab, for the invoice you just created, under the actions column select issue refund. 4) This should open a modal with the ability to enter a note for the refund. Type in a note and confirm. 5) Ensure the note correctly shows in the table. Signed-off-by: Roman Dolny <roman.dolny@jezuici.pl> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com> Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
c77a3e4da5
commit
72c60c11b4
3 changed files with 14 additions and 4 deletions
|
@ -703,7 +703,8 @@ sub apply {
|
|||
register_id => $register_id,
|
||||
staff_id => $staff_id,
|
||||
interface => 'intranet',
|
||||
amount => $amount
|
||||
amount => $amount,
|
||||
note => $note
|
||||
}
|
||||
);
|
||||
|
||||
|
@ -763,7 +764,8 @@ sub payout {
|
|||
borrowernumber => $self->borrowernumber,
|
||||
interface => $params->{interface},
|
||||
branchcode => $params->{branch},
|
||||
register_id => $params->{cash_register}
|
||||
register_id => $params->{cash_register},
|
||||
note => $params->{note},
|
||||
}
|
||||
)->store();
|
||||
|
||||
|
|
|
@ -369,6 +369,10 @@
|
|||
</select>
|
||||
</li>
|
||||
[% END %]
|
||||
<li>
|
||||
<label for="refund_note">Note: </label>
|
||||
<input type="text" id="refund_note" name="refund_note" />
|
||||
</li>
|
||||
</ol>
|
||||
</fieldset>
|
||||
<!-- /.rows -->
|
||||
|
|
|
@ -134,6 +134,8 @@ if ( $op eq 'cud-refund' ) {
|
|||
my $charge = Koha::Account::Lines->find($charge_id);
|
||||
my $amount = scalar $input->param('amount');
|
||||
my $refund_type = scalar $input->param('refund_type');
|
||||
my $note = scalar $input->param('refund_note');
|
||||
|
||||
$schema->txn_do(
|
||||
sub {
|
||||
|
||||
|
@ -143,7 +145,8 @@ if ( $op eq 'cud-refund' ) {
|
|||
branch => $library_id,
|
||||
staff_id => $logged_in_user->id,
|
||||
interface => 'intranet',
|
||||
amount => $amount
|
||||
amount => $amount,
|
||||
note => $note
|
||||
}
|
||||
);
|
||||
unless ( $refund_type eq 'AC' ) {
|
||||
|
@ -154,7 +157,8 @@ if ( $op eq 'cud-refund' ) {
|
|||
staff_id => $logged_in_user->id,
|
||||
cash_register => $registerid,
|
||||
interface => 'intranet',
|
||||
amount => $amount
|
||||
amount => $amount,
|
||||
note => $note
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue