"; $p=new EcmPayment(); $p->parent_id=$_POST['account_id']; $r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select ems_system_id from accounts where id='".$_POST['account_id']."'")); $p->parent_name=$_POST['account_name']; $p->ems_system_id=$r['ems_system_id']; $p->name=trim($v[0]); $v[1]=str_replace(",",".",$v[1]); $v[1]=str_replace(" ","",$v[1]); $v[1]=substr($v[1],2,strlen($v[1])); $p->value=$v[1]; $p->payment_date=$_REQUEST['date']; $id=$p->save(); $GLOBALS['db']->query("update ecmpayments set value='".$v[1]."' where id='".$id."'"); } } ?>