Concepto de NC E140

This commit is contained in:
2020-12-03 11:09:36 -07:00
parent 7d655d3e13
commit b89799d777
3 changed files with 91 additions and 76 deletions

View File

@@ -6314,7 +6314,7 @@
<Columns>
<asp:TemplateField>
<ItemTemplate>
<asp:CheckBox ID="ChkAplicar" runat="server" AutoPostBack="true" OnCheckedChanged="ChkAplicarNCBon_CheckedChanged" />
<asp:CheckBox ID="ChkAplicar" runat="server"/>
</ItemTemplate>
</asp:TemplateField>
<asp:HyperLinkField DataNavigateUrlFields="CveVenta" Target="_blank" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="Folio" HeaderText="Folio" ItemStyle-Width="150px" ItemStyle-HorizontalAlign="Left" />

View File

@@ -14778,7 +14778,7 @@ Partial Class Ventas
TmpDT = ObjVentas.DtResultados
TmpDT.Columns.Add("CveVentaDetalleRNC", GetType(Integer))
End If
ErrorCancelar = ProcesoPrepolizaBtnAplicaNuevaNC_Clicks(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
Else
ErrorCancelar = ProcesoPrepolizas(ObjConta, ObjFacturaDevolucion, -1, TmpDT, ObjAC, -1, ObjBancos, ObjVentas)
End If
@@ -27569,6 +27569,18 @@ Partial Class Ventas
Dim TotalRemNCAplicado As Decimal = 0
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
Dim NCConcepto As Integer = -1
Select Case RblRNCTipo.SelectedValue
Case "1" 'CARGOS
NCConcepto = ArrayNC(3).ToEntero()
Case "2" 'BONIFICACIONES
NCConcepto = ArrayNC(4).ToEntero()
Case "3" 'AJUSTE/GARANTIAS
NCConcepto = ArrayNC(1).ToEntero()
End Select
If ChkMostarProductosRNC.Checked Then
Me.AplicaRNCXDetalle = True
@@ -27651,24 +27663,18 @@ Partial Class Ventas
For Each RNC In ListaRemisionesNC.Where(Function(x) x.Num2 = 1)
Dim Salir As Boolean = False
Dim ArrayNC As String() = UsuarioActual.Empresa.Funcionalidad(591).Split(",".ToCharArray())
Dim NCAjuste As Integer = -1
Dim NCGarantiaTotal As Integer = -1
If ArrayNC.Length > 2 Then
NCAjuste = ArrayNC(1).ToEntero()
NCGarantiaTotal = ArrayNC(2).ToEntero()
End If
Using ObjAcum As New ClsAcumuladores
If ObjAcum.GetGarantiasDetalle(RNC.CveVenta) Then
'SI ES GARANTIA TOTAL
If ObjAcum.DtResultados.MAX("PorcentajeAjuste") = "1" Then
DdlNCPS.SelectedValueExist(NCGarantiaTotal)
DdlNCPS.Enabled = False
If ArrayNC.Length > 2 Then
NCConcepto = ArrayNC(2).ToEntero()
End If
Salir = True
Else
DdlNCPS.SelectedValueExist(NCAjuste)
DdlNCPS.Enabled = False
If ArrayNC.Length > 2 Then
NCConcepto = ArrayNC(1).ToEntero()
End If
End If
End If
End Using
@@ -27681,7 +27687,6 @@ Partial Class Ventas
DdlNCPS.Enabled = True
End If
For Each GvRow As GridViewRow In GvRemisionesNCBon.Rows
If GvRow.RowType = DataControlRowType.DataRow Then
If GvRow.FCCheckBox("ChkAplicar").Checked Then
@@ -27709,6 +27714,13 @@ Partial Class Ventas
End If
Dim DrPSSeleccionado As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=NCConcepto).FiltroPrimero("")
If DrPSSeleccionado IsNot Nothing Then
DdlNCPS.SelectedValueExistInsert(NCConcepto, DrPSSeleccionado("PS").ToString())
DdlNCPS.Enabled = False
End If
TxtImportesRemisionesNC.Text = TotalRemNCAplicado.FormatoNumero
TxtNCImporte.Text = TotalRemNCAplicado.FormatoNumero