Bugzilla – Attachment 150669 Details for
Bug 33653
Search for late orders can show received order lines
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33653: Never consider received orders as late
Bug-33653-Never-consider-received-orders-as-late.patch (text/plain), 3.21 KB, created by
Katrin Fischer
on 2023-05-04 14:23:36 UTC
(
hide
)
Description:
Bug 33653: Never consider received orders as late
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-05-04 14:23:36 UTC
Size:
3.21 KB
patch
obsolete
>From 356618a398f0feda57e2b26634b24bcf3dda73b7 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Wed, 3 May 2023 15:18:13 +0200 >Subject: [PATCH] Bug 33653: Never consider received orders as late > >We should not list received orders on the late orders page. > >Test plan: >* Create a basket >* Create a normal order (not from a subscription, no standing order) >* Leave estimated delivery date empty >* Close the basket >* Create a new invoice and receive the order line >* Go to acq > late orders >* Verify the order is not in the list >* Set filter for 'To' date into the future, i.e. 01/01/2025 >=> Without this patch the order shows up >=> With this patch applied the received order does not show up > >Signed-off-by: Michaela Sieber <michaela.sieber@kit.edu> >Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de> >--- > Koha/Acquisition/Orders.pm | 2 +- > t/db_dependent/Koha/Acquisition/Order.t | 16 ++++++++++++++++ > 2 files changed, 17 insertions(+), 1 deletion(-) > >diff --git a/Koha/Acquisition/Orders.pm b/Koha/Acquisition/Orders.pm >index e429475dc3..5240d699a5 100644 >--- a/Koha/Acquisition/Orders.pm >+++ b/Koha/Acquisition/Orders.pm >@@ -132,7 +132,7 @@ sub filter_by_lates { > : () > ), > >- ( orderstatus => { '!=' => 'cancelled' } ), >+ ( orderstatus => { '-not_in' => ['cancelled', 'complete'] } ), > > }, > { >diff --git a/t/db_dependent/Koha/Acquisition/Order.t b/t/db_dependent/Koha/Acquisition/Order.t >index 4d96e3b7d9..784acd11cb 100755 >--- a/t/db_dependent/Koha/Acquisition/Order.t >+++ b/t/db_dependent/Koha/Acquisition/Order.t >@@ -416,6 +416,7 @@ subtest 'filter_by_late' => sub { > datereceived => undef, > datecancellationprinted => undef, > estimated_delivery_date => undef, >+ orderstatus => 'ordered', > } > } > ); >@@ -436,6 +437,7 @@ subtest 'filter_by_late' => sub { > datereceived => undef, > datecancellationprinted => undef, > estimated_delivery_date => undef, >+ orderstatus => 'ordered', > } > } > ); >@@ -456,6 +458,7 @@ subtest 'filter_by_late' => sub { > datereceived => undef, > datecancellationprinted => undef, > estimated_delivery_date => undef, >+ orderstatus => 'ordered', > } > } > ); >@@ -476,6 +479,19 @@ subtest 'filter_by_late' => sub { > datereceived => undef, > datecancellationprinted => undef, > estimated_delivery_date => undef, >+ orderstatus => 'ordered', >+ } >+ } >+ ); >+ my $order_42 = $builder->build_object( >+ { >+ class => 'Koha::Acquisition::Orders', >+ value => { >+ basketno => $basket_4->basketno, >+ datereceived => undef, >+ datecancellationprinted => undef, >+ estimated_delivery_date => undef, >+ orderstatus => 'complete', > } > } > ); >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 33653
:
150582
|
150624
|
150669
|
150686
|
150821
|
150833
|
150834
|
150865