Bugzilla – Attachment 146437 Details for
Bug 32928
Filters missing in SQL builder on Orders::filter_by_active
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32928: Add filters on Orders::filter_by_active
Bug-32928-Add-filters-on-Ordersfilterbyactive.patch (text/plain), 1.79 KB, created by
Thibaud Guillot (thibaud_g)
on 2023-02-09 15:38:26 UTC
(
hide
)
Description:
Bug 32928: Add filters on Orders::filter_by_active
Filename:
MIME Type:
Creator:
Thibaud Guillot (thibaud_g)
Created:
2023-02-09 15:38:26 UTC
Size:
1.79 KB
patch
obsolete
>From 04fe8d99e24285e9a294bd1e12502f54a2cbe7df Mon Sep 17 00:00:00 2001 >From: Thibaud Guillot <thibaud.guillot@biblibre.com> >Date: Thu, 9 Feb 2023 16:25:46 +0100 >Subject: [PATCH] Bug 32928: Add filters on Orders::filter_by_active > >To have the same behavior than before 21.xx.xx filters must be added to >the filter_by_active function. > >If not you can have on your list, some orders that can be cancelled, or >orders with quantity totally received. > >Requirements: >Have instances with different Koha version (20.11 VS Master for example) > >Test plan: > >1) Apply this patch on Master > >Just have the same database with pending orders, and see differences between both instances on parcel.pl receptions. > >You will see that total of orders will be not the same >--- > Koha/Acquisition/Orders.pm | 14 ++++++++++---- > 1 file changed, 10 insertions(+), 4 deletions(-) > >diff --git a/Koha/Acquisition/Orders.pm b/Koha/Acquisition/Orders.pm >index e429475dc3..8c70b20ce0 100644 >--- a/Koha/Acquisition/Orders.pm >+++ b/Koha/Acquisition/Orders.pm >@@ -160,10 +160,16 @@ sub filter_by_active { > my ($self) = @_; > return $self->search( > { >- '-or' => [ >- { 'basket.is_standing' => 1, >- 'orderstatus' => [ 'new', 'ordered', 'partial' ] }, >- { 'orderstatus' => [ 'ordered', 'partial' ] } >+ 'datecancellationprinted' => undef, >+ '-or' => [ >+ { >+ 'basket.is_standing' => 1, >+ 'orderstatus' => [ 'new', 'ordered', 'partial' ] >+ }, >+ { >+ 'orderstatus' => [ 'ordered', 'partial' ], >+ 'quantityreceived' => { '<' => \'me.quantity' } >+ } > ] > }, > { join => 'basket' } >-- >2.25.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 32928
: 146437