public ActionResult GenerarReporteExcel(string ventas)
        {
            ExcelExportHelper excel = new ExcelExportHelper(ventaMinoristaBL);

            DataTable tablaCompras = excel.ArmarExcel(ventas, Constants.VENTA_MINORISTA_EXCEL);

            string[] columns = { "Id",         "Fecha",        "Local",                "Importe Informe Z", "IVA", "Importe IVA",
                                 "Factura nº", "Tipo Factura", "Primer Número Ticket", "Último Número Ticket" };

            //byte[] filecontent = ExcelExportHelper.ExportExcel(technologies, "Technology", true, columns);
            byte[] filecontent = ExcelExportHelper.ExportExcel(tablaCompras, "Reporte Ventas Minoristas", true, columns);

            string fecha = string.Format("{0}{1}{2}", DateTime.Now.Date.Day, DateTime.Now.Date.Month, DateTime.Now.Date.Year);


            return(File(filecontent, ExcelExportHelper.ExcelContentType, "ReporteVentaMinorista_" + fecha + ".xlsx"));
        }
Example #2
0
        public ActionResult GenerarReporteExcel(string compra)
        {
            ExcelExportHelper excel = new ExcelExportHelper(compraBL);

            DataTable tablaCompras = excel.ArmarExcel(compra, Constants.COMPRA_EXCEL);

            string[] columns = { "Id",       "Proveedor", "CUIT",        "IIBB",      "Mes Año",   "Tipo",           "Factura",       "Suma Total", "Descuento %", "Descuento",
                                 "Subtotal", "IVA",       "Importe IVA", "IIBB BSAS", "IIBB CABA", "Percepción IVA", "Clasificación", "Total" };

            //byte[] filecontent = ExcelExportHelper.ExportExcel(technologies, "Technology", true, columns);
            byte[] filecontent = ExcelExportHelper.ExportExcel(tablaCompras, "Reporte Compras", true, columns);

            string fecha = string.Format("{0}{1}{2}", DateTime.Now.Date.Day, DateTime.Now.Date.Month, DateTime.Now.Date.Year);


            return(File(filecontent, ExcelExportHelper.ExcelContentType, "ReporteCompra_" + fecha + ".xlsx"));
        }