--Sobrante y faltante cuando se aplican anticipos
This commit is contained in:
@@ -906,6 +906,23 @@ Partial Class Ventas_PVCobranza
|
||||
SaldoPendientePagos -= PagoEfectivo
|
||||
End If
|
||||
|
||||
If SobranteFaltante <> 0 Then
|
||||
Dim Pago As New VentaPago
|
||||
Pago.ImportePagoVenta = Math.Abs(SobranteFaltante)
|
||||
Pago.ImportePago = Math.Abs(SobranteFaltante)
|
||||
Pago.CveIE = -1
|
||||
Pago.CveMonedaPago = VentaActual.CveMoneda
|
||||
Pago.Fecha = NowADS()
|
||||
Pago.Referencia = VentaActual.SerieFolio
|
||||
Pago.TipoPago = "XXX"
|
||||
Pago.OtroGastoIngreso = SobranteFaltante
|
||||
|
||||
Dim ErrorConta As Boolean = AplicaPrePolizaPagoVenta(VentaActual, Pago, CvePrePoliza, ObjConta)
|
||||
If ErrorConta Then
|
||||
MsgError = "Error en aplicación de sobrante/faltante"
|
||||
End If
|
||||
End If
|
||||
|
||||
If SaldoPendienteVenta > 0 AndAlso Not ChkSobFaltante.Checked Then
|
||||
MsgError = "Tiene saldo pendiente por aplicar"
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user