Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -4232,7 +4232,23 @@ Partial Class Clientes
|
||||
Try
|
||||
Dim File As Byte()
|
||||
If Archivo.Exists Then
|
||||
File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||
Dim ArchivoSti As New System.IO.FileInfo(String.Format("{0}Formatos/RepClientesCxC.mrt", UsuarioActual.Empresa.Ruta))
|
||||
If ArchivoSti.Exists Then
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = "Datos"
|
||||
rds.Value = DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha")
|
||||
lrds.Add(rds)
|
||||
|
||||
File = StreamBytesStimulsoft("Facturas", $"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", lrds, listass, NombreArchivo:="Estado de cuenta", Formato:=Formato)
|
||||
Else
|
||||
File = ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||
End If
|
||||
Else
|
||||
File = ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4265,7 +4281,6 @@ Partial Class Clientes
|
||||
Alert("El correo se envió con éxito", TipoMensaje.MsgInformacion)
|
||||
Catch ex As Exception
|
||||
Alert("Ocurrió un error al enviar el correo", TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End Try
|
||||
|
||||
Catch ex As Exception
|
||||
@@ -4278,8 +4293,8 @@ Partial Class Clientes
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4331,8 +4346,8 @@ Partial Class Clientes
|
||||
Dim listass As New List(Of ReportParameter)
|
||||
For Each item As CrystalParametro In lista
|
||||
listass.Add(New ReportParameter(item.Nombre, item.Valor.ToString()))
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Next
|
||||
ImprimirPDFStimulsoft($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.mrt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), listass, "Estado de cuenta", Formato)
|
||||
Else
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal($"{UsuarioActual.Empresa.Ruta}Formatos/RepClientesCxC.rpt", DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
@@ -4340,6 +4355,56 @@ Partial Class Clientes
|
||||
ImprimirbytesPDF(ImprimirPDFCrystal(Server.MapPath("~/Empresas/Grales/Formatos/RepClientesCxC.rpt"), DtCxCFact2.FiltraParametros("", "CveMoneda,Fecha"), lista, "Estado de cuenta", Formato), "Estado de cuenta", Formato)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Public Sub ImprimirExcelStimulsoft(RutaReporte As String, DtDatos As DataTable, Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional RDSName As String = "Datos", Optional Content_Disposition As String = "attachment")
|
||||
Dim lrds As New List(Of ReportDataSource)
|
||||
Dim rds As New ReportDataSource
|
||||
rds.Name = RDSName
|
||||
rds.Value = DtDatos
|
||||
lrds.Add(rds)
|
||||
|
||||
ImprimirbytesExcel(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:="EXCEL"), NombreArchivo, "EXCEL", Content_Disposition:=Content_Disposition)
|
||||
End Sub
|
||||
Public Sub ImprimirbytesExcel(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment")
|
||||
'limpio ReportViwer
|
||||
Dim mimeType As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
|
||||
'If Descarga Then
|
||||
' Try
|
||||
' bytes = bytes
|
||||
' File.WriteAllBytes(String.Format("{0}PDF/whatever.gif", UsuarioActual.Empresa.Ruta), img)
|
||||
' Catch ex As Exception
|
||||
' If UsuarioActual.CveRol = 1 Then
|
||||
' Alert(ex.Message, TipoMensaje.MsgAdvertencia)
|
||||
' Else
|
||||
' Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||
' End If
|
||||
' End Try
|
||||
'End If
|
||||
|
||||
Try
|
||||
bytes = bytes
|
||||
Response.Buffer = True
|
||||
Response.Clear()
|
||||
Response.ContentType = "application/vnd.ms-excel"
|
||||
Response.ClearHeaders()
|
||||
Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xlsx")))
|
||||
Response.BinaryWrite(bytes) ' create the file
|
||||
Response.Flush() ' send it to the client to download
|
||||
bytes = Nothing
|
||||
HttpContext.Current.Response.SuppressContent = True
|
||||
HttpContext.Current.ApplicationInstance.CompleteRequest()
|
||||
'HttpContext.Current.Response.End()
|
||||
Catch ex As Exception
|
||||
|
||||
If UsuarioActual.CveRol = 1 Then
|
||||
Alert($"Error: {ex.Message} | Descripcion: {If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException IsNot Nothing AndAlso ex.InnerException.InnerException.Message IsNot Nothing, ex.InnerException.InnerException.Message, If(ex.InnerException IsNot Nothing AndAlso ex.InnerException.Message IsNot Nothing, ex.InnerException.Message, "Sin descripcion"))}", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("Ocurrió un error al generar la descarga. Favor de contactar a soporte tecnico cod:'IMPDFclspag'", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End Try
|
||||
End Sub
|
||||
Private Sub MandaCorreoEstadoCuenta(CveUsuario As Integer, CveEmpresa As Integer, CveCliente As Integer, File As Byte(), Para As String, Asunto As String, Body As String, Optional GuardarBitacora As Boolean = False)
|
||||
|
||||
|
||||
@@ -186,12 +186,21 @@ Partial Class PopUpBuscarFolio
|
||||
e.Row.FCLiteral("LtlXML").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
End If
|
||||
|
||||
If IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("Folio")}.pdf") Then
|
||||
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.pdf&TipoArchivo=PDF"">PDF</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
If e.Row.DBCampo("TipoDocto") <> "Cot" AndAlso IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("Folio")}.pdf") Then
|
||||
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.pdf&TipoArchivo=PDF"">PDF</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlPDF").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
End If
|
||||
Else
|
||||
e.Row.FCLiteral("LtlPDF").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
If IO.File.Exists($"{Ruta}PDF\{e.Row.DBCampo("TipoDocto")}\{e.Row.DBCampo("Folio")}.pdf") Then
|
||||
e.Row.FCLiteral("LtlPDF").Text = String.Format("<div class='truncate' style='width:23px;'><a class=""Texto"" target=""_blank"" href=""/Compras/PopUpVerFactura.aspx?TipoDocto={0}&File={1}.pdf&TipoArchivo=PDF"">PDF</a></div>", e.Row.DBCampo("TipoDocto"), e.Row.DBCampo("Folio"))
|
||||
Else
|
||||
e.Row.FCLiteral("LtlPDF").Text = "<div class='truncate' style='width:23px;'></div>"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -36,7 +36,7 @@
|
||||
<div class="portlet light smmallpadding traspasorow bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption font-green">
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Facturas Pendientes Por Respuesta</span>
|
||||
<span class="caption-subject bold uppercase" style="line-height: 1;">Facturas Pendientes Por Respuesta <asp:Literal ID="LtlFacturasPendiente" runat="server"></asp:Literal></span>
|
||||
</div>
|
||||
|
||||
<div class="actions">
|
||||
|
||||
@@ -551,7 +551,7 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
if (DtVentas != null)
|
||||
{
|
||||
var sb = new StringBuilder();
|
||||
foreach (DataRow Row in DtVentas.Rows)
|
||||
foreach (DataRow Row in DtVentas.FiltraParametros("(CveEstatusFactura IN (20) AND CveEstatusRefacturacion IN (0,4))").Rows)
|
||||
{
|
||||
int CveVenta = Row["CveVenta"].ToEntero();
|
||||
string Total = Row["Total"].ToString();
|
||||
@@ -564,7 +564,8 @@ public partial class Ventas_RepCancelacionesPorRespuesta : ClsPaginas
|
||||
int CveCliente = Row["CveCliente"].ToEntero();
|
||||
if (CveVenta > 0)
|
||||
{
|
||||
sb.AppendFormat("{0}<br/>", VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCReceptor, SubTotal));
|
||||
var resp = VerificarVigenciaSAT(CveVenta, CveCliente, Folio, TipoDocto, Uuid, UsuarioActual.Empresa.RFC, RFCReceptor, SubTotal);
|
||||
sb.AppendFormat("{0}<br/>",resp.Mensaje);
|
||||
}
|
||||
}
|
||||
Alert(sb.ToString());
|
||||
|
||||
@@ -3440,6 +3440,10 @@ Partial Class Ventas
|
||||
LblRotacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString
|
||||
LblAlineacion.Text = FechaRotaAlinea.AddMonths(6).ToShortDateString
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso Me.CveVenta > 0 AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
HplDownPDF.Visible = False
|
||||
End If
|
||||
|
||||
UPObservaciones.Update()
|
||||
End If
|
||||
|
||||
|
||||
Reference in New Issue
Block a user