Poder actualizar la fecha de pago en compra
Se acomodo gridview principal
This commit is contained in:
@@ -2634,6 +2634,7 @@ Partial Class Compras_Compras
|
||||
DdlPS.Enabled = True
|
||||
TxtObsPS.Enabled = True
|
||||
LbAgregar.Enabled = True
|
||||
LnkUpdateFechaPago.Visible = True
|
||||
End If
|
||||
|
||||
BtnGuardar.Visible = False
|
||||
@@ -9947,18 +9948,18 @@ Partial Class Compras_Compras
|
||||
If Not (e.Row.RowState = DataControlRowState.Edit OrElse e.Row.RowState = 5) Then
|
||||
|
||||
If e.Row.RowIndex = 0 Then
|
||||
e.Row.Cells(0).Width = Unit.Pixel(15)
|
||||
e.Row.Cells(1).Width = Unit.Pixel(45)
|
||||
e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||
e.Row.Cells(3).Width = Unit.Pixel(230)
|
||||
e.Row.Cells(4).Width = Unit.Pixel(202)
|
||||
e.Row.Cells(5).Width = Unit.Pixel(155)
|
||||
e.Row.Cells(6).Width = Unit.Pixel(155)
|
||||
e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(9).Width = Unit.Pixel(80)
|
||||
e.Row.Cells(10).Width = Unit.Pixel(43)
|
||||
e.Row.Cells(11).Width = Unit.Pixel(43)
|
||||
'e.Row.Cells(0).Width = Unit.Pixel(15)
|
||||
'e.Row.Cells(1).Width = Unit.Pixel(45)
|
||||
'e.Row.Cells(2).Width = Unit.Pixel(70)
|
||||
'e.Row.Cells(3).Width = Unit.Pixel(230)
|
||||
'e.Row.Cells(4).Width = Unit.Pixel(202)
|
||||
'e.Row.Cells(5).Width = Unit.Pixel(155)
|
||||
'e.Row.Cells(6).Width = Unit.Pixel(155)
|
||||
'e.Row.Cells(7).Width = Unit.Pixel(50)
|
||||
'e.Row.Cells(8).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(9).Width = Unit.Pixel(80)
|
||||
'e.Row.Cells(10).Width = Unit.Pixel(43)
|
||||
'e.Row.Cells(11).Width = Unit.Pixel(43)
|
||||
|
||||
If UsuarioActual.Empresa.UsaAC Then 'AndAlso (CveFactura > 0 Or CveCompra > 0)
|
||||
e.Row.Cells(12).Width = Unit.Pixel(150)
|
||||
@@ -18816,4 +18817,26 @@ Partial Class Compras_Compras
|
||||
AddPS2(EsNoDeducible:=EsNoDeducible)
|
||||
|
||||
End Sub
|
||||
Protected Sub LnkUpdateFechaPago_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjComp As New ClsCompras
|
||||
Dim FechaPagoAnterior As String = ""
|
||||
|
||||
If ObjComp.GetCompras(CveCompra, "-1", "-1", -1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjComp.DtResultados.Rows.Count > 0 Then
|
||||
FechaPagoAnterior = ObjComp.DtResultados.Rows(0)("FechaVencimiento").ToString.ToDate.ToShortDateString
|
||||
End If
|
||||
End If
|
||||
|
||||
If FechaPagoAnterior = TxtFechaPago.Text Then
|
||||
Alert("La fecha de pago seleccionada es igual que la anterior.", TipoMensaje.MsgAdvertencia)
|
||||
ObjComp.Dispose()
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ObjComp.UpdateFechaVencimientoCompra(CveCompra, TxtFechaPago.Text.ToDate, UsuarioActual.CveEmpresa) Then
|
||||
Alert("Fecha de pago actualizada correctamente.")
|
||||
End If
|
||||
|
||||
ObjComp.Dispose()
|
||||
End Sub
|
||||
End Class
|
||||
Reference in New Issue
Block a user