Lines 105-111
sub SearchSuggestion {
Link Here
|
105 |
B2.branchname AS branchnamesuggestedby, |
105 |
B2.branchname AS branchnamesuggestedby, |
106 |
U2.email AS emailmanagedby, |
106 |
U2.email AS emailmanagedby, |
107 |
U2.branchcode AS branchcodemanagedby, |
107 |
U2.branchcode AS branchcodemanagedby, |
108 |
U2.borrowernumber AS borrnummanagedby |
108 |
U2.borrowernumber AS borrnummanagedby, |
|
|
109 |
B3.branchname AS branchnamesuggestedfor |
109 |
FROM suggestions |
110 |
FROM suggestions |
110 |
LEFT JOIN borrowers AS U1 ON suggestedby=U1.borrowernumber |
111 |
LEFT JOIN borrowers AS U1 ON suggestedby=U1.borrowernumber |
111 |
LEFT JOIN branches AS B1 ON B1.branchcode=U1.branchcode |
112 |
LEFT JOIN branches AS B1 ON B1.branchcode=U1.branchcode |
Lines 113-118
sub SearchSuggestion {
Link Here
|
113 |
LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber |
114 |
LEFT JOIN borrowers AS U2 ON managedby=U2.borrowernumber |
114 |
LEFT JOIN branches AS B2 ON B2.branchcode=U2.branchcode |
115 |
LEFT JOIN branches AS B2 ON B2.branchcode=U2.branchcode |
115 |
LEFT JOIN categories AS C2 ON C2.categorycode = U2.categorycode |
116 |
LEFT JOIN categories AS C2 ON C2.categorycode = U2.categorycode |
|
|
117 |
LEFT OUTER JOIN branches AS B3 ON B3.branchcode=suggestions.branchcode |
116 |
WHERE STATUS NOT IN ('CLAIMED') |
118 |
WHERE STATUS NOT IN ('CLAIMED') |
117 |
} , map { |
119 |
} , map { |
118 |
if ( my $s = $suggestion->{$_} ) { |
120 |
if ( my $s = $suggestion->{$_} ) { |