Lines 777-786
sub GetBudgetByCode {
Link Here
|
777 |
|
777 |
|
778 |
my $dbh = C4::Context->dbh; |
778 |
my $dbh = C4::Context->dbh; |
779 |
my $query = qq{ |
779 |
my $query = qq{ |
780 |
SELECT * |
780 |
SELECT aqbudgets.* |
781 |
FROM aqbudgets |
781 |
FROM aqbudgets |
|
|
782 |
JOIN aqbudgetperiods USING (budget_period_id) |
782 |
WHERE budget_code = ? |
783 |
WHERE budget_code = ? |
783 |
ORDER BY budget_id DESC |
784 |
ORDER BY budget_period_active DESC, budget_id DESC |
784 |
LIMIT 1 |
785 |
LIMIT 1 |
785 |
}; |
786 |
}; |
786 |
my $sth = $dbh->prepare( $query ); |
787 |
my $sth = $dbh->prepare( $query ); |
787 |
- |
|
|