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