typos
authormiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 07:08:15 +0000 (07:08 +0000)
committermiker <miker@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Wed, 6 Sep 2006 07:08:15 +0000 (07:08 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@5993 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/src/perlmods/OpenILS/Application/Actor.pm
Open-ILS/src/perlmods/OpenILS/Application/Circ/Money.pm

index 00a8a6c..25b08f4 100644 (file)
@@ -1820,7 +1820,7 @@ sub _make_mbts {
                my $to = 0.0;
                my $lb = undef;
                for my $b (@{ $x->billings }) {
-                       next if ($b->voided eq 'f' or !$b->voided);
+                       next if ($U->is_true($b->voided));
                        $to += $b->amount;
                        $lb ||= $b->billing_ts;
                        if ($b->billing_ts ge $lb) {
@@ -1835,14 +1835,14 @@ sub _make_mbts {
                my $tp = 0.0;
                my $lp = undef;
                for my $p (@{ $x->payments }) {
-                       next if ($p->voided eq 'f' or !$p->voided);
+                       next if ($U->is_true($p->voided));
                        $tp += $p->amount;
                        $lp ||= $p->payment_ts;
-                       if ($b->payment_ts ge $lp) {
-                               $lp = $b->payment_ts;
-                               $s->last_payment_note($b->note);
-                               $s->last_payment_ts($b->payment_ts);
-                               $s->last_payment_type($b->payment_type);
+                       if ($p->payment_ts ge $lp) {
+                               $lp = $p->payment_ts;
+                               $s->last_payment_note($p->note);
+                               $s->last_payment_ts($p->payment_ts);
+                               $s->last_payment_type($p->payment_type);
                        }
                }
                $s->total_paid( $tp );
index 5d2b861..569891a 100644 (file)
@@ -502,7 +502,7 @@ sub _make_mbts {
                 my $to = 0.0;
                 my $lb = undef;
                 for my $b (@{ $x->billings }) {
-                        next if ($b->voided eq 'f' or !$b->voided);
+                       next if ($U->is_true($b->voided));
                         $to += $b->amount;
                         $lb ||= $b->billing_ts;
                         if ($b->billing_ts ge $lb) {
@@ -517,14 +517,14 @@ sub _make_mbts {
                 my $tp = 0.0;
                 my $lp = undef;
                 for my $p (@{ $x->payments }) {
-                        next if ($p->voided eq 'f' or !$p->voided);
+                       next if ($U->is_true($p->voided));
                         $tp += $p->amount;
                         $lp ||= $p->payment_ts;
-                        if ($b->payment_ts ge $lp) {
-                                $lp = $b->payment_ts;
-                                $s->last_payment_note($b->note);
-                                $s->last_payment_ts($b->payment_ts);
-                                $s->last_payment_type($b->payment_type);
+                        if ($p->payment_ts ge $lp) {
+                                $lp = $p->payment_ts;
+                                $s->last_payment_note($p->note);
+                                $s->last_payment_ts($p->payment_ts);
+                                $s->last_payment_type($p->payment_type);
                         }
                 }
                 $s->total_paid( $tp );
@@ -548,6 +548,8 @@ __PACKAGE__->register_method (
 sub fetch_mbts {
        my($s, $c, $authtoken, $id) = @_;
 
+       $id = $id->id if (ref($id));
+
         my @xacts = @{ $U->cstorereq(
                'open-ils.cstore.direct.money.billable_transaction.search.atomic',
                 { id => $id },