(1321,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:30:00','rafael',457,11023,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1322,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:31:00','rafael',458,11051,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1323,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:32:00','rafael',459,11079,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1324,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:33:00','rafael',461,11127,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n         \n         table {break-after: always;}\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1325,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:35:00','rafael',463,11150,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n         \n         table {\n            break-after: always;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1326,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:39:00','rafael',464,11209,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n         \n         table {\n            break-after: always;\n         }\n      }\n\n      @page {\n         margin: 0;\n         size: letter; /*or width then height 150mm 50mm*/\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1327,'core_formulario[16].javascript','2025-02-14 11:40:00','admin',25,896,'function FrmAutoRun()\n    {\n        \n        if($(\'#id\').val()) {\n            $(\'#PCOContenedor_btn_consultar\').hide();\n            $(\'#PCOContenedor_fecha_inicio\').hide();\n            $(\'#PCOContenedor_fecha_fin\').hide();\n        }\n        else {\n            $(\'#PCOContenedor_btn_update\').hide();\n            $(\'#PCOContenedor_factura_pagada\').hide();\n            $(\'#PCOContenedor_fecha_pago\').hide();\n            $(\'#PCOContenedor_forma_pago\').hide();\n            $(\'#PCOContenedor_total\').hide();\n            $(\'#PCOContenedor_abono\').hide();\n            $(\'#PCOContenedor_informeabono\').hide();\n            \n        }\n        \n        if(!$(\'#fecha_inicio\').val()) $(\'#fecha_inicio\').val($(\'#fecha\').val());\n        if(!$(\'#fecha_fin\').val())    $(\'#fecha_fin\').val($(\'#fecha\').val());\n        if(!$(\'#cliente_credito\').val())    $(\'#cliente_credito\').val($(\'#cliente\').val());\n   \n		\n    }','B'),(1328,'core_formulario[16].pre_script','2025-02-14 11:43:00','rafael',16,280,'<?php\nglobal $id, $abono, $PCO_PostAccionDirecta;\n\nif($id) {\n$abono2= PCO_EjecutarSQL(\"\n    SELECT SUM(valor_abono) \n    FROM  app_abonos_ventas_credito \n    WHERE id_venta = \'$id\'\n\")->fetchColumn();\n\n\n$abono = number_format( $abono2, 2, \",\", \" \");\n\necho($abono);\n}','B'),(1329,'core_formulario[16].javascript','2025-02-14 11:47:00','admin',27,963,'function FrmAutoRun()\n    {\n        \n        if($(\'#id\').val()) {\n            $(\'#PCOContenedor_btn_consultar\').hide();\n            $(\'#PCOContenedor_fecha_inicio\').hide();\n            $(\'#PCOContenedor_fecha_fin\').hide();\n            $(\'#PCOContenedor_ventasCredito\').hide();\n            \n        }\n        else {\n            $(\'#PCOContenedor_btn_update\').hide();\n            $(\'#PCOContenedor_factura_pagada\').hide();\n            $(\'#PCOContenedor_fecha_pago\').hide();\n            $(\'#PCOContenedor_forma_pago\').hide();\n            $(\'#PCOContenedor_total\').hide();\n            $(\'#PCOContenedor_abono\').hide();\n            $(\'#PCOContenedor_informeabono\').hide();\n            \n        }\n        \n        if(!$(\'#fecha_inicio\').val()) $(\'#fecha_inicio\').val($(\'#fecha\').val());\n        if(!$(\'#fecha_fin\').val())    $(\'#fecha_fin\').val($(\'#fecha\').val());\n        if(!$(\'#cliente_credito\').val())    $(\'#cliente_credito\').val($(\'#cliente\').val());\n   \n		\n    }','B'),(1330,'core_formulario[16].javascript','2025-02-14 11:47:00','admin',27,963,'function FrmAutoRun()\n    {\n        \n        if($(\'#id\').val()) {\n            $(\'#PCOContenedor_btn_consultar\').hide();\n            $(\'#PCOContenedor_fecha_inicio\').hide();\n            $(\'#PCOContenedor_fecha_fin\').hide();\n            $(\'#PCOContenedor_ventasCredito\').hide();\n            \n        }\n        else {\n            $(\'#PCOContenedor_btn_update\').hide();\n            $(\'#PCOContenedor_factura_pagada\').hide();\n            $(\'#PCOContenedor_fecha_pago\').hide();\n            $(\'#PCOContenedor_forma_pago\').hide();\n            $(\'#PCOContenedor_total\').hide();\n            $(\'#PCOContenedor_abono\').hide();\n            $(\'#PCOContenedor_informeabono\').hide();\n            \n        }\n        \n        if(!$(\'#fecha_inicio\').val()) $(\'#fecha_inicio\').val($(\'#fecha\').val());\n        if(!$(\'#fecha_fin\').val())    $(\'#fecha_fin\').val($(\'#fecha\').val());\n        if(!$(\'#cliente_credito\').val())    $(\'#cliente_credito\').val($(\'#cliente\').val());\n   \n		\n    }','B'),(1331,'core_formulario[16].javascript','2025-02-14 11:52:00','admin',27,963,'function FrmAutoRun()\n    {\n        \n        if($(\'#id\').val()) {\n            $(\'#PCOContenedor_btn_consultar\').hide();\n            $(\'#PCOContenedor_fecha_inicio\').hide();\n            $(\'#PCOContenedor_fecha_fin\').hide();\n            $(\'#PCOContenedor_ventasCredito\').hide();\n            \n        }\n        else {\n            $(\'#PCOContenedor_btn_update\').hide();\n            $(\'#PCOContenedor_factura_pagada\').hide();\n            $(\'#PCOContenedor_fecha_pago\').hide();\n            $(\'#PCOContenedor_forma_pago\').hide();\n            $(\'#PCOContenedor_total\').hide();\n            $(\'#PCOContenedor_abono\').hide();\n            $(\'#PCOContenedor_informeabono\').hide();\n            \n        }\n        \n        if(!$(\'#fecha_inicio\').val()) $(\'#fecha_inicio\').val($(\'#fecha\').val());\n        if(!$(\'#fecha_fin\').val())    $(\'#fecha_fin\').val($(\'#fecha\').val());\n        if(!$(\'#cliente_credito\').val())    $(\'#cliente_credito\').val($(\'#cliente\').val());\n   \n		\n    }','B'),(1332,'core_formulario[16].post_script','2025-02-14 11:57:00','admin',16,428,'<?php\nglobal $PCO_PostAccionDirecta, $fecha_inicio, $fecha_final, $cliente, $id, $accionForm;\n$PCO_PostAccionDirecta = 1;\n//$PCO_PostAccion = 1;\n$accionForm = \"se ha consultado\";\n\n\n\nif($id)\n    $accionForm = \"Actualizado\";\nPCO_Mensaje(\"Aviso del sistema\",\"La venta $accionForm correctamente!\", \'\', \'fa fa-thumbs-up fa-5x icon-green texto-blink\', \'alert alert-success alert-dismissible\');\n\nunset($id);\n\nPCO_CargarFormulario(16);\n','B'),(1333,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 11:59:00','rafael',465,11239,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n         \n         table {\n            break-after: always;\n         }\n      }\n\n      @page {\n         margin: 0;\n         size: letter; /*or width then height 150mm 50mm*/\n         break-after: always;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A');
INSERT INTO `core_pcoder_historial` VALUES (1334,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:00:00','rafael',463,11150,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n         \n         table {\n            break-after: always;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1335,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:00:00','rafael',459,11079,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n         break-after: page;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1336,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:01:00','rafael',458,11051,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n         break-after: page;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1337,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:01:00','rafael',457,11023,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1338,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:02:00','rafael',457,11023,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n\n   <article>\n      <BR>\n      <BR>\n      <BR>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1339,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:02:00','rafael',453,10989,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1340,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:06:00','rafael',453,10989,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 14px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1341,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:07:00','rafael',453,10989,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 12px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1342,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:07:00','rafael',453,10989,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1343,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:08:00','rafael',453,10988,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 18px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1344,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:09:00','rafael',454,11019,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: always;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 18px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1345,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:10:00','rafael',454,11017,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n      }\n\n      table {\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 18px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1346,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:11:00','rafael',452,10995,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 18px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1347,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:11:00','rafael',448,10969,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 18px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1348,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:13:00','rafael',448,10968,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 16px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1349,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:13:00','rafael',448,10968,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 17px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1350,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:14:00','rafael',448,10969,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1351,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:22:00','rafael',448,10994,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1352,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:23:00','rafael',448,10995,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 19px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1353,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:23:00','rafael',448,10995,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1354,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:25:00','rafael',449,11018,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 19px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1355,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:25:00','rafael',449,11018,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      table.inventory td:nth-child(1) {\n         width: 26%;\n      }\n\n      table.inventory td:nth-child(2) {\n         width: 38%;\n      }\n\n      table.inventory td:nth-child(3) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(4) {\n         text-align: center;\n         width: 12%;\n      }\n\n      table.inventory td:nth-child(5) {\n         text-align: center;\n         width: 12%;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1356,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:26:00','rafael',426,10581,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>N. Factura</span></th>\n               <th><span>Fecha</span></th>\n               <th><span>Cliente</span></th>\n               <th><span>Producto</span></th>\n               <th><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1357,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:29:00','rafael',426,10641,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th width=\"10%\"><span>N. Factura</span></th>\n               <th width=\"20%\"><span>Fecha</span></th>\n               <th width=\"30%\"><span>Cliente</span></th>\n               <th width=\"20%\"><span>Producto</span></th>\n               <th width=\"20%\"><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1358,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:29:00','rafael',426,10641,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th width=\"10%\"><span>N. Factura</span></th>\n               <th width=\"20%\"><span>Fecha</span></th>\n               <th width=\"30%\"><span>Cliente</span></th>\n               <th width=\"30%\"><span>Producto</span></th>\n               <th width=\"10%\"><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1359,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:31:00','rafael',426,10676,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th width=\"8%\"><span>N. Factura</span></th>\n               <th width=\"16%\"><span>Fecha</span></th>\n               <th width=\"34%\"><span>Cliente</span></th>\n               <th width=\"34%\"><span>Producto</span></th>\n               <th width=\"8%\"><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1360,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:31:00','rafael',426,10638,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th width=\"7%\"><span>N. Factura</span></th>\n               <th width=\"17%\"><span>Fecha</span></th>\n               <th width=\"34%\"><span>Cliente</span></th>\n               <th width=\"34%\"><span>Producto</span></th>\n               <th width=\"8%\"><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1361,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:31:00','rafael',426,10636,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th width=\"7%\"><span>Factura</span></th>\n               <th width=\"17%\"><span>Fecha</span></th>\n               <th width=\"34%\"><span>Cliente</span></th>\n               <th width=\"34%\"><span>Producto</span></th>\n               <th width=\"8%\"><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1362,'mod/app_ventas/liquidacion_mecanicos.php','2025-02-14 12:32:00','rafael',426,10635,'<?php\n\n @session_start();\n\nif(!isset($_SESSION[\'PCOSESS_SesionAbierta\'])) {\n	echo \'<head><title>Error</title><style type=\"text/css\"> body { background-color: #000000; color: #7f7f7f; font-family: sans-serif,helvetica; } </style></head><body><table width=\"100%\" height=\"100%\" border=0><tr><td align=center>&#9827; Acceso no autorizado !</td></tr></table></body>\';\n	die();\n}\n\n$otrosCostos = $liq[\'otrosCostos\'];\n$sub_total = $liq[\'subTotal\'];\n$total = $liq[\'total\'];\n// $codigobarra = $factura[\"codigo_gs1\"]; // \"7709998678439\";\n// $BarcodeParent = \"(415)$codigobarra(8020)\" . $factura[\"id\"] . \"(3900)$totalBr(96)$fechaSinRecargoBr\";\n\n$descargar = 0;\n/* if ($PCO_Accion == \"FACTURAS_descargarFactura\")\n    $descargar = 1; */\n\n?>\n\n<html>\n\n<head>\n   <meta charset=\"utf-8\">\n   <title>Factura</title>\n   <style>\n      * {\n         border: 0;\n         box-sizing: content-box;\n         color: inherit;\n         font-family: Verdana;\n         font-size: inherit;\n         font-style: inherit;\n         font-weight: inherit;\n         line-height: inherit;\n         list-style: none;\n         margin: 0;\n         padding: 0;\n         text-decoration: none;\n         vertical-align: top;\n      }\n\n      /* heading */\n      h1 {\n         font: bold 100% sans-serif;\n         letter-spacing: 0.5em;\n         text-align: center;\n         text-transform: uppercase;\n      }\n\n      /* table */\n      table {\n         font-size: 75%;\n         table-layout: fixed;\n         width: 100%;\n         break-after: auto;\n         border-collapse: separate;\n         border-spacing: 3px;\n      }\n\n      th,\n      td {\n         border-width: 1px;\n         padding: 0.5em;\n         position: relative;\n         text-align: center;\n      }\n\n      th,\n      td {\n         border-radius: 0.25em;\n         border-style: solid;\n      }\n\n      th {\n         background: #1f60a0;\n         color: #fff;\n         border-color: #BBB;\n      }\n\n      td {\n         border-color: #DDD;\n      }\n\n      /* page */\n      html {\n         font: 13px/1 \"Open Sans\", sans-serif;\n         overflow: auto;\n         padding: 0.5in;\n      }\n\n      html {\n         background: #999;\n         cursor: default;\n      }\n\n      body {\n         box-sizing: border-box;\n         min-height: 11in;\n         margin: 0 auto;\n         overflow: hidden;\n         padding: 0.5in;\n         width: 8.5in;\n      }\n\n      body {\n         background: #FFF;\n         border-radius: 1px;\n         box-shadow: 0 0 1in -0.25in rgba(0, 0, 0, 0.5);\n      }\n\n      /* header */\n\n      header {\n         margin: 0 0 3em;\n      }\n\n      header:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      header h1 {\n         background: #000;\n         border-radius: 0.25em;\n         color: #FFF;\n         margin: 0 0 1em;\n         padding: 0.5em 0;\n      }\n\n      header address {\n         float: left;\n         font-size: 75%;\n         font-style: normal;\n         line-height: 1.25;\n         margin: 0 1em 1em 0;\n      }\n\n      header address p {\n         margin: 0 0 0.25em;\n      }\n\n      header span,\n      header img {\n         display: block;\n         float: right;\n      }\n\n      header span {\n         margin: 0 0 1em 1em;\n         max-height: 25%;\n         max-width: 60%;\n         position: relative;\n      }\n\n      header img {\n         max-height: 100%;\n         max-width: 100%;\n      }\n\n      header input {\n         cursor: pointer;\n         -ms-filter: \"progid:DXImageTransform.Microsoft.Alpha(Opacity=0)\";\n         height: 100%;\n         left: 0;\n         opacity: 0;\n         position: absolute;\n         top: 0;\n         width: 100%;\n      }\n\n      /* article */\n\n      article,\n      article address,\n      table.meta,\n\n      article:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      article h1 {\n         clip: rect(0 0 0 0);\n         position: absolute;\n      }\n\n      article address {\n         float: left;\n         font-size: 125%;\n      }\n\n      /* table meta & balance */\n\n      table.meta,\n      table.balance {\n         float: right;\n         width: 36%;\n      }\n\n      table.meta:after,\n      table.balance:after {\n         clear: both;\n         content: \"\";\n         display: table;\n      }\n\n      /* table meta */\n\n      table.meta th {\n         width: 40%;\n      }\n\n      table.meta td {\n         width: 60%;\n      }\n\n      table.inventory {\n         margin: 0 0 1.3em;\n      }\n      /* table items */\n\n      table.inventory {\n         clear: both;\n         width: 100%;\n      }\n\n      table.inventory th {\n         font-weight: bold;\n         text-align: center;\n      }\n\n      /* table balance */\n\n      table.balance th {\n         width: 60%;\n         text-align: center;\n      }\n\n      table.balance td {\n         width: 60%;\n         text-align: center;\n      }\n\n      /* aside */\n\n      aside h1 {\n         border: none;\n         border-width: 0 0 1px;\n         margin: 0 0 1em;\n      }\n\n      aside h1 {\n         border-color: #999;\n         border-bottom-style: solid;\n      }\n\n      /* javascript */\n\n      @media print {\n         * {\n            -webkit-print-color-adjust: exact;\n         }\n\n         html {\n            background: none;\n            padding: 0;\n         }\n\n         body {\n            box-shadow: none;\n            margin: 0;\n         }\n\n         span:empty {\n            display: none;\n         }\n      }\n\n      @page {\n         margin: 0;\n         page: letter;\n      }\n   </style>\n    <!--<link rel=\"stylesheet\" href=\"inc/pdfLib/all.min.css\">-->\n    <!--<script type=\"text/javascript\" src=\"inc/pdfLib/html2pdf.bundle.min.js\"></script>-->\n    <!--<script type=\"text/javascript\" src=\"inc/bwip/bwip-js-min.js\"></script>-->\n    \n            <!--<link rel=\"stylesheet\" href=\"https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.15.1/css/all.min.css\">-->\n            <!--<script src=\"https://cdnjs.cloudflare.com/ajax/libs/html2pdf.js/0.10.1/html2pdf.bundle.min.js\"\n              integrity=\"sha512-GsLlZN/3F2ErC5ifS5QtgpiJtWd43JWSuIgh7mbzZ8zBps+dvLusV+eNQATqgA/HdeKFVgA5v3S/cIrLF7QnIg==\"\n              crossorigin=\"anonymous\" referrerpolicy=\"no-referrer\"></script>-->\n</head>\n<body id=\"Invoices\">\n   <article>\n      <table class=\"meta\">\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha inicio</span></th>\n            <td><span><?php echo $liq[\"fecha_inicio\"] ?></span></td>\n         </tr>\n        <tr>\n            <th style=\"width: 120px !important;\"><span>Fecha fin</span></th>\n            <td><span><?php echo $liq[\"fecha_fin\"] ?></span></td>\n         </tr>\n      </table>\n      <address>\n         <!--<p style=\"color:#14406b; font-size: 18px; font-weight: bold;\">AUTONORTE</p>\n         <p style=\"font-size: 12px;\">NIT: 811018300-6</p>\n         <p style=\"font-size: 12px;\">CLL 21 # 8-78 San Jerónimo, Ant</p> -->\n         <BR>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Nombre: </span><?php echo $liq[\"nombre_completo\"] ?><br>\n            <span style=\"font-weight: bold;\">Dirección: </span><?php echo  $liq[\"direccion\"] ?><br>\n         </p>\n      </address>\n\n      <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Valor venta</span></th>\n               <th><span>Valor abono</span></th>\n               <th><span>Valor débito</span></th>\n               <th><span>Seguridad social</span></th>\n            </tr>\n         </thead>\n         <tbody>\n            <tr>\n               <td><span><?php echo $liq[\"valor_venta\"] ?></span></td>\n               <td><span><?php echo  $liq[\"valor_novedad_abonar\"] ?></span></td>\n               <td><span><?php echo $liq[\"valor_novedad_debitar\"] ?></span></td>\n               <td><span><?php echo  $liq[\"seguridad_social\"] ?></span></td>\n            </tr>\n         </tbody>\n      </table>\n      <?php \n        if (count($ventas)) {\n    ?>\n    <br>\n         <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Ventas: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th width=\"6%\"><span>Factura</span></th>\n               <th width=\"17%\"><span>Fecha</span></th>\n               <th width=\"34%\"><span>Cliente</span></th>\n               <th width=\"35%\"><span>Producto</span></th>\n               <th width=\"8%\"><span>Total Mecánico</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($ventas as $venta) {\n             ?>\n            <tr>\n               <td><span><?php echo  $venta[\"id\"] ?></span></td>\n               <td><span><?php echo  $venta[\"fecha\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre_completo\"] ?></span></td>\n               <td><span><?php echo  $venta[\"nombre\"] ?></span></td>\n               <td><span><?php echo  $venta[\"total_mecanico\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         <br>\n        <?php \n        if (count($novedades)) {\n    ?>\n    <br>\n        <p style=\"font-size: 12px;\">\n            <span style=\"font-weight: bold;\">Novedades: </span>\n         </p>\n        <table class=\"inventory\">\n         <thead>\n            <tr>\n               <th><span>Fecha</span></th>\n               <th><span>Tipo novedad</span></th>\n               <th><span>Valor novedad</span></th>\n            </tr>\n         </thead>\n         <tbody>\n         <?php\n         foreach ($novedades as $novedad) {\n             ?>\n            <tr>\n               <td><span><?php echo  $novedad[\"tipo_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"valor_novedad\"] ?></span></td>\n               <td><span><?php echo  $novedad[\"fecha\"] ?></span></td>\n            </tr>\n        <?php\n         }\n      }\n         ?>\n         </tbody>\n      </table>\n         </tbody>\n      </table>\n\n      <table class=\"balance\" style=\"font-size: 11px;\">\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>SUBTOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $sub_total ?></span></th>\n         </tr>\n         <tr>\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL COBROS</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $otrosCostos ?></span></th>\n         </tr>\n         <tr style=\"color: #fff; font-size: 12px;\">\n            <td style=\"background-color: #1f60a0; font-weight: bold;\"><span>TOTAL</span></td>\n            <th style=\"background-color: #14406b;\"><span><?php echo $total ?></span></th>\n         </tr>\n       \n            \n        </tr>\n         </tr>\n      </table>\n      </div>\n   </article>\n\n</body>\n</html>','A'),(1363,'mod/app_ventas/index.php','2025-02-14 12:44:00','rafael',310,14243,'<?php\n\nfunction formatNumber($n) {\n    return \"$\".number_format($n, 2, \",\", \".\");\n}\n\nfunction calcularTotalVenta($id, $returnArr = \"\") {\n    $venta = PCO_EjecutarSQL(\"\n        SELECT SUM(precio * cantidad) as total, SUM(precio * iva/100) iva\n        FROM app_ventas_detalle\n        WHERE id_venta = \'$id\' GROUP BY id_venta\n    \")->fetch();\n    $ventaMecanico = PCO_EjecutarSQL(\"\n        SELECT TRUNCATE(SUM(vd.precio * vd.cantidad * p.porcentaje_mecanico/100), 2)\n        FROM app_ventas_detalle vd, app_ventas v, app_productos p\n        WHERE vd.id_venta=v.id AND vd.id_producto=p.id AND  vd.id_venta = \'$id\' AND v.id_mecanico <> 0 GROUP BY vd.id_venta\n    \")->fetchColumn();\n    $total = $venta[\"total\"] ? $venta[\"total\"] : 0;\n    $iva = $venta[\"iva\"] ? $venta[\"iva\"] : 0;\n    PCO_EjecutarSQLUnaria(\"UPDATE app_ventas SET total = $total, iva = $iva, total_mecanico=\'$ventaMecanico\' WHERE id = $id \");\n    if($returnArr)\n        return $venta;\n    return \'\"total\": \' . $total . \', \"iva\": \' . $iva;\n}\n\nif($PCO_Accion == \"VENTA_ingresarRealizarVenta\") {\n    $ventaAbierta = PCO_EjecutarSQL(\"\n        SELECT id, id_cliente, total, iva, placa\n        FROM app_ventas\n        WHERE id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $id_venta = $ventaAbierta[\"id\"] || \"\";\n    if($id_venta) {\n        $total = number_format($ventaAbierta[\"total\"], 2);\n        $iva = number_format($ventaAbierta[\"iva\"], 2);\n        $id_cliente = $ventaAbierta[\"id_cliente\"];\n    }\n\n    PCO_CargarFormulario(8, 1, \"id\", $id_venta);\n}\n\nif($PCO_Accion == \"VENTA_agregarProductoCrearOC\") {\n        //crear cliente en caso de que no llegue id_cliente\n        if(!$id_cliente) {\n            PCO_EjecutarSQLUnaria(\"INSERT INTO app_clientes (nombre_completo, numero_documento, telefono) VALUES (?,?,?) \",\n                \"$nombre_completo$_SeparadorCampos_$numero_documento$_SeparadorCampos_$telefono\"\n            );\n            // $id_cliente = PCO_ObtenerUltimoIDInsertado();\n            $id_cliente = PCO_EjecutarSQL(\"\n                SELECT id\n                FROM app_clientes\n                WHERE numero_documento=\'$numero_documento\' AND telefono=\'$telefono\' AND \'$nombre_completo\'\n            \")->fetchColumn();\n        }\n        $todayMysql = date(\"Y-m-d H:i:s\");\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas (id_cliente, usuario, fecha, placa, id_mecanico, tipo_venta) VALUES (?,?,?,?,?,?) \", \"$id_cliente$_SeparadorCampos_$PCOSESS_LoginUsuario$_SeparadorCampos_$todayMysql$_SeparadorCampos_$placa$_SeparadorCampos_$id_mecanico$_SeparadorCampos_$tipo_venta\");\n        $id = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_ventas\n            WHERE fecha=\'$todayMysql\' AND usuario=\'$PCOSESS_LoginUsuario\' AND id_cliente = \'$id_cliente\'\n        \")->fetchColumn();\n        // $id = PCO_ObtenerUltimoIDInsertado();\n\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva, inventario\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precio$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos_$hora_inicio$_SeparadorCampos_$hora_fin$_SeparadorCampos_$guaje\");\n        calcularTotalVenta($id);\n        \n        /* $total = number_format($result[\"total\"], 2);\n        $iva = number_format($result[\"iva\"], 2); */\n\n        echo \'<script type=\"text/javascript\">\n        	document.FRMBASEINFORME.PCO_Accion.value=\"PCO_CargarObjeto\";\n        	document.FRMBASEINFORME.PCO_Objeto.value=\"frm:8:1:id:\'.$id.\'\";\n        	document.FRMBASEINFORME.Precarga_EstilosBS.value=\"1\";\n        	document.FRMBASEINFORME.Presentar_FullScreen.value=\"0\";\n        	document.FRMBASEINFORME.target=\"_self\";\n        	document.FRMBASEINFORME.submit();\n    	 </script>\';\n    }\n}\n\nif($PCO_Accion == \"VENTA_agregarProducto\") {\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precioVenta$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos$hora_inicio$_SeparadorCampos$hora_fin$_SeparadorCampos$guaje\");\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se ha encontrado el producto seleccionado\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_consultarTotalVenta\") {\n    if($id) {\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se encontro la venta\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_eliminarProducto\") {\n\n    if($id_venta_detalle && $id_venta) {\n        $producto = PCO_EjecutarSQL(\"\n            SELECT p.inventario, vd.cantidad, p.id\n            FROM app_ventas_detalle vd, app_productos p\n            WHERE vd.id_producto = p.id AND vd.id = \'$id_venta_detalle\'\n        \")->fetch();\n        //Restablecemos el inventario\n        $inventarioNew = $producto[\"inventario\"] + $producto[\"cantidad\"];\n        PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"DELETE FROM app_ventas_detalle WHERE id_venta = $id_venta AND id = $id_venta_detalle\");\n        $result = calcularTotalVenta($id_venta);\n        print_r(\'{\"success\": true, \"msg\": \"Se ha eliminado el producto exitosamente\", \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se pudo eliminar el producto\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_actualizarProductoVenta\") {\n    if($id) {\n        PCO_EjecutarSQLUnaria(\"UPDATE app_ventas_detalle SET cantidad=\'$cantidad\', precio=\'$precio\' WHERE id = \'$id\'\");\n        echo 1;\n        die();\n    }\n    echo 0;\n    die();\n}\n\nif($PCO_Accion == \"VENTA_imprimirFactura\") {\n    if($PCO_Valor)\n        $id = $PCO_Valor;\n    if($id) {\n        include_once \"imprimirFactura.php\";\n    }\n}\n\nif($PCO_Accion == \"VENTA_generarLiquidacionMecanicos\") {\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico <> 0 AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetchAll();\n    foreach ($ventas as $venta) {\n        $valor_novedad = PCO_EjecutarSQL(\"\n            SELECT  \n                SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n                SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n            FROM app_novedades_mecanicos\n            WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\'\n                AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n            GROUP BY id_mecanico\n        \")->fetch();\n\n        PCO_EjecutarSQLUnaria(\"\n            INSERT INTO app_liquidacion_mecanicos_enc (id_mecanico, fecha_inicio, fecha_fin, fecha, valor_venta, valor_novedad_abonar, valor_novedad_debitar, seguridad_social, usuario) VALUES (?,?,?,?,?,?,?,?,?) \",\n            $venta[\"id_mecanico\"].\"$_SeparadorCampos_$fecha_inicio$_SeparadorCampos_$fecha_fin$_SeparadorCampos_$PCO_FechaOperacionGuiones$_SeparadorCampos_\".$venta[\"Total\"].\"$_SeparadorCampos_\".$valor_novedad[\'abonar\'].\"$_SeparadorCampos_\".$valor_novedad[\'debitar\'].\"$_SeparadorCampos_\".$venta[\"seguridad_social\"].\"$_SeparadorCampos_$PCOSESS_LoginUsuario\"\n        );\n        \n        $idLiq = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_liquidacion_mecanicos_enc\n            WHERE id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND fecha=\'$PCO_FechaOperacionGuiones\' AND usuario = \'$PCOSESS_LoginUsuario\'\n            ORDER BY id desc LIMIT 1\n        \")->fetchColumn();\n\n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_novedades_mecanicos \n            SET id_liquidacion=\'$idLiq\'\n            WHERE \n                fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n        \n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_ventas \n            SET id_liquidacion=\'$idLiq\'\n            WHERE app_ventas.fecha >= \'$fecha_inicio 00:00:00\' AND app_ventas.fecha <= \'$fecha_fin 23:59:59\' AND app_ventas.estado = 1 AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n    }\n    PCO_CargarFormulario(14);\n}\n\nif($PCO_Accion == \"VENTAS_PreVisualizarLiquidacion\") {\n    $idMecanico = $id_registro_datos;\n\n    $liq[\'fecha_inicio\'] = $fecha_inicio;\n    $liq[\'fecha_fin\'] = $fecha_fin;\n\n    $ventasLiq = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico = \'$idMecanico\' AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetch();\n    $liq[\'valor_venta\'] = $ventasLiq[\'Total\'];\n    //Mecanico\n    $liq[\'nombre_completo\'] = $ventasLiq[\'nombre_completo\'];\n    $liq[\'cedula\'] = $ventasLiq[\'cedula\'];\n    $liq[\'telefono\'] = $ventasLiq[\'telefono\'];\n    $liq[\'direccion\'] = $ventasLiq[\'direccion\'];\n    $liq[\'correo\'] = $ventasLiq[\'correo\'];\n    $liq[\'seguridad_social\'] = $ventasLiq[\'seguridad_social\'];\n    \n\n    $novedadLiq = PCO_EjecutarSQL(\"\n        SELECT  \n            SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n            SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n        GROUP BY id_mecanico\n    \")->fetch();\n\n    $liq[\'valor_novedad_abonar\'] = $novedadLiq[\'abonar\'] ? $novedadLiq[\'abonar\'] : 0;\n    $liq[\'valor_novedad_debitar\'] = $novedadLiq[\'debitar\'] ? $novedadLiq[\'debitar\'] : 0;\n    \n    $total = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'] - $liq[\'valor_novedad_debitar\'] - $liq[\'seguridad_social\'];\n    $liq[\'total\'] = formatNumber($total);\n    $subTotal = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'];\n    $liq[\'subTotal\'] = formatNumber($subTotal);\n    $otrosCostos = $liq[\'valor_novedad_debitar\'] + $liq[\'seguridad_social\'];\n    $liq[\'otrosCostos\'] = formatNumber(-$otrosCostos);\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente \n        AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.id_mecanico=\'$idMecanico\' AND v.estado = 1 AND v.id_liquidacion=0\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}\n\nif($PCO_Accion == \"VENTAS_verLiquidacion\") {\n    $liq = PCO_EjecutarSQL(\"\n        SELECT l.*, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo,\n            CONCAT(\'$\',FORMAT((l.valor_venta + l.valor_novedad_abonar - l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) total,\n            CONCAT(\'$\',FORMAT(l.valor_venta + l.valor_novedad_abonar,2,\'de_DE\')) subTotal,\n            CONCAT(\'$\',FORMAT((-l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) otrosCostos\n        FROM app_liquidacion_mecanicos_enc l,app_mecanicos m \n        WHERE l.id_mecanico = m.id AND l.id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente AND v.id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}','A'),(1364,'mod/app_ventas/index.php','2025-02-14 12:47:00','rafael',315,14540,'<?php\n\nfunction formatNumber($n) {\n    return \"$\".number_format($n, 2, \",\", \".\");\n}\n\nfunction calcularTotalVenta($id, $returnArr = \"\") {\n    $venta = PCO_EjecutarSQL(\"\n        SELECT SUM(precio * cantidad) as total, SUM(precio * iva/100) iva\n        FROM app_ventas_detalle\n        WHERE id_venta = \'$id\' GROUP BY id_venta\n    \")->fetch();\n    $ventaMecanico = PCO_EjecutarSQL(\"\n        SELECT TRUNCATE(SUM(vd.precio * vd.cantidad * p.porcentaje_mecanico/100), 2)\n        FROM app_ventas_detalle vd, app_ventas v, app_productos p\n        WHERE vd.id_venta=v.id AND vd.id_producto=p.id AND  vd.id_venta = \'$id\' AND v.id_mecanico <> 0 GROUP BY vd.id_venta\n    \")->fetchColumn();\n    $total = $venta[\"total\"] ? $venta[\"total\"] : 0;\n    $iva = $venta[\"iva\"] ? $venta[\"iva\"] : 0;\n    PCO_EjecutarSQLUnaria(\"UPDATE app_ventas SET total = $total, iva = $iva, total_mecanico=\'$ventaMecanico\' WHERE id = $id \");\n    if($returnArr)\n        return $venta;\n    return \'\"total\": \' . $total . \', \"iva\": \' . $iva;\n}\n\nif($PCO_Accion == \"VENTA_ingresarRealizarVenta\") {\n    $ventaAbierta = PCO_EjecutarSQL(\"\n        SELECT id, id_cliente, total, iva, placa\n        FROM app_ventas\n        WHERE id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $id_venta = $ventaAbierta[\"id\"] || \"\";\n    if($id_venta) {\n        $total = number_format($ventaAbierta[\"total\"], 2);\n        $iva = number_format($ventaAbierta[\"iva\"], 2);\n        $id_cliente = $ventaAbierta[\"id_cliente\"];\n    }\n\n    PCO_CargarFormulario(8, 1, \"id\", $id_venta);\n}\n\nif($PCO_Accion == \"VENTA_agregarProductoCrearOC\") {\n        //crear cliente en caso de que no llegue id_cliente\n        if(!$id_cliente) {\n            PCO_EjecutarSQLUnaria(\"INSERT INTO app_clientes (nombre_completo, numero_documento, telefono) VALUES (?,?,?) \",\n                \"$nombre_completo$_SeparadorCampos_$numero_documento$_SeparadorCampos_$telefono\"\n            );\n            // $id_cliente = PCO_ObtenerUltimoIDInsertado();\n            $id_cliente = PCO_EjecutarSQL(\"\n                SELECT id\n                FROM app_clientes\n                WHERE numero_documento=\'$numero_documento\' AND telefono=\'$telefono\' AND \'$nombre_completo\'\n            \")->fetchColumn();\n        }\n        $todayMysql = date(\"Y-m-d H:i:s\");\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas (id_cliente, usuario, fecha, placa, id_mecanico, tipo_venta) VALUES (?,?,?,?,?,?) \", \"$id_cliente$_SeparadorCampos_$PCOSESS_LoginUsuario$_SeparadorCampos_$todayMysql$_SeparadorCampos_$placa$_SeparadorCampos_$id_mecanico$_SeparadorCampos_$tipo_venta\");\n        $id = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_ventas\n            WHERE fecha=\'$todayMysql\' AND usuario=\'$PCOSESS_LoginUsuario\' AND id_cliente = \'$id_cliente\'\n        \")->fetchColumn();\n        // $id = PCO_ObtenerUltimoIDInsertado();\n\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva, inventario\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precio$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos_$hora_inicio$_SeparadorCampos_$hora_fin$_SeparadorCampos_$guaje\");\n        calcularTotalVenta($id);\n        \n        /* $total = number_format($result[\"total\"], 2);\n        $iva = number_format($result[\"iva\"], 2); */\n\n        echo \'<script type=\"text/javascript\">\n        	document.FRMBASEINFORME.PCO_Accion.value=\"PCO_CargarObjeto\";\n        	document.FRMBASEINFORME.PCO_Objeto.value=\"frm:8:1:id:\'.$id.\'\";\n        	document.FRMBASEINFORME.Precarga_EstilosBS.value=\"1\";\n        	document.FRMBASEINFORME.Presentar_FullScreen.value=\"0\";\n        	document.FRMBASEINFORME.target=\"_self\";\n        	document.FRMBASEINFORME.submit();\n    	 </script>\';\n    }\n}\n\nif($PCO_Accion == \"VENTA_agregarProducto\") {\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precioVenta$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos$hora_inicio$_SeparadorCampos$hora_fin$_SeparadorCampos$guaje\");\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se ha encontrado el producto seleccionado\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_consultarTotalVenta\") {\n    if($id) {\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se encontro la venta\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_eliminarProducto\") {\n\n    if($id_venta_detalle && $id_venta) {\n        $producto = PCO_EjecutarSQL(\"\n            SELECT p.inventario, vd.cantidad, p.id\n            FROM app_ventas_detalle vd, app_productos p\n            WHERE vd.id_producto = p.id AND vd.id = \'$id_venta_detalle\'\n        \")->fetch();\n        //Restablecemos el inventario\n        $inventarioNew = $producto[\"inventario\"] + $producto[\"cantidad\"];\n        PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"DELETE FROM app_ventas_detalle WHERE id_venta = $id_venta AND id = $id_venta_detalle\");\n        $result = calcularTotalVenta($id_venta);\n        print_r(\'{\"success\": true, \"msg\": \"Se ha eliminado el producto exitosamente\", \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se pudo eliminar el producto\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_actualizarProductoVenta\") {\n    if($id) {\n        PCO_EjecutarSQLUnaria(\"UPDATE app_ventas_detalle SET cantidad=\'$cantidad\', precio=\'$precio\' WHERE id = \'$id\'\");\n        echo 1;\n        die();\n    }\n    echo 0;\n    die();\n}\n\nif($PCO_Accion == \"VENTA_imprimirFactura\") {\n    if($PCO_Valor)\n        $id = $PCO_Valor;\n    if($id) {\n        include_once \"imprimirFactura.php\";\n    }\n}\n\nif($PCO_Accion == \"VENTA_generarLiquidacionMecanicos\") {\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico <> 0 AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetchAll();\n    foreach ($ventas as $venta) {\n        $valor_novedad = PCO_EjecutarSQL(\"\n            SELECT  \n                SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n                SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n            FROM app_novedades_mecanicos\n            WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\'\n                AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n            GROUP BY id_mecanico\n        \")->fetch();\n\n        PCO_EjecutarSQLUnaria(\"\n            INSERT INTO app_liquidacion_mecanicos_enc (id_mecanico, fecha_inicio, fecha_fin, fecha, valor_venta, valor_novedad_abonar, valor_novedad_debitar, seguridad_social, usuario) VALUES (?,?,?,?,?,?,?,?,?) \",\n            $venta[\"id_mecanico\"].\"$_SeparadorCampos_$fecha_inicio$_SeparadorCampos_$fecha_fin$_SeparadorCampos_$PCO_FechaOperacionGuiones$_SeparadorCampos_\".$venta[\"Total\"].\"$_SeparadorCampos_\".$valor_novedad[\'abonar\'].\"$_SeparadorCampos_\".$valor_novedad[\'debitar\'].\"$_SeparadorCampos_\".$venta[\"seguridad_social\"].\"$_SeparadorCampos_$PCOSESS_LoginUsuario\"\n        );\n        \n        $idLiq = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_liquidacion_mecanicos_enc\n            WHERE id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND fecha=\'$PCO_FechaOperacionGuiones\' AND usuario = \'$PCOSESS_LoginUsuario\'\n            ORDER BY id desc LIMIT 1\n        \")->fetchColumn();\n\n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_novedades_mecanicos \n            SET id_liquidacion=\'$idLiq\'\n            WHERE \n                fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n        \n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_ventas \n            SET id_liquidacion=\'$idLiq\'\n            WHERE app_ventas.fecha >= \'$fecha_inicio 00:00:00\' AND app_ventas.fecha <= \'$fecha_fin 23:59:59\' AND app_ventas.estado = 1 AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n    }\n    PCO_CargarFormulario(14);\n}\n\nif($PCO_Accion == \"VENTAS_PreVisualizarLiquidacion\") {\n    $idMecanico = $id_registro_datos;\n\n    $liq[\'fecha_inicio\'] = $fecha_inicio;\n    $liq[\'fecha_fin\'] = $fecha_fin;\n\n    $ventasLiq = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico = \'$idMecanico\' AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetch();\n    $liq[\'valor_venta\'] = $ventasLiq[\'Total\'];\n    //Mecanico\n    $liq[\'nombre_completo\'] = $ventasLiq[\'nombre_completo\'];\n    $liq[\'cedula\'] = $ventasLiq[\'cedula\'];\n    $liq[\'telefono\'] = $ventasLiq[\'telefono\'];\n    $liq[\'direccion\'] = $ventasLiq[\'direccion\'];\n    $liq[\'correo\'] = $ventasLiq[\'correo\'];\n    $liq[\'seguridad_social\'] = $ventasLiq[\'seguridad_social\'];\n    \n\n    $novedadLiq = PCO_EjecutarSQL(\"\n        SELECT  \n            SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n            SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n        GROUP BY id_mecanico\n    \")->fetch();\n\n    $liq[\'valor_novedad_abonar\'] = $novedadLiq[\'abonar\'] ? $novedadLiq[\'abonar\'] : 0;\n    $liq[\'valor_novedad_debitar\'] = $novedadLiq[\'debitar\'] ? $novedadLiq[\'debitar\'] : 0;\n    \n    $total = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'] - $liq[\'valor_novedad_debitar\'] - $liq[\'seguridad_social\'];\n    $liq[\'total\'] = formatNumber($total);\n    $subTotal = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'];\n    $liq[\'subTotal\'] = formatNumber($subTotal);\n    $otrosCostos = $liq[\'valor_novedad_debitar\'] + $liq[\'seguridad_social\'];\n    $liq[\'otrosCostos\'] = formatNumber(-$otrosCostos);\n    \n    $liq[\'seguridad_social\'] = formatNumber($liq[\'seguridad_social\']);\n    $liq[\'valor_venta\'] = formatNumber($liq[\'valor_venta\']);\n    $liq[\'valor_novedad_abonar\'] = formatNumber($liq[\'valor_novedad_abonar\']);\n    $liq[\'valor_novedad_debitar\'] = formatNumber($liq[\'valor_novedad_debitar\']);\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente \n        AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.id_mecanico=\'$idMecanico\' AND v.estado = 1 AND v.id_liquidacion=0\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}\n\nif($PCO_Accion == \"VENTAS_verLiquidacion\") {\n    $liq = PCO_EjecutarSQL(\"\n        SELECT l.*, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo,\n            CONCAT(\'$\',FORMAT((l.valor_venta + l.valor_novedad_abonar - l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) total,\n            CONCAT(\'$\',FORMAT(l.valor_venta + l.valor_novedad_abonar,2,\'de_DE\')) subTotal,\n            CONCAT(\'$\',FORMAT((-l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) otrosCostos\n        FROM app_liquidacion_mecanicos_enc l,app_mecanicos m \n        WHERE l.id_mecanico = m.id AND l.id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente AND v.id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}','A'),(1365,'mod/app_ventas/index.php','2025-02-14 12:49:00','rafael',316,14610,'<?php\n\nfunction formatNumber($n) {\n    return \"$\".number_format($n, 2, \",\", \".\");\n}\n\nfunction calcularTotalVenta($id, $returnArr = \"\") {\n    $venta = PCO_EjecutarSQL(\"\n        SELECT SUM(precio * cantidad) as total, SUM(precio * iva/100) iva\n        FROM app_ventas_detalle\n        WHERE id_venta = \'$id\' GROUP BY id_venta\n    \")->fetch();\n    $ventaMecanico = PCO_EjecutarSQL(\"\n        SELECT TRUNCATE(SUM(vd.precio * vd.cantidad * p.porcentaje_mecanico/100), 2)\n        FROM app_ventas_detalle vd, app_ventas v, app_productos p\n        WHERE vd.id_venta=v.id AND vd.id_producto=p.id AND  vd.id_venta = \'$id\' AND v.id_mecanico <> 0 GROUP BY vd.id_venta\n    \")->fetchColumn();\n    $total = $venta[\"total\"] ? $venta[\"total\"] : 0;\n    $iva = $venta[\"iva\"] ? $venta[\"iva\"] : 0;\n    PCO_EjecutarSQLUnaria(\"UPDATE app_ventas SET total = $total, iva = $iva, total_mecanico=\'$ventaMecanico\' WHERE id = $id \");\n    if($returnArr)\n        return $venta;\n    return \'\"total\": \' . $total . \', \"iva\": \' . $iva;\n}\n\nif($PCO_Accion == \"VENTA_ingresarRealizarVenta\") {\n    $ventaAbierta = PCO_EjecutarSQL(\"\n        SELECT id, id_cliente, total, iva, placa\n        FROM app_ventas\n        WHERE id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $id_venta = $ventaAbierta[\"id\"] || \"\";\n    if($id_venta) {\n        $total = number_format($ventaAbierta[\"total\"], 2);\n        $iva = number_format($ventaAbierta[\"iva\"], 2);\n        $id_cliente = $ventaAbierta[\"id_cliente\"];\n    }\n\n    PCO_CargarFormulario(8, 1, \"id\", $id_venta);\n}\n\nif($PCO_Accion == \"VENTA_agregarProductoCrearOC\") {\n        //crear cliente en caso de que no llegue id_cliente\n        if(!$id_cliente) {\n            PCO_EjecutarSQLUnaria(\"INSERT INTO app_clientes (nombre_completo, numero_documento, telefono) VALUES (?,?,?) \",\n                \"$nombre_completo$_SeparadorCampos_$numero_documento$_SeparadorCampos_$telefono\"\n            );\n            // $id_cliente = PCO_ObtenerUltimoIDInsertado();\n            $id_cliente = PCO_EjecutarSQL(\"\n                SELECT id\n                FROM app_clientes\n                WHERE numero_documento=\'$numero_documento\' AND telefono=\'$telefono\' AND \'$nombre_completo\'\n            \")->fetchColumn();\n        }\n        $todayMysql = date(\"Y-m-d H:i:s\");\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas (id_cliente, usuario, fecha, placa, id_mecanico, tipo_venta) VALUES (?,?,?,?,?,?) \", \"$id_cliente$_SeparadorCampos_$PCOSESS_LoginUsuario$_SeparadorCampos_$todayMysql$_SeparadorCampos_$placa$_SeparadorCampos_$id_mecanico$_SeparadorCampos_$tipo_venta\");\n        $id = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_ventas\n            WHERE fecha=\'$todayMysql\' AND usuario=\'$PCOSESS_LoginUsuario\' AND id_cliente = \'$id_cliente\'\n        \")->fetchColumn();\n        // $id = PCO_ObtenerUltimoIDInsertado();\n\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva, inventario\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precio$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos_$hora_inicio$_SeparadorCampos_$hora_fin$_SeparadorCampos_$guaje\");\n        calcularTotalVenta($id);\n        \n        /* $total = number_format($result[\"total\"], 2);\n        $iva = number_format($result[\"iva\"], 2); */\n\n        echo \'<script type=\"text/javascript\">\n        	document.FRMBASEINFORME.PCO_Accion.value=\"PCO_CargarObjeto\";\n        	document.FRMBASEINFORME.PCO_Objeto.value=\"frm:8:1:id:\'.$id.\'\";\n        	document.FRMBASEINFORME.Precarga_EstilosBS.value=\"1\";\n        	document.FRMBASEINFORME.Presentar_FullScreen.value=\"0\";\n        	document.FRMBASEINFORME.target=\"_self\";\n        	document.FRMBASEINFORME.submit();\n    	 </script>\';\n    }\n}\n\nif($PCO_Accion == \"VENTA_agregarProducto\") {\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precioVenta$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos$hora_inicio$_SeparadorCampos$hora_fin$_SeparadorCampos$guaje\");\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se ha encontrado el producto seleccionado\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_consultarTotalVenta\") {\n    if($id) {\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se encontro la venta\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_eliminarProducto\") {\n\n    if($id_venta_detalle && $id_venta) {\n        $producto = PCO_EjecutarSQL(\"\n            SELECT p.inventario, vd.cantidad, p.id\n            FROM app_ventas_detalle vd, app_productos p\n            WHERE vd.id_producto = p.id AND vd.id = \'$id_venta_detalle\'\n        \")->fetch();\n        //Restablecemos el inventario\n        $inventarioNew = $producto[\"inventario\"] + $producto[\"cantidad\"];\n        PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"DELETE FROM app_ventas_detalle WHERE id_venta = $id_venta AND id = $id_venta_detalle\");\n        $result = calcularTotalVenta($id_venta);\n        print_r(\'{\"success\": true, \"msg\": \"Se ha eliminado el producto exitosamente\", \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se pudo eliminar el producto\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_actualizarProductoVenta\") {\n    if($id) {\n        PCO_EjecutarSQLUnaria(\"UPDATE app_ventas_detalle SET cantidad=\'$cantidad\', precio=\'$precio\' WHERE id = \'$id\'\");\n        echo 1;\n        die();\n    }\n    echo 0;\n    die();\n}\n\nif($PCO_Accion == \"VENTA_imprimirFactura\") {\n    if($PCO_Valor)\n        $id = $PCO_Valor;\n    if($id) {\n        include_once \"imprimirFactura.php\";\n    }\n}\n\nif($PCO_Accion == \"VENTA_generarLiquidacionMecanicos\") {\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico <> 0 AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetchAll();\n    foreach ($ventas as $venta) {\n        $valor_novedad = PCO_EjecutarSQL(\"\n            SELECT  \n                SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n                SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n            FROM app_novedades_mecanicos\n            WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\'\n                AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n            GROUP BY id_mecanico\n        \")->fetch();\n\n        PCO_EjecutarSQLUnaria(\"\n            INSERT INTO app_liquidacion_mecanicos_enc (id_mecanico, fecha_inicio, fecha_fin, fecha, valor_venta, valor_novedad_abonar, valor_novedad_debitar, seguridad_social, usuario) VALUES (?,?,?,?,?,?,?,?,?) \",\n            $venta[\"id_mecanico\"].\"$_SeparadorCampos_$fecha_inicio$_SeparadorCampos_$fecha_fin$_SeparadorCampos_$PCO_FechaOperacionGuiones$_SeparadorCampos_\".$venta[\"Total\"].\"$_SeparadorCampos_\".$valor_novedad[\'abonar\'].\"$_SeparadorCampos_\".$valor_novedad[\'debitar\'].\"$_SeparadorCampos_\".$venta[\"seguridad_social\"].\"$_SeparadorCampos_$PCOSESS_LoginUsuario\"\n        );\n        \n        $idLiq = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_liquidacion_mecanicos_enc\n            WHERE id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND fecha=\'$PCO_FechaOperacionGuiones\' AND usuario = \'$PCOSESS_LoginUsuario\'\n            ORDER BY id desc LIMIT 1\n        \")->fetchColumn();\n\n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_novedades_mecanicos \n            SET id_liquidacion=\'$idLiq\'\n            WHERE \n                fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n        \n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_ventas \n            SET id_liquidacion=\'$idLiq\'\n            WHERE app_ventas.fecha >= \'$fecha_inicio 00:00:00\' AND app_ventas.fecha <= \'$fecha_fin 23:59:59\' AND app_ventas.estado = 1 AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n    }\n    PCO_CargarFormulario(14);\n}\n\nif($PCO_Accion == \"VENTAS_PreVisualizarLiquidacion\") {\n    $idMecanico = $id_registro_datos;\n\n    $liq[\'fecha_inicio\'] = $fecha_inicio;\n    $liq[\'fecha_fin\'] = $fecha_fin;\n\n    $ventasLiq = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico = \'$idMecanico\' AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetch();\n    $liq[\'valor_venta\'] = $ventasLiq[\'Total\'];\n    //Mecanico\n    $liq[\'nombre_completo\'] = $ventasLiq[\'nombre_completo\'];\n    $liq[\'cedula\'] = $ventasLiq[\'cedula\'];\n    $liq[\'telefono\'] = $ventasLiq[\'telefono\'];\n    $liq[\'direccion\'] = $ventasLiq[\'direccion\'];\n    $liq[\'correo\'] = $ventasLiq[\'correo\'];\n    $liq[\'seguridad_social\'] = $ventasLiq[\'seguridad_social\'];\n    \n\n    $novedadLiq = PCO_EjecutarSQL(\"\n        SELECT  \n            SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n            SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n        GROUP BY id_mecanico\n    \")->fetch();\n\n    $liq[\'valor_novedad_abonar\'] = $novedadLiq[\'abonar\'] ? $novedadLiq[\'abonar\'] : 0;\n    $liq[\'valor_novedad_debitar\'] = $novedadLiq[\'debitar\'] ? $novedadLiq[\'debitar\'] : 0;\n    \n    $total = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'] - $liq[\'valor_novedad_debitar\'] - $liq[\'seguridad_social\'];\n    $liq[\'total\'] = formatNumber($total);\n    $subTotal = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'];\n    $liq[\'subTotal\'] = formatNumber($subTotal);\n    $otrosCostos = $liq[\'valor_novedad_debitar\'] + $liq[\'seguridad_social\'];\n    $liq[\'otrosCostos\'] = formatNumber(-$otrosCostos);\n    \n    $liq[\'seguridad_social\'] = formatNumber($liq[\'seguridad_social\']);\n    $liq[\'valor_venta\'] = formatNumber($liq[\'valor_venta\']);\n    $liq[\'valor_novedad_abonar\'] = formatNumber($liq[\'valor_novedad_abonar\']);\n    $liq[\'valor_novedad_debitar\'] = formatNumber($liq[\'valor_novedad_debitar\']);\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo,\n            CONCAT(\'$\',FORMAT(v.valor_venta,2,\'de_DE\')) valor_venta,\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente \n        AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.id_mecanico=\'$idMecanico\' AND v.estado = 1 AND v.id_liquidacion=0\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}\n\nif($PCO_Accion == \"VENTAS_verLiquidacion\") {\n    $liq = PCO_EjecutarSQL(\"\n        SELECT l.*, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo,\n            CONCAT(\'$\',FORMAT((l.valor_venta + l.valor_novedad_abonar - l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) total,\n            CONCAT(\'$\',FORMAT(l.valor_venta + l.valor_novedad_abonar,2,\'de_DE\')) subTotal,\n            CONCAT(\'$\',FORMAT((-l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) otrosCostos\n        FROM app_liquidacion_mecanicos_enc l,app_mecanicos m \n        WHERE l.id_mecanico = m.id AND l.id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente AND v.id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}','A'),(1366,'mod/app_ventas/index.php','2025-02-14 12:49:00','rafael',316,14609,'<?php\n\nfunction formatNumber($n) {\n    return \"$\".number_format($n, 2, \",\", \".\");\n}\n\nfunction calcularTotalVenta($id, $returnArr = \"\") {\n    $venta = PCO_EjecutarSQL(\"\n        SELECT SUM(precio * cantidad) as total, SUM(precio * iva/100) iva\n        FROM app_ventas_detalle\n        WHERE id_venta = \'$id\' GROUP BY id_venta\n    \")->fetch();\n    $ventaMecanico = PCO_EjecutarSQL(\"\n        SELECT TRUNCATE(SUM(vd.precio * vd.cantidad * p.porcentaje_mecanico/100), 2)\n        FROM app_ventas_detalle vd, app_ventas v, app_productos p\n        WHERE vd.id_venta=v.id AND vd.id_producto=p.id AND  vd.id_venta = \'$id\' AND v.id_mecanico <> 0 GROUP BY vd.id_venta\n    \")->fetchColumn();\n    $total = $venta[\"total\"] ? $venta[\"total\"] : 0;\n    $iva = $venta[\"iva\"] ? $venta[\"iva\"] : 0;\n    PCO_EjecutarSQLUnaria(\"UPDATE app_ventas SET total = $total, iva = $iva, total_mecanico=\'$ventaMecanico\' WHERE id = $id \");\n    if($returnArr)\n        return $venta;\n    return \'\"total\": \' . $total . \', \"iva\": \' . $iva;\n}\n\nif($PCO_Accion == \"VENTA_ingresarRealizarVenta\") {\n    $ventaAbierta = PCO_EjecutarSQL(\"\n        SELECT id, id_cliente, total, iva, placa\n        FROM app_ventas\n        WHERE id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $id_venta = $ventaAbierta[\"id\"] || \"\";\n    if($id_venta) {\n        $total = number_format($ventaAbierta[\"total\"], 2);\n        $iva = number_format($ventaAbierta[\"iva\"], 2);\n        $id_cliente = $ventaAbierta[\"id_cliente\"];\n    }\n\n    PCO_CargarFormulario(8, 1, \"id\", $id_venta);\n}\n\nif($PCO_Accion == \"VENTA_agregarProductoCrearOC\") {\n        //crear cliente en caso de que no llegue id_cliente\n        if(!$id_cliente) {\n            PCO_EjecutarSQLUnaria(\"INSERT INTO app_clientes (nombre_completo, numero_documento, telefono) VALUES (?,?,?) \",\n                \"$nombre_completo$_SeparadorCampos_$numero_documento$_SeparadorCampos_$telefono\"\n            );\n            // $id_cliente = PCO_ObtenerUltimoIDInsertado();\n            $id_cliente = PCO_EjecutarSQL(\"\n                SELECT id\n                FROM app_clientes\n                WHERE numero_documento=\'$numero_documento\' AND telefono=\'$telefono\' AND \'$nombre_completo\'\n            \")->fetchColumn();\n        }\n        $todayMysql = date(\"Y-m-d H:i:s\");\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas (id_cliente, usuario, fecha, placa, id_mecanico, tipo_venta) VALUES (?,?,?,?,?,?) \", \"$id_cliente$_SeparadorCampos_$PCOSESS_LoginUsuario$_SeparadorCampos_$todayMysql$_SeparadorCampos_$placa$_SeparadorCampos_$id_mecanico$_SeparadorCampos_$tipo_venta\");\n        $id = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_ventas\n            WHERE fecha=\'$todayMysql\' AND usuario=\'$PCOSESS_LoginUsuario\' AND id_cliente = \'$id_cliente\'\n        \")->fetchColumn();\n        // $id = PCO_ObtenerUltimoIDInsertado();\n\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva, inventario\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precio$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos_$hora_inicio$_SeparadorCampos_$hora_fin$_SeparadorCampos_$guaje\");\n        calcularTotalVenta($id);\n        \n        /* $total = number_format($result[\"total\"], 2);\n        $iva = number_format($result[\"iva\"], 2); */\n\n        echo \'<script type=\"text/javascript\">\n        	document.FRMBASEINFORME.PCO_Accion.value=\"PCO_CargarObjeto\";\n        	document.FRMBASEINFORME.PCO_Objeto.value=\"frm:8:1:id:\'.$id.\'\";\n        	document.FRMBASEINFORME.Precarga_EstilosBS.value=\"1\";\n        	document.FRMBASEINFORME.Presentar_FullScreen.value=\"0\";\n        	document.FRMBASEINFORME.target=\"_self\";\n        	document.FRMBASEINFORME.submit();\n    	 </script>\';\n    }\n}\n\nif($PCO_Accion == \"VENTA_agregarProducto\") {\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precioVenta$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos$hora_inicio$_SeparadorCampos$hora_fin$_SeparadorCampos$guaje\");\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se ha encontrado el producto seleccionado\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_consultarTotalVenta\") {\n    if($id) {\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se encontro la venta\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_eliminarProducto\") {\n\n    if($id_venta_detalle && $id_venta) {\n        $producto = PCO_EjecutarSQL(\"\n            SELECT p.inventario, vd.cantidad, p.id\n            FROM app_ventas_detalle vd, app_productos p\n            WHERE vd.id_producto = p.id AND vd.id = \'$id_venta_detalle\'\n        \")->fetch();\n        //Restablecemos el inventario\n        $inventarioNew = $producto[\"inventario\"] + $producto[\"cantidad\"];\n        PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"DELETE FROM app_ventas_detalle WHERE id_venta = $id_venta AND id = $id_venta_detalle\");\n        $result = calcularTotalVenta($id_venta);\n        print_r(\'{\"success\": true, \"msg\": \"Se ha eliminado el producto exitosamente\", \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se pudo eliminar el producto\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_actualizarProductoVenta\") {\n    if($id) {\n        PCO_EjecutarSQLUnaria(\"UPDATE app_ventas_detalle SET cantidad=\'$cantidad\', precio=\'$precio\' WHERE id = \'$id\'\");\n        echo 1;\n        die();\n    }\n    echo 0;\n    die();\n}\n\nif($PCO_Accion == \"VENTA_imprimirFactura\") {\n    if($PCO_Valor)\n        $id = $PCO_Valor;\n    if($id) {\n        include_once \"imprimirFactura.php\";\n    }\n}\n\nif($PCO_Accion == \"VENTA_generarLiquidacionMecanicos\") {\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico <> 0 AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetchAll();\n    foreach ($ventas as $venta) {\n        $valor_novedad = PCO_EjecutarSQL(\"\n            SELECT  \n                SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n                SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n            FROM app_novedades_mecanicos\n            WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\'\n                AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n            GROUP BY id_mecanico\n        \")->fetch();\n\n        PCO_EjecutarSQLUnaria(\"\n            INSERT INTO app_liquidacion_mecanicos_enc (id_mecanico, fecha_inicio, fecha_fin, fecha, valor_venta, valor_novedad_abonar, valor_novedad_debitar, seguridad_social, usuario) VALUES (?,?,?,?,?,?,?,?,?) \",\n            $venta[\"id_mecanico\"].\"$_SeparadorCampos_$fecha_inicio$_SeparadorCampos_$fecha_fin$_SeparadorCampos_$PCO_FechaOperacionGuiones$_SeparadorCampos_\".$venta[\"Total\"].\"$_SeparadorCampos_\".$valor_novedad[\'abonar\'].\"$_SeparadorCampos_\".$valor_novedad[\'debitar\'].\"$_SeparadorCampos_\".$venta[\"seguridad_social\"].\"$_SeparadorCampos_$PCOSESS_LoginUsuario\"\n        );\n        \n        $idLiq = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_liquidacion_mecanicos_enc\n            WHERE id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND fecha=\'$PCO_FechaOperacionGuiones\' AND usuario = \'$PCOSESS_LoginUsuario\'\n            ORDER BY id desc LIMIT 1\n        \")->fetchColumn();\n\n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_novedades_mecanicos \n            SET id_liquidacion=\'$idLiq\'\n            WHERE \n                fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n        \n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_ventas \n            SET id_liquidacion=\'$idLiq\'\n            WHERE app_ventas.fecha >= \'$fecha_inicio 00:00:00\' AND app_ventas.fecha <= \'$fecha_fin 23:59:59\' AND app_ventas.estado = 1 AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n    }\n    PCO_CargarFormulario(14);\n}\n\nif($PCO_Accion == \"VENTAS_PreVisualizarLiquidacion\") {\n    $idMecanico = $id_registro_datos;\n\n    $liq[\'fecha_inicio\'] = $fecha_inicio;\n    $liq[\'fecha_fin\'] = $fecha_fin;\n\n    $ventasLiq = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico = \'$idMecanico\' AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetch();\n    $liq[\'valor_venta\'] = $ventasLiq[\'Total\'];\n    //Mecanico\n    $liq[\'nombre_completo\'] = $ventasLiq[\'nombre_completo\'];\n    $liq[\'cedula\'] = $ventasLiq[\'cedula\'];\n    $liq[\'telefono\'] = $ventasLiq[\'telefono\'];\n    $liq[\'direccion\'] = $ventasLiq[\'direccion\'];\n    $liq[\'correo\'] = $ventasLiq[\'correo\'];\n    $liq[\'seguridad_social\'] = $ventasLiq[\'seguridad_social\'];\n    \n\n    $novedadLiq = PCO_EjecutarSQL(\"\n        SELECT  \n            SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n            SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n        GROUP BY id_mecanico\n    \")->fetch();\n\n    $liq[\'valor_novedad_abonar\'] = $novedadLiq[\'abonar\'] ? $novedadLiq[\'abonar\'] : 0;\n    $liq[\'valor_novedad_debitar\'] = $novedadLiq[\'debitar\'] ? $novedadLiq[\'debitar\'] : 0;\n    \n    $total = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'] - $liq[\'valor_novedad_debitar\'] - $liq[\'seguridad_social\'];\n    $liq[\'total\'] = formatNumber($total);\n    $subTotal = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'];\n    $liq[\'subTotal\'] = formatNumber($subTotal);\n    $otrosCostos = $liq[\'valor_novedad_debitar\'] + $liq[\'seguridad_social\'];\n    $liq[\'otrosCostos\'] = formatNumber(-$otrosCostos);\n    \n    $liq[\'seguridad_social\'] = formatNumber($liq[\'seguridad_social\']);\n    $liq[\'valor_venta\'] = formatNumber($liq[\'valor_venta\']);\n    $liq[\'valor_novedad_abonar\'] = formatNumber($liq[\'valor_novedad_abonar\']);\n    $liq[\'valor_novedad_debitar\'] = formatNumber($liq[\'valor_novedad_debitar\']);\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo,\n            CONCAT(\'$\',FORMAT(v.valor_venta,2,\'de_DE\')) valor_venta\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente \n        AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.id_mecanico=\'$idMecanico\' AND v.estado = 1 AND v.id_liquidacion=0\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}\n\nif($PCO_Accion == \"VENTAS_verLiquidacion\") {\n    $liq = PCO_EjecutarSQL(\"\n        SELECT l.*, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo,\n            CONCAT(\'$\',FORMAT((l.valor_venta + l.valor_novedad_abonar - l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) total,\n            CONCAT(\'$\',FORMAT(l.valor_venta + l.valor_novedad_abonar,2,\'de_DE\')) subTotal,\n            CONCAT(\'$\',FORMAT((-l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) otrosCostos\n        FROM app_liquidacion_mecanicos_enc l,app_mecanicos m \n        WHERE l.id_mecanico = m.id AND l.id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente AND v.id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}','A'),(1367,'mod/app_ventas/index.php','2025-02-14 12:49:00','rafael',316,14610,'<?php\n\nfunction formatNumber($n) {\n    return \"$\".number_format($n, 2, \",\", \".\");\n}\n\nfunction calcularTotalVenta($id, $returnArr = \"\") {\n    $venta = PCO_EjecutarSQL(\"\n        SELECT SUM(precio * cantidad) as total, SUM(precio * iva/100) iva\n        FROM app_ventas_detalle\n        WHERE id_venta = \'$id\' GROUP BY id_venta\n    \")->fetch();\n    $ventaMecanico = PCO_EjecutarSQL(\"\n        SELECT TRUNCATE(SUM(vd.precio * vd.cantidad * p.porcentaje_mecanico/100), 2)\n        FROM app_ventas_detalle vd, app_ventas v, app_productos p\n        WHERE vd.id_venta=v.id AND vd.id_producto=p.id AND  vd.id_venta = \'$id\' AND v.id_mecanico <> 0 GROUP BY vd.id_venta\n    \")->fetchColumn();\n    $total = $venta[\"total\"] ? $venta[\"total\"] : 0;\n    $iva = $venta[\"iva\"] ? $venta[\"iva\"] : 0;\n    PCO_EjecutarSQLUnaria(\"UPDATE app_ventas SET total = $total, iva = $iva, total_mecanico=\'$ventaMecanico\' WHERE id = $id \");\n    if($returnArr)\n        return $venta;\n    return \'\"total\": \' . $total . \', \"iva\": \' . $iva;\n}\n\nif($PCO_Accion == \"VENTA_ingresarRealizarVenta\") {\n    $ventaAbierta = PCO_EjecutarSQL(\"\n        SELECT id, id_cliente, total, iva, placa\n        FROM app_ventas\n        WHERE id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $id_venta = $ventaAbierta[\"id\"] || \"\";\n    if($id_venta) {\n        $total = number_format($ventaAbierta[\"total\"], 2);\n        $iva = number_format($ventaAbierta[\"iva\"], 2);\n        $id_cliente = $ventaAbierta[\"id_cliente\"];\n    }\n\n    PCO_CargarFormulario(8, 1, \"id\", $id_venta);\n}\n\nif($PCO_Accion == \"VENTA_agregarProductoCrearOC\") {\n        //crear cliente en caso de que no llegue id_cliente\n        if(!$id_cliente) {\n            PCO_EjecutarSQLUnaria(\"INSERT INTO app_clientes (nombre_completo, numero_documento, telefono) VALUES (?,?,?) \",\n                \"$nombre_completo$_SeparadorCampos_$numero_documento$_SeparadorCampos_$telefono\"\n            );\n            // $id_cliente = PCO_ObtenerUltimoIDInsertado();\n            $id_cliente = PCO_EjecutarSQL(\"\n                SELECT id\n                FROM app_clientes\n                WHERE numero_documento=\'$numero_documento\' AND telefono=\'$telefono\' AND \'$nombre_completo\'\n            \")->fetchColumn();\n        }\n        $todayMysql = date(\"Y-m-d H:i:s\");\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas (id_cliente, usuario, fecha, placa, id_mecanico, tipo_venta) VALUES (?,?,?,?,?,?) \", \"$id_cliente$_SeparadorCampos_$PCOSESS_LoginUsuario$_SeparadorCampos_$todayMysql$_SeparadorCampos_$placa$_SeparadorCampos_$id_mecanico$_SeparadorCampos_$tipo_venta\");\n        $id = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_ventas\n            WHERE fecha=\'$todayMysql\' AND usuario=\'$PCOSESS_LoginUsuario\' AND id_cliente = \'$id_cliente\'\n        \")->fetchColumn();\n        // $id = PCO_ObtenerUltimoIDInsertado();\n\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva, inventario\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precio$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos_$hora_inicio$_SeparadorCampos_$hora_fin$_SeparadorCampos_$guaje\");\n        calcularTotalVenta($id);\n        \n        /* $total = number_format($result[\"total\"], 2);\n        $iva = number_format($result[\"iva\"], 2); */\n\n        echo \'<script type=\"text/javascript\">\n        	document.FRMBASEINFORME.PCO_Accion.value=\"PCO_CargarObjeto\";\n        	document.FRMBASEINFORME.PCO_Objeto.value=\"frm:8:1:id:\'.$id.\'\";\n        	document.FRMBASEINFORME.Precarga_EstilosBS.value=\"1\";\n        	document.FRMBASEINFORME.Presentar_FullScreen.value=\"0\";\n        	document.FRMBASEINFORME.target=\"_self\";\n        	document.FRMBASEINFORME.submit();\n    	 </script>\';\n    }\n}\n\nif($PCO_Accion == \"VENTA_agregarProducto\") {\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precioVenta$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos$hora_inicio$_SeparadorCampos$hora_fin$_SeparadorCampos$guaje\");\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se ha encontrado el producto seleccionado\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_consultarTotalVenta\") {\n    if($id) {\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se encontro la venta\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_eliminarProducto\") {\n\n    if($id_venta_detalle && $id_venta) {\n        $producto = PCO_EjecutarSQL(\"\n            SELECT p.inventario, vd.cantidad, p.id\n            FROM app_ventas_detalle vd, app_productos p\n            WHERE vd.id_producto = p.id AND vd.id = \'$id_venta_detalle\'\n        \")->fetch();\n        //Restablecemos el inventario\n        $inventarioNew = $producto[\"inventario\"] + $producto[\"cantidad\"];\n        PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"DELETE FROM app_ventas_detalle WHERE id_venta = $id_venta AND id = $id_venta_detalle\");\n        $result = calcularTotalVenta($id_venta);\n        print_r(\'{\"success\": true, \"msg\": \"Se ha eliminado el producto exitosamente\", \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se pudo eliminar el producto\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_actualizarProductoVenta\") {\n    if($id) {\n        PCO_EjecutarSQLUnaria(\"UPDATE app_ventas_detalle SET cantidad=\'$cantidad\', precio=\'$precio\' WHERE id = \'$id\'\");\n        echo 1;\n        die();\n    }\n    echo 0;\n    die();\n}\n\nif($PCO_Accion == \"VENTA_imprimirFactura\") {\n    if($PCO_Valor)\n        $id = $PCO_Valor;\n    if($id) {\n        include_once \"imprimirFactura.php\";\n    }\n}\n\nif($PCO_Accion == \"VENTA_generarLiquidacionMecanicos\") {\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico <> 0 AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetchAll();\n    foreach ($ventas as $venta) {\n        $valor_novedad = PCO_EjecutarSQL(\"\n            SELECT  \n                SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n                SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n            FROM app_novedades_mecanicos\n            WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\'\n                AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n            GROUP BY id_mecanico\n        \")->fetch();\n\n        PCO_EjecutarSQLUnaria(\"\n            INSERT INTO app_liquidacion_mecanicos_enc (id_mecanico, fecha_inicio, fecha_fin, fecha, valor_venta, valor_novedad_abonar, valor_novedad_debitar, seguridad_social, usuario) VALUES (?,?,?,?,?,?,?,?,?) \",\n            $venta[\"id_mecanico\"].\"$_SeparadorCampos_$fecha_inicio$_SeparadorCampos_$fecha_fin$_SeparadorCampos_$PCO_FechaOperacionGuiones$_SeparadorCampos_\".$venta[\"Total\"].\"$_SeparadorCampos_\".$valor_novedad[\'abonar\'].\"$_SeparadorCampos_\".$valor_novedad[\'debitar\'].\"$_SeparadorCampos_\".$venta[\"seguridad_social\"].\"$_SeparadorCampos_$PCOSESS_LoginUsuario\"\n        );\n        \n        $idLiq = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_liquidacion_mecanicos_enc\n            WHERE id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND fecha=\'$PCO_FechaOperacionGuiones\' AND usuario = \'$PCOSESS_LoginUsuario\'\n            ORDER BY id desc LIMIT 1\n        \")->fetchColumn();\n\n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_novedades_mecanicos \n            SET id_liquidacion=\'$idLiq\'\n            WHERE \n                fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n        \n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_ventas \n            SET id_liquidacion=\'$idLiq\'\n            WHERE app_ventas.fecha >= \'$fecha_inicio 00:00:00\' AND app_ventas.fecha <= \'$fecha_fin 23:59:59\' AND app_ventas.estado = 1 AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n    }\n    PCO_CargarFormulario(14);\n}\n\nif($PCO_Accion == \"VENTAS_PreVisualizarLiquidacion\") {\n    $idMecanico = $id_registro_datos;\n\n    $liq[\'fecha_inicio\'] = $fecha_inicio;\n    $liq[\'fecha_fin\'] = $fecha_fin;\n\n    $ventasLiq = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico = \'$idMecanico\' AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetch();\n    $liq[\'valor_venta\'] = $ventasLiq[\'Total\'];\n    //Mecanico\n    $liq[\'nombre_completo\'] = $ventasLiq[\'nombre_completo\'];\n    $liq[\'cedula\'] = $ventasLiq[\'cedula\'];\n    $liq[\'telefono\'] = $ventasLiq[\'telefono\'];\n    $liq[\'direccion\'] = $ventasLiq[\'direccion\'];\n    $liq[\'correo\'] = $ventasLiq[\'correo\'];\n    $liq[\'seguridad_social\'] = $ventasLiq[\'seguridad_social\'];\n    \n\n    $novedadLiq = PCO_EjecutarSQL(\"\n        SELECT  \n            SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n            SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n        GROUP BY id_mecanico\n    \")->fetch();\n\n    $liq[\'valor_novedad_abonar\'] = $novedadLiq[\'abonar\'] ? $novedadLiq[\'abonar\'] : 0;\n    $liq[\'valor_novedad_debitar\'] = $novedadLiq[\'debitar\'] ? $novedadLiq[\'debitar\'] : 0;\n    \n    $total = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'] - $liq[\'valor_novedad_debitar\'] - $liq[\'seguridad_social\'];\n    $liq[\'total\'] = formatNumber($total);\n    $subTotal = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'];\n    $liq[\'subTotal\'] = formatNumber($subTotal);\n    $otrosCostos = $liq[\'valor_novedad_debitar\'] + $liq[\'seguridad_social\'];\n    $liq[\'otrosCostos\'] = formatNumber(-$otrosCostos);\n    \n    $liq[\'seguridad_social\'] = formatNumber($liq[\'seguridad_social\']);\n    $liq[\'valor_venta\'] = formatNumber($liq[\'valor_venta\']);\n    $liq[\'valor_novedad_abonar\'] = formatNumber($liq[\'valor_novedad_abonar\']);\n    $liq[\'valor_novedad_debitar\'] = formatNumber($liq[\'valor_novedad_debitar\']);\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo,\n            CONCAT(\'$\',FORMAT(vd.valor_venta,2,\'de_DE\')) valor_venta\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente \n        AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.id_mecanico=\'$idMecanico\' AND v.estado = 1 AND v.id_liquidacion=0\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}\n\nif($PCO_Accion == \"VENTAS_verLiquidacion\") {\n    $liq = PCO_EjecutarSQL(\"\n        SELECT l.*, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo,\n            CONCAT(\'$\',FORMAT((l.valor_venta + l.valor_novedad_abonar - l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) total,\n            CONCAT(\'$\',FORMAT(l.valor_venta + l.valor_novedad_abonar,2,\'de_DE\')) subTotal,\n            CONCAT(\'$\',FORMAT((-l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) otrosCostos\n        FROM app_liquidacion_mecanicos_enc l,app_mecanicos m \n        WHERE l.id_mecanico = m.id AND l.id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente AND v.id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}','A'),(1368,'mod/app_ventas/index.php','2025-02-14 12:50:00','rafael',316,14605,'<?php\n\nfunction formatNumber($n) {\n    return \"$\".number_format($n, 2, \",\", \".\");\n}\n\nfunction calcularTotalVenta($id, $returnArr = \"\") {\n    $venta = PCO_EjecutarSQL(\"\n        SELECT SUM(precio * cantidad) as total, SUM(precio * iva/100) iva\n        FROM app_ventas_detalle\n        WHERE id_venta = \'$id\' GROUP BY id_venta\n    \")->fetch();\n    $ventaMecanico = PCO_EjecutarSQL(\"\n        SELECT TRUNCATE(SUM(vd.precio * vd.cantidad * p.porcentaje_mecanico/100), 2)\n        FROM app_ventas_detalle vd, app_ventas v, app_productos p\n        WHERE vd.id_venta=v.id AND vd.id_producto=p.id AND  vd.id_venta = \'$id\' AND v.id_mecanico <> 0 GROUP BY vd.id_venta\n    \")->fetchColumn();\n    $total = $venta[\"total\"] ? $venta[\"total\"] : 0;\n    $iva = $venta[\"iva\"] ? $venta[\"iva\"] : 0;\n    PCO_EjecutarSQLUnaria(\"UPDATE app_ventas SET total = $total, iva = $iva, total_mecanico=\'$ventaMecanico\' WHERE id = $id \");\n    if($returnArr)\n        return $venta;\n    return \'\"total\": \' . $total . \', \"iva\": \' . $iva;\n}\n\nif($PCO_Accion == \"VENTA_ingresarRealizarVenta\") {\n    $ventaAbierta = PCO_EjecutarSQL(\"\n        SELECT id, id_cliente, total, iva, placa\n        FROM app_ventas\n        WHERE id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $id_venta = $ventaAbierta[\"id\"] || \"\";\n    if($id_venta) {\n        $total = number_format($ventaAbierta[\"total\"], 2);\n        $iva = number_format($ventaAbierta[\"iva\"], 2);\n        $id_cliente = $ventaAbierta[\"id_cliente\"];\n    }\n\n    PCO_CargarFormulario(8, 1, \"id\", $id_venta);\n}\n\nif($PCO_Accion == \"VENTA_agregarProductoCrearOC\") {\n        //crear cliente en caso de que no llegue id_cliente\n        if(!$id_cliente) {\n            PCO_EjecutarSQLUnaria(\"INSERT INTO app_clientes (nombre_completo, numero_documento, telefono) VALUES (?,?,?) \",\n                \"$nombre_completo$_SeparadorCampos_$numero_documento$_SeparadorCampos_$telefono\"\n            );\n            // $id_cliente = PCO_ObtenerUltimoIDInsertado();\n            $id_cliente = PCO_EjecutarSQL(\"\n                SELECT id\n                FROM app_clientes\n                WHERE numero_documento=\'$numero_documento\' AND telefono=\'$telefono\' AND \'$nombre_completo\'\n            \")->fetchColumn();\n        }\n        $todayMysql = date(\"Y-m-d H:i:s\");\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas (id_cliente, usuario, fecha, placa, id_mecanico, tipo_venta) VALUES (?,?,?,?,?,?) \", \"$id_cliente$_SeparadorCampos_$PCOSESS_LoginUsuario$_SeparadorCampos_$todayMysql$_SeparadorCampos_$placa$_SeparadorCampos_$id_mecanico$_SeparadorCampos_$tipo_venta\");\n        $id = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_ventas\n            WHERE fecha=\'$todayMysql\' AND usuario=\'$PCOSESS_LoginUsuario\' AND id_cliente = \'$id_cliente\'\n        \")->fetchColumn();\n        // $id = PCO_ObtenerUltimoIDInsertado();\n\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva, inventario\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precio$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos_$hora_inicio$_SeparadorCampos_$hora_fin$_SeparadorCampos_$guaje\");\n        calcularTotalVenta($id);\n        \n        /* $total = number_format($result[\"total\"], 2);\n        $iva = number_format($result[\"iva\"], 2); */\n\n        echo \'<script type=\"text/javascript\">\n        	document.FRMBASEINFORME.PCO_Accion.value=\"PCO_CargarObjeto\";\n        	document.FRMBASEINFORME.PCO_Objeto.value=\"frm:8:1:id:\'.$id.\'\";\n        	document.FRMBASEINFORME.Precarga_EstilosBS.value=\"1\";\n        	document.FRMBASEINFORME.Presentar_FullScreen.value=\"0\";\n        	document.FRMBASEINFORME.target=\"_self\";\n        	document.FRMBASEINFORME.submit();\n    	 </script>\';\n    }\n}\n\nif($PCO_Accion == \"VENTA_agregarProducto\") {\n    $producto = PCO_EjecutarSQL(\"\n        SELECT id, precio_venta, iva\n        FROM app_productos\n        WHERE id = \'$id_producto\'\n    \")->fetch();\n    if($producto[\"id\"]) {\n        $existe = PCO_EjecutarSQL(\"\n            SELECT count(id)\n            FROM app_ventas_detalle\n            WHERE id_venta = $id AND id_producto = \'$id_producto\'\n        \")->fetchColumn();\n        if($existe > 0) {\n            print_r(\'{\"success\": false, \"msg\": \"El producto ya se ha ingresado\"}\');\n            die();\n        }\n        /* if($producto[\"inventario\"] < $cantidad) {\n            print_r(\'{\"success\": false, \"msg\": \"La cantidad digitada supera la del invetario\"}\');\n            die();\n        } */\n        // $inventarioNew = $producto[\"inventario\"] - $cantidad;\n        // PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"INSERT INTO app_ventas_detalle (id_venta, id_producto, cantidad, precio, iva, hora_inicio, hora_fin, guaje) VALUES (?,?,?,?,?,?,?,?) \", \n            \"$id$_SeparadorCampos_$id_producto$_SeparadorCampos_$cantidad$_SeparadorCampos_$precioVenta$_SeparadorCampos_\" . $producto[\"iva\"].\"$_SeparadorCampos$hora_inicio$_SeparadorCampos$hora_fin$_SeparadorCampos$guaje\");\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se ha encontrado el producto seleccionado\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_consultarTotalVenta\") {\n    if($id) {\n        $result = calcularTotalVenta($id);\n        print_r(\'{\"success\": true, \"id\": \' . $id . \', \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se encontro la venta\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_eliminarProducto\") {\n\n    if($id_venta_detalle && $id_venta) {\n        $producto = PCO_EjecutarSQL(\"\n            SELECT p.inventario, vd.cantidad, p.id\n            FROM app_ventas_detalle vd, app_productos p\n            WHERE vd.id_producto = p.id AND vd.id = \'$id_venta_detalle\'\n        \")->fetch();\n        //Restablecemos el inventario\n        $inventarioNew = $producto[\"inventario\"] + $producto[\"cantidad\"];\n        PCO_EjecutarSQLUnaria(\"UPDATE app_productos SET inventario = $inventarioNew WHERE id = \" . $producto[\"id\"]);\n        PCO_EjecutarSQLUnaria(\"DELETE FROM app_ventas_detalle WHERE id_venta = $id_venta AND id = $id_venta_detalle\");\n        $result = calcularTotalVenta($id_venta);\n        print_r(\'{\"success\": true, \"msg\": \"Se ha eliminado el producto exitosamente\", \' . $result . \'}\');\n        die();\n    }\n    print_r(\'{\"success\": false, \"msg\": \"No se pudo eliminar el producto\"}\');\n    die();\n}\n\nif($PCO_Accion == \"VENTA_actualizarProductoVenta\") {\n    if($id) {\n        PCO_EjecutarSQLUnaria(\"UPDATE app_ventas_detalle SET cantidad=\'$cantidad\', precio=\'$precio\' WHERE id = \'$id\'\");\n        echo 1;\n        die();\n    }\n    echo 0;\n    die();\n}\n\nif($PCO_Accion == \"VENTA_imprimirFactura\") {\n    if($PCO_Valor)\n        $id = $PCO_Valor;\n    if($id) {\n        include_once \"imprimirFactura.php\";\n    }\n}\n\nif($PCO_Accion == \"VENTA_generarLiquidacionMecanicos\") {\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico <> 0 AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetchAll();\n    foreach ($ventas as $venta) {\n        $valor_novedad = PCO_EjecutarSQL(\"\n            SELECT  \n                SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n                SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n            FROM app_novedades_mecanicos\n            WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\'\n                AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n            GROUP BY id_mecanico\n        \")->fetch();\n\n        PCO_EjecutarSQLUnaria(\"\n            INSERT INTO app_liquidacion_mecanicos_enc (id_mecanico, fecha_inicio, fecha_fin, fecha, valor_venta, valor_novedad_abonar, valor_novedad_debitar, seguridad_social, usuario) VALUES (?,?,?,?,?,?,?,?,?) \",\n            $venta[\"id_mecanico\"].\"$_SeparadorCampos_$fecha_inicio$_SeparadorCampos_$fecha_fin$_SeparadorCampos_$PCO_FechaOperacionGuiones$_SeparadorCampos_\".$venta[\"Total\"].\"$_SeparadorCampos_\".$valor_novedad[\'abonar\'].\"$_SeparadorCampos_\".$valor_novedad[\'debitar\'].\"$_SeparadorCampos_\".$venta[\"seguridad_social\"].\"$_SeparadorCampos_$PCOSESS_LoginUsuario\"\n        );\n        \n        $idLiq = PCO_EjecutarSQL(\"\n            SELECT id\n            FROM app_liquidacion_mecanicos_enc\n            WHERE id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND fecha=\'$PCO_FechaOperacionGuiones\' AND usuario = \'$PCOSESS_LoginUsuario\'\n            ORDER BY id desc LIMIT 1\n        \")->fetchColumn();\n\n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_novedades_mecanicos \n            SET id_liquidacion=\'$idLiq\'\n            WHERE \n                fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n        \n        PCO_EjecutarSQLUnaria(\"\n            UPDATE app_ventas \n            SET id_liquidacion=\'$idLiq\'\n            WHERE app_ventas.fecha >= \'$fecha_inicio 00:00:00\' AND app_ventas.fecha <= \'$fecha_fin 23:59:59\' AND app_ventas.estado = 1 AND id_mecanico=\'\".$venta[\'id_mecanico\'].\"\' AND id_liquidacion=0\n        \");\n    }\n    PCO_CargarFormulario(14);\n}\n\nif($PCO_Accion == \"VENTAS_PreVisualizarLiquidacion\") {\n    $idMecanico = $id_registro_datos;\n\n    $liq[\'fecha_inicio\'] = $fecha_inicio;\n    $liq[\'fecha_fin\'] = $fecha_fin;\n\n    $ventasLiq = PCO_EjecutarSQL(\"\n        SELECT v.id, v.id_mecanico, SUM(v.total_mecanico) as Total, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo, m.seguridad_social\n        FROM app_mecanicos m,app_ventas v\n        WHERE m.id = v.id_mecanico AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.estado = 1 AND id_mecanico = \'$idMecanico\' AND id_liquidacion=0\n        GROUP BY v.id_mecanico\n    \")->fetch();\n    $liq[\'valor_venta\'] = $ventasLiq[\'Total\'];\n    //Mecanico\n    $liq[\'nombre_completo\'] = $ventasLiq[\'nombre_completo\'];\n    $liq[\'cedula\'] = $ventasLiq[\'cedula\'];\n    $liq[\'telefono\'] = $ventasLiq[\'telefono\'];\n    $liq[\'direccion\'] = $ventasLiq[\'direccion\'];\n    $liq[\'correo\'] = $ventasLiq[\'correo\'];\n    $liq[\'seguridad_social\'] = $ventasLiq[\'seguridad_social\'];\n    \n\n    $novedadLiq = PCO_EjecutarSQL(\"\n        SELECT  \n            SUM(case when tipo_novedad=\'Abonar\' then valor_novedad else 0 end) as abonar,\n            SUM(case when tipo_novedad=\'Debitar\' then valor_novedad else 0 end) as debitar\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n        GROUP BY id_mecanico\n    \")->fetch();\n\n    $liq[\'valor_novedad_abonar\'] = $novedadLiq[\'abonar\'] ? $novedadLiq[\'abonar\'] : 0;\n    $liq[\'valor_novedad_debitar\'] = $novedadLiq[\'debitar\'] ? $novedadLiq[\'debitar\'] : 0;\n    \n    $total = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'] - $liq[\'valor_novedad_debitar\'] - $liq[\'seguridad_social\'];\n    $liq[\'total\'] = formatNumber($total);\n    $subTotal = $liq[\'valor_venta\'] + $liq[\'valor_novedad_abonar\'];\n    $liq[\'subTotal\'] = formatNumber($subTotal);\n    $otrosCostos = $liq[\'valor_novedad_debitar\'] + $liq[\'seguridad_social\'];\n    $liq[\'otrosCostos\'] = formatNumber(-$otrosCostos);\n    \n    $liq[\'seguridad_social\'] = formatNumber($liq[\'seguridad_social\']);\n    $liq[\'valor_venta\'] = formatNumber($liq[\'valor_venta\']);\n    $liq[\'valor_novedad_abonar\'] = formatNumber($liq[\'valor_novedad_abonar\']);\n    $liq[\'valor_novedad_debitar\'] = formatNumber($liq[\'valor_novedad_debitar\']);\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo,\n            CONCAT(\'$\',FORMAT(vd.precio,2,\'de_DE\')) precio\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente \n        AND v.fecha >= \'$fecha_inicio 00:00:00\' AND v.fecha <= \'$fecha_fin 23:59:59\' AND v.id_mecanico=\'$idMecanico\' AND v.estado = 1 AND v.id_liquidacion=0\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE fecha >= \'$fecha_inicio\' AND fecha <= \'$fecha_fin\' AND id_mecanico=\'$idMecanico\' AND id_liquidacion=0\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}\n\nif($PCO_Accion == \"VENTAS_verLiquidacion\") {\n    $liq = PCO_EjecutarSQL(\"\n        SELECT l.*, m.nombre_completo, m.cedula, m.telefono, m.direccion, m.correo,\n            CONCAT(\'$\',FORMAT((l.valor_venta + l.valor_novedad_abonar - l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) total,\n            CONCAT(\'$\',FORMAT(l.valor_venta + l.valor_novedad_abonar,2,\'de_DE\')) subTotal,\n            CONCAT(\'$\',FORMAT((-l.valor_novedad_debitar - l.seguridad_social),2,\'de_DE\')) otrosCostos\n        FROM app_liquidacion_mecanicos_enc l,app_mecanicos m \n        WHERE l.id_mecanico = m.id AND l.id=\'$PCO_Valor\'\n    \")->fetch();\n\n    $ventas = PCO_EjecutarSQL(\"\n        SELECT v.*, p.nombre, c.nombre_completo\n        FROM app_ventas v, app_ventas_detalle vd, app_productos p, app_clientes c\n        WHERE v.id=vd.id_venta AND p.id=vd.id_producto AND c.id=v.id_cliente AND v.id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n\n    $novedades = PCO_EjecutarSQL(\"\n        SELECT *\n        FROM app_novedades_mecanicos\n        WHERE id_liquidacion=\".$liq[\'id\'].\"\n    \")->fetchAll();\n    \n    include \'liquidacion_mecanicos.php\';\n}','A'),