summaryrefslogtreecommitdiff
path: root/FS/FS/part_event/Action
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-11-12 20:50:17 -0800
committerIvan Kohler <ivan@freeside.biz>2014-11-12 20:50:17 -0800
commiteb496e0e972cdaa94f894d232c5cc6dfa250e9ad (patch)
tree7ab9bfb5bb8932f8141dc1238868e8ed49387c29 /FS/FS/part_event/Action
parentd8950e63d6c3f6fb910c28077e3a3e054ad12388 (diff)
add option to credit customer sales person if there is no package sales person to amount based on referred package action, RT#24086
Diffstat (limited to 'FS/FS/part_event/Action')
-rw-r--r--FS/FS/part_event/Action/Mixin/credit_sales_pkg_class.pm6
-rw-r--r--FS/FS/part_event/Action/Mixin/pkg_sales_credit.pm19
-rw-r--r--FS/FS/part_event/Action/pkg_sales_credit.pm3
-rw-r--r--FS/FS/part_event/Action/pkg_sales_credit_pkg.pm5
-rw-r--r--FS/FS/part_event/Action/pkg_sales_credit_pkg_class.pm4
5 files changed, 25 insertions, 12 deletions
diff --git a/FS/FS/part_event/Action/Mixin/credit_sales_pkg_class.pm b/FS/FS/part_event/Action/Mixin/credit_sales_pkg_class.pm
index fc7a3e3..5c090ef 100644
--- a/FS/FS/part_event/Action/Mixin/credit_sales_pkg_class.pm
+++ b/FS/FS/part_event/Action/Mixin/credit_sales_pkg_class.pm
@@ -11,12 +11,6 @@ sub option_fields {
delete $option_fields{'percent'};
- $option_fields{'cust_main_sales'} = {
- 'label' => "Credit the customer sales person if there is no package sales person",
- 'type' => 'checkbox',
- 'value' => 'Y',
- };
-
%option_fields;
}
diff --git a/FS/FS/part_event/Action/Mixin/pkg_sales_credit.pm b/FS/FS/part_event/Action/Mixin/pkg_sales_credit.pm
new file mode 100644
index 0000000..9e93397
--- /dev/null
+++ b/FS/FS/part_event/Action/Mixin/pkg_sales_credit.pm
@@ -0,0 +1,19 @@
+package FS::part_event::Action::Mixin::pkg_sales_credit;
+
+use strict;
+use NEXT;
+
+sub option_fields {
+ my $class = shift;
+ my %option_fields = $class->NEXT::option_fields;
+
+ $option_fields{'cust_main_sales'} = {
+ 'label' => "Credit the customer sales person if there is no package sales person",
+ 'type' => 'checkbox',
+ 'value' => 'Y',
+ };
+
+ %option_fields;
+}
+
+1;
diff --git a/FS/FS/part_event/Action/pkg_sales_credit.pm b/FS/FS/part_event/Action/pkg_sales_credit.pm
index cca123a..e7551cd 100644
--- a/FS/FS/part_event/Action/pkg_sales_credit.pm
+++ b/FS/FS/part_event/Action/pkg_sales_credit.pm
@@ -1,7 +1,8 @@
package FS::part_event::Action::pkg_sales_credit;
+use base qw( FS::part_event::Action::Mixin::pkg_sales_credit
+ FS::part_event::Action::pkg_referral_credit );
use strict;
-use base qw( FS::part_event::Action::pkg_referral_credit );
sub description { 'Credit the sales person a specific amount'; }
diff --git a/FS/FS/part_event/Action/pkg_sales_credit_pkg.pm b/FS/FS/part_event/Action/pkg_sales_credit_pkg.pm
index 1e3c2b3..9b13cd8 100644
--- a/FS/FS/part_event/Action/pkg_sales_credit_pkg.pm
+++ b/FS/FS/part_event/Action/pkg_sales_credit_pkg.pm
@@ -1,7 +1,6 @@
package FS::part_event::Action::pkg_sales_credit_pkg;
-
-use strict;
-use base qw( FS::part_event::Action::Mixin::credit_pkg
+use base qw( FS::part_event::Action::Mixin::pkg_sales_credit
+ FS::part_event::Action::Mixin::credit_pkg
FS::part_event::Action::pkg_sales_credit );
sub description { 'Credit the package sales person an amount based on the referred package'; }
diff --git a/FS/FS/part_event/Action/pkg_sales_credit_pkg_class.pm b/FS/FS/part_event/Action/pkg_sales_credit_pkg_class.pm
index 600985b..c69c004 100644
--- a/FS/FS/part_event/Action/pkg_sales_credit_pkg_class.pm
+++ b/FS/FS/part_event/Action/pkg_sales_credit_pkg_class.pm
@@ -1,7 +1,7 @@
package FS::part_event::Action::pkg_sales_credit_pkg_class;
-use strict;
-use base qw( FS::part_event::Action::Mixin::credit_sales_pkg_class
+use base qw( FS::part_event::Action::Mixin::pkg_sales_credit
+ FS::part_event::Action::Mixin::credit_sales_pkg_class
FS::part_event::Action::pkg_sales_credit );
sub description { "Credit the package sales person an amount based on their commission percentage for the package's class"; }