Aplicacion de NC multiples con aplicacion de IEPS e IVA
This commit is contained in:
@@ -6950,7 +6950,8 @@ Partial Class Ventas
|
||||
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlClasificacion").Enabled = False
|
||||
End If
|
||||
|
||||
If GvPS.Rows(e.NewEditIndex).DataKey("CvePromocionDetalle").ToString().ToEntero() > 0 Then
|
||||
'SI ES LLANTERA NO DEBE BLOQUEAR EL TEXTBOX
|
||||
If GvPS.Rows(e.NewEditIndex).DataKey("CvePromocionDetalle").ToString().ToEntero() > 0 AndAlso (Not UsuarioActual.Empresa.Funcionalidad(558) = "1") Then
|
||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").Enabled = False
|
||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").ToolTip = "No se puede editar el descuento porque viene de una promoción"
|
||||
End If
|
||||
@@ -26062,7 +26063,7 @@ Partial Class Ventas
|
||||
Select ImportePU = x.Sum(Function(s) s("ImportePU").ToString().ToDecimal),
|
||||
ImporteTotal = x.Sum(Function(s) s("ImporteTotal").ToString().ToDecimal),
|
||||
ImporteIVA = x.Sum(Function(s) (s("ImporteIVA").ToString().ToDecimal)).RoundSQL(2), ' Math.Round(s("ImporteIVA").ToString().ToDecimal, 2)) * (1 + PorcentajeIEPS) * PorcentajeIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetIVA = x.Sum(Function(s) Math.Round(s("ImporteRetIVA").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetIVA,
|
||||
ImporteRetISR = x.Sum(Function(s) Math.Round(s("ImporteRetISR").ToString().ToDecimal, 2)),' Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeRetISR,
|
||||
ImporteIEPS = x.Sum(Function(s) Math.Round(s("ImporteIEPS").ToString().ToDecimal, 2)), 'Math.Round(s("ImportePU").ToString().ToDecimal, 2)) * PorcentajeIEPS,
|
||||
PorcentajeIVA = PorcentajeIVA,
|
||||
@@ -26800,12 +26801,14 @@ Partial Class Ventas
|
||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||
End If
|
||||
Dim FechaFactura As DateTime = Now
|
||||
|
||||
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||
Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal
|
||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal
|
||||
FechaFactura = ObjVentas.DtResultados()(0)("Fecha").ToString().ToDateTime()
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
@@ -26845,12 +26848,16 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dr("ImporteTotal") = importePuTemp.RoundSQL(2)
|
||||
|
||||
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = importePuTemp * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal)
|
||||
|
||||
Dr("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal)
|
||||
|
||||
'A PARTIR DEL 2020 SE CAMBIO EL CALCULO PARA EL IVA CONSIDERANDO EL IEPS
|
||||
If FechaFactura.Year <= 2019 Then
|
||||
Dr("ImporteIVA") = (importePuTemp * Dr("PorcentajeIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Else
|
||||
Dim TotalCalculableImpuestosIVA As Decimal = importePuTemp * (1 + Dr("PorcentajeIEPS").ToString().ToDecimal)
|
||||
Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal)
|
||||
End If
|
||||
|
||||
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user