This commit is contained in:
2020-12-17 15:08:40 -07:00
45 changed files with 2151 additions and 1373 deletions

View File

@@ -1235,7 +1235,7 @@ Partial Class Inventarios_Consignaciones
Dim ObjInventarios As New ClsInventarios
Dim Dt As DataTable = Nothing
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, 4, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero), UsuarioActual.CveEmpresa) 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
Else
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgError)

View File

@@ -260,7 +260,7 @@
</div>
<div class="row" id="divDestino" runat="server" visible="False">
<label class="col-md-1 truncate">
<asp:Label runat="server" ID="Label1">Destino:</asp:Label>
<asp:Label runat="server" ID="LblDestino">Destino:</asp:Label>
</label>
<div class="col-md-2">
<asp:Literal ID="LtlAlmacenDestino" runat="server"></asp:Literal>

View File

@@ -728,7 +728,13 @@ Partial Class Inventarios_EntradasSalidas
TxtObservaciones.Text = Mov.Observaciones
TxtResponsable.Text = Mov.Recibio
If Mov.CveAlmacenDestino > 0 Then divDestino.Visible = True : LtlAlmacenDestino.Text = Mov.AlmacenDestino
If Mov.CveAlmacenDestino > 0 Then
divDestino.Visible = True
LtlAlmacenDestino.Text = Mov.AlmacenDestino
If DtMov.Rows(0)("Origen").ToString = "1" Then
LblDestino.Text = "Origen:"
End If
End If
CveMovimientoRelacionado = Mov.CveMovimientoRelacionado
FolioRelacionado = Mov.FolioRelacionado

View File

@@ -2512,7 +2512,7 @@ Partial Class Inventarios_EntregaAlmacen
End If
'se registra
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, True) <= 0 Then
If ContabilizaMovimientoAlmacen(ObjConta, TxtFecha.Text.ToDate, HLFolio.Text, "EntregaAlmacen", CveMovimiento, CveMovimientoEntrada, ImporteAlmacen, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, False) <= 0 Then
ErrorMovInv = True
End If

View File

@@ -328,37 +328,37 @@ Partial Class Inventarios_InventarioFisicoDetalle
End If
FechaCaducidad = If(TxtFechaCaducidad.Text.Length > 0, TxtFechaCaducidad.Text, MinFecha.ToString)
End If
If AplicaSeccion Then
Dim ObjInv As New ClsInventarios
Dim SeccionesAlmacenDelProducto As New DataTable
If ObjInv.GetProductosServiciosAlmacenSeccion(CveProducto, -1, -1, UsuarioActual.CveEmpresa) Then
SeccionesAlmacenDelProducto = ObjInv.DtResultados.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
End If
'Dim SeccionesAlmacenDelProducto As DataTable = (UsuarioActual.CveEmpresa, -1, CveProducto) '.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
'Alert(SeccionesAlmacenDelProducto.Rows.Count.ToString)
If SeccionesAlmacenDelProducto.Rows.Count = 1 Then
CveSeccionAlmacen = SeccionesAlmacenDelProducto.FiltroPrimeroValor("CveSeccionAlmacen")
Else
divSeccion.Visible = AplicaSeccion
If DdlSeccionAlmacen.Items.Count = 0 Then
DdlSeccionAlmacen.DataSource = SeccionesAlmacenDelProducto
DdlSeccionAlmacen.DataBind()
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
End If
'If AplicaSeccion Then
' Dim ObjInv As New ClsInventarios
' Dim SeccionesAlmacenDelProducto As New DataTable
' If ObjInv.GetProductosServiciosAlmacenSeccion(CveProducto, -1, -1, UsuarioActual.CveEmpresa) Then
' SeccionesAlmacenDelProducto = ObjInv.DtResultados.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
' End If
' 'Dim SeccionesAlmacenDelProducto As DataTable = (UsuarioActual.CveEmpresa, -1, CveProducto) '.FiltraParametros(String.Format("CveAlmacen IN ({0})", CveAlmacenes))
' 'Alert(SeccionesAlmacenDelProducto.Rows.Count.ToString)
' If SeccionesAlmacenDelProducto.Rows.Count = 1 Then
' CveSeccionAlmacen = SeccionesAlmacenDelProducto.FiltroPrimeroValor("CveSeccionAlmacen")
' Else
' divSeccion.Visible = AplicaSeccion
' If DdlSeccionAlmacen.Items.Count = 0 Then
' DdlSeccionAlmacen.DataSource = SeccionesAlmacenDelProducto
' DdlSeccionAlmacen.DataBind()
' DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
' End If
If DdlSeccionAlmacen.SelectedValue = "-1" Then
RfvSeccionAlmacen.Enabled = True
RfvSeccionAlmacen.Visible = True
RfvSeccionAlmacen.SetFocusOnError = True
RfvSeccionAlmacen.Validate()
RfvSeccionAlmacen.ValidationGroup = " "
Exit Sub
End If
CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
End If
ObjInv.Dispose()
SeccionAlmacen = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("SeccionAlmacen", String.Format("CveSeccionAlmacen = {0}", CveSeccionAlmacen))
End If
' If DdlSeccionAlmacen.SelectedValue = "-1" Then
' RfvSeccionAlmacen.Enabled = True
' RfvSeccionAlmacen.Visible = True
' RfvSeccionAlmacen.SetFocusOnError = True
' RfvSeccionAlmacen.Validate()
' RfvSeccionAlmacen.ValidationGroup = " "
' Exit Sub
' End If
' CveSeccionAlmacen = DdlSeccionAlmacen.SelectedValue.ToEntero
' End If
' ObjInv.Dispose()
' SeccionAlmacen = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("SeccionAlmacen", String.Format("CveSeccionAlmacen = {0}", CveSeccionAlmacen))
'End If
RFVSerie.ValidationGroup = "GrpIngresar"
RFVSerie.Enabled = False

View File

@@ -194,6 +194,7 @@
<asp:ListItem Text="Marca,Modelo,Rin,Medida de Barrenación" Value="1" />
<asp:ListItem Text="Familia,Marca,Rin,Medida de Barrenación" Value="2" />
<asp:ListItem Text="Familia,Linea,Rin,Medida de Barrenación" Value="3" />
<asp:ListItem Text="Rin,Medida de Barrenación" Value="4" />
</asp:DropDownList>
</div>
<div class="col-md-3">

View File

@@ -45,7 +45,7 @@
<asp:DropDownList runat="server" ID="DdlMedidas" CssClass="form-control input-sm select2me" Width="150px" DataTextField="Medida" DataValueField="CveMedida"></asp:DropDownList>
</td>
<td rowspan="2">
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:100px" runat="server" visible="False">
<div id="DivEquivalentes" style="overflow-y: auto; overflow-x:hidden; width: 150px; height:70px" runat="server" visible="False">
<asp:GridView ID="GvEquival" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMedidaEquivalencia,CveMedida,CveRin,CveMedidaEquivalente,CveRinEquivalente,Medida,RinTamaño,MedidaEquivalente,RinTamañoEquivalente" EmptyDataText="" ToolTip="" CssClass="table table-striped table-advance table-hover" Style="margin-top: 10px; width: 100%" GridLines="None">
<Columns>
<asp:TemplateField ItemStyle-Width="300px" HeaderText="Equivalentes">
@@ -138,7 +138,7 @@
</Columns>
</asp:GridView>
</div>
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 230px;" runat="server" visible="True">
<div id="DivMedRin" style="overflow-y: auto; width: 765px; height: 325px;" runat="server" visible="False">
<asp:GridView ID="GvMedRin" Width="100%" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" ToolTip="Listado de Contratos encontrados." CssClass="table table-striped table-hover" GridLines="None">
<Columns>
<asp:BoundField DataField="Almacen" HeaderText="Almacén" />

View File

@@ -100,7 +100,7 @@ Partial Class Inventarios_Default
If ValidarFiltrosSeleccionados() OrElse CvePS > 0 Then
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, TopSelect:=100) 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
@@ -243,6 +243,7 @@ Partial Class Inventarios_Default
ObjInventarios.Dispose()
GvMedRin.DataBind()
UPDatos.Update()
DivMedRin.Visible = True
End Sub
Private Sub CargaEquivalencia()

View File

@@ -938,12 +938,12 @@ Partial Class Inventarios_RecepcionAlmacen
TotalCompraOC = ObjCompras.DtResultados.Rows(0)("SubTotal").ToString.ToDecimal - ObjCompras.DtResultados.Rows(0)("Descuentos").ToString.ToDecimal
CveTipoCompra = ObjCompras.DtResultados.Rows(0)("CveTipoCompra").ToString.ToEntero
If TipoMovimiento = 3 Then
CargaAlmacenes(-1, "21,2", CveTipoCompra)
ElseIf CveTipoCompra = 9 Then
If CveTipoCompra = 9 Then
CargaAlmacenes(-1, "27", CveTipoCompra)
ElseIf CveTipoCompra = 10 Then
CargaAlmacenes(-1, CveTipoCompra:=CveTipoCompra)
ElseIf TipoMovimiento = 3 Then
CargaAlmacenes(-1, "21,2", CveTipoCompra)
Else
CargaAlmacenes(-1)
End If
@@ -2713,13 +2713,13 @@ Partial Class Inventarios_RecepcionAlmacen
End If
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
Dim CveTipoAlmacenFiltro As Integer = If(CveTipoCompra = 9, 25, 24)
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G4")
FolioVirtual = ObjInventario.Folio
For Each RowUsado As DataRow In DtPSVirtual.Rows
@@ -2865,11 +2865,11 @@ Partial Class Inventarios_RecepcionAlmacen
Next
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
'Dim CveSubProyecto As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", $"CveAlmacen= {DdlAlmacen.SelectedValue}").ToEntero()
Dim CveAlmacenVirutal As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, 25).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirutal, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G5")
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(TipoMovimiento > 1, 13, 2), 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveCompraSurtir, -1, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="RA/G5")
FolioVirtual = ObjInventario.Folio
For Each RowUsado As DataRow In DtPSVirtual.Rows

View File

@@ -194,9 +194,10 @@ Partial Class Inventarios_RepAnomalias
e.Row.Cells(8).Text = "0"
End If
If e.Row.Cells(7).Text = MinFecha Then
If e.Row.Cells(7).Text = MinFecha.ToString Then
e.Row.Cells(7).Text = ""
End If
e.Row.FCLabel("Lblc").Text = e.Row.RowIndex + 1
End If

View File

@@ -1521,7 +1521,7 @@ Partial Class Inventarios_TraspasoAlmacen
FolioBusqueda = If(TxtFolioRecepcion.Text = "", -1, TxtFolioRecepcion.Text.ToEntero)
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
If ObjInventarios.GetMovimientosTransitorios(DdlAlmacenRecepcion.SelectedValue.ToEntero, -1, DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
Dtt = ObjInventarios.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"))
Else
Alert("Ocurrió un error al consultar los movimientos transitorios. Por favor vuelva a intentar.", TipoMensaje.MsgAdvertencia)
@@ -1623,7 +1623,7 @@ Partial Class Inventarios_TraspasoAlmacen
End If
Dim CveMovimientoEntrada As Integer = 0
Dim Folio As Integer = 0
Dim tFolio As Integer = 0
Dim ErrorMovInv As Boolean = False
Dim TextoError As String = ""
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
@@ -1647,7 +1647,7 @@ Partial Class Inventarios_TraspasoAlmacen
If Concepto = "" Then Concepto = "Cancelación Traspaso"
If Not ErrorMovInv Then
Folio = ObjInventario.Folio
tFolio = ObjInventario.Folio
CvePrePoliza = ObjConta.AddPrePolizas("Inventario/TraspasoAlmacen", 53, 0, 0, 1, Fecha, Concepto, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
If CvePrePoliza <= 0 Then
@@ -1739,14 +1739,14 @@ Partial Class Inventarios_TraspasoAlmacen
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
ErrorMovInv = True
TextoError = "Ocurrió un erro al cancelar el traspaso"
End If
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=ImporteDecimal) Then
ErrorMovInv = True
TextoError = "Ocurrió un erro al cancelar el traspaso"
End If
@@ -1768,7 +1768,7 @@ Partial Class Inventarios_TraspasoAlmacen
TxtObservacionesRecepcion.Text = ""
Dim Mensaje As StringBuilder = New StringBuilder
Mensaje.AppendFormat("Se realizo correctamente la cancelación. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoEntrada)
Mensaje.AppendFormat("Se realizo correctamente la cancelación. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", tFolio, CveMovimientoEntrada)
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/>Folio Virtual: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a></b>&nbsp;<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Entrada Virtual</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada)
@@ -1816,7 +1816,7 @@ Partial Class Inventarios_TraspasoAlmacen
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
'' verifica que no se halla recibido previamente, si ya se recibió da salida
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa) Then
If ObjInventario.GetMovimientosTransitorios(CveAlmacenDestino, -1, CveAlmacenTransitorio, -1, FolioBusqueda, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
Dtt = ObjInventario.DtResultados.FiltraParametros(String.Format("CveTipoAlmacenDestino <> 4"), "", {"CveMovimientoDetalle", "Codigo", "Cantidad"})
If Dtt IsNot Nothing AndAlso Dtt.FiltraParametros("Cantidad < 0").Rows.Count > 0 Then