'agent_virt' => 1,
'agent_null_right' => $edit_global,
- 'agent_clone_extra_sql' => FS::part_pkg->curuser_pkgs_sql,
-
+ 'agent_clone_extra_sql' => $agent_clone_extra_sql,
#'viewall_dir' => 'browse',
'viewall_url' => $p.'browse/part_pkg.cgi',
'html_init' => include('/elements/init_overlib.html').
'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',
sub { shift->param('pkgnum') },
},
+ { field=>'custom', type=>'hidden' },
+
{ type => 'columnstart' },
{ field => 'pkg',
{ 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',
my $disabled_type = $acl_edit_either ? 'checkbox' : 'hidden';
+my $agent_clone_extra_sql =
+ ' ( '. FS::part_pkg->curuser_pkgs_sql.
+ " OR ( part_pkg.custom = 'Y' ) ".
+ ' ) ';
+
my $conf = new FS::Conf;
my $taxproducts = $conf->exists('enable_taxproducts');
$opt->{action} = 'Custom';
#my $part_pkg = $clone_part_pkg->clone;
- #this is all clone did anyway
- $object->comment( '(CUSTOM) '. $object->comment )
- unless $object->comment =~ /^\(CUSTOM\) /;
+ #this is all clone does anyway
+ $object->custom('Y');
$object->disabled('Y');