<?php
	include("cls_conexion.php");$CNN=new ClsMySQL();include("conexion23.php");	
	include("conexion_funciones.php");
	error_reporting(1);
	$s="SELECT * FROM apk_proforma_det ORDER BY apk_id_apk";
	$rs=grs($s);
	while($r=$rs->fetch_assoc()){
		$PIE=$r['apk_pie'];
		$CAN=$r['apk_can'];
		$PRE=$r['apk_pre'];
		$IMP=round($r['apk_imp'],1);
		$CAL=round($PIE * $CAN * $PRE,1);
		if($CAL==$IMP){
			echo "OK<br>";
		}else{
			echo "ERROR : ".$r['apk_id_apk']." = B:".$IMP." C:".$CAL." DIF:". ($CAL - $IMP)."<br>";
		}
		
	}
	echo "fin";
?>