X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fpart_pkg%2Fbulk.pm;h=bc42e20d275591f1b5d6fd656f008f62b8430d2b;hb=dc83512c36dc6bea2585abada4f88d714c600e55;hp=fd96f8bc26050c7d8b0e85e8be67d6ca0bdbbed8;hpb=41f298b3615f21d2441b4503bcd8146ee5aa21e2;p=freeside.git diff --git a/FS/FS/part_pkg/bulk.pm b/FS/FS/part_pkg/bulk.pm index fd96f8bc2..bc42e20d2 100644 --- a/FS/FS/part_pkg/bulk.pm +++ b/FS/FS/part_pkg/bulk.pm @@ -27,7 +27,7 @@ $me = '[FS::part_pkg::bulk]'; sub _bulk_cust_svc { my( $self, $cust_pkg, $sdate ) = @_; # END START - $cust_pkg->h_cust_svc( $$sdate, $cust_pkg->last_bill ); + return $self->_only_svcs_filter($cust_pkg->h_cust_svc( $$sdate, $cust_pkg->last_bill )); } sub _bulk_setup { @@ -44,6 +44,9 @@ sub _bulk_recur { if $self->option('no_prorate',1); my $last_bill = $cust_pkg->last_bill; + + return (0, '') if $$sdate == $last_bill; + my $svc_start = max( $h_cust_svc->date_inserted, $last_bill); my $svc_end = $h_cust_svc->date_deleted; $svc_end = ( !$svc_end || $svc_end > $$sdate ) ? $$sdate : $svc_end;