Resolved using http://www.phpgrid.org/faqs/#71 (How to post row using JS), after used on_after_insert event to load function that update row field so:
function update_award_points($data)
{
//1: Select Client ID to start query
$client_id = $data["params"]["customer_id"];
global $h;
$res = $h->execute_query("select id, name, company, award_points from sma_companies WHERE id = '$client_id'");
#phpgrid_error($h->con->errormsg());
$arr = $res->GetRows();
#phpgrid_error($arr);
$points = $arr[0]["award_points"];
//2: Query 1 – If statement is in case sale type Buy (Bonus) for example TRUE, then subtraction award_points 180 points
if($sale == 'Bonus'){
$accrued = $points – 180;
$h->execute_query("UPDATE sma_companies SET award_points = '$accrued' WHERE id = '$client_id'");
//3: Query 3 – sale type different then FALSE
} else {
$acu = $puntos + $t;
$h->execute_query("UPDATE sma_companies SET award_points = '$accrued' WHERE id = '$client_id'");
}
Regards!