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

(-)a/C4/Reserves.pm (-1 lines)
Lines 577-583 sub ChargeReserveFee { Link Here
577
            user_id      => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
577
            user_id      => C4::Context->userenv ? C4::Context->userenv->{'number'} : undef,
578
            library_id   => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
578
            library_id   => C4::Context->userenv ? C4::Context->userenv->{'branch'} : undef,
579
            interface    => C4::Context->interface,
579
            interface    => C4::Context->interface,
580
            sip          => undef,
581
            invoice_type => undef,
580
            invoice_type => undef,
582
            type         => 'reserve',
581
            type         => 'reserve',
583
            item_id      => undef
582
            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 211-219 sub pay { Link Here
211
    }
209
    }
212
210
213
    $account_type ||=
211
    $account_type ||=
214
        $type eq 'writeoff' ? 'W'
212
      $type eq 'writeoff'
215
      : defined($sip)       ? "Pay$sip"
213
      ? 'W'
216
      :                       'Pay';
214
      : 'Pay';
217
215
218
    $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
216
    $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
219
217
Lines 309-315 my $credit_line = Koha::Account->new({ patron_id => $patron_id })->add_credit( Link Here
309
        user_id      => $user_id,
307
        user_id      => $user_id,
310
        interface    => $interface,
308
        interface    => $interface,
311
        library_id   => $library_id,
309
        library_id   => $library_id,
312
        sip          => $sip,
313
        payment_type => $payment_type,
310
        payment_type => $payment_type,
314
        type         => $credit_type,
311
        type         => $credit_type,
315
        item_id      => $item_id
312
        item_id      => $item_id
Lines 336-342 sub add_credit { Link Here
336
    my $user_id      = $params->{user_id};
333
    my $user_id      = $params->{user_id};
337
    my $interface    = $params->{interface};
334
    my $interface    = $params->{interface};
338
    my $library_id   = $params->{library_id};
335
    my $library_id   = $params->{library_id};
339
    my $sip          = $params->{sip};
340
    my $payment_type = $params->{payment_type};
336
    my $payment_type = $params->{payment_type};
341
    my $type         = $params->{type} || 'payment';
337
    my $type         = $params->{type} || 'payment';
342
    my $item_id      = $params->{item_id};
338
    my $item_id      = $params->{item_id};
Lines 350-359 sub add_credit { Link Here
350
    my $schema = Koha::Database->new->schema;
346
    my $schema = Koha::Database->new->schema;
351
347
352
    my $account_type = $Koha::Account::account_type_credit->{$type};
348
    my $account_type = $Koha::Account::account_type_credit->{$type};
353
    $account_type .= $sip
354
        if defined $sip &&
355
           $type eq 'payment';
356
357
    my $line;
349
    my $line;
358
350
359
    $schema->txn_do(
351
    $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 119-127 Link Here
119
[%- BLOCK account_type_description -%]
119
[%- BLOCK account_type_description -%]
120
    [%- SWITCH account.accounttype -%]
120
    [%- SWITCH account.accounttype -%]
121
        [%- CASE 'Pay'     -%]<span>Payment
121
        [%- CASE 'Pay'     -%]<span>Payment
122
        [%- CASE 'Pay00'   -%]<span>Payment (cash via SIP2)
123
        [%- CASE 'Pay01'   -%]<span>Payment (VISA via SIP2)
124
        [%- CASE 'Pay02'   -%]<span>Payment (credit card via SIP2)
125
        [%- CASE 'N'       -%]<span>New card
122
        [%- CASE 'N'       -%]<span>New card
126
        [%- CASE 'OVERDUE' -%]<span>Fine
123
        [%- CASE 'OVERDUE' -%]<span>Fine
127
        [%- CASE 'A'       -%]<span>Account management fee
124
        [%- CASE 'A'       -%]<span>Account management fee
128
- 

Return to bug 22610