Lines 25-31
use C4::Context;
Link Here
|
25 |
use C4::Output; |
25 |
use C4::Output; |
26 |
use C4::Auth; |
26 |
use C4::Auth; |
27 |
use C4::Budgets; |
27 |
use C4::Budgets; |
28 |
|
|
|
29 |
=head1 |
28 |
=head1 |
30 |
|
29 |
|
31 |
This script checks the amount unallocated from the new parent budget , or the period - if no parent_id is given |
30 |
This script checks the amount unallocated from the new parent budget , or the period - if no parent_id is given |
Lines 76-82
if ($parent) {
Link Here
|
76 |
# ELSE , IF NO PARENT PASSED, THEN CHECK UNALLOCATED FOR PERIOD, IF NOT THEN RETURN 2 |
75 |
# ELSE , IF NO PARENT PASSED, THEN CHECK UNALLOCATED FOR PERIOD, IF NOT THEN RETURN 2 |
77 |
else { |
76 |
else { |
78 |
my $query = qq| SELECT SUM(budget_amount) as sum |
77 |
my $query = qq| SELECT SUM(budget_amount) as sum |
79 |
FROM aqbudgets WHERE budget_period_id = ?|; |
78 |
FROM aqbudgets WHERE budget_period_id = ? and budget_parent_id IS NULL|; |
80 |
|
79 |
|
81 |
my $sth = $dbh->prepare($query); |
80 |
my $sth = $dbh->prepare($query); |
82 |
$sth->execute($period_id); |
81 |
$sth->execute($period_id); |
Lines 96-102
if ($parent_id) {
Link Here
|
96 |
$returncode = 0; |
95 |
$returncode = 0; |
97 |
} |
96 |
} |
98 |
|
97 |
|
99 |
$template->param( return => $returncode ); |
|
|
100 |
|
98 |
|
101 |
output_html_with_http_headers $input, $cookie, $template->output; |
99 |
output_html_with_http_headers $input, $cookie, $returncode; |
102 |
1; |
100 |
1; |
103 |
- |
|
|