--FIX Forzar ajuste en NC
This commit is contained in:
@@ -12033,7 +12033,7 @@ Partial Class Ventas
|
|||||||
Dim ForzarAjuste As Boolean = False
|
Dim ForzarAjuste As Boolean = False
|
||||||
|
|
||||||
'EL IMPORTE DE NC NO PUEDE SER MAYOR AL DE LA FACTURA
|
'EL IMPORTE DE NC NO PUEDE SER MAYOR AL DE LA FACTURA
|
||||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso (tTipoAmortizacion = 1) Then
|
If (tTipoAmortizacion = 1) Then
|
||||||
ForzarAjuste = True
|
ForzarAjuste = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -12103,7 +12103,7 @@ Partial Class Ventas
|
|||||||
'**** IMPUESTOS LOCALES
|
'**** IMPUESTOS LOCALES
|
||||||
|
|
||||||
factura.DtDetalle = tmpcon
|
factura.DtDetalle = tmpcon
|
||||||
Dim TotalSubTotal As Decimal = tmpcon.SUMD("TotalImporte").RoundSQL(2)
|
Dim TotalSubTotal As Decimal = tmpcon.SUMD("TotalImporte")
|
||||||
Dim TotalDescuentos As Decimal = tmpcon.SUMD("Descuento")
|
Dim TotalDescuentos As Decimal = tmpcon.SUMD("Descuento")
|
||||||
|
|
||||||
Dim TotalIVA As Decimal = tmpcon.SUMD("ImporteIVA")
|
Dim TotalIVA As Decimal = tmpcon.SUMD("ImporteIVA")
|
||||||
@@ -30644,7 +30644,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
Dim ImporteReferencia As Decimal = If(NivelTotal = 1, Total, SubTotal)
|
Dim ImporteReferencia As Decimal = If(NivelTotal = 1, Total, SubTotal)
|
||||||
Dim Porcentaje As Decimal = ((Importe * 100) / ImporteReferencia) / 100
|
Dim Porcentaje As Decimal = ((Importe * 100D) / ImporteReferencia) / 100D
|
||||||
Dim FiltroStr As String = ""
|
Dim FiltroStr As String = ""
|
||||||
|
|
||||||
Dim TotalImpuestosLocalesVentaOriginal As Decimal = 0
|
Dim TotalImpuestosLocalesVentaOriginal As Decimal = 0
|
||||||
@@ -30652,7 +30652,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
'CALCULA LO EQUIVALENTE EN IMPUSTOS LOCALES
|
'CALCULA LO EQUIVALENTE EN IMPUSTOS LOCALES
|
||||||
If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.Rows.Count > 0 Then
|
If TmpDTImpuestos IsNot Nothing AndAlso TmpDTImpuestos.Rows.Count > 0 Then
|
||||||
TotalImpuestosLocalesVentaOriginal = TmpDTImpuestos.SUM("Importe")
|
TotalImpuestosLocalesVentaOriginal = TmpDTImpuestos.SUMD("Importe")
|
||||||
TotalImpuestosLocalesRecalculado = TotalImpuestosLocalesVentaOriginal * Porcentaje
|
TotalImpuestosLocalesRecalculado = TotalImpuestosLocalesVentaOriginal * Porcentaje
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -30666,7 +30666,7 @@ Partial Class Ventas
|
|||||||
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
For Each Dr As DataRow In DtImpuestosLocal.Rows
|
||||||
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("CveSubProyecto"))
|
FiltroStr = String.Format("ISNULL(PorcentajeIVA,0) = {0} AND ISNULL(PorcentajeRetIVA,0) = {1} AND ISNULL(PorcentajeRetISR,0) = {2} AND ISNULL(PorcentajeIEPS,0) = {3} AND ISNULL(CveSubProyecto,0) = {4} ", Dr("PorcentajeIVA").ToString().ToDecimal, Dr("PorcentajeRetIVA").ToString().ToDecimal, Dr("PorcentajeRetISR").ToString().ToDecimal, Dr("PorcentajeIEPS").ToString().ToDecimal, Dr("CveSubProyecto"))
|
||||||
Dim importePuTemp As Decimal = 0
|
Dim importePuTemp As Decimal = 0
|
||||||
importePuTemp = (Porcentaje * (TmpDT.SUM("TotalImporte", FiltroStr) - TmpDT.SUM("Descuento", FiltroStr)))
|
importePuTemp = (Porcentaje * (TmpDT.SUMD("TotalImporte", FiltroStr) - TmpDT.SUMD("Descuento", FiltroStr)))
|
||||||
|
|
||||||
Dim DescuentoAplicado As Decimal = 0
|
Dim DescuentoAplicado As Decimal = 0
|
||||||
If AplicaDescuentos Then
|
If AplicaDescuentos Then
|
||||||
|
|||||||
Reference in New Issue
Block a user