Compras mensaje GDiaz fecha devolucion, Clientes liga NS y Ancipos a Venta

This commit is contained in:
rakcsle
2025-02-21 15:47:43 -07:00
parent db54e35dd9
commit cb578a4544
2 changed files with 40 additions and 7 deletions

View File

@@ -1260,6 +1260,21 @@ Partial Class Compras_Compras
End Set
End Property
Private Property FechaMovtoDev As Date
Get
If ViewState("FechaMovtoDev") Is Nothing Then
ViewState("FechaMovtoDev") = MinFecha
End If
Return ViewState("FechaMovtoDev").ToString.ToDate
End Get
Set(value As Date)
ViewState("FechaMovtoDev") = value
End Set
End Property
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -13954,6 +13969,7 @@ Partial Class Compras_Compras
Private Sub cargaddldevoluciones(CveProveedor As Integer, SubTotal As Double)
Dim objcompras As New ClsCompras()
If objcompras.GetCompraParaDevolucion(CveProveedor, UsuarioActual.CveEmpresa, SubTotal) Then
DDLDevolucion.Items.Clear()
Dim dtt As DataTable = objcompras.DtResultados
@@ -13971,6 +13987,9 @@ Partial Class Compras_Compras
End Sub
Protected Sub DDLDevolucion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DDLDevolucion.SelectedIndexChanged
FechaMovtoDev = MinFecha
If DdlTipoComprobante.SelectedValue.Contiene("DEV") Then
DivAlmacenDev.Visible = True
End If
@@ -13978,6 +13997,7 @@ Partial Class Compras_Compras
Dim objcompras As New ClsCompras()
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
GVDevolucion.DataSource = objcompras.DtResultados
FechaMovtoDev = objcompras.DtResultados.FiltroPrimeroValor("FechaMovto").ToDate.ToString("dd/MM/yyyy").ToDate
End If
objcompras.Dispose()
GVDevolucion.DataBind()
@@ -13988,8 +14008,12 @@ Partial Class Compras_Compras
End If
Next
DdlAlmacenDevolucion.SelectedValueExist(CveAlmacen)
UPDevolucion.Update()
If EsGrupoDiaz AndAlso FechaMovtoDev <> MinFecha AndAlso (FechaMovtoDev >= TxtFecha.Text.ToDate) Then
Alert("La fecha de la devolución se cambiará a una fecha posterior al ingreso.", TipoMensaje.ToastAdventencia)
End If
End Sub
'Protected Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
' cargaddldevoluciones(CveProveedor, TextBox1.Text.ToDouble)
@@ -14026,6 +14050,13 @@ Partial Class Compras_Compras
If UsuarioActual.Empresa.Funcionalidad(574) = "1" Then tTolerancia = Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion)
If Math.Abs(TxtSubTotal2.Text.ToDecimal - subtotaldevolucion) <= tTolerancia Then
VinculaDevolucion()
If EsGrupoDiaz AndAlso FechaMovtoDev <> MinFecha AndAlso (FechaMovtoDev >= TxtFecha.Text.ToDate) Then
TxtFecha.Text = FechaMovtoDev.AddDays(1).ToString("dd/MM/yyyy")
Alert("La fecha de la devolución se cambiará a una fecha posterior al ingreso.", TipoMensaje.ToastAdventencia)
UpParametros.Update()
End If
Else
Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia)
End If

View File

@@ -3039,12 +3039,14 @@ Partial Class Clientes
If e.Row.RowIndex > -1 Then
If e.Row.DBCampo("Folio") = "N/D" Then
e.Row.FCLiteral("LtlFactura").Text = e.Row.DataKey("Folio")
Else
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio"))
Else
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio"))
End If
Else
If e.Row.DataKey("Tipo").ToUpper().Contiene("NC", "ANT") Then
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Ventas/Ventas.aspx?CveVenta={0}"">{1}</a>", e.Row.DataKey("CveVenta"), e.Row.DataKey("Folio"))
Else
If e.Row.DataKey("CveIE").ToString().ToEntero() > 0 Then
e.Row.FCLiteral("LtlFactura").Text = String.Format("<a class=""Texto"" href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a>", e.Row.DataKey("CveIE"), e.Row.DataKey("Folio"))
End If
End If
End If
End If