Lines 56-62
use C4::Bookseller qw/GetBookSellerFromId/;
Link Here
|
56 |
use C4::Budgets qw/ConvertCurrency/; |
56 |
use C4::Budgets qw/ConvertCurrency/; |
57 |
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; |
57 |
use C4::Acquisition qw/CloseBasketgroup ReOpenBasketgroup GetOrders GetBasketsByBasketgroup GetBasketsByBookseller ModBasketgroup NewBasketgroup DelBasketgroup GetBasketgroups ModBasket GetBasketgroup GetBasket GetBasketGroupAsCSV/; |
58 |
use C4::Bookseller qw/GetBookSellerFromId/; |
58 |
use C4::Bookseller qw/GetBookSellerFromId/; |
59 |
use C4::Branch qw/GetBranches/; |
59 |
use C4::Branch qw/GetBranches GetBranchName/; |
60 |
use C4::Members qw/GetMember/; |
60 |
use C4::Members qw/GetMember/; |
61 |
|
61 |
|
62 |
our $input=new CGI; |
62 |
our $input=new CGI; |
Lines 156-172
sub displaybasketgroups {
Link Here
|
156 |
my $baskets = shift; |
156 |
my $baskets = shift; |
157 |
if (scalar @$basketgroups != 0) { |
157 |
if (scalar @$basketgroups != 0) { |
158 |
foreach my $basketgroup (@$basketgroups){ |
158 |
foreach my $basketgroup (@$basketgroups){ |
|
|
159 |
$basketgroup -> {'billingplacename'} = GetBranchName($basketgroup -> {'billingplace'}); |
160 |
$basketgroup -> {'deliveryplacename'} = GetBranchName($basketgroup -> {'deliveryplace'}); |
159 |
my $i = 0; |
161 |
my $i = 0; |
|
|
162 |
my $basketsqty = 0; |
160 |
while($i < scalar(@$baskets)){ |
163 |
while($i < scalar(@$baskets)){ |
161 |
my $basket = @$baskets[$i]; |
164 |
my $basket = @$baskets[$i]; |
162 |
if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){ |
165 |
if($basket->{'basketgroupid'} && $basket->{'basketgroupid'} == $basketgroup->{'id'}){ |
163 |
$basket->{total} = BasketTotal($basket->{basketno}, $bookseller); |
166 |
$basket->{total} = BasketTotal($basket->{basketno}, $bookseller); |
164 |
push(@{$basketgroup->{'baskets'}}, $basket); |
167 |
push(@{$basketgroup->{'baskets'}}, $basket); |
165 |
splice(@$baskets, $i, 1); |
168 |
splice(@$baskets, $i, 1); |
|
|
169 |
++$basketsqty; |
166 |
--$i; |
170 |
--$i; |
167 |
} |
171 |
} |
168 |
++$i; |
172 |
++$i; |
169 |
} |
173 |
} |
|
|
174 |
$basketgroup -> {'basketsqty'} = $basketsqty; |
170 |
} |
175 |
} |
171 |
$template->param(basketgroups => $basketgroups); |
176 |
$template->param(basketgroups => $basketgroups); |
172 |
} |
177 |
} |