X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fpart_pkg.cgi;h=fee0b411ea3301f2d7b27bfab6e36588a867d12e;hb=85e18d1c25a16b3d37ff87484b36a9e17d17cbcf;hp=a4123e1377c76e5b57ce032b215ab33544491709;hpb=a6d3e4dc73803cffad96fd4b6270b2fb5f4b0568;p=freeside.git diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index a4123e137..fee0b411e 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -1,4 +1,4 @@ - + <% @@ -28,15 +28,15 @@ if ( $cgi->param('clone') ) { $part_pkg ||= $old_part_pkg->clone; } 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,44 @@ print '