X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Fcust_main%2FBilling.pm;h=eb5bd0ba0a95c9380a4108fcf6b349d20910beff;hp=dca4ab7c73b316877a61a7ef71c16bdd6c61027f;hb=d492bb51af64fc85678cd73e8dfe6dd2cdcf8748;hpb=65d56ae6b77952ffacfbff6dcef09f30e5e94949 diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm index dca4ab7c7..eb5bd0ba0 100644 --- a/FS/FS/cust_main/Billing.pm +++ b/FS/FS/cust_main/Billing.pm @@ -253,7 +253,8 @@ charges, etc. =item freq_override If set, then override the normal frequency and look for a part_pkg_discount -to take at that frequency. +to take at that frequency. This will exclude any packages that aren't billed +on a monthly cycle. =item time @@ -846,6 +847,12 @@ sub _make_lines { my $time = $params{'time'} or die "no time specified"; my (%options) = %{$params{options}}; + if ( $part_pkg->freq ne '1' and ($options{'freq_override'} || 0) > 0 ) { + # this should never happen + die 'freq_override billing attempted on non-monthly package '. + $cust_pkg->pkgnum; + } + my $dbh = dbh; my $real_pkgpart = $params{real_pkgpart}; my %hash = $cust_pkg->hash;