Consignaciones Prepoliza recepcion traspaso
This commit is contained in:
@@ -24,6 +24,24 @@ Partial Class Inventarios_Consignaciones
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Public Property DtRecepcion() As DataTable
|
||||
Get
|
||||
|
||||
|
||||
If ViewState("DtRecepcion") Is Nothing Then
|
||||
ViewState("DtRecepcion") = New DataTable
|
||||
End If
|
||||
|
||||
|
||||
Return CType(ViewState("DtRecepcion"), DataTable)
|
||||
|
||||
End Get
|
||||
Set(value As DataTable)
|
||||
ViewState("DtRecepcion") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Public Property CveConsignacion() As Integer
|
||||
Get
|
||||
Return ViewState("CveConsignacion").ToString.ToEntero
|
||||
@@ -1298,17 +1316,18 @@ Partial Class Inventarios_Consignaciones
|
||||
End Sub
|
||||
Private Sub CargaRecepcion()
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
Dim Dt As DataTable = Nothing
|
||||
|
||||
DtRecepcion = New DataTable
|
||||
|
||||
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, 4, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero), UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
Dt = ObjInventarios.DtResultados
|
||||
DtRecepcion = ObjInventarios.DtResultados
|
||||
Else
|
||||
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
|
||||
If Dt IsNot Nothing Then
|
||||
GvDatosRecepcion.DataSource = Dt
|
||||
If DtRecepcion IsNot Nothing Then
|
||||
GvDatosRecepcion.DataSource = DtRecepcion
|
||||
GvDatosRecepcion.DataBind()
|
||||
End If
|
||||
|
||||
@@ -1318,7 +1337,7 @@ Partial Class Inventarios_Consignaciones
|
||||
BtnRecibir.Visible = True
|
||||
End If
|
||||
|
||||
Dt.Dispose()
|
||||
|
||||
UpDatosRecepcion.Update()
|
||||
End Sub
|
||||
|
||||
@@ -1455,7 +1474,41 @@ Partial Class Inventarios_Consignaciones
|
||||
' End If
|
||||
|
||||
' End If
|
||||
'End If
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
|
||||
|
||||
Dim ImportePrePoliza As Decimal = DtRecepcion.SUMD("Importe", "CveMovimientoDetalle > 0")
|
||||
|
||||
|
||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL)
|
||||
|
||||
Dim Concepto As String = "Recepcion Traspaso"
|
||||
Dim CvePrePoliza = ObjConta.AddPrePolizas("Recepcion/Consignacion", 53, ImportePrePoliza, ImportePrePoliza, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImportePrePoliza, "Recepcion Traspaso", 68, "Recepcion Traspaso", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImportePrePoliza, CveSubProyecto:=-1, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImportePrePoliza, "Recepcion Traspason", 68, "Recepcion Traspaso", Fecha, -1, -1, CveVenta:=-1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImportePrePoliza, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If ObjConta.ValidacionPrePolizaCuadre(CvePrePoliza, 6) Then
|
||||
If ObjConta.ValorPolizaDescuadre > 0 Then
|
||||
GuardaLogAD($"Consig | Error:{ObjConta.MensajePolizaDescuadre} Diferencia:{ObjConta.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
If Not ErrorMovInv Then
|
||||
|
||||
Reference in New Issue
Block a user