Consignaciones Prepoliza recepcion traspaso
This commit is contained in:
@@ -24,6 +24,24 @@ Partial Class Inventarios_Consignaciones
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
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
|
Public Property CveConsignacion() As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveConsignacion").ToString.ToEntero
|
Return ViewState("CveConsignacion").ToString.ToEntero
|
||||||
@@ -1298,17 +1316,18 @@ Partial Class Inventarios_Consignaciones
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaRecepcion()
|
Private Sub CargaRecepcion()
|
||||||
Dim ObjInventarios As New ClsInventarios
|
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
|
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
|
Else
|
||||||
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
If Dt IsNot Nothing Then
|
If DtRecepcion IsNot Nothing Then
|
||||||
GvDatosRecepcion.DataSource = Dt
|
GvDatosRecepcion.DataSource = DtRecepcion
|
||||||
GvDatosRecepcion.DataBind()
|
GvDatosRecepcion.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1318,7 +1337,7 @@ Partial Class Inventarios_Consignaciones
|
|||||||
BtnRecibir.Visible = True
|
BtnRecibir.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dt.Dispose()
|
|
||||||
UpDatosRecepcion.Update()
|
UpDatosRecepcion.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1455,7 +1474,41 @@ Partial Class Inventarios_Consignaciones
|
|||||||
' End If
|
' End If
|
||||||
|
|
||||||
' 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
|
If Not ErrorMovInv Then
|
||||||
|
|||||||
Reference in New Issue
Block a user