projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
This commit was manufactured by cvs2svn to create branch
[freeside.git]
/
FS
/
FS
/
part_pkg
/
flat_comission_pkg.pm
diff --git
a/FS/FS/part_pkg/flat_comission_pkg.pm
b/FS/FS/part_pkg/flat_comission_pkg.pm
index
0f4d02a
..
6f5ee69
100644
(file)
--- a/
FS/FS/part_pkg/flat_comission_pkg.pm
+++ b/
FS/FS/part_pkg/flat_comission_pkg.pm
@@
-9,6
+9,7
@@
use FS::part_pkg::flat;
%info = (
'name' => 'Flat rate with recurring commission per (selected) active package',
%info = (
'name' => 'Flat rate with recurring commission per (selected) active package',
+ 'shortname' => 'Commission per (selected) active package',
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
'fields' => {
'setup_fee' => { 'name' => 'Setup fee for this package',
'default' => 0,
@@
-33,8
+34,15
@@
use FS::part_pkg::flat;
'select_key' => 'pkgpart',
'select_label' => 'pkg',
},
'select_key' => 'pkgpart',
'select_label' => 'pkg',
},
+ 'reason_type' => { 'name' => 'Reason type for commission credits',
+ 'type' => 'select',
+ 'select_table' => 'reason_type',
+ 'select_hash' => { 'class' => 'R' } ,
+ 'select_key' => 'typenum',
+ 'select_label' => 'type',
+ },
},
},
- 'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'comission_depth', 'comission_amount', 'comission_pkgpart' ],
+ 'fieldorder' => [ 'setup_fee', 'recur_fee', 'unused_credit', 'comission_depth', 'comission_amount', 'comission_pkgpart'
, 'reason_type'
],
#'setup' => 'what.setup_fee.value',
#'recur' => '""; var pkgparts = ""; for ( var c=0; c < document.flat_comission_pkg.comission_pkgpart.options.length; c++ ) { if (document.flat_comission_pkg.comission_pkgpart.options[c].selected) { pkgparts = pkgparts + document.flat_comission_pkg.comission_pkgpart.options[c].value + \', \'; } } what.recur.value = \'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar( grep { my $pkgpart = $_->pkgpart; grep { $_ == $pkgpart } ( \' + pkgparts + \' ) } $cust_pkg->cust_main->referral_cust_pkg(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'',
#'disabled' => 1,
#'setup' => 'what.setup_fee.value',
#'recur' => '""; var pkgparts = ""; for ( var c=0; c < document.flat_comission_pkg.comission_pkgpart.options.length; c++ ) { if (document.flat_comission_pkg.comission_pkgpart.options[c].selected) { pkgparts = pkgparts + document.flat_comission_pkg.comission_pkgpart.options[c].value + \', \'; } } what.recur.value = \'my $error = $cust_pkg->cust_main->credit( \' + what.comission_amount.value + \' * scalar( grep { my $pkgpart = $_->pkgpart; grep { $_ == $pkgpart } ( \' + pkgparts + \' ) } $cust_pkg->cust_main->referral_cust_pkg(\' + what.comission_depth.value+ \')), "commission" ); die $error if $error; \' + what.recur_fee.value + \';\'',
#'disabled' => 1,
@@
-47,4
+55,6
@@
sub calc_recur {
$self->option('recur_fee');
}
$self->option('recur_fee');
}
+sub can_discount { 0; }
+
1;
1;