This commit is contained in:
@@ -2835,8 +2835,8 @@ Partial Class Compras_Compras
|
||||
GvAnticiposSel.DataBind()
|
||||
|
||||
|
||||
'' VALIDA ELIMINAR COMPRA
|
||||
If UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135) Then ' Eliminar compra
|
||||
'' VALIDA ELIMINAR COMPRA, QUE NO TENGA PAGOS CONCILIADOS
|
||||
If (UsuarioActual.TienePermisoProceso(77) OrElse UsuarioActual.TienePermisoProceso(135)) AndAlso dr("NumPagosConciliados").ToString.ToEntero = 0 Then ' Eliminar compra
|
||||
|
||||
'SIN VINCULACIÓN
|
||||
If UsuarioActual.TienePermisoProceso(135) Then
|
||||
@@ -10858,10 +10858,11 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
If e.Row.DataKey("DifPSSat").ToEntero = 1 Then
|
||||
'#e35b5a
|
||||
e.Row.BackColor = Drawing.Color.FromArgb(1, 227, 91, 90)
|
||||
|
||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#EFD569") 'Drawing.Color.FromArgb(1, 227, 91, 90)'#e35b5a
|
||||
e.Row.Attributes.Add("data-toggle", "tooltip")
|
||||
e.Row.Attributes.Add("title", "El código del producto del SAT no es igual al código del producto registrado.")
|
||||
e.Row.Attributes.Add("data-html", "true")
|
||||
e.Row.Attributes.Add("title", String.Format("El código del producto del SAT no es igual al código del producto registrado. <br/>Código XML:{0} <br/> Código Sistema:{1} ", e.Row.DBCampo("ClaveProdServ"), e.Row.DBCampo("SATClavePS")))
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
@@ -2845,6 +2845,19 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
DdlSeccionAlmacen.DataBind()
|
||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
UpDatos.Update()
|
||||
|
||||
Dim DrAlmO As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrAlmO("CveTipoAlmacen").ToString.ToEntero = 26 Then 'costeados
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (3,4,9,10,11,24) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@
|
||||
<i></i>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="false" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
|
||||
<asp:DropDownList ID="DdlUnidadMedida" OnSelectedIndexChanged="DdlUnidadMedida_SelectedIndexChanged" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" AutoPostBack="true" CausesValidation="true" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida" Width="206px">
|
||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlUnidadMedida.ClientID.ToString()%>">Unidad de Medida:</label>
|
||||
|
||||
@@ -106,6 +106,15 @@ Partial Class ProductosyServicios
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveUnidadMedida As Integer
|
||||
Get
|
||||
Return ViewState("CveUnidadMedida").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveUnidadMedida") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
#End Region
|
||||
|
||||
@@ -769,6 +778,7 @@ Partial Class ProductosyServicios
|
||||
End If
|
||||
DdlTipoPSDes.SelectedValueExist(ObjProductosServicios.CveClasificacionDetalle.ToString)
|
||||
DdlUnidadMedida.SelectedValue = ObjProductosServicios.CveUnidadMedida.ToString
|
||||
CveUnidadMedida = ObjProductosServicios.CveUnidadMedida.ToString.ToEntero
|
||||
DdlMarca.SelectedValue = ObjProductosServicios.CveMarca.ToString
|
||||
DdlMarcaPSDes.SelectedValue = ObjProductosServicios.CveMarca.ToString
|
||||
TxtCodigo.Text = ObjProductosServicios.Codigo
|
||||
@@ -2653,23 +2663,32 @@ Partial Class ProductosyServicios
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkSerie_CheckedChanged(sender As Object, e As EventArgs)
|
||||
If ChkSerie.Checked Then
|
||||
ddlMetodos.SelectedValueExist("5")
|
||||
If ElProductoTieneExistencia() Then
|
||||
ChkSerie.Checked = Not ChkSerie.Checked
|
||||
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
ddlMetodos.SelectedValueExist("-1")
|
||||
If ChkSerie.Checked Then
|
||||
ddlMetodos.SelectedValueExist("5")
|
||||
Else
|
||||
ddlMetodos.SelectedValueExist("-1")
|
||||
End If
|
||||
UpConta.Update()
|
||||
End If
|
||||
UpConta.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkSeccion_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkSeccion.Checked Then
|
||||
DivSeccionAlmacen.Visible = True
|
||||
If ElProductoTieneExistencia() Then
|
||||
ChkSeccion.Checked = Not ChkSerie.Checked
|
||||
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
DivSeccionAlmacen.Visible = False
|
||||
End If
|
||||
If ChkSeccion.Checked Then
|
||||
DivSeccionAlmacen.Visible = True
|
||||
Else
|
||||
DivSeccionAlmacen.Visible = False
|
||||
End If
|
||||
|
||||
UpSeccionAlmacen.Update()
|
||||
UpSeccionAlmacen.Update()
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
@@ -2680,4 +2699,21 @@ Partial Class ProductosyServicios
|
||||
|
||||
UpModalSeccionAlmacen.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlUnidadMedida_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If ElProductoTieneExistencia() Then
|
||||
DdlUnidadMedida.SelectedValue = CveUnidadMedida.ToString
|
||||
Alert("el producto no se puede cambiar la opcion, porque tiene existencia.")
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Function ElProductoTieneExistencia() As Boolean
|
||||
Dim Existencia As Decimal = 0
|
||||
If CvePS > 0 Then
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Existencia = ObjInventarios.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, -1)
|
||||
ObjInventarios.Dispose()
|
||||
End If
|
||||
Return Existencia > 0
|
||||
End Function
|
||||
End Class
|
||||
|
||||
Reference in New Issue
Block a user