--correciones al aplicar nc con anticipo en dolares, calculo de descuento cuando es importe con aplicacion a descuento
This commit is contained in:
@@ -14081,7 +14081,28 @@ Partial Class Ventas
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
|
||||
If tipoCambio <> tipoCambioAnticipo Then
|
||||
Dim difFluctuacion As Decimal = tipoCambioAnticipo - tipoCambio
|
||||
Dim CveConceptoFluctua As Integer = 64 '64.ganacia, 65.perdida
|
||||
Dim TipoMovtoFluctua As Boolean = True
|
||||
If difFluctuacion < 0 Then
|
||||
CveConceptoFluctua = 65
|
||||
TipoMovtoFluctua = False
|
||||
Else
|
||||
CveConceptoFluctua = 64
|
||||
TipoMovtoFluctua = True
|
||||
End If
|
||||
Dim ImporteFluctuacion As Decimal = Math.Abs((ImporteAnticipo * difFluctuacion).RoundSQL)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, ImporteFluctuacion, CveConceptoFluctua, Referencia, Concepto, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura) Then
|
||||
ErrorPrepoliza = True
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Else
|
||||
If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, False, Importe11MX, Importe11MX, 11, Referencia, Concepto, CveVenta:=row2.DataKey("CveVenta").ToEntero(), CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then
|
||||
ErrorPrepoliza = True
|
||||
@@ -17904,7 +17925,7 @@ Partial Class Ventas
|
||||
SeAjustoPU = True
|
||||
PUModificado = Math.Round(PUPromocion / (1 + If(IncluyeImpuestos, PorcentajeIVA, 0)), 6)
|
||||
Else
|
||||
Descuento = Descuento + PU - TotalPromocion
|
||||
Descuento = Descuento + (PU * Cant) - TotalPromocion
|
||||
End If
|
||||
|
||||
ElseIf TipoPromo = 2 Then 'Promocion por %
|
||||
@@ -30034,6 +30055,7 @@ Partial Class Ventas
|
||||
|
||||
Private Sub DdlTipoAmortizacionAnticipo_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoAmortizacionAnticipo.SelectedIndexChanged
|
||||
|
||||
CargaDdlNCPS()
|
||||
|
||||
ImporteSujeridoAnticipo(DdlTipoAmortizacionAnticipo.SelectedValue.ToEntero)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user