<?php
 
session_start();
include("DMMYSQLG.php");
include("DSA1000.php");
include("DMMYSQLG.php");
$com = "A";
include("DF30000.inc");
include("DF80000.php");
include("DFJSISCI.inc");
require_once("DFJQUERY.inc");

$elim=$_GET['elm'];
  
				$sql="delete from frecomart where codfre='".$_GET['contr']."' and codart='".$_GET['elm']."'";
				if (!mysqli_query($con ,$sql))
				{
					die('Error en eliminacion: ' . mysqli_error($con));
				}else{
					echo 'ĦĦĦREGISTRO ELIMINADO!!!';
				}
$sq=mysqli_query($con ,"SELECT SUM(subpre) as total FROM frecomart where codfre=$_POST['ver5']");
$re = mysqli_fetch_array($sq);
$ssql = "UPDATE frecomp SET total_rec='".$re['total']."' where nparte1=$_POST['ver5']";	
	if (mysqli_query($con ,$ssql)){
    	$salida = "Insertado TOTAL ORDEN correctamente";
	}else{
	    $salida = "No se ha insertado. Este es el error: " . mysqli_error($con);
	}

  echo '<meta content="; url=AL10700_AC.php?pas='.$_GET['pas'].'&tnum='.$_POST['tnum'].'" HTTP-EQUIV="REFRESH">';




?>
