<?php
//-------------------------	
	$StrCmd=V($_POST['TxtAc']);	
	if($StrCmd=="RESET_XXXXX"){
        return;			
		ejt("DELETE FROM a");
		ejt("DELETE FROM ajustes");
		ejt("DELETE FROM ajustes_det");
		ejt("DELETE FROM ajustes_presentacion");
		ejt("DELETE FROM ajustes_presentacion_det");
		ejt("DELETE FROM ajustes_presentacion_det_temp");
		ejt("DELETE FROM ajustex");	
		ejt("DELETE FROM almacenes");
		ejt("DELETE FROM apk");	
		ejt("DELETE FROM apk_print");	
		ejt("DELETE FROM apk_proforma_det");	
		ejt("DELETE FROM app_sp");	
		//ejt("DELETE FROM auxiliar");
		//ejt("DELETE FROM auxiliares");		
		ejt("DELETE FROM bancos");
		ejt("DELETE FROM caja_chica");		
		ejt("DELETE FROM cargos");		
		ejt("DELETE FROM clientes");
		ejt("DELETE FROM clientes_suc");
		ejt("DELETE FROM clientes_tipos");
		ejt("DELETE FROM cobros");
		ejt("DELETE FROM cobros_temp");
		ejt("DELETE FROM cobrox");
		ejt("DELETE FROM cobroz");
		ejt("DELETE FROM compras");
		ejt("DELETE FROM compras_det");
		ejt("DELETE FROM comprobantes");
		ejt("DELETE FROM contratos");
		ejt("DELETE FROM contratos_ingresos");
		ejt("DELETE FROM cotizaciones");
		ejt("DELETE FROM cotizaciones_con");
		ejt("DELETE FROM cotizaciones_det");
		ejt("DELETE FROM creditos");
		ejt("DELETE FROM devoluciones");
		ejt("DELETE FROM devoluciones_det");
		//
		ejt("DELETE FROM distritos");
		//ejt("DELETE FROM doc_nl");
		ejt("DELETE FROM edc");
		ejt("DELETE FROM egresos");
		ejt("DELETE FROM egresos_tipos");
		ejt("DELETE FROM empresas ");
		//ejt("DELETE FROM fpagos");
		//ejt("DELETE FROM gindex");
		ejt("DELETE FROM ginterna");
		ejt("DELETE FROM ginterna_det");
		ejt("DELETE FROM guias");
		ejt("DELETE FROM guias_det");
		ejt("DELETE FROM historial");
		ejt("DELETE FROM hw_pie");
		ejt("DELETE FROM ingresos");
		ejt("DELETE FROM ingresos_tipos");		
		ejt("DELETE FROM kardex");
		ejt("DELETE FROM lineas");
		ejt("DELETE FROM marcas");		
		//ejt("DELETE FROM menu");
		//ejt("DELETE FROM menus");
		//ejt("DELETE FROM meses");
		//ejt("DELETE FROM monedas");
		ejt("DELETE FROM pagos");
		ejt("DELETE FROM personal");
		//_ejt("DELETE FROM pri_cot_det");
		//_ejt("DELETE FROM pri_gia_det");
		//_ejt("DELETE FROM pri_ven_det");		
		ejt("DELETE FROM productos");
		ejt("DELETE FROM proveedores");
		ejt("DELETE FROM reportes");
		ejt("DELETE FROM resumen");
		ejt("DELETE FROM stocks");
		ejt("UPDATE stocks SET stock=0");		
		ejt("DELETE FROM stocks_presentaciones");
		ejt("DELETE FROM sunat");
		ejt("DELETE FROM tarjetas");
		ejt("DELETE FROM temp_compras");
		ejt("DELETE FROM temp_compras2");
		//ejt("DELETE FROM tipos_pagos");
		ejt("DELETE FROM transferencias");
		ejt("DELETE FROM t_productos");
		ejt("DELETE FROM transferencias_det");
		ejt("DELETE FROM transformaciones");
		ejt("DELETE FROM unidades");
		ejt("DELETE FROM usuarios WHERE id_usuario>0");
		ejt("DELETE FROM usuarios_menus");
		//ejt("DELETE FROM valores");
		ejt("DELETE FROM ventas");
		ejt("DELETE FROM ventas_det");	
		
		//
		$LStrMsg="Los datos han sido borrados satisfactoriamente";
		$LStrFoc="document.getElementById('CmdZ').focus();";						
		$StrGT="S";			

	}
	if($StrGT=="S"){
		if(strlen($LStrMsg)>0){
			if(strlen($LStrFoc)==0){
				$LStrMsg="onload=\"alert('$LStrMsg');\"";
			}else{
				$LStrMsg="onload=\"alert('$LStrMsg');$LStrFoc;\"";
			}
		}else{
			if(strlen($LStrFoc)>0){
				$LStrMsg="onload=\"$LStrFoc;\"";
			}
		}
	}
?>
