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

(-)a/Koha/Charges/Sales.pm (-6 / +3 lines)
Lines 157-168 sub _get_valid_items { Link Here
157
    my $self = shift;
157
    my $self = shift;
158
158
159
    $self->{valid_items} //= {
159
    $self->{valid_items} //= {
160
        map { $_ => 1 } Koha::AuthorisedValues->search(
160
        map { $_ => 1 }
161
            {
161
          Koha::Account::DebitTypes->search_with_library_limits( {}, {},
162
                category   => 'MANUAL_INV',
162
            $self->{cash_register}->branch )->get_column('code')
163
                branchcode => $self->{cash_register}->branch
164
            }
165
        )->get_column('authorised_value')
166
    };
163
    };
167
164
168
    return $self->{valid_items};
165
    return $self->{valid_items};
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/pos-menu.inc (-2 / +2 lines)
Lines 7-14 Link Here
7
                <li><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></li>
7
                <li><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></li>
8
            [% END %]
8
            [% END %]
9
9
10
            [% IF ( CAN_user_parameters_manage_auth_values ) %]
10
            [% IF ( CAN_user_parameters_manage_accounts ) %]
11
                <li><a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=MANUAL_INV">Purchase items</a></li>
11
                <li><a href="/cgi-bin/koha/admin/debit_types.pl">Purchase items</a></li>
12
            [% END %]
12
            [% END %]
13
        </ul>
13
        </ul>
14
        [% END %]
14
        [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/pos/pay.tt (-5 / +4 lines)
Lines 31-37 Link Here
31
                    <fieldset class="rows">
31
                    <fieldset class="rows">
32
                        <legend>Items for purchase</legend>
32
                        <legend>Items for purchase</legend>
33
                            Please select items from below to add to this transaction:
33
                            Please select items from below to add to this transaction:
34
                            [% SET invoice_types = AuthorisedValues.GetAuthValueDropbox('MANUAL_INV') %]
35
                            [% IF invoice_types %]
34
                            [% IF invoice_types %]
36
                            <table id="invoices">
35
                            <table id="invoices">
37
                            <thead>
36
                            <thead>
Lines 45-55 Link Here
45
                            <tbody>
44
                            <tbody>
46
                            [% FOREACH invoice IN invoice_types %]
45
                            [% FOREACH invoice IN invoice_types %]
47
                                <tr>
46
                                <tr>
48
                                    <td>[% invoice.authorised_value | html %]</td>
47
                                    <td>[% invoice.code | html %]</td>
49
                                    <td>[% invoice.lib_opac | html %]</td>
48
                                    <td>[% invoice.description | html %]</td>
50
                                    <td>[% invoice.lib | html %]</td>
49
                                    <td>[% invoice.default_amount | $Price %]</td>
51
                                    <td>
50
                                    <td>
52
                                        <button class="add_button" data-invoice-code="[% invoice.lib_opac %]" data-invoice-title="[% invoice.authorised_value | html %]" data-invoice-price="[% invoice.lib | html %]"><i class="fa fa-plus"></i> Add</button>
51
                                        <button class="add_button" data-invoice-code="[% invoice.code %]" data-invoice-title="[% invoice.description | html %]" data-invoice-price="[% invoice.default_amount | html %]"><i class="fa fa-plus"></i> Add</button>
53
                                    </td>
52
                                    </td>
54
                                </tr>
53
                                </tr>
55
                            [% END %]
54
                            [% END %]
(-)a/pos/pay.pl (-1 / +7 lines)
Lines 9-14 use C4::Auth qw/:DEFAULT get_session/; Link Here
9
use C4::Output;
9
use C4::Output;
10
use C4::Context;
10
use C4::Context;
11
11
12
use Koha::Account::DebitTypes;
12
use Koha::AuthorisedValues;
13
use Koha::AuthorisedValues;
13
use Koha::Cash::Registers;
14
use Koha::Cash::Registers;
14
use Koha::Charges::Sales;
15
use Koha::Charges::Sales;
Lines 53-58 else { Link Here
53
    );
54
    );
54
}
55
}
55
56
57
my $invoice_types =
58
  Koha::Account::DebitTypes->search_with_library_limits(
59
    { can_be_added_manually => 1 },
60
    {}, $library_id );
61
$template->param( invoice_types => $invoice_types );
62
56
my $total_paid = $q->param('paid');
63
my $total_paid = $q->param('paid');
57
if ( $total_paid and $total_paid ne '0.00' ) {
64
if ( $total_paid and $total_paid ne '0.00' ) {
58
    my $cash_register = Koha::Cash::Registers->find( { id => $registerid } );
65
    my $cash_register = Koha::Cash::Registers->find( { id => $registerid } );
59
- 

Return to bug 23354