Mensaje lentitud validación SAT
This commit is contained in:
@@ -10,14 +10,16 @@ Imports System
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports ADServerControl
|
Imports ADServerControl
|
||||||
Imports System.Threading.Tasks
|
Imports System.Threading.Tasks
|
||||||
|
Imports System.Diagnostics
|
||||||
|
|
||||||
Partial Class Compras_Compras
|
Partial Class Compras_Compras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
|
|
||||||
'Local
|
'Local
|
||||||
Private Property RequiereEvaluacion() As Boolean
|
Private Property RequiereEvaluacion() As Boolean
|
||||||
Get
|
Get
|
||||||
Return If(IsNothing(ViewState("RequiereEvaluacion")), False, CBool(ViewState("RequiereEvaluacion")))
|
Return If(IsNothing(ViewState("RequiereEvaluacion")), False, CBool(ViewState("RequiereEvaluacion")))
|
||||||
@@ -754,9 +756,9 @@ Partial Class Compras_Compras
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
ViewState("EsNoDeducible") = value
|
ViewState("EsNoDeducible") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PROPIEDADES - AC NEW"
|
#Region "PROPIEDADES - AC NEW"
|
||||||
Private Property DtPresupuestos As DataTable
|
Private Property DtPresupuestos As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -773,9 +775,9 @@ Partial Class Compras_Compras
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("EjercicioAC") = value
|
ViewState("EjercicioAC") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PROPIEDADES REFACTURACION "
|
#Region " PROPIEDADES REFACTURACION "
|
||||||
Private Property DtRefacturacion As DataTable
|
Private Property DtRefacturacion As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -816,10 +818,10 @@ Partial Class Compras_Compras
|
|||||||
Set(value As ArrayList)
|
Set(value As ArrayList)
|
||||||
ViewState("ClavesBorradas") = value
|
ViewState("ClavesBorradas") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PROPIEDADES OC "
|
#Region " PROPIEDADES OC "
|
||||||
Private Property TipoCambioOC As Decimal
|
Private Property TipoCambioOC As Decimal
|
||||||
Get
|
Get
|
||||||
@@ -836,9 +838,9 @@ Partial Class Compras_Compras
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
ViewState("PopUpOC") = value
|
ViewState("PopUpOC") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PROPIEDADES ALMACEN" 'Charlie
|
#Region "PROPIEDADES ALMACEN" 'Charlie
|
||||||
Private Property TotalAlmacen As Decimal
|
Private Property TotalAlmacen As Decimal
|
||||||
Get
|
Get
|
||||||
@@ -856,12 +858,12 @@ Partial Class Compras_Compras
|
|||||||
Set(value As Decimal)
|
Set(value As Decimal)
|
||||||
ViewState("TotalFlete") = value
|
ViewState("TotalFlete") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Propiedades"
|
#Region "Propiedades"
|
||||||
|
|
||||||
'CFDi
|
'CFDi
|
||||||
Private Property Serie As String
|
Private Property Serie As String
|
||||||
Private Property Folio As String
|
Private Property Folio As String
|
||||||
Private Property Fecha As String
|
Private Property Fecha As String
|
||||||
@@ -1000,10 +1002,10 @@ Partial Class Compras_Compras
|
|||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("FleteImportacionOpcion") = value
|
ViewState("FleteImportacionOpcion") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PROPIEDADES DE TOTALES "
|
#Region " PROPIEDADES DE TOTALES "
|
||||||
Private Property SubTotalOriginal As Double
|
Private Property SubTotalOriginal As Double
|
||||||
Get
|
Get
|
||||||
@@ -1060,10 +1062,10 @@ Partial Class Compras_Compras
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
ViewState("ActualizaTotales") = value
|
ViewState("ActualizaTotales") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Dim DTConceptos As DataTable
|
Dim DTConceptos As DataTable
|
||||||
Private Property EmpresasOC As List(Of Integer)
|
Private Property EmpresasOC As List(Of Integer)
|
||||||
Get
|
Get
|
||||||
@@ -1585,8 +1587,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
'RegistraScript("ScrollVentanaAddProducto();")
|
'RegistraScript("ScrollVentanaAddProducto();")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "C A R G A S"
|
#Region "C A R G A S"
|
||||||
Private Sub CargaOrdenCorte()
|
Private Sub CargaOrdenCorte()
|
||||||
Dim ObjCGame As New ClsCGame()
|
Dim ObjCGame As New ClsCGame()
|
||||||
@@ -1645,10 +1647,26 @@ Partial Class Compras_Compras
|
|||||||
If IO.File.Exists(Archivo) Then
|
If IO.File.Exists(Archivo) Then
|
||||||
|
|
||||||
Dim Validada As Boolean = True
|
Dim Validada As Boolean = True
|
||||||
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
If Not UsuarioActual.Empresa.Funcionalidad(529) = "1" Then
|
||||||
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
'verificacion doble, si no la han cancelado, ya tiene una validaci[on para que llegue aqui
|
||||||
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim SWatch As New Stopwatch
|
||||||
|
SWatch.Start()
|
||||||
|
Dim ts As New TimeSpan
|
||||||
|
|
||||||
|
|
||||||
|
Dim Valida As New ClsValidaCFDi(dr("UUID").ToString(), dr("RFCDe").ToString, dr("RFCPara").ToString(), dr("Total").ToString.ToDecimal)
|
||||||
|
|
||||||
|
SWatch.Stop()
|
||||||
|
|
||||||
|
|
||||||
|
If SWatch.ElapsedMilliseconds >= 5000 Then
|
||||||
|
Alert("Los servicios de validacion del SAT presentan lentitud en la respuesta.", TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa < 2 Then
|
If UsuarioActual.CveEmpresa < 2 Then
|
||||||
Valida.EsValida = 1
|
Valida.EsValida = 1
|
||||||
End If
|
End If
|
||||||
@@ -3609,9 +3627,9 @@ Partial Class Compras_Compras
|
|||||||
'TmpDT = DtPSTemp.Copy
|
'TmpDT = DtPSTemp.Copy
|
||||||
'DtPSTemp.Dispose()
|
'DtPSTemp.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Vinculacion De Servcios"
|
#Region "Vinculacion De Servcios"
|
||||||
Private Function isAdminObraGluyas() As Boolean
|
Private Function isAdminObraGluyas() As Boolean
|
||||||
Return (UsuarioActual.CveRol = 1047 And UsuarioActual.CveEmpresa = 66)
|
Return (UsuarioActual.CveRol = 1047 And UsuarioActual.CveEmpresa = 66)
|
||||||
@@ -3638,10 +3656,10 @@ Partial Class Compras_Compras
|
|||||||
dt.Dispose()
|
dt.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "BTN'S"
|
#Region "BTN'S"
|
||||||
Protected Sub BtnVincularServicios_Click(sender As Object, e As EventArgs) Handles BtnVincularServicios.Click
|
Protected Sub BtnVincularServicios_Click(sender As Object, e As EventArgs) Handles BtnVincularServicios.Click
|
||||||
Dim correcto As Boolean = True
|
Dim correcto As Boolean = True
|
||||||
@@ -15656,9 +15674,9 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
UPCondicionesPago.Update()
|
UPCondicionesPago.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region " ENVIA CORREO NOTICIACION - VENDEDOR "
|
#Region " ENVIA CORREO NOTICIACION - VENDEDOR "
|
||||||
Private Sub MandaCorreoOCVendedores(CveCompra As Integer)
|
Private Sub MandaCorreoOCVendedores(CveCompra As Integer)
|
||||||
|
|
||||||
@@ -15863,65 +15881,65 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
'VIEJO - COMENTADO IPP 12 JULIO 2017
|
'VIEJO - COMENTADO IPP 12 JULIO 2017
|
||||||
'Private Sub MandaCorreo(CveCompra As Integer)
|
'Private Sub MandaCorreo(CveCompra As Integer)
|
||||||
' Dim ObjOC As New ClsOC
|
' Dim ObjOC As New ClsOC
|
||||||
' Dim DTCorreos As New DataTable
|
' Dim DTCorreos As New DataTable
|
||||||
' Dim DTFolios As New DataTable
|
' Dim DTFolios As New DataTable
|
||||||
' Dim strBody As New StringBuilder
|
' Dim strBody As New StringBuilder
|
||||||
|
|
||||||
' ObjOC.GetOrdenesCompraCorreo(CveCompra)
|
' ObjOC.GetOrdenesCompraCorreo(CveCompra)
|
||||||
' DTCorreos = ObjOC.DtResultados
|
' DTCorreos = ObjOC.DtResultados
|
||||||
|
|
||||||
' ObjOC.GetComprasOC(CveCompra)
|
' ObjOC.GetComprasOC(CveCompra)
|
||||||
' DTFolios = ObjOC.DtResultados
|
' DTFolios = ObjOC.DtResultados
|
||||||
|
|
||||||
' strBody.AppendFormat("Se ha vinculado la compra <b>{0}-{1}</b> a la siguiente OC", Serie, Folio)
|
' strBody.AppendFormat("Se ha vinculado la compra <b>{0}-{1}</b> a la siguiente OC", Serie, Folio)
|
||||||
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
' strBody.Append("<html xmlns=""http://www.w3.org/1999/xhtml""> ")
|
||||||
' strBody.Append("<head> ")
|
' strBody.Append("<head> ")
|
||||||
' strBody.Append("</head> ")
|
' strBody.Append("</head> ")
|
||||||
' strBody.Append("<body> ")
|
' strBody.Append("<body> ")
|
||||||
|
|
||||||
' 'Cargo el detalle
|
' 'Cargo el detalle
|
||||||
' strBody.Append(" <div style='width: 550px'> ")
|
' strBody.Append(" <div style='width: 550px'> ")
|
||||||
' strBody.Append(" <fieldset> ")
|
' strBody.Append(" <fieldset> ")
|
||||||
' strBody.Append(" <legend>Ordenes de compra</legend> ")
|
' strBody.Append(" <legend>Ordenes de compra</legend> ")
|
||||||
' strBody.Append(" <table width=""550px""> <tr style='background-color:gray;color:White;font-family:Verdana;font-size:10px;text-align:center;vertical-align:middle;font-weight:bold;height:20px;text-decoration:none;'>
|
' strBody.Append(" <table width=""550px""> <tr style='background-color:gray;color:White;font-family:Verdana;font-size:10px;text-align:center;vertical-align:middle;font-weight:bold;height:20px;text-decoration:none;'>
|
||||||
' <th scope='col' style='width: 50px'>Folio</th>
|
' <th scope='col' style='width: 50px'>Folio</th>
|
||||||
' <th scope='col' style='width: 50px'>Tipo</th>")
|
' <th scope='col' style='width: 50px'>Tipo</th>")
|
||||||
|
|
||||||
' For Each row As DataRow In DTCorreos.Rows
|
' For Each row As DataRow In DTCorreos.Rows
|
||||||
' Dim Asunto, Para, ArrayCC, Body As String
|
' Dim Asunto, Para, ArrayCC, Body As String
|
||||||
' Asunto = "Vinculación de Factura"
|
' Asunto = "Vinculación de Factura"
|
||||||
' Para = row("Correo").ToString
|
' Para = row("Correo").ToString
|
||||||
' ArrayCC = ""
|
' ArrayCC = ""
|
||||||
|
|
||||||
' For Each RowM As DataRow In DTFolios.Rows
|
' For Each RowM As DataRow In DTFolios.Rows
|
||||||
' strBody.AppendFormat("<tr class='Texto'><td style='width:50px;'>{0}</td><td style='width:50px;'>{1}</td></tr>", RowM("Folio").ToString, RowM("Tipo"))
|
' strBody.AppendFormat("<tr class='Texto'><td style='width:50px;'>{0}</td><td style='width:50px;'>{1}</td></tr>", RowM("Folio").ToString, RowM("Tipo"))
|
||||||
' Next
|
' Next
|
||||||
|
|
||||||
' strBody.Append(" </table> ")
|
' strBody.Append(" </table> ")
|
||||||
' strBody.Append(" </fieldset> ")
|
' strBody.Append(" </fieldset> ")
|
||||||
' strBody.Append(" </div> ")
|
' strBody.Append(" </div> ")
|
||||||
' strBody.Append("</body></html>")
|
' strBody.Append("</body></html>")
|
||||||
|
|
||||||
' Body = strBody.ToString
|
' Body = strBody.ToString
|
||||||
|
|
||||||
' ObjOC.Dispose()
|
' ObjOC.Dispose()
|
||||||
|
|
||||||
' Dim Mail As New ClsSisMail()
|
' Dim Mail As New ClsSisMail()
|
||||||
' Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, ArrayCC)
|
' Mail.SendMail(ClsPaginas.EmpresaNotificaciones, Para, Asunto, Body, ArrayCC)
|
||||||
' Next
|
' Next
|
||||||
|
|
||||||
'End Sub
|
'End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CIERRE PERIODO "
|
#Region " CIERRE PERIODO "
|
||||||
Private Function ValidaCierrePeriodo() As Boolean
|
Private Function ValidaCierrePeriodo() As Boolean
|
||||||
'solo se permiten, mes actual, mes anterior <= #dias
|
'solo se permiten, mes actual, mes anterior <= #dias
|
||||||
@@ -15937,9 +15955,9 @@ Partial Class Compras_Compras
|
|||||||
' Return True
|
' Return True
|
||||||
'End If
|
'End If
|
||||||
'Return False
|
'Return False
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
Private Sub CreaDtDetalle()
|
Private Sub CreaDtDetalle()
|
||||||
If DtDatosDetalle Is Nothing Then
|
If DtDatosDetalle Is Nothing Then
|
||||||
@@ -16046,9 +16064,9 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub GvSerie_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvSerie.RowDeleting
|
Protected Sub GvSerie_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvSerie.RowDeleting
|
||||||
DtDatosDetalle.Rows.Remove(DtDatosDetalle.Rows(e.RowIndex))
|
DtDatosDetalle.Rows.Remove(DtDatosDetalle.Rows(e.RowIndex))
|
||||||
CargaSerie()
|
CargaSerie()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " TIPO CAMBIO "
|
#Region " TIPO CAMBIO "
|
||||||
Protected Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlMoneda_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CambiaMoneda()
|
CambiaMoneda()
|
||||||
@@ -16094,9 +16112,9 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnCambiaFechaTC_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCambiaFechaTC_Click(sender As Object, e As EventArgs)
|
||||||
LblTC.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.FormatoNumero(4)
|
LblTC.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.FormatoNumero(4)
|
||||||
TxtTC.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.FormatoNumero(4)
|
TxtTC.Text = GlobalTipoCambio(TxtFecha.Text.ToDate).ToString.FormatoNumero(4)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CONVERTIR PESOS "
|
#Region " CONVERTIR PESOS "
|
||||||
Protected Sub BtnConvertirPesos_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnConvertirPesos_Click(sender As Object, e As EventArgs)
|
||||||
Dim TipoCambioTemp = TxtConvertirPesos.Text.ToDouble
|
Dim TipoCambioTemp = TxtConvertirPesos.Text.ToDouble
|
||||||
@@ -16149,9 +16167,9 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
DdlMoneda.Enabled = False
|
DdlMoneda.Enabled = False
|
||||||
RegistraScript("$('#ModalPesos').modal('hide');")
|
RegistraScript("$('#ModalPesos').modal('hide');")
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " TOTALES: VALIDA Y CALCULA "
|
#Region " TOTALES: VALIDA Y CALCULA "
|
||||||
Private Sub AsignaValoresOriginales(SubTotal As Double, SubTotal2 As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double)
|
Private Sub AsignaValoresOriginales(SubTotal As Double, SubTotal2 As Double, IVA As Double, RetIVA As Double, RetISR As Double, Total As Double)
|
||||||
SubTotalOriginal = SubTotal
|
SubTotalOriginal = SubTotal
|
||||||
@@ -16369,9 +16387,9 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddAcarreo"))
|
RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddAcarreo"))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Historial de Modificacion"
|
#Region "Historial de Modificacion"
|
||||||
Private Sub CargaGvBitacora()
|
Private Sub CargaGvBitacora()
|
||||||
' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
|
' COMENTADO POR IPP PARA SUBIR 5 ABRIL 2017
|
||||||
@@ -16381,11 +16399,11 @@ Partial Class Compras_Compras
|
|||||||
GvBitacora.DataBind()
|
GvBitacora.DataBind()
|
||||||
End If
|
End If
|
||||||
ObjGral.Dispose()
|
ObjGral.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " FLETES "
|
#Region " FLETES "
|
||||||
|
|
||||||
Private Sub CargaFletes()
|
Private Sub CargaFletes()
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa <> 125 Or CveCompra > 0 Then
|
If UsuarioActual.CveEmpresa <> 125 Or CveCompra > 0 Then
|
||||||
@@ -16404,13 +16422,13 @@ Partial Class Compras_Compras
|
|||||||
UpFletes.Update()
|
UpFletes.Update()
|
||||||
|
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "I M P R I M I R D E S G L O S E"
|
#Region "I M P R I M I R D E S G L O S E"
|
||||||
|
|
||||||
Private Sub LnkExportaGv_Click(sender As Object, e As EventArgs) Handles LnkExportaGv.Click
|
Private Sub LnkExportaGv_Click(sender As Object, e As EventArgs) Handles LnkExportaGv.Click
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
dt.Columns.Add("Consecutivo", GetType(Integer))
|
dt.Columns.Add("Consecutivo", GetType(Integer))
|
||||||
@@ -16434,14 +16452,14 @@ Partial Class Compras_Compras
|
|||||||
dt.Rows.Add(Row)
|
dt.Rows.Add(Row)
|
||||||
Next
|
Next
|
||||||
ExportToExcel(dt, "Desglose")
|
ExportToExcel(dt, "Desglose")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
'DE AQUI PARA ABAJO SE ESTAN REORDENANDO REGIONES --- FAVOR DE SI SE MUEVE UNA COSITA O SE HACE UNA NUEVA FUNCION/METODO AGRUPARLO EN LA REGION CORRECTA O GENERAR UNA EN CASO DE NO EXISTIR
|
'DE AQUI PARA ABAJO SE ESTAN REORDENANDO REGIONES --- FAVOR DE SI SE MUEVE UNA COSITA O SE HACE UNA NUEVA FUNCION/METODO AGRUPARLO EN LA REGION CORRECTA O GENERAR UNA EN CASO DE NO EXISTIR
|
||||||
|
|
||||||
|
|
||||||
#Region " MODAL ADD PS - AGREGAR Y EDITAR PS (PARTIDA-CONCEPTO) "
|
#Region " MODAL ADD PS - AGREGAR Y EDITAR PS (PARTIDA-CONCEPTO) "
|
||||||
Private Sub HabilitaEdicionManualAgregar()
|
Private Sub HabilitaEdicionManualAgregar()
|
||||||
If Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
If Not (CveCompra > 0 Or CveFactura > 0 Or OCVinculada) Then
|
||||||
@@ -17149,9 +17167,9 @@ Partial Class Compras_Compras
|
|||||||
AddPS2(AplicaCalculaTotales)
|
AddPS2(AplicaCalculaTotales)
|
||||||
CargaGvInv()
|
CargaGvInv()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " RECLASIFICA PARTIDAS - CLASIFICACION - SUBPROYECTO "
|
#Region " RECLASIFICA PARTIDAS - CLASIFICACION - SUBPROYECTO "
|
||||||
Private Sub CargaClasificaciones()
|
Private Sub CargaClasificaciones()
|
||||||
If UsuarioActual.Empresa.UsaAC Then
|
If UsuarioActual.Empresa.UsaAC Then
|
||||||
@@ -17323,10 +17341,10 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
Alert("Los tipos de gastos han sido cambiados correctamente", TipoMensaje.MsgInformacion)
|
Alert("Los tipos de gastos han sido cambiados correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PS ALIAS "
|
#Region " PS ALIAS "
|
||||||
Protected Sub DdlPSAlias_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPSAlias2.selectedindexchange
|
Protected Sub DdlPSAlias_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPSAlias2.selectedindexchange
|
||||||
If Not DdlPSAlias2.SelectedValue = "" Then
|
If Not DdlPSAlias2.SelectedValue = "" Then
|
||||||
@@ -17396,9 +17414,9 @@ Partial Class Compras_Compras
|
|||||||
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
GlobalDTProductosServiciosEquivalencias(-1, -1) = ObjPS.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " UM: ALIAS - EQUIVALENCIAS "
|
#Region " UM: ALIAS - EQUIVALENCIAS "
|
||||||
Private Sub CargarUMAlias()
|
Private Sub CargarUMAlias()
|
||||||
DdlUMAlias.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
DdlUMAlias.DataSource = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa)
|
||||||
@@ -17564,12 +17582,12 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
OjbUM.Dispose()
|
OjbUM.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " COMPLEMENTOS PAGO "
|
#Region " COMPLEMENTOS PAGO "
|
||||||
|
|
||||||
Private Sub CargaComplementosPago()
|
Private Sub CargaComplementosPago()
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
@@ -17597,11 +17615,11 @@ Partial Class Compras_Compras
|
|||||||
e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
|
e.Row.Cells(3).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-excel""></i></a>", Encripta(String.Format("OP=Fact&EXT=xml&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo(("RFCde").ToString.Replace("&", "%26%")))))
|
||||||
e.Row.Cells(4).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCde").ToString.Replace("&", "%26%"))))
|
e.Row.Cells(4).Text = String.Format("<a class=""texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"" target=""_blank""><i class=""fa fa-ad-pdf""></i></a>", Encripta(String.Format("OP=Fact&EXT=pdf&CveFactura={0}&RFC={1}", e.Row.DBCampo("CveFactura"), e.Row.DBCampo("RFCde").ToString.Replace("&", "%26%"))))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " OTROS GASTOS "
|
#Region " OTROS GASTOS "
|
||||||
|
|
||||||
Protected Sub LnkAddOtrosGastos_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAddOtrosGastos_Click(sender As Object, e As EventArgs)
|
||||||
DdlOrdenCorte.SelectedIndex = 0
|
DdlOrdenCorte.SelectedIndex = 0
|
||||||
DdlOrdenCorte.SelectedValueExist(CveOrdenCorte)
|
DdlOrdenCorte.SelectedValueExist(CveOrdenCorte)
|
||||||
@@ -17612,18 +17630,18 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub BtnAddOtrosGastos_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAddOtrosGastos_Click(sender As Object, e As EventArgs)
|
||||||
CveOrdenCorte = DdlOrdenCorte.SelectedValue.ToEntero()
|
CveOrdenCorte = DdlOrdenCorte.SelectedValue.ToEntero()
|
||||||
RegistraScript("$('#DivOtrosGastos').modal('hide');")
|
RegistraScript("$('#DivOtrosGastos').modal('hide');")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
'#Region " DROPDOWN IVA "
|
'#Region " DROPDOWN IVA "
|
||||||
' 'Protected Sub DdlIVA_SelectedIndexChanged(sender As Object, e As EventArgs)
|
' 'Protected Sub DdlIVA_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
' ' CalculaTotales(True)
|
' ' CalculaTotales(True)
|
||||||
' 'End Sub
|
' 'End Sub
|
||||||
'#End Region
|
'#End Region
|
||||||
|
|
||||||
#Region " APLICA NC "
|
#Region " APLICA NC "
|
||||||
|
|
||||||
Private Sub InicializaAplicaNCFact()
|
Private Sub InicializaAplicaNCFact()
|
||||||
HLAplicaNCFact.Visible = True
|
HLAplicaNCFact.Visible = True
|
||||||
LblTotalNC.Text = TxtTotal.Text.FormatoNumero
|
LblTotalNC.Text = TxtTotal.Text.FormatoNumero
|
||||||
@@ -17651,10 +17669,10 @@ Partial Class Compras_Compras
|
|||||||
e.Row.FCCheckBox("ChkFacturaNC").Attributes.Add("onclick", $"FnCambiaFacturaNC({e.Row.DBCampo("Saldo").ToDouble},{e.Row.FCTextBox("TxtImporte").ClientID},{TxtTotal.Text.ToDouble},{LblAplicado.ClientID}, this);")
|
e.Row.FCCheckBox("ChkFacturaNC").Attributes.Add("onclick", $"FnCambiaFacturaNC({e.Row.DBCampo("Saldo").ToDouble},{e.Row.FCTextBox("TxtImporte").ClientID},{TxtTotal.Text.ToDouble},{LblAplicado.ClientID}, this);")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " DEVOLUCION DE ALMACEN - DEVOLUCION AL PROVEEDOR "
|
#Region " DEVOLUCION DE ALMACEN - DEVOLUCION AL PROVEEDOR "
|
||||||
Private Sub InicializaDevolucionAlmacen()
|
Private Sub InicializaDevolucionAlmacen()
|
||||||
If Not GvInv.Rows.Count > 0 Or LblCompraEstatus.Text = "CANCELADA" Then
|
If Not GvInv.Rows.Count > 0 Or LblCompraEstatus.Text = "CANCELADA" Then
|
||||||
@@ -17845,9 +17863,9 @@ Partial Class Compras_Compras
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnNCConfirmacion_Click(sender As Object, e As EventArgs)
|
||||||
GuardaAnticipos(Nothing, Nothing)
|
GuardaAnticipos(Nothing, Nothing)
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA "
|
#Region " INVENTARIO: MOVIMIENTOS DE LA COMPRA "
|
||||||
Private Sub InventarioMov()
|
Private Sub InventarioMov()
|
||||||
Dim ObjVentas As New ClsInventarios
|
Dim ObjVentas As New ClsInventarios
|
||||||
@@ -17885,11 +17903,11 @@ Partial Class Compras_Compras
|
|||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
e.Row.FCLiteral("LtlImporte").Text = "$" + FormatNumber(e.Row.FCLiteral("LtlImporte").Text.ToDouble, 2, , , TriState.True)
|
e.Row.FCLiteral("LtlImporte").Text = "$" + FormatNumber(e.Row.FCLiteral("LtlImporte").Text.ToDouble, 2, , , TriState.True)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " REGENERA PREPOLIZA "
|
#Region " REGENERA PREPOLIZA "
|
||||||
Protected Sub BtnRegenerarPrePolizaAlmacen_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnRegenerarPrePolizaAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
'RegeneraPrePoliza()
|
'RegeneraPrePoliza()
|
||||||
@@ -18154,9 +18172,9 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " ACTUALIZAR TIPO CAMBIO PREPOLIZA "
|
#Region " ACTUALIZAR TIPO CAMBIO PREPOLIZA "
|
||||||
Private Sub InicializaActualizarTC()
|
Private Sub InicializaActualizarTC()
|
||||||
If CveCompra > 0 And DdlMoneda.SelectedValue.ToEntero = 2 And CvePrePoliza > 0 Then
|
If CveCompra > 0 And DdlMoneda.SelectedValue.ToEntero = 2 And CvePrePoliza > 0 Then
|
||||||
@@ -18197,16 +18215,16 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
ObjContabilidad.Dispose()
|
ObjContabilidad.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "PAQUETERIAS GUIAS"
|
#Region "PAQUETERIAS GUIAS"
|
||||||
Protected Sub LnkAgregarGuia_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkAgregarGuia_Click(sender As Object, e As EventArgs)
|
||||||
'' 25/05/2018 - Se agrega Link a Modulo Paqueterias Guias
|
'' 25/05/2018 - Se agrega Link a Modulo Paqueterias Guias
|
||||||
RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveCompra={0}',800,620);", CveCompra))
|
RegistraScript(String.Format("AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveCompra={0}',800,620);", CveCompra))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "DEDUCCIONES IEPS / OTROS IMPUESTOS"
|
#Region "DEDUCCIONES IEPS / OTROS IMPUESTOS"
|
||||||
Protected Sub CargaProductos(Ddl As DropDownList, CvePS As Integer)
|
Protected Sub CargaProductos(Ddl As DropDownList, CvePS As Integer)
|
||||||
Ddl.DataSource = TmpDT
|
Ddl.DataSource = TmpDT
|
||||||
@@ -18261,11 +18279,11 @@ Partial Class Compras_Compras
|
|||||||
Alert("Debe seleccionar al menos un impuesto", TipoMensaje.MsgAdvertencia)
|
Alert("Debe seleccionar al menos un impuesto", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "C R E D I T O S"
|
#Region "C R E D I T O S"
|
||||||
|
|
||||||
Private Sub ChkCreditoMultiple_CheckedChanged(sender As Object, e As EventArgs) Handles ChkCreditoMultiple.CheckedChanged
|
Private Sub ChkCreditoMultiple_CheckedChanged(sender As Object, e As EventArgs) Handles ChkCreditoMultiple.CheckedChanged
|
||||||
|
|
||||||
If ChkCreditoMultiple.Checked Then
|
If ChkCreditoMultiple.Checked Then
|
||||||
@@ -18346,9 +18364,9 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
UpGvCreditos.Update()
|
UpGvCreditos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "FLETES / IMPORTACIONES"
|
#Region "FLETES / IMPORTACIONES"
|
||||||
Private Sub CargaFolio()
|
Private Sub CargaFolio()
|
||||||
Dim ObjFolios As New ClsGralFolios
|
Dim ObjFolios As New ClsGralFolios
|
||||||
@@ -18642,10 +18660,10 @@ Partial Class Compras_Compras
|
|||||||
Protected Sub DdlFleteImportacion_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
Protected Sub DdlFleteImportacion_SelectedIndexChanged1(sender As Object, e As EventArgs)
|
||||||
CambiaTipo()
|
CambiaTipo()
|
||||||
UpModalFletesImportaciones.Update()
|
UpModalFletesImportaciones.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Function AjustarPrePolizaVinculacionOC(ByRef OC As ClsOC, ByRef OCBitacora As ClsOIEventos, ByRef ObjInventarios As ClsInventarios, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi) As Boolean
|
Private Function AjustarPrePolizaVinculacionOC(ByRef OC As ClsOC, ByRef OCBitacora As ClsOIEventos, ByRef ObjInventarios As ClsInventarios, ByRef ObjConta As ClsContabilidad, ByRef ObjAC As ClsContPAQi) As Boolean
|
||||||
|
|
||||||
'VARIABLES
|
'VARIABLES
|
||||||
@@ -18884,8 +18902,8 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region "A G R E G A R - P R O D U C T O S S E R V I C I O S"
|
#Region "A G R E G A R - P R O D U C T O S S E R V I C I O S"
|
||||||
Private Sub CargaDatosAgregarPS()
|
Private Sub CargaDatosAgregarPS()
|
||||||
DdlClasificacionPS.Items.Clear()
|
DdlClasificacionPS.Items.Clear()
|
||||||
@@ -18939,27 +18957,27 @@ Partial Class Compras_Compras
|
|||||||
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
If ObjPS.GetPSSimplificado(-1) Then Application("GlobalDTPSSimplificado") = ObjPS.DtResultados.AsEnumerable()
|
||||||
|
|
||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "TIPO DE COMPRA"
|
#Region "TIPO DE COMPRA"
|
||||||
|
|
||||||
Protected Sub DdlTipoCompra_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlTipoCompra_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnFacturaNC_Click(sender As Object, e As EventArgs)
|
||||||
If ChkNCInvNC.Checked Then
|
If ChkNCInvNC.Checked Then
|
||||||
CargaNCINV()
|
CargaNCINV()
|
||||||
Else
|
Else
|
||||||
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
RegistraScript("$('#FacturaNC').modal('hide');", "FacturaNC")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "ES NO DEDUCIBLE"
|
#Region "ES NO DEDUCIBLE"
|
||||||
Protected Sub ChkEsNoDeducible_CheckedChanged1(sender As Object, e As EventArgs)
|
Protected Sub ChkEsNoDeducible_CheckedChanged1(sender As Object, e As EventArgs)
|
||||||
If ChkEsNoDeducible.Checked Then
|
If ChkEsNoDeducible.Checked Then
|
||||||
@@ -18992,9 +19010,9 @@ Partial Class Compras_Compras
|
|||||||
'TmpDT.AcceptChanges()
|
'TmpDT.AcceptChanges()
|
||||||
AddPS2(EsNoDeducible:=EsNoDeducible)
|
AddPS2(EsNoDeducible:=EsNoDeducible)
|
||||||
UpPS.Update()
|
UpPS.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Public Sub LnkDesVincularComplemento_Click(sender As Object, e As EventArgs)
|
Public Sub LnkDesVincularComplemento_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|||||||
Reference in New Issue
Block a user