add basic part_pkg cost columns for agent wholsale price plan, RT#4696
authorivan <ivan>
Thu, 18 Jun 2009 11:03:34 +0000 (11:03 +0000)
committerivan <ivan>
Thu, 18 Jun 2009 11:03:34 +0000 (11:03 +0000)
FS/FS/Schema.pm
FS/FS/part_pkg.pm
httemplate/edit/part_pkg.cgi

index 1f8fa8f..d264fd0 100644 (file)
@@ -1194,6 +1194,8 @@ sub tables_hashref {
         'taxclass',      'varchar', 'NULL', $char_d, '', '', 
         'classnum',      'int',     'NULL', '', '', '', 
         'taxproductnum', 'int',     'NULL', '', '', '', 
+        'setup_cost',    @money_typen,          '', '',
+        'recur_cost',    @money_typen,          '', '',
         'pay_weight',    'real',    'NULL', '', '', '',
         'credit_weight', 'real',    'NULL', '', '', '',
         'agentnum',      'int',     'NULL', '', '', '', 
index 8cfd614..fe56c62 100644 (file)
@@ -85,6 +85,10 @@ inherits from FS::Record.  The following fields are currently supported:
 
 =item disabled - Disabled flag, empty or `Y'
 
+=item setup_cost - for cost tracking
+
+=item recur_cost - for cost tracking
+
 =item pay_weight - Weight (relative to credit_weight and other package definitions) that controls payment application to specific line items.
 
 =item credit_weight - Weight (relative to other package definitions) that controls credit application to specific line items.
@@ -448,6 +452,10 @@ sub check {
     || $self->ut_enum('recurtax', [ '', 'Y' ] )
     || $self->ut_textn('taxclass')
     || $self->ut_enum('disabled', [ '', 'Y' ] )
+    #|| $self->ut_moneyn('setup_cost')
+    #|| $self->ut_moneyn('recur_cost')
+    || $self->ut_floatn('setup_cost')
+    || $self->ut_floatn('recur_cost')
     || $self->ut_floatn('pay_weight')
     || $self->ut_floatn('credit_weight')
     || $self->ut_numbern('taxproductnum')
index a2ec630..6391db9 100755 (executable)
@@ -37,6 +37,8 @@
                             'taxproduct_select'=> 'Tax products',
                             'plan'             => 'Price plan',
                             'disabled'         => 'Disable new orders',
+                            'setup_cost'       => 'Setup cost',
+                            'recur_cost'       => 'Recur cost',
                             'pay_weight'       => 'Payment weight',
                             'credit_weight'    => 'Credit weight',
                             'agentnum'         => 'Agent',
                               { field=>'promo_code', type=>'text', size=>15 },
 
                               { type  => 'tablebreak-tr-title',
-                                value => 'Line-item revenue recogition', #better name?
+                                value => 'Cost tracking', #better name?
                               },
-                              { field=>'pay_weight',    type=>'text', size=>6 },
-                              { field=>'credit_weight', type=>'text', size=>6 },
+                              { field=>'setup_cost', type=>'money', },
+                              { field=>'recur_cost', type=>'money', },
 
                             { type => 'columnnext' },
 
                                 },
                               },
 
+                              { type  => 'tablebreak-tr-title',
+                                value => 'Line-item revenue recogition', #better name?
+                              },
+                              { field=>'pay_weight',    type=>'text', size=>6 },
+                              { field=>'credit_weight', type=>'text', size=>6 },
+
+
                             { type => 'columnend' },
 
                             { 'type'  => 'tablebreak-tr-title',