fix bug in last_bill method which prevented last_bill dates from being set
authorivan <ivan>
Sat, 10 May 2003 05:41:20 +0000 (05:41 +0000)
committerivan <ivan>
Sat, 10 May 2003 05:41:20 +0000 (05:41 +0000)
FS/FS/cust_pkg.pm

index 4eea2c0..bd3d1f5 100644 (file)
@@ -477,8 +477,8 @@ Useful for billing metered services.
 
 sub last_bill {
   my $self = shift;
-  if ( $self->dbdef_table->column('manual_flag') ) {
-    return $self->setfield('last_bill', $_[1]) if @_;
+  if ( $self->dbdef_table->column('last_bill') ) {
+    return $self->setfield('last_bill', $_[0]) if @_;
     return $self->getfield('last_bill') if $self->getfield('last_bill');
   }    
   my $cust_bill_pkg = qsearchs('cust_bill_pkg', { 'pkgnum' => $self->pkgnum,