add "Edit package definition costs" ACL, RT#27140
[freeside.git] / httemplate / edit / part_pkg.cgi
index b35dc02..cabaf0a 100755 (executable)
@@ -48,6 +48,7 @@
                    'recur_cost'       => 'Recur cost',
                    'pay_weight'       => 'Payment weight',
                    'credit_weight'    => 'Credit weight',
+                   'agent_pkgpartid'  => 'External ID',
                    'agentnum'         => 'Agent',
                    'setup_fee'        => 'Setup fee',
                    'setup_show_zero'  => 'Show zero setup',
                      { 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',