Bug 38343: Add info if there are closed invoices not displayed
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
parent
d013a4aef0
commit
9588731d40
2 changed files with 18 additions and 0 deletions
|
@ -161,6 +161,20 @@ my @parcels = GetInvoices(
|
|||
);
|
||||
my $count_parcels = @parcels;
|
||||
|
||||
unless ($include_closed) {
|
||||
|
||||
# FIXME Implement and use Koha::Acquisition::Bookseller->invoices;
|
||||
my $closed_invoices = Koha::Acquisition::Invoices->search(
|
||||
{
|
||||
booksellerid => $booksellerid,
|
||||
( $datefrom ? ( shipmentdatefrom => $datefrom ) : () ),
|
||||
( $dateto ? ( shipmentdateto => $dateto ) : () ),
|
||||
closedate => { '!=' => undef },
|
||||
}
|
||||
);
|
||||
$template->param( closed_invoices => $closed_invoices->count );
|
||||
}
|
||||
|
||||
# multi page display gestion
|
||||
$startfrom ||= 0;
|
||||
if ( $count_parcels > $resultsperpage ) {
|
||||
|
|
|
@ -39,6 +39,10 @@
|
|||
[% INCLUDE 'messages.inc' %]
|
||||
<h1>Receive shipment from vendor <a href="/cgi-bin/koha/acqui/supplier.pl?booksellerid=[% booksellerid | uri %]">[% name | html %]</a></h1>
|
||||
|
||||
[% IF closed_invoices %]
|
||||
<p>[% I18N.tnx("There is one closed invoice not included in this search.", "There are {closed_invoices} closed invoices not included in this search.", closed_invoices, { closed_invoices => closed_invoices }) %]</p>
|
||||
[% END %]
|
||||
|
||||
[% IF ( error_failed_to_create_invoice ) %]
|
||||
<div id="error" class="alert alert-warning">
|
||||
<p>An error has occurred. Invoice cannot be created.</p>
|
||||
|
|
Loading…
Reference in a new issue