Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -1457,7 +1457,8 @@ Partial Class Compras_Proveedores
|
||||
|
||||
#Region "LL E N A R - C O M B O S"
|
||||
Private Sub CargaResponsable()
|
||||
DdlCveUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
'DdlCveUsuarioResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa, DistinctColumns:={"CveUsuario", "Nombre"})
|
||||
DdlCveUsuarioResponsable.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("", DistinctColumns:={"CveUsuario", "Nombre"})
|
||||
DdlCveUsuarioResponsable.DataBind()
|
||||
End Sub
|
||||
Private Sub CargaClasificacionProveedor()
|
||||
|
||||
@@ -377,6 +377,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
'End If
|
||||
'dtt.Dispose()
|
||||
End If
|
||||
Else
|
||||
ThSeccion.Visible = False
|
||||
TrSeccion.Visible = False
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
|
||||
End If
|
||||
'activa lote
|
||||
If CBool(drp("AplicaLote")) Then
|
||||
@@ -453,11 +458,11 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
Dim Valido As Boolean = True
|
||||
Dim cantidadd As Double = txtCantidad.Text.ToDouble
|
||||
Dim Existencia As Double = GetExistencias(PSSelected, DdlUnidad.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1").ToString)
|
||||
If Existencia - txtCantidad.Text.ToDouble < 0 Then
|
||||
If Existencia - txtCantidad.Text.ToDouble - DtMovimientos.SUM("Cantidad", $"CvePS = {PSSelected} ") < 0 Then
|
||||
If Existencia <= 0 Then
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert(String.Format("Solo hay en existencia: {0}", Existencia), TipoMensaje.MsgAdvertencia)
|
||||
Alert(String.Format("Solo hay en existencia: {0}", Existencia - DtMovimientos.SUM("Cantidad", $"CvePS = {PSSelected} ")), TipoMensaje.MsgAdvertencia)
|
||||
If Not UsuarioActual.TienePermisoProceso(114) Then
|
||||
cantidadd = Existencia
|
||||
End If
|
||||
@@ -496,6 +501,22 @@ Partial Class Inventarios_ResguardoMaterial
|
||||
DdlClasificacion.SelectedValue = "-1"
|
||||
txtCantidad.Text = ""
|
||||
TxtObservacionesdetalle.Text = ""
|
||||
|
||||
ThCaducidad.Visible = False
|
||||
TrCaducidad.Visible = False
|
||||
TxtCaducidad.Text = ""
|
||||
ThLote.Visible = False
|
||||
TrLote.Visible = False
|
||||
TxtLote.Text = ""
|
||||
ThSerie.Visible = False
|
||||
TrSerie.Visible = False
|
||||
TxtnSerie.Visible = False
|
||||
TxtnSerie.Text = ""
|
||||
|
||||
ThSeccion.Visible = False
|
||||
TrSeccion.Visible = False
|
||||
DdlSeccionAlmacen.Items.Clear()
|
||||
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
@@ -382,8 +382,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
UpDatos.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
|
||||
End Sub
|
||||
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
||||
Dim Existencia As Boolean
|
||||
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
||||
|
||||
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
|
||||
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
@@ -419,8 +419,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
End Sub
|
||||
Private Function AddPSTemporal() As Boolean
|
||||
Dim Row As DataRow = TempDT.NewRow()
|
||||
Dim Lote As String
|
||||
Dim FechaCaducidad As Date
|
||||
Dim Lote As String = "-1"
|
||||
Dim FechaCaducidad As Date = MinFecha
|
||||
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
||||
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
||||
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
||||
@@ -465,7 +465,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If Existencia = 0 Then
|
||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert($"No hay existencia suficiente del producto. Solo hay en existencia: {Existencia}", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay existencia suficiente del producto. Solo hay en existencia: {Existencia - TempDT.SUM("Cantidad", $"CvePS = {DdlProductoServicio.SelectedValue.ToEntero} AND CveUM = {DdlUM.SelectedValue.ToEntero}")}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Return False
|
||||
End If
|
||||
@@ -580,8 +580,10 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
|
||||
RowTemp("UnidadMedida") = row.DataKey("UM")
|
||||
RowTemp("Observaciones") = ""
|
||||
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
||||
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
||||
RowTemp("Lote") = "-1"
|
||||
RowTemp("FechaCaducidad") = MinFecha
|
||||
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
||||
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
||||
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
|
||||
CodigoPS = RowTemp("CodigoPS").ToString
|
||||
|
||||
@@ -1005,7 +1007,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
||||
If Existencia = 0 Then
|
||||
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert($"No hay existencia suficiente del producto: {CodigoPS}, Solo hay en existencia: {Existencia}", TipoMensaje.MsgAdvertencia)
|
||||
Alert($"No hay existencia suficiente del producto: {CodigoPS}, Solo hay en existencia: {Existencia - TempDT.SUM("Cantidad", $"CvePS = {RowTemp("CvePS").ToString.ToEntero} AND CveUM = {RowTemp("CveUM").ToString.ToEntero}")}", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
TempDT.Rows.Add(RowTemp)
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
<asp:DropDownList ID="DdlVariable" runat="server" AutoPostBack="True" Width="300px" CssClass="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
<asp:ListItem Text="Usuarios" Value="GlobalDTUsuarios"></asp:ListItem>
|
||||
<asp:ListItem Text="UsuarioResponsable" Value="GlobalDTUsuarioResponsable"></asp:ListItem>
|
||||
<asp:ListItem Text="Empresas" Value="GlobalDTEmpresas"></asp:ListItem>
|
||||
<asp:ListItem Text="Roles" Value="GlobalDTRoles"></asp:ListItem>
|
||||
<asp:ListItem Text="Clientes" Value="GlobalDTCliente"></asp:ListItem>
|
||||
|
||||
@@ -7,7 +7,9 @@ Partial Class Sistemas_CatSesiones
|
||||
|
||||
Protected Sub BtnCargar_Click(sender As Object, e As EventArgs) Handles BtnCargar.Click
|
||||
If DdlVariable.SelectedItem.Value = "GlobalDTUsuarios" Then
|
||||
CargaUsuarios()
|
||||
CargaUsuarios()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTUsuarioResponsable" Then
|
||||
CargaUsuariosResponsable()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTAlmacenUsuarios" Then
|
||||
CargaAlmacenUsuarios()
|
||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTCliente" Then
|
||||
@@ -287,6 +289,19 @@ Partial Class Sistemas_CatSesiones
|
||||
'Fin Carga Usuarios
|
||||
End Sub
|
||||
|
||||
Private Sub CargaUsuariosResponsable()
|
||||
'Carga Usuarios
|
||||
Dim ObjUsuarios As New ClsSisUsuarios
|
||||
If ObjUsuarios.GetUsuariosEmpresas(-1) Then
|
||||
Alert(ObjUsuarios.DtResultados.Rows.Count.ToString)
|
||||
Application("GlobalDTUsuarioResponsable") = ObjUsuarios.DtResultados
|
||||
Else
|
||||
Application("GlobalDTUsuarioResponsable") = Nothing
|
||||
End If
|
||||
ObjUsuarios.Dispose()
|
||||
'Fin Carga Usuarios
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub CargaEmpresas()
|
||||
'Carga Empresas
|
||||
|
||||
Reference in New Issue
Block a user