diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb
index 97108838c..923275083 100644
--- a/AF/AF.aspx.vb
+++ b/AF/AF.aspx.vb
@@ -375,11 +375,8 @@ Partial Class AF_AF
If Not IsPostBack Then
InicializaValores()
-
- If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.UsaContabilidad) Then
- CargaCuentasContables()
- End If
-
+
+
CargaCombos()
If Request("CveActivoFijo") IsNot Nothing AndAlso IsNumeric(Request("CveActivoFijo")) AndAlso Request("CveActivoFijo").ToEntero > 0 Then
@@ -1050,6 +1047,13 @@ Partial Class AF_AF
If LtFechaCompra.Text <> "" Then
LtFechaFinDepreciación.Text = ObjActivoFijo.FechaCompra.AddMonths(ObjActivoFijo.MesesDepreciacion).ToShortDateString
+ End If
+
+ If UsuarioActual.Empresa.TipoContabilidad = 1 Then
+ CargaCuentasConceptos()
+ divCuentas.Visible = True
+ ElseIf UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso (UsuarioActual.Empresa.UsaAC OrElse UsuarioActual.Empresa.UsaContabilidad) Then
+ CargaCuentasContables()
End If
CargaAFPAdreEHijos()
@@ -3106,9 +3110,8 @@ Partial Class AF_AF
#Region "CARGAR CUENTA CONTABLE"
Private Sub CargaCuentasContables()
- trCuentaContable.Visible = True
-
-
+ trCuentaContable.Visible = True
+
Dim Conta As New ClsContPAQi(UsuarioActual.Empresa)
Dim DtCuentas As New DataTable
Dim CuentaPadre = UsuarioActual.Empresa.Funcionalidad(221).ToEntero
@@ -3130,6 +3133,16 @@ Partial Class AF_AF
End Sub
+ Private Sub CargaCuentasConceptos()
+ Dim ObjConta As New ClsContabilidad
+ If ObjConta.GetCuentasConceptos(10, UsuarioActual.CveEmpresa, CveAF:=CveActivoFijo) Then
+ GvCta.DataSource = ObjConta.DtResultados
+ divCuentas.Visible = True
+ End If
+ ObjConta.Dispose()
+ GvCta.DataBind()
+
+ End Sub
Private Sub ActivarRegistroCuentaAF()
If DdlCtaContable.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(221).ToEntero > 0 Then
BtnCtaContable.Visible = True
diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb
index 32cda23f7..e90f21cf2 100644
--- a/App_Code/ClsContabilidad.vb
+++ b/App_Code/ClsContabilidad.vb
@@ -1774,7 +1774,12 @@ Public Class ClsContabilidad
#End Region
- Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveClasificacion As Integer = -1, Optional CveCuentaBancos As Integer = -1, Optional CvePersonal As Integer = -1) As Boolean
+ Public Function GetCuentasConceptos(CveTipoSaldo As Integer, CveEmpresa As Integer, Optional CveCliente As Integer = -1,
+ Optional CveProveedor As Integer = -1,
+ Optional CveClasificacion As Integer = -1,
+ Optional CveCuentaBancos As Integer = -1,
+ Optional CvePersonal As Integer = -1,
+ Optional CveAF As Integer = -1) As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_Conta_CuentasConceptosGet")
With SqlAdapter.SelectCommand.Parameters
@@ -1785,6 +1790,7 @@ Public Class ClsContabilidad
.Add("@CveCuentaBancos", SqlDbType.Int).Value = CveCuentaBancos
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@CvePersonal", SqlDbType.Int).Value = CvePersonal
+ .Add("@CveAF", SqlDbType.Int).Value = CveAF
End With
Try
SqlAdapter.Fill(Data)
@@ -4804,7 +4810,7 @@ Public Class ClsContabilidad
Dim Retorno As Boolean = False
- DataAdapter("PA_Conta_UpdateCuentas")
+ DataAdapter("PA_Conta_CuentasUpdate")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
@@ -4845,7 +4851,7 @@ Public Class ClsContabilidad
Optional CveProveedor As Integer = -1, Optional CveCliente As Integer = -1, Optional CveClasificacion As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1,
Optional CveBancoCuenta As Integer = -1) As Integer
Dim Retorno As Integer = 0
- DataAdapter("PA_Conta_AddCuentas")
+ DataAdapter("PA_Conta_CuentasAdd")
With SqlAdapter.SelectCommand.Parameters
.Add("@CvePadre", SqlDbType.Int).Value = CvePadre
@@ -4893,7 +4899,7 @@ Public Class ClsContabilidad
Return False
End If
- DataAdapter("PA_Conta_RemoveCuentas")
+ DataAdapter("PA_Conta_CuentasRemove")
With SqlAdapter.SelectCommand.Parameters
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx
index f7095185e..1b78035dc 100644
--- a/Bancos/IE.aspx
+++ b/Bancos/IE.aspx
@@ -141,7 +141,7 @@
-
+
@@ -233,15 +233,6 @@
-
-
-
Interes:
-
- $
-
-
-
-
diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb
index a37c92bf4..72d33c057 100644
--- a/Bancos/IE.aspx.vb
+++ b/Bancos/IE.aspx.vb
@@ -726,12 +726,8 @@ Partial Class Bancos_IE
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
LtlTitulo.Text = "Pago de Créditos"
CveIE = -1
-
- DVInteresMoratorio.Visible = True
-
If Banc.GetCreditos(CveCredito, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then
Dt = Banc.DtResultados
-
End If
Banc.Dispose()
@@ -1746,6 +1742,7 @@ Partial Class Bancos_IE
dt = Cred.DtResultados.FiltraParametros("Estatus IN (1,101,102)")
Dim Importe As Decimal = 0
+ Dim ImporteInteres As Decimal = 0
If CveCreditoDetalle > 0 Then
Dim drt As DataRow = Cred.DtResultados.FiltroPrimero(String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle))
If drt IsNot Nothing Then
@@ -1754,18 +1751,15 @@ Partial Class Bancos_IE
Alert("La Mensualidad no está vigente para pago", TipoMensaje.MsgError)
End If
Importe = dt.FiltroPrimeroValor("Mensualidad", String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)).ToDecimal
+ ImporteInteres = dt.FiltroPrimeroValor("Intereses", String.Format("CveCreditoDetalle = {0}", CveCreditoDetalle)).ToDecimal
End If
-
-
End If
-
TxtImporte.Text = Importe.ToString
HdnImporteCredito.Value = Importe.ToString
RegistraScript(String.Format("$get('TxtImporte').value = '{0}';", Importe.FormatoNumero))
TxtImporte.Attributes.Remove("onkeyup")
TxtImporte.Attributes.Add("onkeyup", String.Format("ValidaCantidad({0},{1});", TxtImporte.ClientID, Importe))
-
End If
End If
@@ -2908,15 +2902,6 @@ Partial Class Bancos_IE
importeMX = importeMovimiento
End If
- Case 46
-
- If TxtInteresMoratorio.Text.ToDecimal > 0 Then
- importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
- importeMX = importeMovimiento
- Else
- importeMovimiento = 0
- importeMX = 0
- End If
Case 50
@@ -3589,7 +3574,6 @@ Partial Class Bancos_IE
End If
-
''''''''''''''''''''''''''''''''''''''''''''''
Case "EGSCREDITO"
@@ -3606,7 +3590,8 @@ Partial Class Bancos_IE
CveCreditoDetalle = IfNull(Request("CveCreditoDetalle"), "-1").ToString.ToEntero
Concepto = ObjMov.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, PagueseA, "", ObjIE.Folio)
- If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, 57, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then
+ Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CveMoneda, False, 1)
+ If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Concepto, ConPreP.CveConcepto, Concepto, FechaMovimiento, If(ConceptoContable = 30, IDCtaContable, IDCtaBeneficiario), -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=importeMovimiento, ImporteME:=tImporteMonedaExtranjera, TipoCambio:=TxtTipoCambio.Text.ToDecimal, CveCredito:=CveCredito) Then
MsgError = "Ocurrió un error al registrar el asiento del ingreso."
End If
@@ -3623,19 +3608,6 @@ Partial Class Bancos_IE
End If
End If
-
- ' Case 46
- ' If TxtInteresMoratorio.Text.ToDecimal > 0 Then
- ' importeMovimiento = TxtInteresMoratorio.Text.ToDecimal
- ' importeMX = importeMovimiento
- ' Else
- ' importeMovimiento = 0
- ' importeMX = 0
- ' End If
-
-
-
-
Case Else
Dim TipoMovimiento As Boolean = True
diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx
index 461834c4f..156ab3415 100644
--- a/CxC/RepCxCDetalle.aspx
+++ b/CxC/RepCxCDetalle.aspx
@@ -348,7 +348,7 @@
Contrato:
-
+
diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb
index c598ec10f..ae3fe6366 100644
--- a/CxC/RepCxCDetalle.aspx.vb
+++ b/CxC/RepCxCDetalle.aspx.vb
@@ -474,7 +474,8 @@ Partial Class RepCxCDetalle
RblTipoCambio.SelectedValue.ToEntero, TCEspecifico, If(DdlTipoDocto.GetSelectedValuesM = "", "-1", DdlTipoDocto.GetSelectedValuesM), FechaVI, FechaVF,
FechaCorte:=txtCorteA.Text.ToDate, CveUsuarioConsulta:=UsuarioActual.CveUsuario, CveCobranzaEstatus:=DdlCobranzaEstatusFiltro.SelectedValue.ToEntero,
CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero,
- CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero()) Then
+ CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0), TieneLineaAdicional:=DdlTieneLineaAdicional.SelectedValue.ToEntero(),
+ CveContrato:=DdlContrato.SelectedValue.ToEntero) Then
GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0)
@@ -483,16 +484,10 @@ Partial Class RepCxCDetalle
DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(0).Copy)
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
-
GvCartera.DataSource = ObjMovtos.DSResultados.Tables(1)
-
- 'DTCartera = ObjMovtos.DSResultados.Tables(1)
- 'DTCartera.TableName = "DTCartera"
DSRespuesta.Tables.Add(ObjMovtos.DSResultados.Tables(1).Copy)
-
End If
-
Else
GvDatos.DataSource = Nothing
End If
diff --git a/Inventarios/CatUnidades.aspx b/Inventarios/CatUnidades.aspx
index 73f3e234f..6da00699e 100644
--- a/Inventarios/CatUnidades.aspx
+++ b/Inventarios/CatUnidades.aspx
@@ -166,7 +166,7 @@
diff --git a/Ventas/CatPS.aspx.vb b/Ventas/CatPS.aspx.vb
index 65e31729e..eb24c6069 100644
--- a/Ventas/CatPS.aspx.vb
+++ b/Ventas/CatPS.aspx.vb
@@ -46,6 +46,9 @@ Partial Class CatPS
If UsuarioActual.CveEmpresa = 119 Then
DdlEstado.SelectedValue = "-1"
End If
+ If UsuarioActual.Empresa.Funcionalidad(563) <> "" AndAlso Not UsuarioActual.TienePermisoProceso(122) Then
+ LnkExcelPSAdicional.Visible = True
+ End If
End If
End Sub
@@ -65,7 +68,6 @@ Partial Class CatPS
If TxtCodigoBarras.Text.Trim = "" Then CodigoBarras = "-1" Else CodigoBarras = TxtCodigoBarras.Text.Trim
If TxtNombre.Text.Trim = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper.Trim
-
Dim ObjPS As New ClsProductosServicios
If ObjPS.GetPSLite(Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, Codigo, CodigoBarras, Nombre, DdlAplicaVenta.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, DdlCveTipoPS.SelectedValue.ToEntero, DdlTipoClasificacion.SelectedValue.ToEntero) Then
DtDatos = ObjPS.DtResultados
@@ -285,4 +287,158 @@ Partial Class CatPS
End Sub
#End Region
+
+#Region "P R O D U C T O S A D I C I O N A L E S"
+
+ Private Function GuardarProductosEquivalenteEnFranquicia(ObjPS As ClsProductosServicios, CodigoPS As String, PSAdicional As String, Cantidad As Decimal, Opcion As Integer) As Boolean
+ If UsuarioActual.Empresa.Funcionalidad(563) <> "" Then
+
+ Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) & "," & UsuarioActual.CveEmpresa ' agregamos la empresa actual
+ Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
+ For Each Franquicia As Integer In EmpresasFranquicia
+ Dim CvePSPagina As Integer = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", CodigoPS)).ToEntero
+ Dim CvePSAdicional As Integer
+
+ If Opcion = 1 Then CvePSAdicional = GlobalDTPS(Franquicia).FiltroPrimeroValor("CvePS", String.Format("Codigo = '{0}'", PSAdicional)).ToEntero
+
+ If CvePSPagina <= 0 Then
+ Alert(String.Format("El producto de la página no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
+ Return False
+ End If
+
+ If CvePSAdicional <= 0 AndAlso Opcion = 1 Then
+ Alert(String.Format("El producto adicional no existe en la franquicia: '{0}'", GlobalDTEmpresas(Franquicia).FiltroPrimeroValor("Empresa")), TipoMensaje.MsgAdvertencia)
+ Return False
+ End If
+
+ If Opcion = 1 Then
+ If Not ObjPS.AddPSAdicionales(CvePSPagina, CvePSAdicional, Cantidad) Then
+ Return False
+ End If
+ End If
+ If Opcion = 2 Then
+ If Not ObjPS.RemovePSAdicionales(CvePSPagina, -1) Then
+ Return False
+ End If
+ End If
+ Next
+ End If
+ Return True
+ End Function
+
+ Private Sub LnkExcelPSAdicional_Click(sender As Object, e As EventArgs) Handles LnkExcelPSAdicional.Click
+ RegistraScript(String.Format("$('#{0}').modal();", "DivCargaExcelPSAdicionales"))
+
+ End Sub
+
+ Protected Sub BtnDescargar_Click(sender As Object, e As EventArgs) Handles BtnDescargarPSAdicional.Click
+
+ GemBox.Spreadsheet.SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
+ Dim workbook As New GemBox.Spreadsheet.ExcelFile()
+ Dim worksheet = workbook.Worksheets.Add("Productos")
+ Dim DtExcel As New DataTable
+ DtExcel.Columns.Add("CodigoProducto", GetType(String))
+ DtExcel.Columns.Add("CodigoProductoAdicional", GetType(String))
+ DtExcel.Columns.Add("CantidadFija", GetType(String))
+
+ worksheet.InsertDataTable(DtExcel, New GemBox.Spreadsheet.InsertDataTableOptions() With
+ {
+ .ColumnHeaders = True,
+ .StartRow = 0,
+ .StartColumn = 0
+ })
+
+ Dim columnCount = worksheet.CalculateMaxUsedColumns()
+ For i = 0 To columnCount
+ worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1))
+ Next
+ workbook.Save(Response, $"CargaProductos.xlsx", GemBox.Spreadsheet.SaveOptions.XlsxDefault)
+
+ End Sub
+
+ Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcelPSAdicional.Click
+ If TxtExcel.getfiles().Archivos.Count > 0 Then
+ Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
+
+ Dim Directorio As String = Server.MapPath("~") & file.path
+
+ Dim Tipo As String = If(file.Extension.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
+ CargaArchivoPSAdicional(Directorio, file.filename, Tipo)
+ Else
+ Alert("No existe el archivo.Favor de subir un archivo csv o excel a la plataforma", TipoMensaje.MsgError)
+ End If
+ End Sub
+
+ Private Sub CargaArchivoPSAdicional(Ruta As String, FileName As String, Tipo As String)
+ Dim dt As New DataTable
+ Dim ErrorArchivo = False
+ Dim ErrorExcel As Boolean = False
+
+ dt = ReadExcelFile(Ruta + FileName, True, 0).FiltraParametros("CodigoProducto <> ''")
+
+ If Not ErrorArchivo Then
+ If Not dt.Columns(0).ColumnName.ToUpper = "CODIGOPRODUCTO" Then
+ Alert("El nombre de la primera columna debe ser 'ConceptoAdministrativo'. Favor de corregirlo", TipoMensaje.MsgError)
+ Exit Sub
+ End If
+ If Not dt.Columns(1).ColumnName.ToUpper = "CODIGOPRODUCTOADICIONAL" Then
+ Alert("El nombre de la segunda columna debe ser 'Cuenta'.Favor de corregirlo", TipoMensaje.MsgError)
+ Exit Sub
+ End If
+ End If
+
+ If Not ErrorArchivo Then
+
+ Try
+ Dim ContadorRegistros As Integer = 0
+ Dim ObjPS As New ClsProductosServicios
+ ObjPS.IniciaTransacSQL()
+
+ 'antes de iniciar la carga se limpiarán los asignados, se filtran por codigops
+ For Each Row As DataRow In dt.FiltraParametros("", DistinctColumns:={"CodigoProducto"}).Rows
+ If Not GuardarProductosEquivalenteEnFranquicia(ObjPS, Row("CodigoProducto").ToString.Trim, "", 0, 2) Then
+ ErrorExcel = True
+ Exit For
+ End If
+ Next
+ If Not ErrorExcel Then
+ For Each Row As DataRow In dt.Rows
+ Dim CodigoPS As String = Row("CodigoProducto").ToString
+ Dim CodigoPSAdicional As String = Row("CodigoProductoAdicional").ToString
+ Dim Cantidad As Integer = Row("CantidadFija").ToString.ToEntero
+ If Not GuardarProductosEquivalenteEnFranquicia(ObjPS, CodigoPS, CodigoPSAdicional, Cantidad, 1) Then
+ ErrorExcel = True
+ Exit For
+ End If
+ ContadorRegistros = ContadorRegistros + 1
+ Next
+ End If
+ If Not ErrorExcel Then
+ ObjPS.Commit()
+ Dim StrEmpresas As String = UsuarioActual.Empresa.Funcionalidad(563) & "," & UsuarioActual.CveEmpresa ' agregamos la empresa actual
+ Dim EmpresasFranquicia As List(Of Integer) = StrEmpresas.Split(","c).ToList().ConvertAll(Function(x) Convert.ToInt32(x))
+ 'regenerar el global de cada empresa
+ For Each Franquicia As Integer In EmpresasFranquicia
+ GlobalDTPSAdicionales(-1, Franquicia) = Nothing
+ Next
+
+ Alert($"{ContadorRegistros} Registros aplicados.")
+ Else
+ ObjPS.RollBack()
+ Alert($"Ocurrió un error al cargar los productos.", TipoMensaje.MsgAdvertencia)
+ End If
+
+
+ Catch ex As Exception
+ Alert("No se pudo cargar el excel", TipoMensaje.MsgAdvertencia)
+ GuardaLog(ex.Message)
+ End Try
+
+ End If
+ End Sub
+
+
+
+#End Region
+
End Class
diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb
index d7a6ea8a7..4600ac345 100644
--- a/Ventas/Ventas.aspx.vb
+++ b/Ventas/Ventas.aspx.vb
@@ -12613,19 +12613,20 @@ Partial Class Ventas
' 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, y si la BASE de calculo es mayor a cero
- If Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then
+ ' si es objimp = 01, significa que no lleva desglose de impuesto, está exento
+ If concepto.ObjetoImpuesto <> "01" AndAlso Timbre.Comprobante.Total > 0 AndAlso (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional > 0) Then
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento + concepto.ImporteGravaIVAAdicional).RoundSQL(6), .TasaOCuota = drr("PorcentajeIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteIVA").ToString().ToDecimal})
End If
- If drr("ImporteIEPS").ToString().ToDouble > 0 Then
+ If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteIEPS").ToString().ToDouble > 0 Then
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "T", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeIEPS").ToString().ToDecimal, .Impuesto = "003", .Importe = drr("ImporteIEPS").ToString().ToDecimal})
End If
- If drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
+ If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetIVA").ToString().ToDouble > 0 Then 'si hay retenciones
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetIVA").ToString().ToDecimal, .Impuesto = "002", .Importe = drr("ImporteRetIVA").ToString().ToDecimal})
End If
- If drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
+ If concepto.ObjetoImpuesto <> "01" AndAlso drr("ImporteRetISR").ToString().ToDouble > 0 Then 'retención de ISR
concepto.Impuestos.Add(New CFDIConceptosImpuestos With {.TrasladooRetencion = "R", .Base = (concepto.Importe - concepto.Descuento).RoundSQL(6), .TasaOCuota = drr("PorcentajeRetISR").ToString().ToDecimal, .Impuesto = "001", .Importe = drr("ImporteRetISR").ToString().ToDecimal})
End If