a:9:{i:0;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:1;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:28:"updOrderAmt();
upPercent();";}i:2;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"greige_greigepo_knit_form";s:4:"nome";s:18:"NEW_STYLE_onChange";s:4:"tipo";s:1:"A";s:5:"parms";s:0:"";s:6:"codigo";s:12:"upPercent();";}i:3;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:4;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:5;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:73:"[var_po]= {p_o_number};
[var_status] = {status};
[var_terms] = {terms};";}i:6;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:30:"{lbs_open}={lbs_ordere}-{lbs};";}i:7;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"greige_greigepo_knit_form";s:4:"nome";s:9:"upPercent";s:4:"tipo";s:1:"M";s:5:"parms";s:0:"";s:6:"codigo";s:1542:"sc_lookup(dataset, "SELECT top_percen, bot_percen FROM grstyle WHERE new_style = '{new_style}'");
$toppercen = {dataset[0][0]};
$botpercen = {dataset[0][1]};
//sc_lookup(dataset,"SELECT lbs_ordere,lbs, bot_cost, top_cost,cost_lb_k, inventory FROM greigepo WHERE p_o_number = '{p_o_number}'");
//$lbsordere = {dataset[0][0]};
//$lbs = {dataset[0][1]};
//$topcost = {dataset[0][2]};
//$botcost = {dataset[0][3]};
//$costlbk = {dataset[0][4]};
//$inventory = {dataset[0][5]};
$lbsordere = {lbs_ordere};
$lbs = {lbs};
$topcost= {top_cost};
$botcost = {bot_cost};
$costlbk = {cost_lb_k};
$inventory = {inventory};
$toplbs = $toppercen *$lbsordere;
$botlbs = $botpercen *$lbsordere;
$topship = round($toppercen*$lbs,0);
$botship = round($botpercen*$lbs,0);
$topcost = $topcost*$toppercen;
$botcost = $botcost*$botpercen;
$costlby =$topcost+$botcost;
$costlb = $costlby+$costlbk;
$amount = $costlb * $inventory;
sc_master_value('top_lbs',$toplbs);
sc_master_value('bot_lbs',$botlbs);
sc_master_value('top_ship',$topship);
sc_master_value('bot_ship',$botship);
sc_master_value('cost_lb_y',$costlby);
sc_master_value('cost_lb',$costlb);
sc_master_value('amount',$amount);
sc_exec_sql("UPDATE greigepo
             SET top_lbs = $toplbs,
                 bot_lbs = $botlbs,
                 top_ship = $topship,
                 bot_ship = $botship,
                 cost_lb_y = $costlby,
                 cost_lb = $costlb,
                 amount = $amount
             WHERE p_o_number = {p_o_number]");


";}i:8;a:7:{s:7:"cod_prj";s:7:"Veratex";s:6:"versao";s:1:"1";s:7:"cod_apl";s:25:"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:42:"{order_amt} = {knit_price} * {lbs_ordere};";}}