[freeside-commits] freeside/FS/FS Schema.pm, 1.100, 1.101 cust_bill_pkg.pm, 1.21, 1.22

Jeff Finucane,420,, jeff at wavetail.420.am
Sun Aug 24 22:53:15 PDT 2008


Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv394/FS/FS

Modified Files:
	Schema.pm cust_bill_pkg.pm 
Log Message:
correct fallout from duplicate line items

Index: Schema.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Schema.pm,v
retrieving revision 1.100
retrieving revision 1.101
diff -u -d -r1.100 -r1.101
--- Schema.pm	23 Aug 2008 21:59:42 -0000	1.100
+++ Schema.pm	25 Aug 2008 05:53:11 -0000	1.101
@@ -500,7 +500,7 @@
         'quantity',  'int', 'NULL', '', '', '',
         'unitsetup', @money_typen, '', '', 
         'unitrecur', @money_typen, '', '', 
-        'duplicate',  'char', 'NULL', 1, '', '',  # does this need to be in db?
+        'duplicate',  'char', 'NULL', 1, '', '',
         'post_total', 'char', 'NULL', 1, '', '',
       ],
       'primary_key' => 'billpkgnum',

Index: cust_bill_pkg.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_bill_pkg.pm,v
retrieving revision 1.21
retrieving revision 1.22
diff -u -d -r1.21 -r1.22
--- cust_bill_pkg.pm	8 Aug 2008 18:13:04 -0000	1.21
+++ cust_bill_pkg.pm	25 Aug 2008 05:53:13 -0000	1.22
@@ -370,7 +370,7 @@
 # modeled after cust_bill::owed...
 sub owed {
   my( $self, $field ) = @_;
-  my $balance = $self->$field();
+  my $balance = $self->duplicate ? 0 : $self->$field();
   $balance -= $_->amount foreach ( $self->cust_bill_pay_pkg($field) );
   $balance -= $_->amount foreach ( $self->cust_credit_bill_pkg($field) );
   $balance = sprintf( '%.2f', $balance );



More information about the freeside-commits mailing list