This commit is contained in:
Rakcsle Supertramp
2020-01-14 15:34:25 -07:00
9 changed files with 185 additions and 34 deletions

View File

@@ -1554,7 +1554,9 @@ Public Class ClsClientes
Return Retorno
End Function
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String, Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer, NumCuentaPago As String, Optional CvePrecioLista As Integer = -1) As Boolean
Public Function AgregarClienteNoFrecuente(Nombre As String, Direccion As String, NoExt As String, NoInt As String, Colonia As String, Localidad As String, Ciudad As String, Estado As String,
Pais As String, RFC As String, CP As String, Telefono As String, Mail As String, CveSubProyecto As Integer, CveUsuario As Integer, CveEmpresa As Integer,
NumCuentaPago As String, CveMetodoPago33 As Integer, CveFormaPago33 As Integer, Optional CvePrecioLista As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_ClientesNoFrecuenteAdd")
@@ -1575,6 +1577,8 @@ Public Class ClsClientes
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveMetodoPago33", SqlDbType.Int).Value = CveMetodoPago33
.Add("@CveFormaPago33", SqlDbType.Int).Value = CveFormaPago33
.Add("@NumCuentaPago", SqlDbType.VarChar).Value = NumCuentaPago
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
@@ -1604,8 +1608,8 @@ Public Class ClsClientes
End Try
Return Retorno
End Function
End Function
#Region "UNIFICAR CLIENTES"
Public Function UnificarClientes(CveClienteAUnificar As Integer, CveClienteOriginal As Integer) As Boolean
Dim Retorno As Boolean = False

View File

@@ -81,6 +81,14 @@ Partial Class Bancos_RepProgramarRecursos
ViewState("UsuarioProgramo") = value
End Set
End Property
Private Property CveProveedor As Integer
Get
Return ViewState("CveProveedor").ToString.ToEntero
End Get
Set(value As Integer)
ViewState("CveProveedor") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -91,7 +99,6 @@ Partial Class Bancos_RepProgramarRecursos
Orden = ""
Opcion = "-1"
HdnEmp.Value = UsuarioActual.CveEmpresa.ToString
If (UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1") Then
DdlProveedores.setEsWebService(True)
DdlProveedores.Attributes.Add("data-metodo", "getproveedores")
@@ -303,7 +310,7 @@ Partial Class Bancos_RepProgramarRecursos
End Sub
Private Sub CargaDatos()
CveProveedor = DdlProveedores.SelectedValue.ToEntero
Dim CveUsuarioProgramo As Integer = DdlUsuarioProgramo.SelectedValue.ToEntero 'UsuarioActual.CveUsuario
If Not ChkProgramadas.Checked Then CveUsuarioProgramo = -1
If ChkProgramadas.Checked And DdlUsuarioProgramo.SelectedValue.ToEntero = -1 Then CveUsuarioProgramo = -2
@@ -803,7 +810,8 @@ Partial Class Bancos_RepProgramarRecursos
End Sub
Private Sub Imprimir(Optional Formato As String = "PDF")
Dim Proveedor = If(DdlProveedores.SelectedValue = "-1", "", $"&emsp;<b>Proveedor:</b>&nbsp;{DdlProveedores.SelectedText}")
Dim Proveedor = If(CveProveedor = -1, "", $"&emsp;<b>Proveedor:</b>&nbsp;{GlobalDTCompProveedores(UsuarioActual.CveEmpresa).FiltraParametros($"CveProveedor = {CveProveedor}").Rows(0)("RazonSocial").ToString}")
Dim Clasificacion = If(DdlProveedoresClasificaciones.SelectedValue = "-1", "", $"&emsp;<b>Clasificación:</b>&nbsp;{DdlProveedoresClasificaciones.SelectedItem.Text}")
Dim AplicaNC = If(DdlAplicaNC.SelectedValue = "-1", "", $"&emsp;<b>Aplica NC:</b>&nbsp;{DdlAplicaNC.SelectedItem.Text}")
Dim TipoProv = If(DdlTipoProveedor.SelectedValue = "0", "", $"&emsp;<b>Tipo Prov.:</b>&nbsp;{DdlTipoProveedor.SelectedItem.Text}")

View File

@@ -1322,7 +1322,7 @@ Partial Class PopUpVerFactura
If CveConcepto = 33 Then ConceptoFormato = "ENTRADA MANUAL"
'IMPRESION ESPECIAL SALIDA DE COMPUPROVEEDORES y VSH
If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145) Then
If UsuarioActual.CveEmpresa.Contiene(72, 80, 119, 4, 145, 146) Then
params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa))
params.Add(New ReportParameter("Concepto", ConceptoFormato))
params.Add(New ReportParameter("Almacen", Almacen))

View File

@@ -84,6 +84,14 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
ViewState("TP") = value
End Set
End Property
Private Property Cuenta As String
Get
Return ViewState("Cuenta").ToString
End Get
Set(value As String)
ViewState("Cuenta") = value
End Set
End Property
#End Region
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
@@ -226,6 +234,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
Exit Sub
End If
IdCuenta = DdlCuentas.SelectedValue.ToEntero
Cuenta = DdlCuentas.SelectedItem.ToString
Dim ObjConta As New ClsContabilidad
If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, DdlMoneda.SelectedValue.ToEntero, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte) Then
DtDatos = ObjConta.DtResultados
@@ -463,6 +472,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo
params.Add(New ReportParameter("pFechaFin", FechaFin.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("pFechaInicio", FechaInicio.ToString("dd/MM/yyyy")))
params.Add(New ReportParameter("CveMoneda", DdlMoneda.SelectedValue))
params.Add(New ReportParameter("Cuenta", Cuenta))
ImprimirPDF("Contabilidad2/Reportes/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato)
End Sub
Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged

View File

@@ -1318,7 +1318,7 @@
</TablixRowHierarchy>
<KeepTogether>true</KeepTogether>
<DataSetName>DataSet1</DataSetName>
<Top>0.06346cm</Top>
<Top>0.06345cm</Top>
<Height>3cm</Height>
<Width>20.37044cm</Width>
<Style>
@@ -1438,6 +1438,40 @@
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
<Textbox Name="Cuenta">
<CanGrow>true</CanGrow>
<KeepTogether>true</KeepTogether>
<Paragraphs>
<Paragraph>
<TextRuns>
<TextRun>
<Value>=Parameters!Cuenta.Value</Value>
<Style>
<FontSize>11pt</FontSize>
</Style>
</TextRun>
</TextRuns>
<Style>
<TextAlign>Center</TextAlign>
</Style>
</Paragraph>
</Paragraphs>
<rd:DefaultName>Cuenta</rd:DefaultName>
<Top>0.47708in</Top>
<Left>1.82615in</Left>
<Height>0.25in</Height>
<Width>4.42313in</Width>
<ZIndex>3</ZIndex>
<Style>
<Border>
<Style>None</Style>
</Border>
<PaddingLeft>2pt</PaddingLeft>
<PaddingRight>2pt</PaddingRight>
<PaddingTop>2pt</PaddingTop>
<PaddingBottom>2pt</PaddingBottom>
</Style>
</Textbox>
</ReportItems>
<Style>
<Border>
@@ -1470,7 +1504,7 @@
</Paragraph>
</Paragraphs>
<rd:DefaultName>Textbox3</rd:DefaultName>
<Top>0.07023cm</Top>
<Top>0.07022cm</Top>
<Left>15.87314cm</Left>
<Height>0.6cm</Height>
<Width>4.4973cm</Width>
@@ -1611,6 +1645,12 @@
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="Cuenta">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters>
<Code>Dim myVal As boolean
Public Function SetMyVal(ByVal temp As String) As boolean

View File

@@ -683,12 +683,12 @@
<div class="modal-content modal-lg">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=4&FechaInicio=2000/01/01" CssClass="btn btn-xs btn-default" style="float:right;">Ir a Reporte</asp:HyperLink>
<h4 class="modal-title">Ventas sin registrar en SIG</h4>
</div>
<div class="modal-body">
<div style="text-align: right">
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepConciliacionEmitidosSat.aspx?RegistroEn=4">Ver más</asp:HyperLink>
<input type="text" id="TxtBusquedaFolioSat" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaFolioSat','{0}')", GvFoliosSAT.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaFolioSat','{0}')", GvFoliosSAT.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -697,10 +697,14 @@
DataKeyNames="FolioFiscal,RFC,Total"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
<Columns>
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Folio Fiscal">
<ItemTemplate>
<div style="white-space:nowrap "><asp:Label runat="server" Text='<%# Eval("FolioFiscal")%>'> </asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText=" ">
<ItemTemplate>
@@ -731,13 +735,13 @@
<div class="modal-content modal-lg">
<div class="modal-header ">
<button type="button" class="close" data-dismiss="modal">&times;</button>
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepCancelacionesPorAtender.aspx" CssClass="btn btn-xs btn-default" style="float:right;">Ir a Reporte</asp:HyperLink>
<h4 class="modal-title">Cancelaciones por Atender</h4>
</div>
<div class="modal-body">
<div style="text-align: right">
<asp:HyperLink runat="server" NavigateUrl="/Ventas/RepCancelacionesPorAtender.aspx">Ver más</asp:HyperLink>
<input type="text" id="TxtBusquedaCancelaPendiente" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaCancelaPendiente','{0}')", gvCancelaPendiente.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaCancelaPendiente','{0}')", gvCancelaPendiente.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -746,10 +750,14 @@
DataKeyNames="FolioFiscal,RFC,Total"
CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" Style="text-align: center;" GridLines="None" Width="99%">
<Columns>
<asp:BoundField HeaderText="Folio Fiscal" DataField="FolioFiscal" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Folio Fiscal">
<ItemTemplate>
<div style="white-space:nowrap "><asp:Label runat="server" Text='<%# Eval("FolioFiscal")%>'> </asp:Label></div>
</ItemTemplate>
</asp:TemplateField>
<asp:BoundField HeaderText="Serie Folio" DataField="SerieFolio" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Proveedor" DataField="NombreProveedor" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
<asp:BoundField HeaderText="Importe" DataField="Total" DataFormatString="{0:N2}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Fecha" DataField="Fecha" DataFormatString="{0:dd/MM/yyyy}" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center" />
<%--<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText=" ">
<ItemTemplate>
@@ -783,7 +791,7 @@
</div>
<div class="modal-body">
<div align="right">
<div style="text-align:right">
<input type="text" id="TxtBus" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="display: inline-block; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBus','{0}')", GvCompPUE.ClientID) %>" style="margin-top: -3px; margin-left: -13px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
@@ -1000,7 +1008,7 @@
<h4 class="modal-title" id="myModalLabel2" runat="server">Evaluaciones Pendientes</h4>
</div>
<div class="modal-body">
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" align="left">
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right" >
<div style="margin-right: 15px">
<input type="text" id="TxtBusquedaEva" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaEva','{0}')", GvEvaluaciones.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvEvaluaciones.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>

View File

@@ -11,8 +11,47 @@ Imports System.Drawing
Partial Class Inicio
Inherits ClsPaginas
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
Private Dias() As String = {"Domingo", "Lunes", "Martes", "Miércoles", "Jueves", "Viernes", "Sábado"}
Public Function GetFacturasCanceladasPendientesWS(objventas As ClsVentas, RFC As String, CveEmpresa As Integer, Optional showalert As Boolean = True) As Boolean
Dim retorno As Boolean = False
Try
Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient()
Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890")
If resp.Estado = 0 Then
Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml))
Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes)
Dim theDataSet As DataSet = New DataSet()
theDataSet.ReadXml(theReader)
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
Dim sb = New StringBuilder()
For Each item As DataRow In theDataSet.Tables(0).Rows
sb.AppendFormat("{0};", item("Uuid").ToString())
Next
If objventas.GetFacturasCanceladasPendientes(sb.ToString(), CveEmpresa) Then
retorno = True
End If
Else
If showalert Then
Alert("No se encontraron cancelaciones pendientes", ModExtensiones.TipoMensaje.MsgError)
End If
End If
Else
Alert("Error al obtener cancelaciones pendientes: " & resp.Descripcion, ModExtensiones.TipoMensaje.MsgError)
End If
Catch ex As Exception
retorno = False
Me.OnError("Error al obtener cancelaciones pendientes: ", ex, "")
End Try
Return retorno
End Function
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not IsPostBack Then
@@ -30,13 +69,12 @@ Partial Class Inicio
End If
If UsuarioActual.CveUsuario = 100 Then
Using objventas As New ClsVentas
If (objventas.GetFacturasCanceladasPendientesWS(UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, False)) AndAlso objventas.DtResultados.Rows.Count > 0 Then
If (GetFacturasCanceladasPendientesWS(objventas, UsuarioActual.Empresa.RFC, UsuarioActual.CveEmpresa, False)) AndAlso objventas.DtResultados.Rows.Count > 0 Then
RegistraScript("$('#ModalMitotereCancelaPendiente').modal();", "mitoterosatCanceladasPendientesWS")
End If
End Using
End If
'Exit Sub
'RESTRICCION AD
If Not IsNothing(Request("ADCod")) Then

View File

@@ -1648,10 +1648,12 @@ Partial Class PV
CveMetodoPagoCliente = ObjCliente.DtResultados.Rows(0)("CveMetodoPago").ToString.ToEntero
DdlUsoCFDI.SelectedValueExist(ObjCliente.CveUsoCFDI.ToString)
DdlMetodoPago.SelectedValueExist(ObjCliente.CveMetodoPago.ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33.SelectedValueExist(ObjCliente.CveMetodoPago33.ToString)
'DdlMetodoPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveMetodoPago33").ToString)
DdlMetodoPago33_SelectedIndexChanged(DdlMetodoPago33, EventArgs.Empty)
DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlFormaPago33.SelectedValueExist(ObjCliente.CveFormaPago33.ToString)
'DdlFormaPago33.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveFormaPago33").ToString)
DdlUsoCFDI.SelectedValueExist(ObjCliente.DtResultados.Rows(0)("CveUsoCFDI").ToString)
End If
TxtFechaPago.Text = (Now.AddDays(ObjCliente.PlazoCobranza)).ToShortDateString
@@ -4729,7 +4731,10 @@ Partial Class PV
Dim ObjCliente As New ClsClientes
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim, TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim, TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "") Then
If ObjCliente.AgregarClienteNoFrecuente(TxtNombreCliente.Text.Trim, TxtDireccionCliente.Text.Trim, TxtNumExtCliente.Text.Trim, TxtNumIntCliente.Text.Trim, TxtColoniaCliente.Text.Trim,
TxtLocalidadCliente.Text.Trim, TxtCiudadCliente.Text.Trim, TxtEstadoCliente.Text.Trim, TxtPaisCliente.Text.Trim, TxtRFCCliente.Text.Trim,
TxtCPCliente.Text.Trim, TxtTelefonoCliente.Text.Trim, TxtCorreoCliente.Text.Trim, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.CveUsuario,
UsuarioActual.CveEmpresa, "", DdlMetodoCliente.SelectedValue.ToEntero, DdlFormaCliente.SelectedValue.ToEntero) Then
If ObjCliente.DtResultados.Rows.Count > 0 Then
RegistraScript("hideDivEC();")
ViewState("CveCliente") = ObjCliente.DtResultados(0)("CveCliente").ToString.ToEntero

View File

@@ -10,11 +10,13 @@ using System.Xml;
using Extensiones;
using System.Data;
using System.Text;
using ADSistemaLibrary.SatXml;
using ADSistemaLibrary.SatXml;
//using ADS_CFDI_SAT;
public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
{
#region "Propiedades"
const string rqFechaInicio = "FechaInicio";
const string rqFechaFin = "FechaFin";
const string rqRegistroEn = "RegistroEn";
@@ -59,10 +61,44 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
set { ViewState["RegistroEn"] = value; }
}
private StringBuilder strErrores;
#endregion
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
string path;
if (Request["op"] != null && Request["op"].ToString().Length > 0)
{
try
{
if (System.IO.File.Exists((path = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), Extensiones.ModExtensiones.Decripta(Request["op"].ToString()).Trim()).Replace("/", "\\"))))
{
System.IO.FileInfo archivo = new System.IO.FileInfo(path);
HttpContext.Current.Response.Clear();
HttpContext.Current.Response.ClearContent();
HttpContext.Current.Response.ContentType = "text/plain";
HttpContext.Current.Response.AppendHeader("Content-disposition", string.Format("attachment; filename={0}", archivo.Name));
HttpContext.Current.Response.AddHeader("Content-Length", archivo.Length.ToString());
HttpContext.Current.Response.TransmitFile(path);
HttpContext.Current.Response.End();
}
else
{
RegistraScript("window.close()");
}
}
catch (Exception ex)
{
Extensiones.ModExtensiones.GuardaLog(ex.ToString());
RegistraScript("window.close()");
}
}
fillrequestfields();
DdlSubProyectoDatos.DataSource = get_GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1).FiltraParametros("EsSucursal = True ");
DdlSubProyectoDatos.DataBind();
@@ -92,7 +128,7 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
}
private void downfile(string path)
{
}
public void fillrequestfields()
{
@@ -151,8 +187,10 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
{
{
string ruta = string.Format("{0}\\{1}", UsuarioActual.Empresa.Ruta.Trim(), gvrow.DataKey("RutaXml").Trim()).Replace("/", "\\"); //gvrow.DataKey("RutaXml");
//Alert(ruta);
string ruta = gvrow.DataKey("RutaXml");
//return false;
strErrores = new StringBuilder();
XmlSatCFDI objxml = null;
Modelos.Factura objfact = null;
@@ -743,18 +781,18 @@ public partial class Ventas_RepConciliacionEmitidosSat : ClsPaginas
if (e.Row.RowType == DataControlRowType.DataRow)
{
string navurl = "";
if(e.Row.DBCampo("Tipo") == "1")
if (e.Row.DBCampo("Tipo") == "1")
{
string RutaXml = e.Row.DBCampo("RutaXml");
if (RutaXml.IndexOf("Empresas")>0)
{
RutaXml = RutaXml.Substring(RutaXml.IndexOf("Empresas"));
}
navurl =string.Format("RepConciliacionEmitidosSat.aspx?op=", e.Row.DBCampo("RutaXml"));
//if (RutaXml.IndexOf("Empresas")>0)
//{
// RutaXml = RutaXml.Substring(RutaXml.IndexOf("Empresas"));
//}
navurl = string.Format("RepConciliacionEmitidosSat.aspx?op={0}", Extensiones.ModExtensiones.Encripta(e.Row.DataKey("RutaXml")));
}
else
{
navurl = string.Format("/Compras/PopUpVerFactura.aspx?P={0}", Extensiones.ModExtensiones.Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveVenta"), "XML", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("TipoDocto"))));
navurl = string.Format("/Compras/PopUpVerFactura.aspx?P={0}", Extensiones.ModExtensiones.Encripta(String.Format("OP=FactVta&CVEVENTA={0}&EXT={1}&SERIEFOLIO={2}&TIPODOCTO={3}", e.Row.DBCampo("CveVenta"), "XML", e.Row.DBCampo("SerieFolio"), e.Row.DBCampo("TipoDocto"))));
}
e.Row.FCHyperLink("HypXml").NavigateUrl = navurl;
}