View | Details | Raw Unified | Return to bug 41819
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/register.tt (-1 / +2 lines)
Lines 507-513 Link Here
507
           $("#paid + span").text(paid.format_price());
507
           $("#paid + span").text(paid.format_price());
508
           $("#returned").attr({ "value": paid.format_price(), "max": paid });
508
           $("#returned").attr({ "value": paid.format_price(), "max": paid });
509
           var member = button.data('member');
509
           var member = button.data('member');
510
           if ( member === '' ) {
510
           // Hide AC option for anonymous transactions (no borrowernumber)
511
           if ( !member || member === '' ) {
511
               $("#refund_type option[value='AC']").remove();
512
               $("#refund_type option[value='AC']").remove();
512
           } else if ( $("#refund_type option[value='AC']").length == 0 ) {
513
           } else if ( $("#refund_type option[value='AC']").length == 0 ) {
513
               $("#refund_type").prepend('<option value="AC" selected="selected">Account credit</option>');
514
               $("#refund_type").prepend('<option value="AC" selected="selected">Account credit</option>');
(-)a/pos/register.pl (-11 / +14 lines)
Lines 138-153 if ( !$registers->count ) { Link Here
138
                            amount         => $amount
138
                            amount         => $amount
139
                        }
139
                        }
140
                    );
140
                    );
141
                    my $payout = $refund->payout(
141
                    # Only create a payout if refund_type is not 'AC' (Account Credit)
142
                        {
142
                    # When 'AC' is selected, the refund stays as credit on the patron's account
143
                            payout_type   => $refund_type,
143
                    unless ( $refund_type eq 'AC' ) {
144
                            branch        => $library_id,
144
                        my $payout = $refund->payout(
145
                            staff_id      => $logged_in_user->id,
145
                            {
146
                            cash_register => $cash_register->id,
146
                                payout_type   => $refund_type,
147
                            interface     => 'intranet',
147
                                branch        => $library_id,
148
                            amount        => $amount
148
                                staff_id      => $logged_in_user->id,
149
                        }
149
                                cash_register => $cash_register->id,
150
                    );
150
                                interface     => 'intranet',
151
                                amount        => $amount
152
                            }
153
                        );
154
                    }
151
155
152
                }
156
                }
153
            );
157
            );
154
- 

Return to bug 41819