@@ -616,7 +616,7 @@ Partial Class Inventarios_AjustesSeccionAlmacen
|
||||
'Mostrar Sección
|
||||
GvD.Columns(11).Visible = ChkMostrarSeccion.Checked
|
||||
GvD.Columns(12).Visible = ChkMostrarSeccion.Checked
|
||||
'CargaDatos()
|
||||
CargaDatos()
|
||||
UppD.Update()
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -1889,8 +1889,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
|
||||
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
|
||||
|
||||
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC1")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
@@ -1927,8 +1929,60 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Next
|
||||
End If
|
||||
If ErrorMovInv Then Exit For
|
||||
Next
|
||||
|
||||
Next
|
||||
|
||||
ElseIf CBool(Dr("AplicaLote")) Then
|
||||
|
||||
DtDetalle = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", Dr("Consec")))
|
||||
For Each Dr1 As DataRow In DtDetalle.Rows
|
||||
If ObjInventario.GetExistenciasProducto(Dr1("CvePS").ToString().ToEntero(), Dr1("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Dr1("Lote").ToString(), CveTipoAlmacen:=26, CveSubProyecto:=CveSubProyecto, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
||||
|
||||
CantidadSaldoSinCosto = Dr("CantidadGV").ToString().ToDecimal
|
||||
|
||||
For Each Dr2 As DataRow In ObjInventario.DtResultados.FiltraParametros("CveAlmacen > 0 AND ExistenciaFinal > 0").Rows
|
||||
|
||||
'BUSCA SI EXISTE YA UN TRASPASO DEL ALMACEN DE APARTADO
|
||||
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
|
||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC2")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los movimientos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
Dim DrMovto = DtTraspasos.NewRow
|
||||
DrMovto("Almacen") = Dr2("Almacen").ToString().ToEntero()
|
||||
DrMovto("CveAlmacen") = Dr2("CveAlmacen").ToString().ToEntero()
|
||||
DrMovto("CveMovimientoSalida") = CveMovimientoSalida
|
||||
DrMovto("FolioSalida") = FolioSalida
|
||||
DrMovto("CveTipoAlmacen") = 26
|
||||
DrMovto("CveConceptoMovimientoSalida") = CveConceptoSalidaSinCosto
|
||||
DtTraspasos.Rows.Add(DrMovto)
|
||||
End If
|
||||
|
||||
CantidadPendienteSinCosto = If(Dr1("Cantidad").ToString().ToDecimal > CantidadSaldoSinCosto, CantidadSaldoSinCosto, Dr1("Cantidad").ToString().ToDecimal)
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, CantidadPendienteSinCosto.ToString().ToDecimal, Dr("CveUM").ToString().ToEntero(), Dr("CvePS").ToString().ToEntero(), 0, Lote:=Dr1("Lote").ToString(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString().ToEntero(), FechaCaducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
||||
ErrorMovInv = True
|
||||
TextoError.AppendFormat("Ocurrió un error al procesar los conceptos de traspaso de apartado. Por favor vuelva a intentar.")
|
||||
Exit For
|
||||
End If
|
||||
|
||||
DtDatosDetalle.Select($"Consec = {Dr1("Consec")}")(0)("FueTraspaso") = 1
|
||||
DtDatosDetalle.Select($"Consec = {Dr1("Consec")}")(0)("CveVentaDetalle") = Dr("CveVentaDetalle")
|
||||
|
||||
CantidadSaldoSinCosto -= CantidadPendienteSinCosto
|
||||
Dr("CantidadTraspaso") = Dr("CantidadTraspaso").ToString().ToDecimal + CantidadPendienteSinCosto
|
||||
If CantidadSaldoSinCosto <= 0 Then Exit For
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
Else
|
||||
|
||||
If ObjInventario.GetExistenciasProducto(Dr("CvePS").ToString().ToEntero(), Dr("CveUM").ToString().ToEntero(), UsuarioActual.CveEmpresa, -1, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveTipoAlmacen:=26, CveSubProyecto:=CveSubProyecto, Caducidad:=If(CBool(Dr("AplicaCaducidad")), Dr("FechaCaducidad").ToString().ToDate, MinFecha), Lote:=If(CBool(Dr("AplicaLote")), Dr("Lote").ToString(), "-1"), CveSeccionAlmacen:=If(CBool(Dr("AplicaSeccion")), Dr("CveSeccion").ToString().ToEntero(), -1)) Then
|
||||
|
||||
@@ -98,12 +98,9 @@ Partial Class Inventarios_Default
|
||||
Private Sub CargaDatos(CvePS As Integer, Tipo As Integer)
|
||||
|
||||
If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then
|
||||
Dim RestringirAlmacenes As Integer = -1
|
||||
If UsuarioActual.CveEmpresa = 119 Then RestringirAlmacenes = 1
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios()
|
||||
If ObjInventarios.GetExistenciasProducto(CvePS, -1, UsuarioActual.CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"),
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, ExcluyeTransitorios:=1, TopSelect:=100, RestringirAlmacenes:=RestringirAlmacenes) Then
|
||||
ExcluyeApartados:=-1, ExcluyeAdelantado:=1, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, ExcluyeTransitorios:=1, TopSelect:=100) Then
|
||||
Dim dr As Data.DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).FiltroPrimero("")
|
||||
|
||||
If dr IsNot Nothing Then
|
||||
|
||||
1428
Inventarios/Reportes/Entradasysalidas.rdlc
Normal file
1428
Inventarios/Reportes/Entradasysalidas.rdlc
Normal file
File diff suppressed because it is too large
Load Diff
@@ -537,19 +537,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
'codigo provisional.
|
||||
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||
Dim CveSubP As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.selectedvalue.toentero).FiltroPrimeroValor("CveSubProyecto", "").ToEntero
|
||||
|
||||
If DrPS("AplicaCaducidad").ToString = "True" AndAlso CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||
If Not ChkSugiereFechaCaducidad.Checked AndAlso (TxtnFechaCaducidad.Text = "" OrElse TxtnLote.Text = "") Then
|
||||
Alert("Falta Especificar lote/Fecha del producto", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.Checked And CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||
If DrPS("AplicaCaducidad").ToString = "True" AndAlso ChkSugiereFechaCaducidad.checked And CveSubP.Contiene(10276) Then
|
||||
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistenciasCaducidad(CveProducto, DdlAlmacenOrigen.SelectedValue.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue) Then
|
||||
If ObjInventarios.GetExistenciasCaducidad(CveProducto, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.selectedvalue) Then
|
||||
Dim dtt As DataTable = ObjInventarios.DtResultados
|
||||
|
||||
If Cantidad > dtt.SUMD("Cantidad") Then
|
||||
@@ -583,20 +577,22 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
tLote = If(TxtnLote.Visible, TxtnLote.Text, "-1")
|
||||
tCaducidad = If(TxtnFechaCaducidad.Visible, TxtnFechaCaducidad.Text.ToDate, MinFecha)
|
||||
|
||||
If Not CveSubP.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||
If CveSubP <> 10276 Then
|
||||
tLote = "-1"
|
||||
tCaducidad = MinFecha
|
||||
End If
|
||||
|
||||
|
||||
Dim Valido = ValidaExistencia(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, If(TxtnSerie.Visible, TxtnSerie.Text, "-1"), tLote, tCaducidad)
|
||||
|
||||
If Valido Then
|
||||
If Valido Then
|
||||
AgregarPS(Cantidad, CveProducto, DdlUnidad.SelectedValue.ToEntero, TxtnObservaciones.Text, CveSeccionAlmacen:=DdlSeccionAlmacen.SelectedValue.ToEntero, SeccionAlmacen:=DdlSeccionAlmacen.SelectedItem.Text, Serie:=If(TxtnSerie.Visible, TxtnSerie.Text, ""), Lote:=If(tLote = "-1", "", tLote), FechaCaducidad:=tCaducidad, CveSeccionAlmacenDestino:=DdlSeccionAlmacenDestino.SelectedValue.ToEntero, Limpia:=FuncionalidadSinSerie)
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -605,29 +601,21 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Dim ExistenciaEspecificada As Decimal
|
||||
Dim CantidadEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(Serie <> "-1", $" AND Serie = '{Serie}'", "")}")
|
||||
Dim Existencia As Decimal
|
||||
|
||||
Dim Inv As New ClsInventarios
|
||||
If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm")) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
'Existencia= Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
||||
Dim Existencia As Decimal = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), PendientePorSurtir:=1)
|
||||
|
||||
If Existencia > 0 Then
|
||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||
If (FechaCaducidad > MinFecha OrElse Not Serie.Contiene("", "-1") OrElse Not Lote.Contiene("", "-1")) Then
|
||||
If Inv.GetExistenciasProducto(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
ExistenciaEspecificada = Inv.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
'ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||
Dim StrB As New StringBuilder
|
||||
StrB.AppendFormat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida)
|
||||
If Not Serie.Contiene("", "-1") Then StrB.AppendFormat(" AND Serie = '{0}' ", Serie)
|
||||
If Not Lote.Contiene("", "-1") Then StrB.AppendFormat(" AND Lote = '{0}' ", Lote)
|
||||
If FechaCaducidad.ToDate > MinFecha Then StrB.AppendFormat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString)
|
||||
Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.ToString)
|
||||
ExistenciaEspecificada = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||
Dim StrB As New stringbuilder
|
||||
StrB.appendformat("CvePS = {0} AND CveUM = {1} ", CvePS, CveUnidadMedida)
|
||||
If Not Serie.Contiene("", "-1") Then StrB.appendformat(" AND Serie = '{0}' ", Serie)
|
||||
If Not Lote.Contiene("", "-1") Then StrB.appendformat(" AND Lote = '{0}' ", Lote)
|
||||
If FechaCaducidad.ToDate > MinFecha Then StrB.appendformat(" AND FechaCaducidad = '{0}' ", FechaCaducidad.ToShortDateString)
|
||||
Dim CantidadEspecificaEnGrid As Decimal = DtMovimientos.SUMD("Cantidad", StrB.tostring)
|
||||
|
||||
If ExistenciaEspecificada - Cantidad - CantidadEspecificaEnGrid < 0 Then
|
||||
Alert(String.Format("Solo hay en existencia: {0:#,###.##}", ExistenciaEspecificada), TipoMensaje.MsgAdvertencia)
|
||||
@@ -849,22 +837,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Dim ExistenciaEspecificada As Decimal = 0
|
||||
CantidadenGrid = DtMovimientos.SUMD("Cantidad", String.Format("CvePS = {0} AND CveUM = {1} {2} {3} {4} ", dr("CvePS"), dr("CveUM"), If(Not dr("Serie").ToString.Contiene("-1", ""), $" AND Serie = '{dr("Serie")}'", ""), tLote, tFechaCaducidad))
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
|
||||
'Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
Existencia = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
Existencia -= CantidadenGrid
|
||||
'DtMovimientos.SUM("Cantidad", String.Format("CvePS = {0}", dr("CvePS").ToString.ToEntero))
|
||||
'la primera vez valida, que la existencia global, cumpla, considerando lo pendiente por surtir
|
||||
'las segunda consulta, que tenga existencia, ya con los parametros especificos
|
||||
If FechaCaducidad > MinFecha OrElse (Lote <> "-1" AndAlso Lote <> "") Then
|
||||
If ObjInventario.GetExistenciasProducto(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
ExistenciaEspecificada = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
|
||||
'ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||
ExistenciaEspecificada = ObjInventario.GetExistenciasPS(dr("CvePS").ToString.ToEntero, dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=-1)
|
||||
Existencia = ExistenciaEspecificada - CantidadenGrid
|
||||
End If
|
||||
|
||||
@@ -886,11 +865,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Lote = If(gvr.DataKey("Lote") = "", "-1", gvr.DataKey("Lote"))
|
||||
FechaCaducidad = If(gvr.DataKey("FechaCaducidad") = "", MinFecha, gvr.DataKey("FechaCaducidad").ToDate)
|
||||
|
||||
If ObjInventario.GetExistenciasProducto(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, Caducidad:=FechaCaducidad) Then
|
||||
'si hay existencia en almacen costeado, lo tengo que sacar
|
||||
Existencia = ObjInventario.DtResultados.FiltroPrimeroValor("ExistenciaFinal", String.Format("CVeAlmacen = {0}", DdlAlmacenOrigen.SelectedValue)).ToDecimal
|
||||
End If
|
||||
'Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
Existencia = ObjInventario.GetExistenciasPS(gvr.DataKey("CvePS").ToString.ToEntero, gvr.DataKey("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDate.ToString("yyyy/MM/dd 23:59"), CveSeccionAlmacen:=CveSeccionAlmacen, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, PendientePorSurtir:=1)
|
||||
Existencia -= gvr.FCTextBox("TxtCantidad2").Text.ToEntero
|
||||
If Existencia < 0 Then
|
||||
ErrorExistencia = True
|
||||
@@ -1576,8 +1551,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Protected Sub ChkSugiereFechaCaducidad_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
TxtnFechaCaducidad.Visible = Not ChkSugiereFechaCaducidad.Checked
|
||||
TxtnLote.Visible = Not ChkSugiereFechaCaducidad.Checked
|
||||
TxtnFechaCaducidad.visible = Not ChkSugiereFechaCaducidad.checked
|
||||
TxtnLote.visible = Not ChkSugiereFechaCaducidad.checked
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -1710,11 +1685,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("AplicaLote").ToString.Trim = "1" Then
|
||||
e.Row.FCTextBox("TxtLote").Visible = True
|
||||
e.Row.FCTextBox("TxtLote").visible = True
|
||||
End If
|
||||
|
||||
If e.Row.DBCampo("AplicaCaducidad").ToString.Trim = "1" Then
|
||||
e.Row.FCTextBox("TxtCaducidad").Visible = True
|
||||
e.Row.FCTextBox("TxtCaducidad").visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -1727,10 +1702,10 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
'FUNCIONALIDAD PISTOLA DE CODIGOS
|
||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" And e.Row.DBCampo("CodigoBarras").Trim <> "" Then
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
End If
|
||||
e.Row.FCTextBox("TxtCantidad").Enabled = False
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnCancelarTraspaso_Click(sender As Object, e As EventArgs)
|
||||
@@ -2012,9 +1987,9 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim tLote As String = gvr.DataKey("Lote").ToString
|
||||
Dim tFechaCaducidad As Date = gvr.DataKey("FechaCaducidad").ToDate
|
||||
|
||||
If CveSubProyectoRecibe.ToString.Contiene(UsuarioActual.Empresa.Funcionalidad(347)) Then
|
||||
tLote = gvr.FCTextBox("TxtLote").Text
|
||||
tFechaCaducidad = gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
If CveSubProyectoRecibe = 10276 Then
|
||||
tLote = gvr.FCTextBox("TxtLote").text
|
||||
tFechaCaducidad = gvr.FCTextBox("TxtCaducidad").text.todate
|
||||
End If
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, PrecioEntrada, CveAF:=gvr.DataKey("CveAF").ToString.ToEntero, CveSeccionAlmacen:=gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, Serie:=gvr.DataKey("Serie").ToString, Lote:=tLote, FechaCaducidad:=tFechaCaducidad, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada) Then
|
||||
@@ -2997,7 +2972,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
||||
Dim excelFile As ExcelFile = excelFile.Load(flatFilePath)
|
||||
|
||||
Dim unnamed As Integer = 0
|
||||
Dim cols As Integer
|
||||
|
||||
Reference in New Issue
Block a user