a:26:{i:0;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:17:"BOT_P_O__onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:18:"l1botyarnchange();";}i:1;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:19:"KNIT_PRICE_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:14:"updOrderAmt();";}i:2;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:19:"LBS_ORDERE_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:16:"updOrderAmt();
";}i:3;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:13:"MILL_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:31:"billtoupdate();
termsupdate();";}i:4;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:16:"SHIP_TO_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:15:"shiptoupdate();";}i:5;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:17:"TOP_P_O__onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:18:"l2topyarnchange();";}i:6;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:12:"billtoupdate";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:925:"$getadd="
select `name`,address1,address2,city,state,zip_code,country from veratex2.supref
	where code='{mill}'";
sc_lookup(dataset,$getadd);
if(isset({dataset[0][0]}))
   {
{bname}={dataset[0][0]};
	}
   else
   {
	 {bname}='';
	   }
if(isset({dataset[0][1]}))
   {
{ToAd1}={dataset[0][1]};
	} 
   else
   {
	 {ToAd1}='';
	   }
   
	if(isset({dataset[0][2]}))
   {
{ToAd2}={dataset[0][2]};
	}
	   else
   {
	 {ToAd2}='';
	   } 
	if(isset({dataset[0][3]}))
   {
$city={dataset[0][3]};
	}
 else
   {
	 $city='';
	   }
	if(isset({dataset[0][4]}))
   {   
	   $state={dataset[0][4]};
		   }
	   else
	   {
		   $state='';
		   }
	if(isset({dataset[0][5]}))
   {   
	   $zip={dataset[0][5]};
		   }
	   else
	   {
		   $zip='';
		   }
	  {ToAd3}=$city.' '.$state.' '.$zip;
if(isset({dataset[0][6]}))
   {
{ToAd4}={dataset[0][6]};
	}
    else
   {
	 {ToAd4}='';
	   }
";}i:7;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:15:"l1botyarnchange";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:549:"$check_sql = "SELECT den,fil,luster,producer,fiber,merge,cost_lb_t,inventory"
   . " FROM warppo"
   . " WHERE p_o_number = '" . {bot_p_o_} . "'";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]}))     // Row found
{
    {l1yarn} = {rs[0][0]}.'/'.{rs[0][1]}.' '.{rs[0][2]}.' '.{rs[0][3]}.' '.{rs[0][4]}.' MERGE '.{rs[0][5]};
{bot_cost}=   {rs[0][6]};
{bot_lbs}= {rs[0][7]};
}
		else     // No row found
{
		    {l1yarn} = '';

	{bot_cost}=0;
	{bot_lbs}=0;
	
}
{cost_lb_y}={top_cost}+{bot_cost};
{cost_lb}={cost_lb_k}+{cost_lb_y};";}i:8;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:15:"l2topyarnchange";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:533:"$check_sql = "SELECT den,fil,luster,producer,fiber,merge,cost_lb_t,inventory"
   . " FROM warppo"
   . " WHERE p_o_number = '" . {top_p_o_} . "'";
sc_lookup(rs, $check_sql);
if (isset({rs[0][0]}))     // Row found
{
{l2yarn} = {rs[0][0]}.'/'.{rs[0][1]}.' '.{rs[0][2]}.' '.{rs[0][3]}.' '.{rs[0][4]}.' MERGE '.{rs[0][5]};
{top_cost}= {rs[0][6]};
{top_lbs}= {rs[0][7]};
}
		else     // No row found
{
	{l2yarn} = '';
	{top_cost}=0;
	{top_lbs}=0;  
}
{cost_lb_y}={top_cost}+{bot_cost};
{cost_lb}={cost_lb_k}+{cost_lb_y};";}i:9;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:13:"onAfterUpdate";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:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:14:"onBeforeDelete";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:11;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:14:"onBeforeInsert";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:12;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:14:"onBeforeUpdate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:18:"stylechange_sql();";}i:13;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:6:"onInit";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:14;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:9:"onLoadAll";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:298:"[var_po]= {p_o_number};
[var_status] = {status};
[var_terms] = {terms};
[var_to]={mill};
[var_shipto]={ship_to};
[var_ac]={ac};
[var_oldpo]={old_po};
[var_startcode]=4;
[var_endcode]=5;
{lbsordered}={lbs_ordere};
{lbsreceived}={lbs};
billtoupdate();
shiptoupdate();
updateyarnview();
";}i:15;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:10:"onNavigate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:16;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:9:"onRefresh";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:73:"[var_po]= {p_o_number};
[var_status] = {status};
[var_terms] = {terms};";}i:17;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:10:"onValidate";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:18;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:17:"onValidateFailure";s:4:"tipo";s:1:"E";s:5:"parms";s:0:"";s:6:"codigo";s:0:"";}i:19;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:20:"priceselect_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:27:"{knit_price}={priceselect};";}i:20;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:11:"refreshform";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:71:"sc_redir( fv2_greige_greigepo_knit_form,"var_po={p_o_number}","_self");";}i:21;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:12:"shiptoupdate";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:942:"$getadd="
select `name`,address1,address2,city,state,zip_code,country from veratex2.supref
	where code='{ship_to}'";
sc_lookup(dataset,$getadd);
if(isset({dataset[0][0]}))
   {
{sname}={dataset[0][0]};
	}
   else
   {
	 {sname}='';
	   }
if(isset({dataset[0][1]}))
   {
{ShipAd1}={dataset[0][1]};
	} 
   else
   {
	 {ShipAd1}='';
	   }
   
	if(isset({dataset[0][2]}))
   {
{ShipAd2}={dataset[0][2]};
	}
	   else
   {
	 {ShipAd2}='';
	   } 
	if(isset({dataset[0][3]}))
   {
$city={dataset[0][3]};
	}
 else
   {
	 $city='';
	   }
	if(isset({dataset[0][4]}))
   {   
	   $state={dataset[0][4]};
		   }
	   else
	   {
		   $state='';
		   }
	if(isset({dataset[0][5]}))
   {   
	   $zip={dataset[0][5]};
		   }
	   else
	   {
		   $zip='';
		   }
	  {ShipAd3}=$city.' '.$state.' '.$zip;
if(isset({dataset[0][6]}))
   {
{ShipAd4}={dataset[0][6]};
	}
    else
   {
	 {ShipAd4}='';
	   }
";}i:22;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:15:"stylechange_sql";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:412:"$update_ngo="UPDATE ngo
	SET style='{new_style}',
        mill='{mill}',
        old_po='{old_po}',
        location='{ship_to}'
WHERE p_o_number='{p_o_number}'";
	
$update_grpcs="UPDATE grpcs
SET style='{new_style}',
    shipto='{ship_to}',
    old_po='{old_po}',
    ac='{AC}',
tper={top_pc},
bper={bot_pc}
WHERE p_o_number='{p_o_number}'";
sc_exec_sql($update_ngo);
sc_exec_sql($update_grpcs);";}i:23;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:11:"termsupdate";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:312:"$getadd="
select terms,terms2 from veratex2.supref
	where code='{mill}'";
sc_lookup(dataset,$getadd);
if(isset({dataset[0][0]}))
   {
{Terms}={dataset[0][0]};
	}
    else
   {
	 {Terms}='';
	   }
if(isset({dataset[0][1]}))
   {
{Terms2}={dataset[0][1]};
	}
    else
   {
	 {Terms2}='';
	   }
";}i:24;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:11:"updOrderAmt";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:102:"{order_amt} = {knit_price} * {lbs_ordere};
{lbsordered}={lbs_ordere};
{lbs_open}={lbs_ordere}-{lbs};";}i:25;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:29:"fv2_greige_greigepo_knit_form";s:4:"nome";s:14:"updateyarnview";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:737:"$check_sql = "SELECT den,fil,luster,producer,fiber,merge"
   . " FROM warppo"
   . " WHERE p_o_number = '" . {top_p_o_} . "'";
sc_lookup(rs, $check_sql);
if (isset({rs[0][0]}))     // Row found
{
{l2yarn} = {rs[0][0]}.'/'.{rs[0][1]}.' '.{rs[0][2]}.' '.{rs[0][3]}.' '.{rs[0][4]}.' MERGE '.{rs[0][5]};
}
		else     // No row found
{
	{l2yarn} = '';
	
}
	$check_sql = "SELECT den,fil,luster,producer,fiber,merge"
   . " FROM warppo"
   . " WHERE p_o_number = '" . {bot_p_o_} . "'";
sc_lookup(rs, $check_sql);

if (isset({rs[0][0]}))     // Row found
{
    {l1yarn} = {rs[0][0]}.'/'.{rs[0][1]}.' '.{rs[0][2]}.' '.{rs[0][3]}.' '.{rs[0][4]}.' MERGE '.{rs[0][5]};
}
		else     // No row found
{
		    {l1yarn} = '';
}
";}}