Bugzilla – Attachment 161781 Details for
Bug 36002
Get rid of aqorders.purchaseordernumber
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36002: Remove unused subroutine GetParcels
Bug-36002-Remove-unused-subroutine-GetParcels.patch (text/plain), 3.20 KB, created by
Marcel de Rooy
on 2024-02-06 13:55:08 UTC
(
hide
)
Description:
Bug 36002: Remove unused subroutine GetParcels
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-02-06 13:55:08 UTC
Size:
3.20 KB
patch
obsolete
>From 1c38dfb0619f6ea4ec3f94809b1b94a8ad25dbb1 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 6 Feb 2024 13:42:34 +0000 >Subject: [PATCH] Bug 36002: Remove unused subroutine GetParcels >Content-Type: text/plain; charset=utf-8 > >That did refer to our aqorders.purchaseordernumber.. > >Test plan: >Git grep for GetParcels. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > C4/Acquisition.pm | 93 ----------------------------------------------- > 1 file changed, 93 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 370030895e..6824bd8637 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -72,8 +72,6 @@ BEGIN { > TransferOrder > ModItemOrder > >- GetParcels >- > GetInvoices > GetInvoice > GetInvoiceDetails >@@ -1965,97 +1963,6 @@ sub get_rounded_price { > return $price; > } > >- >-=head2 FUNCTIONS ABOUT PARCELS >- >-=head3 GetParcels >- >- $results = &GetParcels($bookseller, $order, $code, $datefrom, $dateto); >- >-get a lists of parcels. >- >-* Input arg : >- >-=over >- >-=item $bookseller >-is the bookseller this function has to get parcels. >- >-=item $order >-To know on what criteria the results list has to be ordered. >- >-=item $code >-is the booksellerinvoicenumber. >- >-=item $datefrom & $dateto >-to know on what date this function has to filter its search. >- >-=back >- >-* return: >-a pointer on a hash list containing parcel informations as such : >- >-=over >- >-=item Creation date >- >-=item Last operation >- >-=item Number of biblio >- >-=item Number of items >- >-=back >- >-=cut >- >-sub GetParcels { >- my ($bookseller,$order, $code, $datefrom, $dateto) = @_; >- my $dbh = C4::Context->dbh; >- my @query_params = (); >- my $strsth =" >- SELECT aqinvoices.invoicenumber, >- datereceived,purchaseordernumber, >- count(DISTINCT biblionumber) AS biblio, >- sum(quantity) AS itemsexpected, >- sum(quantityreceived) AS itemsreceived >- FROM aqorders LEFT JOIN aqbasket ON aqbasket.basketno = aqorders.basketno >- LEFT JOIN aqinvoices ON aqorders.invoiceid = aqinvoices.invoiceid >- WHERE aqbasket.booksellerid = ? and datereceived IS NOT NULL >- "; >- push @query_params, $bookseller; >- >- if ( defined $code ) { >- $strsth .= ' and aqinvoices.invoicenumber like ? '; >- # add a % to the end of the code to allow stemming. >- push @query_params, "$code%"; >- } >- >- if ( defined $datefrom ) { >- $strsth .= ' and datereceived >= ? '; >- push @query_params, $datefrom; >- } >- >- if ( defined $dateto ) { >- $strsth .= 'and datereceived <= ? '; >- push @query_params, $dateto; >- } >- >- $strsth .= "group by aqinvoices.invoicenumber,datereceived "; >- >- # can't use a placeholder to place this column name. >- # but, we could probably be checking to make sure it is a column that will be fetched. >- $strsth .= "order by $order " if ($order); >- >- my $sth = $dbh->prepare($strsth); >- >- $sth->execute( @query_params ); >- my $results = $sth->fetchall_arrayref({}); >- return @{$results}; >-} >- >-#------------------------------------------------------------# >- > =head3 GetHistory > > \@order_loop = GetHistory( %params ); >-- >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 36002
:
161779
|
161780
|
161781
|
161782
|
164938
|
164939
|
164940
|
164941
|
165386
|
165387
|
165388
|
165389
|
165853