option explicit on
This commit is contained in:
@@ -1448,10 +1448,10 @@ Partial Class Clientes
|
|||||||
LblUsuarioCapturo.Text = ObjClientes.Usuario
|
LblUsuarioCapturo.Text = ObjClientes.Usuario
|
||||||
TxtNombreCorto.Text = ObjClientes.NombreCorto
|
TxtNombreCorto.Text = ObjClientes.NombreCorto
|
||||||
|
|
||||||
Dim CveVendedor = ObjClientes.Vendedor.ToEntero()
|
Dim CveVendedor As Integer = ObjClientes.Vendedor.ToEntero()
|
||||||
'SI YA TIENE UN VALOR ASIGNADO SELECCIONA EL GUARDADO
|
'SI YA TIENE UN VALOR ASIGNADO SELECCIONA EL GUARDADO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
Dim Vendedor = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=1).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedor))
|
Dim Vendedor As String = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=1).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedor))
|
||||||
'SI NO ENCUENTRA BUSCA EN LOS VENDEDORES DEL PV
|
'SI NO ENCUENTRA BUSCA EN LOS VENDEDORES DEL PV
|
||||||
If String.IsNullOrEmpty(Vendedor) Then
|
If String.IsNullOrEmpty(Vendedor) Then
|
||||||
Vendedor = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedor))
|
Vendedor = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=4).FiltroPrimeroValor("Vendedor", String.Format("CveVendedor = {0}", CveVendedor))
|
||||||
@@ -2501,12 +2501,8 @@ Partial Class Clientes
|
|||||||
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
Dim LG As String = If(HDLG.Value.ToDouble <> 0, HDLG.Value, "0")
|
||||||
|
|
||||||
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
Dim TipoPersona As Boolean = If(RdTipoPersona.SelectedValue.ToEntero = 1, True, False)
|
||||||
|
|
||||||
|
|
||||||
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
Dim FechaLimiteCredito As Date = If(TxtFechaLimiteCredito.Text.Trim.Length > 0, TxtFechaLimiteCredito.Text.ToDate, New Date(1900, 1, 1))
|
||||||
|
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||||
|
|
||||||
Dim GeneroCliente = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
|
||||||
|
|
||||||
If CveCliente = -1 Then
|
If CveCliente = -1 Then
|
||||||
Dim ErrorAC As Boolean = False
|
Dim ErrorAC As Boolean = False
|
||||||
@@ -3548,7 +3544,7 @@ Partial Class Clientes
|
|||||||
Dim ObjUsuario As New ClsSisUsuarios
|
Dim ObjUsuario As New ClsSisUsuarios
|
||||||
|
|
||||||
Dim Liga As String = ObjParametro.Cadena1 & "Login.aspx"
|
Dim Liga As String = ObjParametro.Cadena1 & "Login.aspx"
|
||||||
Dim CveUsuario = -1
|
Dim CveUsuario As Integer = -1
|
||||||
Dim CvePlataforma As Integer = 6
|
Dim CvePlataforma As Integer = 6
|
||||||
Dim ErrorUsuario As Boolean = False
|
Dim ErrorUsuario As Boolean = False
|
||||||
|
|
||||||
@@ -10118,7 +10114,6 @@ Partial Class Clientes
|
|||||||
DdlRegimenFiscal.SelectedValue = Nothing
|
DdlRegimenFiscal.SelectedValue = Nothing
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
MuestraOcultaGenero()
|
MuestraOcultaGenero()
|
||||||
|
|
||||||
DdlRegimenFiscal.DataSource = dt
|
DdlRegimenFiscal.DataSource = dt
|
||||||
|
|||||||
@@ -9181,13 +9181,12 @@ Partial Class Ventas
|
|||||||
If Not UsuarioActual.TienePermisoProceso(169) Then
|
If Not UsuarioActual.TienePermisoProceso(169) Then
|
||||||
If (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") AndAlso NuevaFactura <> 1) Or (DdlTipoComprobante.SelectedValue = "Cot" AndAlso BtnEmitirImprimir.Text = "Facturar") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119)) Then
|
If (DdlTipoComprobante.SelectedValue.Contiene("Rem", "Ing", "PA") AndAlso NuevaFactura <> 1) Or (DdlTipoComprobante.SelectedValue = "Cot" AndAlso BtnEmitirImprimir.Text = "Facturar") Or (DdlTipoComprobante.SelectedValue.Contiene("Cot") And UsuarioActual.CveEmpresa.Contiene(119)) Then
|
||||||
Dim MensajeCosto As New StringBuilder
|
Dim MensajeCosto As New StringBuilder
|
||||||
Dim CostoMenor = 0.0D
|
Dim CostoMenor As Decimal = 0.0D
|
||||||
Dim CostoMayor = 0.0D
|
Dim CostoMayor As Decimal = 0.0D
|
||||||
Dim Costo = 0.0D
|
Dim Costo As Decimal = 0.0D
|
||||||
Dim EsValido = False 'BANDERA
|
Dim EsValido As Boolean = False 'BANDERA
|
||||||
Dim EsValidoMayor = False
|
Dim EsValidoMayor As Boolean = False
|
||||||
Dim EsValidoPU = True 'SOLO SE VALIDA CUANDO EL TXTPU = 0 Y LO INVALIDA ALGUNA PROMOCION
|
Dim EsValidoPU As Boolean = True 'SOLO SE VALIDA CUANDO EL TXTPU = 0 Y LO INVALIDA ALGUNA PROMOCION
|
||||||
|
|
||||||
|
|
||||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
@@ -9198,12 +9197,12 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
Dim ObjInventarios As New ClsInventarios
|
Dim ObjInventarios As New ClsInventarios
|
||||||
Dim PU = 0.0D
|
Dim PU As Decimal = 0.0D
|
||||||
Dim Cantidad As Double
|
Dim Cantidad As Double
|
||||||
Dim CveUnidad As Integer
|
Dim CveUnidad As Integer
|
||||||
Dim CveProducto As Integer
|
Dim CveProducto As Integer
|
||||||
Dim Existencia As Double
|
Dim Existencia As Double
|
||||||
Dim CveAlmacen = ddlAlmacen.SelectedValue.ToEntero()
|
Dim CveAlmacen As Integer = ddlAlmacen.SelectedValue.ToEntero()
|
||||||
For Each dr As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
For Each dr As DataRow In TmpDT.FiltraParametros("CveTipoPS = 2").Rows
|
||||||
|
|
||||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||||
@@ -20213,9 +20212,9 @@ Partial Class Ventas
|
|||||||
'Agregamos los detalles
|
'Agregamos los detalles
|
||||||
For Each MovDet As DataRow In DtMovDetalle.Rows
|
For Each MovDet As DataRow In DtMovDetalle.Rows
|
||||||
|
|
||||||
Dim Cantidad = 0.0
|
Dim Cantidad As Decimal = 0
|
||||||
Dim CantidadRemision = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDouble
|
Dim CantidadRemision As Decimal = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDecimal
|
||||||
Dim CantidadInventario = MovDet("Cantidad").ToString().ToDecimal
|
Dim CantidadInventario As Decimal = MovDet("Cantidad").ToString().ToDecimal
|
||||||
|
|
||||||
If RemisionesLista.Count > 0 AndAlso ChkRemProductos.Checked AndAlso CantidadInventario >= CantidadRemision Then
|
If RemisionesLista.Count > 0 AndAlso ChkRemProductos.Checked AndAlso CantidadInventario >= CantidadRemision Then
|
||||||
Cantidad = CantidadRemision
|
Cantidad = CantidadRemision
|
||||||
@@ -20234,7 +20233,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'COMIENZA: VENTADETALLE
|
'COMIENZA: VENTADETALLE
|
||||||
'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION
|
'CUANDO SEA SALIDA VA POR LA VENTA DETALLE DE LA FACTURA DE LA REMISION - OJO!! SOLO FUNCIONA HASTA ORITA QUE SE HACE SALIDA SOLO CUANDO SE FACTURA LA REMISION
|
||||||
Dim CveVentaDetalle = If(ConceptoEntrada.Contiene(3, 40), TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero(), MovDet("CveVentaDetalle").ToString().ToEntero())
|
Dim CveVentaDetalle As Integer = If(ConceptoEntrada.Contiene(3, 40), TmpDT.FiltroPrimeroValor("CveVentaDetalle", $"Consec={Consec}").ToEntero(), MovDet("CveVentaDetalle").ToString().ToEntero())
|
||||||
Dim CveVentaDetalleRemision As Integer = -1
|
Dim CveVentaDetalleRemision As Integer = -1
|
||||||
If ConceptoEntrada = 40 AndAlso MovDet("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
If ConceptoEntrada = 40 AndAlso MovDet("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
||||||
CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero()
|
CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero()
|
||||||
@@ -20616,7 +20615,7 @@ Partial Class Ventas
|
|||||||
If CveMovimientoVirtual > 0 Then
|
If CveMovimientoVirtual > 0 Then
|
||||||
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
|
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtual, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
Dim DtCostos = ObjInventario.DtResultados.Copy
|
Dim DtCostos As DataTable = ObjInventario.DtResultados.Copy
|
||||||
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
|
Dim DtCostosDistinct As DataTable = ObjInventario.DtResultados.FiltraParametros("", "", {"CveClasificacion"})
|
||||||
Dim ValorInventario As Decimal
|
Dim ValorInventario As Decimal
|
||||||
Dim TotalCostoAcumulado As Decimal = 0D
|
Dim TotalCostoAcumulado As Decimal = 0D
|
||||||
@@ -20673,20 +20672,17 @@ Partial Class Ventas
|
|||||||
End Function
|
End Function
|
||||||
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
Private Function SalidaAlmacenMateriales(ByRef ObjInventario As ClsInventarios, CveOS As Integer, ByRef ObjConta As ClsContabilidad, ConSalida As Boolean, ConceptoMovimiento As Integer) As Boolean
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
Dim CveMovimientoSalida = 0
|
Dim CveMovimientoSalida As Integer = 0
|
||||||
Dim CveMovimientoEntrada = 0
|
Dim CveMovimientoEntrada As Integer = 0
|
||||||
|
Dim CveMovimientoSalida2 As Integer = 0
|
||||||
|
Dim CveMovimientoEntrada2 As Integer = 0
|
||||||
|
Dim CveMovimientoSalida3 As Integer = 0
|
||||||
|
Dim CveMovimientoEntrada3 As Integer = 0
|
||||||
|
Dim AlmacenEntrada As Integer = -1
|
||||||
|
Dim FolioSalida As Integer = 0
|
||||||
|
Dim FolioEntrada As Integer = 0
|
||||||
|
|
||||||
Dim CveMovimientoSalida2 = 0
|
Dim TextoError As String = ""
|
||||||
Dim CveMovimientoEntrada2 = 0
|
|
||||||
|
|
||||||
Dim CveMovimientoSalida3 = 0
|
|
||||||
Dim CveMovimientoEntrada3 = 0
|
|
||||||
|
|
||||||
Dim AlmacenEntrada = -1
|
|
||||||
Dim FolioSalida = 0
|
|
||||||
Dim FolioEntrada = 0
|
|
||||||
|
|
||||||
Dim TextoError = ""
|
|
||||||
Dim TextoExistencia As StringBuilder = New StringBuilder
|
Dim TextoExistencia As StringBuilder = New StringBuilder
|
||||||
|
|
||||||
'Obtenemos los movimientos detalle
|
'Obtenemos los movimientos detalle
|
||||||
@@ -21795,8 +21791,8 @@ Partial Class Ventas
|
|||||||
If TxtCodigoSerie.Text.Trim <> "" Then
|
If TxtCodigoSerie.Text.Trim <> "" Then
|
||||||
Dim Serie As String = TxtCodigoSerie.Text.Trim().ToUpper()
|
Dim Serie As String = TxtCodigoSerie.Text.Trim().ToUpper()
|
||||||
Dim Objinventarios As New ClsInventarios
|
Dim Objinventarios As New ClsInventarios
|
||||||
Dim Existencia = Objinventarios.GetExistenciasPS(-1, -1, UsuarioActual.CveEmpresa, -1, Serie:=Serie, ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
|
Dim Existencia As Decimal = Objinventarios.GetExistenciasPS(-1, -1, UsuarioActual.CveEmpresa, -1, Serie:=Serie, ExcluyeAdelantado:=1, PendientePorSurtir:=1, RestringirAlmacenes:=1, ExcluyeApartados:=-1, CveSubProyecto:=DdlSubProyectoDatos.SelectedValue.ToEntero())
|
||||||
Dim ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Serie))
|
Dim ExistenciaActual As Decimal = DtInv.SUMD("Cantidad", String.Format("Serie = '{0}'", Serie))
|
||||||
CvePS = Objinventarios.CvePS
|
CvePS = Objinventarios.CvePS
|
||||||
Objinventarios.Dispose()
|
Objinventarios.Dispose()
|
||||||
|
|
||||||
@@ -33535,7 +33531,7 @@ Partial Class Ventas
|
|||||||
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||||
Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
Dim CveUsuarioPDF As Integer = UsuarioActual.CveUsuario
|
||||||
|
|
||||||
Dim strURLHOST = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
Dim strURLHOST As String = String.Format("{0}://{1}:{2}", HttpContext.Current.Request.Url.Scheme, HttpContext.Current.Request.Url.Host, HttpContext.Current.Request.Url.Port)
|
||||||
RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
RegenerarPDF(CveVenta, CveEmpresaPDF, CveUsuarioPDF, strURLHOST)
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||||
@@ -33544,7 +33540,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
Private Function DeshabilitarAplicarNotaDeCredito(RFC As String) As Boolean
|
Private Function DeshabilitarAplicarNotaDeCredito(RFC As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
If UsuarioActual.CveEmpresa = 119 AndAlso RFC.Contiene("XAXX010101000", "XEXX010101000") AndAlso UsuarioActual.CveUsuario <> 1719 Then
|
If UsuarioActual.CveEmpresa = 119 AndAlso RFC.Contiene("XAXX010101000", "XEXX010101000") AndAlso Not UsuarioActual.CveUsuario.Contiene(1719, 3761) Then
|
||||||
LBNotaCredito.Visible = False
|
LBNotaCredito.Visible = False
|
||||||
UpnTools.Update()
|
UpnTools.Update()
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|||||||
Reference in New Issue
Block a user