@@ -, +, @@ for order basket not assign it to a basket group. a staff user who has the order_manage acquisitions permission but not the group_manage. The displayed basket group should be "No group". group_manage permission, then view the basket details again. The basket group field should now be a select input that allows you to change the basket group. you selected is now displayed as the current group for that order basket. The basket group delivery and billing place fields should also now be displayed. view the basket details again. This time, the basket group name should be displayed with a suffix of " (closed)", and no input to change the group should be displayed. permission, view the basket details, and verify that the basket name is displayed with a suffix of " (closed)". --- acqui/basket.pl | 14 +++++--------- .../intranet-tmpl/prog/en/modules/acqui/basket.tt | 16 ++++++++++++---- 2 files changed, 17 insertions(+), 13 deletions(-) --- a/acqui/basket.pl +++ a/acqui/basket.pl @@ -207,8 +207,8 @@ 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 ($basketgroup, $basketgroups); - my $member = GetMember(borrowernumber => $loggedinuser); - if ($basket->{closedate} && haspermission({ acquisition => 'group_manage'} )) { + my $staffuser = GetMember(borrowernumber => $loggedinuser); + if ($basket->{closedate} && haspermission($staffuser->{userid}, { acquisition => 'group_manage'} )) { $basketgroups = GetBasketgroups($basket->{booksellerid}); for my $bg ( @{$basketgroups} ) { if ($basket->{basketgroupid} && $basket->{basketgroupid} == $bg->{id}){ @@ -287,13 +287,9 @@ if ( $op eq 'delete_confirm' ) { my @orders = GetOrders($basketno); if ($basket->{basketgroupid}){ - my $basketgroup = GetBasketgroup($basket->{basketgroupid}); - for my $key (keys %$basketgroup ){ - $basketgroup->{"basketgroup$key"} = delete $basketgroup->{$key}; - } - $basketgroup->{basketgroupdeliveryplace} = C4::Branch::GetBranchName( $basketgroup->{basketgroupdeliveryplace} ); - $basketgroup->{basketgroupbillingplace} = C4::Branch::GetBranchName( $basketgroup->{basketgroupbillingplace} ); - $template->param(%$basketgroup); + $basketgroup = GetBasketgroup($basket->{basketgroupid}); + $basketgroup->{deliveryplacename} = C4::Branch::GetBranchName( $basketgroup->{deliveryplace} ); + $basketgroup->{billingplacename} = C4::Branch::GetBranchName( $basketgroup->{billingplace} ); } my $borrower= GetMember('borrowernumber' => $loggedinuser); my $budgets = GetBudgetHierarchy; --- a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt +++ a/koha-tmpl/intranet-tmpl/prog/en/modules/acqui/basket.tt @@ -203,15 +203,21 @@ [% IF ( closedate ) %]
+ [% IF ( CAN_user_acquisition_group_manage ) %]
+ [% END %]
  1. Basket group: [% IF basketgroup.closed %] [% basketgroup.name %] (closed) + [% ELSIF ( ! CAN_user_acquisition_group_manage ) %] + [%- IF basketgroup.name -%] + [% basketgroup.name %] + [%- ELSE -%] + No group + [%- END -%] [% ELSE %] -
  2. -
  3. [% END %]
  4. - [% IF ( basketgroupdeliveryplace ) %]
  5. Basket group delivery place: [% basketgroupdeliveryplace %]
  6. [% END %] - [% IF ( basketgroupbillingplace ) %]
  7. Basket group billing place: [% basketgroupbillingplace %]
  8. [% END %] + [% IF ( basketgroup.deliveryplacename ) %]
  9. Basket group delivery placename: [% basketgroup.deliveryplacename %]
  10. [% END %] + [% IF ( basketgroup.billingplacename ) %]
  11. Basket group billing place: [% basketgroup.billingplacename %]
  12. [% END %]
+ [% IF ( CAN_user_acquisition_group_manage ) %]
+ [% END %]
[% END %] --