Lines 99-105
BEGIN {
Link Here
|
99 |
&GetIssuingCharges |
99 |
&GetIssuingCharges |
100 |
&GetBranchBorrowerCircRule |
100 |
&GetBranchBorrowerCircRule |
101 |
&GetBranchItemRule |
101 |
&GetBranchItemRule |
102 |
&GetBiblioIssues |
|
|
103 |
&GetOpenIssue |
102 |
&GetOpenIssue |
104 |
&CheckIfIssuedToPatron |
103 |
&CheckIfIssuedToPatron |
105 |
&IsItemIssued |
104 |
&IsItemIssued |
Lines 2553-2602
sub GetOpenIssue {
Link Here
|
2553 |
|
2552 |
|
2554 |
} |
2553 |
} |
2555 |
|
2554 |
|
2556 |
=head2 GetBiblioIssues |
|
|
2557 |
|
2558 |
$issues = GetBiblioIssues($biblionumber); |
2559 |
|
2560 |
this function get all issues from a biblionumber. |
2561 |
|
2562 |
Return: |
2563 |
C<$issues> is a reference to array which each value is ref-to-hash. This ref-to-hash contains all column from |
2564 |
tables issues and the firstname,surname & cardnumber from borrowers. |
2565 |
|
2566 |
=cut |
2567 |
|
2568 |
sub GetBiblioIssues { |
2569 |
my $biblionumber = shift; |
2570 |
return unless $biblionumber; |
2571 |
my $dbh = C4::Context->dbh; |
2572 |
my $query = " |
2573 |
SELECT issues.*,items.barcode,biblio.biblionumber,biblio.title, biblio.author,borrowers.cardnumber,borrowers.surname,borrowers.firstname |
2574 |
FROM issues |
2575 |
LEFT JOIN borrowers ON borrowers.borrowernumber = issues.borrowernumber |
2576 |
LEFT JOIN items ON issues.itemnumber = items.itemnumber |
2577 |
LEFT JOIN biblioitems ON items.itemnumber = biblioitems.biblioitemnumber |
2578 |
LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber |
2579 |
WHERE biblio.biblionumber = ? |
2580 |
UNION ALL |
2581 |
SELECT old_issues.*,items.barcode,biblio.biblionumber,biblio.title, biblio.author,borrowers.cardnumber,borrowers.surname,borrowers.firstname |
2582 |
FROM old_issues |
2583 |
LEFT JOIN borrowers ON borrowers.borrowernumber = old_issues.borrowernumber |
2584 |
LEFT JOIN items ON old_issues.itemnumber = items.itemnumber |
2585 |
LEFT JOIN biblioitems ON items.itemnumber = biblioitems.biblioitemnumber |
2586 |
LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber |
2587 |
WHERE biblio.biblionumber = ? |
2588 |
ORDER BY timestamp |
2589 |
"; |
2590 |
my $sth = $dbh->prepare($query); |
2591 |
$sth->execute($biblionumber, $biblionumber); |
2592 |
|
2593 |
my @issues; |
2594 |
while ( my $data = $sth->fetchrow_hashref ) { |
2595 |
push @issues, $data; |
2596 |
} |
2597 |
return \@issues; |
2598 |
} |
2599 |
|
2600 |
=head2 GetUpcomingDueIssues |
2555 |
=head2 GetUpcomingDueIssues |
2601 |
|
2556 |
|
2602 |
my $upcoming_dues = GetUpcomingDueIssues( { days_in_advance => 4 } ); |
2557 |
my $upcoming_dues = GetUpcomingDueIssues( { days_in_advance => 4 } ); |