X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=44606d9a0556a31c2b7354e21fa1e5e94d426137;hb=daeb70ea28f8a3e0db500f8a0e107221f4542d30;hp=d4c9a738dc4043053c0f54fcb0d16256b700a9ba;hpb=f4ea75e514763082b64e1b3654cfbbba2ddf1c01;p=freeside.git
diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi
index d4c9a738d..44606d9a0 100755
--- a/httemplate/edit/svc_acct.cgi
+++ b/httemplate/edit/svc_acct.cgi
@@ -35,8 +35,6 @@ if ( $cgi->param('error') ) {
} else { #adding
- $svc_acct = new FS::svc_acct({});
-
foreach $_ (split(/-/,$query)) {
$pkgnum=$1 if /^pkgnum(\d+)$/;
$svcpart=$1 if /^svcpart(\d+)$/;
@@ -44,6 +42,8 @@ if ( $cgi->param('error') ) {
$part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } );
die "No part_svc entry for svcpart $svcpart!" unless $part_svc;
+ $svc_acct = new FS::svc_acct({svcpart => $svcpart});
+
$svcnum='';
#set gecos
@@ -244,7 +244,16 @@ my($quota,$slipip)=(
$svc_acct->slipip,
);
-print qq!!;
+if ( $part_svc->part_svc_column('quota')->columnflag eq "F" )
+{
+ print qq!!;
+} else {
+ print <Quota: |
+ |
+
+END
+}
if ( $part_svc->part_svc_column('slipip')->columnflag eq "F" ) {
print qq!!;
@@ -272,6 +281,14 @@ if ( $part_svc->part_svc_column('usergroup')->columnflag eq "F" ) {
}
print '';
+foreach $field ($svc_acct->virtual_fields) {
+ if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) {
+ # If the flag is X, it won't even show up in $svc_acct->virtual_fields.
+ print $svc_acct->pvf($field)->widget('HTML', 'edit',
+ $svc_acct->getfield($field));
+ }
+}
+
#submit
print qq!
!;