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