--merge WSApp.asmx

This commit is contained in:
2022-09-07 21:01:36 -07:00
51 changed files with 10297 additions and 840 deletions

View File

@@ -518,7 +518,7 @@
<%--GV DATOS--%>
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveCategoria,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
<HeaderStyle Height="30px" />
<Columns>
<asp:TemplateField>

View File

@@ -938,7 +938,6 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCTextBox("TbCantidadF").Text = "0"
End If
If TipoDocto = "DPe" Then
CveConsecSerie = e.Row.DBCampo("Consec").ToString().ToEntero()
PSSerie = e.Row.DBCampo("PS").ToString()
@@ -976,15 +975,7 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
If DdlAlmacen.SelectedValue.ToEntero() > 0 Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero(), UsuarioActual.CveEmpresa, True)
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero(), e.Row.DBCampo("CvePS").ToEntero())
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
'If dtt.Rows.Count > 1 Then
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
'End If
'dtt.Dispose()
End If
Else
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
End If
@@ -1027,19 +1018,27 @@ Partial Class Inventarios_EntregaAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
e.Row.FCTextBox("TbCantidadF").Text = "0"
If e.Row.DBCampo("CodigoBarras").Trim <> "" AndAlso UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
'NO BLOQUEA PARA ROL AD
If UsuarioActual.CveRol = 1 Then
If AplicaSerie Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
e.Row.FCTextBox("TbCantidadF").Text = "0"
Else
e.Row.FCTextBox("TbCantidadF").Text = e.Row.DBCampo("CantidadF").ToDecimal.ToString("#,##0.######")
End If
End If
If Not UsuarioActual.CveRol = 1 Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'acumuladoras
If e.Row.DBCampo("CveCategoria") <> "249" Then
e.Row.FCTextBox("TbCantidadF").Enabled = True
End If
Else
If Not UsuarioActual.CveRol = 1 Then
e.Row.FCTextBox("TbCantidadF").Enabled = False
e.Row.FCTextBox("TbCantidadF").Text = "0"
End If
End If
End If
@@ -1048,7 +1047,6 @@ Partial Class Inventarios_EntregaAlmacen
e.Row.FCCheckBox("cbInv").Enabled = False
End If
End If
End Sub

View File

@@ -553,12 +553,12 @@ Partial Class Inventarios_RecepcionAlmacen
BtnGuardar.Visible = False
TxtFecha.Text = Now.ToShortDateString
RVFecha.MaximumValue = MaxFecha.ToShortDateString
If UsuarioActual.CveEmpresa.Contiene(119) Then RVFecha.MinimumValue = Now.ToShortDateString : CEFecha.StartDate = Now Else RVFecha.MinimumValue = MinFecha.ToShortDateString
InicializaBitacoraTemporal()
DdlMonedaTC.Enabled = False
RVFecha.MaximumValue = Now.ToShortDateString
CEFecha.EndDate = Now
End Sub
''' <summary>
@@ -1537,14 +1537,14 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If CBool(e.Row.DBCampo("AplicaCaducidad")) Then
e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
e.Row.FCTextBox("TxtDividir").Visible = True
Else
e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False
End If
e.Row.FCTextBox("TxtCaducidad").Visible = True
e.Row.FCLinkButton("LnkCaducidad").Visible = True
e.Row.FCTextBox("TxtCaducidad").Text = Now.ToShortDateString
e.Row.FCTextBox("TxtDividir").Visible = True
Else
e.Row.FCTextBox("TxtCaducidad").Visible = False
e.Row.FCLinkButton("LnkCaducidad").Visible = False
End If
If CBool(e.Row.DBCampo("AplicaLote")) Then
e.Row.FCTextBox("TxtLote").Visible = True
@@ -2315,7 +2315,7 @@ Partial Class Inventarios_RecepcionAlmacen
End If
End If
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"))
Dim Existencia = ObjInventarios.GetExistenciasPS(gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:= (TxtFecha.Text & " " & Now.ToShortTimeString).ToDateTime.ToString("yyyy/MM/dd HH:mm"))
If Existencia < ExistenciaActual Then
MensajeExistencias.Append($"Producto: <b>{GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=gvr.DataKey("CvePS").ToString.ToEntero).FiltroPrimeroValor("PSCodigo")}</b>.</br>")
Continue For
@@ -3242,6 +3242,12 @@ Partial Class Inventarios_RecepcionAlmacen
End If
Else
Dim CveTipoAlmacen As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero()).FiltroPrimeroValor("CveTipoAlmacen").ToEntero()
If CveTipoAlmacen = 21 Then 'tipo: devs a proveedore
RealizarMovimientoVirtual = False
End If
If RealizarMovimientoVirtual Then
Dim DtPSVirtual As New DataTable("DtTamanios")

View File

@@ -365,7 +365,7 @@ Partial Class Inventarios_TraspasoAlmacen
Private Sub CargaMovimientoGarantia(CveFolioGarantia As Integer)
Using ObjAcum As New ClsAcumuladores
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia) Then
If ObjAcum.GetFoliosGarantiasDetalle(CveFolioGarantia, CveEstatusConsecutivo:=1) Then
''carga
Dim dra As DataRow = ObjAcum.DtResultados(0)
DivMov.Visible = True
@@ -572,7 +572,7 @@ Partial Class Inventarios_TraspasoAlmacen
If TxtnSerie.Visible Then
Cantidad = 1
If String.IsNullOrEmpty(TxtnSerie.Text.Trim()) OrElse String.IsNullOrWhiteSpace(TxtnSerie.Text.Trim()) Then
Alert("Serie es necesario", TipoMensaje.MsgAdvertencia)
Alert("Serie es necesario.", TipoMensaje.MsgAdvertencia)
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
Exit Sub
End If
@@ -641,7 +641,7 @@ Partial Class Inventarios_TraspasoAlmacen
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1")
Dim tSerie As String = If(TxtnSerie.Visible, TxtnSerie.Text, "-1").Trim
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, tSerie, tLote, tCaducidad)
@@ -738,7 +738,7 @@ Partial Class Inventarios_TraspasoAlmacen
registro.Item("CvePS") = CvePS
registro.Item("PS") = DrPS("PSCodigo")
registro.Item("Observaciones") = Observaciones
registro.Item("Serie") = Serie
registro.Item("Serie") = Serie.Trim
registro.Item("Lote") = Lote
If FechaCaducidad > MinFecha Then registro.Item("FechaCaducidad") = FechaCaducidad
registro.Item("CveClasificacion") = CveClasificacion
@@ -1486,7 +1486,7 @@ Partial Class Inventarios_TraspasoAlmacen
Private Sub CargaGvDatos()
EscondeColumnasGVM(DtMovimientos)
GvDatos.DataSource = DtMovimientos
GvDatos.DataSource = DtMovimientos.FiltraParametros("", "No desc")
GvDatos.DataBind()
UpDatos.Update()
End Sub
@@ -1798,13 +1798,6 @@ Partial Class Inventarios_TraspasoAlmacen
If CBool(e.Row.DBCampo("AplicaSeccion")) AndAlso DdlAlmacenRecepcion.SelectedValue.ToEntero > 0 Then
CargaSeccionesAlmacen(e.Row.FCDropDownList("DdlSeccionAlmacen"), DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero, UsuarioActual.CveEmpresa)
'Dim dtt As DataTable = GlobalDTInvPSSeccionesAlmacen(UsuarioActual.CveEmpresa, DdlAlmacenRecepcion.SelectedValue.ToEntero, e.Row.DBCampo("CvePS").ToEntero)
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = dtt
'e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
'If dtt.Rows.Count > 1 Then
' e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
'End If
'dtt.Dispose()
End If
@@ -1821,9 +1814,12 @@ Partial Class Inventarios_TraspasoAlmacen
'FUNCIONALIDAD PISTOLA DE CODIGOS
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
e.Row.FCTextBox("TxtCantidad").Enabled = False
If e.Row.DBCampo("CveCategoria") <> "249" Then
e.Row.FCTextBox("TxtCantidad").Enabled = True
End If
End If
End If
End If
End Sub
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
@@ -2364,9 +2360,9 @@ Partial Class Inventarios_TraspasoAlmacen
TdSeriePS.Visible = False
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text}'")
Dim DrPS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero($"CodigoBarras = '{TxtCodigoPS.Text.Trim}'")
If DrPS Is Nothing Then
Alert($"No se ha encontrado un producto del Codigo ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
Alert($"No se ha encontrado un producto del Código: ""<b>{TxtCodigoPS.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus,200);")
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
TxtCodigoPS.Text = ""
Exit Sub
@@ -2392,7 +2388,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim Valido = ValidaExistencia(1, CvePSSerie, CveUMSerie, -1, TxtSeriePS.Text.Trim, "-1", MinFecha)
If Valido Then
AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim)
AgregarPS(1, CvePSSerie, CveUMSerie, Serie:=TxtSeriePS.Text.Trim.ToUpper)
Else
TxtSeriePS.Text = ""
TxtSeriePS.Focus()
@@ -2444,7 +2440,7 @@ Partial Class Inventarios_TraspasoAlmacen
If Existe Then
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{PSTemp}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Else
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Alert($"No se ha encontrado un producto para surtir con el Código: ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
End If
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
@@ -2458,7 +2454,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If
For Each Gvr As GridViewRow In GvDatosRecepcion.Rows
If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim Then
If Gvr.DataKey("CodigoBarras") = TxtCodigoPSRecepcion.Text.Trim And Gvr.DataKey("Serie") = TxtSeriePSRecepcion.Text.Trim.ToUpper Then
Dim TxtCantidad = GvDatosRecepcion.Rows(Gvr.RowIndex).FCTextBox("TxtCantidad")
If Gvr.DataKey("Cantidad").ToDecimal - TxtCantidad.Text.ToDecimal - 1 >= 0 Then
@@ -2470,15 +2466,15 @@ Partial Class Inventarios_TraspasoAlmacen
Exit Sub
End If
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Alert($"Ya se ha cargado la totalidad del Producto ""<b>{Gvr.DataKey("PS").ToString}</b>"" con el Código ""<b>{TxtCodigoPSRecepcion.Text}</b>"".", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
End If
Next
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
Alert($"No se ha encontrado un producto para surtir con el Codigo ""<b>{TxtCodigoPSRecepcion.Text}</b>"". Serie:{TxtSeriePSRecepcion.Text.Trim} ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus1,200);")
RegistraScript("playsonidito(''142608__autistic-lucario__error.wav'')")
'Alert($"Ya se han cargado todos los productos o no se ha encontrado un producto de la Serie ""<b>{TxtSeriePSRecepcion.Text}</b>"". ", TipoMensaje.MsgAdvertencia, "window.setTimeout(Focus2,200);")
TxtSeriePSRecepcion.Text = ""
End Sub
#End Region