Bugzilla – Attachment 11739 Details for
Bug 7358
basket.pl : it is possible to affect a closed basket to a closed basketgroup
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 7358: reaffect a closed basket to a closed basketgroup
Bug-7358-reaffect-a-closed-basket-to-a-closed-bask.patch (text/plain), 5.40 KB, created by
Jonathan Druart
on 2012-08-22 11:37:44 UTC
(
hide
)
Description:
Bug 7358: reaffect a closed basket to a closed basketgroup
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2012-08-22 11:37:44 UTC
Size:
5.40 KB
patch
obsolete
>From 38da2eea77470d10cff4f07d47ff320c1204db53 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@biblibre.com> >Date: Wed, 22 Aug 2012 13:37:31 +0200 >Subject: [PATCH] Bug 7358: reaffect a closed basket to a closed basketgroup > >The list of basketgroups when looking at a closed basket show all the >basketgroups. >It should not be possible to affect a basket to a closed basketgroup, >since this basketgroup should have been sent to a supplier. >--- > acqui/basket.pl | 4 +- > .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 48 +++++++++++++------- > 2 files changed, 34 insertions(+), 18 deletions(-) > >diff --git a/acqui/basket.pl b/acqui/basket.pl >index 9b36c14..f79d927 100755 >--- a/acqui/basket.pl >+++ b/acqui/basket.pl >@@ -204,13 +204,14 @@ if ( $op eq 'delete_confirm' ) { > } > } > #if the basket is closed,and the user has the permission to edit basketgroups, display a list of basketgroups >- my $basketgroups; >+ my ($basketgroup, $basketgroups); > my $member = GetMember(borrowernumber => $loggedinuser); > if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) { > $basketgroups = GetBasketgroups($basket->{booksellerid}); > for my $bg ( @{$basketgroups} ) { > if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){ > $bg->{default} = 1; >+ $basketgroup = $bg; > } > } > my %emptygroup = ( id => undef, >@@ -404,6 +405,7 @@ my $total_est_gste; > qty_total => $qty_total, > GST => $gist, > basketgroups => $basketgroups, >+ basketgroup => $basketgroup, > grouped => $basket->{basketgroupid}, > unclosable => @orders ? 0 : 1, > has_budgets => $has_budgets, >diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >index dcd6ccb..e1d8fe7 100644 >--- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >+++ b/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt >@@ -202,24 +202,38 @@ > [% IF ( closedate ) %] > <div class="yui-u"> > <form action="/cgi-bin/koha/acqui/basketgroup.pl" method="post"> >+ <p> >+ <label for="basketgroupid"><strong>Basket group:</strong></label> >+ [% IF basketgroup.closed %] >+ [% basketgroup.name %] (closed) >+ [% ELSE %] >+ </p> >+ <p> >+ <select id="basketgroupid" name="basketgroupid"> >+ <option value="new">Add new group</option> >+ [% FOREACH bg IN basketgroups %] >+ [% IF ( bg.default ) %] >+ <option value="[% bg.id %]" selected="selected">[% bg.name %]</option> >+ [% ELSE %] >+ [% UNLESS bg.closed %] >+ <option value="[% bg.id %]">[% bg.name %]</option> >+ [% ELSE %] >+ <option value="[% bg.id %]" disabled="disabled">[% bg.name %] (closed)</option> >+ [% END %] >+ [% END %] >+ [% END %] >+ </select> >+ [% END %] >+ </p> > >- <p><label for="basketgroupid"><strong>Basket group:</strong></label></p> >- <p><select id="basketgroupid" name="basketgroupid"> >- <option value="new">Add new group</option> >- [% FOREACH basketgroup IN basketgroups %] >- [% IF ( basketgroup.default ) %] >- <option value="[% basketgroup.id %]" selected="selected">[% basketgroup.name %]</option> >- [% ELSE %] >- <option value="[% basketgroup.id %]">[% basketgroup.name %]</option> >- [% END %] >- [% END %] >- </select></p> >- >- <p><input type="hidden" id="basketno" value="[% basketno %]" name="basketno" /> >- <input type="hidden" value="mod_basket" name="op" /> >- <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >- <input type="submit" value="Change basket group" /></p> >- >+ [% UNLESS basketgroup.closed %] >+ <p> >+ <input type="hidden" id="basketno" value="[% basketno %]" name="basketno" /> >+ <input type="hidden" value="mod_basket" name="op" /> >+ <input type="hidden" name="booksellerid" value="[% booksellerid %]" /> >+ <input type="submit" value="Change basket group" /> >+ </p> >+ [% END %] > </form> > </div> > [% END %] >-- >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 7358
:
6784
|
11739
|
13228
|
13316