random nits for grandstream provisioning :UI, docs, java path, s/system/IPC::Run...
[freeside.git] / FS / FS / UI / Web.pm
index 3c52ca5..5e98742 100644 (file)
@@ -270,6 +270,7 @@ sub cust_header {
   );
   my %header2align = (
     'Cust. Status' => 'c',
+    'Cust#'        => 'r',
   );
 
   my $cust_fields;
@@ -338,6 +339,8 @@ sub cust_sql_fields {
     grep { my $field = $_; grep { $_ eq $field } @cust_fields }
          ( @add_fields, ( map "ship_$_", @add_fields ), 'payby' );
 
+  push @fields, 'agent_custid';
+
   my @extra_fields = ();
   if (grep { $_ eq 'current_balance' } @cust_fields) {
     push @extra_fields, FS::cust_main->balance_sql . " AS current_balance";
@@ -371,12 +374,10 @@ sub cust_fields {
   my $seen_unlinked = 0;
   map { 
     if ( $record->custnum ) {
-      warn "  $record -> $_"
-        if $DEBUG > 1;
+      warn "  $record -> $_" if $DEBUG > 1;
       $record->$_(@_);
     } else {
-      warn "  ($record unlinked)"
-        if $DEBUG > 1;
+      warn "  ($record unlinked)" if $DEBUG > 1;
       $seen_unlinked++ ? '' : '(unlinked)';
     }
   } @cust_fields;
@@ -585,7 +586,9 @@ sub job_status {
 
   my @return;
   if ( $job && $job->status ne 'failed' ) {
-    @return = ( 'progress', $job->statustext );
+    my ($progress, $action) = split ',', $job->statustext, 2; 
+    $action ||= 'Server processing job';
+    @return = ( 'progress', $progress, $action );
   } elsif ( !$job ) { #handle job gone case : job successful
                       # so close popup, redirect parent window...
     @return = ( 'complete' );
@@ -593,6 +596,7 @@ sub job_status {
     @return = ( 'error', $job ? $job->statustext : $jobnum );
   }
 
+  #to_json(\@return);  #waiting on deb 5.0 for new JSON.pm?
   objToJson(\@return);
 
 }