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

(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/paycollect.tt (-2 / +2 lines)
Lines 154-160 Link Here
154
        <label for="cash_register">Cash register: </label>
154
        <label for="cash_register">Cash register: </label>
155
        <select name="cash_register" id="cash_register">
155
        <select name="cash_register" id="cash_register">
156
            [% FOREACH register IN registers %]
156
            [% FOREACH register IN registers %]
157
              [% IF register.id == registerid %]
157
              [% IF register.id == default_register %]
158
            <option value="[% register.id | html %]" selected="selected">[% register.name | html %]</option>
158
            <option value="[% register.id | html %]" selected="selected">[% register.name | html %]</option>
159
              [% ELSE %]
159
              [% ELSE %]
160
            <option value="[% register.id | html %]">[% register.name | html %]</option>
160
            <option value="[% register.id | html %]">[% register.name | html %]</option>
Lines 290-296 Link Here
290
        <label for="cash_register">Cash register: </label>
290
        <label for="cash_register">Cash register: </label>
291
        <select name="cash_register" id="cash_register">
291
        <select name="cash_register" id="cash_register">
292
            [% FOREACH register IN registers %]
292
            [% FOREACH register IN registers %]
293
              [% IF register.id == registerid %]
293
              [% IF register.id == default_register %]
294
            <option value="[% register.id | html %]" selected="selected">[% register.name | html %]</option>
294
            <option value="[% register.id | html %]" selected="selected">[% register.name | html %]</option>
295
              [% ELSE %]
295
              [% ELSE %]
296
            <option value="[% register.id | html %]">[% register.name | html %]</option>
296
            <option value="[% register.id | html %]">[% register.name | html %]</option>
(-)a/members/paycollect.pl (-11 / +10 lines)
Lines 77-85 my $payment_note = uri_unescape scalar $input->param('payment_note'); Link Here
77
my $payment_type = scalar $input->param('payment_type');
77
my $payment_type = scalar $input->param('payment_type');
78
my $accountlines_id;
78
my $accountlines_id;
79
79
80
my $registerid;
80
my $cash_register_id;
81
if ( C4::Context->preference('UseCashRegisters') ) {
81
if ( C4::Context->preference('UseCashRegisters') ) {
82
    $registerid = $input->param('registerid');
82
    $cash_register_id = $input->param('cash_register');
83
    my $registers  = Koha::Cash::Registers->search(
83
    my $registers  = Koha::Cash::Registers->search(
84
        { branch   => $library_id, archived => 0 },
84
        { branch   => $library_id, archived => 0 },
85
        { order_by => { '-asc' => 'name' } }
85
        { order_by => { '-asc' => 'name' } }
Lines 90-105 if ( C4::Context->preference('UseCashRegisters') ) { Link Here
90
    }
90
    }
91
    else {
91
    else {
92
92
93
        if ( !$registerid ) {
93
        if ( !$cash_register_id ) {
94
            my $default_register = Koha::Cash::Registers->find(
94
            my $default_register = Koha::Cash::Registers->find(
95
                { branch => $library_id, branch_default => 1 } );
95
                { branch => $library_id, branch_default => 1 } );
96
            $registerid = $default_register->id if $default_register;
96
            $cash_register_id = $default_register->id if $default_register;
97
        }
97
        }
98
        $registerid = $registers->next->id if !$registerid;
98
        $cash_register_id = $registers->next->id if !$cash_register_id;
99
99
100
        $template->param(
100
        $template->param(
101
            registerid => $registerid,
101
            default_register => $cash_register_id,
102
            registers  => $registers,
102
            registers        => $registers,
103
        );
103
        );
104
    }
104
    }
105
}
105
}
Lines 196-202 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
196
                    note         => $payment_note,
196
                    note         => $payment_note,
197
                    interface    => C4::Context->interface,
197
                    interface    => C4::Context->interface,
198
                    payment_type => $payment_type,
198
                    payment_type => $payment_type,
199
                    cash_register => $registerid
199
                    cash_register => $cash_register_id
200
                }
200
                }
201
            );
201
            );
202
            $payment_id = $pay_result->{payment_id};
202
            $payment_id = $pay_result->{payment_id};
Lines 221-227 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
221
                            note         => $note,
221
                            note         => $note,
222
                            interface    => C4::Context->interface,
222
                            interface    => C4::Context->interface,
223
                            payment_type => $payment_type,
223
                            payment_type => $payment_type,
224
                            cash_register => $registerid
224
                            cash_register => $cash_register_id
225
                        }
225
                        }
226
                    );
226
                    );
227
                }
227
                }
Lines 237-243 if ( $total_paid and $total_paid ne '0.00' ) { Link Here
237
                        payment_type => $payment_type,
237
                        payment_type => $payment_type,
238
                        interface    => C4::Context->interface,
238
                        interface    => C4::Context->interface,
239
                        payment_type => $payment_type,
239
                        payment_type => $payment_type,
240
                        cash_register => $registerid
240
                        cash_register => $cash_register_id
241
                    }
241
                    }
242
                );
242
                );
243
            }
243
            }
244
- 

Return to bug 26469