This commit is contained in:
@@ -1192,15 +1192,52 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function BlockComplementodePAgo(CveIE As Integer, CveComplementoPago As Integer) As Boolean
|
||||
Public Function AddComplementoPagosSinc(cveUsuario As Int32, fechaInicio As String, cveEmpresa As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_AddComplementoPagosSinc", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@cveUsuario", SqlDbType.Int).Value = cveUsuario
|
||||
.Add("@fechaInicio", SqlDbType.VarChar).Value = fechaInicio
|
||||
.Add("@cveEmpresa", SqlDbType.Int).Value = cveEmpresa
|
||||
.Add("@cveComplementoPagoSinc", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al cancelar estatus complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function UpComplementoPagosSinc(cveComplementoPagoSinc As Int32, fechaFin As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_UpComplementoPagosSinc", CommandType.StoredProcedure)
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@fechaFin", SqlDbType.VarChar).Value = fechaFin
|
||||
.Add("@cveComplementoPagoSinc", SqlDbType.Int).Value = cveComplementoPagoSinc
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
retorno = False
|
||||
OnError("Ocurrió un error al cancelar estatus complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
Public Function BlockComplementodePago(CveIE As Integer, BloqueadoUtilerias As Boolean, CveComplementoPagoSinc As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ComplementoPagoBlock")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@CveComplementoPago", SqlDbType.Int).Value = CveComplementoPago
|
||||
.Add("@CveComplementoPagoSinc", SqlDbType.Int).Value = CveComplementoPagoSinc
|
||||
.Add("@BloqueadoUtilerias", SqlDbType.Bit).Value = BloqueadoUtilerias
|
||||
End With
|
||||
Try
|
||||
Retorno = (SqlAdapter.SelectCommand.ExecuteNonQuery() > 0)
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Retorno = False
|
||||
OnError("Ocurrió un error al Guardar complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
@@ -1208,15 +1245,16 @@ Public Class ClsBancos
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function DropComplementodePago(CveIE As Integer, CveComplementoPago As Integer) As Boolean
|
||||
Public Function DropComplementodePago(CveIE As Integer, CveComplementoPagoSinc As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Banc_ComplementoPagoremove")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
.Add("@CveComplementoPago", SqlDbType.Int).Value = CveComplementoPago
|
||||
.Add("@CveComplementoPagoSinc", SqlDbType.Int).Value = CveComplementoPagoSinc
|
||||
End With
|
||||
Try
|
||||
Retorno = (SqlAdapter.SelectCommand.ExecuteNonQuery() > 0)
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
Retorno = False
|
||||
OnError("Ocurrió un error al Guardar complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
@@ -5171,12 +5171,12 @@ Public Class ClsPaginas
|
||||
param.Values = {rpds.Values(0)}
|
||||
params.Add(param)
|
||||
Next
|
||||
|
||||
Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
If File.Exists(ruta) Then
|
||||
Bytes = File.ReadAllBytes(ruta)
|
||||
File.Delete(ruta)
|
||||
End If
|
||||
Bytes = wsreport.StreamPDFBytes(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
'Dim ruta = wsreport.StreamPDF(RutaReporte, ds, params.ToArray(), NombreArchivo, Formato, CveEmpresa, CveUsuario)
|
||||
'If File.Exists(ruta) Then
|
||||
' Bytes = File.ReadAllBytes(ruta)
|
||||
' File.Delete(ruta)
|
||||
'End If
|
||||
'Dim setup As AppDomainSetup = New AppDomainSetup
|
||||
'With setup
|
||||
' .ApplicationBase = Environment.CurrentDirectory
|
||||
|
||||
@@ -174,11 +174,26 @@ Public Class ClsSisUsuarios
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
Public Function GetModulosUsuariosPlataforma(CveUsuario As Integer, CvePlataforma As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("SELECT M.* FROM [dbo].[UsuariosModulos] UM INNER JOIN Modulos M ON M.CveModulo=UM.CveModulo WHERE M.CvePlataforma =@CvePlataforma AND @CveUsuario = UM .CveUsuario AND UM.Permitir =1", CommandType.Text)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As SqlException
|
||||
OnError("Ocurrio un error al obtener el menu.", ex)
|
||||
Retorno = False
|
||||
End Try
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function ValidaUsuario(Usuario As String, Password As String, tIMEI As String, Optional CveEmpresa As Integer = -1) As Usuario
|
||||
Dim Retorno As Usuario = Nothing
|
||||
|
||||
DataAdapter("PA_Sis_UsuariosGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = -1
|
||||
.Add("@CveRol", SqlDbType.Int).Value = -1
|
||||
@@ -186,7 +201,6 @@ Public Class ClsSisUsuarios
|
||||
.Add("@Contraseña", SqlDbType.VarChar).Value = Password
|
||||
.Add("@EsLogIn", SqlDbType.Bit).Value = 1
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
|
||||
@@ -57,31 +57,38 @@ Namespace SIG
|
||||
|
||||
Using Banco As New ClsBancos()
|
||||
If Banco.GetComplementoPagosRep(CveCliente, FechaI, FechaF, CveIE, CveVenta, opcion, CveEmpresa, Estatus:=status) Then
|
||||
respuesta = Banco.DtResultados
|
||||
respuesta = Banco.DtResultados.FiltraParametros("BloqueadoUtilerias = 0")
|
||||
End If
|
||||
Dim Serie As String = "Pag"
|
||||
Dim CveComplementoPagoTimbre As Integer = -1
|
||||
Dim Folio As Integer = -1
|
||||
respuesta.Columns.Add("CveComplementoPagoTimbre", GetType(Int32))
|
||||
respuesta.Columns.Add("CveComplementoPagoSinc", GetType(Int32))
|
||||
respuesta.Columns.Add("FolioTimbre", GetType(String))
|
||||
respuesta.AcceptChanges()
|
||||
Dim thencommit As Boolean = True
|
||||
Banco.IniciaTransacSQL()
|
||||
For Each dr As System.Data.DataRow In respuesta.Select("CveVenta Is NULL")
|
||||
CveComplementoPagoTimbre = Banco.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, Serie, Folio, Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)
|
||||
Folio = Banco.FActual
|
||||
dr("CveComplementoPagoTimbre") = CveComplementoPagoTimbre
|
||||
dr("FolioTimbre") = Folio
|
||||
If Banco.BlockComplementodePAgo(dr("CveIE").ToString().ToEntero(), CveComplementoPagoTimbre) Then
|
||||
thencommit = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
If Banco.AddComplementoPagosSinc(CveUsuario, DateTime.Now.ToString("yyyy/MM/dd"), CveEmpresa) Then
|
||||
Dim CveComplementoPagoSinc As Integer = Banco.DtResultados.Rows(0)("CveComplementoPagoSinc").ToString().ToEntero()
|
||||
For Each dr As System.Data.DataRow In respuesta.Select("CveVenta Is NULL")
|
||||
'CveComplementoPagoTimbre = Banco.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, Serie, Folio, Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)
|
||||
Folio = 1 'Banco.FActual
|
||||
'dr("CveComplementoPagoTimbre") = CveComplementoPagoTimbre
|
||||
dr("FolioTimbre") = Folio
|
||||
dr("CveComplementoPagoSinc") = CveComplementoPagoSinc
|
||||
If Not Banco.BlockComplementodePago(dr("CveIE").ToString().ToEntero(), 1, CveComplementoPagoSinc) Then
|
||||
thencommit = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
thencommit = False
|
||||
End If
|
||||
respuesta.AcceptChanges()
|
||||
If thencommit Then
|
||||
Banco.Commit()
|
||||
Else
|
||||
respuesta = New System.Data.DataTable
|
||||
respuesta = New System.Data.DataTable()
|
||||
Banco.RollBack()
|
||||
End If
|
||||
End Using
|
||||
@@ -94,6 +101,7 @@ Namespace SIG
|
||||
<HttpPost>
|
||||
Public Function SincronizarComplementoPago(<FromBody()> params As WsBody) As Object
|
||||
Dim dt As System.Data.DataTable = Newtonsoft.Json.JsonConvert.DeserializeObject(Of System.Data.DataTable)(Decripta(params.Datos))
|
||||
Dim dterror As Data.DataTable = dt.Copy()
|
||||
Dim CveEmpresa As Integer = 119
|
||||
Dim rutaxml As String = String.Format("{0}xml", RutaEmpresa)
|
||||
If Not System.IO.Directory.Exists(rutaxml) Then
|
||||
@@ -101,12 +109,13 @@ Namespace SIG
|
||||
End If
|
||||
|
||||
Using objbancos As New ClsBancos()
|
||||
objbancos.IniciaTransacSQL()
|
||||
dt.AcceptChanges()
|
||||
Dim continuar As Boolean = True
|
||||
For Each dr As System.Data.DataRow In dt.Rows
|
||||
If dr("Sincronizado").ToString() <> "1" Then
|
||||
If continuar AndAlso dr("Sincronizado").ToString() <> "1" Then
|
||||
If dr("SeTimbro").ToString() = 1 Then
|
||||
|
||||
Dim continuar As Boolean = True
|
||||
Dim CveComplementoPagoTimbre As Integer
|
||||
Try
|
||||
Using ArchivoW As New IO.StreamWriter(String.Format("{0}\{1}.xml", rutaxml, dr("FolioFiscalTimbre").ToString()), True, System.Text.Encoding.UTF8)
|
||||
Try
|
||||
@@ -118,19 +127,33 @@ Namespace SIG
|
||||
Catch
|
||||
continuar = False
|
||||
End Try
|
||||
If continuar AndAlso objbancos.UpdateComplementoPago(dr("CveComplementoPagoTimbre").ToString().ToEntero(), dr("FolioFiscalTimbre").ToString(), dr("CvePAC").ToString().ToEntero(), CveEmpresa) Then
|
||||
If continuar Then
|
||||
CveComplementoPagoTimbre = objbancos.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, "Pag", dr("FolioTimbre"), Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)
|
||||
continuar = CveComplementoPagoTimbre > 0
|
||||
End If
|
||||
If continuar Then continuar = objbancos.UpdateComplementoPago(CveComplementoPagoTimbre, dr("FolioFiscalTimbre").ToString(), dr("CvePAC").ToString().ToEntero(), CveEmpresa)
|
||||
If continuar Then
|
||||
dr("Sincronizado") = 1
|
||||
End If
|
||||
Else
|
||||
|
||||
If objbancos.DropComplementodePago(dr("CveComplementoPagoTimbre").ToString().ToEntero(), dr("CveIE").ToString().ToEntero()) Then
|
||||
If objbancos.DropComplementodePago(dr("CveIE").ToString().ToEntero(), 0) Then 'dr("CveComplementoPagoSinc").ToString().ToEntero()) Then
|
||||
dr("Sincronizado") = 1
|
||||
Else
|
||||
continuar = False
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
Next
|
||||
If continuar Then
|
||||
objbancos.Commit()
|
||||
Else
|
||||
dt = dterror
|
||||
objbancos.RollBack()
|
||||
End If
|
||||
End Using
|
||||
|
||||
dt.AcceptChanges()
|
||||
Return JSutil.strresponse(dt, (Not IsNothing(dt)), "")
|
||||
End Function
|
||||
|
||||
@@ -50,6 +50,8 @@ Namespace SIG
|
||||
|
||||
Dim OjEmpresa As Empresa = Nothing
|
||||
If user IsNot Nothing Then
|
||||
objuser.GetModulosUsuariosPlataforma(user.CveUsuario, 8)
|
||||
Dim dtmodulos As System.Data.DataTable = objuser.DtResultados
|
||||
If CveEmpresastr.ToEntero() > 0 Then
|
||||
user.CveEmpresa = CveEmpresastr.ToEntero()
|
||||
End If
|
||||
@@ -82,6 +84,7 @@ Namespace SIG
|
||||
Retorno = New List(Of String)
|
||||
Retorno.Add(Extensiones.ModExtensiones.Encripta(Newtonsoft.Json.JsonConvert.SerializeObject(Retornouser)))
|
||||
Retorno.Add(Extensiones.ModExtensiones.Encripta(Newtonsoft.Json.JsonConvert.SerializeObject(OjEmpresa)))
|
||||
Retorno.Add(Extensiones.ModExtensiones.Encripta(Newtonsoft.Json.JsonConvert.SerializeObject(dtmodulos)))
|
||||
|
||||
End If
|
||||
End Using
|
||||
|
||||
@@ -56,6 +56,33 @@
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="StreamPDFBytes">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="RutaReporte" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="source">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element ref="s:schema" />
|
||||
<s:any />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Parametros" type="tns:ArrayOfReportParameter" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="NombreArchivo" type="s:string" />
|
||||
<s:element minOccurs="0" maxOccurs="1" name="Formato" type="s:string" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="CveEmpresa" type="s:int" />
|
||||
<s:element minOccurs="1" maxOccurs="1" name="CveUsuario" type="s:int" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
<s:element name="StreamPDFBytesResponse">
|
||||
<s:complexType>
|
||||
<s:sequence>
|
||||
<s:element minOccurs="0" maxOccurs="1" name="StreamPDFBytesResult" type="s:base64Binary" />
|
||||
</s:sequence>
|
||||
</s:complexType>
|
||||
</s:element>
|
||||
</s:schema>
|
||||
</wsdl:types>
|
||||
<wsdl:message name="HelloWorldSoapIn">
|
||||
@@ -70,6 +97,12 @@
|
||||
<wsdl:message name="StreamPDFSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:StreamPDFResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="StreamPDFBytesSoapIn">
|
||||
<wsdl:part name="parameters" element="tns:StreamPDFBytes" />
|
||||
</wsdl:message>
|
||||
<wsdl:message name="StreamPDFBytesSoapOut">
|
||||
<wsdl:part name="parameters" element="tns:StreamPDFBytesResponse" />
|
||||
</wsdl:message>
|
||||
<wsdl:portType name="WebServiceSoap">
|
||||
<wsdl:operation name="HelloWorld">
|
||||
<wsdl:input message="tns:HelloWorldSoapIn" />
|
||||
@@ -79,6 +112,10 @@
|
||||
<wsdl:input message="tns:StreamPDFSoapIn" />
|
||||
<wsdl:output message="tns:StreamPDFSoapOut" />
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="StreamPDFBytes">
|
||||
<wsdl:input message="tns:StreamPDFBytesSoapIn" />
|
||||
<wsdl:output message="tns:StreamPDFBytesSoapOut" />
|
||||
</wsdl:operation>
|
||||
</wsdl:portType>
|
||||
<wsdl:binding name="WebServiceSoap" type="tns:WebServiceSoap">
|
||||
<soap:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -100,6 +137,15 @@
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="StreamPDFBytes">
|
||||
<soap:operation soapAction="http://tempuri.org/StreamPDFBytes" style="document" />
|
||||
<wsdl:input>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:binding name="WebServiceSoap12" type="tns:WebServiceSoap">
|
||||
<soap12:binding transport="http://schemas.xmlsoap.org/soap/http" />
|
||||
@@ -121,6 +167,15 @@
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
<wsdl:operation name="StreamPDFBytes">
|
||||
<soap12:operation soapAction="http://tempuri.org/StreamPDFBytes" style="document" />
|
||||
<wsdl:input>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:input>
|
||||
<wsdl:output>
|
||||
<soap12:body use="literal" />
|
||||
</wsdl:output>
|
||||
</wsdl:operation>
|
||||
</wsdl:binding>
|
||||
<wsdl:service name="WebService">
|
||||
<wsdl:port name="WebServiceSoap" binding="tns:WebServiceSoap">
|
||||
|
||||
@@ -104,16 +104,19 @@ Partial Class Bancos_RepComplementoPago
|
||||
Mensaje = "El Pago contiene facturas que no tienen folio fiscal"
|
||||
End If
|
||||
End If
|
||||
If e.Row.DBCampo("BloqueadoUtilerias") = "1" Then
|
||||
Mensaje = "Bloqueado Timbrando por aplicacion"
|
||||
End If
|
||||
e.Row.FCLiteral("LtlMon").Text = e.Row.DBCampo("PagoAbreviaturaSAT")
|
||||
|
||||
If Not Mensaje.Length = 0 Then
|
||||
e.Row.ForeColor = Drawing.Color.Red
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
e.Row.FCCheckBox("Chk").ToolTip = Mensaje
|
||||
End If
|
||||
If Not Mensaje.Length = 0 Then
|
||||
e.Row.ForeColor = Drawing.Color.Red
|
||||
e.Row.FCCheckBox("Chk").Enabled = False
|
||||
e.Row.FCCheckBox("Chk").ToolTip = Mensaje
|
||||
End If
|
||||
|
||||
Else
|
||||
e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||
Else
|
||||
e.Row.FCHyperLink("HplXML").Visible = True : e.Row.FCHyperLink("HplXML").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=xml&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||
e.Row.FCHyperLink("HplPDF").Visible = True : e.Row.FCHyperLink("HplPDF").NavigateUrl = String.Format("/Compras/PopUpVerFactura.aspx?P={0}", Encripta(String.Format("OP=CompP&EXT=pdf&CveComplementoPago={0}&SerieFolio={1}&CveIE={2}", e.Row.DBCampo("CveComplementoPago"), e.Row.DBCampo("SerieFolioPago").ToString.Replace("&", "%26%"), e.Row.DBCampo("CveIE").ToString)))
|
||||
e.Row.FCLinkButton("LnkSendMail").Visible = True
|
||||
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
15190
Bin/Newtonsoft.Json.xml
15190
Bin/Newtonsoft.Json.xml
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user