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

(-)a/C4/SIP/ILS/Transaction/FeePayment.pm (-2 / +2 lines)
Lines 61-67 sub pay { Link Here
61
            $account->pay(
61
            $account->pay(
62
                {
62
                {
63
                    amount => $amt,
63
                    amount => $amt,
64
                    sip    => $sip_type,
64
                    mode   => $sip_type,
65
                    type   => $type,
65
                    type   => $type,
66
                    lines  => [$fee],
66
                    lines  => [$fee],
67
                }
67
                }
Lines 76-82 sub pay { Link Here
76
        $account->pay(
76
        $account->pay(
77
            {
77
            {
78
                amount => $amt,
78
                amount => $amt,
79
                sip    => $sip_type,
79
                mode   => $sip_type,
80
                type   => $type,
80
                type   => $type,
81
            }
81
            }
82
        );
82
        );
(-)a/Koha/Account.pm (-3 / +3 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
        library_id => $branchcode,
55
        library_id => $branchcode,
56
        lines      => $lines, # Arrayref of Koha::Account::Line objects to pay
56
        lines      => $lines, # Arrayref of Koha::Account::Line objects to pay
Lines 63-69 sub pay { Link Here
63
    my ( $self, $params ) = @_;
63
    my ( $self, $params ) = @_;
64
64
65
    my $amount          = $params->{amount};
65
    my $amount          = $params->{amount};
66
    my $sip             = $params->{sip};
66
    my $mode            = $params->{mode};
67
    my $note            = $params->{note} || q{};
67
    my $note            = $params->{note} || q{};
68
    my $library_id      = $params->{library_id};
68
    my $library_id      = $params->{library_id};
69
    my $lines           = $params->{lines};
69
    my $lines           = $params->{lines};
Lines 176-182 sub pay { Link Here
176
176
177
    my $account_type =
177
    my $account_type =
178
        $type eq 'writeoff' ? 'W'
178
        $type eq 'writeoff' ? 'W'
179
      : defined($sip)       ? "Pay$sip"
179
      : defined($mode)       ? "Pay$mode"
180
      :                       'Pay';
180
      :                       'Pay';
181
181
182
    my $description = $type eq 'writeoff' ? 'Writeoff' : q{};
182
    my $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/paycollect.tt (+22 lines)
Lines 147-152 function moneyFormat(textObj) { Link Here
147
            <!-- default to paying all -->
147
            <!-- default to paying all -->
148
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" />
148
        <input name="paid" id="paid" value="[% amountoutstanding | format('%.2f') %]" />
149
    </li>
149
    </li>
150
    <li>
151
        <label for="paymode">Payment mode: </label>
152
        <select name="paymode">
153
            <option value="">Other</option>
154
            <option value="03">Cash</option>
155
            <option value="04">Credit card</option>
156
            <option value="05">Debit</option>
157
            <option value="06">Check</option>
158
            <option value="07">Cryptocurrency</option>
159
        </select>
160
    </li>
150
</ol>
161
</ol>
151
</fieldset>
162
</fieldset>
152
163
Lines 215-220 function moneyFormat(textObj) { Link Here
215
        <label for="selected_accts_notes">Note: </label>
226
        <label for="selected_accts_notes">Note: </label>
216
        <textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea>
227
        <textarea name="selected_accts_notes" id="selected_accts_notes">[% selected_accts_notes %]</textarea>
217
    </li>
228
    </li>
229
    <li>
230
        <label for="paymode">Payment mode: </label>
231
        <select name="paymode">
232
            <option value="">Other</option>
233
            <option value="03">Cash</option>
234
            <option value="04">Credit card</option>
235
            <option value="05">Debit</option>
236
            <option value="06">Check</option>
237
            <option value="07">Cryptocurrency</option>
238
        </select>
239
    </li>
218
    </ol>
240
    </ol>
219
    </fieldset>
241
    </fieldset>
220
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
242
    <div class="action"><input type="submit" name="submitbutton" value="Confirm" />
(-)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 69-74 my $individual = $input->param('pay_individual'); Link Here
69
my $writeoff     = $input->param('writeoff_individual');
69
my $writeoff     = $input->param('writeoff_individual');
70
my $select_lines = $input->param('selected');
70
my $select_lines = $input->param('selected');
71
my $select       = $input->param('selected_accts');
71
my $select       = $input->param('selected_accts');
72
my $paymode  = $input->param('paymode') || undef;
72
my $payment_note = uri_unescape scalar $input->param('payment_note');
73
my $payment_note = uri_unescape scalar $input->param('payment_note');
73
my $accountlines_id;
74
my $accountlines_id;
74
75
Lines 123-129 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
123
                    lines      => [$line],
124
                    lines      => [$line],
124
                    amount     => $total_paid,
125
                    amount     => $total_paid,
125
                    library_id => $branch,
126
                    library_id => $branch,
126
                    note       => $payment_note
127
                    note       => $payment_note,
128
                    mode       => $paymode,
127
                }
129
                }
128
            );
130
            );
129
            print $input->redirect(
131
            print $input->redirect(
Lines 154-166 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
154
                        amount => $total_paid,
156
                        amount => $total_paid,
155
                        lines  => \@lines,
157
                        lines  => \@lines,
156
                        note   => $note,
158
                        note   => $note,
159
                        mode   => $paymode,
157
                    }
160
                    }
158
                  );
161
                  );
159
            }
162
            }
160
            else {
163
            else {
161
                my $note = $input->param('selected_accts_notes');
164
                my $note = $input->param('selected_accts_notes');
162
                Koha::Account->new( { patron_id => $borrowernumber } )
165
                Koha::Account->new( { patron_id => $borrowernumber } )->pay( 
163
                  ->pay( { amount => $total_paid, note => $note } );
166
                    { 
167
                        amount => $total_paid, 
168
                        note   => $note,
169
                        mode   => $paymode,
170
                    } 
171
                );
164
            }
172
            }
165
173
166
            print $input->redirect(
174
            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