--merge Clientes.aspx

This commit is contained in:
2025-01-07 22:10:53 -07:00
26 changed files with 5630 additions and 597 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

@@ -1302,9 +1302,13 @@ Partial Class Ventas_ClientesAbonar
Dim StrMsg As New StringBuilder
StrMsg.AppendFormat("Abono Registrado Correctamente. Folio <b><a href='/Bancos/IE.aspx?CveIE={0}' target='_blank' class='Texto'>{1}</a></b> <br/>", CveIE, ObjIE.Folio)
If IDPoliza > 0 Then StrMsg.AppendFormat("Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a> <br/>", IDPoliza, FolioPoliza)
If UsuarioActual.TienePermisoProceso(354) Then 'visualizar la póliza al registros
StrMsg.AppendFormat("<br/><a Class=""Texto"" target='_blank' href=""/Contabilidad/RegPrePolizaS.aspx?CvePrePoliza={0}"">Ver Póliza</a>&nbsp;&nbsp; ", CvePrePoliza)
Dim TempParametros As String = Encripta(String.Format("OP=PREPO&CvePrePoliza={0}", CvePrePoliza))
StrMsg.Append($" <a class='Texto' target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={TempParametros}""> <i class='fa fa-file-pdf-o' aria-hidden='true'></i> Imprimir </a>")
End If
Dim TextoComplementoPago As String = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
If IDPoliza > 0 Then StrMsg.AppendFormat("Poliza: <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' target='_blank' class='Texto'>{1}</a> <br/>", IDPoliza, FolioPoliza)
For Each RespuestaNotaCredito As RespuestaNotaCredrito In NCGeneradas
If RespuestaNotaCredito IsNot Nothing AndAlso RespuestaNotaCredito.Respuesta IsNot Nothing Then
@@ -1321,7 +1325,12 @@ Partial Class Ventas_ClientesAbonar
StrMsg.AppendFormat("Nota de crédito generada correctamente.<br/><br/> Folio: <a href='/Ventas/Ventas.aspx?CveVenta={0}' target='_blank' class='Texto'>{1}</a><br/>", RespuestaNotaCredito.Respuesta.CveVenta, RespuestaNotaCredito.Respuesta.SerieFolio)
End If
Next
Alert($"{StrMsg.ToString}<br/><br/>{TextoComplementoPago}", TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
If ChkComplementoPago.Checked Then
Dim TextoComplementoPago As String = EmitirComplementoPago(CveIE, CveVentasPago, SeriesPago)
StrMsg.AppendFormat("<br/><br/>{0}", TextoComplementoPago)
End If
Alert(StrMsg.ToString, TipoMensaje.MsgInformacion, If(ChkSeguirRegistrando.Checked, "location.href =""#""", "location.href =""/Bancos/RepCxCCliente.aspx"""))
Else
If ObjConta IsNot Nothing Then ObjConta.RollBack()

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