#!/usr/bin/perl
# Copyright 2000-2002 Katipo Communications
+# Copyright 2010 BibLibre
#
# This file is part of Koha.
#
use C4::Reserves;
use C4::Branch; # GetBranchName
use C4::Form::MessagingPreferences;
+use C4::NewsChannels; #get slip news
#use Smart::Comments;
#use Data::Dumper;
$template_name = "members/moremember-receipt.tmpl";
$quickslip = 1;
$flagsrequired = { circulate => "circulate_remaining_permissions" };
+} elsif ($print eq "brief") {
+ $template_name = "members/moremember-brief.tmpl";
+ $flagsrequired = { borrowers => 1 };
} else {
$template_name = "members/moremember.tmpl";
$flagsrequired = { borrowers => 1 };
my $catcode;
if ( $category_type eq 'C') {
- if ($data->{'guarantorid'} ne '0' ) {
+ if ($data->{guarantorid} ) {
my $data2 = GetMember( 'borrowernumber' => $data->{'guarantorid'} );
foreach (qw(address city B_address B_city phone mobile zipcode country B_country)) {
$data->{$_} = $data2->{$_};
if ( $data->{'ethnicity'} || $data->{'ethnotes'} ) {
$template->param( printethnicityline => 1 );
}
-if ( $category_type eq 'A' ) {
+if ( $category_type eq 'A' || $category_type eq 'I') {
$template->param( isguarantee => 1 );
# FIXME
);
}
$template->param( guaranteeloop => \@guaranteedata );
- ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' );
+ ( $template->param( adultborrower => 1 ) ) if ( $category_type eq 'A' || $category_type eq 'I' );
}
else {
if ($data->{'guarantorid'}){
$samebranch = 1;
}
my $branchdetail = GetBranchDetail( $data->{'branchcode'});
-$data->{'branchname'} = $branchdetail->{branchname};
-
+@{$data}{keys %$branchdetail} = values %$branchdetail; # merge in all branch columns
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber );
my $lib1 = &GetSortDetails( "Bsort1", $data->{'sort1'} );
$template->param( lib1 => $lib1 ) if ($lib1);
$template->param( lib2 => $lib2 ) if ($lib2);
+# Show OPAC privacy preference is system preference is set
+if ( C4::Context->preference('OPACPrivacy') ) {
+ $template->param( OPACPrivacy => 1);
+ $template->param( "privacy".$data->{'privacy'} => 1);
+}
+
# current issues
#
my $issue = GetPendingIssues($borrowernumber);
categoryname => $data->{'description'},
reregistration => $reregistration,
branch => $branch,
+ todaysdate => C4::Dates->today(),
totalprice => sprintf("%.2f", $totalprice),
totaldue => sprintf("%.2f", $total),
totaldue_raw => $total,
quickslip => $quickslip,
);
+#Get the slip news items
+my $all_koha_news = &GetNewsToDisplay("slip");
+my $koha_news_count = scalar @$all_koha_news;
+
+$template->param(
+ koha_news => $all_koha_news,
+ koha_news_count => $koha_news_count
+);
+
output_html_with_http_headers $input, $cookie, $template->output;