Compras RNC Multiseleccion
This commit is contained in:
@@ -12,6 +12,7 @@ Imports Extensiones
|
||||
Imports MoreLinq
|
||||
Imports System.Data.SqlClient
|
||||
Imports ClsPaginas
|
||||
Imports System.Activities.Expressions
|
||||
|
||||
Partial Class Compras_Compras
|
||||
Inherits ClsPaginas
|
||||
@@ -1225,6 +1226,17 @@ Partial Class Compras_Compras
|
||||
#End Region
|
||||
|
||||
|
||||
'Public Property ListaFacturasRealcionadasRNC As List(Of String)
|
||||
' Get
|
||||
' If ViewState("ListaFacturasRealcionadasRNC") Is Nothing Then
|
||||
' ViewState("ListaFacturasRealcionadasRNC") = New List(Of String)
|
||||
' End If
|
||||
' Return DirectCast(ViewState("ListaFacturasRealcionadasRNC"), List(Of String))
|
||||
' End Get
|
||||
' Set(value As List(Of String))
|
||||
' ViewState("ListaFacturasRealcionadasRNC") = value
|
||||
' End Set
|
||||
'End Property
|
||||
|
||||
|
||||
|
||||
@@ -1648,8 +1660,8 @@ Partial Class Compras_Compras
|
||||
|
||||
End If
|
||||
|
||||
'SE OCUPAN AFUERA DEL POSTBACK ??
|
||||
cargaddlVinculacionServcios()
|
||||
'SE OCUPAN AFUERA DEL POSTBACK ??
|
||||
cargaddlVinculacionServcios()
|
||||
If UsuarioActual.TienePermisoProceso(117) Then
|
||||
|
||||
HplAddClasificacion.Visible = False
|
||||
@@ -1686,28 +1698,28 @@ Partial Class Compras_Compras
|
||||
DdlTipoCompra_SelectedIndexChanged(Nothing, Nothing)
|
||||
|
||||
|
||||
For Each gvRow As GridViewRow In GvFacturaNC.Rows
|
||||
If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio"))
|
||||
Dim seleccion As String = ""
|
||||
'For Each gvRow As GridViewRow In GvFacturaNC.Rows
|
||||
' If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
' Dim SerieFolioFacura As String = ObtenerUltimaParte(gvRow.DataKey("SerieFolio"))
|
||||
' Dim seleccion As String = ""
|
||||
|
||||
For Each item As ListItem In DdlRemisionNotaCredito.Items
|
||||
Dim serieFolioItem As String = ObtenerUltimaParte(item.Text)
|
||||
If SerieFolioFacura = serieFolioItem Then
|
||||
'seleccion = item.Value
|
||||
AutoSelRNC = True
|
||||
DdlRemisionNotaCredito.SelectedValueExist(item.Value)
|
||||
Exit For
|
||||
End If
|
||||
' For Each item As ListItem In DdlRemisionNotaCredito.Items
|
||||
' Dim serieFolioItem As String = ObtenerUltimaParte(item.Text)
|
||||
' If SerieFolioFacura = serieFolioItem Then
|
||||
' 'seleccion = item.Value
|
||||
' AutoSelRNC = True
|
||||
' DdlRemisionNotaCredito.SelectedValueExist(item.Value)
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
Next
|
||||
' Next
|
||||
|
||||
If AutoSelRNC Then
|
||||
Exit For
|
||||
End If
|
||||
' If AutoSelRNC Then
|
||||
' Exit For
|
||||
' End If
|
||||
|
||||
End If
|
||||
Next
|
||||
' End If
|
||||
'Next
|
||||
|
||||
If AutoSelRNC Then
|
||||
'DdlRemisionNotaCredito_SelectedIndexChanged(Nothing, Nothing)
|
||||
@@ -19747,11 +19759,10 @@ Partial Class Compras_Compras
|
||||
|
||||
If DdlTipoComprobante.SelectedValue = "NC" Then
|
||||
CargaGVRemisionNotaCredito()
|
||||
'bloquear la vinculación a la compra
|
||||
HLAplicaNCFact.Visible = False
|
||||
Else
|
||||
Alert("Para elegir Remisión de Nota de Crédito el tipo de documento debe de ser Nota de Crédito.", TipoMensaje.MsgAdvertencia)
|
||||
DdlRemisionNotaCredito.SelectedValueExist(-1)
|
||||
'DdlRemisionNotaCredito.SelectedValueExist(-1)
|
||||
DdlTipoCompra.SelectedValueExist(-1)
|
||||
End If
|
||||
End If
|
||||
@@ -20414,6 +20425,7 @@ Partial Class Compras_Compras
|
||||
End Function
|
||||
|
||||
Private Sub NCSeleccionFacturasRelacionadas(UUIDSListRelacionados As List(Of String))
|
||||
'ListaFacturasRealcionadasRNC.Clear()
|
||||
|
||||
If UUIDSListRelacionados.Count > 0 Then
|
||||
Dim SaldoNota As Decimal = TxtTotal.Text.ToDecimal
|
||||
@@ -20449,17 +20461,20 @@ Partial Class Compras_Compras
|
||||
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
|
||||
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
|
||||
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
||||
'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
|
||||
Else
|
||||
|
||||
If SaldoFactura >= SaldoNotaPorAplicar Then
|
||||
|
||||
GvRow.FCTextBox("TxtImporte").Text = SaldoNotaPorAplicar.FormatoNumero
|
||||
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
||||
'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
|
||||
SaldoNotaPorAplicar = 0
|
||||
TeminarAmortizacion = True
|
||||
Else
|
||||
GvRow.FCTextBox("TxtImporte").Text = SaldoFactura.FormatoNumero
|
||||
GvRow.FCCheckBox("ChkFacturaNC").Checked = True
|
||||
'ListaFacturasRealcionadasRNC.Add(GvRow.DataKey("CveCompra"))
|
||||
SaldoNotaPorAplicar = SaldoNotaPorAplicar - SaldoFactura
|
||||
|
||||
TeminarAmortizacion = True
|
||||
@@ -21168,13 +21183,23 @@ Partial Class Compras_Compras
|
||||
End Sub
|
||||
|
||||
Private Sub CargaGVRemisionNotaCredito()
|
||||
DvDdlRemisionNotaCredito.Visible = True
|
||||
'DvDdlRemisionNotaCredito.Visible = True
|
||||
DTRemisionesNotaDeCredito = New DataTable
|
||||
GVRemisionesNotaDeCredito.DataSource = Nothing
|
||||
GVRemisionesNotaDeCredito.Visible = False
|
||||
|
||||
Dim CveComprasAmortizadas As New List(Of String)
|
||||
|
||||
For Each gvRow As GridViewRow In GvFacturaNC.Rows
|
||||
If gvRow.DataKey("CveCompra").ToEntero > 0 AndAlso gvRow.FCCheckBox("ChkFacturaNC").Checked Then
|
||||
CveComprasAmortizadas.Add(gvRow.DataKey("CveCompra"))
|
||||
gvRow.FCCheckBox("ChkFacturaNC").Checked = False
|
||||
End If
|
||||
Next
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2) Then
|
||||
If ObjCompras.GetNotasCreditoRep(DdlProveedor.SelectedValue.ToEntero, 0, "-1", "-1", UsuarioActual.CveEmpresa, 2, String.Join(",", CveComprasAmortizadas)) Then
|
||||
'DdlRemisionNotaCredito.DataSource = ObjCompras.DtResultados
|
||||
DTRemisionesNotaDeCredito = ObjCompras.DtResultados
|
||||
GVRemisionesNotaDeCredito.DataSource = DTRemisionesNotaDeCredito
|
||||
|
||||
Reference in New Issue
Block a user