|
Lines 84-99
if ( $print eq 'checkinslip' ) {
Link Here
|
| 84 |
my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch; |
84 |
my $checkinslip_branch = $session->param('branch') ? $session->param('branch') : $branch; |
| 85 |
|
85 |
|
| 86 |
# get today's checkins |
86 |
# get today's checkins |
| 87 |
my $today_start = dt_from_string->set( hour => 0, minute => 0, second => 0 ); |
87 |
my $dtf = Koha::Database->new->schema->storage->datetime_parser; |
| 88 |
my $today_end = dt_from_string->set( hour => 23, minute => 59, second => 0 ); |
88 |
my $today = dt_from_string; |
| 89 |
$today_start = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_start ); |
89 |
my $today_start = $today->clone->set( hour => 0, minute => 0, second => 0 ); |
| 90 |
$today_end = Koha::Database->new->schema->storage->datetime_parser->format_datetime( $today_end ); |
90 |
my $today_end = $today->clone->set( hour => 23, minute => 59, second => 0 ); |
| 91 |
my @todays_checkins = Koha::Old::Checkouts->search({ |
91 |
$today_start = $dtf->format_datetime( $today_start ); |
|
|
92 |
$today_end = $dtf->format_datetime( $today_end ); |
| 93 |
my @todays_checkins = $patron->old_checkouts->search({ |
| 92 |
returndate => { |
94 |
returndate => { |
| 93 |
'>=' => $today_start, |
95 |
'>=' => $today_start, |
| 94 |
'<=' => $today_end, |
96 |
'<=' => $today_end, |
| 95 |
}, |
97 |
}, |
| 96 |
borrowernumber => $borrowernumber, |
|
|
| 97 |
branchcode => $checkinslip_branch, |
98 |
branchcode => $checkinslip_branch, |
| 98 |
}); |
99 |
}); |
| 99 |
|
100 |
|
|
Lines 102-120
if ( $print eq 'checkinslip' ) {
Link Here
|
| 102 |
); |
103 |
); |
| 103 |
|
104 |
|
| 104 |
my $letter = C4::Letters::GetPreparedLetter( |
105 |
my $letter = C4::Letters::GetPreparedLetter( |
| 105 |
module => 'circulation', |
106 |
module => 'circulation', |
| 106 |
letter_code => 'CHECKINSLIP', |
107 |
letter_code => 'CHECKINSLIP', |
| 107 |
branchcode => $checkinslip_branch, |
108 |
branchcode => $checkinslip_branch, |
| 108 |
lang => $patron->lang, |
109 |
lang => $patron->lang, |
| 109 |
tables => { |
110 |
tables => { |
| 110 |
branches => $checkinslip_branch, |
111 |
branches => $checkinslip_branch, |
| 111 |
borrowers => $borrowernumber, |
112 |
borrowers => $borrowernumber, |
| 112 |
}, |
113 |
}, |
| 113 |
loops => \%loops, |
114 |
loops => \%loops, |
| 114 |
message_transport_type => 'print' |
115 |
message_transport_type => 'print' |
| 115 |
); |
116 |
); |
| 116 |
|
117 |
|
| 117 |
$slip = $letter->{content}; |
118 |
$slip = $letter->{content}; |
| 118 |
$is_html = $letter->{is_html}; |
119 |
$is_html = $letter->{is_html}; |
| 119 |
|
120 |
|
| 120 |
} elsif (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) { |
121 |
} elsif (my $letter = IssueSlip ($session->param('branch') || $branch, $borrowernumber, $print eq "qslip")) { |
| 121 |
- |
|
|