diff options
| -rw-r--r-- | FS/FS/AccessRight.pm | 3 | ||||
| -rw-r--r-- | FS/FS/access_right.pm | 1 | ||||
| -rwxr-xr-x | httemplate/edit/part_pkg.cgi | 11 | 
3 files changed, 12 insertions, 3 deletions
| diff --git a/FS/FS/AccessRight.pm b/FS/FS/AccessRight.pm index 1c24bf568..9de9eac06 100644 --- a/FS/FS/AccessRight.pm +++ b/FS/FS/AccessRight.pm @@ -352,7 +352,8 @@ tie my %rights, 'Tie::IxHash',      'Edit package definitions',      { rightname=>'Edit global package definitions', global=>1 }, -   +    'Edit package definition costs', +      'Bulk edit package definitions',      'Edit billing events', diff --git a/FS/FS/access_right.pm b/FS/FS/access_right.pm index 7b3ca3f35..0906c0c9a 100644 --- a/FS/FS/access_right.pm +++ b/FS/FS/access_right.pm @@ -243,6 +243,7 @@ sub _upgrade_data { # class method      'Configuration' => 'Alarm global configuration',      'Services: Accounts' => 'Services: Conferencing',      'Services: Accounts' => 'Services: Video', +    'Edit global package definitions' => 'Edit package definition costs',    );  #  foreach my $old_acl ( keys %onetime ) { diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 2ec3481e5..cabaf0a05 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -200,8 +200,15 @@                       { type  => 'tablebreak-tr-title',                         value => 'Cost tracking', #better name?                       }, -                     { field=>'setup_cost', type=>'money', }, -                     { field=>'recur_cost', type=>'money', }, + +                     ( $curuser->access_right('Edit package definition costs') +                       ? ( { field=>'setup_cost', type=>'money', }, +                           { field=>'recur_cost', type=>'money', }, +                         ) +                       : ( { field=>'setup_cost', type=>'fixed', }, +                           { field=>'recur_cost', type=>'fixed', }, +                         ) +                     ),                       ( $conf->exists('part_pkg-delay_start')                         ? ( { type  => 'tablebreak-tr-title', | 
