Fecha de sucursal al emitir complementos
This commit is contained in:
@@ -945,7 +945,7 @@ Public Class ClsBancos
|
|||||||
|
|
||||||
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
|
Public Function GeneraTimbrePago(CveIE As Integer, CveVenta As Integer, UsuarioActual As Usuario, Optional CveCliente As Integer = -1, Optional CFDIRelacionado As String = "-1", Optional EsRegeneracion As Boolean = False, Optional CvePrePoliza As Integer = -1, Optional FechaTimbrado As DateTime = MinFecha) As Boolean
|
||||||
|
|
||||||
If FechaTimbrado = MinFecha Then FechaTimbrado = DateTime.Now
|
|
||||||
Dim Serie As String = "Pag"
|
Dim Serie As String = "Pag"
|
||||||
Dim Folio As Integer = -1
|
Dim Folio As Integer = -1
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -961,6 +961,33 @@ Public Class ClsBancos
|
|||||||
'If EsCancelacion Then Estatus = 2
|
'If EsCancelacion Then Estatus = 2
|
||||||
If EsRegeneracion Then Estatus = 3
|
If EsRegeneracion Then Estatus = 3
|
||||||
|
|
||||||
|
If FechaTimbrado = MinFecha Then
|
||||||
|
Dim RowFiltro As DataRow = Nothing
|
||||||
|
|
||||||
|
RowFiltro = dttpagos.FiltroPrimero("")
|
||||||
|
|
||||||
|
If RowFiltro IsNot Nothing Then
|
||||||
|
If Now.EsHorarioVerano Then
|
||||||
|
Dim UTCOffsetVerano As Integer = RowFiltro("UTCOffsetVerano").ToString().ToEntero()
|
||||||
|
If UTCOffsetVerano <> 0 Then
|
||||||
|
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetVerano)
|
||||||
|
Else
|
||||||
|
FechaTimbrado = DateTime.Now
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Dim UTCOffsetInvierno As Integer = RowFiltro("UTCOffsetInvierno").ToString().ToEntero()
|
||||||
|
If UTCOffsetInvierno <> 0 Then
|
||||||
|
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffsetInvierno)
|
||||||
|
Else
|
||||||
|
FechaTimbrado = DateTime.Now
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
FechaTimbrado = DateTime.Now
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus)
|
Dim tCveComplementoPago As Integer = AddComplementoPago(If(CvePrePoliza > 0, CveIE, dr("CveIE").ToString.ToEntero), -1, Serie, Folio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CvePrePoliza:=CvePrePoliza, Estatus:=Estatus)
|
||||||
If tCveComplementoPago > 0 Then
|
If tCveComplementoPago > 0 Then
|
||||||
|
|||||||
@@ -114,7 +114,7 @@
|
|||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvD" runat="server" GridLines="None"
|
<asp:GridView ID="GvD" runat="server" GridLines="None"
|
||||||
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago"
|
DataKeyNames="CobranzaCorreo,CveIE,CveVenta,CveEmpresa,FechaDocumento, PagoAbreviaturaSAT,Folio, ClaveFormaPagoSAT, NumCuenta,Importe, FolioFiscal,VentaSerie,VentaFolio,VentaAbreviaturaSAT, VentaImportePagado,MetodoPago,TipoCambio,NumParcialidad,ImpSaldoInsoluto,ImpSaldoAnterior,RFC,NombreCliente,PorcentajeIVA,PorcentajeIEPS,CuentaBeneficiario,SerieFolioPago,FolioFiscalComplemento,CveComplementoPago,UTCOffsetVerano,UTCOffsetInvierno"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
CssClass="table table-striped table-advance table-hover Widthall mysmallbtn" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderStyle-HorizontalAlign="Left" ItemStyle-HorizontalAlign="Left">
|
||||||
|
|||||||
@@ -52,11 +52,28 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
|
|
||||||
For Each gvr As GridViewRow In GvD.Rows
|
For Each gvr As GridViewRow In GvD.Rows
|
||||||
If gvr.FCCheckBox("Chk").Checked Then
|
If gvr.FCCheckBox("Chk").Checked Then
|
||||||
|
Dim FechaTimbrado As DateTime = DateTime.Now
|
||||||
|
|
||||||
|
Dim UTCOffset As Integer = 0
|
||||||
|
|
||||||
|
If Now.EsHorarioVerano Then
|
||||||
|
If gvr.DataKey("UTCOffsetVerano").ToEntero() <> 0 Then
|
||||||
|
UTCOffset = gvr.DataKey("UTCOffsetVerano").ToEntero()
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
If gvr.DataKey("UTCOffsetInvierno").ToEntero() <> 0 Then
|
||||||
|
UTCOffset = gvr.DataKey("UTCOffsetInvierno").ToEntero()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
If UTCOffset <> 0 Then
|
||||||
|
FechaTimbrado = DateTime.UtcNow.AddHours(UTCOffset)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim Banco As New ClsBancos
|
Dim Banco As New ClsBancos
|
||||||
Banco.IniciaTransacSQL()
|
Banco.IniciaTransacSQL()
|
||||||
|
|
||||||
|
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual, FechaTimbrado:=FechaTimbrado) Then
|
||||||
If Banco.GeneraTimbrePago(gvr.DataKey("CveIE").ToEntero, -1, UsuarioActual) Then
|
|
||||||
If Banco.Mensaje = "" Then
|
If Banco.Mensaje = "" Then
|
||||||
Banco.Commit()
|
Banco.Commit()
|
||||||
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
PDFReciboDePagos(-1, -1, Banco.CveComplementoPago, False)
|
||||||
@@ -72,7 +89,6 @@ Partial Class Bancos_RepComplementoPago
|
|||||||
Banco.RollBack()
|
Banco.RollBack()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
Banco.Dispose()
|
Banco.Dispose()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|||||||
Reference in New Issue
Block a user