Lines 224-246
else {
Link Here
|
224 |
my $branchdetail = GetBranchDetail( $data->{'branchcode'}); |
224 |
my $branchdetail = GetBranchDetail( $data->{'branchcode'}); |
225 |
@{$data}{keys %$branchdetail} = values %$branchdetail; # merge in all branch columns |
225 |
@{$data}{keys %$branchdetail} = values %$branchdetail; # merge in all branch columns |
226 |
|
226 |
|
227 |
my ( $total, $accts, $numaccts) = GetMemberAccountRecords( $borrowernumber ); |
|
|
228 |
my $lib1 = &GetSortDetails( "Bsort1", $data->{'sort1'} ); |
227 |
my $lib1 = &GetSortDetails( "Bsort1", $data->{'sort1'} ); |
229 |
my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} ); |
228 |
my $lib2 = &GetSortDetails( "Bsort2", $data->{'sort2'} ); |
230 |
$template->param( lib1 => $lib1 ) if ($lib1); |
229 |
$template->param( lib1 => $lib1 ) if ($lib1); |
231 |
$template->param( lib2 => $lib2 ) if ($lib2); |
230 |
$template->param( lib2 => $lib2 ) if ($lib2); |
232 |
|
231 |
|
233 |
# If printing a page, send the account informations to the template |
232 |
# If printing a page, send the account informations to the template |
234 |
if ($print eq "page") { |
233 |
if ( $print eq "page" ) { |
235 |
foreach my $accountline (@$accts) { |
234 |
my $schema = Koha::Database->new()->schema(); |
236 |
$accountline->{amount} = sprintf '%.2f', $accountline->{amount}; |
|
|
237 |
$accountline->{amountoutstanding} = sprintf '%.2f', $accountline->{amountoutstanding}; |
238 |
|
235 |
|
239 |
if ($accountline->{accounttype} ne 'F' && $accountline->{accounttype} ne 'FU'){ |
236 |
my @account_debits = $schema->resultset('AccountDebit') |
240 |
$accountline->{printtitle} = 1; |
237 |
->search( { borrowernumber => $borrowernumber } ); |
241 |
} |
238 |
my @account_credits = $schema->resultset('AccountCredit') |
242 |
} |
239 |
->search( { borrowernumber => $borrowernumber } ); |
243 |
$template->param( accounts => $accts ); |
240 |
|
|
|
241 |
$template->param( |
242 |
account_debits => \@account_debits, |
243 |
account_credits => \@account_credits, |
244 |
); |
244 |
} |
245 |
} |
245 |
|
246 |
|
246 |
# Show OPAC privacy preference is system preference is set |
247 |
# Show OPAC privacy preference is system preference is set |
Lines 369-376
$template->param(
Link Here
|
369 |
branch => $branch, |
370 |
branch => $branch, |
370 |
todaysdate => C4::Dates->today(), |
371 |
todaysdate => C4::Dates->today(), |
371 |
totalprice => sprintf("%.2f", $totalprice), |
372 |
totalprice => sprintf("%.2f", $totalprice), |
372 |
totaldue => sprintf("%.2f", $total), |
373 |
totaldue => sprintf("%.2f", $data->{account_balance}), |
373 |
totaldue_raw => $total, |
374 |
totaldue_raw => $data->{account_balance}, |
374 |
overdues_exist => $overdues_exist, |
375 |
overdues_exist => $overdues_exist, |
375 |
StaffMember => ($category_type eq 'S'), |
376 |
StaffMember => ($category_type eq 'S'), |
376 |
is_child => ($category_type eq 'C'), |
377 |
is_child => ($category_type eq 'C'), |