This commit is contained in:
2023-11-27 18:05:02 -07:00
2 changed files with 128 additions and 117 deletions

View File

@@ -1439,114 +1439,124 @@ Partial Class General_SaldosIniciales
Dim DtProveedores As New DataTable Dim DtProveedores As New DataTable
Dim NoEncontrados As Integer = 0 Dim NoEncontrados As Integer = 0
Dim Encontrados As Integer = 0 Dim Encontrados As Integer = 0
DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
Dim RFC As String = "" Dim RFC As String = ""
Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim CvePS As Integer = drr("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows Dim ObjCompras As New ClsCompras
Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'") Dim ObjConta As New ClsContabilidad(ObjCompras.IniciaTransacSQL())
RFC = Row("RFC").ToString().Trim
Dim Serie As String = Row("Serie").ToString()
Dim Folio As String = Row("Folio").ToString()
Dim Fecha As Date = Row("Fecha").ToString().ToDate
Dim SubTotal As Decimal = Row("SubTotal").ToString().ToDecimal
Dim IVA As Decimal = Row("IVA").ToString().ToDecimal
Dim Total As Decimal = Row("Total").ToString().ToDecimal
Dim Saldo As Decimal = Row("Saldo").ToString().ToDecimal
Dim TipoDocto As String = Row("Tipo Documento").ToString()
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString().ToEntero()
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString())
Dim RetIVA As Decimal = Row("Ret IVA").ToString().ToDecimal
Dim RetISR As Decimal = Row("Ret ISR").ToString().ToDecimal
Dim IEPS As Decimal = If(dt.Columns.Contains("IEPS"), Row("IEPS").ToString(), "0").ToDecimal
Dim Moneda As String = Row("Moneda").ToString()
Dim TipoCambio As String = If(dt.Columns.Contains("Tipo Cambio"), Row("Tipo Cambio").ToString(), "1")
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
Dim CveMoneda As Integer = 1
Dim CveProveedorSucursal As Integer = If(dt.Columns.Contains("CveProveedorSucursal"), Row("CveProveedorSucursal").ToString(), "0").ToEntero
Dim PorcentajeIVA As String = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString(), "0")
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString(), "0").ToDecimal
Dim RetIVAPorcentaje As Decimal = If(dt.Columns.Contains("RetIVAPorcentaje"), Row("RetIVAPorcentaje").ToString(), "0").ToDecimal
Dim RetISRPorcentaje As Decimal = If(dt.Columns.Contains("RetISRPorcentaje"), Row("RetISRPorcentaje").ToString(), "0").ToDecimal
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto='{0}'", If(dt.Columns.Contains("SubProyecto"), Row("SubProyecto").ToString(), ""))).ToEntero
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True Try
If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorCompras = True DtProveedores = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString() Dim drr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimero("")
Dim CvePS As Integer = drr("CvePS").ToString().ToEntero()
Dim CveUnidadMedida As Integer = drr("CveUnidadMedida").ToString().ToEntero()
Dim CveClasificacion As Integer = drr("CveClasificacion").ToString().ToEntero()
Dim dtsubp As DataTable = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa)
'Temporalmente SE BORRARA For Each Row As DataRow In dt.FiltraParametros("RFC <> ''").Rows
Dim Transaccion As String = "" 'Row("Transaccion2").ToString() Dim Sucursal As String = dtsubp.FiltroPrimeroValor("CveSubProyecto", $"SubProyecto = '{Row("Sucursal").ToString()}'")
Dim Folio2 As String = "" 'Row("Folio2").ToString() RFC = Row("RFC").ToString().Trim
Dim CodProvee As String = "" 'Row("CodProvee2").ToString() Dim Serie As String = Row("Serie").ToString()
Dim Folio As String = Row("Folio").ToString()
Dim Fecha As Date = Row("Fecha").ToString().ToDate
Dim SubTotal As Decimal = Row("SubTotal").ToString().ToDecimal
Dim IVA As Decimal = Row("IVA").ToString().ToDecimal
Dim Total As Decimal = Row("Total").ToString().ToDecimal
Dim Saldo As Decimal = Row("Saldo").ToString().ToDecimal
Dim TipoDocto As String = Row("Tipo Documento").ToString()
Dim CveProveedor As Integer = DtProveedores.FiltroPrimeroValor("CveProveedor", $"RFC = '{RFC}'").ToString().ToEntero()
GuardaLog(Sucursal + " - " + Row("Sucursal").ToString())
Dim RetIVA As Decimal = Row("Ret IVA").ToString().ToDecimal
Dim RetISR As Decimal = Row("Ret ISR").ToString().ToDecimal
Dim IEPS As Decimal = If(dt.Columns.Contains("IEPS"), Row("IEPS").ToString(), "0").ToDecimal
Dim Moneda As String = Row("Moneda").ToString()
Dim TipoCambio As String = If(dt.Columns.Contains("Tipo Cambio"), Row("Tipo Cambio").ToString(), "1")
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
Dim CveMoneda As Integer = 1
Dim CveProveedorSucursal As Integer = If(dt.Columns.Contains("CveProveedorSucursal"), Row("CveProveedorSucursal").ToString(), "0").ToEntero
Dim PorcentajeIVA As String = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString(), "0")
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString(), "0").ToDecimal
Dim RetIVAPorcentaje As Decimal = If(dt.Columns.Contains("RetIVAPorcentaje"), Row("RetIVAPorcentaje").ToString(), "0").ToDecimal
Dim RetISRPorcentaje As Decimal = If(dt.Columns.Contains("RetISRPorcentaje"), Row("RetISRPorcentaje").ToString(), "0").ToDecimal
Dim CveSubProyecto As Integer = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", String.Format("SubProyecto='{0}'", If(dt.Columns.Contains("SubProyecto"), Row("SubProyecto").ToString(), ""))).ToEntero
If CveSubProyecto = 0 Then CveSubProyecto = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto").ToEntero
'Moneda If Not CvePS > 0 Then Alert(String.Format("No se encontró el Producto Servicio"), TipoMensaje.MsgError) : ErrorCompras = True
If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN", "MONEDA NACIONAL") Then If Not CveUnidadMedida > 0 Then Alert(String.Format("No se encontró la Unidad de Medida."), TipoMensaje.MsgError) : ErrorCompras = True
CveMoneda = 1 If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
ElseIf Moneda.ToUpper.Contiene("DOLARES", "DOLAR", "USD", "DÓLARES") Then If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
CveMoneda = 2
End If
'Si no se especifica TC, se manda como pesos. TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString()
If TipoCambio = "" Then TipoCambio = "1"
'PrePóliza 'Temporalmente SE BORRARA
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Compras/SaldoInicial", 1, Total, Total, CveMoneda, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim Transaccion As String = "" 'Row("Transaccion2").ToString()
If Not CvePrePoliza > 0 Then Dim Folio2 As String = "" 'Row("Folio2").ToString()
ErrorCompras = True Dim CodProvee As String = "" 'Row("CodProvee2").ToString()
Exit For
End If
If FechaVencimiento = "".ToDate Or FechaVencimiento < "1900/01/01".ToDate Then 'Moneda
FechaVencimiento = Fecha If Moneda.ToUpper.Contiene("PESOS", "PESO", "MXN", "MONEDA NACIONAL") Then
End If CveMoneda = 1
ElseIf Moneda.ToUpper.Contiene("DOLARES", "DOLAR", "USD", "DÓLARES") Then
CveMoneda = 2
End If
'Compra 'Si no se especifica TC, se manda como pesos.
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDecimal, FechaVencimiento, If TipoCambio = "" Then TipoCambio = "1"
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total, CveSubProyecto:=CveSubProyecto) Then
ErrorCompras = True
Exit For
End If
CveCompra = ObjCompras.CveCompra
'Compra Detalle 'PrePóliza
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, Sucursal.ToEntero(), -1, 0, 1, SubTotal, 0.16D, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA.ToDecimal, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Compras/SaldoInicial", 1, Total, Total, CveMoneda, Fecha, String.Format("{0}-{1}", Serie, Folio), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
ErrorCompras = True If Not CvePrePoliza > 0 Then
Exit For ErrorCompras = True
End If Exit For
Dim ConceptoContablePago As Integer = 17 End If
If TipoDocto = "NC" Then ConceptoContablePago = 60
'PrePólizaDetalle If FechaVencimiento = "".ToDate Or FechaVencimiento < "1900/01/01".ToDate Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Total, IIf(TipoDocto = "Fac", 5, 18).ToString().ToEntero(), Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For FechaVencimiento = Fecha
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, SubTotal, 6, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For End If
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDecimal, FechaVencimiento,
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total, CveSubProyecto:=CveSubProyecto) Then
ErrorCompras = True
Exit For
End If
CveCompra = ObjCompras.CveCompra
If IVA > 0 Then 'Compra Detalle
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, Sucursal.ToEntero(), -1, 0, 1, SubTotal, 0.16D, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA.ToDecimal, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then
End If ErrorCompras = True
Exit For
End If
Dim ConceptoContablePago As Integer = 17
If TipoDocto = "NC" Then ConceptoContablePago = 60
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For 'PrePólizaDetalle
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total, Total, IIf(TipoDocto = "Fac", 5, 18).ToString().ToEntero(), Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, SubTotal, 6, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, RetIVA, 15, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For If IVA > 0 Then
If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetISR, RetISR, 16, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For
If ImpuestosLocales > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImpuestosLocales, ImpuestosLocales, 27, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For End If
'Saldo If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
If Saldo < Total Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Total - Saldo, Total - Saldo, 17, $"{Folio} SALDO INICIAL", Folio, CveCompra:=CveCompra, CveProveedor:=CveProveedor) Then ErrorCompras = True : Exit For If RetIVA > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetIVA, RetIVA, 15, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Total - Saldo, Total - Saldo, 95, $"{Folio} SALDO INICIAL", Folio, CveCompra:=CveCompra, CveProveedor:=CveProveedor) Then ErrorCompras = True : Exit For If RetISR > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, RetISR, RetISR, 16, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
End If If ImpuestosLocales > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImpuestosLocales, ImpuestosLocales, 27, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
Encontrados = Encontrados + 1
'Saldo
If Saldo < Total Then
End If
Encontrados = Encontrados + 1
Next
If Not ErrorCompras Then
Next
Catch ex As Exception
OnError("Ocurrió un error al cargar los datos", ex)
ErrorCompras = True
End Try
Next
If Not ErrorCompras Then If Not ErrorCompras Then
If Contador > 0 Then If Contador > 0 Then
Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.<br>Se Omitieron: <b>{1}</b> Compras ya que ya se encuentran registradas.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion) Alert(String.Format("Se agregaron: <b>{0}</b> Compras correctamente.<br>Se Omitieron: <b>{1}</b> Compras ya que ya se encuentran registradas.", NumRows - Contador, Contador), TipoMensaje.MsgInformacion)

View File

@@ -16282,32 +16282,33 @@ Partial Class Ventas
OnError("Ocurrió un error al enviar el PDF", ex) OnError("Ocurrió un error al enviar el PDF", ex)
End Try End Try
If ObjFactura.TipoDocto = "Ing" AndAlso ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "07" Then 'SE COMENTA PORQUE SE GENERA LA NOTA DE CREDITO CON LOS IMPORTES DE LA VENTA
CreaObjetosVentaAmortizacion(Nothing, ObjTimbrado.UUID, ObjFactura.CveVentaRelacion, CveVenta) 'If ObjFactura.TipoDocto = "Ing" AndAlso ObjFactura.Timbre.CFDIRelacionados.TipoRelacion = "07" Then
For Each Gvr As GridViewRow In GvAntNC.Rows ' CreaObjetosVentaAmortizacion(Nothing, ObjTimbrado.UUID, ObjFactura.CveVentaRelacion, CveVenta)
If Gvr.DataKey("FolioFiscal").ToString() = "" AndAlso Gvr.DataKey("TipoDocto") = "Egs" Then ' For Each Gvr As GridViewRow In GvAntNC.Rows
ObjFacturaDevolucion.CveVenta = Gvr.DataKey("CveVenta").ToEntero() ' If Gvr.DataKey("FolioFiscal").ToString() = "" AndAlso Gvr.DataKey("TipoDocto") = "Egs" Then
ObjFacturaDevolucion.Serie = Gvr.DataKey("Serie").ToString() ' ObjFacturaDevolucion.CveVenta = Gvr.DataKey("CveVenta").ToEntero()
ObjFacturaDevolucion.Folio = Gvr.DataKey("Folio").ToEntero() ' ObjFacturaDevolucion.Serie = Gvr.DataKey("Serie").ToString()
ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion) ' ObjFacturaDevolucion.Folio = Gvr.DataKey("Folio").ToEntero()
End If ' ObjFacturaDevolucion.Timbre = PreParaTimbre(ObjFacturaDevolucion)
Exit For ' End If
Next ' Exit For
If ObjFacturaDevolucion.CveVenta.ToEntero() > 0 Then ' Next
Dim Obj2 As New List(Of Object) ' If ObjFacturaDevolucion.CveVenta.ToEntero() > 0 Then
Obj2.Add(ObjFacturaDevolucion) ' Dim Obj2 As New List(Of Object)
If Not IsNothing(Obj2) AndAlso Obj2.Count > 0 Then ' Obj2.Add(ObjFacturaDevolucion)
Dim ofa As Modelos.Factura = CType(Obj2(0), Modelos.Factura) ' If Not IsNothing(Obj2) AndAlso Obj2.Count > 0 Then
ofa.Timbre.CFDIRelacionados.UUID.Clear() ' Dim ofa As Modelos.Factura = CType(Obj2(0), Modelos.Factura)
ofa.Timbre.CFDIRelacionados.UUID.Add(ObjTimbrado.UUID) ' ofa.Timbre.CFDIRelacionados.UUID.Clear()
If ObjTimbrado.TimbrarFactura(UsuarioActual, ofa) Then ' ofa.Timbre.CFDIRelacionados.UUID.Add(ObjTimbrado.UUID)
MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se timbro correctamente.<br/><br/>", ofa.TipoDocumento, ofa.SerieFolio)) ' If ObjTimbrado.TimbrarFactura(UsuarioActual, ofa) Then
Else ' MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> se timbro correctamente.<br/><br/>", ofa.TipoDocumento, ofa.SerieFolio))
MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> no se timbro correctamente.<br/><br/>", ofa.TipoDocumento, ofa.SerieFolio)) ' Else
End If ' MensajeAlert.AppendFormat(String.Format("<br/>La {0}: <b>{1}</b> no se timbro correctamente.<br/><br/>", ofa.TipoDocumento, ofa.SerieFolio))
End If ' End If
End If ' End If
End If ' End If
'End If
'NOTIFICACION DE SMS 'NOTIFICACION DE SMS