merge - ClsPaginas

This commit is contained in:
2022-06-04 18:47:29 -07:00
37 changed files with 1068 additions and 1423 deletions

View File

@@ -395,7 +395,7 @@ End Class
<Serializable> <Serializable>
Public Class CFDIRetenciones Public Class CFDIRetenciones
Public Property Impuesto As String Public Property Impuesto As String
Public Property Importe As Decimal Public Property Importe As Decimal = 0.000000D
Public Property TasaOCuota As String Public Property TasaOCuota As String
End Class End Class
@@ -417,11 +417,11 @@ End Class
<Serializable> <Serializable>
Public Class CFDITraslados Public Class CFDITraslados
Public Property Impuesto As String Public Property Impuesto As String
Public Property Tasa As Decimal Public Property Tasa As Decimal = 0.000000D
Public Property TipoFactor As String Public Property TipoFactor As String
Public Property TasaOCuota As Decimal Public Property TasaOCuota As Decimal = 0.000000D
Public Property Importe As Decimal Public Property Importe As Decimal = 0.000000D
Public Property Base As Decimal Public Property Base As Decimal = 0.000000D
End Class End Class
@@ -456,11 +456,11 @@ Public Class CFDIComplementoPagos
Public ReadOnly Property Totales As CFDIComplementoPagosTotales Public ReadOnly Property Totales As CFDIComplementoPagosTotales
Get Get
Dim tRetorno As New CFDIComplementoPagosTotales Dim tRetorno As New CFDIComplementoPagosTotales
tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagado).Sum() tRetorno.MontoTotalPagos = (From c In DocumentosRelacionados Select c.ImpPagado * TipoCambioP).Sum()
tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Base).Sum() tRetorno.TotalTrasladosBaseIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Base * TipoCambioP).Sum()
tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.Base).Sum() tRetorno.TotalTrasladosBaseIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.Base * TipoCambioP).Sum()
tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.Base).Sum() tRetorno.TotalTrasladosBaseIVA16 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.16 Select c.Base * TipoCambioP).Sum()
tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe).Sum() tRetorno.TotalTrasladosImpuestoIVA0 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0 Select c.Importe).Sum()
tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.Importe).Sum() tRetorno.TotalTrasladosImpuestoIVA8 = (From c In Traslados Where c.Impuesto = "002" And c.TasaOCuota = 0.08 Select c.Importe).Sum()

View File

@@ -1087,6 +1087,7 @@ Public Class ClsBancos
Dim Timbre As CFDITimbre = Nothing Dim Timbre As CFDITimbre = Nothing
Dim Timbrado As New Timbrado Dim Timbrado As New Timbrado
Dim CFDIVersion As String = "4.0"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
@@ -1100,6 +1101,7 @@ Public Class ClsBancos
UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado) UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado)
Else Else
CFDIVersion = "3.3"
Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal, Timbre = Timbrado.PreparaTimbrePago(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal,
RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago, RFCCliente, dr("NombreCliente").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago,
dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal,
@@ -1137,7 +1139,7 @@ Public Class ClsBancos
' Dim StrRetorno As String = Modelos.TimbrarFactura(Ventas, UsuarioActual) ' Dim StrRetorno As String = Modelos.TimbrarFactura(Ventas, UsuarioActual)
If SeTimbro Then If SeTimbro Then
If UpdateComplementoPago(tCveComplementoPago, ObjTimbrado.UUID, UsuarioActual.Empresa.CvePAC, UsuarioActual.CveEmpresa) Then If UpdateComplementoPago(tCveComplementoPago, ObjTimbrado.UUID, UsuarioActual.Empresa.CvePAC, CFDIVersion, UsuarioActual.CveEmpresa) Then
CveComplementoPago = tCveComplementoPago CveComplementoPago = tCveComplementoPago
Retorno = True Retorno = True
End If End If
@@ -1201,8 +1203,7 @@ Public Class ClsBancos
'End Function 'End Function
Public Function UpdateComplementoPago(CveComplementoPago As Integer, FolioFiscal As String, CvePAC As Integer, CveEmpresa As Integer, Optional Estatus As Integer = -1, Optional CvePACCancelacion As Integer = -1, Public Function UpdateComplementoPago(CveComplementoPago As Integer, FolioFiscal As String, CvePAC As Integer, CFDIVersion As String, CveEmpresa As Integer, Optional Estatus As Integer = -1) As Boolean
Optional FechaCancelacion As Date = MinFecha, Optional SelloCancelacion As String = "", Optional CveSATMotivoCancelacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Banc_ComplementoPagoUpdate") DataAdapter("PA_Banc_ComplementoPagoUpdate")
@@ -1213,11 +1214,37 @@ Public Class ClsBancos
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC .Add("@CvePAC", SqlDbType.Int).Value = CvePAC
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@Estatus", SqlDbType.Int).Value = Estatus .Add("@Estatus", SqlDbType.Int).Value = Estatus
.Add("@CFDIVersion", SqlDbType.VarChar).Value = CFDIVersion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al actualizar complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function UpdateComplementoPagoCancelado(CveComplementoPago As Integer, CveEstatus As Integer, CvePACCancelacion As Integer, CveEmpresa As Integer, FechaCancelacion As DateTime, SelloCancelacion As String, CveSATMotivoCancelacion As Integer) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_ComplementoPagoUpdateCancelado")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveComplementoPago", SqlDbType.Int).Value = CveComplementoPago
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion .Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion
.Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion .Add("@FechaCancelacion", SqlDbType.Date).Value = FechaCancelacion
.Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion .Add("@SelloCancelacion", SqlDbType.VarChar).Value = SelloCancelacion
.Add("@CveSATMotivoCancelacion", SqlDbType.Int).Value = CveSATMotivoCancelacion .Add("@CveSATMotivoCancelacion", SqlDbType.Int).Value = CveSATMotivoCancelacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With
Try Try
@@ -1227,7 +1254,7 @@ Public Class ClsBancos
If SelloCancelacion.Trim.Length > 0 Then If SelloCancelacion.Trim.Length > 0 Then
OnError($"Ocurrió un error al actualizar complemento de pago sello: {SelloCancelacion} ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError($"Ocurrió un error al actualizar complemento de pago sello: {SelloCancelacion} ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
Else Else
OnError("Ocurrió un error al actualizar complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) OnError("Ocurrió un error al cancelar estatus complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End If End If
End Try End Try
@@ -1235,29 +1262,6 @@ Public Class ClsBancos
Return Retorno Return Retorno
End Function End Function
Public Function UpdateComplementoPagoCancelado(CveComplementoPago As Integer, CveEstatus As Integer, CvePACCancelacion As Integer, CveEmpresa As Integer, FechaCancelacion As DateTime) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Banc_ComplementoPagoUpdateCancelado")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveComplementoPago", SqlDbType.Int).Value = CveComplementoPago
.Add("@CveEstatus", SqlDbType.Int).Value = CveEstatus
.Add("@CvePACCancelacion", SqlDbType.Int).Value = CvePACCancelacion
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@FechaCancelacion", SqlDbType.DateTime).Value = FechaCancelacion
End With
Try
SqlAdapter.Fill(Data)
Retorno = True
Catch ex As Exception
OnError("Ocurrió un error al cancelar estatus complemento de pago", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
End Try
Return Retorno
End Function
Public Function AddComplementoPagosSinc(cveUsuario As Int32, fechaInicio As String, cveEmpresa As Int32) As Boolean Public Function AddComplementoPagosSinc(cveUsuario As Int32, fechaInicio As String, cveEmpresa As Int32) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_AddComplementoPagosSinc", CommandType.StoredProcedure) DataAdapter("PA_AddComplementoPagosSinc", CommandType.StoredProcedure)

View File

@@ -3749,7 +3749,7 @@ Public Class ClsGenerales
End Function End Function
Public Function UpdateTimbreTimbrado(CveTimbre As Integer, FolioFiscal As String, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer, Public Function UpdateTimbreTimbrado(CveTimbre As Integer, FolioFiscal As String, Fecha As DateTime, CveUsuario As Integer, CveEmpresa As Integer,
CvePAC As Integer) As Boolean CvePAC As Integer, CFDIVersion As String) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Gral_TimbreTimbrado") DataAdapter("PA_Gral_TimbreTimbrado")
@@ -3759,6 +3759,7 @@ Public Class ClsGenerales
.Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal .Add("@FolioFiscal", SqlDbType.VarChar).Value = FolioFiscal
.Add("@Fecha", SqlDbType.DateTime).Value = Fecha .Add("@Fecha", SqlDbType.DateTime).Value = Fecha
.Add("@CvePAC", SqlDbType.Int).Value = CvePAC .Add("@CvePAC", SqlDbType.Int).Value = CvePAC
.Add("@CDFIVersion", SqlDbType.VarChar).Value = CFDIVersion
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
End With End With

View File

@@ -5600,7 +5600,13 @@ Public Class ClsInventarios
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al momento de insertar el nuevo camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
If ex.Message.Contains("UN_Inv_Camiones_CveEmpresa_Placa") Then
Alert("La Placa ya se encuentra registrada." & Almacen & ".", TipoMensaje.MsgAdvertencia)
Else
OnError("Ocurrió un error al momento de insertar el nuevo camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
End Try End Try
Return Retorno Return Retorno
End Function End Function
@@ -5654,7 +5660,15 @@ Public Class ClsInventarios
SqlAdapter.Fill(Data) SqlAdapter.Fill(Data)
Retorno = True Retorno = True
Catch ex As Exception Catch ex As Exception
OnError("Ocurrió un error al momento de actualizar el camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
If ex.Message.Contains("UN_Inv_Camiones_CveEmpresa_Placa") Then
Alert("La Placa ya se encuentra registrada." & Almacen & ".", TipoMensaje.MsgAdvertencia)
Else
OnError("Ocurrió un error al momento de actualizar el camion", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
End If
End Try End Try
Return Retorno Return Retorno
End Function End Function

View File

@@ -4853,8 +4853,7 @@ Public Class ClsPaginas
PaginaDict.Add("/Contabilidad2/RepCambiosSituacionFinanciera.aspx".ToUpper(), 585) PaginaDict.Add("/Contabilidad2/RepCambiosSituacionFinanciera.aspx".ToUpper(), 585)
PaginaDict.Add("/Contabilidad2/RepSituacionFinanciera.aspx".ToUpper(), 586) PaginaDict.Add("/Contabilidad2/RepSituacionFinanciera.aspx".ToUpper(), 586)
PaginaDict.Add("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 587) PaginaDict.Add("/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), 587)
' PaginaDict.Add("/Contabilidad2/RegPoliza.aspx".ToUpper(), 588)
'PaginaDict.Add("/Contabilidad2/PymeRegPoliza.aspx".ToUpper(), 588)
PaginaDict.Add("/Contabilidad2/RepAlmacenConta.aspx".ToUpper(), 539) PaginaDict.Add("/Contabilidad2/RepAlmacenConta.aspx".ToUpper(), 539)
PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensual.aspx".ToUpper(), 589) PaginaDict.Add("/Contabilidad2/RepAnexoCatalogoMensual.aspx".ToUpper(), 589)
@@ -5596,29 +5595,8 @@ Public Class ClsPaginas
PaginaDict.Add("/ZDG/MensajeManual.aspx".ToUpper(), -1) PaginaDict.Add("/ZDG/MensajeManual.aspx".ToUpper(), -1)
PaginaDict.Add("/ZDG/MensajeAutomatico.aspx".ToUpper(), -1) PaginaDict.Add("/ZDG/MensajeAutomatico.aspx".ToUpper(), -1)
'PymeCharlie
PaginaDict.Add("/PyME/Contabilidad/CatCuentas.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/TiposPoliza.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/PlantillasPolizas.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/PlantillasPolizasDetalle.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RegPoliza.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RegPrePoliza.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/ContabilizacionVentas.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/ContabilizacionCompras.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/ContabilidadElectronica.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/CierreEjercicio.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RepBalanceGeneral.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RepAnexoCatalogo.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RepMovimientosAuxiliaresCatalogo.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RepBalanzaComprobacion.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Contabilidad/RepEstadoResultados.aspx".ToUpper(), -1)
PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1) PaginaDict.Add("/Planeacion/Presupuestos.aspx".ToUpper(), -1)
'Pyme 2017
PaginaDict.Add("/PyME/Sistemas/RegistroEmpresa.aspx".ToUpper(), -1)
PaginaDict.Add("/PyME/Sistemas/WizardRegistro.aspx".ToUpper(), -1)
PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1) PaginaDict.Add("/Contabilidad/OCDetalleAlmacen.aspx".ToUpper(), -1)
@@ -6023,7 +6001,7 @@ Public Class ClsPaginas
RutaReporte = String.Format("{0}{1}", bdir, RutaReporte) RutaReporte = String.Format("{0}{1}", bdir, RutaReporte)
End If End If
If EsProduccion Then If EsProduccion AndAlso SubReportData Is Nothing Then
Dim wsreport As New WSRDLC.WebServiceSoapClient Dim wsreport As New WSRDLC.WebServiceSoapClient
Dim params As New List(Of WSRDLC.ReportParameter) Dim params As New List(Of WSRDLC.ReportParameter)
@@ -7173,7 +7151,7 @@ Public Class ClsPaginas
End If End If
'Si no tiene CBB, SE GENERA 'Si no tiene CBB, SE GENERA
If Not ImagenCBB.Exists AndAlso Vta.CveCliente.ToEntero > 0 Then If Not ImagenCBB.Exists AndAlso Vta.FolioFiscal <> "" Then
Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar() Dim CBB As New ClbNegBICFDv3_2.ClsNegCBBGenerar()
CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total, Vta.FolioFiscal, RutaCBB) CBB.GenerarCBB(UsuarioActual.Empresa.RFC, RFCReceptor, Vta.Total, Vta.FolioFiscal, RutaCBB)
End If End If
@@ -8846,9 +8824,17 @@ Public Class ClsPaginas
#End Region #End Region
#Region "PDF PAGOS" #Region "PDF PAGOS"
Private Function ValorXML(n As XmlNode, Campo As String, Optional Retorno As String = "") As String
Dim o As XmlNode = n.Attributes.Cast(Of XmlAttribute)().SingleOrDefault(Function(a) String.Compare(a.Name, Campo, True) = 0)
If o Is Nothing Then
Return Retorno
Else
Return o.Value
End If
End Function
Public Sub PDFReciboDePagos(CveVenta As Integer, CveIE As Integer, CveComplementoPago As Integer, Optional imprimir As Boolean = True) Public Sub PDFReciboDePagos(CveVenta As Integer, CveIE As Integer, CveComplementoPago As Integer, Optional imprimir As Boolean = True)
Dim ObjBancos As New ClsBancos Dim ObjBancos As New ClsBancos
Dim ObjClientes As New ClsClientes Dim ObjClientes As New ClsClientes
Dim params As New List(Of ReportParameter) Dim params As New List(Of ReportParameter)
@@ -8899,6 +8885,7 @@ Public Class ClsPaginas
DTConceptosPagoRelacionado.Columns.Add("MetodoDePagoDR", GetType(String)) DTConceptosPagoRelacionado.Columns.Add("MetodoDePagoDR", GetType(String))
DTConceptosPagoRelacionado.Columns.Add("MonedaDR", GetType(String)) DTConceptosPagoRelacionado.Columns.Add("MonedaDR", GetType(String))
DTConceptosPagoRelacionado.Columns.Add("TipoCambioDR", GetType(String)) DTConceptosPagoRelacionado.Columns.Add("TipoCambioDR", GetType(String))
DTConceptosPagoRelacionado.Columns.Add("ObjetoImpDR", GetType(String))
If ObjBancos.GetComplementoPagos(CveComplementoPago, CveIE, CveVenta, UsuarioActual.CveEmpresa) Then If ObjBancos.GetComplementoPagos(CveComplementoPago, CveIE, CveVenta, UsuarioActual.CveEmpresa) Then
@@ -8945,28 +8932,46 @@ Public Class ClsPaginas
Dim ImagenCBB As String = $"file://{Ruta}CBB\{Serie}-{Folio}.jpg" Dim ImagenCBB As String = $"file://{Ruta}CBB\{Serie}-{Folio}.jpg"
If File.Exists(PathXML) Then If File.Exists(PathXML) Then
Dim XmlDoc As New System.Xml.XmlDocument Dim XmlDoc As New System.Xml.XmlDocument
XmlDoc.Load(PathXML) XmlDoc.Load(PathXML)
Dim Version = ValorXML(XmlDoc.DocumentElement, "version")
Dim namespaces As New XmlNamespaceManager(XmlDoc.NameTable)
Dim Prefijo As String = If(XmlDoc.DocumentElement.Prefix = "", "cfd", XmlDoc.DocumentElement.Prefix)
Dim cfdVer As String = ""
Dim PagoVersion As String = "pago20"
Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento") Dim validaElemento = XmlDoc.DocumentElement("cfdi:Complemento")
Dim validaElementoPago = XmlDoc.DocumentElement("cfdi:Conceptos") Dim validaElementoPago = XmlDoc.DocumentElement("cfdi:Conceptos")
If Version = "3.3" Then
cfdVer = "http://www.sat.gob.mx/cfd/3"
namespaces.AddNamespace("pago10", "http://www.sat.gob.mx/Pagos10")
PagoVersion = "pago10"
Else ' se considera que es la version 4.0
cfdVer = "http://www.sat.gob.mx/cfd/4"
namespaces.AddNamespace("pago20", "http://www.sat.gob.mx/Pagos20")
End If
namespaces.AddNamespace(Prefijo, cfdVer)
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
namespaces.AddNamespace("registrofiscal", "http://www.sat.gob.mx/registrofiscal")
'Datos Fiscales 'Datos Fiscales
If Not IsNothing(validaElemento) Then If Not IsNothing(validaElemento) Then
For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Count - 1 Dim nodetfd As XmlNode = XmlDoc.SelectSingleNode(String.Format("{0}:Comprobante/{0}:Complemento/tfd:TimbreFiscalDigital", Prefijo), namespaces)
If XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Name = "tfd:TimbreFiscalDigital" Then If nodetfd Is Nothing Then
FolioFiscal = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("UUID").InnerText FolioFiscal = nodetfd.Attributes("UUID").InnerText
NoSerieCertificado = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("NoCertificadoSAT").InnerText NoSerieCertificado = nodetfd.Attributes("NoCertificadoSAT").InnerText
FechaCertificacion = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("FechaTimbrado").InnerText FechaCertificacion = nodetfd.Attributes("FechaTimbrado").InnerText
SelloCFDi = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloCFD").InnerText SelloCFDi = nodetfd.Attributes("SelloCFD").InnerText
SelloSAT = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes(i).Attributes("SelloSAT").InnerText SelloSAT = nodetfd.Attributes("SelloSAT").InnerText
End If End If
Next
End If End If
'Pago 'Pago10
If Not IsNothing(validaElemento) Then If Version = "3.3" AndAlso Not IsNothing(validaElemento) Then
Dim PagosChild = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Pagos", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault() Dim PagosChild = XmlDoc.DocumentElement("cfdi:Complemento").ChildNodes.Cast(Of XmlNode).Where(Function(a) a.LocalName.Equals("Pagos", StringComparison.CurrentCultureIgnoreCase)).FirstOrDefault()
For Each Pagos As XmlNode In PagosChild.ChildNodes For Each Pagos As XmlNode In PagosChild.ChildNodes
@@ -9012,17 +9017,74 @@ Public Class ClsPaginas
End If End If
If Not IsNothing(validaElementoPago) Then 'Pago20
For i As Integer = 0 To XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes.Count - 1 If Version = "4.0" Then
If XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Name = "cfdi:Concepto" Then Dim nodePagos As XmlNodeList
Importe = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Importe").InnerText nodePagos = XmlDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Complemento/pago20:Pagos/pago20:Pago", Prefijo), namespaces)
PU = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ValorUnitario").InnerText
Descripcion = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Descripcion").InnerText For Each Pagos As XmlNode In nodePagos
CveUnidad = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ClaveUnidad").InnerText If Version = "4.0" AndAlso Pagos.Name = "pago20:Totales" Then
Cantidad = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("Cantidad").InnerText Dim a As String = "a"
CvePS = XmlDoc.DocumentElement("cfdi:Conceptos").ChildNodes(i).Attributes("ClaveProdServ").InnerText Else
Dim Dr As DataRow = DTConceptosPago.NewRow
If Not Pagos.Attributes("CtaOrdenante") Is Nothing Then Dr("CtaOrdenante") = Pagos.Attributes("CtaOrdenante").Value Else Dr("CtaOrdenante") = ""
If Not Pagos.Attributes("TipoCambioP") Is Nothing Then Dr("TipoCambioP") = Pagos.Attributes("TipoCambioP").Value Else Dr("TipoCambioP") = ""
If Not Pagos.Attributes("RfcEmisorCtaOrd") Is Nothing Then
Dr("RfcEmisorCtaOrd") = Pagos.Attributes("RfcEmisorCtaOrd").Value
RFCOrdenante = Pagos.Attributes("RfcEmisorCtaOrd").Value
Else
Dr("RfcEmisorCtaOrd") = ""
End If
Dr("Monto") = Pagos.Attributes("Monto").Value
Dr("MonedaP") = Pagos.Attributes("MonedaP").Value
Dr("FormaDePagoP") = GlobalDTVtaFormaPago.FiltroPrimeroValor("FormaPagoSAT", $"ClaveFormaPagoSAT= '{Pagos.Attributes("FormaDePagoP").Value}'")
Dr("FechaPago") = Pagos.Attributes("FechaPago").Value
FechaRecibo = Pagos.Attributes("FechaPago").Value
TotalLetra = Pagos.Attributes("Monto").Value.ToString.ToDouble.Texto2Letras(CveMoneda)
DTConceptosPago.Rows.Add(Dr)
For Each Relacionado As XmlNode In Pagos.SelectNodes(String.Format("//{0}:DoctoRelacionado", PagoVersion), namespaces)
Dim DrRelacionado As DataRow = DTConceptosPagoRelacionado.NewRow
If Not Relacionado.Attributes("Folio") Is Nothing Then DrRelacionado("Folio") = Relacionado.Attributes("Folio").Value Else DrRelacionado("Folio") = ""
If Not Relacionado.Attributes("Serie") Is Nothing Then DrRelacionado("Serie") = Relacionado.Attributes("Serie").Value Else DrRelacionado("Serie") = ""
If Not Relacionado.Attributes("TipoCambioDR") Is Nothing Then DrRelacionado("TipoCambioDR") = Relacionado.Attributes("TipoCambioDR").Value Else DrRelacionado("TipoCambioDR") = ""
DrRelacionado("IdDocumento") = Relacionado.Attributes("IdDocumento").Value
DrRelacionado("ImpPagado") = Relacionado.Attributes("ImpPagado").Value
DrRelacionado("ImpSaldoAnt") = Relacionado.Attributes("ImpSaldoAnt").Value
DrRelacionado("NumParcialidad") = Relacionado.Attributes("NumParcialidad").Value
' If Version = "3.3" Then DrRelacionado("MetodoDePagoDR") = Relacionado.Attributes("MetodoDePagoDR").Value
If Version = "4.0" Then DrRelacionado("ObjetoImpDR") = Relacionado.Attributes("ObjetoImpDR").Value
DrRelacionado("MonedaDR") = Relacionado.Attributes("MonedaDR").Value
DTConceptosPagoRelacionado.Rows.Add(DrRelacionado)
Next
End If End If
Next Next
End If
If Not IsNothing(validaElementoPago) Then
Dim nodeconceptos As XmlNode = XmlDoc.SelectSingleNode(String.Format("//{0}:Comprobante/{0}:Conceptos", Prefijo), namespaces)
If nodeconceptos.HasChildNodes Then
Dim nodeconcepto As XmlNode = nodeconceptos.ChildNodes(0)
Importe = nodeconcepto.Attributes("Importe").InnerText
PU = nodeconcepto.Attributes("ValorUnitario").InnerText
Descripcion = nodeconcepto.Attributes("Descripcion").InnerText
CveUnidad = nodeconcepto.Attributes("ClaveUnidad").InnerText
Cantidad = nodeconcepto.Attributes("Cantidad").InnerText
CvePS = nodeconcepto.Attributes("ClaveProdServ").InnerText
End If
End If End If
Dim CadenaOriginal As String = $"||1.0| {FolioFiscal} | {FechaCertificacion.ToDate.ToShortDateString} T {FechaCertificacion.ToDateTime.ToShortTimeString} | {SelloCFDi} | {NoSerieCertificado} ||" Dim CadenaOriginal As String = $"||1.0| {FolioFiscal} | {FechaCertificacion.ToDate.ToShortDateString} T {FechaCertificacion.ToDateTime.ToShortTimeString} | {SelloCFDi} | {NoSerieCertificado} ||"
@@ -9060,32 +9122,21 @@ Public Class ClsPaginas
'LOGO 'LOGO
Dim LogoRuta As String = "" Dim LogoRuta As String = ""
'LogoRuta = String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta)
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
If Imagen.Exists Then If Imagen.Exists Then ''POR EMPRESA
'If File.Exists(LogoRuta) Then
' LogoRuta = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
'End If
''POR EMPRESA
params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}")) params.Add(New ReportParameter("LogoPath", $"file://{Imagen.FullName}"))
Else Else
params.Add(New ReportParameter("LogoPath", "")) params.Add(New ReportParameter("LogoPath", ""))
End If End If
If File.Exists($"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc") Then If File.Exists($"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc") Then
rutaArchivo = $"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc" rutaArchivo = $"{UsuarioActual.Empresa.Ruta}Formatos\ReciboDePago.rdlc"
Else Else
rutaArchivo = " \Empresas\Grales\Formatos\ReciboDePago.rdlc" rutaArchivo = " \Empresas\Grales\Formatos\ReciboDePago.rdlc"
End If End If
If Not Directory.Exists($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\") Then If Not Directory.Exists($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\") Then Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\")
Directory.CreateDirectory($"{UsuarioActual.Empresa.Ruta}\PDF\Pag\")
End If
Dim ArchivoPDF As New System.IO.FileInfo($"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf") Dim ArchivoPDF As New System.IO.FileInfo($"{Ruta}PDF\Pag\{Serie}-{Folio}.pdf")
If ArchivoPDF.Exists Then If ArchivoPDF.Exists Then
@@ -9109,6 +9160,7 @@ Public Class ClsPaginas
ObjClientes.Dispose() ObjClientes.Dispose()
End Sub End Sub
#End Region #End Region
Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos", Optional DdlSubProyectoMultiple As ListBox = Nothing) Public Sub CargarCentrosDeCosto(DdlProyecto As DropDownList, DdlSubProyecto As DropDownList, LthProyectoP As Label, LblSubProyecto As Label, Optional AplicaTodos As String = "Todos", Optional DdlSubProyectoMultiple As ListBox = Nothing)

View File

@@ -2675,7 +2675,7 @@ Public Class ClsVentas
#End Region #End Region
#Region " I M P U E S T O S L O C A L E S" #Region " I M P U E S T O S L O C A L E S"
Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Public Function AddImpuestosLocales(ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ImpuestosLocalesAdd") DataAdapter("PA_Vta_ImpuestosLocalesAdd")
@@ -2688,6 +2688,9 @@ Public Class ClsVentas
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
End With End With
Try Try
@@ -2717,7 +2720,7 @@ Public Class ClsVentas
Return Retorno Return Retorno
End Function End Function
Public Function UpdateImpuestosLocales(CveImpuestoLocal As Integer, ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer) As Boolean Public Function UpdateImpuestosLocales(CveImpuestoLocal As Integer, ImpuestoLocal As String, Porcentaje As Decimal, Orden As Integer, TipoImpuesto As Integer, Estatus As Integer, IdCtaContable As Integer, Optional CveClasificacion As Integer = -1) As Boolean
Dim Retorno As Boolean = False Dim Retorno As Boolean = False
DataAdapter("PA_Vta_ImpuestosLocalesUpdate") DataAdapter("PA_Vta_ImpuestosLocalesUpdate")
@@ -2729,6 +2732,7 @@ Public Class ClsVentas
.Add("@Orden", SqlDbType.Int).Value = Orden .Add("@Orden", SqlDbType.Int).Value = Orden
.Add("@Estatus", SqlDbType.Bit).Value = Estatus .Add("@Estatus", SqlDbType.Bit).Value = Estatus
.Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable .Add("@IdCtaContable", SqlDbType.Int).Value = IdCtaContable
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
End With End With
Try Try
@@ -4850,14 +4854,14 @@ Public Class ClsVentas
End Try End Try
Return retorno Return retorno
End Function End Function
Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Integer, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer, CveEmpresa As Integer) As Boolean Public Function AddMetasVendedores(CveVendedor As Integer, MesAño As Date, CveMarca As Integer, MetaCantidad As Decimal, MetaImporte As Decimal, CveClasificacion As Integer, CveClasificacionSup As Integer, CveEmpresa As Integer) As Boolean
Dim retorno As Boolean = False Dim retorno As Boolean = False
DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure) DataAdapter("PA_Vta_MetasVendedoresAdd", CommandType.StoredProcedure)
With SqlAdapter.SelectCommand.Parameters With SqlAdapter.SelectCommand.Parameters
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
.Add("@MesAño", SqlDbType.DateTime).Value = MesAño .Add("@MesAño", SqlDbType.DateTime).Value = MesAño
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca .Add("@CveMarca", SqlDbType.Int).Value = CveMarca
.Add("@MetaCantidad", SqlDbType.Int).Value = MetaCantidad .Add("@MetaCantidad", SqlDbType.SmallMoney).Value = MetaCantidad
.Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte .Add("@MetaImporte", SqlDbType.Decimal).Value = MetaImporte
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion .Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
.Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup .Add("@CveClasificacionSup", SqlDbType.Int).Value = CveClasificacionSup

View File

@@ -3905,7 +3905,7 @@ Namespace Modelos
Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble() Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble()
Dim Serie As String = RowGarantia("Comprobante").ToString Dim Serie As String = RowGarantia("Comprobante").ToString
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=RowGarantia("CveVentaDetalle").ToString.ToEntero) Then If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=IIf(RowGarantia("MismoCvePS").ToString = "1", RowGarantia("CveVentaDetalle"), -1).ToString.ToEntero) Then
OcurrioError = True OcurrioError = True
Exit For Exit For
End If End If

View File

@@ -2832,7 +2832,7 @@ Public Class Timbrado
Case "T" Case "T"
Dim objGrales As New ClsGenerales Dim objGrales As New ClsGenerales
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC) Then If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC, "3.3") Then
Retorno = "" Retorno = ""
Else Else
Retorno = "Error" Retorno = "Error"
@@ -3833,7 +3833,7 @@ Public Class Timbrado
y += 1 y += 1
Next Next
comprobante.Impuestos.TotalImpuestosTrasladados = ObjCFDITimbre.TotalImpuestosTrasladados comprobante.Impuestos.TotalImpuestosTrasladados = ObjCFDITimbre.TotalImpuestosTrasladados.RoundSQL(6)
comprobante.Impuestos.TotalImpuestosTrasladadosSpecified = True comprobante.Impuestos.TotalImpuestosTrasladadosSpecified = True
If ObjCFDITimbre.TotalImpuestosRetenidos > 0 Then If ObjCFDITimbre.TotalImpuestosRetenidos > 0 Then
@@ -3940,8 +3940,8 @@ Public Class Timbrado
End If End If
ComExt.Emisor.Domicilio.MunicipioSpecified = True ComExt.Emisor.Domicilio.MunicipioSpecified = True
ComExt.Emisor.Domicilio.Municipio = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio ComExt.Emisor.Domicilio.Municipio = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Municipio
ComExt.Emisor.Domicilio.NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior <> "" Then ComExt.Emisor.Domicilio.NumeroExterior = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroExterior
ComExt.Emisor.Domicilio.NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior <> "" Then ComExt.Emisor.Domicilio.NumeroInterior = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.NumeroInterior
ComExt.Emisor.Domicilio.Pais = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais ComExt.Emisor.Domicilio.Pais = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Pais
If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia <> "" Then If ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia <> "" Then
ComExt.Emisor.Domicilio.Referencia = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia ComExt.Emisor.Domicilio.Referencia = ObjCFDITimbre.Complementos.ComercioExterior11.Emisor.Referencia
@@ -4108,19 +4108,19 @@ Public Class Timbrado
Dim Totales As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosTotales() Dim Totales As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosTotales()
'Totales Generales 'Totales Generales
Totales.MontoTotalPagos = ObjCFDITimbre.ComplementoPagos.Totales.MontoTotalPagos Totales.MontoTotalPagos = ObjCFDITimbre.ComplementoPagos.Totales.MontoTotalPagos.RoundSQL
Totales.TotalTrasladosBaseIVA16 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA16 Totales.TotalTrasladosBaseIVA16 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA16.RoundSQL
Totales.TotalTrasladosBaseIVA16Specified = Totales.TotalTrasladosBaseIVA16 > 0 Totales.TotalTrasladosBaseIVA16Specified = Totales.TotalTrasladosBaseIVA16 > 0
Totales.TotalTrasladosImpuestoIVA16 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA16.RoundSQL Totales.TotalTrasladosImpuestoIVA16 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosImpuestoIVA16.RoundSQL
Totales.TotalTrasladosImpuestoIVA16Specified = Totales.TotalTrasladosBaseIVA16 > 0 Totales.TotalTrasladosImpuestoIVA16Specified = Totales.TotalTrasladosBaseIVA16 > 0
Totales.TotalTrasladosBaseIVA8 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA8 Totales.TotalTrasladosBaseIVA8 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA8.RoundSQL
Totales.TotalTrasladosBaseIVA8Specified = Totales.TotalTrasladosBaseIVA8 > 0 Totales.TotalTrasladosBaseIVA8Specified = Totales.TotalTrasladosBaseIVA8 > 0
Totales.TotalTrasladosImpuestoIVA8 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA8.RoundSQL Totales.TotalTrasladosImpuestoIVA8 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA8.RoundSQL
Totales.TotalTrasladosImpuestoIVA8Specified = Totales.TotalTrasladosBaseIVA8 > 0 Totales.TotalTrasladosImpuestoIVA8Specified = Totales.TotalTrasladosBaseIVA8 > 0
Totales.TotalTrasladosBaseIVA0 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA0 Totales.TotalTrasladosBaseIVA0 = ObjCFDITimbre.ComplementoPagos.Totales.TotalTrasladosBaseIVA0.RoundSQL
Totales.TotalTrasladosBaseIVA0Specified = Totales.TotalTrasladosBaseIVA0 > 0 Totales.TotalTrasladosBaseIVA0Specified = Totales.TotalTrasladosBaseIVA0 > 0
Totales.TotalTrasladosImpuestoIVA0 = 0 Totales.TotalTrasladosImpuestoIVA0 = 0
Totales.TotalTrasladosImpuestoIVA0Specified = Totales.TotalTrasladosBaseIVA0 > 0 Totales.TotalTrasladosImpuestoIVA0Specified = Totales.TotalTrasladosBaseIVA0 > 0
@@ -4150,26 +4150,6 @@ Public Class Timbrado
If doc.Impuestos IsNot Nothing Then If doc.Impuestos IsNot Nothing Then
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDR ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDR
''traslados
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then
Dim j As Integer = 0
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "T")
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.TrasladosDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR(doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "T").Count - 1) {}
If docimp.TrasladooRetencion = "T" Then
Dim Tra As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR
Tra.BaseDR = docimp.Base
Tra.ImporteDRSpecified = True
Tra.ImporteDR = docimp.Importe
Tra.ImpuestoDR = docimp.Impuesto
Tra.TipoFactorDR = docimp.TipoFactor
Tra.TasaOCuotaDRSpecified = True
Tra.TasaOCuotaDR = docimp.TasaOCuota
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.TrasladosDR(j) = Tra
End If
j += 1
Next
End If
''retenciones ''retenciones
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
@@ -4178,36 +4158,41 @@ Public Class Timbrado
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.RetencionesDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRRetencionDR(doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "R").Count - 1) {} ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.RetencionesDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRRetencionDR(doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "R").Count - 1) {}
If docimp.TrasladooRetencion = "R" Then If docimp.TrasladooRetencion = "R" Then
Dim Tra As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRRetencionDR Dim Tra As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRRetencionDR
Tra.BaseDR = docimp.Base Tra.BaseDR = docimp.Base.RoundSQL(6)
Tra.ImporteDR = docimp.Importe Tra.ImporteDR = docimp.Importe.RoundSQL(6)
Tra.ImpuestoDR = docimp.Impuesto Tra.ImpuestoDR = docimp.Impuesto
Tra.TipoFactorDR = docimp.TipoFactor Tra.TipoFactorDR = docimp.TipoFactor
Tra.TasaOCuotaDR = docimp.TasaOCuota Tra.TasaOCuotaDR = docimp.TasaOCuota.RoundSQL(6)
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.RetencionesDR(j) = Tra ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.RetencionesDR(j) = Tra
End If End If
j += 1 j += 1
Next Next
End If End If
''traslados
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then
Dim j As Integer = 0
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "T")
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.TrasladosDR = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR(doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "T").Count - 1) {}
If docimp.TrasladooRetencion = "T" Then
Dim Tra As New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoDoctoRelacionadoImpuestosDRTrasladoDR
Tra.BaseDR = docimp.Base.RoundSQL(6)
Tra.ImporteDRSpecified = True
Tra.ImporteDR = docimp.Importe.RoundSQL(6)
Tra.ImpuestoDR = docimp.Impuesto
Tra.TipoFactorDR = docimp.TipoFactor
Tra.TasaOCuotaDRSpecified = True
Tra.TasaOCuotaDR = docimp.TasaOCuota.RoundSQL(6)
ComPag.Pago(0).DoctoRelacionado(i).ImpuestosDR.TrasladosDR(j) = Tra
End If
j += 1
Next
End If
End If End If
i += 1 i += 1
Next Next
If ObjCFDITimbre.ComplementoPagos.Traslados.Count > 0 Then
Dim x As Integer
ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {}
ComPag.Pago(0).ImpuestosP(0) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP()
ComPag.Pago(0).ImpuestosP(0).TrasladosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP((ObjCFDITimbre.ComplementoPagos.Traslados).Count - 1) {}
For Each Tra As CFDITraslados In (ObjCFDITimbre.ComplementoPagos.Traslados)
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP()
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImpuestoP = Tra.Impuesto
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TipoFactorP = Tra.TipoFactor
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TasaOCuotaP = Tra.TasaOCuota
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.Importe
ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).BaseP = Tra.Base
x += 1
Next
End If
If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 Then If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 Then
Dim x As Integer Dim x As Integer
If ComPag.Pago(0).ImpuestosP(0) Is Nothing Then ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {} If ComPag.Pago(0).ImpuestosP(0) Is Nothing Then ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {}
@@ -4220,41 +4205,59 @@ Public Class Timbrado
Next Next
End If End If
If ObjCFDITimbre.ComplementoPagos.Traslados.Count > 0 Then
''Estos impuestos aplicarían para anticipos Dim x As Integer
'If ObjCFDITimbre.ComplementoPagos.tota > 0 OrElse ObjCFDITimbre.ComplementoPagos.TotalImpuestosTrasladados > 0 Then ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {}
' ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {} ComPag.Pago(0).ImpuestosP(0) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP()
' ComPag.Pago(0).ImpuestosP(0) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP() ComPag.Pago(0).ImpuestosP(0).TrasladosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP((ObjCFDITimbre.ComplementoPagos.Traslados).Count - 1) {}
For Each Tra As CFDITraslados In (ObjCFDITimbre.ComplementoPagos.Traslados)
' If (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then ComPag.Pago(0).ImpuestosP(0).TrasladosP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP()
' Dim x As Integer ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImpuestoP = Tra.Impuesto
' ComPag.Pago(0).ImpuestosP(0).TrasladosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP((ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "T").Count - 1) {} ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TipoFactorP = Tra.TipoFactor
' For Each Tra As CFDIConceptosImpuestos In (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "T") ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TasaOCuotaP = Tra.TasaOCuota.RoundSQL(6)
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP() ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.Importe.RoundSQL(6)
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImpuestoP = Tra.Impuesto ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).BaseP = Tra.Base.RoundSQL(6)
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TipoFactorP = Tra.TipoFactor x += 1
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TasaOCuotaP = Tra.TasaOCuota Next
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.Importe End If
' x += 1
' Next
' End If
' If (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
' Dim x As Integer
' ComPag.Pago(0).ImpuestosP(0).RetencionesP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPRetencionP((ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "R").Count - 1) {}
' For Each Ret As CFDIConceptosImpuestos In (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "R")
' ComPag.Pago(0).ImpuestosP(0).RetencionesP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPRetencionP()
' ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImpuestoP = Ret.Impuesto
' ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImporteP = Ret.Importe
' x += 1
' Next
' End If
'End If
Dim nsComp As New System.Xml.Serialization.XmlSerializerNamespaces() ''Estos impuestos aplicarían para anticipos
'If ObjCFDITimbre.ComplementoPagos.tota > 0 OrElse ObjCFDITimbre.ComplementoPagos.TotalImpuestosTrasladados > 0 Then
' ComPag.Pago(0).ImpuestosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP(0) {}
' ComPag.Pago(0).ImpuestosP(0) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosP()
' If (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then
' Dim x As Integer
' ComPag.Pago(0).ImpuestosP(0).TrasladosP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP((ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "T").Count - 1) {}
' For Each Tra As CFDIConceptosImpuestos In (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "T")
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPTrasladoP()
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImpuestoP = Tra.Impuesto
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TipoFactorP = Tra.TipoFactor
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).TasaOCuotaP = Tra.TasaOCuota
' ComPag.Pago(0).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.Importe
' x += 1
' Next
' End If
' If (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
' Dim x As Integer
' ComPag.Pago(0).ImpuestosP(0).RetencionesP = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPRetencionP((ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "R").Count - 1) {}
' For Each Ret As CFDIConceptosImpuestos In (ObjCFDITimbre.ComplementoPagos.Impuestos).Where(Function(w) w.TrasladooRetencion = "R")
' ComPag.Pago(0).ImpuestosP(0).RetencionesP(x) = New Profact.TimbraCFDI40.Complementos.Pagos20.PagosPagoImpuestosPRetencionP()
' ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImpuestoP = Ret.Impuesto
' ComPag.Pago(0).ImpuestosP(0).RetencionesP(x).ImporteP = Ret.Importe
' x += 1
' Next
' End If
'End If
Dim nsComp As New System.Xml.Serialization.XmlSerializerNamespaces()
nsComp.Add("pago20", "http://www.sat.gob.mx/Pagos20") nsComp.Add("pago20", "http://www.sat.gob.mx/Pagos20")
Dim xmlComp As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(ComPag, GetType(Profact.TimbraCFDI40.Complementos.Pagos20.Pagos), nsComp) Dim xmlComp As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(ComPag, GetType(Profact.TimbraCFDI40.Complementos.Pagos20.Pagos), nsComp)
Dim docComp As New XmlDocument() Dim docComp As New XmlDocument()
@@ -4294,7 +4297,7 @@ Public Class Timbrado
ComCartaPorte.Ubicaciones(i).IDUbicacion = ubica.IDUbicacion ComCartaPorte.Ubicaciones(i).IDUbicacion = ubica.IDUbicacion
ComCartaPorte.Ubicaciones(i).RFCRemitenteDestinatario = ubica.RFCRemitenteDestinatario ComCartaPorte.Ubicaciones(i).RFCRemitenteDestinatario = ubica.RFCRemitenteDestinatario
ComCartaPorte.Ubicaciones(i).NombreRemitenteDestinatario = ubica.NombreRemitenteDestinatario ComCartaPorte.Ubicaciones(i).NombreRemitenteDestinatario = ubica.NombreRemitenteDestinatario
ComCartaPorte.Ubicaciones(i).NumRegIdTrib = ubica.NumRegIdTrib If ubica.NumRegIdTrib <> "" Then ComCartaPorte.Ubicaciones(i).NumRegIdTrib = ubica.NumRegIdTrib
'ComCartaPorte.Ubicaciones(i).ResidenciaFiscal = ubica.ResidenciaFiscal 'ComCartaPorte.Ubicaciones(i).ResidenciaFiscal = ubica.ResidenciaFiscal
'ComCartaPorte.Ubicaciones(i).NumEstacion = ubica.NumEstacion 'ComCartaPorte.Ubicaciones(i).NumEstacion = ubica.NumEstacion
'ComCartaPorte.Ubicaciones(i).NavegacionTrafico = ubica.NavegacionTrafico 'ComCartaPorte.Ubicaciones(i).NavegacionTrafico = ubica.NavegacionTrafico
@@ -4302,16 +4305,17 @@ Public Class Timbrado
ComCartaPorte.Ubicaciones(i).DistanciaRecorrida = ubica.DistanciaRecorrida ComCartaPorte.Ubicaciones(i).DistanciaRecorrida = ubica.DistanciaRecorrida
ComCartaPorte.Ubicaciones(i).Domicilio = New ProfactCartaPorte.CartaPorteUbicacionDomicilio With {.Calle = ubica.Domicilio.Calle, ComCartaPorte.Ubicaciones(i).Domicilio = New ProfactCartaPorte.CartaPorteUbicacionDomicilio With {.Calle = ubica.Domicilio.Calle,
.NumeroExterior = ubica.Domicilio.NumeroExterior,
.NumeroInterior = ubica.Domicilio.NumeroInterior,
.Colonia = ubica.Domicilio.Colonia, .Colonia = ubica.Domicilio.Colonia,
.Localidad = ubica.Domicilio.Localidad, .Localidad = ubica.Domicilio.Localidad,
.Referencia = ubica.Domicilio.Referencia,
.Municipio = ubica.Domicilio.Municipio, .Municipio = ubica.Domicilio.Municipio,
.Estado = ubica.Domicilio.Estado, .Estado = ubica.Domicilio.Estado,
.CodigoPostal = ubica.Domicilio.CP, .CodigoPostal = ubica.Domicilio.CP,
.Pais = CType([Enum].Parse(GetType(ProfactCartaPorte.c_Pais), ubica.Domicilio.Pais), ProfactCartaPorte.c_Pais)} .Pais = CType([Enum].Parse(GetType(ProfactCartaPorte.c_Pais), ubica.Domicilio.Pais), ProfactCartaPorte.c_Pais)}
If ubica.Domicilio.Referencia <> "" Then ComCartaPorte.Ubicaciones(i).Domicilio.Referencia = ubica.Domicilio.Referencia
If ubica.Domicilio.NumeroExterior <> "" Then ComCartaPorte.Ubicaciones(i).Domicilio.NumeroExterior = ubica.Domicilio.NumeroExterior
If ubica.Domicilio.NumeroInterior <> "" Then ComCartaPorte.Ubicaciones(i).Domicilio.NumeroInterior = ubica.Domicilio.NumeroInterior
i += 1
Next Next
End If End If
@@ -4338,7 +4342,7 @@ Public Class Timbrado
ComCartaPorte.Mercancias.Mercancia(i).Descripcion = concep.Descripción ComCartaPorte.Mercancias.Mercancia(i).Descripcion = concep.Descripción
ComCartaPorte.Mercancias.Mercancia(i).Cantidad = concep.Cantidad ComCartaPorte.Mercancias.Mercancia(i).Cantidad = concep.Cantidad
ComCartaPorte.Mercancias.Mercancia(i).Unidad = concep.Unidad ComCartaPorte.Mercancias.Mercancia(i).Unidad = concep.Unidad
ComCartaPorte.Mercancias.Mercancia(i).Dimensiones = concep.Dimensiones If concep.Dimensiones <> "" Then ComCartaPorte.Mercancias.Mercancia(i).Dimensiones = concep.Dimensiones
If concep.ClaveMaterialPeligroso <> "" Then If concep.ClaveMaterialPeligroso <> "" Then
ComCartaPorte.Mercancias.Mercancia(i).MaterialPeligrosoSpecified = True ComCartaPorte.Mercancias.Mercancia(i).MaterialPeligrosoSpecified = True
ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligrosoSpecified = True ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligrosoSpecified = True
@@ -4353,7 +4357,7 @@ Public Class Timbrado
ComCartaPorte.Mercancias.Mercancia(i).ValorMercanciaSpecified = False ComCartaPorte.Mercancias.Mercancia(i).ValorMercanciaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).MonedaSpecified = False ComCartaPorte.Mercancias.Mercancia(i).MonedaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).FraccionArancelariaSpecified = False ComCartaPorte.Mercancias.Mercancia(i).FraccionArancelariaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).UUIDComercioExt = concep.UUIDComercioExt If concep.UUIDComercioExt <> "" Then ComCartaPorte.Mercancias.Mercancia(i).UUIDComercioExt = concep.UUIDComercioExt
Dim j As Integer = 0 Dim j As Integer = 0
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {} ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {}
@@ -4370,43 +4374,6 @@ Public Class Timbrado
End If End If
End If End If
'If Carta.FiguraTransporte IsNot Nothing Then
' If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
' cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
' cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
' cfdi.CartaPorteSeguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
' Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
' If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
' For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
' cfdi.CartaPorteRemolque(concep.SubTipoRemolque, concep.Placa)
' Next
' End If
' End If
' If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
' For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
' cfdi.CartaPorteTiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
' If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
' cfdi.CartaPortePartesTransporte("PT01")
' cfdi.CartaPortePartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
' End If
' Next
' End If
'End If
' '
If Carta.FiguraTransporte IsNot Nothing Then If Carta.FiguraTransporte IsNot Nothing Then
@@ -4419,9 +4386,6 @@ Public Class Timbrado
ComCartaPorte.Mercancias.Autotransporte.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermisoSCT), ProfactCartaPorte.c_TipoPermiso) ComCartaPorte.Mercancias.Autotransporte.PermSCT = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoPermiso), Carta.FiguraTransporte.AutoTransporte.PermisoSCT), ProfactCartaPorte.c_TipoPermiso)
End If End If
ComCartaPorte.Mercancias.Autotransporte.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT ComCartaPorte.Mercancias.Autotransporte.NumPermisoSCT = Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT
'pendiente RMF
'ComCartaPorte.Mercancias.AutotransporteFederal.NombreAseg = Carta.FiguraTransporte.AutoTransporte.NombreAseg
'ComCartaPorte.Mercancias.AutotransporteFederal.NumPolizaSeguro = Carta.FiguraTransporte.AutoTransporte.NumPolizaSeguro
Dim ConfigVehicular As New ProfactCartaPorte.CartaPorteMercanciasAutotransporteIdentificacionVehicular Dim ConfigVehicular As New ProfactCartaPorte.CartaPorteMercanciasAutotransporteIdentificacionVehicular
ConfigVehicular.ConfigVehicular = CType([Enum].Parse(GetType(ProfactCartaPorte.c_ConfigAutotransporte), Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular), ProfactCartaPorte.c_ConfigAutotransporte) ConfigVehicular.ConfigVehicular = CType([Enum].Parse(GetType(ProfactCartaPorte.c_ConfigAutotransporte), Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular), ProfactCartaPorte.c_ConfigAutotransporte)
@@ -4443,6 +4407,8 @@ Public Class Timbrado
ConfigVehicularSeguros.PrimaSeguroSpecified = True ConfigVehicularSeguros.PrimaSeguroSpecified = True
End If End If
ComCartaPorte.Mercancias.Autotransporte.Seguros = ConfigVehicularSeguros
If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
Dim i As Integer = 0 Dim i As Integer = 0
ComCartaPorte.Mercancias.Autotransporte.Remolques = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteRemolque(Carta.FiguraTransporte.AutoTransporte.Remolques.Count - 1) {} ComCartaPorte.Mercancias.Autotransporte.Remolques = New ProfactCartaPorte.CartaPorteMercanciasAutotransporteRemolque(Carta.FiguraTransporte.AutoTransporte.Remolques.Count - 1) {}
@@ -4465,7 +4431,7 @@ Public Class Timbrado
ComCartaPorte.FiguraTransporte(i).RFCFigura = concep.RFCFigura ComCartaPorte.FiguraTransporte(i).RFCFigura = concep.RFCFigura
ComCartaPorte.FiguraTransporte(i).NumLicencia = concep.NumLicencia ComCartaPorte.FiguraTransporte(i).NumLicencia = concep.NumLicencia
ComCartaPorte.FiguraTransporte(i).NombreFigura = concep.NombreFigura ComCartaPorte.FiguraTransporte(i).NombreFigura = concep.NombreFigura
ComCartaPorte.FiguraTransporte(i).NumRegIdTribFigura = concep.NumRegidTribFigura If concep.NumRegidTribFigura <> "" Then ComCartaPorte.FiguraTransporte(i).NumRegIdTribFigura = concep.NumRegidTribFigura
'OComCartaPorte.FiguraTransporte.Operadores(i)(0) = concep.ResidenciaFiscalOperador 'falta 'OComCartaPorte.FiguraTransporte.Operadores(i)(0) = concep.ResidenciaFiscalOperador 'falta
ComCartaPorte.FiguraTransporte(i).Domicilio = New ProfactCartaPorte.CartaPorteTiposFiguraDomicilio() ComCartaPorte.FiguraTransporte(i).Domicilio = New ProfactCartaPorte.CartaPorteTiposFiguraDomicilio()
@@ -4473,9 +4439,9 @@ Public Class Timbrado
ComCartaPorte.FiguraTransporte(i).Domicilio.CodigoPostal = concep.Domicilio.CP ComCartaPorte.FiguraTransporte(i).Domicilio.CodigoPostal = concep.Domicilio.CP
ComCartaPorte.FiguraTransporte(i).Domicilio.Colonia = concep.Domicilio.Colonia ComCartaPorte.FiguraTransporte(i).Domicilio.Colonia = concep.Domicilio.Colonia
ComCartaPorte.FiguraTransporte(i).Domicilio.Estado = concep.Domicilio.Estado ComCartaPorte.FiguraTransporte(i).Domicilio.Estado = concep.Domicilio.Estado
ComCartaPorte.FiguraTransporte(i).Domicilio.Localidad = concep.Domicilio.Localidad If concep.Domicilio.Localidad <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.Localidad = concep.Domicilio.Localidad
ComCartaPorte.FiguraTransporte(i).Domicilio.Municipio = concep.Domicilio.Municipio ComCartaPorte.FiguraTransporte(i).Domicilio.Municipio = concep.Domicilio.Municipio
ComCartaPorte.FiguraTransporte(i).Domicilio.NumeroExterior = concep.Domicilio.NumeroExterior If concep.Domicilio.NumeroExterior <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.NumeroExterior = concep.Domicilio.NumeroExterior
ComCartaPorte.FiguraTransporte(i).Domicilio.Pais = ProfactCartaPorte.c_Pais.MEX ComCartaPorte.FiguraTransporte(i).Domicilio.Pais = ProfactCartaPorte.c_Pais.MEX
i += 1 i += 1
@@ -4662,191 +4628,7 @@ Public Class Timbrado
#End Region #End Region
'#Region "Detallista"
' If Ventas.Cliente.AplicaDetallista Then
' Dim detallista As Profact.TimbraCFDI40.Complementos.Detallista.detallista = New Profact.TimbraCFDI40.Complementos.Detallista.detallista
' detallista.type = "SimpleInvoiceType"
' detallista.contentVersion = "1.3.1"
' detallista.documentStructureVersion = "AMC8.1"
' detallista.documentStatus = Profact.TimbraCFDI40.Complementos.Detallista.detallistaDocumentStatus.ORIGINAL
' detallista.DeliveryNote = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaDeliveryNote
' detallista.DeliveryNote.referenceIdentification = New String((1)) {}
' detallista.DeliveryNote.referenceIdentification(0) = "1"
' detallista.DeliveryNote.ReferenceDate = New DateTime
' detallista.DeliveryNote.ReferenceDate = comprobante.Fecha
' detallista.DeliveryNote.ReferenceDateSpecified = True
' detallista.requestForPaymentIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaRequestForPaymentIdentification
' detallista.requestForPaymentIdentification.entityType = Profact.TimbraCFDI40.Complementos.Detallista.detallistaRequestForPaymentIdentificationEntityType.INVOICE
' detallista.specialInstruction = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaSpecialInstruction((1)) {}
' detallista.specialInstruction(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaSpecialInstruction
' detallista.specialInstruction(0).code = Profact.TimbraCFDI40.Complementos.Detallista.detallistaSpecialInstructionCode.ZZZ
' Dim TotalTexto = New String() {Ventas.TotalTC.ToString.ToDouble.Texto2Letras.ToUpper()}
' Dim propertyInfo = detallista.specialInstruction(0).GetType().GetProperty("text")
' propertyInfo.SetValue(detallista.specialInstruction(0), Convert.ChangeType(TotalTexto, propertyInfo.PropertyType), Nothing)
' detallista.orderIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaOrderIdentification
' detallista.orderIdentification.referenceIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentification((1)) {}
' detallista.orderIdentification.referenceIdentification(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentification
' detallista.orderIdentification.referenceIdentification(0).type = Profact.TimbraCFDI40.Complementos.Detallista.detallistaOrderIdentificationReferenceIdentificationType.ON
' detallista.orderIdentification.referenceIdentification(0).Value = Ventas.Det_OrdenCompra
' detallista.orderIdentification.ReferenceDateSpecified = True
' detallista.orderIdentification.ReferenceDate = Ventas.Det_FechaOrdenCompra.ToDate()
' detallista.AdditionalInformation = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaReferenceIdentification((1)) {}
' detallista.AdditionalInformation(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaReferenceIdentification
' detallista.AdditionalInformation(0).type = Profact.TimbraCFDI40.Complementos.Detallista.detallistaReferenceIdentificationType.ATZ
' detallista.AdditionalInformation(0).Value = Ventas.Det_ContraRecibo
' detallista.DeliveryNote = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaDeliveryNote
' detallista.DeliveryNote.ReferenceDate = Ventas.Det_FechaOrdenCompra.ToDate
' detallista.DeliveryNote.referenceIdentification = New String((1)) {}
' detallista.DeliveryNote.referenceIdentification(0) = Ventas.Det_ContraRecibo
' detallista.buyer = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaBuyer
' detallista.buyer.gln = Ventas.Cliente.Detallista_GLNComprador
' detallista.buyer.contactInformation = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaBuyerContactInformation
' detallista.buyer.contactInformation.personOrDepartmentName = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaBuyerContactInformationPersonOrDepartmentName
' detallista.buyer.contactInformation.personOrDepartmentName.text = Ventas.Cliente.Detallista_Departamento
' detallista.seller = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaSeller
' detallista.seller.gln = Ventas.Cliente.Detallista_GLNVendedor
' detallista.seller.alternatePartyIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaSellerAlternatePartyIdentification
' detallista.seller.alternatePartyIdentification.type = Profact.TimbraCFDI40.Complementos.Detallista.detallistaSellerAlternatePartyIdentificationType.SELLER_ASSIGNED_IDENTIFIER_FOR_A_PARTY
' detallista.seller.alternatePartyIdentification.Value = Ventas.Cliente.Detallista_NumProveedor
' 'detallista.shipTo = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaShipTo
' 'detallista.shipTo.gln = "0000000000000"
' 'detallista.shipTo.nameAndAddress = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaShipToNameAndAddress
' 'detallista.shipTo.nameAndAddress.name = New String((1)) {}
' 'detallista.shipTo.nameAndAddress.name(0) = Ventas.Cliente.Direccion
' 'detallista.shipTo.nameAndAddress.streetAddressOne = New String((1)) {}
' 'detallista.shipTo.nameAndAddress.streetAddressOne(0) = Ventas.Cliente.NoInt
' 'detallista.shipTo.nameAndAddress.city = New String((1)) {}
' 'detallista.shipTo.nameAndAddress.city(0) = Ventas.Cliente.Ciudad
' 'detallista.shipTo.nameAndAddress.postalCode = New String((1)) {}
' 'detallista.shipTo.nameAndAddress.postalCode(0) = Ventas.Cliente.CP
' detallista.paymentTerms = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaPaymentTerms
' detallista.paymentTerms.netPayment = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaPaymentTermsNetPayment
' detallista.paymentTerms.netPayment.paymentTimePeriod = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriod
' detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriodTimePeriodDue
' detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue.timePeriod = Profact.TimbraCFDI40.Complementos.Detallista.detallistaPaymentTermsNetPaymentPaymentTimePeriodTimePeriodDueTimePeriod.DAYS
' detallista.paymentTerms.netPayment.paymentTimePeriod.timePeriodDue.value = "0"
' detallista.paymentTerms.discountPayment = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaPaymentTermsDiscountPayment
' detallista.paymentTerms.discountPayment.percentage = If(Ventas.DescuentoTC > 0 AndAlso Ventas.SubTotalTC > 0, (Ventas.DescuentoTC * 100) / Ventas.SubTotalTC, 0).ToString().FormatoNumero()
' detallista.currency = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaCurrency((1)) {}
' detallista.currency(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaCurrency
' detallista.currency(0).currencyISOCode = If(Ventas.CveMoneda = 1, Profact.TimbraCFDI40.Complementos.Detallista.detallistaCurrencyCurrencyISOCode.MXN, Profact.TimbraCFDI40.Complementos.Detallista.detallistaCurrencyCurrencyISOCode.USD)
' detallista.currency(0).currencyFunction = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaCurrencyCurrencyFunction((1)) {}
' detallista.currency(0).currencyFunction(0) = Profact.TimbraCFDI40.Complementos.Detallista.detallistaCurrencyCurrencyFunction.BILLING_CURRENCY
' detallista.currency(0).rateOfChangeSpecified = True
' detallista.currency(0).rateOfChange = 1
' detallista.allowanceCharge = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaAllowanceCharge(1) {}
' detallista.allowanceCharge(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaAllowanceCharge
' detallista.allowanceCharge(0).monetaryAmountOrPercentage = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentage
' detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentageRate
' detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate.base = Profact.TimbraCFDI40.Complementos.Detallista.detallistaAllowanceChargeMonetaryAmountOrPercentageRateBase.INVOICE_VALUE
' detallista.allowanceCharge(0).monetaryAmountOrPercentage.rate.percentage = If(Ventas.DescuentoTC > 0 AndAlso Ventas.SubTotalTC > 0, (Ventas.DescuentoTC * 100) / Ventas.SubTotalTC, 0)
' Dim articuloCounter As Integer = 0
' For Each concepto As Profact.TimbraCFDI40.ComprobanteConcepto In comprobante.Conceptos
' articuloCounter = (articuloCounter + 1)
' Next
' detallista.lineItem = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItem((articuloCounter)) {}
' Dim counter As Integer = 0
' For Each concepto As Profact.TimbraCFDI40.ComprobanteConcepto In comprobante.Conceptos
' detallista.lineItem(counter) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItem
' detallista.lineItem(counter).type = "SimpleInvoiceLineItemType"
' detallista.lineItem(counter).number = (counter + 1).ToString
' detallista.lineItem(counter).tradeItemIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemIdentification
' detallista.lineItem(counter).tradeItemIdentification.gtin = comprobante.Conceptos(counter).NoIdentificacion
' detallista.lineItem(counter).alternateTradeItemIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentification(1) {}
' detallista.lineItem(counter).alternateTradeItemIdentification(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentification
' detallista.lineItem(counter).alternateTradeItemIdentification(0).type = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentificationType
' detallista.lineItem(counter).alternateTradeItemIdentification(0).type = Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAlternateTradeItemIdentificationType.BUYER_ASSIGNED
' detallista.lineItem(counter).tradeItemDescriptionInformation = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemDescriptionInformation
' If (comprobante.Conceptos(counter).Descripcion.Length > 34) Then
' detallista.lineItem(counter).tradeItemDescriptionInformation.longText = comprobante.Conceptos(counter).Descripcion.Substring(0, 34)
' Else
' detallista.lineItem(counter).tradeItemDescriptionInformation.longText = comprobante.Conceptos(counter).Descripcion
' End If
' detallista.lineItem(counter).invoicedQuantity = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemInvoicedQuantity
' detallista.lineItem(counter).invoicedQuantity.unitOfMeasure = comprobante.Conceptos(counter).Unidad
' detallista.lineItem(counter).invoicedQuantity.Text = New String((1)) {}
' detallista.lineItem(counter).invoicedQuantity.Text(0) = comprobante.Conceptos(counter).Cantidad.ToString
' detallista.lineItem(counter).aditionalQuantity = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAditionalQuantity(1) {}
' detallista.lineItem(counter).aditionalQuantity(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAditionalQuantity
' detallista.lineItem(counter).aditionalQuantity(0).QuantityType = Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAditionalQuantityQuantityType.NUM_CONSUMER_UNITS
' detallista.lineItem(counter).aditionalQuantity(0).Text = New String((1)) {}
' detallista.lineItem(counter).aditionalQuantity(0).Text(0) = "1"
' detallista.lineItem(counter).grossPrice = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemGrossPrice
' detallista.lineItem(counter).grossPrice.Amount = comprobante.Conceptos(counter).ValorUnitario
' detallista.lineItem(counter).netPrice = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemNetPrice
' detallista.lineItem(counter).netPrice.Amount = comprobante.Conceptos(counter).ValorUnitario
' detallista.lineItem(counter).AdditionalInformation = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAdditionalInformation
' detallista.lineItem(counter).AdditionalInformation.referenceIdentification = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAdditionalInformationReferenceIdentification
' detallista.lineItem(counter).AdditionalInformation.referenceIdentification.type = Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemAdditionalInformationReferenceIdentificationType.ON
' detallista.lineItem(counter).AdditionalInformation.referenceIdentification.Value = "1587"
' 'Impuestos
' Dim tasa As Decimal = 0
' Dim importeImp As Decimal = 0
' Try
' If (Not (comprobante.Impuestos.Traslados) Is Nothing) Then
' For Each traslado As Profact.TimbraCFDI40.ComprobanteImpuestosTraslado In comprobante.Impuestos.Traslados
' tasa = Decimal.Parse(traslado.TasaOCuota)
' importeImp = (comprobante.Conceptos(counter).Importe * (tasa / 100))
' Next
' End If
' Catch ex As System.Exception
' End Try
' detallista.lineItem(counter).tradeItemTaxInformation = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemTaxInformation(1) {}
' detallista.lineItem(counter).tradeItemTaxInformation(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemTaxInformation
' detallista.lineItem(counter).tradeItemTaxInformation(0).taxTypeDescription = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTaxTypeDescription
' detallista.lineItem(counter).tradeItemTaxInformation(0).taxTypeDescription = Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTaxTypeDescription.VAT
' detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTradeItemTaxInformationTradeItemTaxAmount
' detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount.taxPercentage = tasa
' detallista.lineItem(counter).tradeItemTaxInformation(0).tradeItemTaxAmount.taxAmount = importeImp
' detallista.lineItem(counter).totalLineAmount = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTotalLineAmount
' detallista.lineItem(counter).totalLineAmount.grossAmount = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTotalLineAmountGrossAmount
' detallista.lineItem(counter).totalLineAmount.grossAmount.Amount = comprobante.Conceptos(counter).Importe
' detallista.lineItem(counter).totalLineAmount.netAmount = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaLineItemTotalLineAmountNetAmount
' detallista.lineItem(counter).totalLineAmount.netAmount.Amount = comprobante.Conceptos(counter).Importe
' counter = (counter + 1)
' Next
' detallista.totalAmount = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaTotalAmount
' detallista.totalAmount.Amount = comprobante.SubTotal
' detallista.TotalAllowanceCharge = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaTotalAllowanceCharge(1) {}
' detallista.TotalAllowanceCharge(0) = New Profact.TimbraCFDI40.Complementos.Detallista.detallistaTotalAllowanceCharge
' detallista.TotalAllowanceCharge(0).allowanceOrChargeType = Profact.TimbraCFDI40.Complementos.Detallista.detallistaTotalAllowanceChargeAllowanceOrChargeType.ALLOWANCE
' detallista.TotalAllowanceCharge(0).Amount = Ventas.DescuentoTC
' Dim nombres As System.Xml.Serialization.XmlSerializerNamespaces = New System.Xml.Serialization.XmlSerializerNamespaces
' nombres.Add("detallista", "http://www.sat.gob.mx/detallista")
' Dim xmlDetallista As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(detallista, GetType(Profact.TimbraCFDI40.Complementos.Detallista.detallista), nombres)
' Dim docDetallista As XmlDocument = New XmlDocument
' docDetallista.LoadXml(xmlDetallista)
' comprobante.DetallistaSpecified = True
' LXmlComplementos.Add(docDetallista.DocumentElement)
' TieneComplemento = True
' End If
'#End Region
If TieneComplemento Then If TieneComplemento Then
comprobante.Complemento = New Profact.TimbraCFDI40.ComprobanteComplemento comprobante.Complemento = New Profact.TimbraCFDI40.ComprobanteComplemento
@@ -5351,6 +5133,17 @@ Public Class Timbrado
doc.ObjetoImpuesto) doc.ObjetoImpuesto)
If doc.Impuestos IsNot Nothing Then If doc.Impuestos IsNot Nothing Then
''retenciones
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
Dim j As Integer = 0
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "R")
If docimp.TrasladooRetencion = "R" Then
cfdi.Pago20RetencionDR(docimp.Base, docimp.Impuesto, docimp.TipoFactor, docimp.TasaOCuota, docimp.Importe)
End If
j += 1
Next
End If
''traslados ''traslados
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "T").Count > 0 Then
Dim j As Integer = 0 Dim j As Integer = 0
@@ -5362,33 +5155,22 @@ Public Class Timbrado
j += 1 j += 1
Next Next
End If End If
''retenciones
If (doc.Impuestos).Where(Function(x) x.TrasladooRetencion = "R").Count > 0 Then
Dim j As Integer = 0
For Each docimp As CFDIConceptosImpuestos In doc.Impuestos.Where(Function(x) x.TrasladooRetencion = "R")
If docimp.TrasladooRetencion = "R" Then
cfdi.Pago20RetencionDR(docimp.Base, docimp.Impuesto, docimp.TipoFactor, docimp.TasaOCuota, docimp.Importe)
End If
j += 1
Next
End If
End If End If
Next Next
If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 Then
For Each Ret As CFDIRetenciones In ObjCFDITimbre.ComplementoPagos.Retenciones
cfdi.Pago20RetencionP(Ret.Impuesto, Ret.Importe)
Next
End If
If ObjCFDITimbre.ComplementoPagos.Traslados.Count > 0 Then If ObjCFDITimbre.ComplementoPagos.Traslados.Count > 0 Then
For Each Tra As CFDITraslados In (ObjCFDITimbre.ComplementoPagos.Traslados) For Each Tra As CFDITraslados In (ObjCFDITimbre.ComplementoPagos.Traslados)
cfdi.Pago20TrasladoP(Tra.Base, Tra.Impuesto, Tra.TipoFactor, Tra.TasaOCuota, Tra.Importe) cfdi.Pago20TrasladoP(Tra.Base, Tra.Impuesto, Tra.TipoFactor, Tra.TasaOCuota, Tra.Importe)
Next Next
End If End If
If (ObjCFDITimbre.ComplementoPagos.Retenciones).Count > 0 Then
For Each Ret As CFDIRetenciones In ObjCFDITimbre.ComplementoPagos.Retenciones
cfdi.Pago20RetencionP(Ret.Impuesto, Ret.Importe)
Next
End If
End If End If
End If End If
#End Region #End Region
@@ -5658,7 +5440,7 @@ Public Class Timbrado
Case "T" Case "T"
Dim objGrales As New ClsGenerales Dim objGrales As New ClsGenerales
If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC) Then If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC, "4.0") Then
Retorno = "" Retorno = ""
Else Else
Retorno = "Error" Retorno = "Error"
@@ -6740,12 +6522,12 @@ Public Class Timbrado
End If End If
ComCartaPorte.Mercancias.Mercancia(i).DescripEmbalaje = concep.DescripEmbalaje If concep.DescripEmbalaje <> "" Then ComCartaPorte.Mercancias.Mercancia(i).DescripEmbalaje = concep.DescripEmbalaje
ComCartaPorte.Mercancias.Mercancia(i).PesoEnKg = concep.PesoenKg ComCartaPorte.Mercancias.Mercancia(i).PesoEnKg = concep.PesoenKg
ComCartaPorte.Mercancias.Mercancia(i).ValorMercanciaSpecified = False ComCartaPorte.Mercancias.Mercancia(i).ValorMercanciaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).MonedaSpecified = False ComCartaPorte.Mercancias.Mercancia(i).MonedaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).FraccionArancelariaSpecified = False ComCartaPorte.Mercancias.Mercancia(i).FraccionArancelariaSpecified = False
ComCartaPorte.Mercancias.Mercancia(i).UUIDComercioExt = concep.UUIDComercioExt If concep.UUIDComercioExt <> "" Then ComCartaPorte.Mercancias.Mercancia(i).UUIDComercioExt = concep.UUIDComercioExt
Dim j As Integer = 0 Dim j As Integer = 0
ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {} ComCartaPorte.Mercancias.Mercancia(i).CantidadTransporta = New ProfactCartaPorte.CartaPorteMercanciasMercanciaCantidadTransporta(Carta.Mercancias.Mercancias.Count - 1) {}
@@ -6763,43 +6545,6 @@ Public Class Timbrado
End If End If
'If Carta.FiguraTransporte IsNot Nothing Then
' If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then
' cfdi.CartaPorteAutotransporte(Carta.FiguraTransporte.AutoTransporte.PermisoSCT, Carta.FiguraTransporte.AutoTransporte.NumPermisoSCT)
' cfdi.CartaPorteIdentificacionVehicular(Carta.FiguraTransporte.AutoTransporte.Vehiculo.ConfigVehicular, Carta.FiguraTransporte.AutoTransporte.Vehiculo.PlacaVM, Carta.FiguraTransporte.AutoTransporte.Vehiculo.AnioModeloVM)
' cfdi.CartaPorteSeguros(Carta.FiguraTransporte.AutoTransporte.NombreSeguroResponsabilidadCivil, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroResponsabilidadCivil,
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroMedioAmbiente, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroMedioAmbiente,
' Carta.FiguraTransporte.AutoTransporte.NombreSeguroCarga, Carta.FiguraTransporte.AutoTransporte.PolizaSeguroCarga,
' Carta.FiguraTransporte.AutoTransporte.PrimaSeguro)
' If Carta.FiguraTransporte.AutoTransporte.Remolques IsNot Nothing AndAlso Carta.FiguraTransporte.AutoTransporte.Remolques.Count > 0 Then
' For Each concep As CFDICartaPorteRemolque In Carta.FiguraTransporte.AutoTransporte.Remolques
' cfdi.CartaPorteRemolque(concep.SubTipoRemolque, concep.Placa)
' Next
' End If
' End If
' If Carta.FiguraTransporte.Operadores IsNot Nothing AndAlso Carta.FiguraTransporte.Operadores.Count > 0 Then
' For Each concep As CFDICartaPorteOperador In Carta.FiguraTransporte.Operadores
' cfdi.CartaPorteTiposFigura(concep.TipoFigura, concep.RFCFigura, concep.NumLicencia, concep.NombreFigura, concep.NumRegidTribFigura, If(concep.ResidenciaFiscalFigura <> "MEX", concep.ResidenciaFiscalFigura, ""))
' If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador
' cfdi.CartaPortePartesTransporte("PT01")
' cfdi.CartaPortePartesTransporteDomicilio(concep.Domicilio.Calle, concep.Domicilio.NumeroExterior, concep.Domicilio.NumeroInterior, concep.Domicilio.Colonia, concep.Domicilio.Localidad, concep.Domicilio.Referencia, concep.Domicilio.Municipio, concep.Domicilio.Estado, concep.Domicilio.Pais, concep.Domicilio.CP)
' End If
' Next
' End If
'End If
'
If Carta.FiguraTransporte IsNot Nothing Then If Carta.FiguraTransporte IsNot Nothing Then
If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then If Carta.FiguraTransporte.AutoTransporte IsNot Nothing Then

View File

@@ -43,6 +43,8 @@ Public Class Timbres
Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer) Private Sub CreaObjetosTraslados(TipoDocto As String, CveTimbre As Integer)
ObjFactura = New Modelos.Factura ObjFactura = New Modelos.Factura
ObjFactura.Version = "3.3" ObjFactura.Version = "3.3"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then ObjFactura.Version = "4.0"
ObjFactura.CveUsuario = UsuarioActual.CveUsuario ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
ObjFactura.UsuarioActual = UsuarioActual ObjFactura.UsuarioActual = UsuarioActual
@@ -85,7 +87,9 @@ Public Class Timbres
Timbre.Comprobante.Descuentos = Obj.Descuento Timbre.Comprobante.Descuentos = Obj.Descuento
Timbre.Comprobante.Moneda = "XXX" Timbre.Comprobante.Moneda = "XXX"
Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX' Timbre.Comprobante.TipoCambio = "" ' CONDICIÓN SI LA MONEDA ES 'XXX'
Timbre.Receptor.UsoCFDI = "P01"
Timbre.Receptor.UsoCFDI = "S01"
If ObjFactura.Version = "3.3" Then Timbre.Receptor.UsoCFDI = "P01"
Dim totSubTotal As Decimal = Obj.SubTotal Dim totSubTotal As Decimal = Obj.SubTotal
Dim totIVA As Decimal = Obj.IVA Dim totIVA As Decimal = Obj.IVA
@@ -124,7 +128,7 @@ Public Class Timbres
Timbre.Receptor.RFC = drT("EmpresaRFC").ToString Timbre.Receptor.RFC = drT("EmpresaRFC").ToString
Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString Timbre.Receptor.Nombre = drT("EmpresaNombre").ToString
Timbre.Receptor.DomicilioFiscalReceptor = drT("DirDesCP").ToString Timbre.Receptor.DomicilioFiscalReceptor = drT("DomicilioFiscalReceptor").ToString
Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString Timbre.Receptor.RegimenFiscalReceptor = drT("CodigoRegimenFiscalReceptor").ToString
CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero CveMovimiento = drT("CveMovimientoAlmacen").ToString.ToEntero
@@ -216,8 +220,8 @@ Public Class Timbres
End If End If
Dim Ubica As New CFDICartaPorteUbicacion Dim Ubica As New CFDICartaPorteUbicacion
Ubica.TipoEstacion = "" Ubica.TipoEstacion = ""
Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = drT("RemitenteRFC").ToString, Ubica = New CFDICartaPorteUbicacion With {.TipoUbicacion = "Origen", .IDUbicacion = "OR000001", .RFCRemitenteDestinatario = drT("RemitenteRFC").ToString,
.FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01", .FechaHoraSalidaLlegada = FechaSalida.ToString("yyyy-MM-ddTHH:mm:ss"),' "2021-08-23T11:13:01",
.NombreRemitenteDestinatario = drT("RemitenteNombre").ToString, .NombreRemitenteDestinatario = drT("RemitenteNombre").ToString,
.Domicilio = DomOrigen} .Domicilio = DomOrigen}
@@ -230,9 +234,9 @@ Public Class Timbres
.NumRegIdTrib = NumRegIdTrib} .NumRegIdTrib = NumRegIdTrib}
CartaPorte.Ubicaciones.Add(Ubica) CartaPorte.Ubicaciones.Add(Ubica)
CartaPorte.FiguraTransporte.ClaveTransporte = "01" CartaPorte.FiguraTransporte.ClaveTransporte = "01"
Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString, Dim DomicilioOperador As New CFDICartaPorteDomicilio With {.Calle = drT("FiguraDomicilio").ToString,
.NumeroExterior = drT("FiguraNumeroExterior").ToString, .NumeroExterior = drT("FiguraNumeroExterior").ToString,
.NumeroInterior = drT("FiguraNumeroInterior").ToString, .NumeroInterior = drT("FiguraNumeroInterior").ToString,
.Colonia = drT("FiguraClaveSATColonia").ToString, .Colonia = drT("FiguraClaveSATColonia").ToString,
@@ -242,7 +246,7 @@ Public Class Timbres
CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With { CartaPorte.FiguraTransporte.Operadores.Add(New CFDICartaPorteOperador With {
.RFCFigura = drT("FiguraRFC").ToString, .RFCFigura = drT("FiguraRFC").ToString,
.NombreFigura = drT("FiguraChofer").ToString, .NombreFigura = drT("FiguraChofer").ToString,
.NumLicencia = drT("FiguraLicencia").ToString, .NumLicencia = drT("FiguraLicencia").ToString,
@@ -251,8 +255,8 @@ Public Class Timbres
.Domicilio = DomicilioOperador}) .Domicilio = DomicilioOperador})
'concepto único 'concepto único
Dim concepto As New CFDIConceptos With {.Cantidad = 1, Dim concepto As New CFDIConceptos With {.Cantidad = 1,
.Descripcion = "Traslado", .Descripcion = "Traslado",
.ValorUnitario = 0, .ValorUnitario = 0,
.Importe = 0, .Importe = 0,
@@ -261,22 +265,23 @@ Public Class Timbres
.ClaveUnidad = "E48", .ClaveUnidad = "E48",
.ClaveProdServ = "78101802", .ClaveProdServ = "78101802",
.Noidentificacion = "", .Noidentificacion = "",
.CuentaPredial = ""} .CuentaPredial = "",
.ObjetoImpuesto = "01"}
Timbre.Conceptos.Add(concepto) Timbre.Conceptos.Add(concepto)
For Each drr As DataRow In Obj.DtDetalle.Rows For Each drr As DataRow In Obj.DtDetalle.Rows
If drr("PS").ToString.Length = 1 Then If drr("PS").ToString.Length = 1 Then
tPS = drr("Obs").ToString tPS = drr("Obs").ToString
Else
If drr("PS").ToString.Length = 0 Then
tPS = ""
Else Else
If drr("PS").ToString.Length = 0 Then tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
tPS = ""
Else
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
End If
End If End If
Dim conceptoCarta As New CFDICartaPorteMercancia With { End If
Dim conceptoCarta As New CFDICartaPorteMercancia With {
.BienesTransp = drr("SATClaveProdServ").ToString, .BienesTransp = drr("SATClaveProdServ").ToString,
.ClaveSTCC = "", 'para metodo ferroviario .ClaveSTCC = "", 'para metodo ferroviario
.Cantidad = drr("Cantidad").ToString.ToDecimal, .Cantidad = drr("Cantidad").ToString.ToDecimal,
@@ -290,29 +295,29 @@ Public Class Timbres
.Embalaje = drr("ClaveEmbalaje").ToString, .Embalaje = drr("ClaveEmbalaje").ToString,
.DescripEmbalaje = drr("Embalaje").ToString, .DescripEmbalaje = drr("Embalaje").ToString,
.ValorMercancia = drr("PU").ToString.ToDecimal, .ValorMercancia = drr("PU").ToString.ToDecimal,
.Moneda = "MXN", 'temporal .Moneda = IIf(drr("PU").ToString.ToDecimal > 0, "MXN", ""), 'temporal
.FraccionArrancelaria = "", .FraccionArrancelaria = "",
.UUIDComercioExt = "" .UUIDComercioExt = ""
} }
Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal} Dim DetalleMercancia As New CFDICartaPorteMercanciaDetalleMercancia With {.PesoNeto = drr("PesoKg").ToString.ToDecimal * drr("Cantidad").ToString.ToDecimal, .NumPiezas = drr("Cantidad").ToString.ToDecimal}
conceptoCarta.DetalleMercancia = DetalleMercancia conceptoCarta.DetalleMercancia = DetalleMercancia
Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"} Dim MercanciaTransporta As New CFDICartaPorteMercanciaTransporta With {.Cantidad = drr("Cantidad").ToString.ToDecimal, .IDOrigen = "OR000001", .IDDestino = "DE000001"}
conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta) conceptoCarta.MercanciasCantidadTransporta.Add(MercanciaTransporta)
totSubTotal = totSubTotal - concepto.Importe totSubTotal = totSubTotal - concepto.Importe
CartaPorte.Mercancias.Mercancias.Add(conceptoCarta) CartaPorte.Mercancias.Mercancias.Add(conceptoCarta)
i += 1 i += 1
Next Next
Timbre.Complementos.CartaPorte = CartaPorte Timbre.Complementos.CartaPorte = CartaPorte
Else Else
'' T R A S L A D O S '' T R A S L A D O S
'DETALLES 'DETALLES
If Obj.DtDetalle IsNot Nothing Then If Obj.DtDetalle IsNot Nothing Then
For Each drr As DataRow In Obj.DtDetalle.Rows For Each drr As DataRow In Obj.DtDetalle.Rows
If drr("PS").ToString.Length = 1 Then If drr("PS").ToString.Length = 1 Then
@@ -337,7 +342,8 @@ Public Class Timbres
.ClaveUnidad = drr("SATClaveUM").ToString, .ClaveUnidad = drr("SATClaveUM").ToString,
.ClaveProdServ = drr("SATClaveProdServ").ToString, .ClaveProdServ = drr("SATClaveProdServ").ToString,
.Noidentificacion = drr("Noidentificacion").ToString, .Noidentificacion = drr("Noidentificacion").ToString,
.CuentaPredial = ""} .CuentaPredial = "",
.ObjetoImpuesto = "01"}
'VERIFICA SUMA SUBTOTALES 'VERIFICA SUMA SUBTOTALES
If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal <> concepto.Importe Then 'PROCESO DE AJUSTA DE DECIMALES
concepto.Importe = totSubTotal concepto.Importe = totSubTotal

View File

@@ -131,7 +131,7 @@ Namespace SIG
CveComplementoPagoTimbre = objbancos.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, "Pag", dr("FolioTimbre"), Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1) CveComplementoPagoTimbre = objbancos.AddComplementoPago(dr("CveIE").ToString().ToEntero(), -1, "Pag", dr("FolioTimbre"), Me.CveUsuario, CveEmpresa, CvePrePoliza:=-1, Estatus:=1)
continuar = CveComplementoPagoTimbre > 0 continuar = CveComplementoPagoTimbre > 0
End If End If
If continuar Then continuar = objbancos.UpdateComplementoPago(CveComplementoPagoTimbre, dr("FolioFiscalTimbre").ToString(), dr("CvePAC").ToString().ToEntero(), CveEmpresa) If continuar Then continuar = objbancos.UpdateComplementoPago(CveComplementoPagoTimbre, dr("FolioFiscalTimbre").ToString(), "4.0", dr("CvePAC").ToString().ToEntero(), CveEmpresa)
If continuar Then If continuar Then
dr("Sincronizado") = 1 dr("Sincronizado") = 1
End If End If

View File

@@ -104,9 +104,14 @@ Partial Class Bancos_DepositosCaja
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00") lblValorTotal.Text = ObjBancos.DtResultados.SUM("Importe").ToString("###,###,###.00")
RegistraScript($" ValorTotalSeleccionado = {ObjBancos.DtResultados.SUM("Importe")};")
End If End If
ObjBancos.Dispose() ObjBancos.Dispose()
@@ -373,11 +378,36 @@ Partial Class Bancos_DepositosCaja
End Sub End Sub
Protected Sub GvFacturas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvFacturas.RowDataBound Protected Sub GvFacturas_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvFacturas.RowDataBound
'If e.Row.RowType = DataControlRowType.DataRow Then
' If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoPago.SelectedValue.Contiene("11", "12", "-2") Then
' e.Row.FCCheckBox("ChkFactura").Checked = True
' e.Row.FCCheckBox("ChkFactura").Enabled = False
' End If
' e.Row.FCCheckBox("ChkFactura").Attributes.Add("onclick", String.Format("FnSuma(this,{0});", e.Row.DBCampo("Importe")))
' e.Row.FCCheckBox("ChkFactura").InputAttributes.Add("Value", e.Row.DBCampo("Importe"))
'End If
'If e.Row.RowType = DataControlRowType.Header Then
' If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
' RegistraScript("$('#C_GvFacturas_ChkSelector').attr('checked', true); $('#C_GvFacturas_ChkSelector').prop('disabled', 'disabled');")
' 'RegistraScript("$('#C_GvFacturas_ChkSelector').prop('disabled', 'disabled');")
' End If
'End If
If e.Row.RowType = DataControlRowType.DataRow Then If e.Row.RowType = DataControlRowType.DataRow Then
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoPago.SelectedValue.Contiene("11", "12", "-2") Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
e.Row.FCCheckBox("ChkFactura").Checked = True e.Row.FCCheckBox("ChkFactura").Checked = True
e.Row.FCCheckBox("ChkFactura").Enabled = False If DdlTipoPago.SelectedValue.Contiene("11", "12", "-2") Then
e.Row.FCCheckBox("ChkFactura").Enabled = False
End If
End If End If
@@ -388,7 +418,7 @@ Partial Class Bancos_DepositosCaja
If e.Row.RowType = DataControlRowType.Header Then If e.Row.RowType = DataControlRowType.Header Then
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso DdlTipoPago.SelectedValue.Contiene("11", "12", "-2") Then
RegistraScript("$('#C_GvFacturas_ChkSelector').attr('checked', true); $('#C_GvFacturas_ChkSelector').prop('disabled', 'disabled');") RegistraScript("$('#C_GvFacturas_ChkSelector').attr('checked', true); $('#C_GvFacturas_ChkSelector').prop('disabled', 'disabled');")
'RegistraScript("$('#C_GvFacturas_ChkSelector').prop('disabled', 'disabled');") 'RegistraScript("$('#C_GvFacturas_ChkSelector').prop('disabled', 'disabled');")
End If End If

View File

@@ -24,29 +24,22 @@
<td class="Titulos" colspan="4">Filtros para búsqueda</td> <td class="Titulos" colspan="4">Filtros para búsqueda</td>
</tr> </tr>
<tr> <tr>
<td class="text-right" style="width: 150px"><b>Banco:</b></td> <td class="text-right" style="width: 150px"><b>Folio:</b></td>
<td style="width: 225px"> <td style="width: 150px">
<asp:DropDownList ID="DdlBanco" runat="server" CssClass="form-control input-sm" AppendDataBoundItems="true" AutoPostBack="true" DataTextField="Banco" DataValueField="CveBanco" ValidationGroup="GrpGuardar"> <asp:TextBox ID="TxtFolio" CssClass="form-control input-sm" runat="server" MaxLength="20" autofocus="true"></asp:TextBox>
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
</asp:DropDownList>
</td> </td>
<td class="text-right" style="width: 150px"><b>Cuenta:</b></td> <td class="text-right" style="width: 150px"><b>Cuenta:</b></td>
<td style="width: 225px"> <td style="width: 150px">
<asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm" AppendDataBoundItems="true" DataTextField="NumCuenta" DataValueField="CveCuenta" ValidationGroup="GrpGuardar"> <asp:DropDownList ID="DdlCuenta" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="NumCuentaMoneda" DataValueField="CveCuenta" ValidationGroup="GrpGuardar">
</asp:DropDownList> </asp:DropDownList>
</td> </td>
</tr> </tr>
<tr> <tr>
<td class="text-right" style="width: 150px"><b>Folio:</b></td>
<td style="width: 225px">
<asp:TextBox ID="TxtFolio" CssClass="form-control input-sm" runat="server" MaxLength="20" autofocus></asp:TextBox>
</td>
<td class="text-right" style="width: 150px"><b>Fecha Inicio:</b></td> <td class="text-right" style="width: 150px"><b>Fecha Inicio:</b></td>
<td style="width: 225px"> <td style="width: 150px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="padding: 0px;"> <div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="padding: 0px;">
<%-- --%> <%-- --%>
<asp:TextBox Style="width: 200px !important;" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox> <asp:TextBox Style="width: 150px !important;" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox>
<span class="input-group-btn "> <span class="input-group-btn ">
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton> <asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span> </span>
@@ -58,6 +51,22 @@
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender> <ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div> </div>
</td> </td>
<td class="text-right" style="width: 150px"><b>Fecha Fin:</b></td>
<td style="width: 150px">
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="padding: 0px;">
<%-- --%>
<asp:TextBox Style="width: 150px !important;" ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10" Font-Size="12px"></asp:TextBox>
<span class="input-group-btn ">
<asp:LinkButton ID="ImgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
</span>
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaFin" PopupButtonID="ImgCalendarioF" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="TxtFechaFin" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender1" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender2" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
</div>
</td>
</tr> </tr>
<tr> <tr>
<td style="text-align: center;" align="center" colspan="4"> <td style="text-align: center;" align="center" colspan="4">

View File

@@ -47,22 +47,22 @@ Partial Class Bancos_PopUpBuscarIE
#Region " C A R G A - D A T O S" #Region " C A R G A - D A T O S"
Private Sub CargaDatos() Private Sub CargaDatos()
CargaBanco() ' CargaBanco()
CargaCuenta() CargaCuenta()
End Sub End Sub
Private Sub CargaBanco() 'Private Sub CargaBanco()
DdlBanco.DataSource = GlobalDTBancos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) ' DdlBanco.DataSource = GlobalDTBancos.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
DdlBanco.DataBind() ' DdlBanco.DataBind()
End Sub 'End Sub
Private Sub CargaCuenta() Private Sub CargaCuenta()
DdlCuenta.Items.Clear() DdlCuenta.Items.Clear()
DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa).FiltraParametros("CveBanco = '" & DdlBanco.SelectedValue.ToEntero & "'") DdlCuenta.DataSource = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveEmpresa:=UsuarioActual.CveEmpresa) '.FiltraParametros("CveBanco = '" & DdlBanco.SelectedValue.ToEntero & "'")
DdlCuenta.DataBind() DdlCuenta.DataBind()
DdlCuenta.Items.Insert(0, New ListItem("Todas", "-1")) DdlCuenta.Items.Insert(0, New ListItem("Todas", "-1"))
End Sub End Sub
Protected Sub DdlBanco_SelectedIndexChanged1(sender As Object, e As System.EventArgs) Handles DdlBanco.SelectedIndexChanged 'Protected Sub DdlBanco_SelectedIndexChanged1(sender As Object, e As System.EventArgs) Handles DdlBanco.SelectedIndexChanged
CargaCuenta() ' CargaCuenta()
End Sub 'End Sub
#End Region #End Region
@@ -73,7 +73,7 @@ Partial Class Bancos_PopUpBuscarIE
If ValidarFiltrosSeleccionado() Then If ValidarFiltrosSeleccionado() Then
Dim ObjBancosIE As New ClsBancos Dim ObjBancosIE As New ClsBancos
If ObjBancosIE.GetBancosIE(-1, DdlBanco.SelectedValue.ToEntero, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate, If ObjBancosIE.GetBancosIE(-1, -1, DdlCuenta.SelectedValue.ToEntero, "-1", -1, Folio, "-1", -1, -1, -1, -1, -1, txtFechaI.Text.ToDate,
MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then MaxFecha.ToShortDateString.ToDate, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa, TopSelect:=100) Then
DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados) DtDatos = ObjBancosIE.DtResultados 'If(TxtFolio.Text <> "", ObjBancosIE.DtResultados.FiltraParametros(String.Format("Folio Like '{0}'", TxtFolio.Text)), ObjBancosIE.DtResultados)
Else Else
@@ -110,7 +110,7 @@ Partial Class Bancos_PopUpBuscarIE
End Sub End Sub
Private Function ValidarFiltrosSeleccionado() As Boolean Private Function ValidarFiltrosSeleccionado() As Boolean
If DdlBanco.SelectedValue.ToEntero > 0 Then Return True ' If DdlBanco.SelectedValue.ToEntero > 0 Then Return True
If DdlCuenta.SelectedValue.ToEntero > 0 Then Return True If DdlCuenta.SelectedValue.ToEntero > 0 Then Return True
If TxtFolio.Text.Length > 0 Then Return True If TxtFolio.Text.Length > 0 Then Return True
Return False Return False

View File

@@ -39,7 +39,7 @@ Partial Class Bancos_ProveedoresAbonar
Private Property CveUsuarioProgramo As Integer Private Property CveUsuarioProgramo As Integer
Get Get
Return ViewState("CveUsuarioProgramo").ToString.ToEntero Return IfNull(ViewState("CveUsuarioProgramo"), "-1").ToString.ToEntero
End Get End Get
Set(value As Integer) Set(value As Integer)
ViewState("CveUsuarioProgramo") = value ViewState("CveUsuarioProgramo") = value
@@ -1282,51 +1282,76 @@ Partial Class Bancos_ProveedoresAbonar
Case 64 'Ganancia Case 64 'Ganancia
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
Dim tImporteCompra, tImportePago As Decimal
Dim Diferencia As Decimal = 0
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria If gvr.DataKey("CveMoneda").ToEntero = 1 And CveMoneda <> 1 Then
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) 'factura pesos, pago en dolares
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) tImporteCompra = gvr.FCTextBox("TxtAbonar").Text.ToDecimal.RoundSQL
tImportePago = (((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompra / TipoCambioPago).RoundSQL * TipoCambioPago).RoundSQL
ElseIf gvr.DataKey("CveMoneda").ToEntero <> 1 And CveMoneda <> 1 Then
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta 'factura dolares, pago en dolares
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA tImporteCompra = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion).RoundSQL
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago).RoundSQL
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR ElseIf gvr.DataKey("CveMoneda").ToEntero <> 1 And CveMoneda = 1 Then
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS 'factura dolares, pago en pesos
Diferencia = Math.Round(Diferencia, 2) tImporteCompra = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion).RoundSQL
tImportePago = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago).RoundSQL
'' se considera, las diferencias, y no el tipo de cambio, por el caso de las fluctuaciones
'' si tiene funcionalidad de flucturación con ivas, tomar tipocambioventa
If Diferencia > 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento
End If End If
If tImporteCompra <> tImportePago Then
If tImporteCompra > tImportePago Then
ConceptoContable = 64
IdCtaContable = UsuarioActual.Empresa.IdCuentaGananciaCambiaria
TipoMovimiento = True
'CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria
Else
ConceptoContable = 65
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
TipoMovimiento = False
' CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria
End If
Diferencia = tImporteCompra - tImportePago
End If
If FuncionalidadFluctuacionImpuestos Then
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
Diferencia = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Diferencia.RoundSQL
End If
ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento
Else Else
ImporteMovimiento = 0 ImporteMovimiento = 0
End If End If
Case 65 'Perdida 'Case 65 'Perdida
If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then ' If CveMoneda <> 1 OrElse gvr.DataKey("CveMoneda").ToEntero <> 1 Then
IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria ' IdCtaContable = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria
'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal) ' 'tipoCambioVentaDiferenciaCambiaria = If(gvr.DataKey("Fecha").ToDate < FechaUltimaFluctuacion, TipoCambioFluctuacion, gvr.DataKey("TipoCambio").ToDecimal)
Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra) ' Dim TCImpuestos As Decimal = If(FuncionalidadFluctuacionImpuestos, TipoCambioPago, tipoCambioCompra)
Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta ' Dim Diferencia As Decimal = ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * tipoCambioCompraValuacion) - ((gvr.FCTextBox("TxtAbonar").Text.ToDecimal) * TipoCambioPago) 'Añadimos la diferencia de perdida en la venta
Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA ' Diferencia -= ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IVA
Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA ' Diferencia += ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetIVA
Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR ' Diferencia += ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el RetISR
Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS ' Diferencia -= ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * tipoCambioCompra) - ((gvr.DataKey("IEPS").ToDecimal * PorcentajePago) * TCImpuestos) 'Añadimos la diferencia de ganancia en el IEPS
Diferencia = Math.Round(Diferencia, 2) ' Diferencia = Math.Round(Diferencia, 2)
'si la diferencia es negativa es pérdida, si es positiva es ganancia ' 'si la diferencia es negativa es pérdida, si es positiva es ganancia
If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then ' If Diferencia < 0 AndAlso gvr.DataKey("CveMoneda").ToEntero = 2 Then
ImporteMovimiento = Math.Abs(Diferencia) ' ImporteMovimiento = Math.Abs(Diferencia)
importeMX = ImporteMovimiento ' importeMX = ImporteMovimiento
End If ' End If
Else ' Else
ImporteMovimiento = 0 ' ImporteMovimiento = 0
End If ' End If
Case 255 'Otros egresos Case 255 'Otros egresos
If DdlOtrosPagos.SelectedValue = "2" Then If DdlOtrosPagos.SelectedValue = "2" Then
If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then If CveMoneda = 1 AndAlso gvr.DataKey("CveMoneda").ToEntero = 1 Then
@@ -1370,7 +1395,7 @@ Partial Class Bancos_ProveedoresAbonar
IdCtaContable = IdCuenta IdCtaContable = IdCuenta
End If End If
Dim Importe42 As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal Dim Importe42 As Decimal = gvr.FCTextBox("TxtAbonar").Text.ToDecimal + gvr.FCTextBox("TxtComision").Text.ToDecimal
ImporteMovimiento = Importe42 ImporteMovimiento = Importe42
importeMX = If(CveMoneda = 2, If(DivTC.Visible, Importe42 / TxtTC.Text.ToDecimal * TipoCambioPago, Importe42 * TipoCambioPago), Importe42) importeMX = If(CveMoneda = 2, If(DivTC.Visible, Importe42 / TxtTC.Text.ToDecimal * TipoCambioPago, Importe42 * TipoCambioPago), Importe42)
TipoCambioGeneral = TipoCambioPago TipoCambioGeneral = TipoCambioPago
@@ -1435,10 +1460,10 @@ Partial Class Bancos_ProveedoresAbonar
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=If(TipoCambioPago = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=TxtImporte.Text.ToDecimal, ImporteME:=If(TipoCambioPago = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), Referencia, 204, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuentaBancariaComplementaria, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round((TxtImporte.Text.Trim.ToDecimal * TipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, If(CveMoneda = 1 AndAlso TxtTC.Visible, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, TxtImporte.Text.ToDecimal), Referencia, 204, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuentaBancariaComplementaria, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round((TxtImporte.Text.Trim.ToDecimal * TipoCambioPago) - TxtImporte.Text.Trim.ToDecimal, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(CveMoneda = 1, 0, TxtImporte.Text.ToDecimal), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
Else Else
@@ -1448,7 +1473,7 @@ Partial Class Bancos_ProveedoresAbonar
TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal TipoCambioPago = TxtTCDolaresDolares.Text.ToDecimal
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
@@ -1473,7 +1498,7 @@ Partial Class Bancos_ProveedoresAbonar
ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria) ImporteFluctuacion = PagoProveedoresME - (Bancos + BancosComplementaria)
If ImporteFluctuacion.RoundSQL() <> 0 Then If MsgError = "" AndAlso ImporteFluctuacion.RoundSQL() <> 0 Then
'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA 'SI EL PAGO DE PROVEEDORES ME ES MAYOR QUE BANCOS METER EL CONCEPTO DE GANANCIA
If ImporteFluctuacion > 0 Then If ImporteFluctuacion > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Math.Abs(ImporteFluctuacion), Referencia, 64, ConceptoMovimiento, TxtFechaIncobrable.Text.ToDate, IdCtaContable:=UsuarioActual.Empresa.IdCuentaGananciaCambiaria, CveIE:=-1, IdSegmentoNegocio:=-1, CveSubProyecto:=CveSubProyecto, CveProveedor:=Me.CveProveedor, CveCompra:=-1, ImporteMX:=Math.Abs(ImporteFluctuacion), TipoCambio:=TipoCambio, TipoCambioPago:=TCPago) Then
@@ -1494,10 +1519,9 @@ Partial Class Bancos_ProveedoresAbonar
TipoCambioPago = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal TipoCambioPago = GlobalTipoCambio(TxtFechaDocumento.Text.ToDate).ToString.ToDecimal
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, TxtImporte.Text.ToDecimal, Referencia, 30, ConceptoMovimiento, TxtFechaDocumento.Text.ToDate, IdCuenta, -1, CveIE, CveProveedor:=CveProveedor, ImporteMX:=If(CveMoneda = 2, Math.Round(TxtImporte.Text.Trim.ToDecimal * TipoCambioPago, 2, MidpointRounding.AwayFromZero), TxtImporte.Text.Trim.ToDecimal), ImporteME:=If(DivTC.Visible, If(TxtTC.Text.ToDecimal > 0, TxtImporte.Text.ToDecimal / TxtTC.Text.ToDecimal, 0), 0), TipoCambio:=TipoCambioPago, CveSubProyecto:=CveSubProyecto) Then
MsgError = "No se pudo insertar la póliza" MsgError = "No se pudo insertar la póliza"
End If End If
End If End If
End If End If
@@ -1853,7 +1877,7 @@ Partial Class Bancos_ProveedoresAbonar
DdlTipoTransaccion.SelectedValue = TipoPago.ToString DdlTipoTransaccion.SelectedValue = TipoPago.ToString
RecargaCuentasDepositos() RecargaCuentasDepositos()
ElseIf TipoPago = 3 Then ElseIf TipoPago = 3 Then
DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2)and Estatus = 1 ") DdlTipoTransaccion.DataSource = GlobalDTTipoTransacciones.FiltraParametros("Tipo = 'Egs' AND CveTipoTransaccion IN (1, 2) and Estatus = 1 ")
DdlTipoTransaccion.DataBind() DdlTipoTransaccion.DataBind()
DdlTipoTransaccion.SelectedValue = TipoPago.ToString DdlTipoTransaccion.SelectedValue = TipoPago.ToString
RecargaCuentasDepositos() RecargaCuentasDepositos()

View File

@@ -590,7 +590,7 @@ Partial Class Bancos_RepComplementoPago
If EstatusSATCancelado(Can_FolioFiscalCancelar, UsuarioActual.Empresa.RFC, Can_RFCReceptorCancelar) Then If EstatusSATCancelado(Can_FolioFiscalCancelar, UsuarioActual.Empresa.RFC, Can_RFCReceptorCancelar) Then
If ObjBanco.UpdateComplementoPago(Can_CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, Can_CvePACCancelacion, FechaCancelacion:=Date.Now, SelloCancelacion:="") Then If ObjBanco.UpdateComplementoPagoCancelado(Can_CveComplementoPagoCancelar, 2, UsuarioActual.CveEmpresa, Can_CvePACCancelacion, Date.Now, "", CveSATMotivoCancelacion) Then
Alert("El complemento se cancelo correctamente.") Alert("El complemento se cancelo correctamente.")
ErrorProceso = False ErrorProceso = False
End If End If
@@ -599,7 +599,7 @@ Partial Class Bancos_RepComplementoPago
Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Can_FolioFiscalCancelar, 0, Can_RFCReceptorCancelar, UsuarioActual.Empresa.RFC, Can_CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Dim resp = ObjCancelacion.CFDICancelar(UsuarioActual.Empresa, Can_FolioFiscalCancelar, 0, Can_RFCReceptorCancelar, UsuarioActual.Empresa.RFC, Can_CvePACCancelacion, CveSATMotivoCancelacion:=CveSATMotivoCancelacion)
If resp.Verificado Then If resp.Verificado Then
If ObjBanco.UpdateComplementoPago(Can_CveComplementoPagoCancelar, "-1", -1, UsuarioActual.CveEmpresa, 2, Can_CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion:=CveSATMotivoCancelacion) Then If ObjBanco.UpdateComplementoPagoCancelado(Can_CveComplementoPagoCancelar, 2, UsuarioActual.CveEmpresa, Can_CvePACCancelacion, ObjCancelacion.CancelacionFecha, ObjCancelacion.CancelacionAcuse, CveSATMotivoCancelacion) Then
Alert("El complemento se cancelo correctamente.") Alert("El complemento se cancelo correctamente.")
ErrorProceso = False ErrorProceso = False
End If End If

Binary file not shown.

View File

@@ -3699,13 +3699,7 @@ Partial Class Compras_Compras
Dim DtPS = GlobalDTPS(UsuarioActual.CveEmpresa).AsEnumerable Dim DtPS = GlobalDTPS(UsuarioActual.CveEmpresa).AsEnumerable
Dim DtPSAlias = GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa).AsEnumerable Dim DtPSAlias = GlobalDTProductosServiciosAlias(UsuarioActual.CveEmpresa).AsEnumerable
''AGREGA EN TABLA TEMPORAL
'Dim DtPSTemp = TmpDT.Clone
'Dim Row As DataRow = Nothing
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
Dim nodo As XmlNode = XMLDoc.DocumentElement Dim nodo As XmlNode = XMLDoc.DocumentElement
Dim VersionCFDI As String = ValorXML(nodo, "version") Dim VersionCFDI As String = ValorXML(nodo, "version")
@@ -3770,9 +3764,6 @@ Partial Class Compras_Compras
PU = ValorXML(node, "importe").ToDecimal / ValorXML(node, "cantidad").ToDecimal PU = ValorXML(node, "importe").ToDecimal / ValorXML(node, "cantidad").ToDecimal
End If End If
'OBTIENE DESCUENTO 'OBTIENE DESCUENTO
If ValorXML(node, "descuento") IsNot Nothing Then Descuento = ValorXML(node, "descuento").Trim.ToDecimal If ValorXML(node, "descuento") IsNot Nothing Then Descuento = ValorXML(node, "descuento").Trim.ToDecimal
@@ -3807,8 +3798,6 @@ Partial Class Compras_Compras
End If End If
End If End If
'se le puso una condicion de que ignorara los acentos, porque en la bd, marcaria error porque no distingue acentos 'se le puso una condicion de que ignorara los acentos, porque en la bd, marcaria error porque no distingue acentos
'CONCEPTO PRUEBA "TRABAJOS DE CONSTRUCCION", RM/Compras/Compras.aspx?CveFactura=13402&RFC=ECO061206QW7 'CONCEPTO PRUEBA "TRABAJOS DE CONSTRUCCION", RM/Compras/Compras.aspx?CveFactura=13402&RFC=ECO061206QW7
'' u!PS.ToString.ToUpper.Trim = PSS '' u!PS.ToString.ToUpper.Trim = PSS
@@ -3882,7 +3871,6 @@ Partial Class Compras_Compras
Exit For Exit For
End If End If
ElseIf ValorXML(nodeTraslado, "Impuesto") = "003" Then ElseIf ValorXML(nodeTraslado, "Impuesto") = "003" Then
IEPS = ValorXML(nodeTraslado, "Importe").Trim.ToDecimal IEPS = ValorXML(nodeTraslado, "Importe").Trim.ToDecimal
PorcentajeIEPS = ValorXML(nodeTraslado, "TasaOCuota").Trim.ToDecimal PorcentajeIEPS = ValorXML(nodeTraslado, "TasaOCuota").Trim.ToDecimal
@@ -3938,10 +3926,6 @@ Partial Class Compras_Compras
End If End If
If Version = "3.2" Then If Version = "3.2" Then
Try Try
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
Dim ContadorTraslado = 0 Dim ContadorTraslado = 0
@@ -3960,14 +3944,10 @@ Partial Class Compras_Compras
End If End If
'' AGREGA PS '' AGREGA PS
'AGREGA A TMPDT 'AGREGA A TMPDT
AddPS(ValorXML(node, "cantidad").ToDecimal, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS) AddPS(ValorXML(node, "cantidad").ToDecimal, CveUM, UMM, tCveClasif, Clasif, tCvePS, PSS, TipoPS, "-1", "SE", "SE", "-1", Obs, PU, Total, IVA, RetIVA, RetISR, IEPS, 0, Descuento, PSCodigo:=tPSCodigo, TCalculaTotales:=False, CveSATPS:=ValorXML(node, "ClaveProdServ").ToEntero(), CargaXml:=True, PorcentajeIVA:=PorcentajeIVA, PorcentajeRetIVA:=PorcentajeRetIVA, PorcentajeRetISR:=PorcentajeRetISR, PorcentajeIEPS:=PorcentajeIEPS)
Next Next
End If End If
@@ -10879,13 +10859,7 @@ Partial Class Compras_Compras
End If End If
End If End If
Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable) Dim namespaces As New XmlNamespaceManager(XMLDoc.NameTable)
Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix) Dim Prefijo As String = If(XMLDoc.DocumentElement.Prefix = "", "cfd", XMLDoc.DocumentElement.Prefix)
Dim cfdVer As String = "" Dim cfdVer As String = ""
@@ -10894,14 +10868,10 @@ Partial Class Compras_Compras
cfdVer = "http://www.sat.gob.mx/cfd/2" cfdVer = "http://www.sat.gob.mx/cfd/2"
ElseIf Version = "3.3" Then ElseIf Version = "3.3" Then
cfdVer = "http://www.sat.gob.mx/cfd/3" cfdVer = "http://www.sat.gob.mx/cfd/3"
Else ' se considera que es la version 4.0 Else ' se considera que es la version 4.0
cfdVer = "http://www.sat.gob.mx/cfd/4" cfdVer = "http://www.sat.gob.mx/cfd/4"
End If End If
'If Prefijo.ToLower <> "cfdi" Then cfdVer = "http://www.sat.gob.mx/cfd/2"
namespaces.AddNamespace(Prefijo, cfdVer) namespaces.AddNamespace(Prefijo, cfdVer)
namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital") namespaces.AddNamespace("tfd", "http://www.sat.gob.mx/TimbreFiscalDigital")
namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal") namespaces.AddNamespace("implocal", "http://www.sat.gob.mx/implocal")
@@ -10912,7 +10882,6 @@ Partial Class Compras_Compras
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
EmisorRFC = ValorXML(node, "RFC") EmisorRFC = ValorXML(node, "RFC")
'EmisorNombre = ValorXML(node, "nombre")
End If End If
node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces) node = XMLDoc.SelectSingleNode(String.Format("//{0}:CfdiRelacionados", Prefijo), namespaces)
@@ -10944,29 +10913,23 @@ Partial Class Compras_Compras
TotalRetenciones = ValorXML(node, "totalImpuestosRetenidos", "0").ToDecimal TotalRetenciones = ValorXML(node, "totalImpuestosRetenidos", "0").ToDecimal
If Version = "3.3" Or Version = "4.0" Then If Version = "3.3" OrElse Version = "4.0" Then
For Each retencion As XmlNode In nodeRetenciones For Each retencion As XmlNode In nodeRetenciones
If retencion.Attributes("Impuesto").Value = "002" Then If retencion.Attributes("Impuesto").Value = "002" Then RetencionIVA += retencion.Attributes("Importe").Value.ToDecimal
RetencionIVA += retencion.Attributes("Importe").Value.ToDecimal
End If If retencion.Attributes("Impuesto").Value = "001" Then RetencionISR += retencion.Attributes("Importe").Value.ToDecimal
If retencion.Attributes("Impuesto").Value = "001" Then
RetencionISR += retencion.Attributes("Importe").Value.ToDecimal
End If
' Do something.
Next Next
GvOC1.Columns(6).Visible = True GvOC1.Columns(6).Visible = True
GvOC2.Columns(4).Visible = True GvOC2.Columns(4).Visible = True
Else Else
For Each retencion As XmlNode In nodeRetenciones For Each retencion As XmlNode In nodeRetenciones
If retencion.Attributes("impuesto").Value = "IVA" Then If retencion.Attributes("impuesto").Value = "IVA" Then RetencionIVA += retencion.Attributes("importe").Value.ToDecimal
RetencionIVA += retencion.Attributes("importe").Value.ToDecimal
End If If retencion.Attributes("impuesto").Value = "ISR" Then RetencionISR += retencion.Attributes("importe").Value.ToDecimal
If retencion.Attributes("impuesto").Value = "ISR" Then
RetencionISR += retencion.Attributes("importe").Value.ToDecimal
End If
' Do something.
Next Next
End If End If
SumaTotalRetenciones += RetencionIVA SumaTotalRetenciones += RetencionIVA
@@ -10975,34 +10938,22 @@ Partial Class Compras_Compras
TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDecimal TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDecimal
Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces) Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Comprobante/{0}:Impuestos/{0}:Traslados/{0}:Traslado", Prefijo), namespaces)
If Version = "3.3" Or Version = "4.0" Then If Version = "3.3" OrElse Version = "4.0" Then
For Each traslado As XmlNode In nodeTraslados For Each traslado As XmlNode In nodeTraslados
If traslado.Attributes("Impuesto").Value = "002" Then If traslado.Attributes("Impuesto").Value = "002" Then TrasladoIVA += traslado.Attributes("Importe").Value.ToDecimal
TrasladoIVA += traslado.Attributes("Importe").Value.ToDecimal
End If If traslado.Attributes("Impuesto").Value = "003" Then TrasladoIEPS += traslado.Attributes("Importe").Value.ToDecimal
If traslado.Attributes("Impuesto").Value = "003" Then
TrasladoIEPS += traslado.Attributes("Importe").Value.ToDecimal
End If
If traslado.Attributes("Impuesto").Value = "001" Then
'TrasladoISR = traslado.Attributes("importe").Value
End If
' Do something.
Next Next
Else Else
For Each traslado As XmlNode In nodeTraslados For Each traslado As XmlNode In nodeTraslados
If traslado.Attributes("impuesto").Value = "IVA" Then If traslado.Attributes("impuesto").Value = "IVA" Then TrasladoIVA += traslado.Attributes("importe").Value.ToDecimal
TrasladoIVA += traslado.Attributes("importe").Value.ToDecimal
End If If traslado.Attributes("impuesto").Value = "IEPS" Then TrasladoIEPS += traslado.Attributes("importe").Value.ToDecimal
If traslado.Attributes("impuesto").Value = "IEPS" Then
TrasladoIEPS += traslado.Attributes("importe").Value.ToDecimal
End If
'If traslado.Attributes("impuesto").Value = "ISR" Then
' TrasladoISR = traslado.Attributes("importe").Value
'End If
' Do something.
Next Next
End If End If
@@ -11024,53 +10975,15 @@ Partial Class Compras_Compras
node = node.SelectSingleNode(String.Format("//{0}:ImpuestosLocales", "implocal"), namespaces) node = node.SelectSingleNode(String.Format("//{0}:ImpuestosLocales", "implocal"), namespaces)
If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then If node IsNot Nothing AndAlso node.ChildNodes.Count > 0 Then
OtrosImpuestos = ValorXML(node, "TotaldeTraslados", "0").ToDecimal OtrosImpuestos = ValorXML(node, "TotaldeTraslados", "0").ToDecimal
OtrosImpuestosRetenciones = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal '2022.06.04-- se quitan los datos de retenciones de impuestos locales, generan conflicto. RMF
'OtrosImpuestosRetenciones = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal
'If RetencionIVA <= 0 AndAlso ValorXML(node, "TotaldeRetenciones", "0").ToDouble > 0 Then RetencionIVA = ValorXML(node, "TotaldeRetenciones", "0").ToDecimal
'For Each retencion As XmlNode In nodeImpLocales
' If retencion.Attributes("impuesto").Value = "IVA" Then
' RetencionIVA += retencion.Attributes("importe").Value.ToDouble
' End If
' If retencion.Attributes("impuesto").Value = "ISR" Then
' RetencionISR += retencion.Attributes("importe").Value.ToDouble
' End If
' ' Do something.
'Next
' SumaTotalRetenciones += RetencionIVA
' SumaTotalRetenciones += RetencionISR
'TotalTraslados = ValorXML(node, "totalImpuestosTrasladados", "0").ToDouble
'Dim nodeTraslados As XmlNodeList = XMLDoc.SelectNodes(String.Format("//{0}:Traslado", Prefijo), namespaces)
'For Each traslado As XmlNode In nodeTraslados
' If traslado.Attributes("impuesto").Value = "IVA" Then
' TrasladoIVA += traslado.Attributes("importe").Value.ToDouble
' End If
' If traslado.Attributes("impuesto").Value = "IEPS" Then
' TrasladoIEPS += traslado.Attributes("importe").Value.ToDouble
' End If
' 'If traslado.Attributes("impuesto").Value = "ISR" Then
' ' TrasladoISR = traslado.Attributes("importe").Value
' 'End If
' ' Do something.
'Next
'SumaTotalTraslados += TrasladoIVA
'SumaTotalTraslados += TrasladoIEPS
End If End If
End If End If
'Try
' _TFDUUID = XMLDoc.SelectSingleNode(String.Format("//{0}:Complemento", Prefijo), namespaces).LastChild.Attributes("UUID").InnerText
'Catch ex As Exception
' _TFDUUID = ""
'End Try
End Sub End Sub
#End Region #End Region

View File

@@ -631,65 +631,64 @@ Partial Class Compras_ReembolsosComprobaciones
Dim IdCtaOtrosProductos As Integer = 0 Dim IdCtaOtrosProductos As Integer = 0
Dim CvePrePolizaUnificar As Integer = 0 Dim CvePrePolizaUnificar As Integer = 0
'Conta SIG
Dim CveCuentaProveedor As Integer = 0
Dim CveCuentaPersonal As Integer = 0
Dim SeUnifico = False Dim SeUnifico = False
'Obtenemos la cuenta del Personal o Caja Chica If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If CveCajaChica > 0 Then 'Obtenemos la cuenta del Personal o Caja Chica
If ObjMov.GetRetCuenta(30, CveCajaChica) Then If CveCajaChica > 0 Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.GetRetCuenta(30, CveCajaChica) Then
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero If ObjMov.DtResultados.Rows.Count > 0 Then
IdCuentaBancaria = ObjMov.DtResultados.Rows(0)("IdCtaContable").ToString.ToEntero
End If
End If
Else
If ObjMov.GetRetCuenta(29, CvePersonal) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero
End If
End If End If
End If End If
Else
If ObjMov.GetRetCuenta(29, CvePersonal) Then 'Obtenemos la cuenta del IVAxAcreditar
If ObjMov.GetRetCuenta(14, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaPersonal = ObjMov.DtResultados.Rows(0)("IdCtaContPersonal").ToString.ToEntero IdCtaIVAxAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero
End If End If
End If End If
End If
'Obtenemos la cuenta del IVAxAcreditar 'Obtenemos la cuenta del IVAAcreditable
If ObjMov.GetRetCuenta(14, UsuarioActual.CveEmpresa) Then If ObjMov.GetRetCuenta(19, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaIVAxAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaIVAxAcreditar").ToString.ToEntero IdCtaIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero
End If
End If End If
End If
'Obtenemos la cuenta del IVAAcreditable 'Obtenemos la cuenta del RetIVA
If ObjMov.GetRetCuenta(19, UsuarioActual.CveEmpresa) Then If ObjMov.GetRetCuenta(15, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaIVAAcreditable").ToString.ToEntero IdCtaRetIVA = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If End If
End If
'Obtenemos la cuenta del RetIVA 'Obtenemos la cuenta del RetISR
If ObjMov.GetRetCuenta(15, UsuarioActual.CveEmpresa) Then If ObjMov.GetRetCuenta(16, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaRetIVA = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero IdCtaRetISR = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero
End If
End If End If
End If
'Obtenemos la cuenta del RetISR 'Obtenemos la cuenta del IdCtaOtrosProductos
If ObjMov.GetRetCuenta(16, UsuarioActual.CveEmpresa) Then If ObjMov.GetRetCuenta(132, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaRetISR = ObjMov.DtResultados.Rows(0)("IdCuentaRetISRCirculacion").ToString.ToEntero IdCtaOtrosProductos = ObjMov.DtResultados.Rows(0)("IdCtaOtrosProductos").ToString.ToEntero
End If End If
End If
'Obtenemos la cuenta del IdCtaOtrosProductos
If ObjMov.GetRetCuenta(132, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaOtrosProductos = ObjMov.DtResultados.Rows(0)("IdCtaOtrosProductos").ToString.ToEntero
End If End If
End If End If
'inserto las compras que voy a pagar 'inserto las compras que voy a pagar
For Each gvr As GridViewRow In GvCxP.Rows For Each gvr As GridViewRow In GvCxP.Rows
If gvr.FCCheckBox("Chk").Checked Then If gvr.FCCheckBox("Chk").Checked Then
ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}" ConceptoMovimiento = $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}"
Referencia = gvr.DataKey("SerieFolio").ToString Referencia = gvr.DataKey("SerieFolio").ToString
@@ -740,13 +739,21 @@ Partial Class Compras_ReembolsosComprobaciones
Dim ComisionTmp As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal Dim ComisionTmp As Decimal = gvr.FCTextBox("TxtComision").Text.ToDecimal
'Otros Ingresos 'Otros Ingresos
If (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then If MsgError = "" AndAlso (ChkAjusteOI.Checked Or ChkOtrosIngresosCheque.Checked) AndAlso ComisionTmp <> 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then
Dim tOtCveCon As Integer = 211
Dim tOtTipoMovto As Boolean = False
If ComisionTmp < 0 Then
tOtTipoMovto = True : tOtCveCon = 78
ComisionTmp = Math.Abs(ComisionTmp)
End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, tOtTipoMovto, ComisionTmp, Referencia, tOtCveCon, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ComisionTmp), ImporteMX:=ComisionTmp * tipoCambio) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos" MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If End If
If CveCajaChica > 0 AndAlso Not HdnCheque.Value.ToEntero > 0 Then If CveCajaChica > 0 AndAlso Not HdnCheque.Value.ToEntero > 0 Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, 211, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor, Contabilizable:=False) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, Not tOtTipoMovto, ComisionTmp, Referencia, tOtCveCon, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ComisionTmp), ImporteMX:=ComisionTmp * tipoCambio, Contabilizable:=False) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos" MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If End If
End If End If
@@ -754,22 +761,21 @@ Partial Class Compras_ReembolsosComprobaciones
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1 If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal) Else PorcentajePago = 1
If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then If MsgError = "" AndAlso Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then
Dim ImporteMovtoTmp As Decimal = ImporteMovto Dim ImporteMovtoTmp As Decimal = ImporteMovto
If ComisionTmp < 0 Then 'If ComisionTmp < 0 Then
ImporteMovtoTmp = ImporteMovto + ComisionTmp ' ImporteMovtoTmp = ImporteMovto + ComisionTmp
End If 'End If
'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovtoTmp, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovtoTmp), ImporteMX:=ImporteMovtoTmp * tipoCambio, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, ImporteMovtoTmp, Referencia, If(CveCajaChica > 0, 30, 29), ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, If(CveCajaChica > 0, IdCuentaBancaria, IdCtaPersonal), -1, CveIE:=CveIEPago, CveIEDevolucion:=If(CveCajaChica > 0, If(DDlCheques.SelectedValue.ToEntero = -1, CveIECajaChica, DDlCheques.SelectedValue.ToEntero), -1), CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovtoTmp), ImporteMX:=ImporteMovtoTmp * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal, Contabilizable:=If(CveCajaChica > 0 Or CvePersonal > 0, Not UsaSimplificacionCajaChica, True)) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If
End If End If
'Pago Proveedores 'Pago Proveedores
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteMovto, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CveCuenta:=CveCuentaProveedor, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, ImporteMovto, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=ImporteMovto * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
MsgError = "Detalle" MsgError = "Detalle"
End If End If
@@ -824,134 +830,55 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
If MsgError = "" AndAlso gvr.DataKey("RetIVA").ToDecimal > 0 Then If MsgError = "" AndAlso gvr.DataKey("RetIVA").ToDecimal > 0 Then
Dim ConceptoContableRetIVAXAcreditar = 0, ConceptoContableRetIVAAcreditable = 0, IdCtaContableRetIVAXAcreditar = 0, IdCtaContableRetIVAAcreditable = 0 Dim ConceptoContableRetIVAXAcreditar = 0, ConceptoContableRetIVAAcreditable = 0, IdCtaContableRetIVAXAcreditar = 0, IdCtaContableRetIVAAcreditable = 0, CveFunc = 0, CveFuncAcreditable = 0
Select Case gvr.DataKey("CveRetIVAConcepto").ToEntero Select Case gvr.DataKey("CveRetIVAConcepto").ToEntero
Case 1 Case 1
ConceptoContableRetIVAXAcreditar = 15 ConceptoContableRetIVAXAcreditar = 15
ConceptoContableRetIVAAcreditable = 22 ConceptoContableRetIVAAcreditable = 22
If IdCtaRetIVA > 0 Then CveFunc = 307
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 308
ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(307).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 2 Case 2
ConceptoContableRetIVAXAcreditar = 183 ConceptoContableRetIVAXAcreditar = 183
ConceptoContableRetIVAAcreditable = 184 ConceptoContableRetIVAAcreditable = 184
If IdCtaRetIVA > 0 Then CveFunc = 309
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 310
ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(309).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 3 Case 3
ConceptoContableRetIVAXAcreditar = 185 ConceptoContableRetIVAXAcreditar = 185
ConceptoContableRetIVAAcreditable = 186 ConceptoContableRetIVAAcreditable = 186
If IdCtaRetIVA > 0 Then CveFunc = 311
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 312
ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(311).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 4 Case 4
ConceptoContableRetIVAXAcreditar = 248 ConceptoContableRetIVAXAcreditar = 248
ConceptoContableRetIVAAcreditable = 249 ConceptoContableRetIVAAcreditable = 249
If IdCtaRetIVA > 0 Then CveFunc = 313
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 314
ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(313).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 5
ConceptoContableRetIVAXAcreditar = 285
ConceptoContableRetIVAAcreditable = 286
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(577).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(577).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(578).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(578).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End Select End Select
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(CveFunc).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(CveFunc).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(CveFuncAcreditable).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(CveFuncAcreditable).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then If UsuarioActual.Empresa.Funcionalidad(521) = "1" Then
If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then If ImporteMovto = gvr.FCLiteral("LtlSaldo").Text.ToDouble Then
'Agrego el RetIVA 'Agrego el RetIVA
@@ -975,15 +902,47 @@ Partial Class Compras_ReembolsosComprobaciones
MsgError = "Detalle" MsgError = "Detalle"
End If End If
End If End If
Dim AcreditaISR As Boolean = False
If UsuarioActual.CveEmpresa = 140 Then AcreditaISR = True
If MsgError = "" AndAlso AcreditaISR AndAlso gvr.DataKey("RetISR").ToDecimal > 0 Then
Dim ConceptoContableRetISRXAcreditar = 0, ConceptoContableRetISRAcreditable = 0, IdCtaContableRetISRXAcreditar = 0, IdCtaContableRetISRAcreditable = 0
Select Case gvr.DataKey("CveRetIVAConcepto").ToEntero
Case 1
ConceptoContableRetISRXAcreditar = 16
ConceptoContableRetISRAcreditable = 23
Case 2
ConceptoContableRetISRXAcreditar = 243
ConceptoContableRetISRAcreditable = 244
CveFunc = 309
CveFuncAcreditable = 310
Case 3
ConceptoContableRetISRXAcreditar = 327
ConceptoContableRetISRAcreditable = 328
CveFunc = 311
End Select
'Agrego el RetIVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
'Agrego el RetIVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
End If
End If End If
Dim SaldoExcedente As Decimal = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal
If MsgError = "" AndAlso UsuarioActual.Empresa.Funcionalidad(506) = "1" And CbPermitirExcedente.Checked = True And SaldoExcedente > 0 Then
Dim SaldoExcedente As Double = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal
If UsuarioActual.Empresa.Funcionalidad(506) = "1" And CbPermitirExcedente.Checked = True And SaldoExcedente > 0 Then
If DDlPermitirExcedente.SelectedValue = "1" Then If DDlPermitirExcedente.SelectedValue = "1" Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, SaldoExcedente, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=(SaldoExcedente) * tipoCambio, CvePersonal:=CvePersonal, CveCuenta:=CveCuentaProveedor, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, SaldoExcedente, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=(SaldoExcedente) * tipoCambio, CvePersonal:=CvePersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
MsgError = "Detalle Reembolso Personal" MsgError = "Detalle Reembolso Personal"
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, SaldoExcedente, Referencia, 132, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaOtrosProductos, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, SaldoExcedente, Referencia, 132, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaOtrosProductos, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
@@ -991,17 +950,17 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
ElseIf DDlPermitirExcedente.SelectedValue = "2" Then ElseIf DDlPermitirExcedente.SelectedValue = "2" Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, SaldoExcedente, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CveCuenta:=CveCuentaProveedor, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, False, SaldoExcedente, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
MsgError = "Detalle Reembolso Personal Excedente" MsgError = "Detalle Reembolso Personal Excedente"
End If End If
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, SaldoExcedente, Referencia, 29, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaPersonal, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CveCuenta:=CveCuentaPersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaPago, True, SaldoExcedente, Referencia, 29, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaPersonal, -1, CveIE:=CveIEPago, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, SaldoExcedente), ImporteMX:=SaldoExcedente * tipoCambio, CvePersonal:=CvePersonal, CvePrePolizaOriginal:=CvePrePolizaPagoOriginal) Then
MsgError = "Detalle Reembolso Personal Excedente" MsgError = "Detalle Reembolso Personal Excedente"
End If End If
End If End If
End If End If
'Unificamos el cheque y la caja chica con los pagos y facturas 'Unificamos el cheque y la caja chica con los pagos y facturas
If Not IdPoliza > 0 AndAlso Not gvr.DataKey("IdPoliza").ToEntero > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(219) = "1" Then If MsgError = "" AndAlso Not IdPoliza > 0 AndAlso Not gvr.DataKey("IdPoliza").ToEntero > 0 AndAlso UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
If MsgError = "" Then If MsgError = "" Then
'CvePrePolizaUnificar = CvePrePolizaPago 'CvePrePolizaUnificar = CvePrePolizaPago
''codigo temoral, RMF. falta criterio de unificacion, en una póliza nueva de diario ''codigo temoral, RMF. falta criterio de unificacion, en una póliza nueva de diario
@@ -1023,7 +982,7 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
'CHEQUE EXCEDENTE - NUEVO 'CHEQUE EXCEDENTE - NUEVO
If ChkChequeExcedente.Checked And ImportePagar > 0 Then If MsgError = "" AndAlso ChkChequeExcedente.Checked And ImportePagar > 0 Then
ImporteMovto = ImportePagar ImporteMovto = ImportePagar
If ImportePagar = ImporteOriginal Then If ImportePagar = ImporteOriginal Then
@@ -1038,7 +997,7 @@ Partial Class Compras_ReembolsosComprobaciones
If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL Else PorcentajePago = 1 If gvr.DataKey("Original").ToDecimal > 0 Then PorcentajePago = (ImporteMovto / gvr.DataKey("Original").ToDecimal).RoundSQL Else PorcentajePago = 1
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, ImporteMovto, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=(ImporteMovto * tipoCambio), CveCuenta:=CveCuentaProveedor) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, ImporteMovto, Referencia, CveConceptoContablePago, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, ImporteMovto), ImporteMX:=(ImporteMovto * tipoCambio)) Then
MsgError = "Detalle" MsgError = "Detalle"
Exit For Exit For
Else Else
@@ -1048,7 +1007,7 @@ Partial Class Compras_ReembolsosComprobaciones
'Otros Ingresos 'Otros Ingresos
If ChkAjusteOI.Checked Then If ChkAjusteOI.Checked Then
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, UsuarioActual.Empresa.IdCuentaOtrosIngresos, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio, CveCuenta:=CveCuentaProveedor) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.FCTextBox("TxtComision").Text.ToDecimal, Referencia, UsuarioActual.Empresa.IdCuentaOtrosIngresos, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaProveedor, -1, CveIE:=CveIERegistrado, CvePersonal:=CvePersonal, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveSubProyecto:=gvr.DataKey("CveSubProyecto").ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.FCTextBox("TxtComision").Text.ToDecimal), ImporteMX:=gvr.FCTextBox("TxtComision").Text.ToDecimal * tipoCambio) Then
MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos" MsgError = "no se pudo insertar el detalle de la poliza de otros ingresos"
End If End If
End If End If
@@ -1108,110 +1067,59 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
If MsgError = "" AndAlso gvr.DataKey("RetIVA").ToDecimal > 0 Then If MsgError = "" AndAlso gvr.DataKey("RetIVA").ToDecimal > 0 Then
Dim ConceptoContableRetIVAXAcreditar = 0, ConceptoContableRetIVAAcreditable = 0, IdCtaContableRetIVAXAcreditar = 0, IdCtaContableRetIVAAcreditable = 0 Dim ConceptoContableRetIVAXAcreditar = 0, ConceptoContableRetIVAAcreditable = 0, IdCtaContableRetIVAXAcreditar = 0, IdCtaContableRetIVAAcreditable = 0, CveFunc = 0, CveFuncAcreditable = 0
Select Case gvr.DataKey("CveRetIVAConcepto").ToEntero Select Case gvr.DataKey("CveRetIVAConcepto").ToEntero
Case 1 Case 1
ConceptoContableRetIVAXAcreditar = 15 ConceptoContableRetIVAXAcreditar = 15
ConceptoContableRetIVAAcreditable = 22 ConceptoContableRetIVAAcreditable = 22
If IdCtaRetIVA > 0 Then CveFunc = 307
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 308
ElseIf UsuarioActual.Empresa.Funcionalidad(307).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(307).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(308).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(308).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 2 Case 2
ConceptoContableRetIVAXAcreditar = 183 ConceptoContableRetIVAXAcreditar = 183
ConceptoContableRetIVAAcreditable = 184 ConceptoContableRetIVAAcreditable = 184
If IdCtaRetIVA > 0 Then CveFunc = 309
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 310
ElseIf UsuarioActual.Empresa.Funcionalidad(309).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(309).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(310).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(310).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 3 Case 3
ConceptoContableRetIVAXAcreditar = 185 ConceptoContableRetIVAXAcreditar = 185
ConceptoContableRetIVAAcreditable = 186 ConceptoContableRetIVAAcreditable = 186
If IdCtaRetIVA > 0 Then CveFunc = 311
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 312
ElseIf UsuarioActual.Empresa.Funcionalidad(311).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(311).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(312).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(312).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
Case 4 Case 4
ConceptoContableRetIVAXAcreditar = 248 ConceptoContableRetIVAXAcreditar = 248
ConceptoContableRetIVAAcreditable = 249 ConceptoContableRetIVAAcreditable = 249
If IdCtaRetIVA > 0 Then CveFunc = 313
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA CveFuncAcreditable = 314
ElseIf UsuarioActual.Empresa.Funcionalidad(313).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(313).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(314).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(314).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End Select End Select
If UsuarioActual.Empresa.TipoContabilidad = 2 Then
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAXAcreditar = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(CveFunc).ToEntero > 0 Then
IdCtaContableRetIVAXAcreditar = UsuarioActual.Empresa.Funcionalidad(CveFunc).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAXAcreditar, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAXAcreditar = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
If IdCtaRetIVA > 0 Then
IdCtaContableRetIVAAcreditable = IdCtaRetIVA
ElseIf UsuarioActual.Empresa.Funcionalidad(CveFuncAcreditable).ToEntero > 0 Then
IdCtaContableRetIVAAcreditable = UsuarioActual.Empresa.Funcionalidad(CveFuncAcreditable).ToEntero
Else
If ObjMov.GetRetCuenta(ConceptoContableRetIVAAcreditable, UsuarioActual.CveEmpresa) Then
If ObjMov.DtResultados.Rows.Count > 0 Then
IdCtaContableRetIVAAcreditable = ObjMov.DtResultados.Rows(0)("IdCuentaRetIVACirculacion").ToString.ToEntero
End If
End If
End If
End If
'Agrego el RetIVA 'Agrego el RetIVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetIVAXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetIVAXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetIVA").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetIVA").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle" MsgError = "Detalle"
@@ -1223,10 +1131,44 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
End If End If
Dim AcreditaISR As Boolean = False
If UsuarioActual.CveEmpresa = 140 Then AcreditaISR = True
If MsgError = "" AndAlso AcreditaISR AndAlso gvr.DataKey("RetISR").ToDecimal > 0 Then
Dim ConceptoContableRetISRXAcreditar = 0, ConceptoContableRetISRAcreditable = 0, IdCtaContableRetISRXAcreditar = 0, IdCtaContableRetISRAcreditable = 0, CveFunc = 0, CveFuncAcreditable = 0
Select Case gvr.DataKey("CveRetIVAConcepto").ToEntero
Case 1
ConceptoContableRetISRXAcreditar = 16
ConceptoContableRetISRAcreditable = 23
Case 2
ConceptoContableRetISRXAcreditar = 243
ConceptoContableRetISRAcreditable = 244
CveFunc = 309
CveFuncAcreditable = 310
Case 3
ConceptoContableRetISRXAcreditar = 327
ConceptoContableRetISRAcreditable = 328
CveFunc = 311
End Select
'Agrego el RetIVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, False, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRXAcreditar, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRXAcreditar, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
'Agrego el RetIVA
If Not ObjMov.AddPrePolizasDetalle(CvePrePolizaExcedente, True, gvr.DataKey("RetISR").ToDecimal * PorcentajePago, Referencia, ConceptoContableRetISRAcreditable, ConceptoMovimiento, gvr.FCLiteral("LtlFecha").Text.ToDate, IdCtaContableRetISRAcreditable, -1, CveIE:=CveIEExcedente, CveCompra:=gvr.FCHyperLink("HplF2").Text.ToEntero, CveProveedor:=gvr.FCHyperLink("HLProv").Text.ToEntero, ImporteME:=If(tipoCambio = 1, 0, gvr.DataKey("RetISR").ToDecimal * PorcentajePago), ImporteMX:=(gvr.DataKey("RetISR").ToDecimal * PorcentajePago) * tipoCambio, CvePrePolizaOriginal:=CvePrePolizaExcedente, CvePersonal:=CvePersonal) Then
MsgError = "Detalle"
End If
End If
End If End If
If ImportePagar = ImporteOriginal Then If MsgError = "" AndAlso ImportePagar = ImporteOriginal Then
'Unificamos el cheque y la caja chica con los pagos y facturas 'Unificamos el cheque y la caja chica con los pagos y facturas
If gvr.DataKey("IdPoliza").ToEntero = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(219) = "1" Then If gvr.DataKey("IdPoliza").ToEntero = 0 AndAlso UsuarioActual.Empresa.Funcionalidad(219) = "1" Then
If Not ObjMov.PrePolizaUnificacion(CvePrePolizaExcedente, CvePrePolizaPago) Then If Not ObjMov.PrePolizaUnificacion(CvePrePolizaExcedente, CvePrePolizaPago) Then
@@ -1277,7 +1219,6 @@ Partial Class Compras_ReembolsosComprobaciones
End If End If
If MsgError.Trim = "" Then If MsgError.Trim = "" Then
'Conta SIG AUTOMATICA
Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1" Dim AutoConta As Boolean = UsuarioActual.Empresa.Funcionalidad(200) = "1"
If UsuarioActual.CveEmpresa = 119 Then If UsuarioActual.CveEmpresa = 119 Then
@@ -1358,12 +1299,21 @@ Partial Class Compras_ReembolsosComprobaciones
If CvePrePolizaExcedente > 0 Then If CvePrePolizaExcedente > 0 Then
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIEExcedente))) Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> Cheque: <a target='_blank' href=/Bancos/IE.aspx?CveIE={0}>{1}</a> <br/><br/> <a target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={2}"">Imprimir</a>", CveIEExcedente, TxtFolio.Text, Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIEExcedente)))
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
Else
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", CvePrePolizaExcedente, ObjMov.ContaFolio)
End If
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
Else Else
Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIERegistrado))) Mensaje.AppendFormat("Abono Registrado Correctamente. <br/><br/> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir</a>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIERegistrado)))
If CvePrePolizaIERegistrado > 0 Then If CvePrePolizaIERegistrado > 0 Then
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio) If UsuarioActual.Empresa.TipoContabilidad = 2 Then
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPoliza.aspx?IdPoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", ObjMov.ContaIdPoliza, ObjMov.ContaFolio)
Else
Mensaje.AppendFormat("</br> <br/>Póliza: <b> <a href='/Contabilidad/RegPrePolizas.aspx?CvePrePoliza={0}' class='Texto' target='_blank'>{1}</a><br/>", CvePrePolizaIERegistrado, ObjMov.ContaFolio)
End If
End If End If
Alert(Mensaje.ToString, TipoMensaje.MsgInformacion) Alert(Mensaje.ToString, TipoMensaje.MsgInformacion)
End If End If
@@ -1735,163 +1685,19 @@ Partial Class Compras_ReembolsosComprobaciones
#Region "VIATICOS" #Region "VIATICOS"
Protected Sub ChkAplicaViatico_CheckedChanged(sender As Object, e As EventArgs) Protected Sub ChkAplicaViatico_CheckedChanged(sender As Object, e As EventArgs)
If ChkAplicaViatico.Checked Then ' If ChkAplicaViatico.Checked Then
Dim Retorno = TimbrarNomina12(DdlPersonal.SelectedValue.ToEntero) ' Dim Retorno = TimbrarNomina12(DdlPersonal.SelectedValue.ToEntero)
If Retorno <> "" Then ' If Retorno <> "" Then
Alert(Retorno, TipoMensaje.MsgError) ' Alert(Retorno, TipoMensaje.MsgError)
Else ' Else
Dim SerieFolio = $"VIA-{Folio}" ' Dim SerieFolio = $"VIA-{Folio}"
Dim Msg As New StringBuilder ' Dim Msg As New StringBuilder
Msg.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlVIA&SERIEFOLIO={0}&TIPO={1}", SerieFolio, "Viaticos Comprobados"))) ' Msg.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar XML</a></li></ul>", Encripta(String.Format("OP=DesXmlVIA&SERIEFOLIO={0}&TIPO={1}", SerieFolio, "Viaticos Comprobados")))
Alert(Msg.ToString) ' Alert(Msg.ToString)
End If ' End If
End If ' End If
End Sub End Sub
Private Function TimbrarNomina12(CvePersonal As Integer) As String
Dim Retorno As String = ""
UsuarioActual.Empresa.CvePAC = 2
Dim sw As New Diagnostics.Stopwatch
sw.Start()
Select Case UsuarioActual.Empresa.CvePAC
Case 1
'Retorno = TimbrarBIInformNomina12(CveNomina, CvePersonal, CvePeriodo)
Case 2, 4
Dim cfdi As CFDITimbre = PreTimbrar(CvePersonal)
If cfdi Is Nothing Then
sw.Stop()
Return "No tiene asignado un folio de viaticos"
End If
If cfdi IsNot Nothing AndAlso cfdi.Mensaje = "" Then
Dim ObjTimbrado As New Timbrado
Dim ObjFactura As New Modelos.Factura
ObjFactura.TipoDocto = "Viaticos Comprobados"
ObjFactura.Folio = cfdi.Comprobante.Folio.ToEntero
ObjFactura.Serie = cfdi.Comprobante.Serie
ObjFactura.Timbre = cfdi
If Not ObjTimbrado.TimbrarFactura(UsuarioActual, ObjFactura) Then
Retorno = ObjTimbrado.MensajeErrorCFDI
End If
'Retorno = TimbrarFacturaRealVirtual(cfdi, UsuarioActual)
If Retorno <> "" Then
Retorno = $"{Retorno} - {cfdi.Receptor.Nombre}"
Else
'Genero la addenda Ford
' GeneraPDFNuevo(String.Format("{0}XML\Nomina\{1}.xml", Ruta, NominaFolio), CvePersonal, CvePeriodo)
End If
Else
Retorno = $"No se pudo generar el pretimbre: <br/> {cfdi.Mensaje}"
End If
End Select
sw.Stop()
GuardaLogTimbrado(sw.ElapsedMilliseconds.ToString, UsuarioActual.Empresa.CvePAC, "Nomina")
Return Retorno
End Function
Private Function PreTimbrar(CvePersonal As Integer) As CFDITimbre
Dim cfdi As New CFDITimbre
Dim ObjFolio As New ClsGralFolios
If ObjFolio.GetFolios("VIA", UsuarioActual.CveEmpresa) Then
If ObjFolio.DtResultados.Rows.Count > 0 Then
Folio = ObjFolio.DtResultados.Rows(0)("FActual").ToString
Else
ObjFolio.Dispose()
Return Nothing
End If
End If
ObjFolio.Dispose()
Dim objPersonal As New ClsRH
objPersonal.GetPersonal(CvePersonal, UsuarioActual.CveEmpresa)
Dim AntiguedadSemanas As Integer = DateDiff(DateInterval.Weekday, objPersonal.FechaIngreso, Now).ToEntero
cfdi.Nomina = New CFDINomina
cfdi.Nomina.Version = "1.2"
cfdi.Nomina.TipoNomina = "E"
cfdi.Nomina.FechaPago = LtChequeFecha.Text.ToDate
cfdi.Nomina.FechaInicio = LtChequeFecha.Text
cfdi.Nomina.FechaFin = LtChequeFecha.Text
cfdi.Nomina.NumDiasPagados = 1
cfdi.Emisor.Nombre = UsuarioActual.Empresa.Empresa
cfdi.Emisor.RFC = UsuarioActual.Empresa.RFC
cfdi.Emisor.RegistroPatronal = objPersonal.DtResultados.Rows(0)("RegistroPatronal").ToString()
cfdi.Emisor.RegimenFiscal = UsuarioActual.Empresa.CodigoRegimenFiscal
'aplica persona fisica debe de tener CURP
If cfdi.Emisor.RegimenFiscal.Contiene("605", "606", "608", "611", "612", "614", "616", "621", "622", "629", "630", "615") Then
cfdi.Emisor.CURP = UsuarioActual.Empresa.CURP
End If
cfdi.Receptor.UsoCFDI = "P01"
cfdi.Receptor.RFC = objPersonal.RFC
cfdi.Receptor.Nombre = objPersonal.NombreCompleto
Dim ObjDeducciones As New List(Of CFDINominaDeducciones)
ObjDeducciones.Add(New CFDINominaDeducciones With {.TipoDeduccion = "081",
.Clave = "081",
.Concepto = "Ajuste de viáticos entregados al trabajador",
.Importe = TxtChequeSaldo.Text.ToDecimal}
)
If ObjDeducciones IsNot Nothing AndAlso ObjDeducciones.Count > 0 Then cfdi.Nomina.Deducciones = ObjDeducciones
Dim ObjPercepcion As New List(Of CFDINominaPercepciones)
ObjPercepcion.Add(New CFDINominaPercepciones With {.TipoPercepcion = "050",
.Clave = "050",
.Concepto = "Viáticos",
.ImporteExento = TxtChequeSaldo.Text.ToDecimal,
.ImporteGravado = 0}
)
If ObjPercepcion IsNot Nothing AndAlso ObjPercepcion.Count > 0 Then cfdi.Nomina.Percepciones = ObjPercepcion
cfdi.Comprobante.Version = "3.3"
cfdi.Comprobante.Serie = "VIA"
cfdi.Comprobante.Folio = Folio
cfdi.Comprobante.Fecha = Now
cfdi.Comprobante.Subtotal = TxtChequeSaldo.Text.ToDecimal
cfdi.Comprobante.Descuentos = cfdi.Nomina.TotalDeducciones.ToDecimal
cfdi.Comprobante.Total = TxtChequeSaldo.Text.ToDecimal - cfdi.Nomina.TotalDeducciones.ToDecimal
cfdi.Comprobante.MotivoDescuento = ""
cfdi.Comprobante.Moneda = "MXN"
cfdi.Comprobante.TipoComprobante = "N"
cfdi.Comprobante.TipoDocto = "Egs"
cfdi.Comprobante.MetodoPago = "PUE"
cfdi.Comprobante.CondicionesdePago = ""
cfdi.Comprobante.FormadePago = "99"
cfdi.Comprobante.LugarExpedicion = UsuarioActual.Empresa.CP.ToString
cfdi.Comprobante.NumCuentaPago = ""
cfdi.Nomina.Receptor.CURP = objPersonal.CURP
cfdi.Nomina.Receptor.NSS = objPersonal.NumeroSS
cfdi.Nomina.Receptor.FechaInicioContrato = objPersonal.FechaInicioContrato.ToShortDateString
cfdi.Nomina.Receptor.Antiguedad = $"P{AntiguedadSemanas}W"
cfdi.Nomina.Receptor.TipoContrato = objPersonal.CodigoTipoContrato
cfdi.Nomina.Receptor.CodigoTipoJornada = objPersonal.ClaveTipoJornada
cfdi.Nomina.Receptor.CodigoRegimenContratacion = If(objPersonal.CveRegimenContratacion = "", "99", objPersonal.CveRegimenContratacion)
cfdi.Nomina.Receptor.CodigoEmpleado = objPersonal.Codigo
cfdi.Nomina.Receptor.Departamento = objPersonal.Departamento
cfdi.Nomina.Receptor.Puesto = objPersonal.Puesto
cfdi.Nomina.Receptor.CodigoRiesgoPuesto = If(objPersonal.CveSATRiesgoPuesto.ToString = "0", "99", objPersonal.CveSATRiesgoPuesto.ToString)
cfdi.Nomina.Receptor.TipoPeriodo = objPersonal.TipoPeriodoPago
cfdi.Nomina.Receptor.CodigoBanco = objPersonal.ClaveBanco
cfdi.Nomina.Receptor.NumeroCuenta = objPersonal.BancoNumCuenta
cfdi.Nomina.Receptor.SDI = objPersonal.SDI
cfdi.Nomina.Receptor.SBC = objPersonal.SDI
cfdi.Nomina.Receptor.Sindicalizado = ""
cfdi.Nomina.Receptor.CodigoEntidadFederativa = objPersonal.ClaveEstado
cfdi.Conceptos.Add(New CFDIConceptos With {.Cantidad = 1, .ClaveUnidad = "ACT", .ClaveProdServ = "84111505", .Descripcion = "Pago de nómina", .ValorUnitario = cfdi.Nomina.TotalPercepciones + cfdi.Nomina.TotalOtrosPagos, .Importe = cfdi.Nomina.TotalPercepciones + cfdi.Nomina.TotalOtrosPagos, .Descuento = cfdi.Nomina.TotalDeducciones.ToDecimal})
objPersonal.Dispose()
Return cfdi
End Function
#End Region #End Region

View File

@@ -553,7 +553,7 @@ Partial Class Contabilidad2_CatCuentas
item.Controls.Add(objul) item.Controls.Add(objul)
End If End If
ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text)) ArbolCuentas.additem(objul, idnew, IDSelected, String.Format("{0} - {1}", TxtCuenta.Text, Tnombre.Text))
CargaDatos()
End If End If
End If End If
If ObjConta2 IsNot Nothing Then ObjConta2.Dispose() If ObjConta2 IsNot Nothing Then ObjConta2.Dispose()
@@ -568,6 +568,8 @@ Partial Class Contabilidad2_CatCuentas
If Not TieneError Then If Not TieneError Then
ObjConta.Commit() ObjConta.Commit()
CargaDatos()
LimpiarCampos() LimpiarCampos()
updatos.Update() updatos.Update()
Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion) Alert("La cuenta se guardo correctamente", TipoMensaje.MsgInformacion)

View File

@@ -9,7 +9,16 @@
text-overflow: ellipsis; text-overflow: ellipsis;
} }
table{
border:none!important;
}
tr{
border:none!important;
}
td{
border:none!important;
}
</style> </style>
</asp:Content> </asp:Content>
@@ -128,21 +137,29 @@
</asp:UpdatePanel> </asp:UpdatePanel>
<br /> <br />
<div class="text-right"> <%-- <div class="text-right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" /> <input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a> <a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div> </div>--%>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" style="margin-left: 15px; margin-right: 15px;"> <div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
</div>
<asp:UpdatePanel ID="UpDatos" UpdateMode="Conditional" runat="server" >
<ContentTemplate> <ContentTemplate>
<asp:GridView ID="GvDatos" runat="server" CssClass="table table-smallpadding table-hover table-striped ScrollAD mysmallbtn Widthall" data-heighterror="375" data-freezecols="0" data-freezerows="-1" <asp:GridView ID="GvDatos" runat="server"
ShowHeader="True" ShowHeaderWhenEmpty="true" AllowPaging="False" ShowFooter="False" GridLines="None" EmptyDataText="No se encontrarios movimientos." AutoGenerateColumns="False" DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound"> CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" AutoGenerateColumns="False"
EmptyDataText="No se encontrarios movimientos."
DataKeyNames="" OnRowDataBound="GvDatos_RowDataBound">
<Columns> <Columns>
<asp:TemplateField ControlStyle-CssClass="Widthall"> <asp:TemplateField ControlStyle-CssClass="Widthall">
<HeaderTemplate> <HeaderTemplate>
<table width="100%"> <table width="100%" style="border:none">
<tr> <tr>
<td colspan="3"><font size="2">Cuenta</font></td> <td colspan="3"><font size="2">Cuenta</font></td>
<td colspan="1"><font size="2">Nombre</font></td> <td colspan="1"><font size="2">Nombre</font></td>
@@ -166,7 +183,7 @@
</HeaderTemplate> </HeaderTemplate>
<%-- <HeaderStyle />--%> <%-- <HeaderStyle />--%>
<ItemTemplate> <ItemTemplate>
<table width="100%" border="0" style="border-spacing: 0px;"> <table width="100%" " style="border:none">
<tr runat="server" id="tr1"> <tr runat="server" id="tr1">
<td colspan="3" align="left" width="180px"> <td colspan="3" align="left" width="180px">
<asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label> <asp:Label ID="LbCuenta" runat="server" Text='<%# Eval("Codigo")%>'></asp:Label>
@@ -223,7 +240,6 @@
<ItemStyle /> <ItemStyle />
</asp:TemplateField> </asp:TemplateField>
</Columns> </Columns>
<HeaderStyle Font-Bold="true" HorizontalAlign="Center" />
</asp:GridView> </asp:GridView>
</ContentTemplate> </ContentTemplate>
@@ -238,101 +254,6 @@
<asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content4" ContentPlaceHolderID="JS" runat="Server">
<script type="text/javascript"> <script type="text/javascript">
<%-- function pageLoad(sender, args) {
}
$(function () {
//Genero las cuentas en el arreglo
var ArrCuentas = [<%= WSCuentas()%>];
$("#TxtCuenta").autocomplete({
minLength: 0,
source: ArrCuentas,
focus: function (event, ui) {
$("#TxtCuenta").val(ui.item.label);
$("#HdnCveCuenta").val(ui.item.value);
return false;
},
select: function (event, ui) {
$("#TxtCuenta").val(ui.item.label);
$("#HdnCveCuenta").val(ui.item.value);
//$("#project-description").html(ui.item.desc);
//$("#project-icon").attr("src", "images/" + ui.item.icon);
return false;
}
})
//.autocomplete("instance")._renderItem = function (ul, item) {
// return $("<li>")
// .append("<a>" + item.label + "</a>")
// .appendTo(ul);
//};
});
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
$('input[type=text]').on('keydown', function (e) {
// Si la tecla ENTER es presionada...
if (e.keyCode === 13) {
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
if (nextField.length > 0) { // Si se encontró un elemento:
nextField.focus(); // Hacerle focus / seleccionarlo
nextField.select();
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
}
}
});
// Al presionar cualquier tecla en cualquier campo de texto, ejectuamos la siguiente funcion
$('select').on('keydown', function (e) {
// Si la tecla ENTER es presionada...
if (e.keyCode === 13) {
var currentTabIndex = $(this).attr('tabindex'); // Obtenemos el número del tabindex del campo actual
var nextTabIndex = parseInt(currentTabIndex) + 1; // Le sumamos 1
var nextField = $('[tabindex=' + nextTabIndex + ']'); // Obtenemos (si existe) el siguiente elemento que usando nextTabIndex
if (nextField.length > 0) { // Si se encontró un elemento:
nextField.focus(); // Hacerle focus / seleccionarlo
nextField.select();
e.preventDefault(); // Ignorar el funcionamiento predeterminado (enviar el formulario)
}
}
});
$('#Buscar').keyup(function () {
var texto = $('#Buscar').val();
$('#<%=GvDatos.ClientID%> > tbody > tr').css({ 'display': 'none' });
$("#<%=GvDatos.ClientID%> > tbody > tr:contains('" + texto + "')").css({ 'display': '' });
$('#<%=GvDatos.ClientID%> > tbody > tr:nth-child(1)').css({ 'display': 'none' });
});--%>
//function Enable() {
// var Producto = $get("DdlTipoCuentas").value;
// if (Producto == "-2") {
// document.getElementById("TxtCuenta").disabled = false;
// //document.getElementById("TxtCuenta").focus();
// //alert(Producto);
// }
// else {
// document.getElementById("TxtCuenta").value = " ";
// document.getElementById("TxtCuenta").disabled = true;
// }
//}
</script> </script>
</asp:Content> </asp:Content>

View File

@@ -1212,7 +1212,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
</TablixCells> </TablixCells>
@@ -2853,6 +2852,18 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="RegimenFiscalCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="compuescuadron"> <EmbeddedImage Name="compuescuadron">

View File

@@ -552,7 +552,7 @@
<BreakLocation>Start</BreakLocation> <BreakLocation>Start</BreakLocation>
</PageBreak> </PageBreak>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>7.78895in</Top> <Top>7.66395in</Top>
<Left>0.18226in</Left> <Left>0.18226in</Left>
<Height>4.422in</Height> <Height>4.422in</Height>
<Width>7.87128in</Width> <Width>7.87128in</Width>
@@ -882,7 +882,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Regimen fiscal: </Value> <Value>Reg.fiscal: </Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize> <FontSize>9pt</FontSize>
@@ -901,7 +901,7 @@
<Value>=Parameters!RegimenFiscalCodigo.Value</Value> <Value>=Parameters!RegimenFiscalCodigo.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>9pt</FontSize> <FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight> <FontWeight>Normal</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
@@ -1150,7 +1150,7 @@
</Image> </Image>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>3.57076in</Top> <Top>3.44576in</Top>
<Left>0.02339in</Left> <Left>0.02339in</Left>
<Height>1.21305in</Height> <Height>1.21305in</Height>
<Width>8.22763in</Width> <Width>8.22763in</Width>
@@ -1243,12 +1243,33 @@
</TextRuns> </TextRuns>
<Style /> <Style />
</Paragraph> </Paragraph>
<Paragraph>
<TextRuns>
<TextRun>
<Value>Regimen General de Ley Personas Morales</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>6.7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>6.7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns>
<Style />
</Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox32</rd:DefaultName> <rd:DefaultName>Textbox32</rd:DefaultName>
<Top>2.84726cm</Top> <Top>2.84726cm</Top>
<Left>0.08425cm</Left> <Left>0.08425cm</Left>
<Height>2.1447cm</Height> <Height>2.50687cm</Height>
<Width>4.08234cm</Width> <Width>4.12431cm</Width>
<ZIndex>3</ZIndex> <ZIndex>3</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -1500,29 +1521,13 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Régimen fiscal: </Value> <Value />
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>8.7pt</FontSize> <FontSize>8.7pt</FontSize>
<FontWeight>SemiBold</FontWeight> <FontWeight>SemiBold</FontWeight>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>Regimen General de Ley Personas Morales</Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8.7pt</FontSize>
<FontWeight>Normal</FontWeight>
</Style>
</TextRun>
<TextRun>
<Value xml:space="preserve"> </Value>
<Style>
<FontFamily>Myriad Pro</FontFamily>
<FontSize>8.7pt</FontSize>
<FontWeight>Bold</FontWeight>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style> <Style>
<TextAlign>Right</TextAlign> <TextAlign>Right</TextAlign>
@@ -1532,7 +1537,7 @@
<rd:DefaultName>Textbox4</rd:DefaultName> <rd:DefaultName>Textbox4</rd:DefaultName>
<Top>0.05022in</Top> <Top>0.05022in</Top>
<Left>5.05067in</Left> <Left>5.05067in</Left>
<Height>1.62345in</Height> <Height>1.31095in</Height>
<Width>3.21285in</Width> <Width>3.21285in</Width>
<ZIndex>4</ZIndex> <ZIndex>4</ZIndex>
<Style> <Style>
@@ -1642,9 +1647,9 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox40</rd:DefaultName> <rd:DefaultName>Textbox40</rd:DefaultName>
<Top>4.25cm</Top> <Top>3.615cm</Top>
<Left>13.26812cm</Left> <Left>13.26812cm</Left>
<Height>1.42163cm</Height> <Height>1.61889cm</Height>
<Width>7.72123cm</Width> <Width>7.72123cm</Width>
<ZIndex>5</ZIndex> <ZIndex>5</ZIndex>
<Style> <Style>
@@ -2240,7 +2245,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -2324,7 +2328,7 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>=iif(cdbl(Fields!ImporteIVA.Value) &gt; 0, Fields!ImporteIVA.Value &amp; "(" &amp; cdbl(Fields!PorcentajeIVA.Value) * 100 &amp; "%)","")</Value> <Value>=iif(cdbl(Fields!ImporteIVA.Value) &gt; 0, Format(Fields!ImporteIVA.Value,"###,###,###.00") &amp; "(" &amp; cdbl(Fields!PorcentajeIVA.Value) * 100 &amp; "%)","")</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontFamily>Myriad Pro</FontFamily>
<FontSize>7.5pt</FontSize> <FontSize>7.5pt</FontSize>
@@ -2453,7 +2457,7 @@
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DsOC</DataSetName> <DataSetName>DsOC</DataSetName>
<Top>2.25503in</Top> <Top>2.13003in</Top>
<Left>0.04048in</Left> <Left>0.04048in</Left>
<Height>0.34081in</Height> <Height>0.34081in</Height>
<Width>8.21054in</Width> <Width>8.21054in</Width>
@@ -2479,7 +2483,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>6.77831cm</Top> <Top>6.46081cm</Top>
<Left>0.10282cm</Left> <Left>0.10282cm</Left>
<Height>0.14316cm</Height> <Height>0.14316cm</Height>
<Width>20.88652cm</Width> <Width>20.88652cm</Width>
@@ -2512,7 +2516,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>7.54968cm</Top> <Top>7.23218cm</Top>
<Left>15.05252cm</Left> <Left>15.05252cm</Left>
<Height>0.14316cm</Height> <Height>0.14316cm</Height>
<Width>5.93682cm</Width> <Width>5.93682cm</Width>
@@ -2549,7 +2553,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>ImporteLetra</rd:DefaultName> <rd:DefaultName>ImporteLetra</rd:DefaultName>
<Top>3.07034in</Top> <Top>2.94534in</Top>
<Left>2.02374in</Left> <Left>2.02374in</Left>
<Height>0.18861in</Height> <Height>0.18861in</Height>
<Width>6.23978in</Width> <Width>6.23978in</Width>
@@ -2579,7 +2583,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>8.43074cm</Top> <Top>8.11324cm</Top>
<Left>0.07107cm</Left> <Left>0.07107cm</Left>
<Height>0.1cm</Height> <Height>0.1cm</Height>
<Width>20.88652cm</Width> <Width>20.88652cm</Width>
@@ -2610,7 +2614,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>12.32551cm</Top> <Top>12.00801cm</Top>
<Left>0.10282cm</Left> <Left>0.10282cm</Left>
<Height>0.14316cm</Height> <Height>0.14316cm</Height>
<Width>20.85477cm</Width> <Width>20.85477cm</Width>
@@ -2644,7 +2648,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>7.0273cm</Top> <Top>6.7098cm</Top>
<Left>5.1403cm</Left> <Left>5.1403cm</Left>
<Height>0.34219cm</Height> <Height>0.34219cm</Height>
<Width>9.73903cm</Width> <Width>9.73903cm</Width>
@@ -2762,7 +2766,7 @@
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DataSet1</DataSetName> <DataSetName>DataSet1</DataSetName>
<Top>6.99203cm</Top> <Top>6.67453cm</Top>
<Left>15.05252cm</Left> <Left>15.05252cm</Left>
<Height>0.48004cm</Height> <Height>0.48004cm</Height>
<Width>5.93682cm</Width> <Width>5.93682cm</Width>
@@ -3224,7 +3228,7 @@
</Tablix> </Tablix>
</ReportItems> </ReportItems>
<KeepTogether>true</KeepTogether> <KeepTogether>true</KeepTogether>
<Top>14.85441cm</Top> <Top>14.53691cm</Top>
<Left>0.10282cm</Left> <Left>0.10282cm</Left>
<Height>2.25247cm</Height> <Height>2.25247cm</Height>
<Width>20.89818cm</Width> <Width>20.89818cm</Width>
@@ -3282,7 +3286,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>8.5629cm</Top> <Top>8.2454cm</Top>
<Left>0.10282cm</Left> <Left>0.10282cm</Left>
<Height>0.34219cm</Height> <Height>0.34219cm</Height>
<Width>20.85477cm</Width> <Width>20.85477cm</Width>
@@ -3567,7 +3571,7 @@
</TablixMembers> </TablixMembers>
</TablixRowHierarchy> </TablixRowHierarchy>
<DataSetName>DataSet3</DataSetName> <DataSetName>DataSet3</DataSetName>
<Top>7.0273cm</Top> <Top>6.7098cm</Top>
<Left>0.10282cm</Left> <Left>0.10282cm</Left>
<Height>0.85604cm</Height> <Height>0.85604cm</Height>
<Width>4.74643cm</Width> <Width>4.74643cm</Width>
@@ -3690,7 +3694,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>12.64506cm</Top> <Top>12.32756cm</Top>
<Left>0.10282cm</Left> <Left>0.10282cm</Left>
<Height>2.03296cm</Height> <Height>2.03296cm</Height>
<Width>3.74249cm</Width> <Width>3.74249cm</Width>
@@ -3781,7 +3785,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>12.64506cm</Top> <Top>12.32756cm</Top>
<Left>3.84531cm</Left> <Left>3.84531cm</Left>
<Height>2.03295cm</Height> <Height>2.03295cm</Height>
<Width>5.75197cm</Width> <Width>5.75197cm</Width>
@@ -3906,7 +3910,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>12.64506cm</Top> <Top>12.32756cm</Top>
<Left>9.70311cm</Left> <Left>9.70311cm</Left>
<Height>2.03295cm</Height> <Height>2.03295cm</Height>
<Width>4.17266cm</Width> <Width>4.17266cm</Width>
@@ -3997,7 +4001,7 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox1</rd:DefaultName> <rd:DefaultName>Textbox1</rd:DefaultName>
<Top>12.64506cm</Top> <Top>12.32756cm</Top>
<Left>13.87577cm</Left> <Left>13.87577cm</Left>
<Height>2.03294cm</Height> <Height>2.03294cm</Height>
<Width>6.94061cm</Width> <Width>6.94061cm</Width>
@@ -4041,10 +4045,10 @@
</Paragraph> </Paragraph>
</Paragraphs> </Paragraphs>
<rd:DefaultName>Textbox5</rd:DefaultName> <rd:DefaultName>Textbox5</rd:DefaultName>
<Top>17.20919cm</Top> <Top>16.89169cm</Top>
<Left>17.68079cm</Left> <Left>17.31584cm</Left>
<Height>0.6cm</Height> <Height>0.65292cm</Height>
<Width>3.32021cm</Width> <Width>3.68516cm</Width>
<ZIndex>22</ZIndex> <ZIndex>22</ZIndex>
<Style> <Style>
<Border> <Border>
@@ -4057,7 +4061,7 @@
</Style> </Style>
</Textbox> </Textbox>
</ReportItems> </ReportItems>
<Height>31.01581cm</Height> <Height>30.69831cm</Height>
<Style> <Style>
<Border> <Border>
<Style>None</Style> <Style>None</Style>

View File

@@ -791,7 +791,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>
@@ -2334,6 +2333,18 @@
<AllowBlank>true</AllowBlank> <AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt> <Prompt>ReportParameter1</Prompt>
</ReportParameter> </ReportParameter>
<ReportParameter Name="CFDIVersion">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
<ReportParameter Name="RegimenFiscalCodigo">
<DataType>String</DataType>
<Nullable>true</Nullable>
<AllowBlank>true</AllowBlank>
<Prompt>ReportParameter1</Prompt>
</ReportParameter>
</ReportParameters> </ReportParameters>
<EmbeddedImages> <EmbeddedImages>
<EmbeddedImage Name="Logo119"> <EmbeddedImage Name="Logo119">

View File

@@ -297,7 +297,7 @@
<TextRun> <TextRun>
<Value>=Parameters!Serie.Value</Value> <Value>=Parameters!Serie.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Red</Color> <Color>Red</Color>
</Style> </Style>
@@ -313,7 +313,7 @@
<TextRun> <TextRun>
<Value>=Parameters!Folio.Value</Value> <Value>=Parameters!Folio.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Red</Color> <Color>Red</Color>
</Style> </Style>
@@ -1214,7 +1214,6 @@
<PaddingBottom>2pt</PaddingBottom> <PaddingBottom>2pt</PaddingBottom>
</Style> </Style>
</Textbox> </Textbox>
<rd:Selected>true</rd:Selected>
</CellContents> </CellContents>
</TablixCell> </TablixCell>
<TablixCell> <TablixCell>

View File

@@ -646,7 +646,7 @@
<TextRun> <TextRun>
<Value>=Parameters!Serie.Value</Value> <Value>=Parameters!Serie.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Red</Color> <Color>Red</Color>
</Style> </Style>
@@ -670,7 +670,7 @@
<TextRun> <TextRun>
<Value>=Parameters!Folio.Value</Value> <Value>=Parameters!Folio.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Red</Color> <Color>Red</Color>
</Style> </Style>

View File

@@ -446,7 +446,7 @@
<TextRun> <TextRun>
<Value>=Parameters!Serie.Value</Value> <Value>=Parameters!Serie.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Red</Color> <Color>Red</Color>
</Style> </Style>
@@ -462,7 +462,7 @@
<TextRun> <TextRun>
<Value>=Parameters!Folio.Value</Value> <Value>=Parameters!Folio.Value</Value>
<Style> <Style>
<FontFamily>Myriad Pro</FontFamily> <FontSize>12pt</FontSize>
<FontWeight>Bold</FontWeight> <FontWeight>Bold</FontWeight>
<Color>Red</Color> <Color>Red</Color>
</Style> </Style>

View File

@@ -2717,11 +2717,20 @@
<Paragraph> <Paragraph>
<TextRuns> <TextRuns>
<TextRun> <TextRun>
<Value>Ing. Soraida Mesinas Reyes.</Value> <Value>Ing. </Value>
<Style> <Style>
<FontSize>8pt</FontSize> <FontSize>8pt</FontSize>
</Style> </Style>
</TextRun> </TextRun>
<TextRun>
<Value>Ing. Hector Manuel Diaz Young</Value>
<Style>
<FontStyle>Normal</FontStyle>
<FontSize>8pt</FontSize>
<FontWeight>Normal</FontWeight>
<TextDecoration>None</TextDecoration>
</Style>
</TextRun>
</TextRuns> </TextRuns>
<Style> <Style>
<TextAlign>Center</TextAlign> <TextAlign>Center</TextAlign>

View File

@@ -231,11 +231,13 @@ Partial Class Inventarios_CatUnidades
If Not ErrorPrceso Then If Not ErrorPrceso Then
GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing GlobalDTInvCamiones(UsuarioActual.CveEmpresa) = Nothing
CargaDatos() CargaDatos()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarUnidad"))
UpDatos.Update()
End If End If
UpDatos.Update()
RegistraScript(String.Format("$('#{0}').modal('hide');", "DivAgregarUnidad"))
End Sub End Sub

View File

@@ -423,7 +423,7 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas
DdlUnidadRec.DataBind(); DdlUnidadRec.DataBind();
TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString(); TxtFechaI.Text = DateTime.Now.AddDays(-1).ToShortDateString();
TxtFechaF.Text = DateTime.Now.ToShortDateString(); TxtFechaF.Text = DateTime.Now.AddDays(3).ToShortDateString();
DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa); DdlChofer.DataSource = get_GlobalDTChoferes(UsuarioActual.CveEmpresa);
DdlChofer.DataBind(); DdlChofer.DataBind();

View File

@@ -339,8 +339,18 @@
<asp:HiddenField ID="HfCvePS" Value="" runat="server"/> <asp:HiddenField ID="HfCvePS" Value="" runat="server"/>
<asp:HiddenField ID="HfCveUM" Value="" runat="server"/> <asp:HiddenField ID="HfCveUM" Value="" runat="server"/>
<div class="form-group form-md-line-input input-iconright" id="DivSerieEdit" runat="server"> <div class="form-group form-md-line-input input-iconright" id="DivSerieEdit" runat="server">
<asp:TextBox ID="TxtSerieLote" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox>
<asp:TextBox ID="TxtSerieLote" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px" ClientIDMode="Static" ValidationGroup="GrpAgregaSerie" ></asp:TextBox>
<label for="<%= TxtSerieLote.ClientID.ToString()%>">Serie:</label> <label for="<%= TxtSerieLote.ClientID.ToString()%>">Serie:</label>
<asp:CustomValidator id="ReVTxtSerie" runat="server" ControlToValidate="TxtSerieLote" Display="Dynamic" ClientValidationFunction="TamanioSerie"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> debe tener un minimo de 6 caracteres." ValidationGroup="GrpAgregaSerie" />
<ajax:ValidatorCalloutExtender ID="VACOE1231" runat="server" HighlightCssClass="vco" TargetControlID="ReVTxtSerie" Width="300px" ></ajax:ValidatorCalloutExtender>
</div> </div>
<div class="form-group form-md-line-input input-iconright" id="DivLoteEdit" runat="server"> <div class="form-group form-md-line-input input-iconright" id="DivLoteEdit" runat="server">
<asp:TextBox ID="TxtLoteEdit" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox> <asp:TextBox ID="TxtLoteEdit" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="500" Width="175px"></asp:TextBox>
@@ -361,9 +371,11 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<asp:Button ID="BtnGuadarEditarPS" OnClick="BtnGuadarEditarPS_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpAgregaSerie" CausesValidation="true" Text="Guardar" />
<asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional"> <asp:UpdatePanel ID="UpFooter" runat="server" UpdateMode="Conditional">
<ContentTemplate> <ContentTemplate>
<asp:LinkButton ID="BtnGuadarEditarPS" OnClick="BtnGuadarEditarPS_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button> <button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
</ContentTemplate> </ContentTemplate>
</asp:UpdatePanel> </asp:UpdatePanel>
@@ -417,6 +429,15 @@
$('#GvIFD').parent().parent().children().first().css("position", "static"); $('#GvIFD').parent().parent().children().first().css("position", "static");
} }
function TamanioSerie(source, arguments) {
if (arguments.Value.trim().length >= 6) {
arguments.IsValid = true;
} else {
arguments.IsValid = false;
}
}
</script> </script>

View File

@@ -228,9 +228,9 @@ Partial Class Inventarios_Default
Private Sub CargarMedRin() Private Sub CargarMedRin()
Dim ObjGral As New ClsGenerales Dim ObjGral As New ClsGenerales
If ObjGral.GetMedidas(UsuarioActual.CveEmpresa) Then If ObjGral.GetMedidas(UsuarioActual.CveEmpresa) Then
DdlMedidas.DataSource = ObjGral.DtResultados DdlMedidas.DataSource = ObjGral.DtResultados.FiltraParametros("", Orderby:="Medida")
If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then If ObjGral.GetRimTamanios(UsuarioActual.CveEmpresa) Then
DdlRin.DataSource = ObjGral.DtResultados DdlRin.DataSource = ObjGral.DtResultados.FiltraParametros("", Orderby:="RinTamaño")
End If End If
End If End If
ObjGral.Dispose() ObjGral.Dispose()

View File

@@ -93,12 +93,13 @@
<ContentTemplate> <ContentTemplate>
<asp:HiddenField ClientIDMode="Static" runat="server" ID="HdnCveImpuesto" Value="-1" /> <asp:HiddenField ClientIDMode="Static" runat="server" ID="HdnCveImpuesto" Value="-1" />
<asp:GridView ID="GvImpuestos" runat="server" GridLines="None" DataKeyNames="CveImpuestoLocal,ImpuestoLocal,Porcentaje,Orden,Estatus,TipoImpuesto,IdCuentaImpuestoLocal,EstatusBol" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Impuestos Locales"> <asp:GridView ID="GvImpuestos" runat="server" GridLines="None" DataKeyNames="CveImpuestoLocal,ImpuestoLocal,Porcentaje,Orden,Estatus,TipoImpuesto,IdCuentaImpuestoLocal,EstatusBol,CveClasificacion" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Impuestos Locales">
<Columns> <Columns>
<asp:BoundField DataField="ImpuestoLocal" HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="ImpuestoLocal" HeaderText="Impuesto Local" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Porcentaje" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="Porcentaje" HeaderText="Porcentaje" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="Orden" HeaderText="Orden" ItemStyle-HorizontalAlign="Right" /> <asp:BoundField DataField="Orden" HeaderText="Orden" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField DataField="TipoImpuestoTexto" HeaderText="Tipo Impuesto" ItemStyle-HorizontalAlign="Left" /> <asp:BoundField DataField="TipoImpuestoTexto" HeaderText="Tipo Impuesto" ItemStyle-HorizontalAlign="Left" />
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" />
<asp:TemplateField ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable"> <asp:TemplateField ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Left" HeaderText="Cuenta Contable">
<ItemTemplate> <ItemTemplate>
<asp:Literal ID="LtlCuentaContable" runat="server" Text=""></asp:Literal> <asp:Literal ID="LtlCuentaContable" runat="server" Text=""></asp:Literal>
@@ -149,6 +150,7 @@
<asp:RequiredFieldValidator ID="RFVOrden" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtOrden" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden'</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator> <asp:RequiredFieldValidator ID="RFVOrden" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtOrden" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Orden'</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
<label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label> <label for="<%= TxtOrden.ClientID.ToString()%>">Orden:</label>
</div> </div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlTipoImpuesto" runat="server" CssClass="form-control select2me js-Impuesto-programmatic" Width="100%"> <asp:DropDownList ID="DdlTipoImpuesto" runat="server" CssClass="form-control select2me js-Impuesto-programmatic" Width="100%">
<asp:ListItem Value="1" Text="Impuesto Local Retenido"></asp:ListItem> <asp:ListItem Value="1" Text="Impuesto Local Retenido"></asp:ListItem>
@@ -159,7 +161,14 @@
</asp:DropDownList> </asp:DropDownList>
<label for="<%= DdlCuentasContables.ClientID.ToString()%>">Tipo Impuesto:</label> <label for="<%= DdlCuentasContables.ClientID.ToString()%>">Tipo Impuesto:</label>
</div> </div>
<br />
<div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlClasificacion" runat="server" CssClass="form-control select2me" Width="100%" DataTextField="Clasificacion" DataValueField="CveClasificacion" >
<asp:ListItem Value="-1" Text="Seleccione una"></asp:ListItem>
</asp:DropDownList>
<label for="<%= DdlClasificacion.ClientID.ToString()%>">Clasificación:</label>
</div>
<div class="form-group form-md-line-input input-iconright"> <div class="form-group form-md-line-input input-iconright">
<asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" CssClass="form-control select2me js-Cuentas-programmatic" CausesValidation="true" Width="100%"> <asp:DropDownList ID="DdlCuentasContables" runat="server" AppendDataBoundItems="true" DataTextField="CtaCodigo" DataValueField="Id" CssClass="form-control select2me js-Cuentas-programmatic" CausesValidation="true" Width="100%">
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem> <asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
@@ -193,7 +202,7 @@
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" /> <asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
</asp:Content> </asp:Content>
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server"> <asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
<script src="/Metronic/assets/global/scripts/datatable.js"></script> <%-- <script src="/Metronic/assets/global/scripts/datatable.js"></script>
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script> <script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
@@ -205,25 +214,6 @@
var DdlCuentasContables = '<%= DdlCuentasContables.ClientID%>'; var DdlCuentasContables = '<%= DdlCuentasContables.ClientID%>';
var ChkEstatus = '<%= ChkEstatus.ClientID%>'; var ChkEstatus = '<%= ChkEstatus.ClientID%>';
function ShowDivRegistro() {
$('#divAddImpuestoLocal').modal();
}
function OrdenarGV() {
var Tam = TamañoVentana();
var Alto = Tam.height - 270;
if (Alto < 100) {
Alto = 100;
}
$('#C_GvImpuestos').DataTable({
scrollY: Alto + 'px',
scrollCollapse: true,
paging: false,
searching: false,
info: false
});
$('#C_GvImpuestos').parent().parent().children().first().css("position", "static");
}
function CleanObjects() { function CleanObjects() {
@@ -247,7 +237,7 @@
var $cuenta = $(".js-Cuentas-programmatic").select2(); var $cuenta = $(".js-Cuentas-programmatic").select2();
$cuenta.val('-1').trigger("change"); $cuenta.val('-1').trigger("change");
} }--%>
</script> </script>

View File

@@ -38,9 +38,14 @@ Partial Class Ventas_CatImpuestosLocales
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
If Not Page.IsPostBack Then If Not Page.IsPostBack Then
CveImpuestoLocal = -1 CveImpuestoLocal = -1
DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(" Estatus = 'Activo' AND UsoClasificacion = 2 ")
DdlClasificacion.DataBind()
DdlClasificacion.Items.Insert(0, New ListItem("Seleccione una", "-1"))
CargaCuentasContables() CargaCuentasContables()
CargaDatos() CargaDatos()
OrdenaDatos()
End If End If
End Sub End Sub
@@ -75,49 +80,6 @@ Partial Class Ventas_CatImpuestosLocales
#Region "GV IMPUESTOS " #Region "GV IMPUESTOS "
'Protected Sub GvImpuestos_RowEditing(sender As Object, e As System.Web.UI.WebControls.GridViewEditEventArgs) Handles GvImpuestos.RowEditing
' GvImpuestos.EditIndex = e.NewEditIndex
' CargaDatos()
'End Sub
Protected Sub GvImpuestos_RowUpdating(sender As Object, e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvImpuestos.RowUpdating
Dim ObjVentas As New ClsVentas()
Dim TieneError = False
Dim CveImpuestoLocal As Integer = GvImpuestos.Rows(e.RowIndex).DataKey("CveImpuestoLocal").ToEntero
Dim Impuesto As String = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtImpuestoLocal").Text.Trim
Dim Porcentaje As Decimal = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtVentaPorcentaje").Text.ToDecimal
Dim Orden = GvImpuestos.Rows(e.RowIndex).FCTextBox("TxtOrdenImpuesto").Text.ToEntero
Dim TipoImpuesto = GvImpuestos.Rows(e.RowIndex).FCDropDownList("DdlTipoImpuestoEdit").SelectedValue.ToEntero
Dim IdCtaContable = GvImpuestos.Rows(e.RowIndex).FCDropDownList("DdlCuentasContables").SelectedValue.ToEntero
Dim Estatus As Integer
If GvImpuestos.Rows(e.RowIndex).FCCheckBox("ChkEstatusEdit").Checked = True Then
Estatus = 1
Else
Estatus = 0
End If
If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, IdCtaContable) Then
TieneError = True
End If
ObjVentas.Dispose()
If Not TieneError Then
GvImpuestos.EditIndex = -1
CargaDatos()
Else
Alert("Ocurrio un erro al actualizar los datos", TipoMensaje.MsgAdvertencia)
End If
End Sub
Protected Sub GvImpuestos_RowCancelingEdit(sender As Object, e As System.Web.UI.WebControls.GridViewCancelEditEventArgs) Handles GvImpuestos.RowCancelingEdit
GvImpuestos.EditIndex = -1
CargaDatos()
End Sub
Protected Sub GvImpuestos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvImpuestos.RowDeleting Protected Sub GvImpuestos_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvImpuestos.RowDeleting
Dim ObjVentas As New ClsVentas() Dim ObjVentas As New ClsVentas()
Dim TieneError = False Dim TieneError = False
@@ -168,13 +130,7 @@ Partial Class Ventas_CatImpuestosLocales
Private Sub OrdenaDatos()
If (GvImpuestos.Rows.Count > 0) Then
GvImpuestos.UseAccessibleHeader = True
GvImpuestos.HeaderRow.TableSection = TableRowSection.TableHeader
RegistraScript("OrdenarGV();")
End If
End Sub
#End Region #End Region
@@ -182,13 +138,18 @@ Partial Class Ventas_CatImpuestosLocales
Private Sub BtnAgregarImpuestoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarImpuestoModal.Click Private Sub BtnAgregarImpuestoModal_Click(sender As Object, e As EventArgs) Handles BtnAgregarImpuestoModal.Click
CveImpuestoLocal = -1 CveImpuestoLocal = -1
If CveImpuestoLocal > 0 Then
BtnAgregarImpuesto.Text = "Actualizar"
UpFooter.Update()
Else
BtnAgregarImpuesto.Text = "Agregar"
End If
TxtOrden.Text = ""
TxtImpuesto.Text = ""
TxtPorcentaje.Text = ""
DdlTipoImpuesto.SelectedValueExist("-1")
DdlCuentasContables.SelectedValueExist("-1")
DdlClasificacion.SelectedValueExist("-1")
BtnAgregarImpuesto.Text = "Agregar"
ChkEstatus.Checked = True
UpAddImpuesto.Update()
UpFooter.Update()
RegistraScript("$('#divAddImpuestoLocal').modal();LimpiaModal()") RegistraScript("$('#divAddImpuestoLocal').modal();LimpiaModal()")
End Sub End Sub
@@ -199,7 +160,7 @@ Partial Class Ventas_CatImpuestosLocales
If CveImpuestoLocal = -1 Then If CveImpuestoLocal = -1 Then
If ChkEstatus.Checked Then Estatus = 1 If ChkEstatus.Checked Then Estatus = 1
If ObjVentas.AddImpuestosLocales(TxtImpuesto.Text.Trim, TxtPorcentaje.Text.ToDecimal, TxtOrden.Text.ToEntero, DdlTipoImpuesto.SelectedValue.ToEntero, Estatus, DdlCuentasContables.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then If ObjVentas.AddImpuestosLocales(TxtImpuesto.Text.Trim, TxtPorcentaje.Text.ToDecimal, TxtOrden.Text.ToEntero, DdlTipoImpuesto.SelectedValue.ToEntero, Estatus, DdlCuentasContables.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then
CargaDatos() CargaDatos()
End If End If
TxtImpuesto.Text = "" TxtImpuesto.Text = ""
@@ -216,7 +177,7 @@ Partial Class Ventas_CatImpuestosLocales
Dim IdCtaContable = DdlCuentasContables.SelectedValue.ToEntero Dim IdCtaContable = DdlCuentasContables.SelectedValue.ToEntero
If ChkEstatus.Checked Then Estatus = 1 If ChkEstatus.Checked Then Estatus = 1
If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, IdCtaContable) Then If Not ObjVentas.UpdateImpuestosLocales(CveImpuestoLocal, Impuesto, Porcentaje, Orden, TipoImpuesto, Estatus, IdCtaContable, CveClasificacion:=DdlClasificacion.SelectedValue.ToEntero) Then
TieneError = True TieneError = True
End If End If
ObjVentas.Dispose() ObjVentas.Dispose()
@@ -236,35 +197,22 @@ Partial Class Ventas_CatImpuestosLocales
RegistraScript("$('#divAddImpuestoLocal').modal('hide');") RegistraScript("$('#divAddImpuestoLocal').modal('hide');")
End Sub End Sub
Protected Sub BtnCargaModal_Click(sender As Object, e As EventArgs)
Dim ObjImpuestos As New ClsVentas
Dim Clave = CType(sender, LinkButton).CommandArgument.ToEntero
If ObjImpuestos.GetImpuestosLocales(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
DtImpuestosLocales = ObjImpuestos.DtResultados.FiltraParametros(String.Format("CveImpuestoLocal = {0}", Clave))
End If
TxtOrden.Text = DtImpuestosLocales(0)("Orden").ToString
DdlTipoImpuesto.SelectedValueExist(DtImpuestosLocales(0)("TipoImpuesto").ToString)
DdlCuentasContables.SelectedValueExist(DtImpuestosLocales(0)("IdCuentaImpuestoLocal").ToString)
ObjImpuestos.Dispose()
End Sub
Public Sub Edit_Click(sender As Object, e As EventArgs) Public Sub Edit_Click(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
DdlTipoImpuesto.SelectedValueExist(GvRow.DataKey("TipoImpuesto")) DdlTipoImpuesto.SelectedValueExist(GvRow.DataKey("TipoImpuesto"))
DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCuentaImpuestoLocal")) DdlCuentasContables.SelectedValueExist(GvRow.DataKey("IdCuentaImpuestoLocal"))
TxtImpuesto.Text = GvRow.DataKey("ImpuestoLocal") TxtImpuesto.Text = GvRow.DataKey("ImpuestoLocal")
TxtPorcentaje.Text = GvRow.DataKey("Porcentaje") TxtPorcentaje.Text = GvRow.DataKey("Porcentaje")
TxtOrden.Text = GvRow.DataKey("Orden") TxtOrden.Text = GvRow.DataKey("Orden")
ChkEstatus.Checked = If(GvRow.DataKey("EstatusBol").ToEntero = 1, True, False) ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("EstatusBol")) 'If(GvRow.DataKey("EstatusBol").ToEntero = 1, True, False)
DdlClasificacion.SelectedValueExist(GvRow.DataKey("CveClasificacion"))
BtnAgregarImpuesto.Text = "Actualizar" BtnAgregarImpuesto.Text = "Actualizar"
CveImpuestoLocal = GvRow.DataKey("CveImpuestoLocal").ToEntero CveImpuestoLocal = GvRow.DataKey("CveImpuestoLocal").ToEntero
UpAddImpuesto.Update() UpAddImpuesto.Update()
UpFooter.Update()
RegistraScript(String.Format("$('#{0}').modal();", "divAddImpuestoLocal")) RegistraScript(String.Format("$('#{0}').modal();", "divAddImpuestoLocal"))
End Sub End Sub

View File

@@ -1268,8 +1268,6 @@ Partial Class Clientes
CargaCombosComercioExterior() CargaCombosComercioExterior()
End Sub End Sub
Private Sub CargaSubProyectoss() Private Sub CargaSubProyectoss()
@@ -2480,18 +2478,37 @@ Partial Class Clientes
End If End If
'CargaSucursal() If UsuarioActual.Empresa.Funcionalidad(350).Contiene("1", "2") Then
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa)) If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlRegimenFiscal.SelectedValue <> "11" Then
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia) Alert("El Regimen fiscal del cliente debe ser <b>'616 - Sin obligaciones fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
' Exit Sub Exit Sub
'End If
Dim ObjClientes As New ClsClientes() End If
If TxtRFC.Text.ToUpper.Contiene("XAXX010101000", "XEXX010101000") AndAlso DdlUsoCFDI.SelectedValue <> "23" Then
Alert("El Regimen fiscal del cliente debe ser <b>'S01 - Sin efectos fiscales'</b> cuando se utiliza el RFC genérico.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
'CargaSucursal()
'If UsuarioActual.TienePermisoProceso(170) AndAlso TxtCodigo.Text.Trim = "" Then
' Alert("Es necesario ingresar un Código", TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
'Dim rowcodigo As DataTable = GlobalDTCliente.FiltraParametros(String.Format("Codigo='{0}' AND CveEmpresa={1} ", TxtCodigo.Text.Trim, UsuarioActual.CveEmpresa))
'If (Not IsNothing(rowcodigo)) AndAlso (rowcodigo.Rows.Count > 0) AndAlso (rowcodigo.Rows(0)("CveCliente").ToString().Toentero() <> CveCliente) Then
' Alert(String.Format("ya existe un Cliente Con este Codigo '{0}'", TxtCodigo.Text.Trim), TipoMensaje.MsgAdvertencia)
' Exit Sub
'End If
Dim ObjClientes As New ClsClientes()
Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL()) Dim objDoc As New ClsEdocumentacion(ObjClientes.IniciaTransacSQL())
Dim MsgCuentaContable As String = "" Dim MsgCuentaContable As String = ""
Dim ErrorProceso As Boolean = False Dim ErrorProceso As Boolean = False

View File

@@ -696,7 +696,7 @@ Partial Class PV
Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal) Private ReadOnly Property ClasificacionesDescuentos As Dictionary(Of Integer, Decimal)
Get Get
Return New Dictionary(Of Integer, Decimal) From { Return New Dictionary(Of Integer, Decimal) From {
{20516, 0.23D}, 'Descuento para lubricantes LTH {20516, 0.21D}, 'Descuento para lubricantes LTH
{20515, 0.25D} 'Descuento para filtros LTH {20515, 0.25D} 'Descuento para filtros LTH
} }
End Get End Get

View File

@@ -2184,6 +2184,37 @@ Partial Class Ventas
ViewState("DtMercancias") = value ViewState("DtMercancias") = value
End Set End Set
End Property End Property
Private Property ClienteCodigoRegimenFiscal As String
Get
If ViewState("ClienteCodigoRegimenFiscal") Is Nothing Then
ViewState("ClienteCodigoRegimenFiscal") = ""
End If
Return ViewState("ClienteCodigoRegimenFiscal").ToString
End Get
Set(value As String)
ViewState("ClienteCodigoRegimenFiscal") = value
End Set
End Property
Private Property ClienteRegimenFiscal As String
Get
If ViewState("ClienteRegimenFiscal") Is Nothing Then
ViewState("ClienteRegimenFiscal") = ""
End If
Return ViewState("ClienteRegimenFiscal").ToString
End Get
Set(value As String)
ViewState("ClienteRegimenFiscal") = value
End Set
End Property
#End Region #End Region
'#Region "AuxiliarConta" '#Region "AuxiliarConta"
@@ -6015,6 +6046,9 @@ Partial Class Ventas
TieneDiasVencidos = Boolean.Parse(ObjCliente.DtResultados.Rows(0)("TieneDiasVencidos").ToString()) TieneDiasVencidos = Boolean.Parse(ObjCliente.DtResultados.Rows(0)("TieneDiasVencidos").ToString())
DiasVencidosCliente = ObjCliente.DtResultados.Rows(0)("DiasVencidosCliente").ToString().ToEntero() DiasVencidosCliente = ObjCliente.DtResultados.Rows(0)("DiasVencidosCliente").ToString().ToEntero()
ClienteCodigoRegimenFiscal = ObjCliente.DtResultados.Rows(0)("CodigoRegimenFiscal").ToString()
ClienteRegimenFiscal = ObjCliente.DtResultados.Rows(0)("RegimenFiscal").ToString()
If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then If EstatusCliente = False And Not DdlTipoComprobante.SelectedValue.Contiene("Cot", "DPe") And (CveVenta <= 0 Or EsCreaApartirDe) Then
Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia) Alert("El Cliente seleccionado no esta activo", TipoMensaje.MsgAdvertencia)
BtnEmitirImprimir.Visible = EstatusCliente BtnEmitirImprimir.Visible = EstatusCliente
@@ -9695,7 +9729,24 @@ Partial Class Ventas
ObjFacturaDevolucion.Fecha = Now ObjFacturaDevolucion.Fecha = Now
ObjFacturaDevolucion.Version = "3.3"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaDevolucion.Version = "4.0"
If ObjFacturaDevolucion.Cliente Is Nothing Then
ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
End If
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.CveMetodoPago33 = 1 ObjFacturaDevolucion.CveMetodoPago33 = 1
ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición" ObjFacturaDevolucion.MetodoPago33 = "Pago en una sola exhibición"
ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE" ObjFacturaDevolucion.ClaveMetodoPagoSAT = "PUE"
@@ -9977,7 +10028,20 @@ Partial Class Ventas
End If End If
ObjFacturaBonificacion.Fecha = Now ObjFacturaBonificacion.Fecha = Now
ObjFacturaBonificacion.Version = "3.3"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaBonificacion.Version = "4.0"
If ObjFacturaBonificacion.Cliente Is Nothing Then
ObjFacturaBonificacion.Cliente = New Modelos.ClienteModel
End If
ObjFacturaBonificacion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaBonificacion.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaBonificacion.Version = "3.3"
End If
ObjFacturaBonificacion.CveMetodoPago33 = 1 ObjFacturaBonificacion.CveMetodoPago33 = 1
ObjFacturaBonificacion.MetodoPago33 = "Pago en una sola exhibición" ObjFacturaBonificacion.MetodoPago33 = "Pago en una sola exhibición"
ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE" ObjFacturaBonificacion.ClaveMetodoPagoSAT = "PUE"
@@ -10377,7 +10441,18 @@ Partial Class Ventas
ObjFactura = New Modelos.Factura ObjFactura = New Modelos.Factura
End If End If
ObjFactura.Version = "3.3" If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFactura.Version = "4.0"
If ObjFactura.Cliente Is Nothing Then
ObjFactura.Cliente = New Modelos.ClienteModel
End If
ObjFactura.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFactura.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFactura.Version = "3.3"
End If
ObjFactura.CveUsuario = UsuarioActual.CveUsuario ObjFactura.CveUsuario = UsuarioActual.CveUsuario
ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa ObjFactura.CveEmpresa = UsuarioActual.CveEmpresa
ObjFactura.TipoCambio = If(DdlMoneda.SelectedValue.ToEntero() = 1, 1, TxtTipoCambio.Text.Trim.ToDecimal) ObjFactura.TipoCambio = If(DdlMoneda.SelectedValue.ToEntero() = 1, 1, TxtTipoCambio.Text.Trim.ToDecimal)
@@ -11152,7 +11227,19 @@ Partial Class Ventas
ObjFacturaDevolucion.SerieFolioPadre = HdnFolioFiscalNC.Value.ToString() ObjFacturaDevolucion.SerieFolioPadre = HdnFolioFiscalNC.Value.ToString()
ObjFacturaDevolucion.Version = "3.3" If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaDevolucion.Version = "4.0"
If ObjFacturaDevolucion.Cliente Is Nothing Then
ObjFacturaDevolucion.Cliente = New Modelos.ClienteModel
End If
ObjFacturaDevolucion.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaDevolucion.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaDevolucion.Version = "3.3"
End If
ObjFacturaDevolucion.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero() ObjFacturaDevolucion.CveMetodoPago33 = DdlMetodoPago33.SelectedValue.ToEntero()
ObjFacturaDevolucion.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "") ObjFacturaDevolucion.MetodoPago33 = If(DdlMetodoPago33.SelectedValue.ToEntero() > 0, DdlMetodoPago33.SelectedItem.Text, "")
ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}") ObjFacturaDevolucion.ClaveMetodoPagoSAT = GlobalDTVtaMetodoPago.FiltroPrimeroValor("ClaveMetodoPagoSAT", $"CveMetodoPago = {DdlMetodoPago33.SelectedValue}")
@@ -16433,7 +16520,7 @@ Partial Class Ventas
If RespCancelacion.Verificado Then If RespCancelacion.Verificado Then
If ObjBanco.UpdateComplementoPago(CveComplementoPago, "-1", -1, UsuarioActual.CveEmpresa, 2, CvePACCancelacion, FechaCancelacion:=ObjCancelacion.CancelacionFecha, SelloCancelacion:=ObjCancelacion.CancelacionAcuse) Then If ObjBanco.UpdateComplementoPagoCancelado(CveComplementoPago, 2, CvePACCancelacion, UsuarioActual.CveEmpresa, ObjCancelacion.CancelacionFecha, ObjCancelacion.CancelacionAcuse, 1) Then
CargaComplementosPago() CargaComplementosPago()
Alert("El complemento se canceló correctamente.") Alert("El complemento se canceló correctamente.")
End If End If
@@ -33420,7 +33507,20 @@ Partial Class Ventas
ObjFacturaProntoPago.TipoDocto = "Egs" ObjFacturaProntoPago.TipoDocto = "Egs"
ObjFacturaProntoPago.Fecha = Now ObjFacturaProntoPago.Fecha = Now
ObjFacturaProntoPago.Version = "3.3"
If UsuarioActual.Empresa.Funcionalidad(350) = "1" Then
ObjFacturaProntoPago.Version = "4.0"
If ObjFacturaProntoPago.Cliente Is Nothing Then
ObjFacturaProntoPago.Cliente = New Modelos.ClienteModel
End If
ObjFacturaProntoPago.Cliente.CodigoRegimenFiscal = ClienteCodigoRegimenFiscal
ObjFacturaProntoPago.Cliente.RegimenFiscal = ClienteRegimenFiscal
Else
ObjFacturaProntoPago.Version = "3.3"
End If
ObjFacturaProntoPago.CveMetodoPago33 = 1 ObjFacturaProntoPago.CveMetodoPago33 = 1
ObjFacturaProntoPago.MetodoPago33 = "Pago en una sola exhibición" ObjFacturaProntoPago.MetodoPago33 = "Pago en una sola exhibición"
ObjFacturaProntoPago.ClaveMetodoPagoSAT = "PUE" ObjFacturaProntoPago.ClaveMetodoPagoSAT = "PUE"

View File

@@ -498,6 +498,8 @@