Bug 17784 Ability to see funds with an amount of 0.00 when doing a new
authorZoe Schoeler <crazy.mental.onion@gmail.com>
Tue, 17 Jan 2017 23:22:17 +0000 (23:22 +0000)
committerKyle M Hall <kyle@bywatersolutions.com>
Thu, 19 Jan 2017 11:29:08 +0000 (11:29 +0000)
order

TEST PLAN

1. Go to the acquisition module and create budget with fund of 0.00 and
another fund of 1.00.
2. On acquisitions use a vendor to create a new basket and add an order
to that basket.
3.Find a record and order it.
4. Under accounting details the fund with 0 in it won't be visable.
5. Apply patch and refresh, then it should be.

Signed-off-by: Claire Gravely <claire_gravely@hotmail.com>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
acqui/neworderempty.pl

index b76b4f4..2599f8f 100755 (executable)
@@ -219,7 +219,7 @@ my $budget_loop = [];
 my $budgets = GetBudgetHierarchy;
 foreach my $r (@{$budgets}) {
     next unless (CanUserUseBudget($borrower, $r, $userflags));
-    if (!defined $r->{budget_amount} || $r->{budget_amount} == 0) {
+    if (!defined $r->{budget_amount} || $r->{budget_amount} <0) {
         next;
     }
     push @{$budget_loop}, {