Logo desde url de archivo en RepVentasDetalle

This commit is contained in:
2022-04-05 17:13:08 -07:00
parent 29d3757258
commit ea5448e765

View File

@@ -7,10 +7,10 @@ Imports Microsoft.Reporting.WebForms
Imports System.IO Imports System.IO
Imports System.IO.Compression Imports System.IO.Compression
Imports System.Net Imports System.Net
Imports System.Net.Http Imports System.Net.Http
Partial Class RepVentaDetalle Partial Class RepVentaDetalle
Inherits ClsPaginas Inherits ClsPaginas
#Region "P R O P I E D A D E S" #Region "P R O P I E D A D E S"
Private Property CveProyecto As Integer Private Property CveProyecto As Integer
Get Get
@@ -54,26 +54,26 @@ Partial Class RepVentaDetalle
Set(value As Integer) Set(value As Integer)
ViewState("CveMoneda") = value ViewState("CveMoneda") = value
End Set End Set
End Property End Property
Private Property TipoCliente As Integer Private Property TipoCliente As Integer
Get Get
If ViewState("TipoCliente") Is Nothing Then If ViewState("TipoCliente") Is Nothing Then
Return -1 Return -1
Else Else
Return ViewState("TipoCliente").ToString.ToEntero Return ViewState("TipoCliente").ToString.ToEntero
End If End If
End Get End Get
Set(value As Integer) Set(value As Integer)
ViewState("TipoCliente") = value ViewState("TipoCliente") = value
End Set End Set
End Property End Property
Private Property TCEspecifico As Decimal Private Property TCEspecifico As Decimal
Get Get
Return ViewState("TCEspecifico").ToString.ToDecimal Return ViewState("TCEspecifico").ToString.ToDecimal
@@ -108,10 +108,10 @@ Partial Class RepVentaDetalle
Set(value As DataTable) Set(value As DataTable)
ViewState("DtColor") = value ViewState("DtColor") = value
End Set End Set
End Property End Property
#End Region #End Region
'pRivate ReadOnly Property ColumnasVisibles As 'pRivate ReadOnly Property ColumnasVisibles As
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx") If UsuarioActual.CveEmpresa = 2 AndAlso UsuarioActual.CveUsuario.Contiene(77, 21) Then Response.Redirect("/Inicio.aspx")
@@ -253,16 +253,16 @@ Partial Class RepVentaDetalle
If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then If UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12) Then
ImgExcelVSH.Visible = True ImgExcelVSH.Visible = True
ImgExcel.Visible = False ImgExcel.Visible = False
End If End If
If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then If UsuarioActual.CveVendedor > 0 AndAlso Not UsuarioActual.TienePermisoProceso(263) Then
DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString) DdlVendedor.SelectedValuesIfExistM(UsuarioActual.CveVendedor.ToString)
DdlVendedor.Attributes.Add("disabled", "") DdlVendedor.Attributes.Add("disabled", "")
DdlVendedor.Enabled = False DdlVendedor.Enabled = False
End If End If
End Sub End Sub
#Region "CARGA COMBOS" #Region "CARGA COMBOS"
Private Sub CargaGrupo() Private Sub CargaGrupo()
DdlGrupo.Items.Insert(0, New ListItem("Año", "1")) DdlGrupo.Items.Insert(0, New ListItem("Año", "1"))
@@ -278,7 +278,7 @@ Partial Class RepVentaDetalle
DdlGrupo.Items.Insert(10, New ListItem("Año Ejec.", "11")) DdlGrupo.Items.Insert(10, New ListItem("Año Ejec.", "11"))
DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12")) DdlGrupo.Items.Insert(11, New ListItem("Mes Ejec.", "12"))
DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13")) DdlGrupo.Items.Insert(12, New ListItem("Año/Mes Ejec.", "13"))
DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14")) DdlGrupo.Items.Insert(13, New ListItem("Fecha Ejec.", "14"))
DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21")) DdlGrupo.Items.Insert(13, New ListItem("Vendedor/Cliente", "21"))
DdlGrupo.DataBind() DdlGrupo.DataBind()
End Sub End Sub
@@ -379,7 +379,7 @@ Partial Class RepVentaDetalle
'Vendedor 'Vendedor
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa) DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa)
DdlVendedor.DataBind() DdlVendedor.DataBind()
DdlVendedor.Items.Insert(0, New ListItem("Sin Vendedor", "-2")) DdlVendedor.Items.Insert(0, New ListItem("Sin Vendedor", "-2"))
'CargaUsuarios 'CargaUsuarios
@@ -393,11 +393,11 @@ Partial Class RepVentaDetalle
'Carga Clasificacion Cliente 'Carga Clasificacion Cliente
DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa) DdlClienteClasificacion.DataSource = GlobalDTClienteClasificaciones(UsuarioActual.CveEmpresa)
DdlClienteClasificacion.DataBind() DdlClienteClasificacion.DataBind()
DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1")) DdlClienteClasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
DdlTipoRelacion.DataSource = GlobalDTVtaTiposRelacion DdlTipoRelacion.DataSource = GlobalDTVtaTiposRelacion
DdlTipoRelacion.DataBind() DdlTipoRelacion.DataBind()
DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1")) DdlTipoRelacion.Items.Insert(0, New ListItem("Todos", "-1"))
CargaGrupo() CargaGrupo()
@@ -421,9 +421,9 @@ Partial Class RepVentaDetalle
DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa) DdlSubProyecto.DataSource = GlobalDTSubProyectos(DdlProyecto.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa)
DdlSubProyecto.DataBind() DdlSubProyecto.DataBind()
'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1")) 'DdlSubProyecto.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
#End Region #End Region
#Region "SELECTED INDEX CHANGE" #Region "SELECTED INDEX CHANGE"
Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlTipoComprobante_SelectedIndexChanged(sender As Object, e As EventArgs)
CargaEstatus() CargaEstatus()
@@ -451,18 +451,18 @@ Partial Class RepVentaDetalle
'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1") 'DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
'DdlClientes.DataBind() 'DdlClientes.DataBind()
'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1")) 'DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
End Sub End Sub
#End Region #End Region
#Region "CONSULTAR" #Region "CONSULTAR"
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
CargaDatos() CargaDatos()
ConfiguraEmpresa() ConfiguraEmpresa()
UPDatos.Update() UPDatos.Update()
End Sub End Sub
Private Sub CargaDatos() Private Sub CargaDatos()
Dim AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString Dim AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString
Dim Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString Dim Fecha = If(Request("Fecha") IsNot Nothing, Request("Fecha").ToString, "-1").ToString
Dim IVA = If(Request("IVA") IsNot Nothing, Request("IVA").ToString, "-1").ToString Dim IVA = If(Request("IVA") IsNot Nothing, Request("IVA").ToString, "-1").ToString
@@ -475,7 +475,7 @@ Partial Class RepVentaDetalle
'PARAMETROS DE LOS LISTBOXS 'PARAMETROS DE LOS LISTBOXS
Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM) Dim TipoComprobante As String = If(DdlTipoComprobante.GetSelectedValuesM = "", "-1", DdlTipoComprobante.GetSelectedValuesM)
Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM) Dim Sucursales As String = If(DdlSubProyecto.GetSelectedValuesM = "", "-1", DdlSubProyecto.GetSelectedValuesM)
Dim Estatus As String = If(DdlEstatus.GetSelectedValuesM = "", "-1", DdlEstatus.GetSelectedValuesM) Dim Estatus As String = If(DdlEstatus.GetSelectedValuesM = "", "-1", DdlEstatus.GetSelectedValuesM)
Dim CveCondicionesPago As Integer = If(DdlCondicionesPago.SelectedValue = "", -1, DdlCondicionesPago.SelectedValue.ToEntero) Dim CveCondicionesPago As Integer = If(DdlCondicionesPago.SelectedValue = "", -1, DdlCondicionesPago.SelectedValue.ToEntero)
Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM) Dim Vendedores As String = If(DdlVendedor.GetSelectedValuesM = "", "-1", DdlVendedor.GetSelectedValuesM)
Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero) Dim CveCliente As Integer = If(DdlClientes.SelectedValue = "", -1, DdlClientes.SelectedValue.ToEntero)
@@ -489,16 +489,16 @@ Partial Class RepVentaDetalle
FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha) FechaIEjec = If(IsDate(TxtFechaIEjec.Text.Trim()), TxtFechaIEjec.Text.Trim.ToDate, MinFecha)
FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha) FechaFEjec = If(IsDate(TxtFechaFEjec.Text.Trim()), TxtFechaFEjec.Text.Trim.ToDate, MaxFecha)
Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0)) Dim ModalidadContable As Boolean = CBool(If(Request("ModalidadContable") IsNot Nothing, Request("ModalidadContable").ToEntero(), 0))
ChkLecturaAdmin.Checked = Not ModalidadContable ChkLecturaAdmin.Checked = Not ModalidadContable
Dim ObjVentas As New ClsVentas() Dim ObjVentas As New ClsVentas()
'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero 'FechaI, FechaF, -1, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero
If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente, If ObjVentas.GetRepVentasDetalle(DdlGrupo.SelectedValue.ToEntero, Anio.ToEntero, Mes.ToEntero, AnioMes, Fecha, CveCliente,
IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF, IVA, Vendedores, DdlUsuario.SelectedValue.ToEntero, Estatus, FechaI, FechaF,
CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec, CveCorte.ToEntero, TipoComprobante, DdlSubProyectoEjecucion.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, FechaIEjec, FechaFEjec,
CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, CveProyecto, Sucursales, TipoCambio, TCEspecifico, CveMoneda, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero,
CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero()) Then CveCondicionesPago:=CveCondicionesPago, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, ModalidadContable:=Not ChkLecturaAdmin.Checked, CveTipoRelacion:=DdlTipoRelacion.SelectedValue.ToEntero()) Then
DtVentas = AddRows(ObjVentas.DtResultados) DtVentas = AddRows(ObjVentas.DtResultados)
ImgImprimir.Enabled = True ImgImprimir.Enabled = True
@@ -507,19 +507,19 @@ Partial Class RepVentaDetalle
Else Else
GvDatos.DataSource = Nothing GvDatos.DataSource = Nothing
GvVsh.DataSource = Nothing GvVsh.DataSource = Nothing
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
Agrupador = DdlGrupo.SelectedItem.Text Agrupador = DdlGrupo.SelectedItem.Text
GvDatos.DataBind() GvDatos.DataBind()
GvVsh.DataBind() GvVsh.DataBind()
End Sub End Sub
#End Region #End Region
#Region "GRIDVIEW" #Region "GRIDVIEW"
Private Function AddRows(ByRef DT As DataTable) As DataTable Private Function AddRows(ByRef DT As DataTable) As DataTable
Dim i As Integer = 0 Dim i As Integer = 0
Dim Ultima As String = String.Empty Dim Ultima As String = String.Empty
@@ -607,16 +607,16 @@ Partial Class RepVentaDetalle
If e.Row.DBCampo("RetIVA").ToDouble < 0 Then e.Row.Cells(9).ForeColor = Drawing.Color.Red If e.Row.DBCampo("RetIVA").ToDouble < 0 Then e.Row.Cells(9).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("RetISR").ToDouble < 0 Then e.Row.Cells(10).ForeColor = Drawing.Color.Red If e.Row.DBCampo("RetISR").ToDouble < 0 Then e.Row.Cells(10).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(11).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(11).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(12).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(12).ForeColor = Drawing.Color.Red
If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(13).ForeColor = Drawing.Color.Red If e.Row.DBCampo("Total").ToDouble < 0 Then e.Row.Cells(13).ForeColor = Drawing.Color.Red
'If e.Row.DBCampo("MAX_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxSubTotal").Text = "" 'If e.Row.DBCampo("MAX_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxSubTotal").Text = ""
'If e.Row.DBCampo("AVG_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGSubTotal").Text = "" 'If e.Row.DBCampo("AVG_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGSubTotal").Text = ""
'If e.Row.DBCampo("MIN_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMinSubTotal").Text = "" 'If e.Row.DBCampo("MIN_SubTotal").ToDouble = 0 Then e.Row.FCLiteral("LtlMinSubTotal").Text = ""
'If e.Row.DBCampo("MAX_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxTotal").Text = "" 'If e.Row.DBCampo("MAX_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMaxTotal").Text = ""
'If e.Row.DBCampo("AVG_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGTotal").Text = "" 'If e.Row.DBCampo("AVG_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlAVGTotal").Text = ""
'If e.Row.DBCampo("MIN_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMinTotal").Text = "" 'If e.Row.DBCampo("MIN_Total").ToDouble = 0 Then e.Row.FCLiteral("LtlMinTotal").Text = ""
End If End If
End Sub End Sub
Protected Sub GvVsh_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvVsh.RowDataBound Protected Sub GvVsh_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvVsh.RowDataBound
@@ -634,11 +634,11 @@ Partial Class RepVentaDetalle
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Right
End If End If
End Sub End Sub
#End Region #End Region
#Region "PERSONALIZAR COLUMNAS" #Region "PERSONALIZAR COLUMNAS"
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
If ChkFolio.Checked Then If ChkFolio.Checked Then
@@ -822,10 +822,10 @@ Partial Class RepVentaDetalle
ImgExcelPersonalizado.Visible = False ImgExcelPersonalizado.Visible = False
End If End If
UPDatos.Update() UPDatos.Update()
End Sub End Sub
#End Region #End Region
#Region "IMPRESIONES" #Region "IMPRESIONES"
Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
'GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString) 'GvDatos.ExportToExcel("DetalleVentas_" & Now.ToShortDateString)
@@ -876,8 +876,8 @@ Partial Class RepVentaDetalle
pathPDF = Server.MapPath(String.Format("~/Empresas/{0}/PDF/{1}/{2}.pdf", UsuarioActual.CveEmpresa, TipoDocto, gvr.DataKey("SerieFolio").ToString)) pathPDF = Server.MapPath(String.Format("~/Empresas/{0}/PDF/{1}/{2}.pdf", UsuarioActual.CveEmpresa, TipoDocto, gvr.DataKey("SerieFolio").ToString))
If Not IO.File.Exists(pathPDF) Then If Not IO.File.Exists(pathPDF) Then
GenerarFacturaVentaDEV(gvr.DataKey("CveVenta").ToEntero, UsuarioActual.CveUsuario) GenerarFacturaVentaDEV(gvr.DataKey("CveVenta").ToEntero, UsuarioActual.CveUsuario)
'ListaPDF.Add(New MFacturaDescarga() With {.CveVenta = gvr.DataKey("CveVenta").ToEntero, .PDF = GenerarFacturaVentaDEV(gvr.DataKey("CveVenta").ToEntero, 100)}) 'ListaPDF.Add(New MFacturaDescarga() With {.CveVenta = gvr.DataKey("CveVenta").ToEntero, .PDF = GenerarFacturaVentaDEV(gvr.DataKey("CveVenta").ToEntero, 100)})
End If End If
End If End If
@@ -886,8 +886,8 @@ Partial Class RepVentaDetalle
'D E S C A R G A I O N I C ! 'D E S C A R G A I O N I C !
Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile() Dim DescargaZIP As Ionic.Zip.ZipFile = New Ionic.Zip.ZipFile()
Using DescargaZIP Using DescargaZIP
DescargaZIP.UseZip64WhenSaving = Ionic.Zip.Zip64Option.AsNecessary DescargaZIP.UseZip64WhenSaving = Ionic.Zip.Zip64Option.AsNecessary
For Each gvr As GridViewRow In GvDatos.Rows For Each gvr As GridViewRow In GvDatos.Rows
If gvr.DataKey("CveVenta").ToEntero > 0 Then If gvr.DataKey("CveVenta").ToEntero > 0 Then
Select Case gvr.DataKey("TipoDocumento").ToString Select Case gvr.DataKey("TipoDocumento").ToString
@@ -912,9 +912,9 @@ Partial Class RepVentaDetalle
If IO.File.Exists(pathPDF) Then If IO.File.Exists(pathPDF) Then
'NO AGREGAR ARCHIVOS REPETIDOS 'NO AGREGAR ARCHIVOS REPETIDOS
Dim File As New IO.FileInfo(pathPDF) Dim File As New IO.FileInfo(pathPDF)
If Not DescargaZIP.Any(Function(x) x.FileName.Contains(File.Name)) Then If Not DescargaZIP.Any(Function(x) x.FileName.Contains(File.Name)) Then
DescargaZIP.AddFile(pathPDF, gvr.DataKey("TipoDocumento").ToString) DescargaZIP.AddFile(pathPDF, gvr.DataKey("TipoDocumento").ToString)
End If End If
End If End If
End If End If
Next Next
@@ -923,7 +923,7 @@ Partial Class RepVentaDetalle
Response.AddHeader("content-Disposition", "attachment; filename=ReporteVentasPDF.zip") Response.AddHeader("content-Disposition", "attachment; filename=ReporteVentasPDF.zip")
Response.ContentType = "application/zip" Response.ContentType = "application/zip"
Response.End() Response.End()
End Sub End Sub
Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte() Private Function DescargarFactura(CveVenta As Integer, CveEmpresa As Integer, CveUsuarioCreo As Integer) As Byte()
Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "http://localhost:85/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta)))) Dim Url = New Uri(String.Format("{0}Compras/PopUpVerFactura.aspx?P={1}", "http://localhost:85/", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", CveVenta))))
Dim File As Byte() = Nothing Dim File As Byte() = Nothing
@@ -978,8 +978,8 @@ Partial Class RepVentaDetalle
If IO.File.Exists(pathXML) Then If IO.File.Exists(pathXML) Then
'NO AGREGAR ARCHIVOS REPETIDOS 'NO AGREGAR ARCHIVOS REPETIDOS
Dim File As New IO.FileInfo(pathXML) Dim File As New IO.FileInfo(pathXML)
If Not DescargaZIP.Any(Function(x) x.FileName.Contains(File.Name)) Then If Not DescargaZIP.Any(Function(x) x.FileName.Contains(File.Name)) Then
DescargaZIP.AddFile(pathXML, gvr.DataKey("TipoDocumento").ToString) DescargaZIP.AddFile(pathXML, gvr.DataKey("TipoDocumento").ToString)
End If End If
End If End If
End If End If
@@ -1014,13 +1014,15 @@ Partial Class RepVentaDetalle
Vendedor = If(DdlVendedor.GetSelectedText = "", "", $"&emsp;<b>Vendedor:</b>&nbsp;{DdlVendedor.GetSelectedText}") Vendedor = If(DdlVendedor.GetSelectedText = "", "", $"&emsp;<b>Vendedor:</b>&nbsp;{DdlVendedor.GetSelectedText}")
CveUsuario = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Usuario:</b>&nbsp;{DdlUsuario.SelectedItem.Text}") CveUsuario = If(DdlUsuario.SelectedValue = "-1", "", $"&emsp;<b>Usuario:</b>&nbsp;{DdlUsuario.SelectedItem.Text}")
CveEstatusFactura = If(DdlEstatus.GetSelectedText = "", "", $"&emsp;<b>Estatus:</b>&nbsp;{DdlEstatus.GetSelectedText}") CveEstatusFactura = If(DdlEstatus.GetSelectedText = "", "", $"&emsp;<b>Estatus:</b>&nbsp;{DdlEstatus.GetSelectedText}")
CondicionesPago = If(DdlCondicionesPago.selectedValue = "-1", "", String.Format("&emsp;<b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text)) CondicionesPago = If(DdlCondicionesPago.selectedValue = "-1", "", String.Format("&emsp;<b>Condiciones Pago</b>: {0}", DdlCondicionesPago.SelectedItem.Text))
Dim RutaFormato = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta) Dim RutaFormato = String.Format("{0}Formatos\RepVentaDetalle.rdlc", UsuarioActual.Empresa.Ruta)
Dim Archivo As New System.IO.FileInfo(RutaFormato) Dim Archivo As New System.IO.FileInfo(RutaFormato)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
Dim logouri = String.Format("file://{0}", Imagen.FullName)
Dim dt As DataTable = DtVentas.FiltraParametros("(GPO IS NULL AND Cantidad IS NOT NULL) OR (GPO IS NOT NULL AND Cantidad IS NOT NULL)") Dim dt As DataTable = DtVentas.FiltraParametros("(GPO IS NULL AND Cantidad IS NOT NULL) OR (GPO IS NOT NULL AND Cantidad IS NOT NULL)")
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
@@ -1050,134 +1052,134 @@ Partial Class RepVentaDetalle
GenerarPDF() GenerarPDF()
End Sub End Sub
Private Function GenerarFacturaVentaDEV(CveVenta As Integer, CveUsuario As Integer) As Byte() Private Function GenerarFacturaVentaDEV(CveVenta As Integer, CveUsuario As Integer) As Byte()
Return DescargarFactura(CveVenta, UsuarioActual.CveEmpresa, CveUsuario) Return DescargarFactura(CveVenta, UsuarioActual.CveEmpresa, CveUsuario)
'Dim ObjVentas As New ClsVentas 'Dim ObjVentas As New ClsVentas
'Dim Vta As Modelos.Factura = Nothing 'Dim Vta As Modelos.Factura = Nothing
'Dim TmpDTImpuestos = New DataTable 'Dim TmpDTImpuestos = New DataTable
'TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String)) 'TmpDTImpuestos.Columns.Add("ImpuestoLocal", GetType(String))
'TmpDTImpuestos.Columns.Add("Importe", GetType(Double)) 'TmpDTImpuestos.Columns.Add("Importe", GetType(Double))
'TmpDTImpuestos.Columns.Add("Orden", GetType(Integer)) 'TmpDTImpuestos.Columns.Add("Orden", GetType(Integer))
'If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then 'If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
' Dim dtVentas As DataTable = ObjVentas.DtResultados ' Dim dtVentas As DataTable = ObjVentas.DtResultados
' ' se rellenan los campos de la factura ' ' se rellenan los campos de la factura
' Vta = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, Server.MapPath("/")) ' Vta = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa, Server.MapPath("/"))
' Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString ' Vta.MonedaAbreviatura = dtVentas(0)("Abreviatura").ToString
' 'se rellena la sucursal ' 'se rellena la sucursal
' Vta.Cliente.Sucursal = New Modelos.ClienteModel(dtVentas(0)("CveCliente").ToString.ToEntero, UsuarioActual.CveEmpresa) ' Vta.Cliente.Sucursal = New Modelos.ClienteModel(dtVentas(0)("CveCliente").ToString.ToEntero, UsuarioActual.CveEmpresa)
' Vta.Cliente = New Modelos.ClienteModel ' Vta.Cliente = New Modelos.ClienteModel
' Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString ' Vta.Cliente.Nombre = dtVentas(0)("ClienteNombre").ToString
' Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString ' Vta.Cliente.Telefono = dtVentas(0)("Telefono").ToString
' Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString ' Vta.Cliente.Direccion = dtVentas(0)("ClienteDireccion").ToString
' Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString ' Vta.Cliente.CP = dtVentas(0)("CPCliente").ToString
' Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString ' Vta.Cliente.Ciudad = dtVentas(0)("ClienteCiudad").ToString
' Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString ' Vta.Cliente.Localidad = dtVentas(0)("ClienteLocalidad").ToString
' Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString ' Vta.Cliente.Estado = dtVentas(0)("ClienteEstado").ToString
' Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString ' Vta.Cliente.Pais = dtVentas(0)("ClientePais").ToString
' Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString ' Vta.Cliente.RFC = dtVentas(0)("ClienteRFC").ToString
' Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString ' Vta.Cliente.Colonia = dtVentas(0)("ColoniaCliente").ToString
' Vta.AtencionA = dtVentas(0)("AtencionA").ToString ' Vta.AtencionA = dtVentas(0)("AtencionA").ToString
' Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString ' Vta.Cliente.NoExt = dtVentas(0)("ClienteNoExt").ToString
' Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString ' Vta.Cliente.NoInt = dtVentas(0)("ClienteNoInt").ToString
' Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString ' Vta.Cliente.Codigo = dtVentas(0)("ClienteCodigo").ToString
' Vta.Cliente.Mail = dtVentas(0)("Mail").ToString ' Vta.Cliente.Mail = dtVentas(0)("Mail").ToString
' Vta.RefDocto = dtVentas(0)("Ref").ToString ' Vta.RefDocto = dtVentas(0)("Ref").ToString
' Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero ' Vta.CveVenta = dtVentas(0)("CveVenta").ToString.ToEntero
' Vta.ClienteSucursal = New Modelos.SucursalModel ' Vta.ClienteSucursal = New Modelos.SucursalModel
' Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString ' Vta.ClienteSucursal.Direccion = dtVentas(0)("SucClienteDireccion").ToString
' Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString ' Vta.ClienteSucursal.NoExt = dtVentas(0)("SucClienteNoExt").ToString
' Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString ' Vta.ClienteSucursal.NoInt = dtVentas(0)("SucClienteNoInt").ToString
' Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString ' Vta.ClienteSucursal.Colonia = dtVentas(0)("SucClienteColonia").ToString
' Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString ' Vta.ClienteSucursal.CP = dtVentas(0)("SucClienteCP").ToString
' Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString ' Vta.ClienteSucursal.Municipio = dtVentas(0)("SucClienteCiudad").ToString
' Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString ' Vta.ClienteSucursal.Estado = dtVentas(0)("SucClienteEstado").ToString
' Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString ' Vta.ClienteSucursal.Pais = dtVentas(0)("SucClientePais").ToString
' Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString ' Vta.ClienteSucursal.Localidad = dtVentas(0)("SucClienteLocalidad").ToString
' Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString ' Vta.ClienteSucursal.CorreoSucursal = dtVentas(0)("SucClienteCorreo").ToString
' Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString ' Vta.ClienteSucursal.TelefonoSucursal = dtVentas(0)("SucClienteTelefono").ToString
' Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString ' Vta.ClienteSucursal.Sucursal = dtVentas(0)("SucursalCliente").ToString
' Vta.EnviarA = New Modelos.EnviarAModel ' Vta.EnviarA = New Modelos.EnviarAModel
' Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero ' Vta.EnviarA.CveDireccionEnvio = dtVentas(0)("CveDireccionEnvio").ToString.ToEntero
' Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString ' Vta.EnviarA.EnvioDireccion = dtVentas(0)("EnvioDireccion").ToString
' Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString ' Vta.EnviarA.EnvioColonia = dtVentas(0)("EnvioColonia").ToString
' Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString ' Vta.EnviarA.EnvioCiudad = dtVentas(0)("EnvioCiudad").ToString
' Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString ' Vta.EnviarA.EnvioEstado = dtVentas(0)("EnvioEstado").ToString
' Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString ' Vta.EnviarA.EnvioCP = dtVentas(0)("EnvioCP").ToString
' Dim DR As DataRow = TmpDTImpuestos.NewRow() ' Dim DR As DataRow = TmpDTImpuestos.NewRow()
' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then ' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
' If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("SubTotal").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Subtotal" : DR("Importe") = dtVentas(0)("SubTotal").ToString.ToDouble : DR("Orden") = 10 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("Descuento").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Descuentos" : DR("Importe") = dtVentas(0)("Descuento").ToString.ToDouble : DR("Orden") = 20 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("Amortizacion").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Amort.Ant" : DR("Importe") = dtVentas(0)("Amortizacion").ToString.ToDouble : DR("Orden") = 30 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("SubTotal").ToString.ToDouble <> (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) Then DR("ImpuestoLocal") = "SubTotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) : DR("Orden") = 40 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("IVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "IVA" : DR("Importe") = dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 50 : TmpDTImpuestos.Rows.Add(DR)
' 'solo para eclipse, que muesre un subtotal debajo de IVA ' 'solo para eclipse, que muesre un subtotal debajo de IVA
' If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR) ' If UsuarioActual.CveEmpresa = 15 Then DR = TmpDTImpuestos.NewRow() : DR("ImpuestoLocal") = "Subtotal2" : DR("Importe") = (dtVentas(0)("SubTotal").ToString.ToDouble - dtVentas(0)("Descuento").ToString.ToDouble - dtVentas(0)("Amortizacion").ToString.ToDouble) + dtVentas(0)("IVA").ToString.ToDouble : DR("Orden") = 51 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("RetIVA").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.IVA" : DR("Importe") = dtVentas(0)("RetIVA").ToString.ToDouble : DR("Orden") = 60 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("RetISR").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Ret.ISR" : DR("Importe") = dtVentas(0)("RetISR").ToString.ToDouble : DR("Orden") = 70 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR) ' If dtVentas(0)("Total").ToString.ToDouble <> 0 Then DR("ImpuestoLocal") = "Total" : DR("Importe") = dtVentas(0)("Total").ToString.ToDouble : DR("Orden") = 1000 : TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' End If ' End If
' If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra ' If ObjVentas.GetVentaDetalle(CveVenta) Then 'Obtenemos el Detalle de la Oorden de Compra
' Vta.DtDetalle = ObjVentas.DtResultados ' Vta.DtDetalle = ObjVentas.DtResultados
' End If ' End If
' If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then ' If ObjVentas.GetVentaImpuestosLocales(CveVenta) Then
' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then ' If UsuarioActual.CveEmpresa.Contiene(1, 5, 15, 17, 72, 66, 79, 81, 109, 110, 111, 76) Then
' Dim dtImpuesto As DataTable = ObjVentas.DtResultados ' Dim dtImpuesto As DataTable = ObjVentas.DtResultados
' If dtImpuesto.Rows.Count > 0 Then ' If dtImpuesto.Rows.Count > 0 Then
' For Each Row As DataRow In dtImpuesto.Rows ' For Each Row As DataRow In dtImpuesto.Rows
' Dim Orden = 80 ' Dim Orden = 80
' If Row("Importe").ToString.ToDouble <> 0 Then ' If Row("Importe").ToString.ToDouble <> 0 Then
' DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString ' DR("ImpuestoLocal") = Row("ImpuestoLocal").ToString
' DR("Importe") = Row("Importe").ToString.ToDouble ' DR("Importe") = Row("Importe").ToString.ToDouble
' DR("Orden") = Orden ' DR("Orden") = Orden
' TmpDTImpuestos.Rows.Add(DR) ' TmpDTImpuestos.Rows.Add(DR)
' DR = TmpDTImpuestos.NewRow() ' DR = TmpDTImpuestos.NewRow()
' Orden = Orden + 1 ' Orden = Orden + 1
' End If ' End If
' Next ' Next
' End If ' End If
' Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC") ' Vta.DtDeduccion = TmpDTImpuestos.FiltraParametros("", Orderby:="Orden ASC")
' Else ' Else
' Vta.DtDeduccion = ObjVentas.DtResultados ' Vta.DtDeduccion = ObjVentas.DtResultados
' End If ' End If
' End If ' End If
' If ObjVentas.GetVentasFirmas(CveVenta) Then ' If ObjVentas.GetVentasFirmas(CveVenta) Then
' Vta.DtFirmas = ObjVentas.DtResultados ' Vta.DtFirmas = ObjVentas.DtResultados
' End If ' End If
'End If 'End If
'ObjVentas.Dispose() 'ObjVentas.Dispose()
'If Not IsNothing(Vta) Then 'If Not IsNothing(Vta) Then
' PdfFactura(Vta) ' PdfFactura(Vta)
' Vta = Nothing ' Vta = Nothing
'End If 'End If
End Function End Function
#End Region #End Region
#Region "GRAFICA" #Region "GRAFICA"
Private Sub CreaDataTableColor() Private Sub CreaDataTableColor()
DtColor = New DataTable DtColor = New DataTable
DtColor.Columns.Add("Color") DtColor.Columns.Add("Color")
@@ -1308,9 +1310,9 @@ Partial Class RepVentaDetalle
Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs) Protected Sub DdlVer_SelectedIndexChanged(sender As Object, e As EventArgs)
CambioGrafica() CambioGrafica()
End Sub End Sub
#End Region #End Region
End Class End Class