X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=d32702668f8702cf073151ce7fcb3faaff515acc;hb=ddb53fcc9fc80561354b97e4e7803004990138d0;hp=a4123e1377c76e5b57ce032b215ab33544491709;hpb=a6d3e4dc73803cffad96fd4b6270b2fb5f4b0568;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index a4123e137..d32702668 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -1,5 +1,4 @@ - - + <% if ( $cgi->param('clone') && $cgi->param('clone') =~ /^(\d+)$/ ) { @@ -26,17 +25,18 @@ if ( $cgi->param('clone') ) { my $old_part_pkg = qsearchs('part_pkg', { 'pkgpart' => $cgi->param('clone') } ); $part_pkg ||= $old_part_pkg->clone; + $part_pkg->disabled('Y'); } elsif ( $query && $query =~ /^(\d+)$/ ) { $part_pkg ||= qsearchs('part_pkg',{'pkgpart'=>$1}); - unless ( $part_pkg->plan ) { - $part_pkg->plan('flat'); - $part_pkg->plandata("setup=". $part_pkg->setup. "\n". - "recur=". $part_pkg->recur. "\n"); - } } else { $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; @@ -76,28 +76,50 @@ print '