[freeside-commits] branch FREESIDE_2_3_BRANCH updated. 1b6a5f4347ffe0213e3642f5fb741b8b32cfa456

Ivan ivan at 420.am
Sun Aug 26 13:27:52 PDT 2012


The branch, FREESIDE_2_3_BRANCH has been updated
       via  1b6a5f4347ffe0213e3642f5fb741b8b32cfa456 (commit)
      from  583b3d28d3b999aba3c68c3bcdd3aeaaae9e0f9c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 1b6a5f4347ffe0213e3642f5fb741b8b32cfa456
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Aug 26 13:27:49 2012 -0700

    fix listing of previous balances when two customer invoices are generated in the same second, RT#18928

diff --git a/FS/FS/cust_bill.pm b/FS/FS/cust_bill.pm
index 96dce2c..0823d48 100644
--- a/FS/FS/cust_bill.pm
+++ b/FS/FS/cust_bill.pm
@@ -388,8 +388,11 @@ sub previous {
   my $self = shift;
   my $total = 0;
   my @cust_bill = sort { $a->_date <=> $b->_date }
-    grep { $_->owed != 0 && $_->_date < $self->_date }
-      qsearch( 'cust_bill', { 'custnum' => $self->custnum } ) 
+    grep { $_->owed != 0 }
+      qsearch( 'cust_bill', { 'custnum'  => $self->custnum,
+                              #'_date'   => { op=>'<', value=>$self->_date },
+                              'invnum'   => { op=>'<', value=>$self->invnum },
+                            } ) 
   ;
   foreach ( @cust_bill ) { $total += $_->owed; }
   $total, @cust_bill;

-----------------------------------------------------------------------

Summary of changes:
 FS/FS/cust_bill.pm |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)




More information about the freeside-commits mailing list