projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
add -o flag to freeside-daily, to only bill for one month, RT#14904
[freeside.git]
/
FS
/
FS
/
cust_main
/
Billing.pm
diff --git
a/FS/FS/cust_main/Billing.pm
b/FS/FS/cust_main/Billing.pm
index
464ee8a
..
2051804
100644
(file)
--- a/
FS/FS/cust_main/Billing.pm
+++ b/
FS/FS/cust_main/Billing.pm
@@
-420,11
+420,17
@@
sub bill {
'real_pkgpart' => $real_pkgpart,
'options' => \%options,
);
'real_pkgpart' => $real_pkgpart,
'options' => \%options,
);
- # Stop if anything goes wrong, or if we're not incrementing
- #
the bill date.
+
+ #
Stop if anything goes wrong
last if $error;
last if $error;
+
+ # or if we're not incrementing the bill date.
last if ($cust_pkg->getfield('bill') || 0) == $next_bill;
last if ($cust_pkg->getfield('bill') || 0) == $next_bill;
+
$next_bill = $cust_pkg->getfield('bill') || 0;
$next_bill = $cust_pkg->getfield('bill') || 0;
+
+ #stop if -o was passed to freeside-daily
+ last if $options{'one_recur'};
}
if ($error) {
$dbh->rollback if $oldAutoCommit && !$options{no_commit};
}
if ($error) {
$dbh->rollback if $oldAutoCommit && !$options{no_commit};