This commit is contained in:
Rakcsle Supertramp
2020-01-14 13:17:33 -07:00
51 changed files with 16555 additions and 15800 deletions

View File

@@ -13594,35 +13594,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()
@@ -13685,7 +13690,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

@@ -1471,7 +1471,7 @@ Partial Class PopUpVerFactura
If Archivo.Exists Then
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145) Then
If UsuarioActual.CveEmpresa.Contiene(1, 72, 80, 119, 4, 145, 146) Then
Dim CiudadSucursal As String = ""
Dim DomicilioSucursal As String = ""
Dim DomicilioCliente As String = String.Format("{0} #{1}, {2}, Col. {3}, CP: {4}, {5}, {6}", DtMovimientos(0)("SucClienteDireccion").ToString, DtMovimientos(0)("SucClienteNoExt").ToString, DtMovimientos(0)("SucClienteNoInt").ToString, DtMovimientos(0)("SucClienteColonia"), DtMovimientos(0)("SucClienteCP").ToString, DtMovimientos(0)("SucClienteCiudad"), DtMovimientos(0)("SucClientePais").ToString)
@@ -1487,7 +1487,7 @@ Partial Class PopUpVerFactura
End If
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
If UsuarioActual.CveEmpresa.Contiene(72, 80, 146) Then
params.Add(New ReportParameter("Fecha", String.Format("{0} {1}", FechaHora.ToDate.ToString("yyyy-MM-dd"), FechaHora.ToDateTime.ToString("HH:mm:ss"))))
params.Add(New ReportParameter("SucursalCliente", DtMovimientos(0)("SucCliente").ToString))