-- corrección de ingreso virtual
This commit is contained in:
@@ -2986,8 +2986,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas(Modulo, 53, 0, 0, 1, Fecha, Concepto, CveUsuario, CveEmpresa)
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
If CveMovimientoSalida > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Importe, Importe, 68, "", Concepto, CveMovimientoAlmacen:=CveMovimientoSalida, Contabilizable:=Contabilizable) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If CveMovimientoEntrada > 0 Then
|
||||
@@ -2995,7 +2997,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
If dttCostos IsNot Nothing Then
|
||||
If dttCostos IsNot Nothing AndAlso CveMovimientoSalida > 0 Then
|
||||
For Each RowInv As DataRow In dttCostos.Rows
|
||||
Dim ValorInventario As Decimal = dttCostos.SUM("Total", $"CveClasificacion = {RowInv("CveClasificacion")}").ToString.ToDecimal.RoundSQL
|
||||
|
||||
@@ -3006,7 +3008,6 @@ Partial Class Inventarios_EntradasSalidas
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv Then Retorno = CvePrePoliza
|
||||
|
||||
Return Retorno
|
||||
@@ -5551,7 +5552,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
Dim tCveMovtoEntrada As Integer = If(tOrigen > 0, CveMovimientoVirtual, -1)
|
||||
Dim tCveMovtoSalida As Integer = If(tOrigen > 0, -1, CveMovimientoVirtual)
|
||||
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.Replace(",", "").ToDate, "Virtual", "ES/GV", tCveMovtoSalida, tCveMovtoEntrada, DtPSVirtual.SUM("TotalCargo"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True, dttCosto, tCveSubProyecto) > 0 Then
|
||||
If Not ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.Replace(",", "").ToDate, "Virtual", "ES/GV", tCveMovtoSalida, tCveMovtoEntrada, DtPSVirtual.SUM("TotalCargo"), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True, dttCosto, tCveSubProyecto) > 0 Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user