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