Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -100,6 +100,10 @@
|
||||
<asp:LinkButton runat="server" ID="LnkAgregarNuevoMov" Visible="false" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkAgregarNuevoMov_Click"
|
||||
title="Crear Nuevo Movimiento A Partir De" Text="<i class='fa fa-server'></i> Crear A Partir De"></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton runat="server" ID="LnkGenerarVirtual" Visible="false" CssClass="" data-toggle="tooltip" data-placement="left" OnClick="LnkGenerarVirtual_Click"
|
||||
title="Generar Movimiento Virtual" Text="<i class='fa fa-server'></i> Generar Movimiento Virtual"></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
|
||||
@@ -335,6 +335,10 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
|
||||
If Request("CveMovimiento") IsNot Nothing AndAlso Request("CveMovimiento").ToString.ToEntero > 0 Then
|
||||
If UsuarioActual.CveUsuario = 100 AndAlso UsuarioActual.CveEmpresa = 140 Then
|
||||
LnkGenerarVirtual.Visible = True
|
||||
End If
|
||||
|
||||
CargaDatos(Request("CveMovimiento").ToString.ToEntero)
|
||||
'CargaGvPaqueteria()
|
||||
Else
|
||||
@@ -1297,7 +1301,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String)
|
||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, Serie As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, FechaCaducidad As Date, CveSeccionAlmacen As Integer, SeccionAlmacen As String, Optional CargarGV As Boolean = True)
|
||||
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
|
||||
|
||||
Dim Valido As Boolean = True
|
||||
@@ -1378,8 +1382,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
registro.Item("Observaciones") = Observaciones
|
||||
registro.Item("AplicaCaducidad") = RowPS("AplicaCaducidad").ToString
|
||||
DtMovimientos.Rows.Add(registro)
|
||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
|
||||
If CargarGV Then
|
||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -2375,7 +2383,7 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
#Region " GVM "
|
||||
Private Sub CargaGVM(DtTemp As DataTable)
|
||||
GvM.DataSource = DtTemp
|
||||
GvM.DataSource = DtTemp '.FiltraPorIndices(0, If(DtTemp.Rows.Count > 20, 19, DtTemp.Rows.Count - 1))
|
||||
GvM.DataBind()
|
||||
|
||||
EscondeColumnasGVM(DtTemp)
|
||||
@@ -4567,102 +4575,105 @@ Partial Class Inventarios_EntradasSalidas
|
||||
End If
|
||||
|
||||
dt.TableName = "Datos"
|
||||
Dim DTSeccionesAlmacen As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
If Not ErrorArchivo Then
|
||||
NumRow = 0
|
||||
Dim RowNoEncontrados As String = ""
|
||||
Dim NumAgregados As Integer = 0
|
||||
For Each Row As DataRow In dt.Rows
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||
Dim UM As String = Row("UM").ToString
|
||||
Dim Codigo As String = Row("Código").ToString.Trim.ToUpper
|
||||
'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper
|
||||
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
|
||||
Dim PrecioUnitario As Decimal = Row("Precio Unitario").ToString.ToDecimal
|
||||
Dim Serie As String = Row("Serie").ToString
|
||||
Dim Lote As String = Row("Lote").ToString
|
||||
Dim Caducidad As String = Row("Caducidad").ToString
|
||||
Dim SeccionAlmacen As String = Row("SeccionAlmacen").ToString
|
||||
Try
|
||||
Dim DTSeccionesAlmacen As DataTable = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||
If Not ErrorArchivo Then
|
||||
NumRow = 0
|
||||
Dim RowNoEncontrados As String = ""
|
||||
Dim NumAgregados As Integer = 0
|
||||
|
||||
Dim CvePS As Integer = 0
|
||||
Dim CveUM As Integer = 0
|
||||
For Each Row As DataRow In dt.Rows
|
||||
Dim Cantidad As Decimal = Row("Cantidad").ToString.ToDecimal
|
||||
Dim UM As String = Row("UM").ToString
|
||||
Dim Codigo As String = Row("Código").ToString.Trim.ToUpper
|
||||
'Dim CodigoBarras As String = Row("Codigo Barras").ToString.Trim.ToUpper
|
||||
Dim ProductoServicio As String = Row("Producto/Servicio").ToString.Trim.ToUpper
|
||||
Dim PrecioUnitario As Decimal = Row("Precio Unitario").ToString.ToDecimal
|
||||
Dim Serie As String = Row("Serie").ToString
|
||||
Dim Lote As String = Row("Lote").ToString
|
||||
Dim Caducidad As String = Row("Caducidad").ToString
|
||||
Dim SeccionAlmacen As String = Row("SeccionAlmacen").ToString
|
||||
|
||||
NumRow = NumRow + 1
|
||||
Dim CvePS As Integer = 0
|
||||
Dim CveUM As Integer = 0
|
||||
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
If SeccionAlmacen <> "" Then
|
||||
CveSeccionAlmacen = DTSeccionesAlmacen.FiltroPrimeroValor("CveSeccion", String.Format("SeccionAlmacen = '{0}'", SeccionAlmacen)).ToEntero
|
||||
End If
|
||||
NumRow = NumRow + 1
|
||||
|
||||
If Codigo <> "" Then
|
||||
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
End If
|
||||
Dim CveSeccionAlmacen As Integer = -1
|
||||
If SeccionAlmacen <> "" Then
|
||||
CveSeccionAlmacen = DTSeccionesAlmacen.FiltroPrimeroValor("CveSeccion", String.Format("SeccionAlmacen = '{0}'", SeccionAlmacen)).ToEntero
|
||||
End If
|
||||
'ElseIf CodigoBarras <> "" Then
|
||||
' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
|
||||
' If StrArray.Length > 0 Then
|
||||
' If CBool(StrArray(0)) = True Then
|
||||
' CvePS = StrArray(1).ToEntero
|
||||
' Else
|
||||
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
' End If
|
||||
' End If
|
||||
ElseIf ProductoServicio <> "" Then
|
||||
Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
|
||||
|
||||
|
||||
If Codigo <> "" Then
|
||||
Dim StrArray() As String = GetPS("Codigo", Codigo).Split("|"c)
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
End If
|
||||
End If
|
||||
'ElseIf CodigoBarras <> "" Then
|
||||
' Dim StrArray() As String = GetPS("CodigoBarras", CodigoBarras).Split("|"c)
|
||||
' If StrArray.Length > 0 Then
|
||||
' If CBool(StrArray(0)) = True Then
|
||||
' CvePS = StrArray(1).ToEntero
|
||||
' Else
|
||||
' RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
' End If
|
||||
' End If
|
||||
ElseIf ProductoServicio <> "" Then
|
||||
Dim StrArray() As String = GetPS("PS", ProductoServicio).Split("|"c)
|
||||
If StrArray.Length > 0 Then
|
||||
If CBool(StrArray(0)) = True Then
|
||||
CvePS = StrArray(1).ToEntero
|
||||
Else
|
||||
RowNoEncontrados &= StrArray(1) & "<\BR>"
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||
End If
|
||||
|
||||
If CvePS > 0 Then
|
||||
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
||||
|
||||
If DrPS IsNot Nothing AndAlso String.IsNullOrEmpty(UM) Then
|
||||
CveUM = DrPS("CveUnidadMedida").ToString().ToEntero()
|
||||
UM = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("UnidadMedida", $"CveUnidadMedida={CveUM}")
|
||||
End If
|
||||
|
||||
AddNew(CvePS, ProductoServicio, CveUM, UM, Cantidad, PrecioUnitario, Serie.Replace(" ", String.Empty), "", "-1", "-1", "",
|
||||
Lote, Caducidad.ToDate, CveSeccionAlmacen, SeccionAlmacen, CargarGV:=False)
|
||||
|
||||
NumAgregados = NumAgregados + 1
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
Alert("Se Cargaron " & NumAgregados & " Productos o Servicios.<\BR>Los siguientes Productos o Servicios no se encontraron en la Base de Datos.<\BR>" & RowNoEncontrados, TipoMensaje.MsgAdvertencia)
|
||||
If NumAgregados > 0 Then
|
||||
RegistraScript("$('#DivCargaExcel').modal('hide')", "hidemodal")
|
||||
TxtExcel.Text = "[]"
|
||||
End If
|
||||
Else
|
||||
RowNoEncontrados &= "<\BR> - En la fila " & NumRow & " no se especificó código, código de barras ó descripción."
|
||||
End If
|
||||
|
||||
If CvePS > 0 Then
|
||||
'CveUM = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"CvePS = '{CvePS}'").ToString.ToEntero
|
||||
|
||||
txtCantidad.Text = Cantidad.ToString
|
||||
DdlProducto2.SelectedValue = CvePS.ToString
|
||||
DdlProducto2.SelectedText = Codigo + " - " + ProductoServicio
|
||||
txtPrecio.Text = PrecioUnitario.ToString
|
||||
|
||||
ElProductoChange()
|
||||
TxtnSerie.Text = Serie
|
||||
TxtnLote.Text = Lote
|
||||
DdlSeccionAlmacen.SelectedValueExist(CveSeccionAlmacen.ToString)
|
||||
TxtnFechaCaducidad.Text = If(Caducidad = "", MinFecha.ToString, Caducidad)
|
||||
AgregarPS()
|
||||
txtPrecio.Text = ""
|
||||
DdlUnidad.SelectedItem.Text = ""
|
||||
TxtnSerie.Text = ""
|
||||
TxtnLote.Text = ""
|
||||
TxtnFechaCaducidad.Text = ""
|
||||
'DdlSeccionAlmacen.SelectedValue = "-1"
|
||||
NumAgregados = NumAgregados + 1
|
||||
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
If RowNoEncontrados.Length > 0 Then
|
||||
Alert("Se Cargaron " & NumAgregados & " Productos o Servicios.<\BR>Los siguientes Productos o Servicios no se encontraron en la Base de Datos.<\BR>" & RowNoEncontrados, TipoMensaje.MsgAdvertencia)
|
||||
If NumAgregados > 0 Then
|
||||
Alert("Se Cargaron " & NumAgregados & " Productos o Servicios correctamente.")
|
||||
RegistraScript("$('#DivCargaExcel').modal('hide')", "hidemodal")
|
||||
TxtExcel.Text = "[]"
|
||||
End If
|
||||
Else
|
||||
Alert("Se Cargaron " & NumAgregados & " Productos o Servicios correctamente.")
|
||||
RegistraScript("$('#DivCargaExcel').modal('hide')", "hidemodal")
|
||||
TxtExcel.Text = "[]"
|
||||
|
||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||
RegistraScript("playsonidito('beep-07.wav')")
|
||||
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al cargar los datos", ex)
|
||||
End Try
|
||||
|
||||
End If
|
||||
dt.Dispose()
|
||||
End Sub
|
||||
@@ -4969,4 +4980,73 @@ Partial Class Inventarios_EntradasSalidas
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkGenerarVirtual_Click(sender As Object, e As EventArgs)
|
||||
If CveMovimiento > 0 Then
|
||||
Dim DtPSVirtual As New DataTable("DtTamanios")
|
||||
Dim ErrorMovInv As Boolean = False
|
||||
|
||||
Dim CveMovimientoVirtual As Integer = -1
|
||||
Dim FolioVirtual As Integer = -1
|
||||
|
||||
Dim tCveAlmacen As Integer = -1
|
||||
Dim tOrigen As Integer = -1
|
||||
Dim ObjInventario As New ClsInventarios
|
||||
ObjInventario.IniciaTransacSQL()
|
||||
|
||||
Try
|
||||
If ObjInventario.GetMovimientos(CveMovimiento, -1, -1, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||
tCveAlmacen = ObjInventario.DtResultados.FiltroPrimeroValor("CveAlmacen").ToEntero()
|
||||
tOrigen = ObjInventario.DtResultados.FiltroPrimeroValor("Origen").ToEntero()
|
||||
End If
|
||||
|
||||
Dim CveAlmacenVirtual As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=tCveAlmacen).FiltroPrimeroValor("CveAlmacenVirtual").ToEntero()
|
||||
|
||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 Then
|
||||
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, If(tOrigen > 0, 2, 3), 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, CveMovimientoRelacionado:=CveMovimiento, Observaciones:=TxtObservaciones.Text.Trim, Modulo:="ES/GV")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
For Each RowUsado As DataRow In DtPSVirtual.Rows
|
||||
Dim CvePS = RowUsado("CvePS").ToString().ToEntero()
|
||||
Dim CantidadUsado As Decimal = RowUsado("Cantidad").ToString().ToDecimal()
|
||||
Dim PU As Decimal = RowUsado("Cargo").ToString().ToDecimal()
|
||||
Dim CveUM As Integer = RowUsado("CveUM").ToString().ToEntero()
|
||||
|
||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoVirtual, CantidadUsado, CveUM, CvePS, PU, -1, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||
ErrorMovInv = True
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
Alert("No hay usados para generar el virtual", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Else
|
||||
ErrorMovInv = True
|
||||
Alert("El almacen no tiene vinculado un almacen virtual", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
Catch ex As Exception
|
||||
ErrorMovInv = True
|
||||
End Try
|
||||
|
||||
If ErrorMovInv Then
|
||||
ObjInventario.RollBack()
|
||||
Else
|
||||
ObjInventario.Commit()
|
||||
End If
|
||||
|
||||
ObjInventario.Dispose()
|
||||
|
||||
If CveMovimientoVirtual > 0 AndAlso Not ErrorMovInv Then
|
||||
Alert($"Se generó el movimiento virtual con el folio:<b>{FolioVirtual}<b/>")
|
||||
End If
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -412,6 +412,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property ValidarRecepcionUsados As Boolean
|
||||
Get
|
||||
Return If(IsNothing(ViewState("ValidarRecepcionUsados")), False, CBool(ViewState("ValidarRecepcionUsados")))
|
||||
End Get
|
||||
Set
|
||||
ViewState("ValidarRecepcionUsados") = Value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
'Private Property DtDocumentos As DataTable
|
||||
' Get
|
||||
' Return CType(ViewState("DtDocumentos"), DataTable)
|
||||
@@ -880,6 +889,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
RealizarMovimientoVirtual = False
|
||||
SumarImporteUsados = False
|
||||
ValidarRecepcionUsados = False
|
||||
BtnGuardar.Enabled = True
|
||||
CargaAlmacenes(-1)
|
||||
|
||||
@@ -934,6 +944,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
RealizarTraspasoAlmacenDevolucion = False
|
||||
RealizarMovimientoVirtual = False
|
||||
SumarImporteUsados = False
|
||||
ValidarRecepcionUsados = False
|
||||
CveAlmacenDevolucionProveedor = -1
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
@@ -990,10 +1001,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If NumProductos > 0 AndAlso NumUsados > 0 Then
|
||||
DtRecepcion = ObjInventario.DtResultados.FiltraParametros("EsUsado = False")
|
||||
SumarImporteUsados = True
|
||||
ValidarRecepcionUsados = True
|
||||
'SI LA COMPRA TIENE PUROS USADOS, MOSTRAR LOS USADOS Y CARGAR LOS ALMACENES
|
||||
ElseIf NumProductos = 0 AndAlso NumUsados > 0 Then
|
||||
CargaSoloUsados = True
|
||||
SumarImporteUsados = True
|
||||
ValidarRecepcionUsados = True
|
||||
DtRecepcion = ObjInventario.DtResultados.Copy()
|
||||
If TipoMovimiento <> 3 Then 'sino es devolucion/NC
|
||||
CargaAlmacenes(DtRecepcion.Rows(0)("CveSubProyecto").ToString.ToEntero, "22", CveTipoCompra)
|
||||
@@ -1006,8 +1019,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
If ObjCompras.GetCompraDetalle(pCveCompra) Then
|
||||
If ObjCompras.DtResultados.COUNT("Cantidad", "CveClasificacion=20519") > 0 Then
|
||||
SumarImporteUsados = True
|
||||
ValidarRecepcionUsados = True
|
||||
Else
|
||||
SumarImporteUsados = False
|
||||
ValidarRecepcionUsados = False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -2409,6 +2424,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
Dim CvePrePoliza = -1
|
||||
Dim MensajeContabilidad = ""
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||
'VALIDA SI SE VAN A RECIBIR TODOS LOS PRODUCTOS
|
||||
If ValidarRecepcionUsados Then
|
||||
For Each gvr As GridViewRow In GvInv.Rows
|
||||
If gvr.FCTextBox("TbCantidadF").Text.ToDecimal() <> gvr.DataKey("CantidadC").ToDecimal() Then
|
||||
ValidarRecepcionUsados = False
|
||||
Exit For
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Try
|
||||
'RECARGA TC CUANDO ES RECEPCION CON OC Y DOLARES
|
||||
If CveOCSurtir > 0 And CveMoneda <> 1 Then
|
||||
@@ -2831,7 +2860,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
|
||||
'VERIFICA SI TIENE ALMACEN VIRTUAL
|
||||
If CveAlmacenVirtual > 0 Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimiento, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
@@ -3026,7 +3055,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
CveMovimientoRef = CveMovimiento
|
||||
End If
|
||||
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=SumarImporteUsados) Then
|
||||
If ObjInventario.GetMovimientosDetalleVirtual(CveMovimientoRef, UsuarioActual.CveEmpresa, CveCompra:=CveCompraSurtir, ValidaUsadosCompra:=ValidarRecepcionUsados) Then
|
||||
DtPSVirtual = ObjInventario.DtResultados
|
||||
End If
|
||||
|
||||
|
||||
@@ -202,16 +202,23 @@
|
||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" EmptyDataText="No se encontró ningun Traspaso de Almacén"
|
||||
ToolTip="" data-rows="2"
|
||||
ToolTip="" data-rows="1"
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Folio" DataField="Folio" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Disponible" DataField="Cantidad" DataFormatString="{0:#,##0.00####}" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="5%" />
|
||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="5%" />
|
||||
|
||||
|
||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Left"/>
|
||||
<asp:BoundField HeaderText="Valor" DataField="Valor" ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:n}" />
|
||||
<asp:BoundField HeaderText="Almacen Origen" DataField="Almacen" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Almacen Destino" DataField="AlmacenDestino" ItemStyle-Width="10%" />
|
||||
<asp:BoundField HeaderText="Responsable" DataField="Recibio" ItemStyle-Width="10%" />
|
||||
|
||||
</Columns>
|
||||
<HeaderStyle CssClass="Titulos" />
|
||||
<RowStyle CssClass="Texto" />
|
||||
|
||||
@@ -77,7 +77,7 @@ Partial Class RepTraspasoAlmacen
|
||||
If ObjInventarios.RepTraspasoAlmacen(FechaI.ToDate, FechaF.ToDate, DdlAlmacenOrigen.SelectedValue.ToEntero, DdlAlmacenDestino.SelectedValue.ToEntero, ChkRecibido.Checked, UsuarioActual.CveEmpresa) Then
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados
|
||||
DtInventarios = ObjInventarios.DtResultados
|
||||
GvDatos.Columns(4).Visible = DtInventarios.MAX("Serie") <> ""
|
||||
GvDatos.Columns(5).Visible = DtInventarios.MAX("Serie") <> ""
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
@@ -100,23 +100,6 @@ Partial Class RepTraspasoAlmacen
|
||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
|
||||
'Cuando es titulo
|
||||
If e.Row.DBCampo("PS").ToString.Trim = "" And e.Row.DBCampo("FechaMovto") <> "" Then
|
||||
|
||||
e.Row.CssClass = "Totales"
|
||||
|
||||
e.Row.Cells(0).Text = String.Format("Folio: <a class=""texto"" style=""color:white;"" target='_blank' href='/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}'>{0}</a> ", e.Row.DBCampo("FolioSalida"), e.Row.DBCampo("CveMovimientoSalida"))
|
||||
e.Row.Cells(1).Text = String.Format("{0}", e.Row.DBCampo("FechaMovto").ToString.ToDate.ToShortDateString)
|
||||
e.Row.Cells(2).Text = String.Format("<span style =""white-space: nowrap;"">{0}</span>", e.Row.DBCampo("Almacen"))
|
||||
e.Row.Cells(3).Text = String.Format("<span style =""white-space: nowrap;"">{0}</span>", e.Row.DBCampo("AlmacenDestino"))
|
||||
e.Row.Cells(4).Text = String.Format("Responsable: {0}", e.Row.DBCampo("Recibio"))
|
||||
ElseIf e.Row.DBCampo("FechaMovto") = "" Then
|
||||
e.Row.CssClass = "Totales"
|
||||
e.Row.Cells(0).Text = "Total General"
|
||||
e.Row.Cells(2).Text = String.Format("<span style =""white-space: nowrap;"">Almacen Origen</span>")
|
||||
e.Row.Cells(3).Text = String.Format("<span style =""white-space: nowrap;"">Almacen Destino</span>")
|
||||
Else
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
@@ -165,6 +148,8 @@ Partial Class RepTraspasoAlmacen
|
||||
params.Add(New ReportParameter("FechaFin", FechaF))
|
||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||
params.Add(New ReportParameter("Filtros", StrFiltro.ToString))
|
||||
params.Add(New ReportParameter("FechaImprimio", DateTime.Now.ToString))
|
||||
|
||||
If Imagen.Exists Then
|
||||
params.Add(New ReportParameter("LogoPath", logouri))
|
||||
Else
|
||||
|
||||
@@ -3065,7 +3065,13 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim DrAlmO As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenOrigen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||
If DrAlmO("CveTipoAlmacen").ToString.ToEntero = 26 Then 'costeados
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (26) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
|
||||
ElseIf DrAlmO("CveTipoAlmacen").ToString.ToEntero = 22 Then 'Recepcion de Usados
|
||||
|
||||
DdlAlmacenDestino.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen IN (22) AND Estatus = 'Activo'")
|
||||
DdlAlmacenDestino.DataBind()
|
||||
DdlAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||
Else
|
||||
|
||||
Reference in New Issue
Block a user