Bug 23354: Update to account for bug 23049
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com> Signed-off-by: Josef Moravec <josef.moravec@gmail.com> Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
This commit is contained in:
parent
a63932af34
commit
cae27cb593
|
|
@ -157,12 +157,9 @@ sub _get_valid_items {
|
|||
my $self = shift;
|
||||
|
||||
$self->{valid_items} //= {
|
||||
map { $_ => 1 } Koha::AuthorisedValues->search(
|
||||
{
|
||||
category => 'MANUAL_INV',
|
||||
branchcode => $self->{cash_register}->branch
|
||||
}
|
||||
)->get_column('authorised_value')
|
||||
map { $_ => 1 }
|
||||
Koha::Account::DebitTypes->search_with_library_limits( {}, {},
|
||||
$self->{cash_register}->branch )->get_column('code')
|
||||
};
|
||||
|
||||
return $self->{valid_items};
|
||||
|
|
|
|||
|
|
@ -7,8 +7,8 @@
|
|||
<li><a href="/cgi-bin/koha/admin/cash_registers.pl">Cash registers</a></li>
|
||||
[% END %]
|
||||
|
||||
[% IF ( CAN_user_parameters_manage_auth_values ) %]
|
||||
<li><a href="/cgi-bin/koha/admin/authorised_values.pl?searchfield=MANUAL_INV">Purchase items</a></li>
|
||||
[% IF ( CAN_user_parameters_manage_accounts ) %]
|
||||
<li><a href="/cgi-bin/koha/admin/debit_types.pl">Purchase items</a></li>
|
||||
[% END %]
|
||||
</ul>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -31,7 +31,6 @@
|
|||
<fieldset class="rows">
|
||||
<legend>Items for purchase</legend>
|
||||
Please select items from below to add to this transaction:
|
||||
[% SET invoice_types = AuthorisedValues.GetAuthValueDropbox('MANUAL_INV') %]
|
||||
[% IF invoice_types %]
|
||||
<table id="invoices">
|
||||
<thead>
|
||||
|
|
@ -45,11 +44,11 @@
|
|||
<tbody>
|
||||
[% FOREACH invoice IN invoice_types %]
|
||||
<tr>
|
||||
<td>[% invoice.authorised_value | html %]</td>
|
||||
<td>[% invoice.lib_opac | html %]</td>
|
||||
<td>[% invoice.lib | html %]</td>
|
||||
<td>[% invoice.code | html %]</td>
|
||||
<td>[% invoice.description | html %]</td>
|
||||
<td>[% invoice.default_amount | $Price %]</td>
|
||||
<td>
|
||||
<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>
|
||||
<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>
|
||||
</td>
|
||||
</tr>
|
||||
[% END %]
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ use C4::Auth qw/:DEFAULT get_session/;
|
|||
use C4::Output;
|
||||
use C4::Context;
|
||||
|
||||
use Koha::Account::DebitTypes;
|
||||
use Koha::AuthorisedValues;
|
||||
use Koha::Cash::Registers;
|
||||
use Koha::Charges::Sales;
|
||||
|
|
@ -53,6 +54,12 @@ else {
|
|||
);
|
||||
}
|
||||
|
||||
my $invoice_types =
|
||||
Koha::Account::DebitTypes->search_with_library_limits(
|
||||
{ can_be_added_manually => 1 },
|
||||
{}, $library_id );
|
||||
$template->param( invoice_types => $invoice_types );
|
||||
|
||||
my $total_paid = $q->param('paid');
|
||||
if ( $total_paid and $total_paid ne '0.00' ) {
|
||||
my $cash_register = Koha::Cash::Registers->find( { id => $registerid } );
|
||||
|
|
|
|||
Loading…
Reference in New Issue