X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=d36fac660acca562b52797ba65c667a48bd79703;hb=26e91d6afcd21b7113cdc6aebb37ad5acd3d5de8;hp=a84fafa1b1983c9f1464e2010cb5690d39437c05;hpb=83a6a677f62ca501011d9bac6371344dbb5a13b3;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index a84fafa1b..d36fac660 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -1,398 +1,843 @@ -% -% -%if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { -% $cgi->param('clone', $1); -%} else { -% $cgi->param('clone', ''); -%} -%if ( $cgi->param('pkgnum') && $cgi->param('pkgnum') =~ /^(\d+)$/ ) { -% $cgi->param('pkgnum', $1); -%} else { -% $cgi->param('pkgnum', ''); -%} -% -%my ($query) = $cgi->keywords; -% -%my $part_pkg = ''; -%my @agent_type = (); -%if ( $cgi->param('error') ) { -% $part_pkg = new FS::part_pkg ( { -% map { $_, scalar($cgi->param($_)) } fields('part_pkg') -% } ); -% (@agent_type) = $cgi->param('agent_type'); -%} -% -%my $action = ''; -%my $clone_part_pkg = ''; -%my $pkgpart = ''; -%if ( $cgi->param('clone') ) { -% $pkgpart = $cgi->param('clone'); -% $action = 'Custom Pricing'; -% $clone_part_pkg= qsearchs('part_pkg', { 'pkgpart' => $cgi->param('clone') } ); -% $part_pkg ||= $clone_part_pkg->clone; -% $part_pkg->disabled('Y'); #isn't sticky on errors -%} elsif ( $query && $query =~ /^(\d+)$/ ) { -% (@agent_type) = map {$_->typenum} qsearch('type_pkgs',{'pkgpart'=>$1}) -% unless $part_pkg; -% $part_pkg ||= qsearchs('part_pkg',{'pkgpart'=>$1}); -% $pkgpart = $part_pkg->pkgpart; -%} else { -% unless ( $part_pkg ) { -% $part_pkg = new FS::part_pkg {}; -% $part_pkg->plan('flat'); -% } -%} -%unless ( $part_pkg->plan ) { #backwards-compat -% $part_pkg->plan('flat'); -% $part_pkg->plandata("setup_fee=". $part_pkg->setup. "\n". -% "recur_fee=". $part_pkg->recur. "\n"); -%} -%$action ||= $part_pkg->pkgpart ? 'Edit' : 'Add'; -%my $hashref = $part_pkg->hashref; -% -% - - -<% include("/elements/header.html","$action Package Definition", menubar( - 'Main Menu' => popurl(2), - 'View all packages' => popurl(2). 'browse/part_pkg.cgi', -)) %> -% #), ' onLoad="visualize()"'); -% if ( $cgi->param('error') ) { - - Error: <% $cgi->param('error') %> -% } - - -