RT #31482 making sure the tax class is not editable after the customer has been billed.
[freeside.git] / httemplate / edit / prospect_main.html
index ab01930..da5c6ce 100644 (file)
@@ -3,6 +3,7 @@
      'table'           => 'prospect_main',
      'labels'          => { 'prospectnum' => 'Prospect',
                             'agentnum'    => 'Agent',
+                            'refnum'      => 'Advertising source',
                             'company'     => 'Company',
                             'contactnum'  => 'Contact',
                             'locationnum' => ' ',
          'empty_label' => 'Select agent',
          'colspan'     => 6,
        },
+       { 'field'       => 'refnum',
+         'type'        => 'select-part_referral',
+         'empty_label' => 'Select advertising source',
+         'colspan'     => 6,
+       },
        { 'field'    => 'residential_commercial',
          'type'     => 'radio',
          'options'  => [ 'Residential', 'Commercial', ],
@@ -36,6 +42,9 @@
          'empty_label'   => 'No address',
          'disable_empty' => $conf->exists('prospect_main-location_required'),
          'alt_format'    => $conf->exists('prospect_main-alt_address_format'),
+         'include_opt_callback' => sub { 
+            'prospect_main' => shift
+          },
        },
      ],
      'new_callback'    => $new_callback,
@@ -184,8 +193,10 @@ my $javascript = <<END;
       var c = f.company;
       if        ( f.residential_commercial_Residential.checked ) {
         c.disabled = true;
+        c.style.backgroundColor = '#dddddd';
       } else if ( f.residential_commercial_Commercial.checked ) {
         c.disabled = false;
+        c.style.backgroundColor = '#ffffff';
       }
     }
   </SCRIPT>