[freeside-commits] freeside/httemplate/edit/process prospect_main.html, NONE, 1.1

Ivan,,, ivan at wavetail.420.am
Mon Dec 28 11:18:21 PST 2009


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv11618/httemplate/edit/process

Added Files:
	prospect_main.html 
Log Message:
beginning of prospect/CRM/contact work

--- NEW FILE: prospect_main.html ---
<% include('elements/process.html',
     'table'          => 'prospect_main',
     'args_callback'  => $args_callback,
     'agent_virt'     => 1,
     'process_o2m' => {
       'table'  => 'contact',
       'fields' => [qw( first last title comment )],
     },
     'redirect' => popurl(3). 'view/prospect_main.html?',
   )
%>
<%init>

my $args_callback = sub {
  my( $cgi, $object ) = @_;

  $cgi->param('locationnum') =~ /^(\-?\d*)$/
    or die 'illegal locationnum '. $cgi->param('locationnum');
  my $locationnum = $1;

  return ( 'cust_location' => '' ) unless $locationnum;

  my $cust_location = new FS::cust_location {
    map { $_ => scalar($cgi->param($_)) }
        qw( address1 address2 city county state zip country )
  };

  $cust_location->locationnum($locationnum) unless $locationnum == -1;

  ( 'cust_location' => $cust_location );

};

</%init>



More information about the freeside-commits mailing list