GDiaz 2025-01-14

This commit is contained in:
rakcsle
2025-01-14 08:22:47 -07:00
parent b018aca7fe
commit 1b89c3b198
7 changed files with 151 additions and 22 deletions

View File

@@ -341,8 +341,7 @@
<asp:Button ID="BtnIEGuardar" runat="server" Text="Guardar" ValidationGroup="GrpGuardar" class="btn btn-primary" />
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" />
<asp:ValidationSummary ID="VS" runat="server" DisplayMode="BulletList" ShowSummary="true" ValidationGroup="GrpGuardar" />
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:CheckBox Text="Descuento Masivo" ID="chkaplicaDescuentoMasivo" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuentoMasivo_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:CheckBox Text="Descuento" ID="chkaplicaDescuento" CssClass="md-checksd" runat="server" Checked="false" OnCheckedChanged="chkaplicaDescuento_CheckedChanged" AutoPostBack="true" Visible="false" />
<asp:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup ="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox>
<ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
</td>

View File

@@ -324,7 +324,7 @@ Partial Class Bancos_ProveedoresAbonar
If UsuarioActual.TienePermisoProceso(361) Then
'GvCxP.Columns(11).Visible = True
chkaplicaDescuento.Visible = True
chkaplicaDescuentoMasivo.Visible = True
'chkaplicaDescuentoMasivo.Visible = True
End If
@@ -1673,17 +1673,11 @@ Partial Class Bancos_ProveedoresAbonar
Protected Sub chkaplicaDescuento_CheckedChanged(sender As Object, e As EventArgs)
GvCxP.Columns(11).Visible = chkaplicaDescuento.Checked
TxtDescuenoMasivo.Visible = chkaplicaDescuento.Checked
UPCompras.Update()
End Sub
Protected Sub chkaplicaDescuentoMasivo_CheckedChanged(sender As Object, e As EventArgs)
GvCxP.Columns(11).Visible = chkaplicaDescuentoMasivo.Checked
TxtDescuenoMasivo.Visible = chkaplicaDescuentoMasivo.Checked
UPCompras.Update()
End Sub
Private Sub tmpValida()
Dim ValidaSAT As Boolean = True

View File

@@ -3735,7 +3735,7 @@
<div class="modal-body">
<asp:GridView AutoGenerateColumns="false" runat="server" ID="GvOCsVinculadas" GridLines="None" CssClass="table table-striped table-hover Widthall">
<Columns>
<asp:HyperLinkField DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" Target="_blank" HeaderText="Folio" DataTextField="FolioOC" ItemStyle-HorizontalAlign="Center" />
<asp:HyperLinkField DataNavigateUrlFields="CveOrdenCompra" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" Target="_blank" HeaderText="Folio" DataTextField="SerieFolioOC" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Descripción" DataField="Descripcion" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" />
</Columns>

View File

@@ -1577,29 +1577,141 @@ Partial Class PopUpVerFactura
If UrlParametros("OP").ToString = "AMORTIZACIONHIS" Then
'CveViajePasajero
Dim CVEIE As Integer = UrlParametros("CVEIE").ToString.ToEntero
Dim CVEVENTAAMORTIZADA As Integer = UrlParametros("CVEVENTAAMORTIZADA").ToString.ToEntero
Dim CVEVENTA As Integer = UrlParametros("CVEVENTA").ToString.ToEntero
Dim CVECLIENTE As Integer = UrlParametros("CVECLIENTE").ToString.ToEntero
Dim MONTO As Decimal = UrlParametros("MONTO").ToString.ToDecimal
Dim SALDO As Decimal = UrlParametros("SALDO").ToString.ToDecimal
If CVECLIENTE > 0 AndAlso (CVEIE > 0 Or CVEVENTA > 0) Then
ImprimirSaldosAmortizacion(CVEIE, CVEVENTA, CVECLIENTE)
ImprimirSaldosAmortizacion(CVEVENTAAMORTIZADA, CVEIE, CVEVENTA, CVECLIENTE, MONTO, SALDO)
End If
End If
End Sub
Private Sub ImprimirSaldosAmortizacion(CVEIE As Integer, CVEVENTA As Integer, CVECLIENTE As Integer)
If CVEVENTA > 0 Then
Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal, Saldo As Decimal)
Dim ObjMovtos As New ClsMovimientos()
Dim SaldoAntNCDev As Decimal = 0
Dim DatosSaldoAntNCDev As New DataTable
Dim TipoDocto As String = ""
Dim Folio As String = ""
Dim DTNCVinculadas As New DataTable
If ObjMovtos.GetAnticiposNCIxCCliente(CveCliente) Then
DatosSaldoAntNCDev = ObjMovtos.DtResultados
End If
ObjMovtos.Dispose()
If DatosSaldoAntNCDev IsNot Nothing AndAlso DatosSaldoAntNCDev.Rows.Count > 0 Then
SaldoAntNCDev = If(CveVenta > 0,
DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveVenta={CveVenta}").ToDecimal,
DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveIE={CveIE}").ToDecimal)
TipoDocto = If(CveVenta > 0,
DatosSaldoAntNCDev.FiltroPrimeroValor("Tipo", $"CveVenta={CveVenta}"),
DatosSaldoAntNCDev.FiltroPrimeroValor("Tipo", $"CveIE={CveIE}"))
Folio = If(CveVenta > 0,
DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveVenta={CveVenta}"),
DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveIE={CveIE}"))
If CveIE > 0 Then
CveVenta = DatosSaldoAntNCDev.FiltroPrimeroValor("CveVenta", $"CveIE={CveIE}").ToEntero
End If
End If
If CVEIE > 0 Then
If TipoDocto.Contiene("Egs", "Dev", "Ant") Then
Dim AplicaAmortizacion As Boolean = False
If TipoDocto.Contiene("Ant") Then AplicaAmortizacion = True
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVentasAntNC(-1, CveVenta, AplicaAmortizacion) Then
DTNCVinculadas = ObjVentas.DtResultados.Copy()
End If
ObjVentas.Dispose()
End If
If DTNCVinculadas IsNot Nothing Then
Dim params As New List(Of ReportParameter)
Dim ObjVentas As New ClsVentas
If ObjVentas.GetVenta(CveVentaAmortizada, UsuarioActual.CveEmpresa) Then
Dim DbRowVenta = ObjVentas.DtResultados.Copy().FiltroPrimero("")
If DbRowVenta IsNot Nothing Then
'Dim VentaActual As New Venta(UsuarioActual)
'VentaActual.CveVenta = CveVentaAmortizada
'VentaActual.TipoDocto = DbRowVenta("TipoDocto").ToString
'VentaActual.Fecha = DbRowVenta("Fecha").ToString.ToDate
'VentaActual.CveCliente = DbRowVenta("CveCliente").ToString.ToEntero
'VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
'VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString
'VentaActual.ClienteNombre = DbRowVenta("ClienteNombre").ToString
'VentaActual.TC = DbRowVenta("TipoCambio").ToString.ToDecimal
'VentaActual.Total = DbRowVenta("Total").ToString.ToDecimal
'VentaActual.IVA = DbRowVenta("IVA").ToString.ToDecimal
'VentaActual.IEPS = DbRowVenta("IEPS").ToString.ToDecimal
'VentaActual.RetIVA = DbRowVenta("RetIVA").ToString.ToDecimal
'VentaActual.RetISR = DbRowVenta("RetISR").ToString.ToDecimal
'VentaActual.PorcentajeIVA = DbRowVenta("PorcentajeIVA").ToString.ToDecimal
'VentaActual.UsuarioActual = UsuarioActual
'VentaActual.CveSubProyecto = DbRowVenta("CveSubProyecto").ToString.ToEntero
'VentaActual.CveMoneda = DbRowVenta("CveMoneda").ToString.ToEntero
'VentaActual.SerieFolio = DbRowVenta("SerieFolio").ToString
params.Add(New ReportParameter("SerieFolio", DbRowVenta("SerieFolio").ToString))
params.Add(New ReportParameter("Moneda", DbRowVenta("Moneda").ToString))
params.Add(New ReportParameter("Cliente", DbRowVenta("Cliente").ToString))
End If
End If
ObjVentas.Dispose()
Dim Imagen As New System.IO.FileInfo($"{UsuarioActual.Empresa.Ruta}/Logo.png")
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
'params.Add(New ReportParameter("FechaInicio", FechaI))
'params.Add(New ReportParameter("FechaFin", FechaF))
params.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
'params.Add(New ReportParameter("AgrupadoPor", $"<b>Agrupado Por:</b> {Grupo}{FechaIn}{FechaFn}"))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("SaldoAntNCDev", SaldoAntNCDev.ToString))
params.Add(New ReportParameter("Monto", Monto.ToString))
params.Add(New ReportParameter("Saldo", Saldo.ToString))
Dim NombreArchivo As String = "SaldoAntNCDev.rdlc"
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo))
If Archivo.Exists Then
ImprimirPDF(Archivo.FullName, DTNCVinculadas, params, "OrdenesdeCompraporvincular ", Opcion)
Else
ImprimirPDF($"Empresas/Grales/Formatos/{NombreArchivo}", DTNCVinculadas, params, "OrdenesdeCompraporvincular", Opcion)
End If
End If
End Sub
Private Function Parametros(Cadena As String) As Hashtable

View File

@@ -69,7 +69,9 @@
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="TxtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div>
<div class="col-md-1" style="max-width: 110px;">Centro de Costo</div>
<div class="col-md-1" style="max-width: 110px;">
<asp:Label runat="server" ID="LblSubProyecto"></asp:Label>:
</div>
<div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList>
</div>
@@ -125,6 +127,7 @@
<asp:HyperLinkField DataTextField="Folio" HeaderText="Folio" ControlStyle-CssClass="Texto" DataNavigateUrlFormatString="/OC/OC.aspx?OC={0}" DataNavigateUrlFields="CveOrdenCompra" Target="_blank" />
<asp:BoundField DataField="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" />
<asp:BoundField DataField="SubProyecto" HeaderText="Descripción" />
<asp:BoundField DataField="CantidadOC" HeaderText="CantidadOC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.####}" />
<asp:BoundField DataField="CantidadCompra" HeaderText="Cantidad Compra" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.####}" />
<asp:BoundField DataField="Pendiente" HeaderText="Pendiente" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.####}" />

View File

@@ -39,7 +39,6 @@ Partial Class OC_RepOCxSurtir
Protected Sub OC_RepOCxSurtir_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then
InicializaValores()
End If
End Sub
@@ -92,6 +91,10 @@ Partial Class OC_RepOCxSurtir
End If
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
GvDatosPorOC.Columns(3).HeaderText = LblSubProyecto.Text
UPFiltros.Update()
End Sub
#End Region
@@ -207,7 +210,7 @@ Partial Class OC_RepOCxSurtir
Dim FechaIF, FechaFF As String
FechaIF = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaFF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.Text.Trim(), "-1")
Dim FechaICapturaF, FechaFCapturaF As String
'FechaICapturaF = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
'FechaFCapturaF = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.Text.Trim(), "-1")
@@ -243,7 +246,13 @@ Partial Class OC_RepOCxSurtir
Dim NombreArchivo As String = If(DdlGrupo.SelectedValue.ToEntero = 1, "RepOCxSurtir.rdlc", "RepOCxSurtirPorOC.rdlc")
If DdlGrupo.SelectedValue.ToEntero = 2 Then
params.Add(New ReportParameter("TipoCentroCosto", LblSubProyecto.Text))
End If
Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo))
If Archivo.Exists Then
ImprimirPDF(Archivo.FullName, If(DdlGrupo.SelectedValue.ToEntero = 1, DtDatos, DtDatosPorOC), params, "OrdenesdeCompraporvincular ", Opcion)
Else

View File

@@ -963,6 +963,8 @@ Partial Class Ventas_PVCobranza
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder()
Dim SBAmortizaciones As New StringBuilder
Dim DtAnticipos As New DataTable()
Try
Dim DtRemisiones As New DataTable
@@ -1060,7 +1062,7 @@ Partial Class Ventas_PVCobranza
If HdnTipoAmortizacion.Value = "4" Then
Dim DtAnticipos As New DataTable()
DtAnticipos.Columns.Add("CveVenta", GetType(Integer))
DtAnticipos.Columns.Add("Importe", GetType(Decimal))
DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer))
@@ -1095,8 +1097,6 @@ Partial Class Ventas_PVCobranza
DtAnticipos.Rows.Add(CveVenta, Importe, CveConceptoContable, CveIE, FolioFiscal, Descuentos, TotalAnticipo, SubTotalAnticipo, CveMoneda, Fecha, TipoCambioPago, Folio, Tipo)
SBAmortizaciones.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA{1}&CVECLIENTE={2}", CveIE, CveVenta, VentaRemision.CveCliente))}"">Imprimir historial {Folio}</a><br/>")
End If
Next
@@ -1122,6 +1122,18 @@ Partial Class Ventas_PVCobranza
Next
SbAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF Factura</a></li></ul><br/>", Encripta(String.Format("OP=VTA&CVEVENTA={0}&PAG=1&GUARDAR=1", Retorno.CveVenta)))
For Each dr As DataRow In DtAnticipos.Rows
SBAmortizaciones.AppendLine($"<br><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={Encripta(String.Format("OP=AMORTIZACIONHIS&CVEIE={0}&CVEVENTA{1}&CVECLIENTE={2}&CVEVENTAAMORTIZADA={3}&MONTO={4}&SALDO={5}",
dr("CveIE").ToString,
dr("CveVenta").ToString,
Retorno.Factura.CveCliente,
Retorno.CveVenta,
Retorno.Factura.Total,
(Retorno.Factura.Total - Retorno.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
Next
SbAlert.Append(SBAmortizaciones.ToString)
Else