Retro 0 CyC Impresión de saldo anticipo

This commit is contained in:
rakcsle
2025-01-15 15:32:17 -07:00
parent 728199b25c
commit 0118481c17
3 changed files with 36 additions and 31 deletions

View File

@@ -1575,23 +1575,22 @@ Partial Class PopUpVerFactura
'Boleto
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(CVEVENTAAMORTIZADA, CVEIE, CVEVENTA, CVECLIENTE, MONTO, SALDO)
ImprimirSaldosAmortizacion(CVEVENTAAMORTIZADA, CVEIE, CVEVENTA, CVECLIENTE, MONTO)
End If
End If
End Sub
Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal, Saldo As Decimal)
Private Sub ImprimirSaldosAmortizacion(CveVentaAmortizada As Integer, CveIE As Integer, CveVenta As Integer, CveCliente As Integer, Monto As Decimal)
Dim ObjMovtos As New ClsMovimientos()
@@ -1599,6 +1598,7 @@ Partial Class PopUpVerFactura
Dim DatosSaldoAntNCDev As New DataTable
Dim TipoDocto As String = ""
Dim Folio As String = ""
Dim Saldo As Decimal = 0D
Dim DTNCVinculadas As New DataTable
@@ -1623,10 +1623,15 @@ Partial Class PopUpVerFactura
If CveIE > 0 Then
CveVenta = DatosSaldoAntNCDev.FiltroPrimeroValor("CveVenta", $"CveIE={CveIE}").ToEntero
Folio = DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveIE={CveIE}")
Saldo = DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveIE={CveIE}").ToDecimal
Else
Folio = DatosSaldoAntNCDev.FiltroPrimeroValor("Folio", $"CveVenta={CveVenta}")
Saldo = DatosSaldoAntNCDev.FiltroPrimeroValor("Saldo", $"CveVenta={CveVenta}").ToDecimal
End If
End If
If TipoDocto.Contiene("Egs", "Dev", "Ant", "NC") Then
@@ -1669,8 +1674,8 @@ Partial Class PopUpVerFactura
params.Add(New ReportParameter("FechaImpresion", NowADS().ToString))
params.Add(New ReportParameter("LogoPath", If(Imagen.Exists, $"file://{Imagen.FullName}", "")))
params.Add(New ReportParameter("Monto", Monto.ToString))
params.Add(New ReportParameter("Saldo", Saldo.ToString))
params.Add(New ReportParameter("Monto", Monto.ToString("###,###,###.00")))
params.Add(New ReportParameter("Saldo", Saldo.ToString("###,###,###.00")))
params.Add(New ReportParameter("Folio", Folio))
Dim NombreArchivo As String = "SaldoAntNCDev.rdlc"

View File

@@ -121,6 +121,7 @@
<Style>
<FontFamily>MYRIAd Pro</FontFamily>
<FontSize>7.5pt</FontSize>
<Format>dd/MM/yyyy</Format>
</Style>
</TextRun>
</TextRuns>
@@ -529,7 +530,7 @@
<Paragraph>
<TextRuns>
<TextRun>
<Value>Facura:</Value>
<Value>Factura:</Value>
<Style>
<FontWeight>Bold</FontWeight>
</Style>
@@ -802,9 +803,7 @@
<TextRuns>
<TextRun>
<Value>=Parameters!FechaImpresion.Value</Value>
<Style>
<Format>D</Format>
</Style>
<Style />
</TextRun>
</TextRuns>
<Style />

View File

@@ -873,33 +873,34 @@ Partial Class Ventas_PVCobranza
msBuild.AppendFormat("{0}", pdfNC)
End If
If respNC IsNot Nothing Then
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
msBuild.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}",
dr("CveIE").ToString,
dr("CveVenta").ToString,
respNC.Factura.CveCliente,
respNC.CveVenta,
respNC.Factura.Total))}"">Imprimir Saldo Aplicado {dr("Folio").ToString}</a><br/>")
Next
Else
For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows
msBuild.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}",
dr("CveIE").ToString,
dr("CveVenta").ToString,
respFactura.Factura.CveCliente,
respFactura.CveVenta,
respFactura.Factura.Total))}"">Imprimir Saldo Aplicado {dr("Folio").ToString}</a><br/>")
Next
End If
If Not String.IsNullOrEmpty(MsgTimbrado) Then
msBuild.AppendFormat("<br/>{0}<br/>", MsgTimbrado)
End If
If respNC IsNot Nothing Then
For Each dr As DataRow In respNC.Factura.DtAnticiposAplicados.Rows
msBuild.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,
respNC.Factura.CveCliente,
respNC.CveVenta,
respNC.Factura.Total,
(respNC.Factura.Total - respNC.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
Next
Else
For Each dr As DataRow In respFactura.Factura.DtAnticiposAplicados.Rows
msBuild.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,
respFactura.Factura.CveCliente,
respFactura.CveVenta,
respFactura.Factura.Total,
(respFactura.Factura.Total - respFactura.Factura.DtAnticiposAplicados.SUM("Importe"))))}"">Imprimir historial {dr("Folio").ToString}</a><br/>")
Next
End If