Merge branch 'patch-18' of https://github.com/gjones2/Freeside
[freeside.git] / FS / FS / part_pkg / rt_time.pm
index 675a466..11b7ee8 100644 (file)
@@ -14,13 +14,24 @@ our %info = (
   'name'      =>  'Bill from Time Worked on tickets in RT',
   'shortname' =>  'Project Billing (RT)',
   'weight'    => 55,
+  'inherit_fields' => [ 'global_Mixin' ],
   'fields'    =>  {
     'base_rate' =>  {   'name'    =>  'Rate (per minute)',
                         'default' => 0,
                     },
-  }
+    'recur_fee' => {'disabled' => 1},
+  },
+  'fieldorder' => [ 'base_rate' ],
 );
 
+sub price_info {
+    my $self = shift;
+    my $str = $self->SUPER::price_info;
+    my $rate = $self->option('base_rate');
+    $str .= " plus $rate/min" if $rate;
+    $str;
+}
+
 sub calc_setup {
   my($self, $cust_pkg ) = @_;
   $self->option('setup_fee');
@@ -39,12 +50,15 @@ sub calc_recur {
 
 }
 
-sub calc_cancel {
-  my $self = shift;
-  my($cust_pkg, $sdate, $details, $param ) = @_;
+sub can_discount { 0; }
 
-  $self->calc_usage(@_);
-}
+# use the default
+#sub calc_cancel {
+#  my $self = shift;
+#  my($cust_pkg, $sdate, $details, $param ) = @_;
+#
+#  $self->calc_usage(@_);
+#}
 
 sub calc_usage {
   my $self = shift;