summaryrefslogtreecommitdiff
path: root/FS
diff options
context:
space:
mode:
Diffstat (limited to 'FS')
-rw-r--r--FS/FS/AccessRight.pm1
-rw-r--r--FS/FS/Schema.pm1
-rw-r--r--FS/FS/cust_main/Billing.pm13
-rw-r--r--FS/FS/cust_pkg.pm3
4 files changed, 13 insertions, 5 deletions
diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm
index aa59e7dbd..c3aeb2dcd 100644
--- a/FS/FS/AccessRight.pm
+++ b/FS/FS/AccessRight.pm
@@ -144,6 +144,7 @@ tie my %rights, 'Tie::IxHash',
'Edit customer package invoice details', #NEW
'Edit customer package comments', #NEW
'Qualify service', #NEW
+ 'Waive setup fee', #NEW
],
###
diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index deb3995d2..983edec46 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -1443,6 +1443,7 @@ sub tables_hashref {
'no_auto', 'char', 'NULL', 1, '', '',
'quantity', 'int', 'NULL', '', '', '',
'agent_pkgid', 'int', 'NULL', '', '', '',
+ 'waive_setup', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'pkgnum',
'unique' => [],
diff --git a/FS/FS/cust_main/Billing.pm b/FS/FS/cust_main/Billing.pm
index b710f3326..1bf7b02a7 100644
--- a/FS/FS/cust_main/Billing.pm
+++ b/FS/FS/cust_main/Billing.pm
@@ -846,13 +846,16 @@ sub _make_lines {
{
warn " bill setup\n" if $DEBUG > 1;
- $lineitems++;
- $setup = eval { $cust_pkg->calc_setup( $time, \@details ) };
- return "$@ running calc_setup for $cust_pkg\n"
- if $@;
+ unless ( $cust_pkg->waive_setup ) {
+ $lineitems++;
+
+ $setup = eval { $cust_pkg->calc_setup( $time, \@details ) };
+ return "$@ running calc_setup for $cust_pkg\n"
+ if $@;
- $unitsetup = $cust_pkg->part_pkg->unit_setup || $setup; #XXX uuh
+ $unitsetup = $cust_pkg->part_pkg->unit_setup || $setup; #XXX uuh
+ }
$cust_pkg->setfield('setup', $time)
unless $cust_pkg->setup;
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index 13a3b6eb7..6c985cf19 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -194,6 +194,8 @@ Previous pkgpart
Previous locationnum
+=item waive_setup
+
=back
Note: setup, last_bill, bill, adjourn, susp, expire, cancel and change_date
@@ -594,6 +596,7 @@ sub check {
|| $self->ut_numbern('adjourn')
|| $self->ut_numbern('expire')
|| $self->ut_enum('no_auto', [ '', 'Y' ])
+ || $self->ut_enum('waive_setup', [ '', 'Y' ])
|| $self->ut_numbern('agent_pkgid')
;
return $error if $error;