Bugzilla – Attachment 103596 Details for
Bug 25266
Not all vendors are listed in the filters on the late order claims page
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 25266: Display vendor with late orders in the dropdown list
Bug-25266-Display-vendor-with-late-orders-in-the-d.patch (text/plain), 2.26 KB, created by
Jonathan Druart
on 2020-04-23 13:03:25 UTC
(
hide
)
Description:
Bug 25266: Display vendor with late orders in the dropdown list
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-04-23 13:03:25 UTC
Size:
2.26 KB
patch
obsolete
>From c6f7e9890e3e78ae6000f9bf2c02befc21f389d6 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 23 Apr 2020 15:03:05 +0200 >Subject: [PATCH] Bug 25266: Display vendor with late orders in the dropdown > list > >--- > C4/Bookseller.pm | 2 +- > t/db_dependent/Bookseller.t | 8 ++++---- > 2 files changed, 5 insertions(+), 5 deletions(-) > >diff --git a/C4/Bookseller.pm b/C4/Bookseller.pm >index e5f37f1889..c82216c9a3 100644 >--- a/C4/Bookseller.pm >+++ b/C4/Bookseller.pm >@@ -73,7 +73,7 @@ sub GetBooksellersWithLateOrders { > AND aqbasket.closedate IS NOT NULL > "; > if ( defined $delay && $delay >= 0 ) { >- $query .= " AND (closedate <= DATE_SUB(CAST(now() AS date),INTERVAL ? + COALESCE(aqbooksellers.deliverytime,0) DAY)) "; >+ $query .= " AND (closedate <= DATE_SUB(CAST(now() AS date),INTERVAL ? DAY)) " ; > push @query_params, $delay; > } elsif ( $delay && $delay < 0 ){ > warn 'WARNING: GetBooksellerWithLateOrders is called with a negative value'; >diff --git a/t/db_dependent/Bookseller.t b/t/db_dependent/Bookseller.t >index c0db4fae6c..a85b59aab6 100644 >--- a/t/db_dependent/Bookseller.t >+++ b/t/db_dependent/Bookseller.t >@@ -443,16 +443,16 @@ isnt( exists( $suppliers{$id_supplier4} ), 1, "Supplier4 hasnt late orders" ) > > #Case 2: With $delay = 4 > # today + 0 > now-$delay -NOT LATE- >-# (today-5) + 2 <= now() - $delay -NOT LATE- >-# (today-10) + 3 <= now() - $delay -LATE- >+# (today-5) <= now() - $delay -NOT LATE- >+# (today-10) <= now() - $delay -LATE- > # quantityreceived = quantity -NOT LATE- > %suppliers = C4::Bookseller::GetBooksellersWithLateOrders( 4, undef, undef ); > isnt( exists( $suppliers{$id_supplier1} ), > 1, "Supplier1 has late orders but today > now() - 4 days" ); > isnt( exists( $suppliers{$id_supplier2} ), >- 1, "Supplier2 has late orders and $daysago5 <= now() - (4 days+2)" ); >+ 1, "Supplier2 has late orders and $daysago5 <= now() - (4 days)" ); > ok( exists( $suppliers{$id_supplier3} ), >- "Supplier3 has late orders and $daysago10 <= now() - (4 days+3)" ); >+ "Supplier3 has late orders and $daysago10 <= now() - (4 days)" ); > isnt( exists( $suppliers{$id_supplier4} ), 1, "Supplier4 hasnt late orders" ); > > #Case 3: With $delay = -1 >-- >2.20.1
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 25266
:
103596
|
104254
|
104255
|
104257
|
105321
|
105329
|
105330
|
105331
|
105592
|
105621
|
105622
|
105623
|
105624