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

(-)a/C4/SIP/ILS/Transaction/FeePayment.pm (-2 / +2 lines)
Lines 66-72 sub pay { Link Here
66
            $account->pay(
66
            $account->pay(
67
                {
67
                {
68
                    amount => $amt,
68
                    amount => $amt,
69
                    sip    => $sip_type,
69
                    mode   => $sip_type,
70
                    type   => $type,
70
                    type   => $type,
71
                    lines  => [$fee],
71
                    lines  => [$fee],
72
                }
72
                }
Lines 81-87 sub pay { Link Here
81
        $account->pay(
81
        $account->pay(
82
            {
82
            {
83
                amount => $amt,
83
                amount => $amt,
84
                sip    => $sip_type,
84
                mode   => $sip_type,
85
                type   => $type,
85
                type   => $type,
86
            }
86
            }
87
        );
87
        );
(-)a/Koha/Account.pm (-4 / +4 lines)
Lines 50-56 This method allows payments to be made against fees/fines Link Here
50
Koha::Account->new( { patron_id => $borrowernumber } )->pay(
50
Koha::Account->new( { patron_id => $borrowernumber } )->pay(
51
    {
51
    {
52
        amount      => $amount,
52
        amount      => $amount,
53
        sip         => $sipmode,
53
        mode       => $mode,
54
        note        => $note,
54
        note        => $note,
55
        description => $description,
55
        description => $description,
56
        library_id  => $branchcode,
56
        library_id  => $branchcode,
Lines 65-72 Koha::Account->new( { patron_id => $borrowernumber } )->pay( Link Here
65
sub pay {
65
sub pay {
66
    my ( $self, $params ) = @_;
66
    my ( $self, $params ) = @_;
67
67
68
    my $amount       = $params->{amount};
68
    my $amount          = $params->{amount};
69
    my $sip          = $params->{sip};
69
    my $mode            = $params->{mode};
70
    my $description  = $params->{description};
70
    my $description  = $params->{description};
71
    my $note         = $params->{note} || q{};
71
    my $note         = $params->{note} || q{};
72
    my $library_id   = $params->{library_id};
72
    my $library_id   = $params->{library_id};
Lines 202-208 sub pay { Link Here
202
202
203
    $account_type ||=
203
    $account_type ||=
204
        $type eq 'writeoff' ? 'W'
204
        $type eq 'writeoff' ? 'W'
205
      : defined($sip)       ? "Pay$sip"
205
      : defined($mode)      ? "Pay$mode"
206
      :                       'Pay';
206
      :                       'Pay';
207
207
208
    $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
208
    $description ||= $type eq 'writeoff' ? 'Writeoff' : q{};
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/boraccount.tt (+6 lines)
Lines 89-94 $(document).ready(function() { Link Here
89
          [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
89
          [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
90
          [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
90
          [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
91
          [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
91
          [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
92
          [% CASE 'Pay03' %]Payment, thanks (cash)
93
          [% CASE 'Pay04' %]Payment, thanks (credit card)
94
          [% CASE 'Pay05' %]Payment, thanks (debit)
95
          [% CASE 'Pay06' %]Payment, thanks (check)
96
          [% CASE 'Pay07' %]Payment, thanks (cryptocurrency)
97
          [% CASE 'Pay08' %]Payment, thanks (PayPal)
92
          [% CASE 'N' %]New card
98
          [% CASE 'N' %]New card
93
          [% CASE 'F' %]Fine
99
          [% CASE 'F' %]Fine
94
          [% CASE 'A' %]Account management fee
100
          [% CASE 'A' %]Account management fee
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/pay.tt (+6 lines)
Lines 122-127 function enableCheckboxActions(){ Link Here
122
          [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
122
          [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
123
          [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
123
          [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
124
          [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
124
          [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
125
          [% CASE 'Pay03' %]Payment, thanks (cash)
126
          [% CASE 'Pay04' %]Payment, thanks (credit card)
127
          [% CASE 'Pay05' %]Payment, thanks (debit)
128
          [% CASE 'Pay06' %]Payment, thanks (check)
129
          [% CASE 'Pay07' %]Payment, thanks (cryptocurrency)
130
          [% CASE 'Pay08' %]Payment, thanks (PayPal)
125
          [% CASE 'N' %]New card
131
          [% CASE 'N' %]New card
126
          [% CASE 'F' %]Fine
132
          [% CASE 'F' %]Fine
127
          [% CASE 'A' %]Account management fee
133
          [% CASE 'A' %]Account management fee
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (+12 lines)
Lines 148-153 function moneyFormat(textObj) { Link Here
148
            <!-- default to paying all -->
148
            <!-- default to paying all -->
149
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" />
149
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" />
150
    </li>
150
    </li>
151
    <li>
152
        <label for="paymode">Payment mode: </label>
153
        <select name="paymode">
154
            <option value="">Other</option>
155
            <option value="03">Cash</option>
156
            <option value="04">Credit card</option>
157
            <option value="05">Debit</option>
158
            <option value="08">Paypal</option>
159
            <option value="06">Check</option>
160
            <option value="07">Cryptocurrency</option>\
161
        </select>
162
    </li>
151
</ol>
163
</ol>
152
</fieldset>
164
</fieldset>
153
165
(-)a/koha-tmpl/opac-tmpl/bootstrap/en/modules/opac-account.tt (+6 lines)
Lines 109-114 Link Here
109
                                            [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
109
                                            [% CASE 'Pay00' %]Payment, thanks (cash via SIP2)
110
                                            [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
110
                                            [% CASE 'Pay01' %]Payment, thanks (VISA via SIP2)
111
                                            [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
111
                                            [% CASE 'Pay02' %]Payment, thanks (credit card via SIP2)
112
                                            [% CASE 'Pay03' %]Payment, thanks (cash)
113
                                            [% CASE 'Pay04' %]Payment, thanks (credit card)
114
                                            [% CASE 'Pay05' %]Payment, thanks (debit)
115
                                            [% CASE 'Pay06' %]Payment, thanks (check)
116
                                            [% CASE 'Pay07' %]Payment, thanks (cryptocurrency)
117
                                            [% CASE 'Pay08' %]Payment, thanks (PayPal)
112
                                            [% CASE 'N' %]New card
118
                                            [% CASE 'N' %]New card
113
                                            [% CASE 'F' %]Fine
119
                                            [% CASE 'F' %]Fine
114
                                            [% CASE 'A' %]Account management fee
120
                                            [% CASE 'A' %]Account management fee
(-)a/members/paycollect.pl (-3 / +11 lines)
Lines 71-76 my $writeoff = $input->param('writeoff_individual'); Link Here
71
my $select_lines = $input->param('selected');
71
my $select_lines = $input->param('selected');
72
my $select       = $input->param('selected_accts');
72
my $select       = $input->param('selected_accts');
73
my $payment_note = uri_unescape scalar $input->param('payment_note');
73
my $payment_note = uri_unescape scalar $input->param('payment_note');
74
my $paymode      = $input->param('paymode') || undef;
74
my $accountlines_id;
75
my $accountlines_id;
75
76
76
if ( $individual || $writeoff ) {
77
if ( $individual || $writeoff ) {
Lines 130-136 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
130
                    lines      => [$line],
131
                    lines      => [$line],
131
                    amount     => $total_paid,
132
                    amount     => $total_paid,
132
                    library_id => $branch,
133
                    library_id => $branch,
133
                    note       => $payment_note
134
                    note       => $payment_note,
135
                    mode       => $paymode,
134
                }
136
                }
135
            );
137
            );
136
            print $input->redirect(
138
            print $input->redirect(
Lines 161-173 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
161
                        amount => $total_paid,
163
                        amount => $total_paid,
162
                        lines  => \@lines,
164
                        lines  => \@lines,
163
                        note   => $note,
165
                        note   => $note,
166
                        mode   => $paymode,
164
                    }
167
                    }
165
                  );
168
                  );
166
            }
169
            }
167
            else {
170
            else {
168
                my $note = $input->param('selected_accts_notes');
171
                my $note = $input->param('selected_accts_notes');
169
                Koha::Account->new( { patron_id => $borrowernumber } )
172
                Koha::Account->new( { patron_id => $borrowernumber } )->pay(
170
                  ->pay( { amount => $total_paid, note => $note } );
173
                    {
174
                        amount => $total_paid,
175
                        note   => $note,
176
                        mode   => $paymode,
177
                    }
178
                );
171
            }
179
            }
172
180
173
            print $input->redirect(
181
            print $input->redirect(
(-)a/opac/opac-account-pay-paypal-return.pl (-2 / +1 lines)
Lines 104-110 if ( $response->is_success ) { Link Here
104
            {
104
            {
105
                amount => $amount,
105
                amount => $amount,
106
                lines  => \@lines,
106
                lines  => \@lines,
107
                note   => 'PayPal'
107
                mode   => '08',
108
            }
108
            }
109
        );
109
        );
110
    }
110
    }
111
- 

Return to bug 5620