<?
$data[]="FVKOR 018/10";
$data[]="FVKOR 021/10";
$data[]="FVKOR 023/10";
$data[]="FVKOR 022/10";
$data[]="FVKOR 020/10";
$data[]="FVKOR 012/10";
$data[]="FVKOR 003/10";
for($i=0;$i<count($data);$i++){
	$e=explode(" ",$data[$i]);
	$r=$GLOBALS['db']->fetchByAssoc($GLOBALS['db']->query("select id,document_no,total,register_date from ecminvoiceouts where document_no like '".$data[$i]."'"));
	$inv_id=$r['id'];
	$inv_name=$r['document_no'];
	$date=$r['register_date'];
	$total=$r['total'];
	echo "insert into ecmpayments_ecminvoiceouts set id='".create_guid()."',ecminvoiceout_id='".$inv_id."',date_entered='".date("Y-m-d H:i:s")."',date_modified='".date("Y-m-d H:i:s")."',created_by=1,modified_user_id=1,deleted=0,paid=0,document_no='".$inv_name."',total='".$total."',account_id='134',register_date='".$date."';<br>";
}
?>