-- devolución
This commit is contained in:
@@ -1510,9 +1510,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
BtnCancelarTraspaso.Visible = True
|
BtnCancelarTraspaso.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(162) = "1" Then
|
If UsuarioActual.TienePermisoProceso(347) Then
|
||||||
DivRealizarDevolucion.Visible = True
|
DivRealizarDevolucion.Visible = True
|
||||||
ChkRealizarDevolucion.Checked = True
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1647,30 +1646,35 @@ Partial Class Inventarios_TraspasoAlmacen
|
|||||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||||
'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR
|
'DEBE CONSIDERAR SOLO LAS FILAS QUE TENGA PRODUCTOS, NO EL TOTALIZADOR
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
CveMovimientoDetalleSalida = GvRow.DataKey("CveMovimientoDetalle").ToString.ToEntero
|
CveMovimientoDetalleSalida = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||||
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToString.ToDecimal
|
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||||
Dim PrecioUnitario As Decimal = GvRow.DataKey("PU").ToString.ToDecimal
|
|
||||||
|
If ChkRealizarDevolucion.Checked Then Cantidad = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
|
|
||||||
|
Dim PrecioUnitario As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||||
If CveMovimientoDetalleSalida <= 0 Then
|
If CveMovimientoDetalleSalida <= 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
If Cantidad <> 0 Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, -1, -1, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote"), FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, -1, -1, Serie:=GvRow.DataKey("Serie"), Lote:=GvRow.DataKey("Lote"), FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=CveMovimientoDetalleSalida) Then
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
'MOV, Alm, Transito
|
|
||||||
If GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, Cantidad, GvRow.DataKey("CveUM").ToString.ToEntero, CvePS, PrecioUnitario, CveSeccionAlmacen:=-3, Serie:=GvRow.DataKey("Serie").ToString, Lote:=GvRow.DataKey("Lote").ToString, FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
|
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
'MOV, Alm, Transito
|
||||||
CveMovimientoSalidaTransitorio = 0
|
If GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero > 0 Then
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaTransitorio, Cantidad, GvRow.DataKey("CveUM").ToEntero, CvePS, PrecioUnitario, CveSeccionAlmacen:=-3, Serie:=GvRow.DataKey("Serie"), Lote:=GvRow.DataKey("Lote").ToString, FechaCaducidad:=GvRow.DataKey("FechaCaducidad").ToDate, CveMovimientoDetalleEntrada:=GvRow.DataKey("CveMovimientoDetalleTransitorio").ToString.ToEntero) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
CveMovimientoSalidaTransitorio = 0
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
importe += Cantidad * PrecioUnitario
|
importe += Cantidad * PrecioUnitario
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
Reference in New Issue
Block a user