- activar pago de anticipos, con solo ixc
This commit is contained in:
@@ -1239,8 +1239,7 @@
|
|||||||
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
<input type="text" id="TxtBusquedaAnticipos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaAnticipos','{0}')", GVAnticipos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" style="display: flex; justify-content: end; font-size: 16px; font-weight: bold;">
|
<div class="col-md-12" style="display: flex; justify-content: end; font-size: 16px; font-weight: bold;">
|
||||||
<span>Total: </span>
|
<span>Total: </span>
|
||||||
|
|||||||
@@ -520,7 +520,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
HdnVentaCondicionesPago.Value = GvRow.DataKey("CondicionesPago")
|
HdnVentaCondicionesPago.Value = GvRow.DataKey("CondicionesPago")
|
||||||
HdnPlazoCobranza.Value = GvRow.DataKey("PlazoCobranza")
|
HdnPlazoCobranza.Value = GvRow.DataKey("PlazoCobranza")
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) AndAlso GvRow.DataKey("TipoDocto") = "Rem" Then
|
If UsuarioActual.CveEmpresa.Contiene(189, 193, 195, 196, 197) AndAlso GvRow.DataKey("TipoDocto").Contiene("Rem", "Ant") Then
|
||||||
DivAnticipo.Visible = True
|
DivAnticipo.Visible = True
|
||||||
ImgAntiPend.Visible = True
|
ImgAntiPend.Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -2247,43 +2247,32 @@ Partial Class Ventas_PVCobranza
|
|||||||
|
|
||||||
Protected Sub ImgAntiPend_Click(sender As Object, e As EventArgs)
|
Protected Sub ImgAntiPend_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero()
|
VerificaCargaAnticipo()
|
||||||
|
UpAnticipos.Update()
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(382) = "1" Then
|
RegistraScript("$('#DivAnticipos').modal();", "AE")
|
||||||
' If DdlTipoAmortizacionAnticipo.Items.FindByValue("4") Is Nothing Then
|
End Sub
|
||||||
' DdlTipoAmortizacionAnticipo.Items.Insert(1, New ListItem("Pago con devolución", "4"))
|
|
||||||
' End If
|
|
||||||
' DdlTipoAmortizacionAnticipo.SelectedValueExist("4")
|
|
||||||
|
|
||||||
' DdlTipoRelacionAnticipo.SelectedValueExist("-1")
|
|
||||||
|
|
||||||
' divAmortizacionTipoRelacion.Visible = False
|
|
||||||
|
|
||||||
' DdlTipoAmortizacionAnticipo_SelectedIndexChanged(DdlTipoAmortizacionAnticipo, EventArgs.Empty)
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
Private Sub VerificaCargaAnticipo()
|
||||||
|
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero()
|
||||||
Dim DbRowVenta As DataRow = Nothing
|
Dim DbRowVenta As DataRow = Nothing
|
||||||
Dim ObjVentas As New ClsVentas
|
Dim ObjVentas As New ClsVentas
|
||||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa, VerificaAlmacen:=False) Then
|
||||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
|
Dim tTipoDocto As String
|
||||||
If DbRowVenta IsNot Nothing Then
|
If DbRowVenta IsNot Nothing Then
|
||||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
||||||
CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
|
CveVendedor = DbRowVenta("CveVendedor").ToString().ToEntero()
|
||||||
|
tTipoDocto = DbRowVenta("TipoDocto").ToString()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
CargaAnticipos(CveCliente)
|
CargaAnticipos(CveCliente, tTipoDocto)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
UpAnticipos.Update()
|
|
||||||
|
|
||||||
RegistraScript("$('#DivAnticipos').modal();", "AE")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaAnticipos(CveCliente As Integer)
|
Private Sub CargaAnticipos(CveCliente As Integer, TipoDocto As String)
|
||||||
If CveCliente > 0 Then
|
If CveCliente > 0 Then
|
||||||
Dim ObjMovtos As New ClsMovimientos()
|
Dim ObjMovtos As New ClsMovimientos()
|
||||||
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
|
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
|
||||||
@@ -2291,48 +2280,34 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
ObjMovtos.Dispose()
|
ObjMovtos.Dispose()
|
||||||
|
|
||||||
|
Dim TipoAnticipo As String = "'NC','IxC','Ant'"
|
||||||
|
If TipoDocto = "Ant" Then TipoAnticipo = " 'IxC' "
|
||||||
|
|
||||||
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
If Me.TmpDTAnticiposNCIxCCliente IsNot Nothing Then
|
||||||
GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN('NC','IxC','Ant') ")
|
GVAnticipos.DataSource = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"ISTotal = 0 AND Saldo > 0 AND Tipo IN ({TipoAnticipo}) ")
|
||||||
Else
|
Else
|
||||||
GVAnticipos.DataSource = Nothing
|
GVAnticipos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
GVAnticipos.Columns(5).Visible = False
|
||||||
|
GVAnticipos.Columns(9).Visible = False
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
GVAnticipos.Columns(7).Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
GVAnticipos.DataBind()
|
||||||
|
|
||||||
|
If ListaAnticiposAplicados IsNot Nothing Then
|
||||||
|
ListaAnticiposAplicados.Clear()
|
||||||
|
End If
|
||||||
|
TxtNCDev.Text = "0.00"
|
||||||
End If
|
End If
|
||||||
|
UpAnticipos.Update()
|
||||||
GVAnticipos.Columns(5).Visible = False
|
|
||||||
GVAnticipos.Columns(9).Visible = False
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
|
||||||
GVAnticipos.Columns(7).Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
GVAnticipos.DataBind()
|
|
||||||
|
|
||||||
If ListaAnticiposAplicados IsNot Nothing Then
|
|
||||||
ListaAnticiposAplicados.Clear()
|
|
||||||
End If
|
|
||||||
TxtNCDev.Text = "0.00"
|
|
||||||
End If
|
|
||||||
UpAnticipos.Update()
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkRecargaAnticipos_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkRecargaAnticipos_Click(sender As Object, e As EventArgs)
|
||||||
Dim CveVenta As Integer = HdnCveVenta.Value.ToEntero()
|
VerificaCargaAnticipo()
|
||||||
|
|
||||||
If CveCliente <= 0 Then
|
|
||||||
Dim DbRowVenta As DataRow = Nothing
|
|
||||||
Dim ObjVentas As New ClsVentas
|
|
||||||
If ObjVentas.GetVenta(CveVenta, UsuarioActual.CveEmpresa) Then
|
|
||||||
DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
|
|
||||||
End If
|
|
||||||
ObjVentas.Dispose()
|
|
||||||
|
|
||||||
If DbRowVenta IsNot Nothing Then
|
|
||||||
CveCliente = DbRowVenta("CveCliente").ToString().ToEntero()
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CveCliente > 0 Then
|
|
||||||
CargaAnticipos(CveCliente)
|
|
||||||
End If
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LnkSolicitarActivarAnticipo_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkSolicitarActivarAnticipo_Click(sender As Object, e As EventArgs)
|
||||||
|
|||||||
Reference in New Issue
Block a user