From: ivan Date: Tue, 24 Aug 2010 19:07:59 +0000 (+0000) Subject: eliminate needless noise on lack of sync_bill_date option X-Git-Tag: TORRUS_1_0_9~354 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ced6be92d868addbed9ff93b39bbd6a1f634bcb7 eliminate needless noise on lack of sync_bill_date option --- diff --git a/FS/FS/part_pkg/flat.pm b/FS/FS/part_pkg/flat.pm index a04f44ae4..537cdcf56 100644 --- a/FS/FS/part_pkg/flat.pm +++ b/FS/FS/part_pkg/flat.pm @@ -171,7 +171,7 @@ sub calc_recur { return 0 if $self->option('recur_temporality', 1) eq 'preceding' && $last_bill == 0; - if( $self->option('sync_bill_date') ) { + if( $self->option('sync_bill_date',1) ) { return $self->calc_prorate(@_); } else { diff --git a/FS/FS/part_pkg/prorate_Mixin.pm b/FS/FS/part_pkg/prorate_Mixin.pm index a60858b37..2adf2f16a 100644 --- a/FS/FS/part_pkg/prorate_Mixin.pm +++ b/FS/FS/part_pkg/prorate_Mixin.pm @@ -48,7 +48,7 @@ sub calc_prorate { my $charge = $self->option('recur_fee') || 0; my $cutoff_day; - if( $self->option('sync_bill_date') ) { + if( $self->option('sync_bill_date',1) ) { my $next_bill = $cust_pkg->cust_main->next_bill_date; if( defined($next_bill) and $next_bill != $$sdate ) { $cutoff_day = (localtime($next_bill))[3]; diff --git a/FS/FS/part_pkg/recur_Common.pm b/FS/FS/part_pkg/recur_Common.pm index 9a6774579..21a78c00a 100644 --- a/FS/FS/part_pkg/recur_Common.pm +++ b/FS/FS/part_pkg/recur_Common.pm @@ -27,7 +27,7 @@ sub calc_recur_Common { my $recur_method = $self->option('recur_method', 1) || 'anniversary'; if ( $recur_method eq 'prorate' - or ($recur_method eq 'anniversary' and $self->option('sync_bill_date')) + or ($recur_method eq 'anniversary' and $self->option('sync_bill_date',1)) ) { $charges = $self->calc_prorate(@_); }