[freeside-commits] freeside/FS/FS cust_main.pm,1.345,1.346
Ivan,,,
ivan at wavetail.420.am
Thu Jun 5 13:09:23 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv23706/FS/FS
Modified Files:
cust_main.pm
Log Message:
fix one-time charge quantities &
Index: cust_main.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/cust_main.pm,v
retrieving revision 1.345
retrieving revision 1.346
diff -u -d -r1.345 -r1.346
--- cust_main.pm 5 Jun 2008 19:24:32 -0000 1.345
+++ cust_main.pm 5 Jun 2008 20:09:21 -0000 1.346
@@ -2107,6 +2107,7 @@
###
my $setup = 0;
+ my $unitsetup = 0;
if ( ! $cust_pkg->setup &&
(
( $conf->exists('disable_setup_suspended_pkgs') &&
@@ -2125,6 +2126,8 @@
return "$@ running calc_setup for $cust_pkg\n";
}
+ $unitsetup = $cust_pkg->part_pkg->unit_setup || $setup; #XXX uuh
+
$cust_pkg->setfield('setup', $time)
unless $cust_pkg->setup;
#do need it, but it won't get written to the db
@@ -2136,7 +2139,9 @@
# bill recurring fee
###
+ #XXX unit stuff here too
my $recur = 0;
+ my $unitrecur = 0;
my $sdate;
if ( $part_pkg->getfield('freq') ne '0' &&
! $cust_pkg->getfield('susp') &&
@@ -2240,11 +2245,14 @@
warn " charges (setup=$setup, recur=$recur); adding line items\n"
if $DEBUG > 1;
my $cust_bill_pkg = new FS::cust_bill_pkg {
- 'pkgnum' => $cust_pkg->pkgnum,
- 'setup' => $setup,
- 'recur' => $recur,
- 'sdate' => $sdate,
- 'edate' => $cust_pkg->bill,
+ 'pkgnum' => $cust_pkg->pkgnum,
+ 'setup' => $setup,
+ 'unitsetup' => $unitsetup,
+ 'recur' => $recur,
+ 'unitrecur' => $unitrecur,
+ 'quantity' => $cust_pkg->quantity,
+ 'sdate' => $sdate,
+ 'edate' => $cust_pkg->bill,
'details' => \@details,
};
$cust_bill_pkg->pkgpart_override($part_pkg->pkgpart)
More information about the freeside-commits
mailing list