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"
|
#Region "LL E N A R - C O M B O S"
|
||||||
Private Sub CargaResponsable()
|
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()
|
DdlCveUsuarioResponsable.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaClasificacionProveedor()
|
Private Sub CargaClasificacionProveedor()
|
||||||
|
|||||||
@@ -377,6 +377,11 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
'End If
|
'End If
|
||||||
'dtt.Dispose()
|
'dtt.Dispose()
|
||||||
End If
|
End If
|
||||||
|
Else
|
||||||
|
ThSeccion.Visible = False
|
||||||
|
TrSeccion.Visible = False
|
||||||
|
DdlSeccionAlmacen.Items.Clear()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
'activa lote
|
'activa lote
|
||||||
If CBool(drp("AplicaLote")) Then
|
If CBool(drp("AplicaLote")) Then
|
||||||
@@ -453,11 +458,11 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
Dim Valido As Boolean = True
|
Dim Valido As Boolean = True
|
||||||
Dim cantidadd As Double = txtCantidad.Text.ToDouble
|
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)
|
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
|
If Existencia <= 0 Then
|
||||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
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
|
If Not UsuarioActual.TienePermisoProceso(114) Then
|
||||||
cantidadd = Existencia
|
cantidadd = Existencia
|
||||||
End If
|
End If
|
||||||
@@ -496,6 +501,22 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
DdlClasificacion.SelectedValue = "-1"
|
DdlClasificacion.SelectedValue = "-1"
|
||||||
txtCantidad.Text = ""
|
txtCantidad.Text = ""
|
||||||
TxtObservacionesdetalle.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 Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|||||||
@@ -382,8 +382,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
|
RegistraScript(String.Format("$('#{0}').modal();", "ModalPS"))
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
Private Sub BtnAgregarPS_Click(sender As Object, e As EventArgs) Handles BtnAgregarPS.Click
|
||||||
Dim Existencia As Boolean
|
|
||||||
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
|
If Not DdlProductoServicio.SelectedValue.ToEntero > 0 Then
|
||||||
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que seleccionar un producto.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -419,8 +419,8 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
End Sub
|
End Sub
|
||||||
Private Function AddPSTemporal() As Boolean
|
Private Function AddPSTemporal() As Boolean
|
||||||
Dim Row As DataRow = TempDT.NewRow()
|
Dim Row As DataRow = TempDT.NewRow()
|
||||||
Dim Lote As String
|
Dim Lote As String = "-1"
|
||||||
Dim FechaCaducidad As Date
|
Dim FechaCaducidad As Date = MinFecha
|
||||||
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
Row("Cantidad") = TxtCantidad.Text.Trim.ToDouble
|
||||||
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
Row("CvePS") = DdlProductoServicio.SelectedValue.ToEntero
|
||||||
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
Row("CodigoPS") = DdlProductoServicio.SelectedText
|
||||||
@@ -465,7 +465,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
If Existencia = 0 Then
|
If Existencia = 0 Then
|
||||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
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
|
End If
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
@@ -580,8 +580,10 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
|
RowTemp("CveUM") = row.DataKey("CveUM").ToEntero
|
||||||
RowTemp("UnidadMedida") = row.DataKey("UM")
|
RowTemp("UnidadMedida") = row.DataKey("UM")
|
||||||
RowTemp("Observaciones") = ""
|
RowTemp("Observaciones") = ""
|
||||||
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
RowTemp("Lote") = "-1"
|
||||||
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
RowTemp("FechaCaducidad") = MinFecha
|
||||||
|
'RowTemp("CveDireccionEnvio") = DdlDireccionEnvio.SelectedValue
|
||||||
|
'RowTemp("DireccionEnvio") = IIf(DdlDireccionEnvio.SelectedValue = "-1", "", DdlDireccionEnvio.SelectedItem)
|
||||||
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
|
RowTemp("CveContratoDetalle") = row.DataKey("CveContratoDetalle")
|
||||||
CodigoPS = RowTemp("CodigoPS").ToString
|
CodigoPS = RowTemp("CodigoPS").ToString
|
||||||
|
|
||||||
@@ -1005,7 +1007,7 @@ Partial Class Inventarios_TrasladoSolicitud
|
|||||||
If Existencia = 0 Then
|
If Existencia = 0 Then
|
||||||
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
|
Alert($"No hay existencia del producto: {CodigoPS}", TipoMensaje.MsgAdvertencia)
|
||||||
Else
|
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
|
||||||
End If
|
End If
|
||||||
TempDT.Rows.Add(RowTemp)
|
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: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 Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Text="Usuarios" Value="GlobalDTUsuarios"></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="Empresas" Value="GlobalDTEmpresas"></asp:ListItem>
|
||||||
<asp:ListItem Text="Roles" Value="GlobalDTRoles"></asp:ListItem>
|
<asp:ListItem Text="Roles" Value="GlobalDTRoles"></asp:ListItem>
|
||||||
<asp:ListItem Text="Clientes" Value="GlobalDTCliente"></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
|
Protected Sub BtnCargar_Click(sender As Object, e As EventArgs) Handles BtnCargar.Click
|
||||||
If DdlVariable.SelectedItem.Value = "GlobalDTUsuarios" Then
|
If DdlVariable.SelectedItem.Value = "GlobalDTUsuarios" Then
|
||||||
CargaUsuarios()
|
CargaUsuarios()
|
||||||
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTUsuarioResponsable" Then
|
||||||
|
CargaUsuariosResponsable()
|
||||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTAlmacenUsuarios" Then
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTAlmacenUsuarios" Then
|
||||||
CargaAlmacenUsuarios()
|
CargaAlmacenUsuarios()
|
||||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTCliente" Then
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTCliente" Then
|
||||||
@@ -287,6 +289,19 @@ Partial Class Sistemas_CatSesiones
|
|||||||
'Fin Carga Usuarios
|
'Fin Carga Usuarios
|
||||||
End Sub
|
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()
|
Private Sub CargaEmpresas()
|
||||||
'Carga Empresas
|
'Carga Empresas
|
||||||
|
|||||||
Reference in New Issue
Block a user