X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=29663c5cc004752f9a8d0fb3d7cc477a33014c26;hb=fd81134f9f262894f7133ac3084d64c52a686093;hp=2c79209c5d5aacace86b82cde857841e4032f19c;hpb=c7bf005860b761a55ca075df987fb3b5ade8c242;p=freeside.git diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 2c79209c5..29663c5cc 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -154,8 +154,9 @@ sub insert { 'classnum' => (ref($detail) ? $detail->[3] : '' ), 'phonenum' => (ref($detail) ? $detail->[4] : '' ), 'accountcode' => (ref($detail) ? $detail->[5] : '' ), - 'duration' => (ref($detail) ? $detail->[6] : '' ), - 'regionname' => (ref($detail) ? $detail->[7] : '' ), + 'startdate' => (ref($detail) ? $detail->[6] : '' ), + 'duration' => (ref($detail) ? $detail->[7] : '' ), + 'regionname' => (ref($detail) ? $detail->[8] : '' ), }; $error = $cust_bill_pkg_detail->insert; if ( $error ) { @@ -899,12 +900,25 @@ sub cust_bill_pkg_discount { =cut sub recur_show_zero { - my $self = shift; + #my $self = shift; + # $self->recur == 0 + #&& $self->pkgnum + #&& $self->cust_pkg->part_pkg->recur_show_zero; + + shift->_X_show_zero('recur'); + +} + +sub setup_show_zero { + shift->_X_show_zero('setup'); +} + +sub _X_show_zero { + my( $self, $what ) = @_; - $self->recur == 0 - && $self->pkgnum - && $self->cust_pkg->part_pkg->recur_show_zero; + return 0 unless $self->$what() == 0 && $self->pkgnum; + $self->cust_pkg->_X_show_zero($what); } =back