a:11:{i:0;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:25:"CopyFromCustbill_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:15:"copycustbill();";}i:1;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:13:"Link_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:13:"linkselect();";}i:2;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:12:"copycustbill";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:629:"$check_sql = "SELECT prefix,name,address1,address2,city,state,country,zip_code"
   . " FROM custbill"
   . " WHERE bcode = '" . {bcode} . "'";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]}))     // Row found
{
    {prefix} = {rs[0][0]};
    {name} = {rs[0][1]};
		{address1} = {rs[0][2]};
    {address2} = {rs[0][3]};
    {city} = {rs[0][4]};
		{state} = {rs[0][5]};
		{country} = {rs[0][6]};
    {zip_code} = {rs[0][7]};
}
		else     // No row found
{
	{prefix} = '';
    {name} = '';
		{address1} = '';
    {address2} = '';
    {city} = '';
		{state} = '';
		{country} = '';
    {zip_code} = '';	
}";}i:3;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:6:"delink";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:412:"$update_table  = 'custship';   // Table name
$update_where  = "id2 = '{id2}'"; // Where clause
$update_fields = array(   // Field list, add as many as needed
     "bcode = ''"
     
 );

// Update record
$update_sql = 'UPDATE ' . $update_table
    . ' SET '   . implode(', ', $update_fields)
    . ' WHERE ' . $update_where;
sc_exec_sql($update_sql);
sc_redir(custship_edit_form,var_bcode={bcode});
";}i:4;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:10:"linkselect";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:932:"$getadd="select prefix,name,address1,address2,city,state,zip_code,country,id2,scode from veratex2.custship
where id2='{link}'";
sc_lookup(rs,$getadd);	
if (isset({rs[0][0]}))
	{
	{prefix}={rs[0][0]};	
		}
else
	{
     {prefix}='';
		}
if (isset({rs[0][1]}))
	{
	{name}={rs[0][1]};	
		}
else
	{
     {name}='';
		}
if (isset({rs[0][2]}))
	{
	{ADDRESS1}={rs[0][2]};	
		}
else
	{
     {ADDRESS1}='';
		}
if (isset({rs[0][3]}))
	{
	{address2}={rs[0][3]};	
		}
else
	{
     {address2}='';
		}
if (isset({rs[0][4]}))
{
{city}={rs[0][4]};
}
else
	{
		{city}='';
	}
if (isset({rs[0][5]}))
{
	{state}={rs[0][5]};
}
else
	{
		{state}='';
		}
if (isset({rs[0][6]}))
	{
		{zip_code}={rs[0][6]};
}
else
	{
		{zip_code}='';
			}
if (isset({rs[0][7]}))
	{
	{country}={rs[0][7]};	
		}
else
	{
     {country}='';
		}
{id2}={rs[0][8]};
{bcode}=[var_bcode];
{scode}={rs[0][9]};

	";}i:5;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:13:"onAfterUpdate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:6;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:17:"onApplicationInit";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:7;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:14:"onBeforeUpdate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:8;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:9:"onLoadAll";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:20:"[var_bcode]={bcode};";}i:9;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:9:"onRefresh";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:10;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:18:"custship_edit_form";s:4:"nome";s:17:"onValidateSuccess";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}}