summaryrefslogtreecommitdiff
path: root/httemplate/edit/part_pkg.cgi
diff options
context:
space:
mode:
authorjeff <jeff>2009-06-21 15:21:32 +0000
committerjeff <jeff>2009-06-21 15:21:32 +0000
commit04a69f9d197efee6fa396bd35d04ae553e669978 (patch)
tree6a8ffd8be1f47991bbe8ee0be98e0a76c66fb934 /httemplate/edit/part_pkg.cgi
parent5826159b3b1272f763b67f05a0cc3a53913f7912 (diff)
CUSTOM packages/actual flag for custom packages #3988
Diffstat (limited to 'httemplate/edit/part_pkg.cgi')
-rwxr-xr-xhttemplate/edit/part_pkg.cgi12
1 files changed, 5 insertions, 7 deletions
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index 6391db92a..0934f501a 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -58,6 +58,8 @@
sub { shift->param('pkgnum') },
},
+ { field=>'custom', type=>'hidden' },
+
{ type => 'columnstart' },
{ field => 'pkg',
@@ -217,10 +219,7 @@ my $disabled_type = $acl_edit_either ? 'checkbox' : 'hidden';
my $agent_clone_extra_sql =
' ( '. FS::part_pkg->curuser_pkgs_sql.
- #kludge to clone custom customer packages you otherwise couldn't see
- #really need a proper "CUSTOM" flag that's distinct from disabled
- #" OR ( part_pkg.disabled = 'Y' AND part_pkg.comment LIKE '(CUSTOM)%' ) ".
- " OR ( part_pkg.disabled = 'Y' ) ".
+ " OR ( part_pkg.custom = 'Y' ) ".
' ) ';
my $conf = new FS::Conf;
@@ -339,9 +338,8 @@ my $clone_callback = sub {
$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');