Bug 23674: Add ability to add a note to APPLY DISCOUNT
To test: 1. APPLY PATCH and restart_all 2. Apply a manual invoice to a patron account. 3. Go to the patron record -> accounting -> transaction tab 4. Look for the 'Apply discount' button. 5. When the 'Apply discount' modal appears notcie the 'Note' field. 6. Add a note, make sure it gets applied to this accountline. 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
72d0f23367
commit
39ca8feb1a
|
|
@ -535,6 +535,7 @@ sub reduce {
|
|||
borrowernumber => $self->borrowernumber,
|
||||
interface => $params->{interface},
|
||||
branchcode => $params->{branch},
|
||||
note => $params->{note},
|
||||
}
|
||||
)->store();
|
||||
|
||||
|
|
|
|||
|
|
@ -403,6 +403,10 @@
|
|||
<ol>
|
||||
<li> <span id="item" class="label">Account type: </span><span></span> </li>
|
||||
<li> <span id="charged" class="label">Amount charged: </span><span></span> </li>
|
||||
<li>
|
||||
<label for="apply_discount_note">Note: </label>
|
||||
<input type="text" id="apply_discount_note" name="apply_discount_note" />
|
||||
</li>
|
||||
<li>
|
||||
<label class="required" for="amount">Discount to apply: </label>
|
||||
<input type="text" inputmode="numeric" pattern="[0-9]*" id="discount" name="amount" required="required" />
|
||||
|
|
|
|||
|
|
@ -163,6 +163,8 @@ if ( $op eq 'cud-discount' ) {
|
|||
my $charge_id = scalar $input->param('accountlines_id');
|
||||
my $charge = Koha::Account::Lines->find($charge_id);
|
||||
my $amount = scalar $input->param('amount');
|
||||
my $note = scalar $input->param('apply_discount_note');
|
||||
|
||||
$schema->txn_do(
|
||||
sub {
|
||||
|
||||
|
|
@ -172,7 +174,8 @@ if ( $op eq 'cud-discount' ) {
|
|||
branch => $library_id,
|
||||
staff_id => $logged_in_user->id,
|
||||
interface => 'intranet',
|
||||
amount => $amount
|
||||
amount => $amount,
|
||||
note => $note,
|
||||
}
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue