<?php
session_start();
include "../conexion.php";
require_once('../include/sesiones.php'); 

$id=$_POST['id'];
$sql=mysqli_query($con, "SELECT * from egresos where id='$id'");
$row= mysqli_fetch_array($sql);
$mov_id = $row['mov_id'];

$concepto=mb_strtoupper($_POST['concepto1']);
$total=$_POST['total1'];
$sql=mysqli_query($con,"UPDATE egresos Set concepto='$concepto', total='$total' Where id='$id' and empresa='$empresa'") or die(mysqli_error($con));

$sql=mysqli_query($con,"UPDATE movimientos Set mov_detalle='$concepto', mov_total='$total' Where mov_id='$mov_id' and empresa='$empresa'") or die(mysqli_error($con)); 

echo '<div class="alert alert-info alert-dismissable">
<button type="button" class="close" data-dismiss="alert" aria-hidden="true">&times;</button>
<strong>Egreso!</strong> Modificado correctamente.
</div>';
?>