Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -256,13 +256,13 @@ Public Class ClsContabilidad
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdatePrepolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1) As Boolean
|
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_PrePolizaDetalleUpdate")
|
DataAdapter("PA_Conta_PrePolizasDetalleUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle
|
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle
|
||||||
@@ -280,6 +280,7 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
|
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -5924,7 +5925,11 @@ Public Class ClsContabilidad
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
Retorno = SqlAdapter.SelectCommand.Parameters("@CvePrePoliza").Value.ToString.ToEntero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al eliminar el catálogo de Conta Ejercicios", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
If ex.Message.Contains("50000") Then
|
||||||
|
Me.OnError("No se puede registrar una prepóliza en un periodo cerrado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
Else
|
||||||
|
Me.OnError("Ocurrió un error al cerrar el Ejercicio", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|||||||
@@ -237,7 +237,11 @@ Public Class ClsEdocumentacion
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al consultar el catalogo de documentación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
If ex.Message.Contains("FK_Edoc_DocumentacionParametros_Edoc_Documentacion") Then
|
||||||
|
Alert("Este documento tiene parametros registrados", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
OnError("Ocurrió un error al eliminar la documentacion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|||||||
@@ -463,24 +463,24 @@ Public Class ClsNominas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateProvisionNomina(CvePeriodo As Integer, CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
'Public Function UpdateProvisionNomina(CvePeriodo As Integer, CvePrePoliza As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Nom_ProvisionNominaUpdate")
|
' DataAdapter("PA_Nom_ProvisionNominaUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
' .Add("@CvePeriodo", SqlDbType.Int).Value = CvePeriodo
|
||||||
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
' .Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al actualizar el periodo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al actualizar el periodo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
Public Function GetNom_NominasDetalles(CveNomina As Integer, CvePersonal As Integer, CvePeriodo As Integer, Tipo As String) As Boolean
|
Public Function GetNom_NominasDetalles(CveNomina As Integer, CvePersonal As Integer, CvePeriodo As Integer, Tipo As String) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ Option Strict On
|
|||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Linq
|
Imports Newtonsoft.Json.Linq
|
||||||
|
Imports System.Net.Http
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Xml.Serialization
|
||||||
|
|
||||||
Public Class Timbrado
|
Public Class Timbrado
|
||||||
|
|
||||||
#Region "P R O P I E D A D E S"
|
#Region "P R O P I E D A D E S"
|
||||||
@@ -2222,41 +2225,26 @@ Public Class Timbrado
|
|||||||
' 'Sucursal matriz de la empresa
|
' 'Sucursal matriz de la empresa
|
||||||
Dim ArchivoLLave As String = String.Format("{0}Certificados\{1}", UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.ArchivoKey)
|
Dim ArchivoLLave As String = String.Format("{0}Certificados\{1}", UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.ArchivoKey)
|
||||||
Dim ArchivoCertificado As String = String.Format("{0}Certificados\{1}", UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.ArchivoCer)
|
Dim ArchivoCertificado As String = String.Format("{0}Certificados\{1}", UsuarioActual.Empresa.Ruta, UsuarioActual.Empresa.ArchivoCer)
|
||||||
Dim UsuarioServicio As String = If(CvePACEspecial = 2, UsuarioActual.Empresa.RFC, "rene.molina@adsistemas.mx")
|
|
||||||
Dim ClaveServicio As String = If(CvePACEspecial = 2, UsuarioActual.Empresa.RFC.ToLower, "rene2018")
|
Dim UsuarioServicio As String = "rene.molina@adssistemas.mx"
|
||||||
|
Dim ClaveServicio As String = "Facturacion2021#"
|
||||||
|
|
||||||
Dim Clave As String = UsuarioActual.Empresa.ContraseñaKey
|
Dim Clave As String = UsuarioActual.Empresa.ContraseñaKey
|
||||||
Dim EmisorRFC As String = UsuarioActual.Empresa.RFC
|
Dim EmisorRFC As String = UsuarioActual.Empresa.RFC
|
||||||
Dim UrlServicio As String = "" ' Produccion
|
|
||||||
Dim RutaArchivo As String = String.Format("{0}XML\{1}\", UsuarioActual.Empresa.Ruta, Ventas.TipoDocto)
|
Dim RutaArchivo As String = String.Format("{0}XML\{1}\", UsuarioActual.Empresa.Ruta, Ventas.TipoDocto)
|
||||||
Dim NombreArchivoXML As String = ObjCFDITimbre.Comprobante.SerieFolio
|
Dim NombreArchivoXML As String = ObjCFDITimbre.Comprobante.SerieFolio
|
||||||
Dim SubTotal As Decimal = 0
|
Dim SubTotal As Decimal = 0
|
||||||
Dim TimbraProduccion As Boolean = True
|
Dim TimbraProduccion As Boolean = True
|
||||||
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
||||||
Select Case CvePACEspecial
|
|
||||||
Case 2
|
|
||||||
UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" 'productivo
|
|
||||||
Case 4
|
|
||||||
'UrlServicio = "http://juancalderon-001-site1.ftempurl.com/timbrado.asmx?WSDL"
|
|
||||||
UrlServicio = "http://alterno.gofac.com.mx/cfdi/timbrado.asmx?WSDL" ' alterno
|
|
||||||
End Select
|
|
||||||
|
|
||||||
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then
|
||||||
|
EmisorRFC = "ZUÑ920208KL4"
|
||||||
EmisorRFC = "AAA010101AAA"
|
ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.key"
|
||||||
ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_AAA010101AAA.key"
|
ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.cer"
|
||||||
ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_AAA010101AAA.cer"
|
|
||||||
Clave = "12345678a"
|
Clave = "12345678a"
|
||||||
TimbraProduccion = False
|
TimbraProduccion = False
|
||||||
Select Case CvePACEspecial
|
|
||||||
Case 2
|
|
||||||
UsuarioServicio = "fgomez"
|
|
||||||
ClaveServicio = "12121212"
|
|
||||||
UrlServicio = "http://generacfdi.com.mx/rvltimbrado/service1.asmx?WSDL" '"http://108.60.211.43/rvltimbrado/service1.asmx"
|
|
||||||
Case 4
|
|
||||||
UsuarioServicio = "UserTest"
|
|
||||||
ClaveServicio = "1234567890"
|
|
||||||
UrlServicio = "http://juancalderon-001-site1.ftempurl.com/timbrado.asmx?WSDL"
|
|
||||||
End Select
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
#Region "Valida"
|
#Region "Valida"
|
||||||
@@ -2303,19 +2291,15 @@ Public Class Timbrado
|
|||||||
End Try
|
End Try
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
sw.Stop()
|
sw.Stop()
|
||||||
swTiempo.AppendFormat("Verificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
swTiempo.AppendFormat("Verificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
swmili = sw.ElapsedMilliseconds
|
swmili = sw.ElapsedMilliseconds
|
||||||
sw.Start()
|
sw.Start()
|
||||||
|
|
||||||
' cfdi.saltarValidacion("bNtMuvZockPVhEjaPj0E")
|
|
||||||
' cfdi.Decimales = 4
|
|
||||||
#Region "Certificado"
|
#Region "Certificado"
|
||||||
cfdi.CertificadoArchivo(ArchivoCertificado)
|
cfdi.CertificadoArchivo(ArchivoCertificado)
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
sw.Stop()
|
sw.Stop()
|
||||||
swTiempo.AppendFormat("Certificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
swTiempo.AppendFormat("Certificado : ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
||||||
swmili = sw.ElapsedMilliseconds
|
swmili = sw.ElapsedMilliseconds
|
||||||
@@ -2388,6 +2372,7 @@ Public Class Timbrado
|
|||||||
cfdi.Impuestos(ObjCFDITimbre.TotalImpuestosRetenidos, ObjCFDITimbre.TotalImpuestosTrasladados)
|
cfdi.Impuestos(ObjCFDITimbre.TotalImpuestosRetenidos, ObjCFDITimbre.TotalImpuestosTrasladados)
|
||||||
End If
|
End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " Traslados y Retenciones"
|
#Region " Traslados y Retenciones"
|
||||||
|
|
||||||
|
|
||||||
@@ -2591,8 +2576,6 @@ Public Class Timbrado
|
|||||||
End If
|
End If
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#Region "Nomina12"
|
#Region "Nomina12"
|
||||||
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
|
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
|
||||||
|
|
||||||
@@ -2685,7 +2668,7 @@ Public Class Timbrado
|
|||||||
Dim ArchivoGenerado As Boolean = False
|
Dim ArchivoGenerado As Boolean = False
|
||||||
Try
|
Try
|
||||||
cfdi.GenerarXMLB64(llaveBase64, Clave)
|
cfdi.GenerarXMLB64(llaveBase64, Clave)
|
||||||
ArchivoGenerado = True
|
If cfdi.Xml <> "" Then ArchivoGenerado = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Retorno = cfdi.MensajeError
|
Retorno = cfdi.MensajeError
|
||||||
If Retorno = "" OrElse IsNothing(Retorno) Then
|
If Retorno = "" OrElse IsNothing(Retorno) Then
|
||||||
@@ -2703,111 +2686,131 @@ Public Class Timbrado
|
|||||||
#Region "Timbra"
|
#Region "Timbra"
|
||||||
If ArchivoGenerado Then
|
If ArchivoGenerado Then
|
||||||
|
|
||||||
Dim opciones As String() = New String(0) {"CALCULAR_SELLO"}
|
'Dim opciones As String() = New String(0) {""}
|
||||||
Dim pade = New PADE33.PadeTimbradoServiceClient
|
'Dim pade = New PADETimbrado.PadeTimbradoServiceClient
|
||||||
Dim Respuesta As String = pade.timbradoPrueba("72330711-cac6-4106-8051-cbcda1aef495", "rene.molina@adssistemas.mx", "Facturacion2021#", cfdi.Xml, opciones)
|
|
||||||
|
'Dim Respuesta As String = pade.timbradoConCSD("72330711-cac6-4106-8051-cbcda1aef495", UsuarioServicio, ClaveServicio, cfdi.Xml, certByte, llaveByte, Clave, Not TimbraProduccion, opciones)
|
||||||
|
|
||||||
|
Dim TokenAuth As String = $"{UsuarioServicio}:{ClaveServicio}".ToBase64Encode()
|
||||||
|
|
||||||
|
Dim payload As New JObject(
|
||||||
|
New JProperty("contrato", "72330711-cac6-4106-8051-cbcda1aef495"),
|
||||||
|
New JProperty("certBase64", certBase64),
|
||||||
|
New JProperty("keyBase64", llaveBase64),
|
||||||
|
New JProperty("keyPass", Clave),
|
||||||
|
New JProperty("xmlBase64", cfdi.Xml.ToBase64Encode()),
|
||||||
|
New JProperty("prueba", (Not TimbraProduccion).ToString().ToLower),
|
||||||
|
New JProperty("opciones", New String(0) {""})
|
||||||
|
)
|
||||||
|
|
||||||
|
Dim Respuesta = EnviarInformacionPADE("https://timbrado.pade.mx/servicio/rest/timbrado/timbrarConCSD", payload.ToString(), TokenAuth)
|
||||||
|
|
||||||
' Aumentamos el timeout de la operación
|
' Aumentamos el timeout de la operación
|
||||||
|
If Not String.IsNullOrEmpty(Respuesta) Then
|
||||||
|
|
||||||
Dim FolioFiscal As String
|
Dim result As PADEServicioTimbradoResp = Nothing
|
||||||
FolioFiscal = obtenerAtributo(Respuesta, "TimbreFiscalDigital", "UUID") 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
Dim serializer As XmlSerializer = New XmlSerializer(GetType(PADEServicioTimbradoResp))
|
||||||
|
|
||||||
|
Try
|
||||||
|
Using reader As TextReader = New StringReader(Respuesta)
|
||||||
|
result = CType(serializer.Deserialize(reader), PADEServicioTimbradoResp)
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener los resultados", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
'cfdi.TimbrarCfdi(UsuarioServicio, ClaveServicio, UrlServicio, TimbraProduccion)
|
If result IsNot Nothing Then
|
||||||
|
If result.timbradoOk Then
|
||||||
|
Dim FolioFiscal As String = result.UUID
|
||||||
|
|
||||||
'sw.Stop()
|
cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML)
|
||||||
'swTiempo.AppendFormat("Timbrado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
|
||||||
'swmili = sw.ElapsedMilliseconds
|
|
||||||
'sw.Start()
|
|
||||||
''Verifica el error
|
|
||||||
'If cfdi.CodigoError = 0 Then
|
|
||||||
|
|
||||||
' Dim FolioFiscal As String
|
If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
||||||
|
|
||||||
' UUID = cfdi.UUID
|
'Actualiza Estatus Factura
|
||||||
' FolioFiscal = cfdi.UUID 'obtenerAtributo(cfdi.XmlTimbrado, "TimbreFiscalDigital", "UUID") 'XmlDoc.DocumentElement("cfdi:Complemento").FirstChild.Attributes("UUID").InnerText
|
If Ventas.CveVenta > 0 Then
|
||||||
|
|
||||||
' If FolioFiscal <> "" Then
|
Using ObjVentas As New ClsVentas()
|
||||||
|
|
||||||
' cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML)
|
If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial, RFCReceptor:=ObjCFDITimbre.Receptor.RFC) Then
|
||||||
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
|
||||||
' sw.Stop()
|
'Genero la addenda Ford
|
||||||
' swTiempo.AppendFormat("Guardado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
If Ventas.Cliente.Ford_GSDB <> "" Then
|
||||||
' swmili = sw.ElapsedMilliseconds
|
|
||||||
' sw.Start()
|
|
||||||
|
|
||||||
' If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then
|
Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio))
|
||||||
|
|
||||||
' 'Actualiza Estatus Factura
|
Dim FolioFactura As String = ""
|
||||||
' If Ventas.CveVenta > 0 Then
|
If UsuarioActual.CveEmpresa = 8 Then FolioFactura = Ventas.Folio.ToString ' sogo, pordefault manda el folio de la factura
|
||||||
|
GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
|
||||||
|
|
||||||
' Using ObjVentas As New ClsVentas()
|
End If
|
||||||
|
|
||||||
' If ObjVentas.UpdateEstatusFactura(3, FolioFiscal, "", ObjCFDITimbre.Comprobante.Fecha, Ventas.CveVenta, CvePAC:=CvePACEspecial) Then
|
End If
|
||||||
' Retorno = ""
|
|
||||||
' Else
|
|
||||||
' Retorno = "Error"
|
|
||||||
' End If
|
|
||||||
' End Using
|
|
||||||
|
|
||||||
' 'Genero la addenda Ford
|
If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
|
||||||
' If Ventas.Cliente.Ford_GSDB <> "" Then
|
Using ObjNomina2 As New ClsNominas()
|
||||||
|
|
||||||
' Dim RutaCadena As String = String.Format("{0}{1}.xml", RutaArchivo, NombreArchivoXML) 'If(UsuarioActual.Empresa.FacturaProduccion, String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.SerieFolio), String.Format("{0}XML\{1}\{2}.xml", Ruta, Ventas.TipoDocto, Ventas.SerieFolio))
|
If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
|
||||||
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
|
||||||
' Dim FolioFactura As String = ""
|
If ObjCFDITimbre.Comprobante.TipoComprobante = "T" Then
|
||||||
' If UsuarioActual.CveEmpresa = 8 Then FolioFactura = Ventas.Folio.ToString ' sogo, pordefault manda el folio de la factura
|
Using ObjInv As New ClsInventarios()
|
||||||
' GeneraAddendaFord(RutaCadena, FolioFactura, Ventas.FordASN, Ventas.FordGSDB)
|
If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then
|
||||||
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
Retorno = "Error"
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
' End If
|
If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
|
||||||
|
|
||||||
' End If
|
Try
|
||||||
|
Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
||||||
|
Dim b As Byte() = cfdi.QrCode($"?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}")
|
||||||
|
File.WriteAllBytes(RutaCBB, b)
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al generar el QR", ex)
|
||||||
|
End Try
|
||||||
|
Retorno = ""
|
||||||
|
Else
|
||||||
|
If String.IsNullOrEmpty(result.mensaje) Then
|
||||||
|
Retorno = Respuesta
|
||||||
|
MensajeErrorCFDI = ""
|
||||||
|
Else
|
||||||
|
Retorno = result.mensaje
|
||||||
|
MensajeErrorCFDI = result.codigo
|
||||||
|
If cfdi.Xml <> "" Then cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML)
|
||||||
|
End If
|
||||||
|
|
||||||
' If ObjCFDITimbre.Comprobante.TipoComprobante = "N" Then
|
End If
|
||||||
' Using ObjNomina2 As New ClsNominas()
|
Else
|
||||||
|
If String.IsNullOrEmpty(Respuesta) Then
|
||||||
' If ObjNomina2.UpdateEstatusNomNominas(3, CvePACEspecial, FolioFiscal, "", ("01/01/2000").ToDate, ObjCFDITimbre.Nomina.CveNomina, 0, 0, 0, 0, 0) Then
|
Retorno = "Ocurrió un error al obtener la respuesta"
|
||||||
' Retorno = ""
|
MensajeErrorCFDI = ""
|
||||||
' Else
|
Else
|
||||||
' Retorno = "Error"
|
Retorno = Respuesta
|
||||||
' End If
|
MensajeErrorCFDI = ""
|
||||||
' End Using
|
End If
|
||||||
' End If
|
End If
|
||||||
|
Else
|
||||||
' If ObjCFDITimbre.Comprobante.TipoComprobante = "T" Then
|
Retorno = "Ocurrió un error al obtener la respuesta"
|
||||||
' Using ObjInv As New ClsInventarios()
|
MensajeErrorCFDI = ""
|
||||||
' If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then
|
End If
|
||||||
' Retorno = ""
|
Else
|
||||||
' Else
|
Retorno = "Ocurrió un error al generar el xml"
|
||||||
' Retorno = "Error"
|
MensajeErrorCFDI = ""
|
||||||
' End If
|
|
||||||
' End Using
|
|
||||||
' End If
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not IO.Directory.Exists($"{UsuarioActual.Empresa.Ruta}CBB\") Then IO.Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}CBB\")
|
|
||||||
|
|
||||||
' Try
|
|
||||||
' Dim RutaCBB As String = $"{UsuarioActual.Empresa.Ruta}CBB\{ObjCFDITimbre.Comprobante.SerieFolio}.jpg"
|
|
||||||
' Dim b As Byte() = cfdi.QrCode($"?re={UsuarioActual.Empresa.RFC}&rr={ObjCFDITimbre.Receptor.RFC}&tt={String.Format("{0,12:F6}", ObjCFDITimbre.Comprobante.Total).Trim()}&id={FolioFiscal}")
|
|
||||||
' File.WriteAllBytes(RutaCBB, b)
|
|
||||||
' Catch ex As Exception
|
|
||||||
' OnError("Ocurrió un error al generar el QR", ex)
|
|
||||||
' End Try
|
|
||||||
' Retorno = ""
|
|
||||||
' Else
|
|
||||||
' Retorno = "No se pudo timbrar ante el SAT. UUID no generado."
|
|
||||||
' End If
|
|
||||||
' sw.Stop()
|
|
||||||
' swTiempo.AppendFormat("Actualizado: ({0}) {1} ", sw.ElapsedMilliseconds - swmili, sw.ElapsedMilliseconds)
|
|
||||||
' swmili = sw.ElapsedMilliseconds
|
|
||||||
' sw.Start()
|
|
||||||
|
|
||||||
'Else
|
|
||||||
' Retorno = cfdi.MensajeError
|
|
||||||
' MensajeErrorCFDI = cfdi.MensajeError
|
|
||||||
' If cfdi.Xml <> "" Then cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML)
|
|
||||||
|
|
||||||
' End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -2815,6 +2818,45 @@ Public Class Timbrado
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Private Function EnviarInformacionPADE(url As String, payload As String, tokenAuth As String) As String
|
||||||
|
Dim Retorno As String = ""
|
||||||
|
Try
|
||||||
|
Using httpClient = New HttpClient()
|
||||||
|
httpClient.Timeout = New TimeSpan(0, 1, 0)
|
||||||
|
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||||
|
request.Headers.Add("Authorization", $"Basic {tokenAuth}")
|
||||||
|
Using content = New StringContent(payload, Encoding.UTF8, "application/json")
|
||||||
|
request.Content = content
|
||||||
|
Dim response = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
|
||||||
|
|
||||||
|
Retorno = response.Content.ReadAsStringAsync().Result
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
Retorno = ""
|
||||||
|
OnError("Ocurrió un error al enviar la informacion", ex)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
<Serializable(), XmlRoot("servicioTimbrado")>
|
||||||
|
Public Class PADEServicioTimbradoResp
|
||||||
|
<XmlElement("id")>
|
||||||
|
Public Property id As String
|
||||||
|
<XmlElement("timbradoOk")>
|
||||||
|
Public Property timbradoOk As Boolean
|
||||||
|
<XmlElement("contrato")>
|
||||||
|
Public Property contrato As String
|
||||||
|
<XmlElement("codigo")>
|
||||||
|
Public Property codigo As String
|
||||||
|
<XmlElement("mensaje")>
|
||||||
|
Public Property mensaje As String
|
||||||
|
<XmlElement("UUID")>
|
||||||
|
Public Property UUID As String
|
||||||
|
End Class
|
||||||
|
|
||||||
|
|
||||||
Public Sub GuardaLogTimbrado(Str As String, CvePAC As Integer)
|
Public Sub GuardaLogTimbrado(Str As String, CvePAC As Integer)
|
||||||
Dim ArchivoW As StreamWriter
|
Dim ArchivoW As StreamWriter
|
||||||
Dim strLineaTMP As String
|
Dim strLineaTMP As String
|
||||||
|
|||||||
@@ -2805,6 +2805,18 @@ Namespace Extensiones
|
|||||||
|
|
||||||
Return img
|
Return img
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
<Runtime.CompilerServices.Extension()>
|
||||||
|
Public Function ToBase64Encode(ByVal plainText As String) As String
|
||||||
|
Dim plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText)
|
||||||
|
Return System.Convert.ToBase64String(plainTextBytes)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
<Runtime.CompilerServices.Extension()>
|
||||||
|
Public Function ToBase64Decode(ByVal base64EncodedData As String) As String
|
||||||
|
Dim base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData)
|
||||||
|
Return System.Text.Encoding.UTF8.GetString(base64EncodedBytes)
|
||||||
|
End Function
|
||||||
Public Function DecriptaConexion() As String
|
Public Function DecriptaConexion() As String
|
||||||
Dim Salida As String
|
Dim Salida As String
|
||||||
Dim stringtodecrypt As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
Dim stringtodecrypt As String = ConfigurationManager.ConnectionStrings("Conexion").ConnectionString
|
||||||
|
|||||||
@@ -57,12 +57,77 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
Public Sub ProcessRequest(ByVal context As HttpContext) Implements IHttpHandler.ProcessRequest
|
||||||
context.Response.ContentType = "application/json"
|
context.Response.ContentType = "application/json"
|
||||||
Dim usuario = ValidaUsuarioSistema(140, 100)
|
|
||||||
Dim ObjFactura As New Modelos.Factura(usuario, 898028, 140)
|
|
||||||
|
|
||||||
GeneraPolizaVentaWS(context, ObjFactura)
|
Dim UsuarioActual = ValidaUsuarioSistema(1, 100)
|
||||||
'GeneraPolizaVentaLTHWSD(context)
|
'Dim ObjFactura As New Modelos.Factura(usuario, 898028, 140)
|
||||||
'GeneraIndicadores(context)
|
|
||||||
|
Dim UsuarioServicio As String = "rene.molina@adssistemas.mx"
|
||||||
|
Dim ClaveServicio As String = "Facturacion2021#"
|
||||||
|
|
||||||
|
Dim RutaArchivo As String = String.Format("{0}XML\{1}\", UsuarioActual.Empresa.Ruta, "Ing")
|
||||||
|
Dim NombreArchivoXML As String = "test"
|
||||||
|
|
||||||
|
If Not Directory.Exists(RutaArchivo) Then Directory.CreateDirectory(RutaArchivo)
|
||||||
|
|
||||||
|
Dim EmisorRFC As String = "ZUÑ920208KL4"
|
||||||
|
Dim ArchivoLLave As String = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.key"
|
||||||
|
Dim ArchivoCertificado As String = $"{UsuarioActual.Empresa.Ruta}Certificados\CSD01_ZUÑ920208KL4.cer"
|
||||||
|
Dim Clave = "12345678a"
|
||||||
|
Dim TimbraProduccion = False
|
||||||
|
|
||||||
|
If Not File.Exists(ArchivoCertificado) Then
|
||||||
|
context.Response.Write("El archivo de llave privada no existe")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If Not File.Exists(ArchivoLLave) Then
|
||||||
|
context.Response.Write("El archivo de llave privada no existe")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
If UsuarioActual.Empresa.ContraseñaKey = "" Then
|
||||||
|
context.Response.Write("La clave no puede ser vacía")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim llaveByte As Byte(), certByte As Byte()
|
||||||
|
Dim llaveBase64 As String = "", certBase64 As String = ""
|
||||||
|
Dim cfdi As New GoFac.GoCfdi()
|
||||||
|
Dim complemento As String = ""
|
||||||
|
Dim complementoConcepto As String = ""
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
llaveByte = System.IO.File.ReadAllBytes(ArchivoLLave)
|
||||||
|
llaveBase64 = Convert.ToBase64String(llaveByte)
|
||||||
|
Catch ex As Exception
|
||||||
|
context.Response.Write($"Error al leer la llave privada: {ex.Message}")
|
||||||
|
Exit Sub
|
||||||
|
End Try
|
||||||
|
|
||||||
|
|
||||||
|
Try
|
||||||
|
certByte = System.IO.File.ReadAllBytes(ArchivoCertificado)
|
||||||
|
certBase64 = Convert.ToBase64String(certByte)
|
||||||
|
Catch ex As Exception
|
||||||
|
context.Response.Write($"Error al leer el certificado: {ex.Message}")
|
||||||
|
Exit Sub
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Dim TokenAuth As String = ToBase64Encode($"{UsuarioServicio}:{ClaveServicio}")
|
||||||
|
Dim XmlBase64 As String = ToBase64Encode(XMLPrueba)
|
||||||
|
|
||||||
|
Dim payload As New JObject(
|
||||||
|
New JProperty("contrato", "72330711-cac6-4106-8051-cbcda1aef495"),
|
||||||
|
New JProperty("certBase64", certBase64),
|
||||||
|
New JProperty("keyBase64", llaveBase64),
|
||||||
|
New JProperty("keyPass", Clave),
|
||||||
|
New JProperty("xmlBase64", XmlBase64),
|
||||||
|
New JProperty("prueba", (Not TimbraProduccion).ToString().ToLower),
|
||||||
|
New JProperty("opciones", New String(0) {""})
|
||||||
|
)
|
||||||
|
|
||||||
|
Dim resp = EnviarInformacionPADE("https://timbrado.pade.mx/servicio/rest/timbrado/timbrarConCSD", payload.ToString(), TokenAuth)
|
||||||
|
|
||||||
|
context.Response.Write(resp)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
@@ -72,6 +137,44 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
|||||||
End Get
|
End Get
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Function EnviarInformacionPADE(url As String, payload As String, tokenAuth As String) As String
|
||||||
|
Dim Retorno As String = "{}"
|
||||||
|
Try
|
||||||
|
Using httpClient = New HttpClient()
|
||||||
|
httpClient.Timeout = New TimeSpan(0, 5, 0)
|
||||||
|
Using request = New HttpRequestMessage(HttpMethod.Post, New Uri(url))
|
||||||
|
request.Headers.Add("Authorization", $"Basic {tokenAuth}")
|
||||||
|
Using content = New StringContent(payload, Encoding.UTF8, "application/json")
|
||||||
|
request.Content = content
|
||||||
|
|
||||||
|
Dim response = httpClient.SendAsync(request, HttpCompletionOption.ResponseHeadersRead).Result
|
||||||
|
Retorno = response.Content.ReadAsStringAsync().Result
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
End Using
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al enviar la informacion", ex)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function ToBase64Encode(ByVal plainText As String) As String
|
||||||
|
Dim plainTextBytes = System.Text.Encoding.UTF8.GetBytes(plainText)
|
||||||
|
Return System.Convert.ToBase64String(plainTextBytes)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
Public Function ToBase64Decode(ByVal base64EncodedData As String) As String
|
||||||
|
Dim base64EncodedBytes = System.Convert.FromBase64String(base64EncodedData)
|
||||||
|
Return System.Text.Encoding.UTF8.GetString(base64EncodedBytes)
|
||||||
|
End Function
|
||||||
|
|
||||||
|
Public Property XMLPrueba As String = "<?xml version=""1.0"" encoding=""UTF-8""?><cfdi:Comprobante xmlns:cfdi=""http://www.sat.gob.mx/cfd/3"" xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance"" xsi:schemaLocation=""http://www.sat.gob.mx/cfd/3 http://www.sat.gob.mx/sitio_internet/cfd/3/cfdv33.xsd"" Version=""3.3"" Serie=""HM"" Folio=""1682"" Fecha=""2021-05-20T17:43:32"" Sello=""BdE1N3CwiqU6KKOWT80N6X/9kELGK22bRmfHfXHUaYvOCmOixuAN3a0yyd5Yzf4lD0sVs+OScZ1rgNKhWWyRwAJzw/avfGod2l7LIGbyYLGoUHUPpY3swDgTk+zq29PUbf3500YPf4qkXx3GcKYkIb4TnQPnvFnjE8FvcV+p8wETuvijm5T3HzFKCXG6ePrERIt2PN1NM26p2NIOzMSUksSNUtC6rqEI8G2yIUIMZqQ4bHTo1WdV0UPKBaqjkPLyY8Q1TMFZDbiudE454bUJWjxv6KYicXgfH17HJY91XTncCgwwrwlcPrKK7ea/xPzYumHMurEl5arjfqE6+nI3Fw=="" FormaPago=""01"" NoCertificado=""30001000000400002442"" Certificado=""MIIFuzCCA6OgAwIBAgIUMzAwMDEwMDAwMDA0MDAwMDI0NDIwDQYJKoZIhvcNAQELBQAwggErMQ8wDQYDVQQDDAZBQyBVQVQxLjAsBgNVBAoMJVNFUlZJQ0lPIERFIEFETUlOSVNUUkFDSU9OIFRSSUJVVEFSSUExGjAYBgNVBAsMEVNBVC1JRVMgQXV0aG9yaXR5MSgwJgYJKoZIhvcNAQkBFhlvc2Nhci5tYXJ0aW5lekBzYXQuZ29iLm14MR0wGwYDVQQJDBQzcmEgY2VycmFkYSBkZSBjYWRpejEOMAwGA1UEEQwFMDYzNzAxCzAJBgNVBAYTAk1YMRkwFwYDVQQIDBBDSVVEQUQgREUgTUVYSUNPMREwDwYDVQQHDAhDT1lPQUNBTjERMA8GA1UELRMIMi41LjQuNDUxJTAjBgkqhkiG9w0BCQITFnJlc3BvbnNhYmxlOiBBQ0RNQS1TQVQwHhcNMTkwNjE3MjAxODA2WhcNMjMwNjE3MjAxODA2WjCB4jEnMCUGA1UEAxQeWkFQQVRFUklBIFVSVEFETyDRRVJJIFNBIERFIENWMScwJQYDVQQpFB5aQVBBVEVSSUEgVVJUQURPINFFUkkgU0EgREUgQ1YxJzAlBgNVBAoUHlpBUEFURVJJQSBVUlRBRE8g0UVSSSBTQSBERSBDVjElMCMGA1UELRQcWlXROTIwMjA4S0w0IC8gS0FITzY0MTEwMUIzOTEeMBwGA1UEBRMVIC8gS0FITzY0MTEwMUhOVExLUzA2MR4wHAYDVQQLFBVaYXBhdGVy7WEgVXJ0YWRvINFlcmkwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCX4ICuLAA/GYfEdRUMBLolOHKOUTDyw//CQjcj6dmCUWP8Y2UIhbq1JJ5nClsmhg6WThXjYqzRiYSAYagzrtwWri8I7oURIoTDeuxU69UOg1shuCEo89prJfx8ZIGKwB+GedC6dFdKGZLKn4ksSuyfntXmW4rZLup2j24mQx+jpdmcQIGMe6A/2668ZhpYpCw/vwfH8edkS5X41yp/zj6Z9mIySRWaMHm5eT/X0D01l3gX2gJVXY5ebUsKIEmDCP5pmBmyFyJjqYUhYi3+nYARrVPdZ53RPigcoLspXyIBVf2CPansqOYiRIqxLjfsL6B1qGJmpFN1RHd+XF9GzkHzAgMBAAGjHTAbMAwGA1UdEwEB/wQCMAAwCwYDVR0PBAQDAgbAMA0GCSqGSIb3DQEBCwUAA4ICAQAw5nqLkVuaTWX/qnPqWpOlSfrfVF2plqAPu1sdgzU/vZGgZCLxq3cY3Dg02khdsM74A3fYFQGxFFo6zDt5Ru9VySBks2gmbebRuuYKAKHMoi0tNpvI2arOMaiJsq2yzGAox6e+MXhhQ1oV+28HaxjYIWuVSwWAzie+n6VloWXMDDxTg7t9URJ7d8E7ZrPZ2X0+7h6b8sfnOjTljUm+Mt6e6AIl1+lA7Ar4YeJgIOeU/RKSOcvrCGDNtz7kpn0XdsFC/m1xG1bIdhyv0zkRmKvtpVGROsSEHPLBwuTENIkm0Cw2/FQsPrG8S9Yer451Jv0H+heFfJXqVrHv8Azba5OkotK5IlPaHm9voxfhwI1aXHbUS+NwpTHHOeVsvzsC9LQDiLGO3MQLn7VFZebFa84CddwLWf/JTyPYIcg3I/BRDFqbrVNRRDJwVlxIgbU7ZhRIcjiRLFx6UbAd8B2fe+GHgxw/x/6Pop65ca32iGAJgojtXWdD5gZvh6PlhEhWMhIOCvAesE52L4wmIHofAIZjlPRXNaitZ74xDEIpQ9f5X0w/4ltB7OOBYYfu8z9lzCc4M2iSmtq1rvSYxnLI/nvt7D0uYrq82ZeG3kzungcS8qNjufGJeEHNeyDxMXF9rYU4KLxK8KLzA2Ldh7+3zywU/pwXhW/aTS42EViWPbffng=="" CondicionesDePago=""01 - Efectivo"" SubTotal=""100.00"" Moneda=""MXN"" TipoCambio=""1"" Total=""116.00"" TipoDeComprobante=""I"" MetodoPago=""PPD"" LugarExpedicion=""82250""><cfdi:Emisor Rfc=""ZUÑ920208KL4"" Nombre=""Empresa de DEMO"" RegimenFiscal=""601"" /><cfdi:Receptor Rfc=""VOC990129I26"" Nombre=""Cliente Demostracion"" UsoCFDI=""G03"" /><cfdi:Conceptos><cfdi:Concepto ClaveProdServ=""10101902"" NoIdentificacion=""124"" Cantidad=""1.00"" ClaveUnidad=""EA"" Unidad=""PZA"" Descripcion=""ESCOBA "" ValorUnitario=""100.00"" Importe=""100.00""><cfdi:Impuestos><cfdi:Traslados><cfdi:Traslado Base=""100.00"" Impuesto=""002"" TipoFactor=""Tasa"" TasaOCuota=""0.160000"" Importe=""16.00"" /></cfdi:Traslados></cfdi:Impuestos></cfdi:Concepto></cfdi:Conceptos><cfdi:Impuestos TotalImpuestosTrasladados=""16.00""><cfdi:Traslados><cfdi:Traslado Impuesto=""002"" TipoFactor=""Tasa"" TasaOCuota=""0.160000"" Importe=""16.00"" /></cfdi:Traslados></cfdi:Impuestos></cfdi:Comprobante>"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Region "P O L I Z A - V I R T U A L"
|
||||||
Protected Sub GeneraPolizaVentaWS(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
|
Protected Sub GeneraPolizaVentaWS(ByVal context As HttpContext, ObjFactura As Modelos.Factura)
|
||||||
Dim obj As New MPolizaVentaWS
|
Dim obj As New MPolizaVentaWS
|
||||||
'DATOS DEL CLIENTE
|
'DATOS DEL CLIENTE
|
||||||
@@ -320,6 +423,7 @@ Public Class SIGPolizaVirtual : Implements IHttpHandler, IRequiresSessionState
|
|||||||
|
|
||||||
context.Response.Write(Retorno)
|
context.Response.Write(Retorno)
|
||||||
End Sub
|
End Sub
|
||||||
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -4,6 +4,33 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||||
|
<style>
|
||||||
|
.checkbox label
|
||||||
|
{
|
||||||
|
padding-left:15px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.checkbox
|
||||||
|
{
|
||||||
|
width: 100%;
|
||||||
|
height: 100%;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
.rowcheck{
|
||||||
|
margin-left: -5px;
|
||||||
|
padding-top: 10px;
|
||||||
|
|
||||||
|
}
|
||||||
|
.rowcheckCampos{
|
||||||
|
padding-left: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
|
#DivComisioncheck{
|
||||||
|
border-top: 1px solid #e5e5e5;
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
<asp:Content ID="Content3" ContentPlaceHolderID="HB" runat="Server">
|
||||||
@@ -95,22 +122,22 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpGvFacturas" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row" style="margin-bottom:5px">
|
||||||
<div class="col-md-6" runat="server" >
|
<div class="col-md-6" runat="server" >
|
||||||
<label style=" ">Cuenta Depósito:</label>
|
<label style=" ">Cuenta Depósito:</label>
|
||||||
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" style="width: 300px;"></asp:DropDownList>
|
<asp:DropDownList ID="DdlCuentaDeposito" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" style="width: 300px;"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" runat="server" style="text-align: left;">
|
<div class="col-md-3" runat="server" style="text-align: left;">
|
||||||
<div class="col-md-1" >
|
<div class="col-md-1" >
|
||||||
<label style="width:70px; padding-top:5px;">Fecha:</label>
|
<label style="width:70px;">Fecha:</label>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" >
|
<div class="col-md-1" >
|
||||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
|
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-top: 0; width: 140px !important;">
|
||||||
@@ -136,23 +163,23 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row rowcheck truncate" id="DivComisioncheck" >
|
||||||
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 145px;" >
|
<div class="col-md-1 truncate" runat="server" id="DivFaltante" style ="width: 155px;" >
|
||||||
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" />
|
<asp:CheckBox ID="ChkFaltante" runat="server" Text="Faltante/Sobrante" CssClass="checkbox"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10" id="DivComision" style="display: none;">
|
<div class="col-md-10 rowcheckCampos" id="DivComision" style="display: none;">
|
||||||
<div class="col-md-3" >
|
<div class="col-md-1" style="padding-right: 130px;">
|
||||||
<label>Importe:</label>
|
<label>Importe:</label>
|
||||||
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="75px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtComision" Class=" input-sm " Width="100px" onkeypress = "return numericOnly(this);" ondrop = "return false;" onpaste = "return false;" CssClass="Numeros"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-1" style="padding-right: 190px;">
|
||||||
<label>SubProyecto:</label>
|
<label>SubProyecto:</label>
|
||||||
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlSubProyectoDeposito" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-4">
|
<div class="col-md-1">
|
||||||
<label>Clasificación:</label>
|
<label>Clasificación:</label>
|
||||||
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
<asp:DropDownList ID="DdlClasificacion" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -163,24 +190,25 @@
|
|||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row" >
|
<div class="row rowcheck truncate" id="DivDescuentocheck" style="margin-top: -25px;">
|
||||||
<div class="col-md-1" runat="server" id="Div1" style ="width: 145px">
|
<div class="col-md-1" runat="server" id="Div1" style ="width: 155px">
|
||||||
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento"/>
|
<asp:CheckBox ID="ChkDescuento" runat="server" Text="Descuento" CssClass="checkbox"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10" id="DivDescuento" style="display: none">
|
<div class="col-md-10 rowcheckCampos" id="DivDescuento" style="display: none">
|
||||||
|
|
||||||
<div class="col-md-2">
|
<div class="col-md-1" style="padding-right: 130px;">
|
||||||
<label>Importe:</label>
|
<label for="TxtDescuento">Importe:</label>
|
||||||
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="75px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtDescuento" Class=" input-sm " Width="100px" onkeypress = "return numericOnly(this);" ondrop = "return false;" onpaste = "return false;" CssClass="Numeros"></asp:TextBox>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-3" >
|
<div class="col-md-1" style="padding-right: 190px;">
|
||||||
<label>SubProyecto:</label>
|
<label>SubProyecto:</label>
|
||||||
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlSubProyectoDescuento" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="col-md-5">
|
<div class="col-md-1">
|
||||||
<label>Clasificación:</label>
|
<label>Clasificación:</label>
|
||||||
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
<asp:DropDownList ID="DdlClasificacionDescuento" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
@@ -188,30 +216,33 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row rowcheck truncate" id="DivIntercheck" style="margin-top: -25px;">
|
||||||
|
|
||||||
<div class="col-md-1" runat="server" id="Div2" style ="width: 145px">
|
<div class="col-md-1" runat="server" id="Div2" style ="width: 155px">
|
||||||
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario"/>
|
<asp:CheckBox ID="ChkIntermediario" runat="server" Text="Intermediario" CssClass="checkbox"/>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-10" id="DivInter" style="display: none">
|
<div class="col-md-10 rowcheckCampos" id="DivInter" style="display: none">
|
||||||
<div class="col-md-2" id="dd">
|
<div class="col-md-1" id="dd" style="padding-right: 130px;">
|
||||||
|
<label>Intermediario:</label>
|
||||||
<asp:Dropdownlist ID="DdlProveedorIntermediario" CssClassDdl="select2me" Width="100px" CssStyle="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:Dropdownlist>
|
<asp:Dropdownlist ID="DdlProveedorIntermediario" CssClassDdl="select2me" Width="100px" CssStyle="100%" DataTextField="RazonSocial" DataValueField="CveProveedor" runat="server"></asp:Dropdownlist>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-2" style=" width: 205px;">
|
||||||
<div class="col-md-2" id="DivinterImporte" >
|
<div class="col-md-6" id="DivinterImporte" style="padding-left: 0px; padding-right: 0px;" >
|
||||||
<label>Importe:</label>
|
<label>Importe:</label>
|
||||||
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Class=" input-sm " Width="75px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtComisionIntermediario" Class=" input-sm " Width="75px" onkeypress = "return numericOnly(this);" ondrop = "return false;" onpaste = "return false;" CssClass="Numeros"></asp:TextBox>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-6" id="DivIVA" >
|
||||||
|
<label>IVA:</label>
|
||||||
|
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px" onkeypress = "return numericOnly(this);" ondrop = "return false;" onpaste = "return false;" CssClass="Numeros"></asp:TextBox>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-2" id="DivIVA" >
|
|
||||||
<label>IVA:</label>
|
<div class="col-md-1" id="dd2" style="margin-right: 100px;">
|
||||||
<asp:TextBox runat="server" ID="TxtIVA" Class=" input-sm " Width="75px"></asp:TextBox>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-3" id="dd2">
|
|
||||||
<label id="LblClasificacion3">Gasto:</label>
|
<label id="LblClasificacion3">Gasto:</label>
|
||||||
<asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
<asp:DropDownList ID="DdlClasificacionIntermediario" AutoPostBack="false" Class="table-group-action-input form-control input-inline input-small input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Clasificacion" DataValueField="CveClasificacion">
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" id="divSubProyectoIntermediario">
|
<div class="col-md-1" id="divSubProyectoIntermediario">
|
||||||
<label id="LblSubproyectoIntermediario">SubProyecto:</label>
|
<label id="LblSubproyectoIntermediario">SubProyecto:</label>
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
<asp:DropDownList ID="DdlSubProyectoIntermediario" runat="server" AppendDataBoundItems="true" DataTextField="SubProyecto" DataValueField="CveSubProyecto" Class="table-group-action-input form-control input-inline input-small input-sm select2me">
|
||||||
@@ -221,7 +252,7 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<br />
|
<br />
|
||||||
<div style="height:550px;overflow-x:scroll">
|
<div style="height:450px;overflow-x:scroll">
|
||||||
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
|
<asp:GridView ID="GvFacturas" runat="server" AutoGenerateColumns="False" DataKeyNames="CveVenta, CvePrePoliza, CveIE, TipoCambio, CveMoneda, CveCliente, IdCtaContableBancos, IdCtaContClientes, Importe, SerieFolio" CssClass="table table-striped table-advance table-hover" Style="text-align: center; float: right; width: 100%; " GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -290,6 +321,41 @@
|
|||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript" language="javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
|
|
||||||
|
var specialKeys = new Array();
|
||||||
|
specialKeys.push(9); //Backspace
|
||||||
|
function numericOnly(elementRef) {
|
||||||
|
var keyCodeEntered = (event.which) ? event.which : (window.event.keyCode) ? window.event.keyCode : -1;
|
||||||
|
debugger;
|
||||||
|
|
||||||
|
if ((keyCodeEntered >= 48) && (keyCodeEntered <= 57)) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else if (keyCodeEntered == 46) {
|
||||||
|
if ((elementRef.value) && (elementRef.value.indexOf('.') >= 0)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else if (keyCodeEntered == 45) {
|
||||||
|
var tamaño = elementRef.value.length;
|
||||||
|
if (tamaño == 0) {
|
||||||
|
if ((elementRef.value) && (elementRef.value.indexOf('-') >= 0)) {
|
||||||
|
debugger;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
debugger;
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
debugger;
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
var ValorTotalSeleccionado = 0
|
var ValorTotalSeleccionado = 0
|
||||||
var comision = 0;
|
var comision = 0;
|
||||||
var descuento = 0;
|
var descuento = 0;
|
||||||
@@ -297,6 +363,8 @@
|
|||||||
var IVA = 0;
|
var IVA = 0;
|
||||||
var ComisionIntermediario = 0;
|
var ComisionIntermediario = 0;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
function FnSuma(chk, cantidad) {
|
function FnSuma(chk, cantidad) {
|
||||||
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
var saldoInicial = ToDouble($('#C_lblValorTotal').text());
|
||||||
var ValorTotalSeleccionado2 = 0;
|
var ValorTotalSeleccionado2 = 0;
|
||||||
@@ -419,6 +487,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function txtSuma(txt) {
|
function txtSuma(txt) {
|
||||||
|
|
||||||
var comision2 = ToDouble($('#C_TxtComision').val());
|
var comision2 = ToDouble($('#C_TxtComision').val());
|
||||||
var comisionNegativa = 0;
|
var comisionNegativa = 0;
|
||||||
if (comision2 < 0) {
|
if (comision2 < 0) {
|
||||||
@@ -456,7 +525,7 @@
|
|||||||
function txtSumaIVA(txt) {
|
function txtSumaIVA(txt) {
|
||||||
var comision2 = ToDouble($('#C_TxtIVA').val());
|
var comision2 = ToDouble($('#C_TxtIVA').val());
|
||||||
if (comision2 > ValorTotalSeleccionado) {
|
if (comision2 > ValorTotalSeleccionado) {
|
||||||
$('#C_TxtIVA').val(descuento)
|
$('#C_TxtIVA').val(IVA)
|
||||||
alert("No es posible poner un IVA superior a lo seleccionado")
|
alert("No es posible poner un IVA superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - ComisionIntermediario;
|
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - ComisionIntermediario;
|
||||||
@@ -469,7 +538,7 @@
|
|||||||
function txtSumaTntermediario(txt) {
|
function txtSumaTntermediario(txt) {
|
||||||
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
var comision2 = ToDouble($('#C_TxtComisionIntermediario').val());
|
||||||
if (comision2 > ValorTotalSeleccionado) {
|
if (comision2 > ValorTotalSeleccionado) {
|
||||||
$('#C_TxtComisionIntermediario').val(descuento)
|
$('#C_TxtComisionIntermediario').val(ComisionIntermediario)
|
||||||
alert("No es posible poner un importe superior a lo seleccionado")
|
alert("No es posible poner un importe superior a lo seleccionado")
|
||||||
} else {
|
} else {
|
||||||
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - IVA;
|
saldo = ValorTotalSeleccionado + descuento + comision - comision2 - IVA;
|
||||||
@@ -482,16 +551,28 @@
|
|||||||
function CheckFaltante(chk) {
|
function CheckFaltante(chk) {
|
||||||
if (chk.checked == true) {
|
if (chk.checked == true) {
|
||||||
$('#DivComision').css("display", "block");
|
$('#DivComision').css("display", "block");
|
||||||
|
$('#DivComisioncheck').removeClass("truncate")
|
||||||
|
$("#DivDescuentocheck").css("margin-top", 0);
|
||||||
} else {
|
} else {
|
||||||
$('#DivComision').css("display", "none");
|
$('#DivComision').css("display", "none");
|
||||||
|
$('#DivComisioncheck').addClass("truncate")
|
||||||
|
$("#DivDescuentocheck").css("margin-top", -25);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function CheckDescuento(chk) {
|
function CheckDescuento(chk) {
|
||||||
if (chk.checked == true) {
|
if (chk.checked == true) {
|
||||||
$('#DivDescuento').css("display", "block");
|
$('#DivDescuento').css("display", "block");
|
||||||
|
$('#DivDescuentocheck').removeClass("truncate")
|
||||||
|
$("#DivIntercheck").css("margin-top", 0);
|
||||||
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#DivDescuento').css("display", "none");
|
$('#DivDescuento').css("display", "none");
|
||||||
|
$('#DivDescuentocheck').addClass("truncate")
|
||||||
|
$("#DivIntercheck").css("margin-top", -25);
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -499,8 +580,12 @@
|
|||||||
function CheckIntermediario(chk) {
|
function CheckIntermediario(chk) {
|
||||||
if (chk.checked == true) {
|
if (chk.checked == true) {
|
||||||
$('#DivInter').css("display", "block");
|
$('#DivInter').css("display", "block");
|
||||||
|
$('#DivIntercheck').removeClass("truncate")
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
$('#DivInter').css("display", "none");
|
$('#DivInter').css("display", "none");
|
||||||
|
$('#DivIntercheck').addClass("truncate")
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|||||||
@@ -21,10 +21,10 @@ Partial Class Bancos_DepositosCaja
|
|||||||
TxtFecha.Text = Now.ToShortDateString
|
TxtFecha.Text = Now.ToShortDateString
|
||||||
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
|
txtFechaI.Text = Now.AddDays(-1).ToShortDateString
|
||||||
txtFechaF.Text = Now.ToShortDateString
|
txtFechaF.Text = Now.ToShortDateString
|
||||||
TxtComision.Attributes.Add("onKeyUp", "txtSuma(event);")
|
TxtComision.Attributes.Add("onKeyUp", "txtSuma(this);")
|
||||||
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(event);")
|
TxtDescuento.Attributes.Add("onKeyUp", "txtSumaDescuento(this);")
|
||||||
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(event);")
|
TxtIVA.Attributes.Add("onKeyUp", "txtSumaIVA(this);")
|
||||||
TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(event);")
|
TxtComisionIntermediario.Attributes.Add("onKeyUp", "txtSumaTntermediario(this);")
|
||||||
|
|
||||||
|
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
|
|||||||
@@ -176,7 +176,7 @@
|
|||||||
<div class="row" id="trNotificar" runat="server" visible="False">
|
<div class="row" id="trNotificar" runat="server" visible="False">
|
||||||
<label class="col-md-2 control-label">Notificar:</label>
|
<label class="col-md-2 control-label">Notificar:</label>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<asp:TextBox ID="TxtNotificarA" runat="server" MaxLength="12" CssClass="form-control input-sm" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtNotificarA" runat="server" MaxLength="100" CssClass="form-control input-sm" Rows="2" TextMode="MultiLine" ClientIDMode="Static"></asp:TextBox>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div>
|
<div>
|
||||||
|
|||||||
@@ -1938,6 +1938,7 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
Case 42 'Acreedores
|
Case 42 'Acreedores
|
||||||
|
|
||||||
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
||||||
Dim ObjCreditos As New ClsBancos
|
Dim ObjCreditos As New ClsBancos
|
||||||
ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero)
|
ObjCreditos.GetTarjetasCreditos(DdlCuenta.SelectedValue.ToEntero, DdlTarjeta.SelectedValue.ToEntero)
|
||||||
@@ -1947,10 +1948,12 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
IdCtaContable = IdCuenta
|
IdCtaContable = IdCuenta
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ImporteMovimiento = TxtImporte.Text.ToDecimal
|
Dim Importe42 As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal
|
||||||
importeMX = If(CveMoneda = 2, If(DivTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal * TipoCambioPago, TxtImporte.Text.ToDecimal * TipoCambioPago), TxtImporte.Text.ToDecimal)
|
ImporteMovimiento = Importe42
|
||||||
|
importeMX = If(CveMoneda = 2, If(DivTC.Visible, Importe42 / TxtTC.Text.ToDecimal * TipoCambioPago, Importe42 * TipoCambioPago), Importe42)
|
||||||
TipoCambioGeneral = TipoCambioPago
|
TipoCambioGeneral = TipoCambioPago
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Case 30
|
Case 30
|
||||||
'Conta ContPAQ
|
'Conta ContPAQ
|
||||||
If IdCuenta < 1 Then
|
If IdCuenta < 1 Then
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -152,10 +152,11 @@
|
|||||||
<asp:DropDownList ID="DdlClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="95%">
|
<asp:DropDownList ID="DdlClasificacion" runat="server" CssClass=" form-control input-sm select2me" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="95%">
|
||||||
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todas" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-1" style="display:none;">Producto Servicio:</div>
|
|
||||||
|
<div class="col-md-1">Producto Servicio:</div>
|
||||||
<div class="col-md-2">
|
<div class="col-md-2">
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="95%" />
|
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClassDdl="select2me" DataTextField="PSCodigo" DataValueField="CvePS" Width="95%" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ Partial Class Compras_RepComprasAF
|
|||||||
Private Sub Compras_RepComprasAFaspx_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Compras_RepComprasAFaspx_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
DdlPS.ddl.Visible = False
|
'DdlPS.ddl.Visible = False
|
||||||
If UsuarioActual.Empresa.GralSoloProyecto Then
|
If UsuarioActual.Empresa.GralSoloProyecto Then
|
||||||
LblSubProyecto.Text = "Proyecto:"
|
LblSubProyecto.Text = "Proyecto:"
|
||||||
DdlSubProyecto.Items.Clear()
|
DdlSubProyecto.Items.Clear()
|
||||||
@@ -429,5 +429,24 @@ Partial Class Compras_RepComprasAF
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||||
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaPS(CveClasificacion As Integer)
|
||||||
|
|
||||||
|
DdlPS.setEsWebService(If(UsuarioActual.Empresa.Funcionalidad(105).ToString = "1", True, False))
|
||||||
|
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then
|
||||||
|
DdlPS.ddl.Items.Clear()
|
||||||
|
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1)
|
||||||
|
DdlPS.ddl.DataBind()
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
|
Else
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.SelectedText = "Todos"
|
||||||
|
DdlPS.SelectedValue = "-1"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -448,4 +448,24 @@ Partial Class Compras_RepComprasAFDetalle
|
|||||||
|
|
||||||
Return filtro
|
Return filtro
|
||||||
End Function
|
End Function
|
||||||
|
Protected Sub DdlClasificacion_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlClasificacion.SelectedIndexChanged
|
||||||
|
CargaPS(DdlClasificacion.SelectedValue.ToEntero)
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaPS(CveClasificacion As Integer)
|
||||||
|
|
||||||
|
DdlPS.setEsWebService(If(UsuarioActual.Empresa.Funcionalidad(105).ToString = "1", True, False))
|
||||||
|
|
||||||
|
If Not UsuarioActual.Empresa.Funcionalidad(105).ToString = "1" Then
|
||||||
|
DdlPS.ddl.Items.Clear()
|
||||||
|
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa, CveClasificacion:=CveClasificacion, Estatus:=1)
|
||||||
|
DdlPS.ddl.DataBind()
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("*** Actualizar listado de Productos o Servicios ***", "-2"))
|
||||||
|
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione el Producto", "-1"))
|
||||||
|
Else
|
||||||
|
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", DdlClasificacion.SelectedValue)
|
||||||
|
DdlPS.SelectedText = "Todos"
|
||||||
|
DdlPS.SelectedValue = "-1"
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -355,6 +355,8 @@
|
|||||||
<asp:Literal ID="LtlDescuentos" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
|
<asp:Literal ID="LtlDescuentos" runat="server" Text='<%# Eval("Descuento", "{0:N2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:BoundField DataField="RetIVA" HeaderText="Ret IVA" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="RetISR" HeaderText="Ret ISR" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField ItemStyle-Width="80">
|
<asp:TemplateField ItemStyle-Width="80">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
Total
|
Total
|
||||||
@@ -498,6 +500,13 @@
|
|||||||
<asp:CheckBox ID="ChkFecha" runat="server" Text="Fecha Movimiento" /></td>
|
<asp:CheckBox ID="ChkFecha" runat="server" Text="Fecha Movimiento" /></td>
|
||||||
<td></td>
|
<td></td>
|
||||||
</tr>
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>
|
||||||
|
<asp:CheckBox ID="ChkRetIVA" runat="server" Text="Ret IVA" Checked="true" /></td>
|
||||||
|
<td>
|
||||||
|
<asp:CheckBox ID="ChkRetISR" runat="server" Text="Ret ISR" Checked="true" /></td>
|
||||||
|
<td></td>
|
||||||
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -368,14 +368,13 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
e.Row.FCHyperLink("HplSerieFolio").Text = ""
|
e.Row.FCHyperLink("HplSerieFolio").Text = ""
|
||||||
End If
|
End If
|
||||||
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
e.Row.Cells(7).HorizontalAlign = HorizontalAlign.Left
|
|
||||||
e.Row.Cells(8).HorizontalAlign = HorizontalAlign.Left
|
|
||||||
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(3).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(4).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(5).HorizontalAlign = HorizontalAlign.Right
|
||||||
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
e.Row.Cells(6).HorizontalAlign = HorizontalAlign.Right
|
||||||
|
e.Row.Cells(9).HorizontalAlign = HorizontalAlign.Right
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -604,13 +603,15 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
GvDatos.Columns(4).Visible = ChkIVA.Checked
|
GvDatos.Columns(4).Visible = ChkIVA.Checked
|
||||||
GvDatos.Columns(5).Visible = ChkIEPS.Checked
|
GvDatos.Columns(5).Visible = ChkIEPS.Checked
|
||||||
GvDatos.Columns(6).Visible = ChkDesc.Checked
|
GvDatos.Columns(6).Visible = ChkDesc.Checked
|
||||||
GvDatos.Columns(7).Visible = ChkTotal.Checked
|
GvDatos.Columns(7).Visible = Chkretiva.Checked
|
||||||
GvDatos.Columns(8).Visible = ChkAbre.Checked
|
GvDatos.Columns(8).Visible = Chkretisr.Checked
|
||||||
GvDatos.Columns(9).Visible = ChkRazon.Checked
|
GvDatos.Columns(9).Visible = ChkTotal.Checked
|
||||||
GvDatos.Columns(10).Visible = ChkFolio.Checked
|
GvDatos.Columns(10).Visible = ChkAbre.Checked
|
||||||
GvDatos.Columns(11).Visible = ChkFecha.Checked
|
GvDatos.Columns(11).Visible = ChkRazon.Checked
|
||||||
GvDatos.Columns(12).Visible = ChkObs.Checked
|
GvDatos.Columns(12).Visible = ChkFolio.Checked
|
||||||
GvDatos.Columns(13).Visible = ChkDescripcion.Checked
|
GvDatos.Columns(13).Visible = ChkFecha.Checked
|
||||||
|
GvDatos.Columns(14).Visible = ChkObs.Checked
|
||||||
|
GvDatos.Columns(15).Visible = ChkDescripcion.Checked
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -141,7 +141,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
|||||||
|
|
||||||
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlCtaContable.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 2 Or UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
Dim Conta As New ClsContabilidad
|
Dim Conta As New ClsContabilidad
|
||||||
Dim dtt As New DataTable
|
Dim dtt As New DataTable
|
||||||
|
|
||||||
@@ -383,7 +383,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
|||||||
|
|
||||||
'cargar la cuenta
|
'cargar la cuenta
|
||||||
|
|
||||||
If UsuarioActual.Empresa.TipoContabilizacion = 0 Then
|
If UsuarioActual.Empresa.TipoContabilidad = 1 Then
|
||||||
'busco en la cuenta contable, lo que tenga asignado
|
'busco en la cuenta contable, lo que tenga asignado
|
||||||
Dim Con As New ClsContabilidad
|
Dim Con As New ClsContabilidad
|
||||||
Dim dtt As DataTable = Nothing
|
Dim dtt As DataTable = Nothing
|
||||||
@@ -483,7 +483,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle
|
|||||||
DDLSubProyecto.SelectedIndex = 0
|
DDLSubProyecto.SelectedIndex = 0
|
||||||
DDLProveedor.SelectedIndex = 0
|
DDLProveedor.SelectedIndex = 0
|
||||||
DdlPersonal.SelectedIndex = 0
|
DdlPersonal.SelectedIndex = 0
|
||||||
TxtOrden.Text = ""
|
TxtOrden.Text = ""
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
HdnModalidad.Value = "I"
|
HdnModalidad.Value = "I"
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
RegistraScript(String.Format("$('#{0}').modal();", "divAgregarSucursal"))
|
||||||
|
|||||||
@@ -41,7 +41,7 @@ Partial Class Contabilidad_PolizasImpresion
|
|||||||
|
|
||||||
Dim objcont As New ClsContPAQi(UsuarioActual.Empresa)
|
Dim objcont As New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
If objcont.GetPolizasMasivo(TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, foli, folf, ddlTipoPoliza.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlSegmentoNeg.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, DdlGrupoPlantilla.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
If objcont.GetPolizasMasivo(TxtFechaInicio.Text.ToDate, TxtFechaFin.Text.ToDate, foli, folf, ddlTipoPoliza.SelectedValue.ToEntero, DdlUsuarioRegistro.SelectedValue.ToEntero, DdlSegmentoNeg.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, DdlGrupoPlantilla.SelectedValue.ToEntero, DdlTipoProveedor.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
If objcont.DtResultados.Rows.Count < 10000 Then
|
If objcont.DtResultados.Rows.Count < 15000 Then
|
||||||
|
|
||||||
If objcont.DtResultados.Rows.Count > 0 Then
|
If objcont.DtResultados.Rows.Count > 0 Then
|
||||||
Dim dr As DataRow
|
Dim dr As DataRow
|
||||||
|
|||||||
@@ -247,17 +247,15 @@ Partial Class PopUpAuxiliar
|
|||||||
|
|
||||||
Dim TieneError = False
|
Dim TieneError = False
|
||||||
|
|
||||||
If Not TieneError Then
|
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
|
||||||
If Not Conta.UpdatePrePolizasDetalleBloquear(ClavePrePoliza, False) Then
|
|
||||||
TieneError = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
|
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
|
If Not TieneError AndAlso Not Conta.RemovePrePolizas(ClavePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not TieneError AndAlso Conta.ValidacionPrePolizaCuadre(ClavePrePoliza, -1) Then
|
||||||
If Conta.ValorPolizaDescuadre > 0 Then
|
If Conta.ValorPolizaDescuadre > 0 Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -342,7 +342,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||||
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
|
<asp:GridView ID="GvMov" runat="server" AutoGenerateColumns="False" ShowHeader="False"
|
||||||
DataKeyNames="IdMov,IDCuenta,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta" Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Cuenta</HeaderTemplate>
|
<HeaderTemplate>Cuenta</HeaderTemplate>
|
||||||
|
|||||||
@@ -261,23 +261,23 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
CargaCuentas()
|
CargaCuentas()
|
||||||
|
|
||||||
If Request("CvePeriodo") IsNot Nothing AndAlso IsNumeric(Request("CvePeriodo")) AndAlso Request("CvePeriodo").ToEntero > 0 Then
|
'If Request("CvePeriodo") IsNot Nothing AndAlso IsNumeric(Request("CvePeriodo")) AndAlso Request("CvePeriodo").ToEntero > 0 Then
|
||||||
ViewState("CvePeriodo") = Request("CvePeriodo").ToEntero
|
' ViewState("CvePeriodo") = Request("CvePeriodo").ToEntero
|
||||||
ViewState("CveProyecto") = Request("CveProyecto").ToEntero
|
' ViewState("CveProyecto") = Request("CveProyecto").ToEntero
|
||||||
ViewState("CveSubProyecto") = Request("CveSubProyecto").ToEntero
|
' ViewState("CveSubProyecto") = Request("CveSubProyecto").ToEntero
|
||||||
ViewState("CveTurno") = Request("CveTurno").ToEntero
|
' ViewState("CveTurno") = Request("CveTurno").ToEntero
|
||||||
|
|
||||||
DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "61"))
|
' DdlPlantilla.Items.Add(New ListItem("Pago Nomina", "61"))
|
||||||
DdlPlantilla.SelectedValue = "61"
|
' DdlPlantilla.SelectedValue = "61"
|
||||||
DdlPlantilla.Enabled = False
|
' DdlPlantilla.Enabled = False
|
||||||
DivAgregarConceptos.Visible = False
|
' DivAgregarConceptos.Visible = False
|
||||||
|
|
||||||
CargaNomina()
|
' CargaNomina()
|
||||||
|
|
||||||
RegistraScript("$(document).ready(function () { calculateCargo(); Sys.Application.add_load(function (s, e) { calculateCargo(); }); } );", 1)
|
' RegistraScript("$(document).ready(function () { calculateCargo(); Sys.Application.add_load(function (s, e) { calculateCargo(); }); } );", 1)
|
||||||
RegistraScript("$(document).ready(function () { calculateAbono(); Sys.Application.add_load(function (s, e) { calculateAbono(); }); } );", 2)
|
' RegistraScript("$(document).ready(function () { calculateAbono(); Sys.Application.add_load(function (s, e) { calculateAbono(); }); } );", 2)
|
||||||
RegistraScript("$(document).ready(function () { comparar(); Sys.Application.add_load(function (s, e) { comparar(); }); } );", 3)
|
' RegistraScript("$(document).ready(function () { comparar(); Sys.Application.add_load(function (s, e) { comparar(); }); } );", 3)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
If IfNull(Request("Tipo"), "").ToString <> "NOMPROV" Then
|
||||||
GvPrePoliza.Columns(4).Visible = False
|
GvPrePoliza.Columns(4).Visible = False
|
||||||
@@ -293,8 +293,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Private Sub CreaDT()
|
Private Sub CreaDT()
|
||||||
DtMovimientos = New DataTable("Movimientos")
|
DtMovimientos = New DataTable("Movimientos")
|
||||||
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
Dim IDMov As DataColumn = DtMovimientos.Columns.Add("IdMov", Type.GetType("System.Int32")) : IDMov.AutoIncrement = True
|
||||||
With DtMovimientos.Columns
|
With DtMovimientos.Columns
|
||||||
.Add("IdCuenta", Type.GetType("System.Int32"))
|
|
||||||
.Add("CodigoCuenta", Type.GetType("System.String"))
|
.Add("CodigoCuenta", Type.GetType("System.String"))
|
||||||
.Add("Cuenta", Type.GetType("System.String"))
|
.Add("Cuenta", Type.GetType("System.String"))
|
||||||
.Add("Referencia", Type.GetType("System.String"))
|
.Add("Referencia", Type.GetType("System.String"))
|
||||||
@@ -318,84 +317,85 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
.Add("CveConceptoContable", Type.GetType("System.Int32"))
|
.Add("CveConceptoContable", Type.GetType("System.Int32"))
|
||||||
.Add("IdCtaContable", Type.GetType("System.Int32"))
|
.Add("IdCtaContable", Type.GetType("System.Int32"))
|
||||||
.Add("ConceptoContable", Type.GetType("System.String"))
|
.Add("ConceptoContable", Type.GetType("System.String"))
|
||||||
|
.Add("CveCuenta", Type.GetType("System.Int32"))
|
||||||
End With
|
End With
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaNomina()
|
'Private Sub CargaNomina()
|
||||||
Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
|
' Dim CvePlantilla As Integer = DdlPlantilla.SelectedValue.ToEntero
|
||||||
Dim ObjNomina As New ClsNominas
|
' Dim ObjNomina As New ClsNominas
|
||||||
Dim ObjConta As New ClsContabilidad
|
' Dim ObjConta As New ClsContabilidad
|
||||||
|
|
||||||
Dim Dt As DataTable = Nothing
|
' Dim Dt As DataTable = Nothing
|
||||||
Dim Cuenta As String = ""
|
' Dim Cuenta As String = ""
|
||||||
Dim Concepto As String = ""
|
' Dim Concepto As String = ""
|
||||||
Dim IdCuenta As Integer = 0
|
' Dim IdCuenta As Integer = 0
|
||||||
Dim TipoMovto As Integer
|
' Dim TipoMovto As Integer
|
||||||
Dim CveConcepto As Integer
|
' Dim CveConcepto As Integer
|
||||||
Dim CodigoCuenta As String = ""
|
' Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
' Dim NombreCuenta As String = ""
|
||||||
Dim Referencia As String = ""
|
' Dim Referencia As String = ""
|
||||||
Dim EsComodin As Integer = 0
|
' Dim EsComodin As Integer = 0
|
||||||
DtMovimientos.Clear()
|
' DtMovimientos.Clear()
|
||||||
|
|
||||||
If ObjNomina.GetProvisionNomina(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
' If ObjNomina.GetProvisionNomina(CveProyecto, CveSubProyecto, CveTurno, CvePeriodo, UsuarioActual.CveEmpresa) Then
|
||||||
Dt = ObjNomina.DtResultados
|
' Dt = ObjNomina.DtResultados
|
||||||
|
|
||||||
For Each drt As DataRow In Dt.Rows
|
' For Each drt As DataRow In Dt.Rows
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
' Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
|
|
||||||
If drt("NombreCompleto").ToString = "" AndAlso ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa) Then
|
' If drt("NombreCompleto").ToString = "" AndAlso ObjConta.GetRetCuenta(31, UsuarioActual.CveEmpresa) Then
|
||||||
CveConcepto = 98
|
' CveConcepto = 98
|
||||||
Cuenta = "Nominas por Pagar"
|
' Cuenta = "Nominas por Pagar"
|
||||||
IdCuenta = ObjConta.DtResultados(0)("IdCtaContable").ToString.ToEntero
|
' IdCuenta = ObjConta.DtResultados(0)("IdCtaContable").ToString.ToEntero
|
||||||
Concepto = "Pago Nomina"
|
' Concepto = "Pago Nomina"
|
||||||
Referencia = "Pago Nomina"
|
' Referencia = "Pago Nomina"
|
||||||
Else
|
' Else
|
||||||
Concepto = drt("NombreCompleto")
|
' Concepto = drt("NombreCompleto")
|
||||||
Referencia = ""
|
' Referencia = ""
|
||||||
CveConcepto = drt("CveConceptoContable").ToString.ToEntero
|
' CveConcepto = drt("CveConceptoContable").ToString.ToEntero
|
||||||
Cuenta = drt("ConceptoContable").ToString
|
' Cuenta = drt("ConceptoContable").ToString
|
||||||
IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
' IdCuenta = drt("IdCtaContable").ToString.ToEntero
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero($"Id={IdCuenta}")
|
' Dim drr As DataRow = DtCuentasContables.FiltroPrimero($"Id={IdCuenta}")
|
||||||
CodigoCuenta = If(drr IsNot Nothing, drr("CuentaFormato").ToString(), "")
|
' CodigoCuenta = If(drr IsNot Nothing, drr("CuentaFormato").ToString(), "")
|
||||||
NombreCuenta = If(drr IsNot Nothing, drr("Nombre").ToString(), "")
|
' NombreCuenta = If(drr IsNot Nothing, drr("Nombre").ToString(), "")
|
||||||
|
|
||||||
TipoMovto = drt("TipoMovto")
|
' TipoMovto = drt("TipoMovto")
|
||||||
|
|
||||||
If TipoMovto = 0 Then
|
' If TipoMovto = 0 Then
|
||||||
dr("Cargo") = Math.Abs(drt("Importe").ToString.ToDecimal)
|
' dr("Cargo") = Math.Abs(drt("Importe").ToString.ToDecimal)
|
||||||
dr("Abono") = 0
|
' dr("Abono") = 0
|
||||||
Else
|
' Else
|
||||||
dr("Cargo") = 0
|
' dr("Cargo") = 0
|
||||||
dr("Abono") = Math.Abs(drt("Importe").ToString.ToDecimal)
|
' dr("Abono") = Math.Abs(drt("Importe").ToString.ToDecimal)
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
dr("IdCuenta") = IdCuenta
|
' dr("IdCuenta") = IdCuenta
|
||||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
' dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||||
dr("Cuenta") = Cuenta
|
' dr("Cuenta") = Cuenta
|
||||||
dr("Concepto") = Concepto
|
' dr("Concepto") = Concepto
|
||||||
dr("Descripcion") = Concepto
|
' dr("Descripcion") = Concepto
|
||||||
dr("Referencia") = Referencia
|
' dr("Referencia") = Referencia
|
||||||
dr("TipoMovto") = TipoMovto
|
' dr("TipoMovto") = TipoMovto
|
||||||
dr("EsComodin") = EsComodin
|
' dr("EsComodin") = EsComodin
|
||||||
dr("CveConcepto") = CveConcepto
|
' dr("CveConcepto") = CveConcepto
|
||||||
dr("CveProveedor") = "-1"
|
' dr("CveProveedor") = "-1"
|
||||||
dr("CveSubProyecto") = drt("CveSubProyecto")
|
' dr("CveSubProyecto") = drt("CveSubProyecto")
|
||||||
dr("CvePersonal") = drt("CvePersonal")
|
' dr("CvePersonal") = drt("CvePersonal")
|
||||||
dr("CveClasificacion") = drt("CveClasificacion")
|
' dr("CveClasificacion") = drt("CveClasificacion")
|
||||||
dr("CveTipoGasto") = drt("CveTipoGasto")
|
' dr("CveTipoGasto") = drt("CveTipoGasto")
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
' DtMovimientos.Rows.Add(dr)
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
GvMov.DataSource = DtMovimientos
|
' GvMov.DataSource = DtMovimientos
|
||||||
GvMov.DataBind()
|
' GvMov.DataBind()
|
||||||
UPMovs.Update()
|
' UPMovs.Update()
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Sub CargaPrePoliza()
|
Private Sub CargaPrePoliza()
|
||||||
BtnEliminar.Visible = True
|
BtnEliminar.Visible = True
|
||||||
@@ -723,8 +723,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
EsComodin = 0
|
EsComodin = 0
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim dr As DataRow = DtMovimientos.NewRow
|
Dim dr As DataRow = DtMovimientos.NewRow
|
||||||
dr("IdCuenta") = IdCuenta
|
|
||||||
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
dr("CodigoCuenta") = CodigoCuenta & "<br>" & NombreCuenta
|
||||||
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
dr("Cuenta") = Cuenta 'TxtCuentaContable.Text
|
||||||
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
dr("Referencia") = If(drt("CveConcepto").ToString.Contiene("29", "130"), drt("Personal"), drt("RazonSocial"))
|
||||||
@@ -738,7 +738,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CveProveedor") = drt("CveProveedor")
|
dr("CveProveedor") = drt("CveProveedor")
|
||||||
dr("CvePersonal") = drt("CvePersonal")
|
dr("CvePersonal") = drt("CvePersonal")
|
||||||
dr("CveClasificacion") = -1
|
dr("CveClasificacion") = -1
|
||||||
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
dr("MultipleSubProyecto") = drt("MultipleSubProyecto")
|
||||||
|
dr("CveCuenta") = drt("CveCuenta")
|
||||||
'dr("FolioPoliza") = 0 'drt("FolioPoliza")
|
'dr("FolioPoliza") = 0 'drt("FolioPoliza")
|
||||||
|
|
||||||
DtMovimientos.Rows.Add(dr)
|
DtMovimientos.Rows.Add(dr)
|
||||||
@@ -756,7 +757,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
e.Row.Cells(0).HorizontalAlign = HorizontalAlign.Left
|
||||||
e.Row.Height = Unit.Pixel(1)
|
e.Row.Height = Unit.Pixel(1)
|
||||||
e.Row.Cells(0).ToolTip = e.Row.DBCampo("IdCuenta")
|
e.Row.Cells(0).ToolTip = e.Row.DBCampo("CveCuenta")
|
||||||
|
|
||||||
If e.Row.DBCampo("TipoMovto") = "1" Then
|
If e.Row.DBCampo("TipoMovto") = "1" Then
|
||||||
e.Row.FCTextBox("TxtAbono").Visible = True
|
e.Row.FCTextBox("TxtAbono").Visible = True
|
||||||
@@ -851,8 +852,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Else
|
Else
|
||||||
Dim MensajeAlert = New StringBuilder
|
Dim MensajeAlert = New StringBuilder
|
||||||
Dim ObjIE As New ClsBancos()
|
Dim ObjIE As New ClsBancos()
|
||||||
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
Dim ObjMov As New ClsContabilidad(ObjIE.IniciaTransacSQL)
|
||||||
Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
|
' Dim ObjNom As New ClsNominas(ObjIE.IniciaTransacSQL)
|
||||||
Dim Conta As ClsContPAQi = Nothing
|
Dim Conta As ClsContPAQi = Nothing
|
||||||
Dim IDPoliza As Integer = 0
|
Dim IDPoliza As Integer = 0
|
||||||
Dim MsgError As String = ""
|
Dim MsgError As String = ""
|
||||||
@@ -884,9 +885,9 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
|
|
||||||
'inserto las compras que voy a pagarDdlSaldos
|
'inserto las compras que voy a pagarDdlSaldos
|
||||||
For Each gvr As GridViewRow In GvMov.Rows
|
For Each gvr As GridViewRow In GvMov.Rows
|
||||||
If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
'If gvr.DataKey("IDCuenta").ToEntero > 0 Then
|
||||||
IdCtaContable = gvr.DataKey("IDCuenta")
|
' IdCtaContable = gvr.DataKey("IDCuenta")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
If gvr.DataKey("TipoMovto").ToDouble > 0 Then
|
||||||
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble
|
||||||
@@ -911,12 +912,18 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
If Importe > 0 Then
|
If Importe > 0 Then
|
||||||
|
Dim tCveCuenta As Integer = -1
|
||||||
|
|
||||||
|
If gvr.datakey("CveConcepto") = "299" Then
|
||||||
|
tCveCuenta = gvr.datakey("CveCuenta").toentero
|
||||||
|
End If
|
||||||
|
|
||||||
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text,
|
If ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovto, Importe, gvr.FCLiteral("LtlReferencia").Text, gvr.DataKey("CveConcepto").ToEntero, gvr.FCTextBox("TxtConcepto").Text,
|
||||||
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
|
TxtFecha.Text.ToDate, IdCtaContable, -1, CveSubProyecto:=gvr.FCDropDownList("DdlSubProyecto").SelectedValue.ToEntero, CveIE:=CveIE,
|
||||||
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
|
CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, CveCompra:=gvr.DataKey("CveCompra").ToEntero,
|
||||||
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
CvePersonal:=gvr.DataKey("CvePersonal").ToEntero, CveClasificacion:=gvr.DataKey("CveClasificacion").ToEntero,
|
||||||
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
ImporteMX:=Importe, CveTipoGasto:=gvr.FCDropDownList("DdlTipoGasto").SelectedValue.ToEntero,
|
||||||
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero) Then
|
CveCliente:=gvr.DataKey("CveCliente").ToEntero, CveVenta:=gvr.DataKey("CveVenta").ToEntero, CveCuenta:=tCveCuenta) Then
|
||||||
Else
|
Else
|
||||||
MsgError = "No se pudo insertar el detalle de la póliza2"
|
MsgError = "No se pudo insertar el detalle de la póliza2"
|
||||||
Exit For
|
Exit For
|
||||||
@@ -924,11 +931,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
If CvePeriodo > 0 Then
|
'If CvePeriodo > 0 Then
|
||||||
If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
' If Not ObjNom.UpdateProvisionNomina(CvePeriodo, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
MsgError = "No se pudo actualizar el periodo de la nómina"
|
' MsgError = "No se pudo actualizar el periodo de la nómina"
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
If ObjMov.ValidacionPrePolizaCuadre(CvePrePoliza, 1) Then
|
||||||
If ObjMov.ValorPolizaDescuadre > 0 Then
|
If ObjMov.ValorPolizaDescuadre > 0 Then
|
||||||
@@ -1001,11 +1008,11 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
For Each row As GridViewRow In GvPrePoliza.Rows
|
For Each row As GridViewRow In GvPrePoliza.Rows
|
||||||
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
|
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
|
||||||
If row.FCCheckBox("chkModificado").Checked Then
|
If row.FCCheckBox("chkModificado").Checked Then
|
||||||
If Not ObjContabilidad.UpdatePrepolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
|
If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero,
|
||||||
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0,
|
||||||
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1406,7 +1413,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim dr As DataRow = Rows(0)
|
Dim dr As DataRow = Rows(0)
|
||||||
Dim CodigoCuenta As String = ""
|
Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
dr("CveCuenta") = DdlCtaContable.SelectedValue
|
||||||
|
|
||||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
||||||
@@ -1433,6 +1440,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
dr("CveClasificacion") = -1
|
dr("CveClasificacion") = -1
|
||||||
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
dr("CveCliente") = DdlClientes.SelectedValue.ToEntero
|
||||||
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
dr("CveVenta") = DdlVentas.SelectedValue.ToEntero
|
||||||
|
dr("CveCuenta") = DdlCtaContable.SelectedValue.ToEntero
|
||||||
End If
|
End If
|
||||||
LbCancelarEdicion.Visible = False
|
LbCancelarEdicion.Visible = False
|
||||||
LbAgregar.Text = "Agregar"
|
LbAgregar.Text = "Agregar"
|
||||||
@@ -1474,7 +1482,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
Dim CodigoCuenta As String = ""
|
Dim CodigoCuenta As String = ""
|
||||||
Dim NombreCuenta As String = ""
|
Dim NombreCuenta As String = ""
|
||||||
|
|
||||||
dr("IdCuenta") = DdlCtaContable.SelectedValue
|
dr("CveCuenta") = DdlCtaContable.SelectedValue
|
||||||
|
|
||||||
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
If DdlCtaContable.SelectedValue.ToEntero > 0 Then
|
||||||
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("CveCuenta={0}", DdlCtaContable.SelectedValue))
|
||||||
@@ -1548,7 +1556,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaTipoTransaccion(Tipo As String)
|
Private Sub CargaTipoTransaccion(Tipo As String)
|
||||||
DdlTipoTransaccion.Items.Clear()
|
DdlTipoTransaccion.Items.Clear()
|
||||||
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}'")
|
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros($"Tipo = '{Tipo}' AND Estatus = 1 ")
|
||||||
DdlTipoTransaccion.DataBind()
|
DdlTipoTransaccion.DataBind()
|
||||||
DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1"))
|
DdlTipoTransaccion.Items.Insert(0, New ListItem("Seleccione Tipo Movimiento", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1644,7 +1652,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
|||||||
If DrM IsNot Nothing Then
|
If DrM IsNot Nothing Then
|
||||||
HdnCve.Value = idMov.ToString
|
HdnCve.Value = idMov.ToString
|
||||||
|
|
||||||
DdlCtaContable.SelectedValue = DrM("IdCuenta")
|
DdlCtaContable.SelectedValue = DrM("CveCuenta")
|
||||||
TxtReferencia.Text = DrM("Referencia")
|
TxtReferencia.Text = DrM("Referencia")
|
||||||
TxtObservaciones.Text = DrM("Concepto")
|
TxtObservaciones.Text = DrM("Concepto")
|
||||||
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
|
' (Math.Abs(TxtCargo.Text.ToDouble) > 0, 0, 1) = dr("TipoMovto")
|
||||||
|
|||||||
@@ -19,6 +19,9 @@
|
|||||||
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
<asp:LinkButton ID="Imprimir" runat="server"><i class="fa fa-print"></i> Imprimir</asp:LinkButton>
|
||||||
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
<%--<asp:ImageButton ID="Imprimir" runat="server" alt="Imprimir" src="/Imagenes/btnImprimir.gif" Style="cursor: pointer; height: 20px" /> --%>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkCerrar" runat="server"><i class="fa fa-print"></i> Cerrar Ejercicio</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UpFiltros" UpdateMode="Conditional">
|
||||||
@@ -584,6 +587,36 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="ModalCierre" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalEditarFecha" UpdateMode="Conditional" RenderMode="Inline">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header ">
|
||||||
|
<h4 class="modal-title">
|
||||||
|
<asp:Literal ID="LtlCierre" Text="Cierre de Ejercicio" runat="server"> </asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="row">
|
||||||
|
<label class="col-md-1 truncate" style="width: 90px;">Ejercicio:</label>
|
||||||
|
<div class="col-md-2" style="width: 125px;">
|
||||||
|
<asp:DropDownList ID="DdlEjercicioCierre" runat="server" CssClass="select2me" DataTextField="Ejercicio" DataValueField="Ejercicio" Width="100px">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<label class="col-md-1 truncate" style="width: 90px;">Cuentas:</label>
|
||||||
|
<div class="col-md-2" style="width: 125px;">
|
||||||
|
<asp:DropDownList ID="DdlCuentas" runat="server" CssClass="select2me" DataTextField="CtaCodigo" DataValueField="CveCuenta" Width="100px">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:Button ID="BtnCierre" runat="server" Text="Guardar" CssClass="btn btn-primary" ValidationGroup="VgmEditarFecha" />
|
||||||
|
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|||||||
@@ -158,12 +158,16 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
Dim Clsconta As New ClsContabilidad
|
Dim Clsconta As New ClsContabilidad
|
||||||
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
If Clsconta.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||||
DdlEjercicio.DataSource = Clsconta.DtResultados
|
DdlEjercicio.DataSource = Clsconta.DtResultados
|
||||||
|
DdlEjercicioCierre.DataSource = Clsconta.DtResultados
|
||||||
Else
|
Else
|
||||||
DdlEjercicio.DataSource = Nothing
|
DdlEjercicio.DataSource = Nothing
|
||||||
|
DdlEjercicioCierre.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
Clsconta.Dispose()
|
Clsconta.Dispose()
|
||||||
DdlEjercicio.DataBind()
|
DdlEjercicioCierre.DataBind()
|
||||||
|
DdlEjercicioCierre.SelectedValue = Now.Year.ToString
|
||||||
|
|
||||||
|
DdlEjercicio.DataBind()
|
||||||
DdlEjercicio.SelectedValue = Now.Year.ToString
|
DdlEjercicio.SelectedValue = Now.Year.ToString
|
||||||
|
|
||||||
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
DdlSubproyecto.DataSource = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, -1)
|
||||||
@@ -598,4 +602,34 @@ Partial Class AC2_SituacionFinanciera
|
|||||||
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString)))
|
params.Add(New ReportParameter("periodo", String.Format("de {0} {1}", DdlPeriodo.SelectedItem.ToString, DdlEjercicio.SelectedItem.ToString)))
|
||||||
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
ImprimirPDF(reportpath, DtDatos, params, fileName, Formato)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub LnkCerrar_Click(sender As Object, e As EventArgs) Handles LnkCerrar.Click
|
||||||
|
RegistraScript("$('#ModalCierre').modal()")
|
||||||
|
CargaCtaContableE()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnCierre_Click(sender As Object, e As EventArgs) Handles BtnCierre.Click
|
||||||
|
Dim objConta As New ClsContabilidad
|
||||||
|
Dim FechaIncio As String = String.Format("{0}/01/01", DdlEjercicioCierre.SelectedValue.ToString)
|
||||||
|
Dim FechaFin As String = String.Format("{0}/12/31", DdlEjercicioCierre.SelectedValue.ToString)
|
||||||
|
Dim CvePrepoliza As Integer = objConta.CierreEjercicio(UsuarioActual.CveEmpresa, DdlEjercicioCierre.SelectedValue.ToEntero, DdlCuentas.SelectedValue.ToEntero, FechaIncio, FechaFin, UsuarioActual.CveUsuario)
|
||||||
|
If CvePrepoliza > 0 Then
|
||||||
|
Alert(String.Format("Se realizo el cierre correctamente: <br/> <b> Poliza: </b> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrepoliza={0}'>{0}</a>", CvePrepoliza), TipoMensaje.MsgInformacion)
|
||||||
|
objConta.Commit()
|
||||||
|
Else
|
||||||
|
Alert("Ocurrio un error al realizar el cierre", TipoMensaje.MsgError)
|
||||||
|
objConta.RollBack()
|
||||||
|
End If
|
||||||
|
objConta.Dispose()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCtaContableE()
|
||||||
|
Dim ObjConta As New ClsContabilidad
|
||||||
|
If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then
|
||||||
|
DdlCuentas.DataSource = ObjConta.DtResultados.FiltraParametros("Tipo = 'F' or Tipo = 'E' ", "")
|
||||||
|
End If
|
||||||
|
ObjConta.Dispose()
|
||||||
|
DdlCuentas.DataBind()
|
||||||
|
DdlCuentas.Items.Insert(0, New ListItem("Seleccionar", "-1"))
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -393,10 +393,19 @@ Partial Class GPS_TrayectoDetalle
|
|||||||
Protected Sub LnkActualizarEstatus_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkActualizarEstatus_Click(sender As Object, e As EventArgs)
|
||||||
Dim CveEstatusSiguiente As Integer = -1
|
Dim CveEstatusSiguiente As Integer = -1
|
||||||
Dim Estatus As String = ""
|
Dim Estatus As String = ""
|
||||||
|
|
||||||
Using ObjGPS As New ClsGPS
|
Using ObjGPS As New ClsGPS
|
||||||
|
|
||||||
|
If ObjGPS.GetTrayectosGeoReferencias(CveTrayecto) Then
|
||||||
|
If CveEstatusActual = 1 Then
|
||||||
|
'TOMA LA GEOCERCA DE INICIO
|
||||||
|
Dim Row As DataRow = ObjGPS.DtResultados.FiltroPrimero($"EsInicio = True")
|
||||||
|
If Row IsNot Nothing Then
|
||||||
|
CveEstatusSiguiente = Row("CveEstatusTrayecto").ToString().ToEntero()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
Dim Row As DataRow = ObjGPS.DtResultados.FiltroPrimero($"CveEstatusTrayecto = {CveEstatusActual}")
|
Dim Row As DataRow = ObjGPS.DtResultados.FiltroPrimero($"CveEstatusTrayecto = {CveEstatusActual}")
|
||||||
|
If Row IsNot Nothing Then
|
||||||
CveEstatusSiguiente = Row("CveEstatusSiguiente").ToString().ToEntero()
|
CveEstatusSiguiente = Row("CveEstatusSiguiente").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -81,18 +81,27 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
ddlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1)
|
||||||
ddlAlmacen.DataBind()
|
ddlAlmacen.DataBind()
|
||||||
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then ddlAlmacen.SelectedValuesIfExist(Request("CveAlmacen").ToString)
|
Dim CveTipoAlmacen As Integer
|
||||||
|
If IfNull(Request("CveAlmacen"), "-1").ToString.ToEntero > 0 Then
|
||||||
|
ddlAlmacen.SelectedValuesIfExist(Request("CveAlmacen").ToString)
|
||||||
|
CveTipoAlmacen = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=Request("CveAlmacen").ToString.ToEntero).FiltroPrimeroValor("CveTipoAlmacen").ToEntero
|
||||||
|
' If CveTipoAlmacen = 3 Then chktransitorio.checked = True
|
||||||
|
End If
|
||||||
CargaClasificaciones()
|
CargaClasificaciones()
|
||||||
|
|
||||||
|
|
||||||
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
||||||
CBLTiposAlmacen.DataBind()
|
CBLTiposAlmacen.DataBind()
|
||||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||||
If item.Text.Contiene("Entrega Adelantado", "Transitorio") Then
|
If item.Text.Contiene("Entrega Adelantado", "Transitorio") Then
|
||||||
item.Selected = False
|
If CveTipoAlmacen = 3 Then
|
||||||
|
item.Selected = True
|
||||||
|
Else
|
||||||
|
item.Selected = False
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
item.Selected = True
|
item.Selected = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaFuncionalidad105()
|
Private Sub CargaFuncionalidad105()
|
||||||
|
|||||||
@@ -66,20 +66,20 @@
|
|||||||
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Documentacion Tipo">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Tipo Documentación">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlDocumentacionTipo" runat="server" Text='<%# Eval("DocumentacionTipo") %>'></asp:Literal>
|
<asp:Literal ID="LtlDocumentacionTipo" runat="server" Text='<%# Eval("DocumentacionTipo") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Dias Limite">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Días Límite">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlDocumentacionDiasLimite" runat="server" Text='<%# If(Eval("DiasLimite").ToString() = "" Or Eval("DiasLimite").ToString() = "0", "-", Eval("DiasLimite").ToString()) %>'></asp:Literal>
|
<asp:Literal ID="LtlDocumentacionDiasLimite" runat="server" Text='<%# If(Eval("DiasLimite").ToString() = "" Or Eval("DiasLimite").ToString() = "0", "-", Eval("DiasLimite").ToString()) %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Aplica Limite">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" HeaderText="Aplica Límite">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaDiasLimite" runat="server" Text='<%# If(Eval("AplicaDiasLimite").ToString() = "1", "Si", "No") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaDiasLimite" runat="server" Text='<%# If(Eval("AplicaDiasLimite").ToString() = "1", "Si", "No") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -196,11 +196,11 @@
|
|||||||
<asp:TextBox ID="TxtDiasLimite" CssClass="form-control" onkeypress="validate(event)" MaxLength="2" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtDiasLimite" CssClass="form-control" onkeypress="validate(event)" MaxLength="2" runat="server"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="rfvTxtDiasLimite" runat="server" ControlToValidate="TxtDiasLimite" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="rfvTxtDiasLimite" runat="server" ControlToValidate="TxtDiasLimite" ValidationGroup="GrpEscolaridad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilTxtDiasLimite" runat="server" TargetControlID="TxtDiasLimite" FilterType="Numbers" ValidChars="" />
|
<ajax:FilteredTextBoxExtender ID="FilTxtDiasLimite" runat="server" TargetControlID="TxtDiasLimite" FilterType="Numbers" ValidChars="" />
|
||||||
<label for="<%= TxtOrden.ClientID.ToString()%>">Dias Limite:</label>
|
<label for="<%= TxtOrden.ClientID.ToString()%>">Días Limite:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:CheckBox ID="ChkAplicaDiasLimite" runat="server" Text="Aplica Dias Limite" />
|
<asp:CheckBox ID="ChkAplicaDiasLimite" runat="server" Text="Aplica Días Límite" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:CheckBox ID="ChkAplicaFechaVencimiento" runat="server" Text="Aplica Fecha de Vencimiento" />
|
<asp:CheckBox ID="ChkAplicaFechaVencimiento" runat="server" Text="Aplica Fecha de Vencimiento" />
|
||||||
@@ -230,12 +230,12 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:TabPanel>
|
</asp:TabPanel>
|
||||||
|
|
||||||
<asp:TabPanel ID="TabParametros" runat="server" HeaderText="Parametros">
|
<asp:TabPanel ID="TabParametros" runat="server" HeaderText="Parámetros">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
|
<div class="form-group form-md-line-input input-iconright" style="text-align:right!important">
|
||||||
<asp:LinkButton runat="server" ID="LnkAgregarParametro" CssClass="Texto" OnClick="LnkAgregarParametro_Click" Text="Agregar Parametro"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkAgregarParametro" CssClass="Texto" OnClick="LnkAgregarParametro_Click" Text="Agregar Parámetros"></asp:LinkButton>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -249,7 +249,7 @@
|
|||||||
DataKeyNames="CveDocumentacionParametro,CveDocumentacion,Parametro,Descripcion " CssClass="table table-hover table-advance Widthall" GridLines="None">
|
DataKeyNames="CveDocumentacionParametro,CveDocumentacion,Parametro,Descripcion " CssClass="table table-hover table-advance Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Parametro">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Left" ItemStyle-Width="60px" HeaderText="Parámetro">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlParametro" runat="server" Text='<%# Eval("Parametro") %>'></asp:Literal>
|
<asp:Literal ID="LtlParametro" runat="server" Text='<%# Eval("Parametro") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -328,7 +328,7 @@
|
|||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||||
<h4 class="modal-title">
|
<h4 class="modal-title">
|
||||||
<h4> <asp:Literal ID="Literal1" runat="server">Parametros</asp:Literal></h4>
|
<h4> <asp:Literal ID="Literal1" runat="server">Parámetros</asp:Literal></h4>
|
||||||
</h4>
|
</h4>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -336,8 +336,8 @@
|
|||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtParametro" CssClass="form-control" MaxLength="50" runat="server"></asp:TextBox>
|
<asp:TextBox ID="TxtParametro" CssClass="form-control" MaxLength="50" runat="server"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtParametro" runat="server" ControlToValidate="TxtParametro" ValidationGroup="GrpParametro" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Parametro''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtParametro" runat="server" ControlToValidate="TxtParametro" ValidationGroup="GrpParametro" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Parámetro''</b> es necesario, por favor ingréselo."></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtParametro.ClientID.ToString()%>">Parametro:</label>
|
<label for="<%= TxtParametro.ClientID.ToString()%>">Parámetro:</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
|||||||
@@ -560,7 +560,7 @@ Partial Class RH_CatDocumentos
|
|||||||
|
|
||||||
Dim ObjDoc As New ClsEdocumentacion
|
Dim ObjDoc As New ClsEdocumentacion
|
||||||
If ObjDoc.RemoveDocumentacionParametros(CveDocumentacionParametroEliminar, UsuarioActual.CveEmpresa) Then
|
If ObjDoc.RemoveDocumentacionParametros(CveDocumentacionParametroEliminar, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Parametro eliminado correctamente.")
|
Alert("Parámetro eliminado correctamente.")
|
||||||
End If
|
End If
|
||||||
ObjDoc.Dispose()
|
ObjDoc.Dispose()
|
||||||
|
|
||||||
@@ -569,7 +569,7 @@ Partial Class RH_CatDocumentos
|
|||||||
Dim DRow As DataRow = DTTempParametros(IndexEliminar)
|
Dim DRow As DataRow = DTTempParametros(IndexEliminar)
|
||||||
DRow.Delete()
|
DRow.Delete()
|
||||||
DTTempParametros.AcceptChanges()
|
DTTempParametros.AcceptChanges()
|
||||||
Alert("Parametro eliminado correctamente.")
|
Alert("Parámetro eliminado correctamente.")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -612,12 +612,12 @@ Partial Class RH_CatDocumentos
|
|||||||
|
|
||||||
If CveDocumentacionParametro > 0 Then
|
If CveDocumentacionParametro > 0 Then
|
||||||
If ObjDoc.UpdateDocumentacionParametros(CveDocumentacionParametro, CveDocumentacion, TxtParametro.Text.Trim, TxtParametroDescripcion.Text.Trim, UsuarioActual.CveEmpresa) Then
|
If ObjDoc.UpdateDocumentacionParametros(CveDocumentacionParametro, CveDocumentacion, TxtParametro.Text.Trim, TxtParametroDescripcion.Text.Trim, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("Parametro actualizado correctamente.")
|
Alert("Parámetro actualizado correctamente.")
|
||||||
ErrorProceso = False
|
ErrorProceso = False
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If ObjDoc.AddDocumentacionParametros(CveDocumentacion, TxtParametro.Text.Trim, TxtParametroDescripcion.Text.Trim, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
If ObjDoc.AddDocumentacionParametros(CveDocumentacion, TxtParametro.Text.Trim, TxtParametroDescripcion.Text.Trim, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||||
Alert("Parametro agregado correctamente.")
|
Alert("Parámetro agregado correctamente.")
|
||||||
ErrorProceso = False
|
ErrorProceso = False
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -632,7 +632,7 @@ Partial Class RH_CatDocumentos
|
|||||||
Drow("Descripcion") = TxtParametroDescripcion.Text
|
Drow("Descripcion") = TxtParametroDescripcion.Text
|
||||||
'Editar Row en base a index
|
'Editar Row en base a index
|
||||||
ErrorProceso = False
|
ErrorProceso = False
|
||||||
Alert("Parametro actualizado correctamente.")
|
Alert("Parámetro actualizado correctamente.")
|
||||||
Else
|
Else
|
||||||
|
|
||||||
Dim Drow As DataRow = DTTempParametros.NewRow
|
Dim Drow As DataRow = DTTempParametros.NewRow
|
||||||
@@ -641,7 +641,7 @@ Partial Class RH_CatDocumentos
|
|||||||
|
|
||||||
|
|
||||||
DTTempParametros.Rows.Add(Drow)
|
DTTempParametros.Rows.Add(Drow)
|
||||||
Alert("Parametro agregado correctamente.")
|
Alert("Parámetro agregado correctamente.")
|
||||||
ErrorProceso = False
|
ErrorProceso = False
|
||||||
'Agreagr Row
|
'Agreagr Row
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -26,7 +26,7 @@ public class TareasJam : IHttpHandler
|
|||||||
switch (Metodo)
|
switch (Metodo)
|
||||||
{
|
{
|
||||||
case "TestConexion":
|
case "TestConexion":
|
||||||
retorno = PruebaConexionFTP("ftp://us2.hostedftp.com/", "agrojam", "A12345678");
|
retorno = PruebaConexionFTP("ftp://thalamus.exavault.com", "agrojam", "A12345678");
|
||||||
break;
|
break;
|
||||||
case "EjecutaThalamus":
|
case "EjecutaThalamus":
|
||||||
|
|
||||||
@@ -112,7 +112,7 @@ public class TareasJam : IHttpHandler
|
|||||||
//string FTPPass = "agj-3500";
|
//string FTPPass = "agj-3500";
|
||||||
|
|
||||||
|
|
||||||
string FTPServer = "ftp://us2.hostedftp.com";
|
string FTPServer = "ftp://thalamus.exavault.com";
|
||||||
string TFPUsr = "agrojam";
|
string TFPUsr = "agrojam";
|
||||||
string FTPPass = "A12345678";
|
string FTPPass = "A12345678";
|
||||||
|
|
||||||
@@ -375,7 +375,10 @@ public class TareasJam : IHttpHandler
|
|||||||
ErrorProceso = true;
|
ErrorProceso = true;
|
||||||
Respuesta = false;
|
Respuesta = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
// ErrorProceso = true;
|
||||||
|
|
||||||
|
|
||||||
if (!ErrorProceso)
|
if (!ErrorProceso)
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user