Bugzilla – Attachment 21951 Details for
Bug 11027
add a column for basketgroups in late orders table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
PATCH] Bug 11027 : Add a column for basketgroups in late orders table and improve other columns
0007-new.patch (text/plain), 6.21 KB, created by
Mathieu Saby
on 2013-10-10 16:44:55 UTC
(
hide
)
Description:
PATCH] Bug 11027 : Add a column for basketgroups in late orders table and improve other columns
Filename:
MIME Type:
Creator:
Mathieu Saby
Created:
2013-10-10 16:44:55 UTC
Size:
6.21 KB
patch
obsolete
>From ab83cdd199f524d51dd0f8b9937447d59e3be897 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Thu, 10 Oct 2013 18:33:49 +0200 >Subject: [PATCH] Bug 11027 : Add a column for basketgroups in late orders table and improve other columns >Content-Type: text/plain; charset="utf-8" > >To apply ON TOP of bug bug 7298 > >This patch makes 4 changes in late orders page : >- adding a new column for basketgroup, displaying the name and number of the basketgroup >- displaying the name of the basket as well as its number >- displaying fund in a separate column to make sorting easier, and renaming it from "budget" to "fund" (the confusion can be found elsewhere in Koha...) >- displaying branch in a separate column to make sorting easier (this column could be improved later, by getting branch from basketgroup if there is one) > >For that, in Aquisition.pm, I made some changes to GetLateOrders : >- 3 new columns in SELECT, 1 new join >- cosmetic : rename "closedate" to "aqbasket.closedate" in 4 occurences : it will be usefull later, because I am envisonning an other patch that will create a "closedate" column in basketgroup table, and I don't want MySQL to crash because of ambiguous column. > >To test : >1. display the list of late orders of your instanc. >2. You should have 3 new columns for basketgroups, fund and branch >3. In basketgroup column you should have "name of basket group (number)" >4. In basket column you should have "name of basket (number)" > > >--- > C4/Acquisition.pm | 14 +++++++++----- > .../prog/en/modules/acqui/lateorders.tt | 19 +++++++++++++------ > 2 files changed, 22 insertions(+), 11 deletions(-) > >diff --git a/C4/Acquisition.pm b/C4/Acquisition.pm >index 56c210b..e1530e6 100644 >--- a/C4/Acquisition.pm >+++ b/C4/Acquisition.pm >@@ -1859,7 +1859,7 @@ sub GetParcels { > > =head3 GetLateOrders > >- @results = &GetLateOrders; >+ $results = &GetLateOrders($delay, $supplierid, $branch, $estimateddeliverydatefrom, $estimateddeliverydateto); > > Searches for bookseller with late orders. > >@@ -1885,6 +1885,9 @@ sub GetLateOrders { > SELECT aqbasket.basketno, > aqorders.ordernumber, > DATE(aqbasket.closedate) AS orderdate, >+ aqbasket.basketname AS basketname, >+ aqbasket.basketgroupid AS basketgroupid, >+ aqbasketgroups.name AS basketgroupname, > aqorders.rrp AS unitpricesupplier, > aqorders.ecost AS unitpricelib, > aqorders.claims_count AS claims_count, >@@ -1905,6 +1908,7 @@ sub GetLateOrders { > LEFT JOIN aqbudgets ON aqorders.budget_id = aqbudgets.budget_id, > aqbasket LEFT JOIN borrowers ON aqbasket.authorisedby = borrowers.borrowernumber > LEFT JOIN aqbooksellers ON aqbasket.booksellerid = aqbooksellers.id >+ LEFT JOIN aqbasketgroups ON aqbasket.basketgroupid = aqbasketgroups.id > WHERE aqorders.basketno = aqbasket.basketno > AND ( datereceived = '' > OR datereceived IS NULL >@@ -1918,10 +1922,10 @@ sub GetLateOrders { > $select .= " > aqorders.quantity - COALESCE(aqorders.quantityreceived,0) AS quantity, > (aqorders.quantity - COALESCE(aqorders.quantityreceived,0)) * aqorders.rrp AS subtotal, >- DATEDIFF(CAST(now() AS date),closedate) AS latesince >+ DATEDIFF(CAST(now() AS date),aqbasket.closedate) AS latesince > "; > if ( defined $delay ) { >- $from .= " AND (closedate <= DATE_SUB(CAST(now() AS date),INTERVAL ? DAY)) " ; >+ $from .= " AND (aqbasket.closedate <= DATE_SUB(CAST(now() AS date),INTERVAL ? DAY)) " ; > push @query_params, $delay; > } > $having = " >@@ -1934,10 +1938,10 @@ sub GetLateOrders { > $select .= " > aqorders.quantity AS quantity, > aqorders.quantity * aqorders.rrp AS subtotal, >- (CAST(now() AS date) - closedate) AS latesince >+ (CAST(now() AS date) - aqbasket.closedate) AS latesince > "; > if ( defined $delay ) { >- $from .= " AND (closedate <= (CAST(now() AS date) -(INTERVAL ? DAY)) "; >+ $from .= " AND (aqbasket.closedate <= (CAST(now() AS date) -(INTERVAL ? DAY)) "; > push @query_params, $delay; > } > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >index c76cf2d..f44316a 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/lateorders.tt >@@ -117,6 +117,9 @@ $(document).ready(function() { > <th>Information</th> > <th>Total cost</th> > <th>Basket</th> >+ <th>Basket group</th> >+ <th>Branch</th> >+ <th>Fund</th> > <th>Claims count</th> > <th>Claimed date</th> > </tr> >@@ -154,14 +157,18 @@ $(document).ready(function() { > <td> > [% lateorder.unitpricesupplier %]x[% lateorder.quantity %] = > [% lateorder.subtotal %] >- <p title="budget">[% lateorder.budget %]</p> > </td> > <td> > <p><a href="basket.pl?basketno=[% lateorder.basketno %]" title="basket"> >- [% lateorder.basketno %] >- </a> >- </p> >- <p title="branch">[% lateorder.branch %]</p> >+ [% lateorder.basketname %] ([% lateorder.basketno %]) >+ </a> >+ </p> >+ </td> >+ <td>[% lateorder.basketgroupname %] ([% lateorder.basketgroupid %]) >+ </td> >+ <td>[% lateorder.branch %] >+ </td> >+ <td>[% lateorder.budget %] > </td> > <td>[% lateorder.claims_count %]</td> > <td>[% lateorder.claimed_date %]</td> >@@ -172,7 +179,7 @@ $(document).ready(function() { > <tr> > <th colspan="5">Total</th> > <th>[% total %]</th> >- <th colspan="3"> </th> >+ <th colspan="6"> </th> > </tr> > </tfoot> > </table> >-- >1.7.9.5 >
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 11027
:
21951
|
23659
|
23762
|
24850
|
24851
|
24852
|
24991
|
24993
|
25012
|
25013
|
25014