[freeside-commits] freeside/FS/FS cust_main.pm, 1.271.2.46, 1.271.2.47
Ivan,,,
ivan at wavetail.420.am
Thu Jun 5 13:09:37 PDT 2008
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv23743/FS/FS
Modified Files:
Tag: FREESIDE_1_7_BRANCH
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.271.2.46
retrieving revision 1.271.2.47
diff -u -d -r1.271.2.46 -r1.271.2.47
--- cust_main.pm 5 Jun 2008 19:24:37 -0000 1.271.2.46
+++ cust_main.pm 5 Jun 2008 20:09:34 -0000 1.271.2.47
@@ -1952,6 +1952,7 @@
###
my $setup = 0;
+ my $unitsetup = 0;
if ( ! $cust_pkg->setup &&
(
( $conf->exists('disable_setup_suspended_pkgs') &&
@@ -1969,6 +1970,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;
}
@@ -1976,7 +1979,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') &&
@@ -2072,13 +2077,16 @@
warn " charges (setup=$setup, recur=$recur); adding line items\n"
if $DEBUG > 1;
my $cust_bill_pkg = new FS::cust_bill_pkg ({
- 'invnum' => $invnum,
- 'pkgnum' => $cust_pkg->pkgnum,
- 'setup' => $setup,
- 'recur' => $recur,
- 'sdate' => $sdate,
- 'edate' => $cust_pkg->bill,
- 'details' => \@details,
+ 'invnum' => $invnum,
+ 'pkgnum' => $cust_pkg->pkgnum,
+ 'setup' => $setup,
+ 'unitsetup' => $unitsetup,
+ 'recur' => $recur,
+ 'unitrecur' => $unitrecur,
+ 'quantity' => $cust_pkg->quantity,
+ 'sdate' => $sdate,
+ 'edate' => $cust_pkg->bill,
+ 'details' => \@details,
});
$error = $cust_bill_pkg->insert;
if ( $error ) {
More information about the freeside-commits
mailing list