This commit is contained in:
JORGE LUIS CAUDILLO ESPARZA
2020-01-10 17:28:22 -07:00
3 changed files with 49 additions and 30 deletions

View File

@@ -753,7 +753,21 @@ Public Class ClsAcumuladores
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un al agregar la garantia detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
OnError("Ocurrió un al obtener la garantía detalle. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function GetGarantiasPolizaVirtual(CveVenta As Integer) As Boolean
Dim Retorno As Boolean = False
SqlDataAdapter("PA_Acum_GarantiasPolizaVirtualGet")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As SqlException
OnError("Ocurrió un al obtener la información de poliza virtual.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function

View File

@@ -13590,35 +13590,40 @@ Partial Class Compras_Compras
' guardardevolucion(ObjInventario, cvecompra, subtotal, Now.ToDate)
'End Sub
Protected Sub BtnVinculaDevolucion_Click(sender As Object, e As EventArgs)
Dim subtotaldevolucion As Double = 0
Dim realizadevolucion As Boolean = False
Try
Dim subtotaldevolucion As Double = 0
Dim realizadevolucion As Boolean = False
'Calculo los subtotales para comparar con la NC
Dim cantidad As Double = 0.0
For Each Dr As GridViewRow In GVDevolucion.Rows
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
If cantidad > 0 Then
realizadevolucion = True
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad
End If
Next
'si no esta vinculado a nc simplemente me lo brinco
If realizadevolucion Then
'si el subtotal es iwal a la nc lo guardo si no marco error
If TxtSubTotal.Text.ToDouble > subtotaldevolucion - 1 AndAlso TxtSubTotal.Text.ToDouble < subtotaldevolucion + 1 Then
VinculaDevolucion()
Else
Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia)
End If
Else
Alert("No se ha seleccionado nada para la devolución. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
End If
Catch ex As Exception
OnError("Ocurrió un error al realizar la vinculación", ex)
End Try
'Calculo los subtotales para comparar con la NC
Dim cantidad As Double = 0.0
For Each Dr As GridViewRow In GVDevolucion.Rows
cantidad = Dr.FCTextBox("TxtCantidad").Text.ToDouble
If cantidad > 0 Then
realizadevolucion = True
subtotaldevolucion += Dr.DataKey("PU").ToString.ToDouble * cantidad
End If
Next
'si no esta vinculado a nc simplemente me lo brinco
If realizadevolucion Then
'si el subtotal es iwal a la nc lo guardo si no marco error
If TxtSubTotal.Text.ToDouble > subtotaldevolucion - 1 AndAlso TxtSubTotal.Text.ToDouble < subtotaldevolucion + 1 Then
VinculaDevolucion()
Else
Alert("El Total de la NC debe ser igual al total de la devolucion", TipoMensaje.MsgAdvertencia)
End If
Else
Alert("No se ha seleccionado nada para la devolución. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
End If
End Sub
Private Sub VinculaDevolucion()
@@ -13681,7 +13686,7 @@ Partial Class Compras_Compras
GvOC1.DataSource = DTOCTemp
Dim DTCVEOCS As DataTable = DTOCTemp.FiltraParametros("", "", {"CveOrdenCompra"})
If DTCVEOCS.Rows.Count > 1 Then
If DTCVEOCS IsNot Nothing AndAlso DTCVEOCS.Rows.Count > 1 Then
GvOC1.Columns(0).Visible = True
Else
GvOC1.Columns(0).Visible = False

View File

@@ -459,7 +459,7 @@ Partial Class Ventas_ClientesAbonar
TxtImporte.Text = ""
TxtObservaciones.Text = ""
If SumDescuentoProntoPago > 0.0 Then
GvCxC.Columns(15).Visible = True
GvCxC.Columns(14).Visible = True
End If
Mov.Dispose()