option explicit on
This commit is contained in:
@@ -1448,10 +1448,10 @@ Partial Class Clientes
|
||||
LblUsuarioCapturo.Text = ObjClientes.Usuario
|
||||
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
|
||||
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
|
||||
If String.IsNullOrEmpty(Vendedor) Then
|
||||
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 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 GeneroCliente = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
Dim GeneroCliente As Boolean = If(DdlGeneroCliente.SelectedValue.ToEntero = 1 Or DdlGeneroCliente.SelectedValue.ToEntero = -1, True, False)
|
||||
|
||||
If CveCliente = -1 Then
|
||||
Dim ErrorAC As Boolean = False
|
||||
@@ -3548,7 +3544,7 @@ Partial Class Clientes
|
||||
Dim ObjUsuario As New ClsSisUsuarios
|
||||
|
||||
Dim Liga As String = ObjParametro.Cadena1 & "Login.aspx"
|
||||
Dim CveUsuario = -1
|
||||
Dim CveUsuario As Integer = -1
|
||||
Dim CvePlataforma As Integer = 6
|
||||
Dim ErrorUsuario As Boolean = False
|
||||
|
||||
@@ -10118,7 +10114,6 @@ Partial Class Clientes
|
||||
DdlRegimenFiscal.SelectedValue = Nothing
|
||||
End If
|
||||
End If
|
||||
|
||||
MuestraOcultaGenero()
|
||||
|
||||
DdlRegimenFiscal.DataSource = dt
|
||||
|
||||
@@ -9181,13 +9181,12 @@ Partial Class Ventas
|
||||
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
|
||||
Dim MensajeCosto As New StringBuilder
|
||||
Dim CostoMenor = 0.0D
|
||||
Dim CostoMayor = 0.0D
|
||||
Dim Costo = 0.0D
|
||||
Dim EsValido = False 'BANDERA
|
||||
Dim EsValidoMayor = False
|
||||
Dim EsValidoPU = True 'SOLO SE VALIDA CUANDO EL TXTPU = 0 Y LO INVALIDA ALGUNA PROMOCION
|
||||
|
||||
Dim CostoMenor As Decimal = 0.0D
|
||||
Dim CostoMayor As Decimal = 0.0D
|
||||
Dim Costo As Decimal = 0.0D
|
||||
Dim EsValido As Boolean = False 'BANDERA
|
||||
Dim EsValidoMayor As Boolean = False
|
||||
Dim EsValidoPU As Boolean = True 'SOLO SE VALIDA CUANDO EL TXTPU = 0 Y LO INVALIDA ALGUNA PROMOCION
|
||||
|
||||
'VALIDA PROMOCIONES Y EXISTENCIAS
|
||||
Dim ObjVentas As New ClsVentas
|
||||
@@ -9198,12 +9197,12 @@ Partial Class Ventas
|
||||
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim PU = 0.0D
|
||||
Dim PU As Decimal = 0.0D
|
||||
Dim Cantidad As Double
|
||||
Dim CveUnidad As Integer
|
||||
Dim CveProducto As Integer
|
||||
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
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
@@ -20213,9 +20212,9 @@ Partial Class Ventas
|
||||
'Agregamos los detalles
|
||||
For Each MovDet As DataRow In DtMovDetalle.Rows
|
||||
|
||||
Dim Cantidad = 0.0
|
||||
Dim CantidadRemision = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDouble
|
||||
Dim CantidadInventario = MovDet("Cantidad").ToString().ToDecimal
|
||||
Dim Cantidad As Decimal = 0
|
||||
Dim CantidadRemision As Decimal = DtRemisionesTmpDT.FiltroPrimeroValor("Cantidad", $"CveVentaDetalleRemision={MovDet("CveVentaDetalle").ToString()}").ToDecimal
|
||||
Dim CantidadInventario As Decimal = MovDet("Cantidad").ToString().ToDecimal
|
||||
|
||||
If RemisionesLista.Count > 0 AndAlso ChkRemProductos.Checked AndAlso CantidadInventario >= CantidadRemision Then
|
||||
Cantidad = CantidadRemision
|
||||
@@ -20234,7 +20233,7 @@ Partial Class Ventas
|
||||
|
||||
'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
|
||||
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
|
||||
If ConceptoEntrada = 40 AndAlso MovDet("CveVentaDetalle").ToString().ToEntero() > 0 Then
|
||||
CveVentaDetalleRemision = MovDet("CveVentaDetalle").ToString().ToEntero()
|
||||
@@ -20616,7 +20615,7 @@ Partial Class Ventas
|
||||
If CveMovimientoVirtual > 0 Then
|
||||
'OcurrioError = Not GeneraPrePolizaMovimientoAlmacen(ObjInventario, ObjConta, ObjContPaq, ObjFactura, ObjFactura.CvePrePoliza, CveMovimientoInventario, CveAlmacen)
|
||||
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 ValorInventario As Decimal
|
||||
Dim TotalCostoAcumulado As Decimal = 0D
|
||||
@@ -20673,20 +20672,17 @@ Partial Class Ventas
|
||||
End Function
|
||||
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 CveMovimientoSalida = 0
|
||||
Dim CveMovimientoEntrada = 0
|
||||
Dim CveMovimientoSalida As Integer = 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 CveMovimientoEntrada2 = 0
|
||||
|
||||
Dim CveMovimientoSalida3 = 0
|
||||
Dim CveMovimientoEntrada3 = 0
|
||||
|
||||
Dim AlmacenEntrada = -1
|
||||
Dim FolioSalida = 0
|
||||
Dim FolioEntrada = 0
|
||||
|
||||
Dim TextoError = ""
|
||||
Dim TextoError As String = ""
|
||||
Dim TextoExistencia As StringBuilder = New StringBuilder
|
||||
|
||||
'Obtenemos los movimientos detalle
|
||||
@@ -21795,8 +21791,8 @@ Partial Class Ventas
|
||||
If TxtCodigoSerie.Text.Trim <> "" Then
|
||||
Dim Serie As String = TxtCodigoSerie.Text.Trim().ToUpper()
|
||||
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 ExistenciaActual = DtInv.SUM("Cantidad", String.Format("Serie = '{0}'", Serie))
|
||||
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 As Decimal = DtInv.SUMD("Cantidad", String.Format("Serie = '{0}'", Serie))
|
||||
CvePS = Objinventarios.CvePS
|
||||
Objinventarios.Dispose()
|
||||
|
||||
@@ -33535,7 +33531,7 @@ Partial Class Ventas
|
||||
Dim CveEmpresaPDF As Integer = UsuarioActual.CveEmpresa
|
||||
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)
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al regenerar el PDF", ex)
|
||||
@@ -33544,7 +33540,7 @@ Partial Class Ventas
|
||||
|
||||
Private Function DeshabilitarAplicarNotaDeCredito(RFC As String) As Boolean
|
||||
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
|
||||
UpnTools.Update()
|
||||
Retorno = True
|
||||
|
||||
Reference in New Issue
Block a user