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

@@ -342,7 +342,6 @@
<asp:CheckBox Text=" No Validar ante SAT" ID="ChkNoValidaSAT" CssClass="md-checksd" runat="server" Checked="false" Visible="false" /> <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: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" 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:TextBox runat="server" ID="TxtDescuenoMasivo" ClientIDMode="Static" onkeyup ="DescuenoMasivo(this)" Visible="false" Width="60px"></asp:TextBox> <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+" /> <ajax:FilteredTextBoxExtender runat="server" TargetControlID="TxtDescuenoMasivo" FilterType="Custom" ValidChars="1234567890+" />
</td> </td>

View File

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

View File

@@ -3735,7 +3735,7 @@
<div class="modal-body"> <div class="modal-body">
<asp:GridView AutoGenerateColumns="false" runat="server" ID="GvOCsVinculadas" GridLines="None" CssClass="table table-striped table-hover Widthall"> <asp:GridView AutoGenerateColumns="false" runat="server" ID="GvOCsVinculadas" GridLines="None" CssClass="table table-striped table-hover Widthall">
<Columns> <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="Descripción" DataField="Descripcion" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" /> <asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:d}" />
</Columns> </Columns>

View File

@@ -1577,29 +1577,141 @@ Partial Class PopUpVerFactura
If UrlParametros("OP").ToString = "AMORTIZACIONHIS" Then If UrlParametros("OP").ToString = "AMORTIZACIONHIS" Then
'CveViajePasajero 'CveViajePasajero
Dim CVEIE As Integer = UrlParametros("CVEIE").ToString.ToEntero 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 CVEVENTA As Integer = UrlParametros("CVEVENTA").ToString.ToEntero
Dim CVECLIENTE As Integer = UrlParametros("CVECLIENTE").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 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 If End If
End Sub End Sub
Private Sub ImprimirSaldosAmortizacion(CVEIE As Integer, CVEVENTA As Integer, CVECLIENTE As Integer) Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal, Saldo As Decimal)
If CVEVENTA > 0 Then
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 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
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 End Sub
Private Function Parametros(Cadena As String) As Hashtable 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: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> <ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaF" PopupButtonID="ImgFechaF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
</div> </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"> <div class="col-md-2">
<asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList> <asp:DropDownList ID="DdlSubProyecto" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="select2me Widthall"></asp:DropDownList>
</div> </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: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="FechaIng" HeaderText="Fecha" DataFormatString="{0:d}" />
<asp:BoundField DataField="Descripcion" HeaderText="Descripción" /> <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="CantidadOC" HeaderText="CantidadOC" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,###.####}" />
<asp:BoundField DataField="CantidadCompra" HeaderText="Cantidad Compra" 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:#,###.####}" /> <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 Protected Sub OC_RepOCxSurtir_Load(sender As Object, e As EventArgs) Handles Me.Load
If Not IsPostBack Then If Not IsPostBack Then
InicializaValores() InicializaValores()
End If End If
End Sub End Sub
@@ -92,6 +91,10 @@ Partial Class OC_RepOCxSurtir
End If End If
CargarCentrosDeCosto(Nothing, Nothing, Nothing, LblSubProyecto)
GvDatosPorOC.Columns(3).HeaderText = LblSubProyecto.Text
UPFiltros.Update() UPFiltros.Update()
End Sub End Sub
#End Region #End Region
@@ -207,7 +210,7 @@ Partial Class OC_RepOCxSurtir
Dim FechaIF, FechaFF As String Dim FechaIF, FechaFF As String
FechaIF = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1") FechaIF = If(IsDate(TxtFechaI.Text.Trim()), TxtFechaI.Text.Trim(), "-1")
FechaFF = If(IsDate(TxtFechaF.Text.Trim()), TxtFechaF.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") 'FechaICapturaF = If(IsDate(TxtFechaICaptura.Text.Trim()), TxtFechaICaptura.Text.Trim(), "-1")
'FechaFCapturaF = If(IsDate(TxtFechaFCaptura.Text.Trim()), TxtFechaFCaptura.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") 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)) Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos\{1}", UsuarioActual.Empresa.Ruta, NombreArchivo))
If Archivo.Exists Then If Archivo.Exists Then
ImprimirPDF(Archivo.FullName, If(DdlGrupo.SelectedValue.ToEntero = 1, DtDatos, DtDatosPorOC), params, "OrdenesdeCompraporvincular ", Opcion) ImprimirPDF(Archivo.FullName, If(DdlGrupo.SelectedValue.ToEntero = 1, DtDatos, DtDatosPorOC), params, "OrdenesdeCompraporvincular ", Opcion)
Else Else

View File

@@ -963,6 +963,8 @@ Partial Class Ventas_PVCobranza
Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing Dim Retorno As Modelos.Factura.MMensajeFactura = Nothing
Dim SbAlert As New StringBuilder() Dim SbAlert As New StringBuilder()
Dim SBAmortizaciones As New StringBuilder Dim SBAmortizaciones As New StringBuilder
Dim DtAnticipos As New DataTable()
Try Try
Dim DtRemisiones As New DataTable Dim DtRemisiones As New DataTable
@@ -1060,7 +1062,7 @@ Partial Class Ventas_PVCobranza
If HdnTipoAmortizacion.Value = "4" Then If HdnTipoAmortizacion.Value = "4" Then
Dim DtAnticipos As New DataTable()
DtAnticipos.Columns.Add("CveVenta", GetType(Integer)) DtAnticipos.Columns.Add("CveVenta", GetType(Integer))
DtAnticipos.Columns.Add("Importe", GetType(Decimal)) DtAnticipos.Columns.Add("Importe", GetType(Decimal))
DtAnticipos.Columns.Add("CveConceptoContable", GetType(Integer)) 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) 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 End If
Next Next
@@ -1122,6 +1122,18 @@ Partial Class Ventas_PVCobranza
Next 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))) 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) SbAlert.Append(SBAmortizaciones.ToString)
Else Else