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
|
GvPS.Rows(e.NewEditIndex).FCDropDownList("DdlClasificacion").Enabled = False
|
||||||
End If
|
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").Enabled = False
|
||||||
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").ToolTip = "No se puede editar el descuento porque viene de una promoción"
|
GvPS.Rows(e.NewEditIndex).FCTextBox("TxtDescuento").ToolTip = "No se puede editar el descuento porque viene de una promoción"
|
||||||
End If
|
End If
|
||||||
@@ -26800,12 +26801,14 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
TmpDT.Columns.Add("TieneProntoPago", GetType(String))
|
||||||
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
TmpDT.Columns.Add("ImporteProntoPago", GetType(Decimal))
|
||||||
End If
|
End If
|
||||||
|
Dim FechaFactura As DateTime = Now
|
||||||
|
|
||||||
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
If AplicaNCMasiva OrElse AplicaNCUsado Then
|
||||||
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
If ObjVentas.GetVenta(CveVentaNC, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
If ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal
|
Total = ObjVentas.DtResultados()(0)("Total").ToString().ToDecimal
|
||||||
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal
|
SubTotal = ObjVentas.DtResultados()(0)("SubTotal").ToString().ToDecimal
|
||||||
|
FechaFactura = ObjVentas.DtResultados()(0)("Fecha").ToString().ToDateTime()
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
@@ -26845,12 +26848,16 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dr("ImporteTotal") = importePuTemp.RoundSQL(2)
|
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("ImporteIEPS") = (importePuTemp * Dr("PorcentajeIEPS").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
|
'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)
|
Dr("ImporteIVA") = ((TotalCalculableImpuestosIVA) * Dr("PorcentajeIVA").ToString().ToDecimal)
|
||||||
|
End If
|
||||||
|
|
||||||
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
Dr("ImporteRetIVA") = (importePuTemp * Dr("PorcentajeRetIVA").ToString().ToDecimal()).RoundSQL(2)
|
||||||
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
Dr("ImporteRetISR") = (importePuTemp * Dr("PorcentajeRetISR").ToString().ToDecimal()).RoundSQL(2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user