Bugzilla – Attachment 18333 Details for
Bug 9806
Show more information on basketgroups lists
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 9806 : Add new columns to basket groups lists
Bug-9806--Add-new-columns-to-basket-groups-lists.patch (text/plain), 6.46 KB, created by
Jonathan Druart
on 2013-05-23 08:57:06 UTC
(
hide
)
Description:
Bug 9806 : Add new columns to basket groups lists
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2013-05-23 08:57:06 UTC
Size:
6.46 KB
patch
obsolete
>From cacbeffcc0c5da3f994b9d093d47501a27e62ab6 Mon Sep 17 00:00:00 2001 >From: Mathieu Saby <mathieu.saby@univ-rennes2.fr> >Date: Mon, 18 Mar 2013 20:30:46 +0100 >Subject: [PATCH] Bug 9806 : Add new columns to basket groups lists > >Revised to fix whitespace problems. Cosmetic changes put in an other patch. > >In the list of all the open/closed basketgroups for a vendor, you just >have the name of each basketgroup, and 3 action buttons. >It is not sufficient for libraries using basketgroup. > >Warning : this patch must be tested with BZ 9771 applied. If BZ 9771 is >not pushed to master when you test, apply it before. > >This patch adds the following columns : >- number (id of basketgroup) >- billingplace (name of the library) >- deliveryplace (name of the library, or "free delivery place") >- number of baskets in each basketgroup > >To test : >1) make some basketgroups with 0, 1, 2 baskets >2) make some basketgroups with different billing and deliveryplace >3) check the list of open and closed basketgroups >4) check action buttons are working like before > >Signed-off-by: Owen Leonard <oleonard@myacpl.org> > >This is a nice improvement! > >Signed-off-by: Jonathan Druart <jonathan.druart@biblibre.com> >--- > acqui/basketgroup.pl | 7 ++++++- > .../prog/en/modules/acqui/basketgroup.tt | 22 ++++++++++++++++++-- > 2 files changed, 26 insertions(+), 3 deletions(-) > >diff --git a/acqui/basketgroup.pl b/acqui/basketgroup.pl >index d6bd5d1..8d22e24 100755 >--- a/acqui/basketgroup.pl >+++ b/acqui/basketgroup.pl >@@ -56,7 +56,7 @@ use C4::Bookseller qw/GetBookSellerFromId/; > use C4::Budgets qw/ConvertCurrency/; > use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; > use C4::Bookseller qw/GetBookSellerFromId/; >-use C4::Branch qw/GetBranches/; >+use C4::Branch qw/GetBranches GetBranchName/; > use C4::Members qw/GetMember/; > > our $input=new CGI; >@@ -156,17 +156,22 @@ sub displaybasketgroups { > my $baskets = shift; > if (scalar @$basketgroups != 0) { > foreach my $basketgroup (@$basketgroups){ >+ $basketgroup -> {'billingplacename'} = GetBranchName($basketgroup -> {'billingplace'}); >+ $basketgroup -> {'deliveryplacename'} = GetBranchName($basketgroup -> {'deliveryplace'}); > my $i = 0; >+ my $basketsqty = 0; > while($i < scalar(@$baskets)){ > my $basket = @$baskets[$i]; > if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){ > $basket->{total} = BasketTotal($basket->{basketno}, $bookseller); > push(@{$basketgroup->{'baskets'}}, $basket); > splice(@$baskets, $i, 1); >+ ++$basketsqty; > --$i; > } > ++$i; > } >+ $basketgroup -> {'basketsqty'} = $basketsqty; > } > $template->param(basketgroups => $basketgroups); > } >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >index deb20e9..0247222 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basketgroup.tt >@@ -246,7 +246,12 @@ function submitForm(form) { > <table id="basket_group_opened"> > <thead> > <tr> >- <th>Basket group</th><th>Action</th> >+ <th>Name</th> >+ <th>Number</th> >+ <th>Billing place</th> >+ <th>Delivery place</th> >+ <th>Number of baskets</th> >+ <th>Action</th> > </tr> > </thead> > <tbody> >@@ -259,6 +264,10 @@ function submitForm(form) { > Basket group no. [% basketgroup.id %] > [% END %] > </td> >+ <td>[% basketgroup.id %]</td> >+ <td>[% basketgroup.billingplacename %]</td> >+ <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplacename %][% END %]</td> >+ <td>[% basketgroup.basketsqty %]</td> > <td> > <input type="button" onclick="closeandprint([% basketgroup.id %])" value="Close and print" /> > <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="add" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Edit" /></form> >@@ -274,7 +283,12 @@ function submitForm(form) { > <table id="basket_group_closed"> > <thead> > <tr> >- <th>Basket group</th><th>Action</th> >+ <th>Name</th> >+ <th>Number</th> >+ <th>Billing place</th> >+ <th>Delivery place</th> >+ <th>Number of baskets</th> >+ <th>Action</th> > </tr> > </thead> > <tbody> >@@ -288,6 +302,10 @@ function submitForm(form) { > Basket group no. [% basketgroup.id %] > [% END %] > </td> >+ <td>[% basketgroup.id %]</td> >+ <td>[% basketgroup.billingplacename %]</td> >+ <td>[% IF (basketgroup.freedeliveryplace) %]Free delivery place[% ELSE %][% basketgroup.deliveryplacename %][% END %]</td> >+ <td>[% basketgroup.basketsqty %]</td> > <td> > <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="reopen" /><input type="hidden" name="booksellerid" value="[% basketgroup.booksellerid %]" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Reopen" /></form> > <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="get"><input type="hidden" name="op" value="print" /><input type="hidden" name="basketgroupid" value="[% basketgroup.id %]" /><input type="submit" value="Print" /></form> >-- >1.7.10.4
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 9806
:
16173
|
16307
|
16309
|
16509
|
18228
|
18331
| 18333 |
18334
|
18335