<?php
session_start();
require_once('../conexion.php');
require_once('../include/sesiones.php');
if (isset($_SESSION['usu_nombre']))
{
?>
<html lang="es-es" dir="ltr"><head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
<script src="../js/jstirilla.js" type="text/javascript" language="javascript" charset="UTF-8"></script>
<style type="text/css">
#receipt_wrapper{font-family:Tahoma,Geneva,sans-serif;font-size:100%;width:100%;}#receipt_header{text-align:center;}#company_name{font-weight:bold;}#company_phone{margin-bottom:15px;}#sale_time{margin-bottom:5px;}#receipt_items{position:relative;border-collapse:collapse;margin-top:15px;margin-bottom:15px;width:100%;}#receipt_items td{position:relative;padding:3px;}.short_name{display:none;}#sale_return_policy{width:80%;margin:0 auto;text-align:center;}#barcode{margin-top:10px;text-align:center;}#signature{margin-top:30px;text-align:center;font-size:72%;}#receipt_items td{font-size:100%;}#receipt_header{width:100%;}#receipt_items td{font-size:15px;}#receipt_header>div{float:inherit;}#receipt_membrete{width:40%;}#receipt_titulos{width:10%;}#receipt_cliente{width:50%;}#receipt_cliente>span,#receipt_titulos>span{display:block;overflow:hidden;width:100%;height:12px;font-size:80%;}#receipt_titulos .numero_factura{min-height:36px;height:36px;font-size:90%;}#receipt_cliente span.numero_factura{font-size:1.4em;padding-top:7px;height:29px;min-height:29px;}#observaciones,#sale_return_policy{margin-top:8px;font-size:10px;}#receipt_items td{padding:0;}#receipt_wrapper{background:white;}#receipt_items th{font-size:80%;font-weight:normal;}#receipt_items td.receipt-cell-totals-cell-line{border-top:1px solid;height:4px;}#receipt_items tr.receipt-row-totales td{font-size:97%;text-align:right;}#receipt_items tr.receipt-row-total td{font-weight:bold;}.receipt-numero-factura{font-weight:bold;}#receipt_wrapper .my-font{font-size:150%;font-weight:normal!important;}#receipt_wrapper .my-strong{font-size:106%;}#receipt_wrapper .receipt-row-cambio{text-transform:uppercase;}#receipt_wrapper .receipt-item-row td{vertical-align:middle;}.receipt-item-cell-description{width:56%;}.receipt-item-cell-price{width:24%;}.receipt-item-cell-quantity{width:16%;}.receipt-item-cell-discount{width:14%;}#receipt_wrapper.factura_small #receipt_header{font-size:90%;}
html{overflow:auto;}#receipt_header{width:100%;}#receipt_items td{font-size:15px;}#receipt_header>div{float:inherit;}#receipt_membrete{width:40%;}#receipt_titulos{width:10%;}#receipt_cliente{width:50%;}#receipt_cliente>span,#receipt_titulos>span{display:block;overflow:hidden;width:100%;height:12px;font-size:80%;}#receipt_titulos .numero_factura{min-height:36px;height:36px;font-size:90%;}#receipt_cliente span.numero_factura{font-size:1.4em;padding-top:7px;height:29px;min-height:29px;}#observaciones,#sale_return_policy{margin-top:8px;font-size:10px;}#receipt_items td{padding:0;}.wordbreak{word-break:break-all!important;}.wordtruncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}.td_category span,.td_location span{width:40px!important;display:block;}.td_location span{width:30px!important;}#register_container.receiving #register_wrapper form,#register_container.sales #salesmode form{padding-top:7px;background-color:#1e5a96;padding-bottom:9px;border-radius:6px;background:linear-gradient(#205b97,#5482af,#205b97);}#register_container.sales #register_wrapper{background-color:#1e5a96;background:linear-gradient(#205b97,#5482af,#205b97);}form select{border-radius:4px;}#register_container.receiving td#register_wrapper{background:none transparent;}#register_container.sales #salesmode span{color:#fff;width:100%;text-align:center;display:block;}#register_container.sales #register_wrapper{background-color:#5582b0;background:linear-gradient(#255f99,#3f72a5,#31689f);}#register_container.sales #salesmode{height:52px;margin-top:-9px;}#suspend div span,#cancel div span{padding-top:2px;display:block;}#customer_info_shell #customer,#customer_info_shell #supplier{padding:5px 5px;}#add_customer_info a{padding:1px 5px;}#register_container.receiving #payment_types{width:146px;}[class*='pws-width-']{float:left!important;display:block!important;}.pws-width-1-4{width:25%!important;margin:0!important;}.pws-width-1-3{width:33.33%!important;margin:0!important;}.pws-width-2-4,.pws-width-1-2{width:50%!important;margin:0!important;}.my-margin-top{margin-top:25px;}.my-margin-bottom{margin-bottom:25px;}p.my-desc{padding-top:7px;}div.my-report-row:not(:first-child){padding-top:9px;border-top:1px dotted #ccc;}#pager.jPaginate a,#pager.jPaginate .jPag-current{line-height:23px;height:auto;cursor:pointer;padding:2px 5px;margin:2px;float:left;color:black;}#pager.jPaginate a:hover{background-color:#2e6da4!important;}#pager.jPaginate .jPag-current{background:transparent;color:#444!important;}#pager.jPaginate button{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px;color:#fff;background-color:#337ab7;border-color:#2e6da4;padding:5px 10px;font-size:12px;line-height:1.5;border-radius:3px;height:auto;color:#fff!important;float:none;margin-right:8px;}#pager.jPaginate div>a:hover,#pager.jPaginate div>button:hover{color:#fff;background-color:#286090;border-color:#204d74;}#pager span.jPag-sprevious,#pager span.jPag-snext{display:inline-block;float:none;line-height:19px;margin-left:15px;margin-right:15px;padding-top:1px;margin-top:5px;overflow:hidden;height:18px;margin-bottom:-4px;}.ui-autocomplete{box-shadow:0px 1px 4px #333;}ul.jPag-pages{height:30px;}#content_area{min-height:800px;box-sizing:content-box;width:960px;}body.sales #content_area{width:967px;margin:0 7px;padding:20px 10px 10px 10px;background:#FFFFFF;overflow:hidden;border-radius:4px;}form fieldset{border:1px dotted #ccc;border-top:none;}form fieldset:first-child{border-top:1px dotted #ccc;}fieldset div.field_row{margin:7px;font-size:14px;font-weight:bold;padding-bottom:7px;border-bottom:1px dotted #ccc;margin-right:21px;width:274px;}fieldset div.field_row label{width:240px;padding:5px;float:left;padding-left:0;}.my-row-3>*{width:29%!important;display:block;float:left!important;padding-right:1%!important;margin-left:0!important;margin-right:0!important;padding-left:2%!important;}.my-row-1>*{width:97%!important;display:block;}.my-promo-extra-fields{float:left;margin-left:30px;}.my-promo-fieldset label{width:100%!important;display:block;}.my-promo-fieldset .form_field{float:left;}.tablesorter th i{cursor:pointer;}.modal-body form{display:block;overflow:hidden;}#TB_ajaxContent .modal-header{display:none;}#TB_ajaxContent .modal-footer{padding:15px;text-align:right;border-top:1px solid #e5e5e5;}#TB_ajaxContent .submit_button{display:inline-block;padding:6px 12px;margin-bottom:0;font-size:14px;font-weight:400;line-height:1.42857143;text-align:center;white-space:nowrap;vertical-align:middle;-ms-touch-action:manipulation;touch-action:manipulation;cursor:pointer;-webkit-user-select:none;-moz-user-select:none;-ms-user-select:none;user-select:none;background-image:none;border:1px solid transparent;border-radius:4px;background-color:#337ab7;border-color:#2e6da4;color:#fff;background-color:#337ab7;border-color:#2e6da4;padding:10px 16px;font-size:18px;line-height:1.3333333;border-radius:6px;}#customer_info_filled{background:#bde1fd;border:1px solid #ccc;border-radius:5px;width:198px;height:auto;overflow:hidden;display:block;}#customer_edit a{color:#1f5b96;}#customer_remove a{color:#b5473f;}#customer_info_filled>div{display:block;width:100%;float:left;}#customer_info_filled #customer_edit,#customer_info_filled #customer_remove{width:40%;margin-right:2%;}.my-margin-bottom-remove{margin-bottom:0!important;}.required_fields_message{font-size:80%;margin-bottom:8px;font-style:italic;}form legend{font-size:110%;}a{color:#0a549e;}a:hover{color:#0c3258;}.my-extra-links{border-top:1px dotted #ccc;padding-top:14px;}body.reports #sortable_table{font-size:100%;}body.reports #sortable_table a{color:#3298da;background:transparent;padding:3px 4px;border-radius:4px;font-weight:bold;text-shadow:1px 0 2px #fff;font-size:110%;border:1px dotted;}body.reports #sortable_table a:hover,body.reports #sortable_table a:focus{box-shadow:0px 0 1px #111;background:#fff;text-decoration:none;}body.reports .summary_row{font-size:150%;padding-bottom:5px;}body.reports .summary_row:first-child{padding-top:15px;}body.reports #item_table td{background-color:rgba(233,233,233,0.48);}body.reports #item_table .innertable td{background-color:rgba(253,253,255,0.74);}#myModal input.quantity{width:60px;text-align:right;}#myModal #item_kit_items tr td{padding:0 4px 4px 4px;}form label{font-weight:normal;}body.reports #item_table .innertable th{background:#7a9dc1;height:26px;text-shadow:0px 0 2px #1e5a96;}body.reports #content_area{width:969px;}.my-key{text-decoration:underline;}#content_area{min-height:350px;}#content_area_wrapper{min-height:480px;}#payment_types{max-width:150px;}#make_payment #tender input{width:160px;}#add_payment_text{font-size:80%;padding-left:5px;line-height:95%;}.my-red{color:#de3225!important;}.my-text-align-right{text-align:right!important;}.my-text-align-center{text-align:center!important;}.my-text-align-left{text-align:left!important;}.stock_negative{font-weight:bold;color:#de3225;}table#register td input.my-input-warning[type='text']{background-color:rgba(255,0,50,0.81);color:white;border-color:#777;}#cart_contents tr.cart_item_row>td{text-indent:0;}#cart_contents tr.cart_item_row>td>span{display:block;padding-left:5px;}#cart_contents tr.cart_item_row>td.my-text-align-right>span,td.my-text-align-right span{padding-left:3px;padding-right:5px;}#cart_contents tr.cart_item_row>td.my-text-align-center>span,td.my-text-align-center span{padding-left:3px;padding-right:3px;}.my-is-kit,.my-is-service{font-size:70%;display:inline-block;margin-top:-5px;}#TB_window .well{padding:25px;}#TB_window #my-hotkey-list{font-size:110%;}#TB_window #my-hotkey-list h4{display:block;width:100%;font-weight:normal;text-transform:uppercase;margin-bottom:5px;}#TB_window dl{display:block;overflow:hidden;}#TB_window #my-hotkey-list dl>*{display:inline-block;float:left;display:block;}#TB_window #my-hotkey-list dt{font-weight:bold;clear:left;width:75px;text-align:right;padding-right:15px;}#TB_window #my-hotkey-list dd{max-width:600px;}#home_module_list{min-height:410px;}.my-div-button{background:#86a6c7;background-image:-webkit-linear-gradient(top,#86a6c7,#1a5794);background-image:-moz-linear-gradient(top,#86a6c7,#1a5794);background-image:-ms-linear-gradient(top,#86a6c7,#1a5794);background-image:-o-linear-gradient(top,#86a6c7,#1a5794);background-image:linear-gradient(to bottom,#86a6c7,#1a5794);border-radius:4px;height:30px;width:172px;cursor:pointer;}.my-strong{font-weight:bold!important;}.my-font{font-family:Impact,Charcoal,sans-serif;}#report_summary{padding-bottom:25px;}#demo_notice{text-align:center;width:80%;margin:auto;display:block;overflow:hidden;margin-bottom:15px;margin-top:-5px;}#my_title_bar h1{font-size:160%;}#my_title_bar img{width:24px;}body.sales button:disabled,body.receivings button:disabled{box-shadow:rgba(10,10,10,0.7) 0px 0px 100px inset;opacity:0.4;}fieldset div.field_row-3{width:100%;padding:8px;}fieldset div.field_row-2{width:63%;padding:8px;}fieldset div.field_row-3 label,fieldset div.field_row-2 label{width:100%;}
</style>
</head>
<body id="salescomplete" class="my-poscol sales">
<div id="content_area_wrapper">
<div id="content_area">
    <?php
        $sql=mysqli_query($con, "SELECT * from factura where  empresa='$empresa'");
        $row=mysqli_fetch_array($sql);
        $fac_tam=$row['fac_cm'];
        $fac_msj=$row['fac_msj'];
    ?>
    <style type="text/css">
        #receipt_wrapper {
        width: <?php echo $fac_tam;?>cm;
        background: white;
        }
    </style>

<div id="receipt_wrapper">
    <div id="receipt_header">
        <div id="company_name" class="my-font"><?php echo $emp_nombre;?></div>
        <div id="company_nit"><strong>NIT:<?php echo $emp_nit;?></strong></div>
        <div id="company_address"><?php echo $emp_direccion;?></div>
        <div id="company_phone"><?php echo $emp_telefono;?></div>
        <div id="regimen">Régimen <?php echo $emp_regimen;?></div> 
    <?php
        $id_egre=$_GET['id'];
        $egreso=mysqli_query($con,"SELECT * FROM egresos where id='$id_egre'") or die(mysqli_error($con));  
        $roweg=mysqli_fetch_array($egreso);
    ?>
    </div>
    </br>
    <div id="receipt_general_info">
        <div id="sale_id" class="my-strong receipt-numero-factura">Comprobante de Egreso Nro.#: <?php echo $roweg['num_e']; ?></div>
        <div id="sale_id" class="my-strong receipt-numero-factura">Fecha: <?php echo $roweg['fecha']; ?></div>
        <div id="sale_id" class="my-strong receipt-numero-factura">Egreso De:</div><?php echo number_format($roweg['total'],0);?> (<?php echo $roweg['banco'];?>)
        <div id="sale_id" class="my-strong receipt-numero-factura">Por Concepto de: </div><?php echo $roweg['concepto'];?>
    </div>


    <div id="signature">
        .........................
        <br>Impreso por | www.vicpos.com
    </div>
</div>

</div>
</div>

<script language="Javascript">
window.print();
window.onafterprint = function () {
    window.close();
}
</script>
</body></html> 
<?php
}
else
{
    echo '<script>alert("primero debes Iniciar Cesion para ver esta pagina")</script>';
    echo '<script>location.href = "index.php";</script>';
}
?>