(bug #3370) add keyword to MARC field mapping
[srvgit] / C4 / Budgets.pm
index d17bfe7..760482a 100644 (file)
@@ -235,7 +235,7 @@ sub GetBudgetsPlanCell {
     $actual = $sth->fetchrow_array;
 
     # get the estimated amount
-    my $sth = $dbh->prepare( qq|
+    $sth = $dbh->prepare( qq|
 
         SELECT estimated_amount AS estimated, display FROM aqbudgets_planning
             WHERE budget_period_id = ? AND
@@ -409,7 +409,7 @@ sub GetBudgetPeriodsDropbox {
 # -------------------------------------------------------------------
 sub GetBudgetPeriods {
        my ($filters,$orderby) = @_;
-    return SearchInTable("aqbudgetperiods",$filters, $orderby);
+    return SearchInTable("aqbudgetperiods",$filters, $orderby, undef,undef, undef, "wide");
 }
 # -------------------------------------------------------------------
 sub GetBudgetPeriod {
@@ -517,8 +517,8 @@ sub GetBudgetHierarchy {
        }
 
        # look for top parents 1st
-       my @sort;
-       my ($i, $depth_count) = 0;
+       my (@sort, $depth_count);
+       ($i, $depth_count) = 0;
        while (1) {
                my $children = 0;
                foreach my $r (@res) {
@@ -568,7 +568,7 @@ sub GetBudgetHierarchy {
         $moo =~ s/\ /\&nbsp\;/g;
         $r->{'budget_code_indent'} =  $moo;
 
-        my $moo = $r->{'budget_name_indent'};
+        $moo = $r->{'budget_name_indent'};
         $moo =~ s/\ /\&nbsp\;/g;
         $r->{'budget_name_indent'} = $moo;
 
@@ -635,7 +635,6 @@ get a specific budget
 sub GetBudget {
     my ( $budget_id ) = @_;
     my $dbh = C4::Context->dbh;
-    my $query;
     my $query = "
         SELECT *
         FROM   aqbudgets
@@ -662,7 +661,7 @@ gets all budgets
 # -------------------------------------------------------------------
 sub GetBudgets {
     my ($filters,$orderby) = @_;
-    return SearchInTable("aqbudgets",$filters,$orderby);
+    return SearchInTable("aqbudgetperiods",$filters, $orderby, undef,undef, undef, "wide");
 }
 
 # -------------------------------------------------------------------