# WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
# A PARTICULAR PURPOSE. See the GNU General Public License for more details.
#
-# You should have received a copy of the GNU General Public License along with
-# Koha; if not, write to the Free Software Foundation, Inc., 59 Temple Place,
-# Suite 330, Boston, MA 02111-1307 USA
+# You should have received a copy of the GNU General Public License along
+# with Koha; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
=head1 NAME
my $pdfformat = C4::Context->preference("OrderPdfFormat");
eval "use $pdfformat" ;
- warn @_;
eval "use C4::Branch";
my $basketgroup = GetBasketgroup($basketgroupid);
}
}
}
- %orders->{$basket->{basketno}}=\@ba_orders;
+ $orders{$basket->{basketno}}=\@ba_orders;
}
- print $input->header( -type => 'application/pdf', -attachment => $basketgroup->{name}.'.pdf' );
+ print $input->header(
+ -type => 'application/pdf',
+ -attachment => ( $basketgroup->{name} || $basketgroupid ) . '.pdf'
+ );
my $pdf = printpdf($basketgroup, $bookseller, $baskets, \%orders, $bookseller->{gstrate} || C4::Context->preference("gist")) || die "pdf generation failed";
print $pdf;
exit;
printbasketgrouppdf($basketgroupid);
}elsif( $op eq "delete"){
my $basketgroupid = $input->param('basketgroupid');
- warn $basketgroupid;
DelBasketgroup($basketgroupid);
- warn "---------------";
print $input->redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' . $booksellerid);
}elsif ( $op eq 'reopen'){
};
$basketgroupid = NewBasketgroup($basketgroup);
}
-
- print $input->redirect('/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' . $booksellerid);
+
+ my $url = '/cgi-bin/koha/acqui/basketgroup.pl?booksellerid=' . $booksellerid;
+ $url .= "&closed=1" if ($input->param("closed"));
+ print $input->redirect($url);
}else{
my $basketgroups = &GetBasketgroups($booksellerid);
displaybasketgroups($basketgroups, $bookseller, $baskets);
}
+$template->param(closed => $input->param("closed"));
#prolly won't use all these, maybe just use print, the rest can be done inside validate
output_html_with_http_headers $input, $cookie, $template->output;