Fix stupido in CircCommon->unvoid_bill().
authorJason Stephenson <jason@sigio.com>
Mon, 7 Oct 2013 00:31:43 +0000 (20:31 -0400)
committerJason Stephenson <jason@sigio.com>
Thu, 7 Nov 2013 22:02:01 +0000 (17:02 -0500)
Signed-off-by: Jason Stephenson <jason@sigio.com>
Open-ILS/src/perlmods/lib/OpenILS/Application/Circ/CircCommon.pm

index db0d8ce..526a98c 100644 (file)
@@ -110,11 +110,11 @@ sub unvoid_bill {
 
     # Get and editor, check for a session, and check that we can void
     # bills.  (If we can void bills, we can unvoid them, too.)
-    my $ed = new_editor (authtoken => $authtoken, xact => 1);
+    my $e = new_editor (authtoken => $authtoken, xact => 1);
     return $e->die_event unless $e->checkauth;
     return $e->die_event unless $e->allowed('VOID_BILLING');
 
-    my $voids = $ed->search_money_void_payment(
+    my $voids = $e->search_money_void_payment(
         {
             billing => $bill->id()
         }
@@ -123,12 +123,12 @@ sub unvoid_bill {
     if ($voids && @$voids) {
         my $void_total = 0;
         map {$void_total += $_->amount()} @$voids;
-        my $result = $class->create_bill($ed, $void_total, $bill->btype(), $bill->billing_type(), $bill->xact(), $note);
+        my $result = $class->create_bill($e, $void_total, $bill->btype(), $bill->billing_type(), $bill->xact(), $note);
         if ($result) {
-            $ed->rollback();
+            $e->rollback();
             return $result;
         }
-        $ed->commit;
+        $e->commit;
     }
 
     return undef;