Compras ajuste de IEPS, si la compra trae IEPS y los productos asigandos no aplican IEPS y existe ajuste ajustar en primer producto.

This commit is contained in:
rakcsle
2022-03-16 11:49:00 -07:00
parent 5640db51b0
commit 4af1707636
2 changed files with 51 additions and 363 deletions

View File

@@ -8690,6 +8690,8 @@ Partial Class Compras_Compras
Dim DTConsultaIEPSPS As New DataTable
DTConsultaIEPSPS = TmpDT.FiltraParametros(" AplicaIEPS = 'True'")
Dim IndiceContador As Integer = 0
Dim IndicePrimero As Integer = 0
@@ -8703,17 +8705,14 @@ Partial Class Compras_Compras
If DiferenciaIEPSPS.RoundAD(2) <> 0 Then
If DTConsultaIEPSPS.Rows.Count > 0 Then
'Ajusta IPES en primer registro que aplique IEPS
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
TmpDT.AcceptChanges()
Else
Respuesta = False
Alert(String.Format("Los productos especificados en el listado no tienen asigando impuesto IEPS, favor de realizar la corrección en el producto que aplique el impuesto. ({0}-{1})", IEPSPSDetalles, TxtIEPS.Text.ToDecimal), TipoMensaje.MsgAdvertencia)
End If
TmpDT.Rows(IndicePrimero)("IEPSPS") = TmpDT.Rows(IndicePrimero)("IEPSPS").ToString.ToDecimal + DiferenciaIEPSPS
TmpDT.AcceptChanges()
End If
For Each dRow As DataRow In TmpDT.Rows
If dRow("IEPSPSPorcentaje").ToString.ToDecimal > 0 AndAlso dRow("IEPSPS").ToString.ToDecimal = 0 Then