-fecha de fluctuación ventas
This commit is contained in:
@@ -8743,14 +8743,14 @@ Partial Class Clientes
|
|||||||
|
|
||||||
CreaObjetosVenta(1)
|
CreaObjetosVenta(1)
|
||||||
|
|
||||||
If ObjFactura.CveCliente > 0 Then
|
'If ObjFactura.CveCliente > 0 Then
|
||||||
If TmpDT.Rows.Count > 0 Then
|
' If TmpDT.Rows.Count > 0 Then
|
||||||
Dim Retorno = ObjFactura.EmitirFactura()
|
' Dim Retorno = ObjFactura.EmitirFactura()
|
||||||
For Each Mensaje In Retorno.Mensajes
|
' For Each Mensaje In Retorno.Mensajes
|
||||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
' Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||||
Next
|
' Next
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
CargaUsados()
|
CargaUsados()
|
||||||
|
|
||||||
@@ -8790,16 +8790,16 @@ Partial Class Clientes
|
|||||||
' Alert("No esta asignada la funcionalidad CvePS Distruibuidor Bonificación Nota")
|
' Alert("No esta asignada la funcionalidad CvePS Distruibuidor Bonificación Nota")
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
CreaObjetosVenta(1)
|
CreaObjetosVenta(2)
|
||||||
|
|
||||||
If ObjFactura.CveCliente > 0 Then
|
'If ObjFactura.CveCliente > 0 Then
|
||||||
If TmpDT.Rows.Count > 0 Then
|
' If TmpDT.Rows.Count > 0 Then
|
||||||
Dim Retorno = ObjFactura.EmitirFactura()
|
' Dim Retorno = ObjFactura.EmitirFactura()
|
||||||
For Each Mensaje In Retorno.Mensajes
|
' For Each Mensaje In Retorno.Mensajes
|
||||||
Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
' Alert(Mensaje, If(Retorno.TieneError, TipoMensaje.MsgError, TipoMensaje.MsgInformacion))
|
||||||
Next
|
' Next
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
CargaUsados()
|
CargaUsados()
|
||||||
|
|
||||||
@@ -8819,11 +8819,11 @@ Partial Class Clientes
|
|||||||
|
|
||||||
If DTSucursales.Rows.Count > 0 Then
|
If DTSucursales.Rows.Count > 0 Then
|
||||||
|
|
||||||
If ObjFolios.GetFolios(If(Tipo = 1, "RNC", "Egs"), UsuarioActual.CveEmpresa) Then
|
If ObjFolios.GetFolios("RNC", UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim CveSubProyecto As Integer = DTSucursales.FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||||
Dim DT As DataTable
|
Dim DT As DataTable
|
||||||
If UsuarioActual.CveSubProyecto > 0 Then
|
If CveSubProyecto > 0 Then
|
||||||
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 ")
|
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 AND CveSubProyecto = " & CveSubProyecto)
|
||||||
Else
|
Else
|
||||||
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 ")
|
DT = ObjFolios.DtResultados.FiltraParametros(" Estado = 'Activo' AND LEN(Serie) > 0 ")
|
||||||
End If
|
End If
|
||||||
@@ -9213,7 +9213,7 @@ Partial Class Clientes
|
|||||||
ObjFactura.CveMoneda = 1
|
ObjFactura.CveMoneda = 1
|
||||||
ObjFactura.Moneda = "Pesos"
|
ObjFactura.Moneda = "Pesos"
|
||||||
ObjFactura.MonedaSAT = "MXN"
|
ObjFactura.MonedaSAT = "MXN"
|
||||||
ObjFactura.TipoDocto = If(Tipo = 1, "RNC", "Egs")
|
ObjFactura.TipoDocto = "RNC"
|
||||||
|
|
||||||
ObjFactura.Folio = Folio
|
ObjFactura.Folio = Folio
|
||||||
|
|
||||||
@@ -9366,183 +9366,183 @@ Partial Class Clientes
|
|||||||
Dim TmpDT7Eleven As New DataTable
|
Dim TmpDT7Eleven As New DataTable
|
||||||
Dim TmpDTComplementosTimbrado As New DataTable
|
Dim TmpDTComplementosTimbrado As New DataTable
|
||||||
|
|
||||||
PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
'PrepararTimbrado(FM, TmpDT7Eleven, TmpDTComplementosTimbrado)
|
||||||
|
|
||||||
ObjFactura.FemsaFactura = FM
|
ObjFactura.FemsaFactura = FM
|
||||||
|
|
||||||
ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
' ObjFactura.Timbre = PreParaTimbre(ObjFactura)
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
|
'Private Sub PrepararTimbrado(ByRef FM As Modelos.FemsaFactura, ByRef TmpDT7Eleven As DataTable, ByRef TmpDTComplementosTimbrado As DataTable)
|
||||||
FM.AplicaFEMSA = ChkAplicaFEMSA.Checked
|
' FM.AplicaFEMSA = ChkAplicaFEMSA.Checked
|
||||||
FM.FEMSA_NumSociedad = ""
|
' FM.FEMSA_NumSociedad = ""
|
||||||
FM.FEMSA_NumProveedor = ""
|
' FM.FEMSA_NumProveedor = ""
|
||||||
FM.FEMSA_Mail = ""
|
' FM.FEMSA_Mail = ""
|
||||||
FM.FEMSA_Version = "".ToEntero
|
' FM.FEMSA_Version = "".ToEntero
|
||||||
FM.FEMSA_NumPedido = "".ToEntero
|
' FM.FEMSA_NumPedido = "".ToEntero
|
||||||
FM.FEMSA_NumEntrada = ""
|
' FM.FEMSA_NumEntrada = ""
|
||||||
FM.FEMSA_NumRemision = ""
|
' FM.FEMSA_NumRemision = ""
|
||||||
FM.FEMSA_NumSocio = ""
|
' FM.FEMSA_NumSocio = ""
|
||||||
FM.FEMSA_CentroCosto = ""
|
' FM.FEMSA_CentroCosto = ""
|
||||||
FM.FEMSA_IPeriodoLiquidacion = ""
|
' FM.FEMSA_IPeriodoLiquidacion = ""
|
||||||
FM.FEMSA_FPeriodoLiquidacion = ""
|
' FM.FEMSA_FPeriodoLiquidacion = ""
|
||||||
FM.FEMSA_CodRetencion1 = ""
|
' FM.FEMSA_CodRetencion1 = ""
|
||||||
FM.FEMSA_CodRetencion2 = ""
|
' FM.FEMSA_CodRetencion2 = ""
|
||||||
|
|
||||||
TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
|
' TmpDT7Eleven.Columns.Add("sevenElevenNumProveedor")
|
||||||
TmpDT7Eleven.Columns.Add("sevenElevenFolio")
|
' TmpDT7Eleven.Columns.Add("sevenElevenFolio")
|
||||||
TmpDT7Eleven.Columns.Add("sevenElevenTienda")
|
' TmpDT7Eleven.Columns.Add("sevenElevenTienda")
|
||||||
TmpDT7Eleven.Columns.Add("sevenElevenFecha")
|
' TmpDT7Eleven.Columns.Add("sevenElevenFecha")
|
||||||
|
|
||||||
Dim Row As DataRow = TmpDT7Eleven.NewRow
|
' Dim Row As DataRow = TmpDT7Eleven.NewRow
|
||||||
Row("sevenElevenNumProveedor") = ""
|
' Row("sevenElevenNumProveedor") = ""
|
||||||
Row("sevenElevenFolio") = ""
|
' Row("sevenElevenFolio") = ""
|
||||||
Row("sevenElevenTienda") = ""
|
' Row("sevenElevenTienda") = ""
|
||||||
Row("sevenElevenFecha") = ""
|
' Row("sevenElevenFecha") = ""
|
||||||
|
|
||||||
TmpDT7Eleven.Rows.Add(Row)
|
' TmpDT7Eleven.Rows.Add(Row)
|
||||||
|
|
||||||
TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
|
' TmpDTComplementosTimbrado.Columns.Add("CveComplemento")
|
||||||
TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
|
' TmpDTComplementosTimbrado.Columns.Add("IdContabilidad")
|
||||||
TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
|
' TmpDTComplementosTimbrado.Columns.Add("TipoProceso")
|
||||||
TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
|
' TmpDTComplementosTimbrado.Columns.Add("TipoAmbito")
|
||||||
TmpDTComplementosTimbrado.Columns.Add("Entidad")
|
' TmpDTComplementosTimbrado.Columns.Add("Entidad")
|
||||||
|
|
||||||
Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
|
' Dim Row2 As DataRow = TmpDTComplementosTimbrado.NewRow
|
||||||
Row2("CveComplemento") = -1
|
' Row2("CveComplemento") = -1
|
||||||
Row2("IdContabilidad") = -1
|
' Row2("IdContabilidad") = -1
|
||||||
Row2("TipoProceso") = -1
|
' Row2("TipoProceso") = -1
|
||||||
Row2("TipoAmbito") = -1
|
' Row2("TipoAmbito") = -1
|
||||||
Row2("Entidad") = -1
|
' Row2("Entidad") = -1
|
||||||
|
|
||||||
TmpDTComplementosTimbrado.Rows.Add(Row2)
|
' TmpDTComplementosTimbrado.Rows.Add(Row2)
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
'Private Function PreParaTimbre(Obj As Modelos.Factura) As CFDITimbre
|
||||||
Dim Timbre As New CFDITimbre
|
' Dim Timbre As New CFDITimbre
|
||||||
Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
' Timbre.Comprobante.TipoComprobante = If(Obj.TipoDocto.Contiene("Ing", "Ant"), "I", If(Obj.TipoDocto.Contiene("Egs", "Dev"), "E", ""))
|
||||||
Timbre.Comprobante.Folio = Obj.Folio.ToString
|
' Timbre.Comprobante.Folio = Obj.Folio.ToString
|
||||||
Timbre.Comprobante.Serie = Obj.Serie
|
' Timbre.Comprobante.Serie = Obj.Serie
|
||||||
Timbre.Comprobante.Fecha = Obj.FechaCP
|
' Timbre.Comprobante.Fecha = Obj.FechaCP
|
||||||
Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
' Timbre.Comprobante.FormadePago = Obj.FormaPagoSAT33
|
||||||
Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
' Timbre.Comprobante.CondicionesdePago = Obj.FormaPago33
|
||||||
Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
' Timbre.Comprobante.MetodoPago = Obj.ClaveMetodoPagoSAT
|
||||||
Timbre.Comprobante.Subtotal = Obj.SubTotal
|
' Timbre.Comprobante.Subtotal = Obj.SubTotal
|
||||||
Timbre.Comprobante.Descuentos = Obj.Descuento
|
' Timbre.Comprobante.Descuentos = Obj.Descuento
|
||||||
Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
' Timbre.Comprobante.Moneda = Obj.MonedaSAT
|
||||||
Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
' Timbre.Comprobante.TipoCambio = If(Obj.CveMoneda = 1, "1", Obj.TipoCambio.ToString)
|
||||||
Timbre.Comprobante.Total = Obj.Total
|
' Timbre.Comprobante.Total = Obj.Total
|
||||||
|
|
||||||
Try
|
' Try
|
||||||
Obj.SetSubProyecto(Me)
|
' Obj.SetSubProyecto(Me)
|
||||||
Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
' Timbre.Comprobante.LugarExpedicion = Obj.SubProyecto.CP
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
|
|
||||||
End Try
|
' End Try
|
||||||
|
|
||||||
Timbre.Comprobante.Confirmacion = ""
|
' Timbre.Comprobante.Confirmacion = ""
|
||||||
|
|
||||||
Timbre.Receptor.RFC = Obj.Cliente.RFC
|
' Timbre.Receptor.RFC = Obj.Cliente.RFC
|
||||||
Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
' Timbre.Receptor.Nombre = Obj.Cliente.Nombre
|
||||||
Timbre.Receptor.ResidenciaFiscal = ""
|
' Timbre.Receptor.ResidenciaFiscal = ""
|
||||||
Timbre.Receptor.NumeroRegistroTributario = ""
|
' Timbre.Receptor.NumeroRegistroTributario = ""
|
||||||
Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
' Timbre.Receptor.UsoCFDI = Obj.ClaveUsoCFDI
|
||||||
|
|
||||||
|
|
||||||
If Obj.CveTipoRelacion > 0 Then
|
' If Obj.CveTipoRelacion > 0 Then
|
||||||
Select Case Obj.CveTipoRelacion
|
' Select Case Obj.CveTipoRelacion
|
||||||
Case 1
|
' Case 1
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "01"
|
' Timbre.CFDIRelacionados.TipoRelacion = "01"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "01-Nota de Crédito aplicada a Ingreso"
|
||||||
Case 2
|
' Case 2
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "02"
|
' Timbre.CFDIRelacionados.TipoRelacion = "02"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "02-Nota de débito de los documentos relacionados"
|
||||||
Case 3
|
' Case 3
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "03"
|
' Timbre.CFDIRelacionados.TipoRelacion = "03"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "03-Devolución aplicada a Ingreso"
|
||||||
Case 4
|
' Case 4
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "04"
|
' Timbre.CFDIRelacionados.TipoRelacion = "04"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "04-Refacturación de Ingreso"
|
||||||
Case 7
|
' Case 7
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "07"
|
' Timbre.CFDIRelacionados.TipoRelacion = "07"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "07-CFDI por aplicación de anticipo"
|
||||||
Case 8
|
' Case 8
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "08"
|
' Timbre.CFDIRelacionados.TipoRelacion = "08"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "08-Factura generada por pagos en parcialidades "
|
||||||
Case 9
|
' Case 9
|
||||||
Timbre.CFDIRelacionados.TipoRelacion = "09"
|
' Timbre.CFDIRelacionados.TipoRelacion = "09"
|
||||||
Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
|
' Timbre.CFDIRelacionados.TipoRelacionTexto = "09-Factura generada por pagos diferidos"
|
||||||
|
|
||||||
End Select
|
' End Select
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Dim totSubTotal As Decimal = Obj.SubTotal
|
' Dim totSubTotal As Decimal = Obj.SubTotal
|
||||||
Dim totIVA As Decimal = Obj.IVA
|
' Dim totIVA As Decimal = Obj.IVA
|
||||||
Dim totRetIVA As Decimal = Obj.RetIVA
|
' Dim totRetIVA As Decimal = Obj.RetIVA
|
||||||
Dim totRetISR As Decimal = Obj.RetISR
|
' Dim totRetISR As Decimal = Obj.RetISR
|
||||||
Dim TasaRetIVA As Decimal = 0
|
' Dim TasaRetIVA As Decimal = 0
|
||||||
Dim TasaRetISR As Decimal = 0
|
' Dim TasaRetISR As Decimal = 0
|
||||||
Dim i As Integer = 1
|
' Dim i As Integer = 1
|
||||||
|
|
||||||
'detalles
|
' 'detalles
|
||||||
Dim tPS As String = ""
|
' Dim tPS As String = ""
|
||||||
|
|
||||||
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
|
' Else
|
||||||
If drr("PS").ToString.Length = 0 Then
|
' If drr("PS").ToString.Length = 0 Then
|
||||||
tPS = ""
|
' tPS = ""
|
||||||
Else
|
' Else
|
||||||
tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
' tPS = String.Format("{0} {1}", drr("PS"), drr("Obs"))
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
'condicionante, especial
|
' 'condicionante, especial
|
||||||
If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
' If UsuarioActual.CveEmpresa = 15 Then drr("UM") = "" ' les comentan que no debe de ir la etiqueta de "unidad" en el producto
|
||||||
|
|
||||||
Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
' Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString.ToDecimal,
|
||||||
.Descripcion = tPS,
|
' .Descripcion = tPS,
|
||||||
.ValorUnitario = drr("PU").ToString.ToDecimal,
|
' .ValorUnitario = drr("PU").ToString.ToDecimal,
|
||||||
.Importe = drr("TotalImporte").ToString.ToDecimal,
|
' .Importe = drr("TotalImporte").ToString.ToDecimal,
|
||||||
.Descuento = drr("Descuento").ToString.ToDecimal,
|
' .Descuento = drr("Descuento").ToString.ToDecimal,
|
||||||
.Unidad = drr("UM").ToString,
|
' .Unidad = drr("UM").ToString,
|
||||||
.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 = drr("CuentaPredial").ToString}
|
' .CuentaPredial = drr("CuentaPredial").ToString}
|
||||||
'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
|
||||||
End If
|
' End If
|
||||||
totSubTotal = totSubTotal - concepto.Importe
|
' totSubTotal = totSubTotal - concepto.Importe
|
||||||
|
|
||||||
'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
' 'siempre estaremos agregando el iva, auqnue sea en importe cero o tasa cero, para que se emita la factura
|
||||||
' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
' ' If drr("ImporteIVA").ToString.ToDouble > 0 Then
|
||||||
|
|
||||||
'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
|
' 'si es ingreso amortizado por la totalidad, y arroja el valor total de cero, no debe de impuestos
|
||||||
If Timbre.Comprobante.Total > 0 Then
|
' If Timbre.Comprobante.Total > 0 Then
|
||||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIVA").ToString.ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString.ToDecimal})
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If drr("ImporteIEPS").ToString.ToDouble > 0 Then
|
' If drr("ImporteIEPS").ToString.ToDouble > 0 Then
|
||||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
|
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = drr("PorcentajeIEPS").ToString.ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString.ToDecimal})
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
|
' If drr("ImporteRetIVA").ToString.ToDouble > 0 Then 'si hay retenciones
|
||||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
|
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetIVA, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString.ToDecimal})
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
|
' If drr("ImporteRetISR").ToString.ToDouble > 0 Then 'retención de ISR
|
||||||
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
|
' concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = concepto.Importe - concepto.Descuento, .TasaOCuota = TasaRetISR, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString.ToDecimal})
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Timbre.Conceptos.Add(concepto)
|
' Timbre.Conceptos.Add(concepto)
|
||||||
i += 1
|
' i += 1
|
||||||
Next
|
' Next
|
||||||
|
|
||||||
Return Timbre
|
' Return Timbre
|
||||||
End Function
|
'End Function
|
||||||
|
|
||||||
'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean
|
'Private Function GenerarNotaCredito(CvePS As Integer, Tipo As Integer, CveUnidadMedida As Integer, Importe As Decimal, Iva As Decimal, Descripcion As String, CveClasificacion As Integer) As Boolean
|
||||||
|
|
||||||
|
|||||||
@@ -21488,7 +21488,7 @@ Partial Class Ventas
|
|||||||
If ObjIE.DtResultados.Rows.Count > 0 Then
|
If ObjIE.DtResultados.Rows.Count > 0 Then
|
||||||
Dim tFecha As Date = TxtFecha.Text.ToDate
|
Dim tFecha As Date = TxtFecha.Text.ToDate
|
||||||
Dim Fecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
Dim Fecha As String = String.Format("{0}/{1}/{2}", tFecha.Year, tFecha.Month, tFecha.Day)
|
||||||
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha < #" & Fecha & "#", "Fecha DESC")
|
Dim drr As DataRow = ObjIE.DtResultados.FiltroPrimero("Fecha > #" & Fecha & "#", "Fecha DESC")
|
||||||
|
|
||||||
If drr IsNot Nothing Then
|
If drr IsNot Nothing Then
|
||||||
TipoCambioFactura = drr("TipoCambio").ToString.ToDecimal
|
TipoCambioFactura = drr("TipoCambio").ToString.ToDecimal
|
||||||
|
|||||||
Reference in New Issue
Block a user