Bugzilla – Attachment 71449 Details for
Bug 20144
Test suite is failing with new default SQL modes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 20144: [sql_modes] Fix GROUP BY clause in GetInvoices
Bug-20144-sqlmodes-Fix-GROUP-BY-clause-in-GetInvoi.patch (text/plain), 1.74 KB, created by
Julian Maurice
on 2018-02-12 11:59:35 UTC
(
hide
)
Description:
Bug 20144: [sql_modes] Fix GROUP BY clause in GetInvoices
Filename:
MIME Type:
Creator:
Julian Maurice
Created:
2018-02-12 11:59:35 UTC
Size:
1.74 KB
patch
obsolete
>From 05d1634493f883e76833259fdb1199a3c993075d Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Tue, 6 Feb 2018 12:02:47 -0300 >Subject: [PATCH] Bug 20144: [sql_modes] Fix GROUP BY clause in GetInvoices > >Need to be tested from the interface! > >Fix for: >'koha_kohadev.aqinvoices.invoicenumber' isn't in GROUP BY > >Signed-off-by: Josef Moravec <josef.moravec@gmail.com> >Signed-off-by: Julian Maurice <julian.maurice@biblibre.com> >--- > C4/Acquisition.pm | 5 +++-- > 1 file changed, 3 insertions(+), 2 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 1973ab90e5..202ed7e7a3 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -2518,7 +2518,8 @@ sub GetInvoices { > > my $dbh = C4::Context->dbh; > my $query = qq{ >- SELECT aqinvoices.*, aqbooksellers.name AS suppliername, >+ SELECT aqinvoices.invoiceid, aqinvoices.invoicenumber, aqinvoices.booksellerid, aqinvoices.shipmentdate, aqinvoices.billingdate, aqinvoices.closedate, aqinvoices.shipmentcost, aqinvoices.shipmentcost_budgetid, aqinvoices.message_id, >+ aqbooksellers.name AS suppliername, > COUNT( > DISTINCT IF( > aqorders.datereceived IS NOT NULL, >@@ -2604,7 +2605,7 @@ sub GetInvoices { > } > > $query .= " WHERE " . join(" AND ", @bind_strs) if @bind_strs; >- $query .= " GROUP BY aqinvoices.invoiceid "; >+ $query .= " GROUP BY aqinvoices.invoiceid, aqinvoices.invoicenumber, aqinvoices.booksellerid, aqinvoices.shipmentdate, aqinvoices.billingdate, aqinvoices.closedate, aqinvoices.shipmentcost, aqinvoices.shipmentcost_budgetid, aqinvoices.message_id, aqbooksellers.name"; > > if($args{order_by}) { > my ($column, $direction) = split / /, $args{order_by}; >-- >2.14.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 20144
:
71410
|
71411
|
71412
|
71413
|
71414
|
71415
|
71416
|
71417
|
71418
|
71419
|
71420
|
71421
|
71422
|
71423
|
71424
|
71425
|
71427
|
71428
|
71429
|
71430
|
71431
|
71432
|
71434
|
71435
|
71436
|
71437
|
71438
|
71440
|
71441
|
71442
|
71443
|
71444
|
71445
|
71446
|
71447
|
71448
| 71449 |
71450
|
71451
|
71452
|
71453
|
71454
|
71455
|
71456
|
71457
|
71458
|
71459
|
71460
|
71461
|
71462
|
71463
|
71467
|
71564