Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -6150,7 +6150,12 @@ Public Class ClsPaginas
|
||||
rds.Value = DtDatos
|
||||
lrds.Add(rds)
|
||||
|
||||
ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:="PDF"), NombreArchivo, Formato, Content_Disposition:=Content_Disposition)
|
||||
Dim Extension = "pdf"
|
||||
If Formato.ToLower() = "excel" Then
|
||||
Extension = "xlsx"
|
||||
End If
|
||||
|
||||
ImprimirbytesPDF(StreamBytesStimulsoft("Facturas", RutaReporte, lrds, Parametros, NombreArchivo:=NombreArchivo, Formato:=Formato), NombreArchivo, Formato, Content_Disposition:=Content_Disposition, Extension:=Extension)
|
||||
End Sub
|
||||
Public Sub ImprimirPDFMultiDS(RutaReporte As String, lrds As List(Of ReportDataSource), Parametros As List(Of ReportParameter), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional RDSName As String = "DataSet1", Optional MR As ReportViewer = Nothing)
|
||||
ImprimirPDF(RutaReporte, lrds, Parametros, NombreArchivo, Formato, MR)
|
||||
@@ -6614,10 +6619,9 @@ Public Class ClsPaginas
|
||||
''' <param name="NombreArchivo"></param>
|
||||
''' <param name="Formato"></param>
|
||||
''' <remarks></remarks>
|
||||
Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment")
|
||||
Public Sub ImprimirbytesPDF(bytes As Byte(), Optional NombreArchivo As String = "Reporte", Optional Formato As String = "PDF", Optional Descarga As Boolean = False, Optional Content_Disposition As String = "attachment", Optional Extension As String = "")
|
||||
'limpio ReportViwer
|
||||
Dim mimeType As String = Nothing
|
||||
Dim extension As String = Nothing
|
||||
|
||||
'If Descarga Then
|
||||
' Try
|
||||
@@ -6642,7 +6646,15 @@ Public Class ClsPaginas
|
||||
Response.ContentType = mimeType
|
||||
End If
|
||||
Response.ClearHeaders()
|
||||
Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, If(Formato = "PDF", "pdf", "xls")))
|
||||
|
||||
Dim fileExtension As String = ""
|
||||
If Not String.IsNullOrEmpty(extension) Then
|
||||
fileExtension = extension
|
||||
Else
|
||||
fileExtension = If(Formato = "PDF", "pdf", "xls")
|
||||
End If
|
||||
|
||||
Response.AddHeader("content-disposition", String.Format("{0}; filename=""{1}.{2}""", Content_Disposition, NombreArchivo, fileExtension))
|
||||
Response.BinaryWrite(bytes) ' create the file
|
||||
Response.Flush() ' send it to the client to download
|
||||
bytes = Nothing
|
||||
|
||||
@@ -69,13 +69,15 @@ Partial Class Bancos_RepCxCCliente
|
||||
Mov.Dispose()
|
||||
GvCxC.DataBind()
|
||||
|
||||
'If (GvCxC.Rows.Count > 0) Then
|
||||
GvCxC.UseAccessibleHeader = True
|
||||
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
RegistraScript("OrdenarGV();")
|
||||
UPDatos.Update()
|
||||
If (GvCxC.Rows.Count > 0) Then
|
||||
GvCxC.UseAccessibleHeader = True
|
||||
If GvCxC.HeaderRow IsNot Nothing Then
|
||||
GvCxC.HeaderRow.TableSection = TableRowSection.TableHeader
|
||||
End If
|
||||
RegistraScript("OrdenarGV();")
|
||||
|
||||
'End If
|
||||
End If
|
||||
UPDatos.Update()
|
||||
End Sub
|
||||
Protected Sub GvCxC_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvCxC.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
@@ -14,7 +14,6 @@ using System.Text;
|
||||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
using System.Xml.Linq;
|
||||
using iTextSharp.text.pdf;
|
||||
|
||||
|
||||
public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
@@ -286,8 +285,8 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
{
|
||||
XElement xfile = new XElement("archivo");
|
||||
xfile.SetAttributeValue("URL", urfile);
|
||||
xfile.SetAttributeValue("EXT", Path.GetExtension(urfile).ToLower());
|
||||
if (Path.GetExtension(urfile).ToLower() == ".xml")
|
||||
xfile.SetAttributeValue("EXT",System.IO.Path.GetExtension(urfile).ToLower());
|
||||
if (System.IO.Path.GetExtension(urfile).ToLower() == ".xml")
|
||||
{
|
||||
var xmlobj = ADSistemaLibrary3.SatXml.XmlSatCFDI.readXML(urfile);
|
||||
|
||||
@@ -372,7 +371,7 @@ public partial class Documentacion_TableroMaterialidad : ClsPaginas
|
||||
{
|
||||
try
|
||||
{
|
||||
PdfReader reader = new PdfReader(urfile);
|
||||
var reader = new iTextSharp.text.pdf.PdfReader(urfile);
|
||||
|
||||
text = iTextSharp.text.pdf.parser.PdfTextExtractor.GetTextFromPage(reader, 1, new iTextSharp.text.pdf.parser.LocationTextExtractionStrategy());
|
||||
foliofiscal = string.Empty;
|
||||
|
||||
@@ -3963,7 +3963,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
RegistraScript("$('#ModalVerSugerencias').modal('hide')")
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) 'Handles DdlAlmacen.SelectedIndexChanged
|
||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged
|
||||
RecargaporAlmacenes()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1639,7 +1639,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ErrorMovInv = True
|
||||
Else
|
||||
Dim CveMovimientoDetalleSalida As Integer = 0
|
||||
Dim importe As Double = 0
|
||||
'Dim importe As Double = 0
|
||||
|
||||
For Each GvRow As GridViewRow In GvDatosRecepcion.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
@@ -1675,7 +1675,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
End If
|
||||
|
||||
importe += Cantidad * PrecioUnitario
|
||||
'importe += Cantidad * PrecioUnitario
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
@@ -1700,15 +1700,15 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
If CveAlmacenVirtual > 0 And CveAlmacenVirtualSalida > 0 Then
|
||||
|
||||
Dim dtvirtual As DataTable = Nothing
|
||||
Dim importePoliza As Decimal = 0
|
||||
'Dim importePoliza As Decimal = 0
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoEntrada, UsuarioActual.CveEmpresa, CveMovimientoRelacionado:=CveMovimientoSalida) Then
|
||||
dtvirtual = ObjInventario.DtResultados
|
||||
If dtvirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, Modulo:="TA/C2")
|
||||
CveMovimientoVirtualEntrada = ObjInventario.AddMovimiento(CveAlmacenVirtual, 36, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoEntrada, MovimientoFijo:=True, Modulo:="TA/C2")
|
||||
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, Modulo:="TA/C3")
|
||||
CveMovimientoVirtualSalida = ObjInventario.AddMovimiento(CveAlmacenVirtualSalida, 37, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:=TxtObservacionesRecepcion.Text.Trim, CveMovimientoRelacionado:=CveMovimientoSalidaTransitorio, MovimientoFijo:=True, Modulo:="TA/C3")
|
||||
|
||||
FolioVirtualEntrada = ObjInventario.Folio
|
||||
|
||||
@@ -1720,7 +1720,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim CostoIndirecto As Decimal = RowVirtual("CostoIndirecto").ToString().ToDecimal()
|
||||
|
||||
|
||||
importePoliza = importePoliza + (CantidadUsado * PU)
|
||||
'importePoliza = importePoliza + (CantidadUsado * PU)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtualEntrada, CantidadUsado, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
@@ -1743,6 +1743,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
If Not ErrorMovInv AndAlso (CveMovimientoSalida > 0 And CveMovimientoVirtualEntrada > 0) Then
|
||||
|
||||
Dim importePoliza As Decimal = 0
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoVirtualEntrada, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
importePoliza = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||
End If
|
||||
|
||||
Dim CvePrePolizaMovVirtual As Integer = ObjConta.AddPrePolizas("TA/C2|TA/C3", 53, importePoliza, importePoliza, 1, TxtFecha.Text.ToDate, "TA/C2|TA/C3", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CvePrePolizaMovVirtual > 0 Then
|
||||
If Not ErrorMovInv AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePolizaMovVirtual, True, importePoliza, importePoliza, 68, TxtObservacionesRecepcion.Text, TxtObservacionesRecepcion.Text, -1, -1, CveMovimientoAlmacen:=CveMovimientoVirtualSalida, Contabilizable:=False) Then
|
||||
@@ -1770,7 +1775,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundAD
|
||||
Dim ImporteDecimal As Decimal = 0
|
||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoEntrada, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
ImporteDecimal = ObjInventario.DtResultados.SUMD("Total").RoundSQL
|
||||
End If
|
||||
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
@@ -3354,6 +3363,29 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Return Respuesta
|
||||
End Function
|
||||
|
||||
'Private Sub CargaDireccionesEnvio()
|
||||
' Dim ObjClientes As New ClsClientes
|
||||
' Dim TieneError = False
|
||||
|
||||
' DdlDireccionEnvio.Items.Clear()
|
||||
' If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then
|
||||
' DdlDireccionEnvio.DataSource = ObjClientes.DtResultados.FiltraParametros(String.Format("Estatus = 1"))
|
||||
' DdlDireccionEnvio.DataBind()
|
||||
' 'DdlDireccionEnvio.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
' TmpDTEnvioDireccion = ObjClientes.DtResultados
|
||||
' Else
|
||||
' TieneError = True
|
||||
' End If
|
||||
|
||||
' If TieneError Then
|
||||
' Alert("Ocurrió un error al obtener las direcciones de envío", TipoMensaje.MsgError)
|
||||
' End If
|
||||
|
||||
' ObjClientes.Dispose()
|
||||
' UpCliente.Update()
|
||||
|
||||
'End Sub
|
||||
|
||||
#End Region
|
||||
End Class
|
||||
|
||||
|
||||
@@ -25,6 +25,7 @@ public partial class SiteAngular : System.Web.UI.Page
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
string a = ex.Message;
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1740,7 +1740,7 @@
|
||||
<asp:ListItem Value="Efectivo" Text="Efectivo"></asp:ListItem>
|
||||
<asp:ListItem Value="Cheque" Text="Cheque"></asp:ListItem>
|
||||
<asp:ListItem Value="Tranferencia" Text="Transferencia"></asp:ListItem>
|
||||
<asp:ListItem Value="-1" Text="Seleccione" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Value="-1" Text="-" Selected="True"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<label for="<%= DdlTipoPago.ClientID.ToString()%>">Tipo Pago:</label>
|
||||
</div>
|
||||
@@ -4515,10 +4515,6 @@
|
||||
<ajax:TabPanel ID="TabLineasAdicionales" runat="server" HeaderText="Lineas Adicionales" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row ">
|
||||
<div class="col-md-12">
|
||||
|
||||
@@ -6686,9 +6682,9 @@
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlTipoLineaAdicionalModal" CssClass="form-control select2me" runat="server" Width="250px" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoLineaAdicionalModal_SelectedIndexChanged">
|
||||
<asp:ListItem Text="PO" Value="2"></asp:ListItem>
|
||||
<asp:ListItem Text="Seleccione" Value="-1" Selected="True"></asp:ListItem>
|
||||
<asp:ListItem Text="Pagaré Especial" Value="1"></asp:ListItem>
|
||||
<asp:ListItem Text="PO" Value="2"></asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlTipoLinea" InitialValue="-1" runat="server" ControlToValidate="TxtLineaAdicionalModal" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo de Linea''</b> es necesario, por favor ingréselo." ValidationGroup="GrpLineaAdicional"></asp:RequiredFieldValidator>
|
||||
|
||||
@@ -917,7 +917,6 @@ Partial Class Clientes
|
||||
|
||||
ChecaPermiteCredito()
|
||||
|
||||
|
||||
'Crea y carga CuentasBancarias - tab:Bancos
|
||||
CargaCuentasBancarias()
|
||||
|
||||
@@ -939,8 +938,6 @@ Partial Class Clientes
|
||||
TxtFechaICredito.Text = Now.AddYears(-2).ToShortDateString()
|
||||
TxtFechaFCredito.Text = Now.ToShortDateString()
|
||||
|
||||
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(257) Then 'Falta agregar proceso
|
||||
DivMapAddSucursal.Visible = True
|
||||
LiLnkAgragarDireccion.Visible = True
|
||||
@@ -950,17 +947,12 @@ Partial Class Clientes
|
||||
|
||||
MostrarTxtDireccionesClienteEnvio()
|
||||
|
||||
|
||||
If CveCliente > 0 AndAlso UsuarioActual.CveEmpresa.Contiene(119, 1) AndAlso UsuarioActual.CveRol = 1 Then
|
||||
If CveCliente > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(705) = "1" AndAlso UsuarioActual.TienePermisoProceso(350) Then
|
||||
CargaCombosLineasAdicionales()
|
||||
TabLineasAdicionales.Visible = True
|
||||
LnkAgregarLineaAdicional.Visible = True
|
||||
GetLineasAdicionales()
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'EN SERIO SE OCUPA EN CADA POSTBACK ??? IPP 7 SEPTIEMNRE 2017
|
||||
@@ -1050,7 +1042,7 @@ Partial Class Clientes
|
||||
DdlEstadoSAT.DataSource = GlobalDTGralEstados(ClaveSATPais)
|
||||
|
||||
DdlEstadoSAT.DataBind()
|
||||
DdlEstadoSAT.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlEstadoSAT.Items.Insert(0, New ListItem("-", "-1"))
|
||||
UpDatos.Update()
|
||||
|
||||
End Sub
|
||||
@@ -1059,11 +1051,11 @@ Partial Class Clientes
|
||||
Dim Dt As DataTable = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa).FiltraParametros("True", "Nombre")
|
||||
DdlResponsable.DataSource = Dt.FiltraParametros("Estatus = 1", "", {"CveUsuario", "Nombre"})
|
||||
DdlResponsable.DataBind()
|
||||
DdlResponsable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlResponsable.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
DdlResponsableSucursal.DataSource = Dt
|
||||
DdlResponsableSucursal.DataBind()
|
||||
DdlResponsableSucursal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
DdlResponsableSucursal.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
UpAgregarSucursal.Update()
|
||||
UpDatos.Update()
|
||||
@@ -1975,6 +1967,7 @@ Partial Class Clientes
|
||||
DtCxCActivas = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Act'", "Moneda, OrdenVencimiento, FechaVencimiento")
|
||||
GvCxC.DataSource = DtCxCActivas
|
||||
If DtCxCActivas.MAX("LineaAdicional") = "" Then GvCxC.Columns(6).Visible = False
|
||||
If DtCxCActivas.MAX("CobranzaEstatus") = "" Then GvCxC.Columns(10).Visible = False
|
||||
'solo tomo los 10 ultimos mas el totalizador general
|
||||
Dim dt As DataTable = ObjMovtos.DtResultados.FiltraParametros("Tipo = 'Hist'")
|
||||
DtHistorialCxC = dt
|
||||
@@ -4239,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
|
||||
@@ -4272,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
|
||||
@@ -4348,6 +4356,56 @@ Partial Class Clientes
|
||||
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)
|
||||
|
||||
Dim a As String = String.Format("{0} -- {1} ---- -->", Asunto, Para)
|
||||
@@ -10338,14 +10396,13 @@ Partial Class Clientes
|
||||
If RdTipoPersona.SelectedValue.ToEntero = 1 And UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
|
||||
DivRazonSocial2.Attributes.Add("class", "col-md-8")
|
||||
DVRegimenSociedad.Visible = True
|
||||
TxtNombreComercial.Enabled = False
|
||||
Else
|
||||
TxtNombreComercial.Enabled = True
|
||||
End If
|
||||
' DdlRegimenFiscal.SelectedIndex = -1
|
||||
|
||||
Dim dt As DataTable = GlobalDTRegimenesFiscales(RdTipoPersona.SelectedValue.ToEntero).FiltraParametros("", "CodigoRegimenFiscal")
|
||||
Dim Val As String
|
||||
Dim Val As String = ""
|
||||
|
||||
If dt IsNot Nothing AndAlso dt.Rows.Count > 0 Then
|
||||
'verifico que sino existe el valor. lo limpie
|
||||
@@ -10366,29 +10423,15 @@ Partial Class Clientes
|
||||
|
||||
Private Sub CargaCombosLineasAdicionales()
|
||||
|
||||
If (UsuarioActual.Empresa.Funcionalidad(105) = "1") Then
|
||||
DdlProveedorLineaAdicionalModal.setEsWebService(True)
|
||||
DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedorLineaAdicionalModal.SelectedText = "-"
|
||||
DdlProveedorLineaAdicionalModal.SelectedValue = "-1"
|
||||
|
||||
|
||||
|
||||
Else
|
||||
DdlProveedorLineaAdicionalModal.setEsWebService(False)
|
||||
DdlProveedorLineaAdicionalModal.ddl.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
||||
DdlProveedorLineaAdicionalModal.ddl.DataBind()
|
||||
DdlProveedorLineaAdicionalModal.ddl.Items.Insert(0, New ListItem("-", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
DdlProveedorLineaAdicionalModal.setEsWebService(True)
|
||||
DdlProveedorLineaAdicionalModal.Attributes.Add("data-metodo", "getproveedores")
|
||||
DdlProveedorLineaAdicionalModal.SelectedText = "-"
|
||||
DdlProveedorLineaAdicionalModal.SelectedValue = "-1"
|
||||
|
||||
DdlCategoriaLineaAdicionalModal.DataSource = GlobalDTGralCategorias(UsuarioActual.CveEmpresa)
|
||||
DdlCategoriaLineaAdicionalModal.DataBind()
|
||||
DdlCategoriaLineaAdicionalModal.Items.Insert(0, New ListItem("-", "-1"))
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GetLineasAdicionales()
|
||||
|
||||
@@ -224,6 +224,15 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="row" id="divPrestamo" runat="server" visible="false" >
|
||||
<div class="col-md-2" >Préstamo:</div>
|
||||
<div class="col-md-3">
|
||||
<asp:TextBox ID="TxtPrestamo" runat="server" Width ="100px" ClientIDMode="Static" />
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlPrestamo" runat="server" Width="40px" DataTextField="RazonSocial" DataValueField="CveIE"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<asp:UpdatePanel ID="UpCuentaDeposito" UpdateMode="Conditional" runat="server">
|
||||
<ContentTemplate>
|
||||
|
||||
@@ -1811,13 +1811,6 @@ Partial Class Ventas_ClientesAbonar
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
|
||||
ObjFacturaDevolucion.Version = "4.0"
|
||||
|
||||
'If ObjFacturaDevolucion.Cliente Is Nothing Then
|
||||
' ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
|
||||
'End If
|
||||
|
||||
'ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
|
||||
'ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
|
||||
Else
|
||||
ObjFacturaDevolucion.Version = "3.3"
|
||||
End If
|
||||
@@ -1826,9 +1819,12 @@ Partial Class Ventas_ClientesAbonar
|
||||
ObjFacturaDevolucion.MetodoPago33 = "PUE - Pago en una sola exhibición"
|
||||
ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE"
|
||||
|
||||
ObjFacturaDevolucion.CveFormaPago33 = 21
|
||||
ObjFacturaDevolucion.FormaPago33 = "30 - Aplicación de anticipos"
|
||||
ObjFacturaDevolucion.FormaPagoSAT33 = "30"
|
||||
Dim drtt As DataRow = GlobalDTTipoTransacciones.FiltroPrimero("CveTipoTransaccion =" & DdlTipoTransaccion.SelectedValue)
|
||||
Dim dra As DataRow = GlobalDTVtaFormaPago.FiltroPrimero("CveFormaPago = " & drtt("CveFormaPago"))
|
||||
|
||||
ObjFacturaDevolucion.CveFormaPago33 = dra("CveFormaPago").ToString
|
||||
ObjFacturaDevolucion.FormaPago33 = dra("FormaPagoSAT").ToString
|
||||
ObjFacturaDevolucion.FormaPagoSAT33 = dra("ClaveFormaPagoSAT").ToString
|
||||
|
||||
ObjFacturaDevolucion.CveSubProyecto = CveSubProyecto
|
||||
ObjFacturaDevolucion.SetSubProyecto()
|
||||
@@ -1840,9 +1836,9 @@ Partial Class Ventas_ClientesAbonar
|
||||
If ObjCliente.GetClientes(ObjFacturaDevolucion.CveCliente, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1, TipoCliente:=-1) Then
|
||||
If ObjCliente.DtResultados.Rows.Count > 0 Then
|
||||
|
||||
ObjFacturaDevolucion.CveUsoCFDI = ObjCliente.CveUsoCFDI
|
||||
ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||
ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", ObjCliente.CveUsoCFDI))
|
||||
ObjFacturaDevolucion.CveUsoCFDI = 2
|
||||
ObjFacturaDevolucion.UsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("Descripcion", String.Format("CveUsoCFDI = {0}", 2))
|
||||
ObjFacturaDevolucion.ClaveUsoCFDI = GlobalDTSATUsosCFDI.FiltroPrimeroValor("UsoCFDI", String.Format("CveUsoCFDI = {0}", 2))
|
||||
|
||||
ObjFacturaDevolucion.DtDetalle = CreaDTDetalleNC()
|
||||
|
||||
|
||||
@@ -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