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

(-)a/C4/Reserves.pm (-1 lines)
Lines 576-582 sub ChargeReserveFee { Link Here
576
            user_id      => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
576
            user_id      => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
577
            library_id   => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
577
            library_id   => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
578
            interface    => C4::Context->interface,
578
            interface    => C4::Context->interface,
579
            sip          => undef,
580
            invoice_type => undef,
579
            invoice_type => undef,
581
            type         => 'reserve',
580
            type         => 'reserve',
582
            item_id      => undef
581
            item_id      => undef
(-)a/C4/SIP/ILS/Transaction/FeePayment.pm (-10 / +10 lines)
Lines 50-56 sub pay { Link Here
50
    my $is_writeoff          = shift;
50
    my $is_writeoff          = shift;
51
    my $disallow_overpayment = shift;
51
    my $disallow_overpayment = shift;
52
52
53
    my $type = $is_writeoff ? 'writeoff' : undef;
53
    my $type = $is_writeoff ? 'writeoff' : 'payment';
54
54
55
    warn("RECORD:$borrowernumber::$amt");
55
    warn("RECORD:$borrowernumber::$amt");
56
56
Lines 65-75 sub pay { Link Here
65
        if ( $fee ) {
65
        if ( $fee ) {
66
            $account->pay(
66
            $account->pay(
67
                {
67
                {
68
                    amount    => $amt,
68
                    amount       => $amt,
69
                    sip       => $sip_type,
69
                    type         => $type,
70
                    type      => $type,
70
                    payment_type => 'SIP' . $sip_type,
71
                    lines     => [$fee],
71
                    lines        => [$fee],
72
                    interface => C4::Context->interface
72
                    interface    => C4::Context->interface
73
                }
73
                }
74
            );
74
            );
75
            return 1;
75
            return 1;
Lines 81-90 sub pay { Link Here
81
    else {
81
    else {
82
        $account->pay(
82
        $account->pay(
83
            {
83
            {
84
                amount    => $amt,
84
                amount       => $amt,
85
                sip       => $sip_type,
85
                type         => $type,
86
                type      => $type,
86
                payment_type => 'SIP' . $sip_type,
87
                interface => C4::Context->interface
87
                interface    => C4::Context->interface
88
            }
88
            }
89
        );
89
        );
90
        return 1;
90
        return 1;
(-)a/Koha/Account.pm (-11 / +3 lines)
Lines 56-62 This method allows payments to be made against fees/fines Link Here
56
Koha::Account->new( { patron_id => $borrowernumber } )->pay(
56
Koha::Account->new( { patron_id => $borrowernumber } )->pay(
57
    {
57
    {
58
        amount      => $amount,
58
        amount      => $amount,
59
        sip         => $sipmode,
60
        note        => $note,
59
        note        => $note,
61
        description => $description,
60
        description => $description,
62
        library_id  => $branchcode,
61
        library_id  => $branchcode,
Lines 72-78 sub pay { Link Here
72
    my ( $self, $params ) = @_;
71
    my ( $self, $params ) = @_;
73
72
74
    my $amount       = $params->{amount};
73
    my $amount       = $params->{amount};
75
    my $sip          = $params->{sip};
76
    my $description  = $params->{description};
74
    my $description  = $params->{description};
77
    my $note         = $params->{note} || q{};
75
    my $note         = $params->{note} || q{};
78
    my $library_id   = $params->{library_id};
76
    my $library_id   = $params->{library_id};
Lines 199-207 sub pay { Link Here
199
    }
197
    }
200
198
201
    $account_type ||=
199
    $account_type ||=
202
        $type eq 'writeoff' ? 'W'
200
      $type eq 'writeoff'
203
      : defined($sip)       ? "Pay$sip"
201
      ? 'W'
204
      :                       'Pay';
202
      : 'Pay';
205
203
206
    $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
204
    $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
207
205
Lines 297-303 my $credit_line = Koha::Account->new({ patron_id => $patron_id })->add_credit( Link Here
297
        user_id      => $user_id,
295
        user_id      => $user_id,
298
        interface    => $interface,
296
        interface    => $interface,
299
        library_id   => $library_id,
297
        library_id   => $library_id,
300
        sip          => $sip,
301
        payment_type => $payment_type,
298
        payment_type => $payment_type,
302
        type         => $credit_type,
299
        type         => $credit_type,
303
        item_id      => $item_id
300
        item_id      => $item_id
Lines 324-330 sub add_credit { Link Here
324
    my $user_id      = $params->{user_id};
321
    my $user_id      = $params->{user_id};
325
    my $interface    = $params->{interface};
322
    my $interface    = $params->{interface};
326
    my $library_id   = $params->{library_id};
323
    my $library_id   = $params->{library_id};
327
    my $sip          = $params->{sip};
328
    my $payment_type = $params->{payment_type};
324
    my $payment_type = $params->{payment_type};
329
    my $type         = $params->{type} || 'payment';
325
    my $type         = $params->{type} || 'payment';
330
    my $item_id      = $params->{item_id};
326
    my $item_id      = $params->{item_id};
Lines 338-347 sub add_credit { Link Here
338
    my $schema = Koha::Database->new->schema;
334
    my $schema = Koha::Database->new->schema;
339
335
340
    my $account_type = $Koha::Account::account_type_credit->{$type};
336
    my $account_type = $Koha::Account::account_type_credit->{$type};
341
    $account_type .= $sip
342
        if defined $sip &&
343
           $type eq 'payment';
344
345
    my $line;
337
    my $line;
346
338
347
    $schema->txn_do(
339
    $schema->txn_do(
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/accounts.inc (-3 lines)
Lines 1-9 Link Here
1
[%- BLOCK account_type_description -%]
1
[%- BLOCK account_type_description -%]
2
    [%- SWITCH account.accounttype -%]
2
    [%- SWITCH account.accounttype -%]
3
        [%- CASE 'Pay'     -%]<span>Payment
3
        [%- CASE 'Pay'     -%]<span>Payment
4
        [%- CASE 'Pay00'   -%]<span>Payment (cash via SIP2)
5
        [%- CASE 'Pay01'   -%]<span>Payment (VISA via SIP2)
6
        [%- CASE 'Pay02'   -%]<span>Payment (credit card via SIP2)
7
        [%- CASE 'N'       -%]<span>New card
4
        [%- CASE 'N'       -%]<span>New card
8
        [%- CASE 'OVERDUE' -%]<span>Fine
5
        [%- CASE 'OVERDUE' -%]<span>Fine
9
        [%- CASE 'A'       -%]<span>Account management fee
6
        [%- CASE 'A'       -%]<span>Account management fee
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/includes/account-table.inc (-4 lines)
Lines 30-38 Link Here
30
                    <td>
30
                    <td>
31
                        [% SWITCH ACCOUNT_LINE.accounttype %]
31
                        [% SWITCH ACCOUNT_LINE.accounttype %]
32
                        [% CASE 'Pay' %]Payment
32
                        [% CASE 'Pay' %]Payment
33
                        [% CASE 'Pay00' %]Payment (cash via SIP2)
34
                        [% CASE 'Pay01' %]Payment (VISA via SIP2)
35
                        [% CASE 'Pay02' %]Payment (credit card via SIP2)
36
                        [% CASE 'VOID' %]Voided
33
                        [% CASE 'VOID' %]Voided
37
                        [% CASE 'N' %]New card
34
                        [% CASE 'N' %]New card
38
                        [% CASE 'OVERDUE' %]Fine
35
                        [% CASE 'OVERDUE' %]Fine
39
- 

Return to bug 22610