This commit is contained in:
rakcsle
2025-01-07 15:25:25 -07:00
parent 26cc03e82a
commit 1c9c5e659d
7 changed files with 137 additions and 29 deletions

View File

@@ -5639,15 +5639,18 @@
<div class="row">
<div class="col-md-6 pull-right" style="text-align: right;">
Importe total:
Importe total:
<asp:TextBox Text="" ID="TxtSaldoImportar" ClientIDMode="Static" Enabled="false" runat="server" />
</div>
</div>
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right" runat="server" id="DVBusquedaImportarSaldos" visible="false">
<input type="text" id="TxtBusquedaImportarSaldos" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaImportarSaldos','{0}')", GvImportarSaldos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaImportarSaldos','{0}')", GvImportarSaldos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<br />
<div class="row">
<div style="height: 300px; overflow-y: auto;">
<asp:GridView ID="GvImportarSaldos" DataKeyNames="CveIE, CveCliente,Total,IVA,Original,PorcentajeIVA,Tipo,CveVenta" AutoGenerateColumns="false" GridLines="None" CssClass="table table-striped table-hover Widthall" runat="server">
<asp:GridView ID="GvImportarSaldos" DataKeyNames="CveIE, CveCliente,Total,IVA,Original,PorcentajeIVA,Tipo,CveVenta" AutoGenerateColumns="false" GridLines="None"
CssClass="table table-striped table-hover Widthall" runat="server">
<Columns>
<asp:TemplateField ItemStyle-Width="5%">
<ItemTemplate>

View File

@@ -4818,9 +4818,14 @@ Partial Class Clientes
ConsultarAnticiposSaldosClientes()
End Sub
Private Sub ConsultarAnticiposSaldosClientes()
DVBusquedaImportarSaldos.Visible = False
Dim ObjMovtos As New ClsMovimientos()
If ObjMovtos.GetAnticiposNCIxCCliente(DdlClienteImportarSaldos.SelectedValue.ToEntero()) Then
GvImportarSaldos.DataSource = ObjMovtos.DtResultados.FiltraParametros("ISTotal = 0 AND Saldo > 0 AND Saldo > 0 AND CveIE > 0 AND Tipo IN('NC','IxC','Ant')")
GvImportarSaldos.DataSource = ObjMovtos.DtResultados.FiltraParametros("ISTotal = 0 AND Saldo > 0 AND Saldo > 0 AND CveIE > 0 AND Tipo IN('NC','IxC','Ant')")
If ObjMovtos.DtResultados.Rows.Count > 0 Then
DVBusquedaImportarSaldos.Visible = True
End If
Else
GvImportarSaldos.DataSource = Nothing
End If

View File

@@ -31,12 +31,16 @@ Partial Class Ventas_Promociones
Private Property CvePromocion As Integer
Get
If ViewState("CvePromocion") Is Nothing Then
ViewState("CvePromocion") = -1
End If
Return ViewState("CvePromocion").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CvePromocion") = value
End Set
End Property
Private Property CveConsecutivo As Integer
Get
Return ViewState("CveConsecutivo").ToString.ToEntero
@@ -108,6 +112,19 @@ Partial Class Ventas_Promociones
End Set
End Property
Private Property ReqAutorizacion As Boolean
Get
If ViewState("ReqAutorizacion") Is Nothing Then
ViewState("ReqAutorizacion") = False
End If
Return Boolean.Parse(ViewState("ReqAutorizacion").ToString)
End Get
Set(value As Boolean)
ViewState("ReqAutorizacion") = value
End Set
End Property
Private Property BloqueadoPromocionPorcentaje As Boolean
Get
@@ -181,7 +198,7 @@ Partial Class Ventas_Promociones
ChkEstatus.Enabled = False
End If
If ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje Then
If (ChkEstatus.Checked = True And Not PermisoAutorizPromocionPorcentaje) Or (ReqAutorizacion And Not PermisoAutorizPromocionPorcentaje) Then
BtnGuardar.Visible = False
ButBtnEliminar.Visible = False
End If
@@ -433,6 +450,7 @@ Partial Class Ventas_Promociones
DdlMarca.SelectedValue = Dr("CveMarca").ToString
LblUsuario.Text = Dr("Usuario").ToString
LblFechaIng.Text = Dr("FechaIng").ToString.ToDate.ToString("dd/MM/yyyy")
If Dr("CveVendedor").ToString.ToEntero > 0 Then DdlVendedor.SelectedValue = Dr("CveVendedor").ToString
If Dr("CveCliente").ToString.ToEntero > 0 Then
@@ -455,6 +473,8 @@ Partial Class Ventas_Promociones
CvePromocionPadre = If(Dr("CvePromocionPadre").ToString.ToEntero > 0, Dr("CvePromocionPadre").ToString.ToEntero, -1)
ReqAutorizacion = Boolean.Parse(Dr("ReqAutorizacion").ToString)
If ObjVentas.GetPromocionesDetalle(CvePromocion, UsuarioActual.CveEmpresa) Then
TempDT = ObjVentas.DtResultados.Copy
TempDTOriginal = ObjVentas.DtResultados.Copy
@@ -727,6 +747,9 @@ Partial Class Ventas_Promociones
If (Not PermisoAutorizPromocionPorcentaje) AndAlso BloqueadoPromocionPorcentaje AndAlso Bloquear Then
ChkEstatus.Checked = False
ChkEstatus.Enabled = False
If CvePromocion <= 0 Then
ReqAutorizacion = True
End If
End If
UpGenerales.Update()
@@ -833,7 +856,8 @@ Partial Class Ventas_Promociones
ObjVentas.IniciaTransacSQL()
CvePromocion = ObjVentas.AddPromociones(TxtPromocion.Text.Trim, If(IsDate(TxtFechaI.Text), TxtFechaI.Text.ToDate, MinFecha), If(IsDate(TxtFechaF.Text), TxtFechaF.Text.ToDate, MaxFecha),
DdlVendedor.SelectedValue.ToEntero, CveCliente, ChkEstatus.Checked, DdlMoneda.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero)
UsuarioActual.CveEmpresa, DdlSubProyecto.SelectedValue.ToEntero, DdlTipoAplicacion.SelectedValue.ToString, DdlMarca.SelectedValue.ToEntero, DdlDistribuidor.SelectedValue.ToEntero,
ReqAutorizacion:=ReqAutorizacion)
If CvePromocion > 0 Then
For Each Dr As DataRow In TempDT.Rows