Merge branch 'master' of http://adsistemasof.sytes.net:8383/SIG
This commit is contained in:
@@ -1758,7 +1758,11 @@ Public Class ClsCompras
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
OnError = True
|
OnError = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Me.OnError("Ocurrió un error al obtener la bitácora.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
If ex.Message.Contains("Desbordamiento de SqlDateTime. Debe estar entre 1/1/1753 12:00:00 AM y 12/31/9999 11:59:59 PM.") Then
|
||||||
|
Alert("Fechas fuera de rango, debe estar entre 1/1/1753 12:00:00 AM y 12/31/9999 11:59:59 PM", TipoMensaje.MsgAdvertencia)
|
||||||
|
Else
|
||||||
|
Me.OnError("Ocurrió un error al obtener la bitácora.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End If
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return OnError
|
Return OnError
|
||||||
|
|||||||
@@ -25,6 +25,7 @@ Public Class ClsContabilidad
|
|||||||
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
Private disposedValue As Boolean = False ' Para detectar llamadas redundantes
|
||||||
'REGISTRAR CONEXIONES ABIERTAS
|
'REGISTRAR CONEXIONES ABIERTAS
|
||||||
Private CveConexion As Integer = 0
|
Private CveConexion As Integer = 0
|
||||||
|
Public Property CvePrePolizaDetalle As Integer
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " P R O P I E D A D E S"
|
#Region " P R O P I E D A D E S"
|
||||||
@@ -899,11 +900,17 @@ Public Class ClsContabilidad
|
|||||||
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
.Add("@CveColectiva", SqlDbType.Int).Value = CveColectiva
|
||||||
.Add("@CveCreditoDetalle", SqlDbType.Int).Value = CveCreditoDetalle
|
.Add("@CveCreditoDetalle", SqlDbType.Int).Value = CveCreditoDetalle
|
||||||
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
.Add("@PorcentajeImpuesto", SqlDbType.Money).Value = PorcentajeImpuesto
|
||||||
|
|
||||||
|
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
CvePrePolizaDetalle = SqlAdapter.SelectCommand.Parameters("@CvePrePolizaDetalle").Value.ToString.ToEntero
|
||||||
|
If CvePrePolizaDetalle > 0 Then
|
||||||
|
Retorno = True
|
||||||
|
End If
|
||||||
|
|
||||||
Catch ex1 As SqlException
|
Catch ex1 As SqlException
|
||||||
If ex1.Message.Contains("50015;") Then
|
If ex1.Message.Contains("50015;") Then
|
||||||
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
OnError("No se puede registrar una póliza en un ejercicio Cerrado", ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
@@ -5862,6 +5869,22 @@ Public Class ClsContabilidad
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
Public Function GetProductosSinIEPS(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Conta_ProductosSinIEPS")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||||
|
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al obtener el reporte de productos sin IEPS.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
Public Function GetRepIEPSLayoutAnual(Ano As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetRepIEPSLayoutAnual(Ano As Integer, Tipo As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Conta_RepIEPSLayoutAnual")
|
DataAdapter("PA_Conta_RepIEPSLayoutAnual")
|
||||||
@@ -6561,4 +6584,6 @@ Public Class ClsContabilidad
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -80,7 +80,7 @@ Public Class ClsInventarios
|
|||||||
Public Property CveSubProyectoInventario As Integer
|
Public Property CveSubProyectoInventario As Integer
|
||||||
Public Property SubProyecto As String
|
Public Property SubProyecto As String
|
||||||
Public Property SubProyectoInventario As String
|
Public Property SubProyectoInventario As String
|
||||||
Public Property SerieLote As String
|
Public Property Serie As String
|
||||||
Public Property Guia As String
|
Public Property Guia As String
|
||||||
Public Property TipoCambio As Double
|
Public Property TipoCambio As Double
|
||||||
Public Property FolioVenta As String
|
Public Property FolioVenta As String
|
||||||
@@ -98,6 +98,7 @@ Public Class ClsInventarios
|
|||||||
Public Property CveCliente As Integer
|
Public Property CveCliente As Integer
|
||||||
Public Property CveClienteSucursal As Integer
|
Public Property CveClienteSucursal As Integer
|
||||||
Public Property NombreCliente As String
|
Public Property NombreCliente As String
|
||||||
|
Public Property CveProveedor As Integer
|
||||||
Public Property DepartamentoEntrega As String
|
Public Property DepartamentoEntrega As String
|
||||||
Public Property PedidoContrato As String
|
Public Property PedidoContrato As String
|
||||||
Public Property GastoIndirecto As Double
|
Public Property GastoIndirecto As Double
|
||||||
@@ -568,22 +569,11 @@ Public Class ClsInventarios
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " SECCIONES ALMACENES "
|
#Region " SECCIONES ALMACENES "
|
||||||
Public Function GetSeccionesAlmacenes() As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_INV_SeccionesAlmacenesGet")
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al obtener el Catálogo de Secciones de Almacenes.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
Public Function UpdateSeccion(CveSeccion As Integer, Seccion As String, Estatus As Boolean) As Boolean
|
Public Function UpdateSeccion(CveSeccion As Integer, Seccion As String, Estatus As Boolean) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_INV_SeccionesAlmacenesUpdate")
|
DataAdapter("PA_Inv_SeccionesAlmacenesUpdate")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveSeccion", SqlDbType.Int).Value = CveSeccion
|
.Add("@CveSeccion", SqlDbType.Int).Value = CveSeccion
|
||||||
@@ -606,10 +596,11 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetSeccionesAlmacenes(CveSeccion As Integer) As Boolean
|
Public Function GetSeccionesAlmacenes(CveEmpresa As Integer, CveSeccion As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_SeccionesAlmacenesGet")
|
DataAdapter("PA_Inv_SeccionesAlmacenesGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveSeccion", SqlDbType.Int).Value = CveSeccion
|
.Add("@CveSeccion", SqlDbType.Int).Value = CveSeccion
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
@@ -824,6 +815,7 @@ Public Class ClsInventarios
|
|||||||
CveCliente = If(dr("CveCliente").ToString.ToEntero > 0, dr("CveCliente").ToString.ToEntero, -1)
|
CveCliente = If(dr("CveCliente").ToString.ToEntero > 0, dr("CveCliente").ToString.ToEntero, -1)
|
||||||
CveClienteSucursal = If(dr("CveClienteSucursal").ToString.ToEntero > 0, dr("CveClienteSucursal").ToString.ToEntero, -1)
|
CveClienteSucursal = If(dr("CveClienteSucursal").ToString.ToEntero > 0, dr("CveClienteSucursal").ToString.ToEntero, -1)
|
||||||
NombreCliente = dr("Nombre").ToString
|
NombreCliente = dr("Nombre").ToString
|
||||||
|
CveProveedor = If(dr("CveProveedor").ToString.ToEntero > 0, dr("CveProveedor").ToString.ToEntero, -1)
|
||||||
DepartamentoEntrega = dr("DepartamentoEntrega").ToString
|
DepartamentoEntrega = dr("DepartamentoEntrega").ToString
|
||||||
PedidoContrato = dr("PedidoContrato").ToString
|
PedidoContrato = dr("PedidoContrato").ToString
|
||||||
TienePrePoliza = dr("TienePrePoliza").ToString.ToEntero
|
TienePrePoliza = dr("TienePrePoliza").ToString.ToEntero
|
||||||
@@ -1267,37 +1259,38 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function AddMovimientoDetalle(CveMovimiento As Integer, Cantidad As Double, CveUM As Integer, CvePS As Integer, PU As Decimal, CveAF As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional SerieLote As String = "",
|
Public Function AddMovimientoDetalle(CveMovimiento As Integer, Cantidad As Double, CveUM As Integer, CvePS As Integer, PU As Decimal, Optional CveAF As Integer = -1,
|
||||||
Optional Observaciones As String = "", Optional CveMovimientoDetalleEntrada As Integer = -1, Optional PUTC As Decimal = -1, Optional FechaCaducidad As Date = MinFecha,
|
Optional CveSeccionAlmacen As Integer = -1, Optional Serie As String = "", Optional Lote As String = "", Optional FechaCaducidad As Date = MinFecha,
|
||||||
|
Optional Observaciones As String = "", Optional CveMovimientoDetalleEntrada As Integer = -1, Optional PUTC As Decimal = -1,
|
||||||
Optional CostoIndirecto As Decimal = 0, Optional CveCompraDetalle As Integer = -1, Optional CveOrdenCompraDetalle As Integer = -1, Optional CveVentaDetalle As Integer = -1,
|
Optional CostoIndirecto As Decimal = 0, Optional CveCompraDetalle As Integer = -1, Optional CveOrdenCompraDetalle As Integer = -1, Optional CveVentaDetalle As Integer = -1,
|
||||||
Optional Lote As String = "", Optional Batch As String = "", Optional CveContratoDetalle As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional EsInterno As Integer = -1) As Boolean
|
Optional CveContratoDetalle As Integer = -1, Optional CveUsuarioModifico As Integer = -1, Optional EsInterno As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_MovimientosDetalleAdd")
|
DataAdapter("PA_Inv_MovimientosDetalleAdd")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
.Add("@CveMovimiento", SqlDbType.Int).Value = CveMovimiento
|
||||||
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
|
||||||
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
||||||
|
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@PU", SqlDbType.Decimal).Value = PU
|
.Add("@PU", SqlDbType.Decimal).Value = PU
|
||||||
.Add("@PUTC", SqlDbType.Decimal).Value = PUTC
|
.Add("@PUTC", SqlDbType.Decimal).Value = PUTC
|
||||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
.Add("@CostoIndirecto", SqlDbType.Decimal).Value = CostoIndirecto
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
|
||||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@CveMovimientoDetalleEntrada", SqlDbType.Int).Value = CveMovimientoDetalleEntrada
|
.Add("@CveMovimientoDetalleEntrada", SqlDbType.Int).Value = CveMovimientoDetalleEntrada
|
||||||
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
|
||||||
.Add("@CostoIndirecto", SqlDbType.Decimal).Value = CostoIndirecto
|
|
||||||
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
.Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle
|
||||||
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
.Add("@CveOrdenCompraDetalle", SqlDbType.Int).Value = CveOrdenCompraDetalle
|
||||||
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||||
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
.Add("@CveContratoDetalle", SqlDbType.Int).Value = CveContratoDetalle
|
||||||
.Add("@CveMovimientoDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
.Add("@EsInterno", SqlDbType.Int).Value = EsInterno
|
.Add("@EsInterno", SqlDbType.Int).Value = EsInterno
|
||||||
|
|
||||||
|
.Add("@CveMovimientoDetalle", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
@@ -1320,7 +1313,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function UpdateMovimientoDetalle(Cantidad As Double, CveUM As Integer, CvePS As Integer, PU As Double, CveAF As Integer, CveMovimientoDetalle As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional SerieLote As String = "",
|
Public Function UpdateMovimientoDetalle(Cantidad As Double, CveUM As Integer, CvePS As Integer, PU As Double, CveAF As Integer, CveMovimientoDetalle As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional Serie As String = "",
|
||||||
Optional Observaciones As String = "-1", Optional PUTC As Double = -1, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
Optional Observaciones As String = "-1", Optional PUTC As Double = -1, Optional CveUsuarioModifico As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -1335,7 +1328,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@PUTC", SqlDbType.Money).Value = PUTC
|
.Add("@PUTC", SqlDbType.Money).Value = PUTC
|
||||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
.Add("@CveAF", SqlDbType.Int).Value = CveAF
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
.Add("@Observaciones", SqlDbType.VarChar).Value = Observaciones
|
||||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||||
End With
|
End With
|
||||||
@@ -1772,8 +1765,10 @@ Public Class ClsInventarios
|
|||||||
#Region " INVENTARIOS - EXISTENCIAS "
|
#Region " INVENTARIOS - EXISTENCIAS "
|
||||||
Public Function GetExistenciasPS(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
Public Function GetExistenciasPS(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
||||||
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||||
Optional FechaMovto As String = "-1", Optional SerieLote As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
Optional FechaMovto As String = "-1",
|
||||||
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional Lote As String = "-1", Optional Batch As String = "-1",
|
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha,
|
||||||
|
Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||||
|
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
|
||||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Decimal
|
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Decimal
|
||||||
Dim Retorno As Decimal = -1
|
Dim Retorno As Decimal = -1
|
||||||
|
|
||||||
@@ -1791,9 +1786,9 @@ Public Class ClsInventarios
|
|||||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
.Add("@FechaCaducidad", SqlDbType.Date).Value = FechaCaducidad
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||||
@@ -1823,9 +1818,10 @@ Public Class ClsInventarios
|
|||||||
End Function
|
End Function
|
||||||
Public Function GetExistenciasProducto(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
Public Function GetExistenciasProducto(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
||||||
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||||
Optional FechaMovto As String = "-1", Optional SerieLote As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
Optional FechaMovto As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||||
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional Lote As String = "-1", Optional Batch As String = "-1",
|
Optional Serie As String = "-1", Optional Lote As String = "-1", Optional Caducidad As Date = MinFecha,
|
||||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional Caducidad As Date = MinFecha) As Boolean
|
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1,
|
||||||
|
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_ExistenciasGet")
|
DataAdapter("PA_Inv_ExistenciasGet")
|
||||||
|
|
||||||
@@ -1834,20 +1830,19 @@ Public Class ClsInventarios
|
|||||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
|
||||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
|
||||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
|
||||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
|
||||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
|
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||||
|
.Add("@Caducidad", SqlDbType.Date).Value = Caducidad
|
||||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||||
.Add("@Caducidad", SqlDbType.Date).Value = Caducidad
|
|
||||||
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
@@ -1859,21 +1854,18 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetExistenciasPSSerie(SerieLote As String, CveAlmacen As Integer, CveEmpresa As Integer, Optional FechaMovto As String = "-1") As Decimal
|
Public Function GetExistenciasPSSerie(Serie As String, CveAlmacen As Integer, CveEmpresa As Integer, Optional CveSeccionAlmacen As Integer = -1) As Decimal
|
||||||
|
|
||||||
If SerieLote = "" Then Return 0
|
|
||||||
|
|
||||||
|
If Serie = "" Then Return 0
|
||||||
Dim Retorno As Decimal = 0
|
Dim Retorno As Decimal = 0
|
||||||
If FechaMovto = "-1" Then
|
|
||||||
FechaMovto = String.Format("{0} 00:00", Now.AddDays(1).ToString("yyyy/MM/dd"))
|
|
||||||
End If
|
|
||||||
|
|
||||||
DataAdapter("PA_Inv_ExistenciasPSSerieGet")
|
DataAdapter("PA_Inv_ExistenciasPSSerieGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
|
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
' .Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
' .Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||||
|
|
||||||
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||||
@@ -1896,13 +1888,13 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
Public Function GetCostoPSSerie(CvePS As Integer, SerieLote As String, CveAlmacen As Integer, CveEmpresa As Integer) As Decimal
|
Public Function GetCostoPSSerie(CvePS As Integer, Serie As String, CveAlmacen As Integer, CveEmpresa As Integer) As Decimal
|
||||||
Dim Retorno As Decimal = 0
|
Dim Retorno As Decimal = 0
|
||||||
DataAdapter("PA_Inv_CostoPSSerieGet")
|
DataAdapter("PA_Inv_CostoPSSerieGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
.Add("@Costo", SqlDbType.Money).Direction = ParameterDirection.Output
|
.Add("@Costo", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||||
@@ -1965,7 +1957,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Public Function GetExistenciasPSEmpaque(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
Public Function GetExistenciasPSEmpaque(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer,
|
||||||
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional CveTipoAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||||
Optional FechaMovto As String = "-1", Optional SerieLote As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
Optional FechaMovto As String = "-1", Optional Serie As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||||
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional Lote As String = "-1", Optional Batch As String = "-1",
|
Optional ExcluyeAdelantado As Integer = -1, Optional PendientePorSurtir As Integer = -1, Optional Lote As String = "-1", Optional Batch As String = "-1",
|
||||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean
|
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -1984,7 +1976,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
.Add("@FechaMovto", SqlDbType.DateTime).Value = DateTime.ParseExact(FechaMovto, "yyyy/MM/dd HH:mm", Nothing)
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
@@ -2031,7 +2023,7 @@ Public Class ClsInventarios
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al momento de vericar la existencia de los productos por xml.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al momento de verificar la existencia de los productos por xml.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
@@ -2429,7 +2421,7 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, SerieLote As String, CveUsuario As Integer) As Boolean
|
Public Function AddInventarioFisicoDetalle(CveInventarioFisico As Integer, CvePS As Integer, CveUM As Integer, Cantidad As Double, Serie As String, CveUsuario As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_InventarioFisicoDetalleAdd")
|
DataAdapter("PA_Inv_InventarioFisicoDetalleAdd")
|
||||||
@@ -2439,7 +2431,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
.Add("@CveUM", SqlDbType.Int).Value = CveUM
|
||||||
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@Estatus", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@Estatus", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
End With
|
End With
|
||||||
@@ -2451,7 +2443,7 @@ Public Class ClsInventarios
|
|||||||
Retorno = True
|
Retorno = True
|
||||||
ElseIf SqlAdapter.SelectCommand.Parameters("@Estatus").Value.ToString.ToEntero = 2 Then
|
ElseIf SqlAdapter.SelectCommand.Parameters("@Estatus").Value.ToString.ToEntero = 2 Then
|
||||||
Retorno = False
|
Retorno = False
|
||||||
Alert($"Ya existe la Serie <b>{SerieLote}</b> en el inventario actual.", TipoMensaje.MsgAdvertencia)
|
Alert($"Ya existe la Serie <b>{Serie}</b> en el inventario actual.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch Ex1 As SqlException
|
Catch Ex1 As SqlException
|
||||||
@@ -2846,15 +2838,16 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function SerieLoteRecomendadoGet(CvePS As Integer, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
Public Function SerieRecomendadoGet(CvePS As Integer, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1, Optional CveSeccionAlmacen As Integer = -1, Optional CveSubProyecto As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_SerieLoteRecomendadoGet")
|
DataAdapter("PA_Inv_SerieRecomendadoGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
|
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
End With
|
End With
|
||||||
|
|
||||||
@@ -2862,15 +2855,15 @@ Public Class ClsInventarios
|
|||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener la Serie/Lote recomendado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener la Serie recomendado.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function LoteBatchRecomendadoGet(CvePS As Integer, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean
|
Public Function LoteRecomendadoGet(CvePS As Integer, CveEmpresa As Integer, Optional CveAlmacen As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_LoteBatchRecomendadoGet")
|
DataAdapter("PA_Inv_LoteRecomendadoGet")
|
||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
@@ -3021,7 +3014,7 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetEstatusVentaPorSurir(CveVenta As Integer) As Boolean
|
Public Function GetEstatusVentaPorSurtir(CveVenta As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
DataAdapter("PA_Inv_EstatusVentaPorSurtirGet")
|
DataAdapter("PA_Inv_EstatusVentaPorSurtirGet")
|
||||||
@@ -3365,7 +3358,7 @@ Public Class ClsInventarios
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
#Region " INVENTARIOS - COSTO PS "
|
#Region " INVENTARIOS - COSTO PS "
|
||||||
Public Function GetCostoPS(CvePS As Integer, Cantidad As Double, CveAlmacen As Integer, SerieLote As String, FechaFin As Datetime, Optional CveSubProyecto As Integer = -1, Optional CveTipoAlmacen As Integer = 1) As Decimal
|
Public Function GetCostoPS(CvePS As Integer, Cantidad As Double, CveAlmacen As Integer, Serie As String, FechaFin As DateTime, Optional CveSubProyecto As Integer = -1, Optional CveTipoAlmacen As Integer = 1) As Decimal
|
||||||
Dim Retorno As Decimal = -1D
|
Dim Retorno As Decimal = -1D
|
||||||
DataAdapter("PA_Inv_PSCostoGet")
|
DataAdapter("PA_Inv_PSCostoGet")
|
||||||
|
|
||||||
@@ -3373,7 +3366,7 @@ Public Class ClsInventarios
|
|||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
.Add("@SerieLote", SqlDbType.VarChar).Value = SerieLote
|
.Add("@Serie", SqlDbType.VarChar).Value = Serie
|
||||||
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
.Add("@FechaFin", SqlDbType.DateTime).Value = FechaFin
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
.Add("@CveTipoAlmacen", SqlDbType.Int).Value = CveTipoAlmacen
|
||||||
@@ -4741,41 +4734,60 @@ Public Class ClsInventarios
|
|||||||
|
|
||||||
#Region "MOVIMIENTOS DETALLE SECCION ALMACEN"
|
#Region "MOVIMIENTOS DETALLE SECCION ALMACEN"
|
||||||
|
|
||||||
Public Function AddMovimientosDetalleSeccionesAlmacen(CveMovimientoDetalle As Integer, CveSeccionAlmacen As Integer, Cantidad As Decimal) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_Inv_MovimientosDetalleSeccionesAlmacenAdd")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveMovimientoDetalle", SqlDbType.Int).Value = CveMovimientoDetalle
|
|
||||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
|
||||||
.Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al agregar movimientos detalle seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
Public Function GetMovimientosDetalleSeccionesAlmacen(CveSeccionAlmacen As Integer, CveAlmacen As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetMovimientosDetalleSeccionesAlmacen(CveAlmacen As Integer, CveClasificacion As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_MovimientosDetalleSeccionesAlmacenGet")
|
DataAdapter("PA_Inv_MovimientosDetalleAjusteSeccionesGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
Retorno = True
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
OnError("Ocurrió un error al agregar movimientos detalle seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
OnError("Ocurrió un error al obtener movimientos detalle seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
'Public Function AddMovimientosDetalleSeccionesAlmacen(CveMovimientoDetalle As Integer, CveSeccionAlmacen As Integer, Cantidad As Decimal) As Boolean
|
||||||
|
' Dim Retorno As Boolean = False
|
||||||
|
' DataAdapter("PA_Inv_MovimientosDetalleSeccionesAlmacenAdd")
|
||||||
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
|
' .Add("@CveMovimientoDetalle", SqlDbType.Int).Value = CveMovimientoDetalle
|
||||||
|
' .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
|
' .Add("@Cantidad", SqlDbType.Float).Value = Cantidad
|
||||||
|
' End With
|
||||||
|
' Try
|
||||||
|
' SqlAdapter.Fill(Data)
|
||||||
|
' Retorno = True
|
||||||
|
' Catch ex As Exception
|
||||||
|
' OnError("Ocurrió un error al agregar movimientos detalle seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
' End Try
|
||||||
|
' Return Retorno
|
||||||
|
'End Function
|
||||||
|
|
||||||
|
'Public Function GetMovimientosDetalleSeccionesAlmacen(CveSeccionAlmacen As Integer, CveAlmacen As Integer, CvePS As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
' Dim Retorno As Boolean = False
|
||||||
|
' DataAdapter("PA_Inv_MovimientosDetalleSeccionesAlmacenGet")
|
||||||
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
|
' .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
|
' .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
|
' .Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
' End With
|
||||||
|
' Try
|
||||||
|
' SqlAdapter.Fill(Data)
|
||||||
|
' Retorno = True
|
||||||
|
' Catch ex As Exception
|
||||||
|
' OnError("Ocurrió un error al agregar movimientos detalle seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
' End Try
|
||||||
|
' Return Retorno
|
||||||
|
'End Function
|
||||||
|
|
||||||
Public Function GetExistenciaSeccionAlmacen(CveVenta As Integer, CveAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
Public Function GetExistenciaSeccionAlmacen(CveVenta As Integer, CveAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_ExistenciaSeccionAlmacenGet")
|
DataAdapter("PA_Inv_ExistenciaSeccionAlmacenGet")
|
||||||
@@ -4793,23 +4805,23 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetKardexSeccionAlmacen(CvePS As Integer, CveAlmacen As Integer, CveSeccionAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
'Public Function GetKardexSeccionAlmacen(CvePS As Integer, CveAlmacen As Integer, CveSeccionAlmacen As Integer, CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
' Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_KardexSeccionAlmacenGet")
|
' DataAdapter("PA_Inv_KardexSeccionAlmacenGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
' With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
' .Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
' .Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
' .Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
End With
|
' End With
|
||||||
Try
|
' Try
|
||||||
SqlAdapter.Fill(Data)
|
' SqlAdapter.Fill(Data)
|
||||||
Retorno = True
|
' Retorno = True
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
OnError("Ocurrió un error al obtener el kardex de seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
' OnError("Ocurrió un error al obtener el kardex de seccion almacen", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
End Try
|
' End Try
|
||||||
Return Retorno
|
' Return Retorno
|
||||||
End Function
|
'End Function
|
||||||
Public Function AddProductosServiciosAlmacenSeccion(CvePS As Integer, CveAlmacen As Integer, CveAlmacenSeccion As Integer) As Boolean
|
Public Function AddProductosServiciosAlmacenSeccion(CvePS As Integer, CveAlmacen As Integer, CveAlmacenSeccion As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Inv_ProductosServiciosAlmacenSeccionAdd")
|
DataAdapter("PA_Inv_ProductosServiciosAlmacenSeccionAdd")
|
||||||
|
|||||||
@@ -1181,11 +1181,11 @@ Public Class ClsPaginas
|
|||||||
' Application("GlobalDTProductosServicios") = value
|
' Application("GlobalDTProductosServicios") = value
|
||||||
' End Set
|
' End Set
|
||||||
'End Property
|
'End Property
|
||||||
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1) As DataTable
|
ReadOnly Property GlobalDTPS(CveEmpresa As Integer, Optional CvePS As Integer = -1, Optional SATClavePS As String = "-1", Optional AplicaParaVenta As Integer = -1, Optional Estatus As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
|
||||||
If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta) Then
|
If ObjPS.GetPS(CvePS, -1, CveEmpresa, SATClavePS:=SATClavePS, pAplicaParaVenta:=AplicaParaVenta, pEstado:=Estatus) Then
|
||||||
GlobalDTPS = ObjPS.DtResultados
|
GlobalDTPS = ObjPS.DtResultados
|
||||||
Else
|
Else
|
||||||
GlobalDTPS = Nothing
|
GlobalDTPS = Nothing
|
||||||
@@ -1634,7 +1634,7 @@ Public Class ClsPaginas
|
|||||||
Application("GlobalDTClientesCorporativo") = value
|
Application("GlobalDTClientesCorporativo") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTCompProveedores(CveEmpresa As Integer) As DataTable
|
Property GlobalDTCompProveedores(CveEmpresa As Integer, Optional CveProveedor As Integer = -1) As DataTable
|
||||||
Get
|
Get
|
||||||
Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa)
|
Dim AppNombre As String = String.Format("GlobalDTCompProveedores-{0}", CveEmpresa)
|
||||||
'sino existe, recarga los datos
|
'sino existe, recarga los datos
|
||||||
@@ -1645,7 +1645,11 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveEmpresa <> -1 Then
|
If CveEmpresa <> -1 Then
|
||||||
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
Dim StrSQL As New StringBuilder
|
||||||
|
StrSQL.AppendFormat("CveEmpresa = {0}", CveEmpresa)
|
||||||
|
If CveProveedor >= 0 Then StrSQL.AppendFormat(" AND CveProveedor = {0} ", CveProveedor)
|
||||||
|
|
||||||
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), StrSQL.ToString, "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTCompProveedores = Dv.ToTable
|
GlobalDTCompProveedores = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
@@ -1730,10 +1734,21 @@ Public Class ClsPaginas
|
|||||||
Application("GlobalDTInvConceptos") = value
|
Application("GlobalDTInvConceptos") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTSeccionAlmacen(CveEmpresa As Integer) As DataTable
|
Property GlobalDTSeccionAlmacen(CveEmpresa As Integer, CveAlmacen As Integer) As DataTable
|
||||||
Get
|
Get
|
||||||
|
Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
|
||||||
|
'sino existe, recarga los datos
|
||||||
|
If Application(AppNombre) Is Nothing Then
|
||||||
|
Dim ObjInv As New ClsInventarios
|
||||||
|
If ObjInv.GetSeccionesAlmacenes(CveEmpresa, -1) Then Application(AppNombre) = ObjInv.DtResultados
|
||||||
|
ObjInv.Dispose()
|
||||||
|
End If
|
||||||
If CveEmpresa <> -1 Then
|
If CveEmpresa <> -1 Then
|
||||||
Dim Dv As New DataView(DirectCast(Application("GlobalDTSeccionAlmacen"), DataTable), String.Format("CveEmpresa = {0}", CveEmpresa), "", DataViewRowState.CurrentRows)
|
Dim Str As New StringBuilder
|
||||||
|
|
||||||
|
If CveEmpresa <> -1 Then Str.AppendFormat(" CveEmpresa = {0} ", CveEmpresa)
|
||||||
|
If CveAlmacen > 0 Then Str.AppendFormat("AND CveAlmacen = {0}", CveAlmacen)
|
||||||
|
Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows)
|
||||||
GlobalDTSeccionAlmacen = Dv.ToTable
|
GlobalDTSeccionAlmacen = Dv.ToTable
|
||||||
Dv.Dispose()
|
Dv.Dispose()
|
||||||
Else
|
Else
|
||||||
@@ -1742,7 +1757,8 @@ Public Class ClsPaginas
|
|||||||
|
|
||||||
End Get
|
End Get
|
||||||
Set(value As DataTable)
|
Set(value As DataTable)
|
||||||
Application("GlobalDTSeccionAlmacen") = value
|
Dim AppNombre As String = String.Format("GlobalDTSeccionAlmacen-{0}", CveEmpresa)
|
||||||
|
Application(AppNombre) = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1) As DataTable
|
Property GlobalDTAlmacen(CveEmpresa As Integer, Optional CveTipoAlmacen As Integer = -1, Optional CveEstatus As Integer = 1) As DataTable
|
||||||
@@ -4298,7 +4314,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Inventarios/RepConsignaciones.aspx".ToUpper(), 364)
|
PaginaDict.Add("/Inventarios/RepConsignaciones.aspx".ToUpper(), 364)
|
||||||
PaginaDict.Add("/Inventarios/RepAlmacenCompras.aspx".ToUpper(), 375)
|
PaginaDict.Add("/Inventarios/RepAlmacenCompras.aspx".ToUpper(), 375)
|
||||||
PaginaDict.Add("/Inventarios/RepAlmacen.aspx".ToUpper(), 376)
|
PaginaDict.Add("/Inventarios/RepAlmacen.aspx".ToUpper(), 376)
|
||||||
PaginaDict.Add("/Inventarios/RecepcionEntrega.aspx".ToUpper(), 387)
|
PaginaDict.Add("/Inventarios/EntregaAlmacen.aspx".ToUpper(), 387)
|
||||||
PaginaDict.Add("/Inventarios/RepUMEquivalencia.aspx".ToUpper(), 399)
|
PaginaDict.Add("/Inventarios/RepUMEquivalencia.aspx".ToUpper(), 399)
|
||||||
PaginaDict.Add("/Inventarios/ResguardoMaterial.aspx".ToUpper(), 562)
|
PaginaDict.Add("/Inventarios/ResguardoMaterial.aspx".ToUpper(), 562)
|
||||||
PaginaDict.Add("/Inventarios/RepMaximoMinimo.aspx".ToUpper(), 389)
|
PaginaDict.Add("/Inventarios/RepMaximoMinimo.aspx".ToUpper(), 389)
|
||||||
@@ -4341,7 +4357,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/Inventarios/RepEntradasSalidas2.aspx".ToUpper(), -1)
|
PaginaDict.Add("/Inventarios/RepEntradasSalidas2.aspx".ToUpper(), -1)
|
||||||
' PaginaDict.Add("/Inventarios/RecepcionUsados.aspx".ToUpper(), 1202)
|
' PaginaDict.Add("/Inventarios/RecepcionUsados.aspx".ToUpper(), 1202)
|
||||||
PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891)
|
PaginaDict.Add("/Inventarios/RepTraspasoEmitido.aspx".ToUpper(), 891)
|
||||||
PaginaDict.Add("/Inventarios/KardexSeccionAlmacen.aspx".ToUpper(), 892)
|
PaginaDict.Add("/Inventarios/AjustesSeccionAlmacen.aspx".ToUpper(), 892)
|
||||||
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
|
PaginaDict.Add("/Inventarios/RepTraspasoAlmacen.aspx".ToUpper(), 688)
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -7191,10 +7207,15 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
|
'params.Add(New ReportParameter("FechaOC", ObjOC.Fecha.ToShortDateString))
|
||||||
|
Dim RutaFisicaSol As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol)
|
||||||
|
Dim RutaVirtuaSol As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={0}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaSol))
|
||||||
Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioSol))
|
Dim FirmaSol As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioSol))
|
||||||
params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioSol))).AbsoluteUri, "")))
|
params.Add(New ReportParameter("FirmaSolicito", If(FirmaSol.Exists, RutaVirtuaSol, "")))
|
||||||
|
|
||||||
|
Dim RutaFisicaAut As String = String.Format("Empresas\{0}\Firmas\{1}.png", EmpresaActual.CveEmpresa, CveUsuarioAut)
|
||||||
|
Dim RutaVirtuaAut As String = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(RutaFisicaAut))
|
||||||
Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioAut))
|
Dim FirmaAut As New System.IO.FileInfo(String.Format("{0}Firmas\{1}.png", EmpresaActual.Ruta, CveUsuarioAut))
|
||||||
params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, New Uri(Server.MapPath(String.Format("~/Empresas/{0}/Firmas/{1}.png", EmpresaActual.CveEmpresa, CveUsuarioAut))).AbsoluteUri, "")))
|
params.Add(New ReportParameter("FirmaAutorizo", If(FirmaAut.Exists, RutaVirtuaAut, "")))
|
||||||
|
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
|
bytes = StreamPDF(String.Format("{0}Formatos\OC.rdlc", EmpresaActual.Ruta), DtDetalle, params, $"OC_{ObjOC.Folio.ToString}", RDSName:="DsOC", MR:=MR)
|
||||||
|
|||||||
@@ -1345,7 +1345,27 @@ Public Class ClsProductosServicios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdateAplicaSeccionAlmacen(CvePS As Integer, CveEmpresa As Integer, AplicaSeccionAlmacen As Boolean) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Gral_ProductosServiciosSeccionAlmacenUpdate")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@AplicaSeccionAlmacen", SqlDbType.Bit).Value = AplicaSeccionAlmacen
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch Ex1 As SqlException
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar aplica seccion almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function GetMarcas(CveEmpresa As Integer) As Boolean
|
Public Function GetMarcas(CveEmpresa As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|||||||
@@ -1796,12 +1796,12 @@ Namespace Modelos
|
|||||||
|
|
||||||
If Dr("CveTipoInvPS").ToString.ToEntero = 5 Then
|
If Dr("CveTipoInvPS").ToString.ToEntero = 5 Then
|
||||||
For Each Dr2 As DataRow In DtContratosSerieDetalle.FiltraParametros($"ConsecId = {Dr("CveContratoDetalle")}").Rows
|
For Each Dr2 As DataRow In DtContratosSerieDetalle.FiltraParametros($"ConsecId = {Dr("CveContratoDetalle")}").Rows
|
||||||
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, Me.CveEmpresa, CveAlmacenExistenciasContrato, SerieLote:=Dr2("Serie").ToString, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=Me.CveSubProyecto, ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
Existencia = ObjInventario.GetExistenciasPS(CveProducto, CveUnidad, Me.CveEmpresa, CveAlmacenExistenciasContrato, Serie:=Dr2("Serie").ToString, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm"), CveSubProyecto:=Me.CveSubProyecto, ExcluyeAdelantado:=1, RestringirAlmacenes:=1, ExcluyeApartados:=1)
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, SerieLote:=Dr2("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaConsignacion, 1, CveUnidad, CveProducto, 0, -1, Serie:=Dr2("Serie").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -1826,7 +1826,7 @@ Namespace Modelos
|
|||||||
If CveMovimientoEntradaGeneral > 0 Then
|
If CveMovimientoEntradaGeneral > 0 Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -1840,7 +1840,7 @@ Namespace Modelos
|
|||||||
If CveMovimientoEntradaGeneral > 0 Then
|
If CveMovimientoEntradaGeneral > 0 Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaConsignacion, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaGeneral, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("Serie").ToString, Lote:=Dr("Lote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -3399,7 +3399,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If CveProducto > 0 Then
|
If CveProducto > 0 Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, 0, -1, SerieLote:=Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, 0, -1, Serie:=Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
ErrorList.Add("Ocurrió un error al agregar los Movimientos de salida al Inventario.<br />")
|
||||||
Exit For
|
Exit For
|
||||||
@@ -3672,7 +3672,7 @@ Namespace Modelos
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, SerieLote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
|
If ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, Cantidad, CveUnidad, CveProducto, PU, -1, Lote:=SerieLote, CveVentaDetalle:=CveVentaDetalle) Then
|
||||||
ContadorMovtosDetalles += 1
|
ContadorMovtosDetalles += 1
|
||||||
Else
|
Else
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -4436,7 +4436,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
If CveMovimientoDevolucion > 0 Then
|
If CveMovimientoDevolucion > 0 Then
|
||||||
For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows
|
For Each Dr As DataRow In DtExistencias.FiltraParametros($"CveMovimiento = {RowMovimiento("CveMovimiento").ToString()}").Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, SerieLote:=Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoDevolucion, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al procesar los conceptos de salida. Por favor vuelva a intentar."
|
||||||
Exit For
|
Exit For
|
||||||
@@ -4936,7 +4936,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
For Each Dr As DataRow In DtMovtosDev.FiltraParametros($"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").Rows
|
For Each Dr As DataRow In DtMovtosDev.FiltraParametros($"CveVentaDetalle = {DrRem("CveVentaDetalle").ToString.ToEntero}").Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=Dr("Lote").ToString) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -4954,7 +4954,7 @@ Namespace Modelos
|
|||||||
'ENTRADA POR TRAPASO A ENTREGA POR ADELANTADO
|
'ENTRADA POR TRAPASO A ENTREGA POR ADELANTADO
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -5018,7 +5018,7 @@ Namespace Modelos
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, DrRem("CveActivoFijo").ToString.ToEntero, -1, DrRem("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=DrRem("Lote").ToString, Batch:=DrRem("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaDevRem, DrRem("Cantidad").ToString.ToDecimal, DrRem("CveUM").ToString.ToEntero, DrRem("CvePS").ToString.ToEntero, DrRem("PU").ToString.ToDecimal, DrRem("CveActivoFijo").ToString.ToEntero, -1, DrRem("SerieLote").ToString, CveVentaDetalle:=CveVentaDetalleRem, Lote:=DrRem("Lote").ToString) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -5033,7 +5033,7 @@ Namespace Modelos
|
|||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalidaDevRem, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaDevRem, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString().ToEntero(), CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -5088,7 +5088,7 @@ Namespace Modelos
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalidaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -5111,7 +5111,7 @@ Namespace Modelos
|
|||||||
|
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntradaApartado, Dr("Cantidad").ToString.ToDecimal, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, Lote:=Dr("Lote").ToString) Then
|
||||||
ErrorCancelar = True
|
ErrorCancelar = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -1346,8 +1346,8 @@ Public Class WS_PuntoVenta
|
|||||||
Dim objInventario As New ClsInventarios
|
Dim objInventario As New ClsInventarios
|
||||||
Dim Respuesta As New RespuestaWS
|
Dim Respuesta As New RespuestaWS
|
||||||
|
|
||||||
If objInventario.GetSeccionesAlmacenes(-1) Then
|
If objInventario.GetSeccionesAlmacenes(CveEmpresa, -1) Then
|
||||||
Respuesta.Datos = objInventario.DtResultados.FiltraParametros(String.Format("CveEmpresa={0}", CveEmpresa))
|
Respuesta.Datos = objInventario.DtResultados '.FiltraParametros(String.Format("CveEmpresa={0}", CveEmpresa))
|
||||||
Respuesta.Datos.TableName = "Inv_SeccionesAlmacenes"
|
Respuesta.Datos.TableName = "Inv_SeccionesAlmacenes"
|
||||||
Respuesta.HuboError = False
|
Respuesta.HuboError = False
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -33,8 +33,6 @@ Namespace Extensiones
|
|||||||
|
|
||||||
#Region "E X T E N S I O N E S"
|
#Region "E X T E N S I O N E S"
|
||||||
Public Module ModExtensiones
|
Public Module ModExtensiones
|
||||||
|
|
||||||
'Public Const DirectorioBaseEmpresas As String = "C:\inetpub\"
|
|
||||||
Public ReadOnly Property DirectorioBaseEmpresas As String
|
Public ReadOnly Property DirectorioBaseEmpresas As String
|
||||||
Get
|
Get
|
||||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas")) Then
|
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("DirectorioBaseEmpresas")) Then
|
||||||
@@ -46,6 +44,16 @@ Namespace Extensiones
|
|||||||
End Property
|
End Property
|
||||||
Public ReadOnly DirectorioEmpresas As String = String.Format("{0}Empresas\", DirectorioBaseEmpresas)
|
Public ReadOnly DirectorioEmpresas As String = String.Format("{0}Empresas\", DirectorioBaseEmpresas)
|
||||||
|
|
||||||
|
Public ReadOnly Property GOOGLE_MAPS_API_KEY As String
|
||||||
|
Get
|
||||||
|
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("GOOGLE_MAPS_API_KEY")) Then
|
||||||
|
Return ""
|
||||||
|
Else
|
||||||
|
Return System.Configuration.ConfigurationManager.AppSettings("GOOGLE_MAPS_API_KEY").ToString()
|
||||||
|
End If
|
||||||
|
End Get
|
||||||
|
End Property
|
||||||
|
|
||||||
Public Const IMEI As String = "IMEISISTEMAGERENCIAL"
|
Public Const IMEI As String = "IMEISISTEMAGERENCIAL"
|
||||||
Public Const MinFecha As Date = #1/1/1900#
|
Public Const MinFecha As Date = #1/1/1900#
|
||||||
Public Const MaxFecha As Date = #1/1/9999#
|
Public Const MaxFecha As Date = #1/1/9999#
|
||||||
|
|||||||
@@ -535,8 +535,9 @@ Partial Class Bancos_RepIE
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub Imprimir(Formato As String)
|
Private Sub Imprimir(Formato As String)
|
||||||
|
|
||||||
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
|||||||
@@ -146,8 +146,12 @@ Partial Class Bancos_Reportes
|
|||||||
|
|
||||||
Dim paramList As New List(Of ReportParameter)
|
Dim paramList As New List(Of ReportParameter)
|
||||||
With paramList
|
With paramList
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
'Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||||
|
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Nombre))
|
||||||
.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
.Add(New ReportParameter("FechaImpresion", Now.ToDateTime.ToShortDateString))
|
||||||
.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
.Add(New ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa))
|
||||||
|
|||||||
@@ -1430,7 +1430,7 @@ public partial class CRM_EmpresaCRM : ClsPaginas
|
|||||||
FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng);
|
FechaApertura, NombreAcercamiento, Descripcion, Importe, Comision, Prioridad, UsuarioActual.CveEmpresa, CveUsuarioIng);
|
||||||
}else
|
}else
|
||||||
{
|
{
|
||||||
Alert("No tiene Etapa Proceso con el Tipo Proceso seleccionado",ModExtensiones.TipoMensaje.MsgAdvertencia);
|
Alert("No tiene 'Etapa Proceso' con el 'Proceso' seleccionado al agregar el Acercamiento",ModExtensiones.TipoMensaje.MsgAdvertencia);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (CveAcercamiento > 0)
|
if (CveAcercamiento > 0)
|
||||||
|
|||||||
@@ -1704,7 +1704,7 @@ Partial Class Compras_Compras
|
|||||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
||||||
|
|
||||||
Dim XMLDoc As New XmlDocument
|
Dim XMLDoc As New XmlDocument
|
||||||
Dim Archivo As String = String.Format("{0}Empresas\{1}\Compras\{2}\{3}", ModExtensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa, dr("RFCDe"), dr("XML"))
|
Dim Archivo As String = String.Format("{0}\Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, dr("RFCDe"), dr("XML"))
|
||||||
If IO.File.Exists(Archivo) Then
|
If IO.File.Exists(Archivo) Then
|
||||||
|
|
||||||
Dim Validada As Boolean = True
|
Dim Validada As Boolean = True
|
||||||
@@ -5277,7 +5277,7 @@ Partial Class Compras_Compras
|
|||||||
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("CvePS = {0}", Dr("CvePS")))
|
DtDetalle = DtDatosDetalle.FiltraParametros(String.Format("CvePS = {0}", Dr("CvePS")))
|
||||||
If DtDetalle.Rows.Count > 0 Then
|
If DtDetalle.Rows.Count > 0 Then
|
||||||
For Each drr As DataRow In DtDetalle.Rows
|
For Each drr As DataRow In DtDetalle.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, SerieLote:=drr("Serie").ToString, FechaCaducidad:=drr("FechaCaducidad").ToString.ToDate, CostoIndirecto:=Dr("CostoIndirectoAlmacen").ToString.ToDecimal, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoInventario, 1, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, -1, Serie:=drr("Serie").ToString, FechaCaducidad:=drr("FechaCaducidad").ToString.ToDate, CostoIndirecto:=Dr("CostoIndirectoAlmacen").ToString.ToDecimal, CveCompraDetalle:=Dr("CveCompraDetalle").ToString.ToEntero, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -5811,11 +5811,7 @@ Partial Class Compras_Compras
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
'Conta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
|
|
||||||
CveCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -6419,11 +6415,7 @@ Partial Class Compras_Compras
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
'Conta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 49))("ConceptoContable").ToString)
|
|
||||||
CveCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Row2("CodAF").ToString, 49, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveActivoFijo:=Row2("CveActivoFijo").ToString.ToEntero, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
@@ -6738,7 +6730,7 @@ Partial Class Compras_Compras
|
|||||||
importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018
|
importeMN = importeMovimiento * tipoCambioActual * Multiplicador '[IPP] EL 6 DEBE SER POSITIVO 27/AGOSTO/2018
|
||||||
|
|
||||||
'CLASIFICACION
|
'CLASIFICACION
|
||||||
If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "FAC" Then
|
If Row2("CveClasificacion").ToString.ToEntero > 0 AndAlso DdlTipoComprobante.SelectedValue = "Fac" Then
|
||||||
|
|
||||||
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
If ObjConta.GetRetCuenta(6, Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero) Then
|
||||||
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
If ObjConta.DtResultados.Rows.Count > 0 AndAlso ObjConta.DtResultados.Rows(0)("IdCuentaGasto").ToString.ToEntero > 0 Then
|
||||||
@@ -6749,9 +6741,13 @@ Partial Class Compras_Compras
|
|||||||
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
' CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", String.Format("CveClasificacion = {0}", Row2("CveClasificacion"))).ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
'Conta ContPAQ
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
'If IdCtaContable = 0 AndAlso DdlTipoComprobante.SelectedValue = "Fac" Then
|
||||||
|
' CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
|
||||||
|
' idCuentaContabilizacion = 0
|
||||||
|
'End If
|
||||||
|
|
||||||
|
|
||||||
'SEGMENTO DE NEGOCIO
|
'SEGMENTO DE NEGOCIO
|
||||||
@@ -6763,16 +6759,6 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'AGREGA MOVIMIENTO
|
'AGREGA MOVIMIENTO
|
||||||
If importeMovimiento.RoundSQL <> 0 Then
|
If importeMovimiento.RoundSQL <> 0 Then
|
||||||
'Conta ContPAQ
|
|
||||||
If IdCtaContable = 0 Then
|
|
||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
|
|
||||||
idCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
'Conta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", 6))("ConceptoContable").ToString)
|
|
||||||
CveCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim tcvecon As Integer = 6
|
Dim tcvecon As Integer = 6
|
||||||
Dim tidctacon As Integer = 6
|
Dim tidctacon As Integer = 6
|
||||||
@@ -6810,9 +6796,6 @@ Partial Class Compras_Compras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
@@ -6890,11 +6873,6 @@ Partial Class Compras_Compras
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
'Conta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
|
||||||
CveCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=rw.DataKey("CveIE").ToString.ToEntero, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -7150,11 +7128,6 @@ Partial Class Compras_Compras
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
'Conta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
|
||||||
idCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
|
|
||||||
'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA
|
'AMORTIZACIÓN NC ESPECIAL COMPLEMENTARIA
|
||||||
If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
If ConceptoContableAnticipo.Contiene(60) And DdlMoneda.SelectedValue.ToEntero <> 1 And UsuarioActual.CveEmpresa.Contiene(119) Then
|
||||||
@@ -7485,11 +7458,6 @@ Partial Class Compras_Compras
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
'COnta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
|
||||||
CveCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveAcreedor:=CveAcreedor, CveIE:=CveIE, CvePersonal:=CvePersonal, CveColectiva:=CveColectiva, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=Math.Round(importeMN, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, TipoCambio:=tipoCambioActual, PorcentajeImpuesto:=PorcentajeImpuesto, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -9130,11 +9098,6 @@ Partial Class Compras_Compras
|
|||||||
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
CuentasContablesInvalidas.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
||||||
idCuentaContabilizacion = 0
|
idCuentaContabilizacion = 0
|
||||||
End If
|
End If
|
||||||
'Conta SIG
|
|
||||||
If CveCuenta = 0 Then
|
|
||||||
CuentasContablesInvalidasSIG.Append("<br>" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString)
|
|
||||||
CveCuentaContabilizacion = 0
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaNueva, TipoMovimiento, ImporteMovimiento, Concepto, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveIE:=CveIE, ImporteMX:=importeMN, CvePrePolizaOriginal:=CvePrePoliza, ImporteME:=If(tipoCambio = 1, 0, ImporteMovimiento), CveCuenta:=CveCuenta, PorcentajeImpuesto:=PorcentajeImpuesto) Then
|
||||||
ErrorMovtosCxP = 1
|
ErrorMovtosCxP = 1
|
||||||
|
|||||||
@@ -354,7 +354,7 @@ Partial Class Compras_EvaluacionProveedor
|
|||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{{Proveedor}}", Proveedor))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{{Proveedor}}", Proveedor))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{{Dia}}", Dia))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{{Dia}}", Dia))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{{Mes}}", Mes))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{{Mes}}", Mes))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{{Anio}}", Now.Year))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{{Anio}}", Now.Year.ToString))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{{Calificacion}}", Calificacion))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{{Calificacion}}", Calificacion))
|
||||||
ListaTagsDocumentost.Add(New TagsDocumentos("{{Resultado}}", Resultado))
|
ListaTagsDocumentost.Add(New TagsDocumentos("{{Resultado}}", Resultado))
|
||||||
'ListaTagsDocumentost.Add(New TagsDocumentos("{{Usuario}}", UsuarioActual.Nombre))
|
'ListaTagsDocumentost.Add(New TagsDocumentos("{{Usuario}}", UsuarioActual.Nombre))
|
||||||
|
|||||||
@@ -619,7 +619,7 @@ Partial Class Compras_eFacturas
|
|||||||
txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString
|
txtFechaF.Text = Now.ToShortDateString 'txtFechaI.Text.ToDate.AddMonths(1).AddDays(-1).ToShortDateString
|
||||||
|
|
||||||
Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", ModExtensiones.DirectorioBaseEmpresas ,UsuarioActual.CveEmpresa & "\Compras\"
|
Destino = String.Format("{0}Compras\", UsuarioActual.Empresa.Ruta) 'string.format("{0}Empresas\{1}\Compras\", ModExtensiones.DirectorioBaseEmpresas ,UsuarioActual.CveEmpresa & "\Compras\"
|
||||||
Ejecutable = Path.Combine(ModExtensiones.DirectorioBaseEmpresas, "Utilerias\ADSUtilerias.exe")
|
Ejecutable = "C:\Proyectos\wwwSIG\Utilerias\ADSUtilerias.exe"
|
||||||
Form.DefaultButton = BtnConsultar.UniqueID
|
Form.DefaultButton = BtnConsultar.UniqueID
|
||||||
|
|
||||||
DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
DdlResponsable.DataSource = GlobalDTUsuarioResponsable.FiltraParametros(String.Format("CveEmpresa = {0}", UsuarioActual.CveEmpresa))
|
||||||
@@ -1269,7 +1269,7 @@ Partial Class Compras_eFacturas
|
|||||||
End If
|
End If
|
||||||
ObjDatos.Dispose()
|
ObjDatos.Dispose()
|
||||||
|
|
||||||
If DT IsNot Nothing Then
|
If dt IsNot Nothing Then
|
||||||
|
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
@@ -1329,7 +1329,8 @@ Partial Class Compras_eFacturas
|
|||||||
filemove = fileItem.filename
|
filemove = fileItem.filename
|
||||||
|
|
||||||
If filemove <> "" Then
|
If filemove <> "" Then
|
||||||
filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta))
|
'filemove.FilesMove("", String.Format("{0}\Temp\Facturas", UsuarioActual.Empresa.Ruta))
|
||||||
|
filemove.FilesMove("", String.Format("Empresas\{0}\Temp\Facturas", UsuarioActual.CveEmpresa))
|
||||||
'AGREGA XML A LA LISTA
|
'AGREGA XML A LA LISTA
|
||||||
If FileExtension.ToUpper = "XML" Then
|
If FileExtension.ToUpper = "XML" Then
|
||||||
ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, filemove))
|
ListXML.Add(String.Format("{0}Temp\Facturas\{1}", UsuarioActual.Empresa.Ruta, filemove))
|
||||||
@@ -1339,7 +1340,7 @@ Partial Class Compras_eFacturas
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
Dim fileEntries As String() = Directory.GetFiles(String.Format("{0}Empresas\{1}\Temp\Facturas", AppDomain.CurrentDomain.BaseDirectory, UsuarioActual.CveEmpresa))
|
Dim fileEntries As String() = Directory.GetFiles(String.Format("{0}Empresas\{1}\Temp\Facturas", Extensiones.DirectorioBaseEmpresas, UsuarioActual.CveEmpresa))
|
||||||
|
|
||||||
Dim ListaDirectoriosTemporales As New List(Of String)
|
Dim ListaDirectoriosTemporales As New List(Of String)
|
||||||
Dim ListaComprimidos As New List(Of String)
|
Dim ListaComprimidos As New List(Of String)
|
||||||
|
|||||||
@@ -140,7 +140,7 @@ Partial Class Contabilidad_CatPeriodosBloqueo
|
|||||||
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
Alert("Bloqueo Actualizado Correctamente", TipoMensaje.MsgInformacion)
|
||||||
Else
|
Else
|
||||||
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
|
Dim mensajeAlerta As String = AplicarBloqueso.Replace(";", Environment.NewLine)
|
||||||
Alert("Ocurrió un error al Actualizar el Periodo de Bloqueo " & Environment.NewLine & mensajeAlerta, TipoMensaje.MsgError)
|
Alert(String.Format("No se puede bloquear el periodo por: <br/>{0} ", mensajeAlerta), TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|||||||
@@ -30,6 +30,18 @@ Partial Class Contabilidad_RepIEPS
|
|||||||
Dim ObjConta As New ClsContabilidad()
|
Dim ObjConta As New ClsContabilidad()
|
||||||
If ObjConta.GetRepIEPS(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlTipoOperacion.SelectedValue, DdlModalidad.SelectedValue.ToEntero(), DdlLimite.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
If ObjConta.GetRepIEPS(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), DdlTipoOperacion.SelectedValue, DdlModalidad.SelectedValue.ToEntero(), DdlLimite.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||||
DtDatos = ObjConta.DtResultados.Copy()
|
DtDatos = ObjConta.DtResultados.Copy()
|
||||||
|
|
||||||
|
If ObjConta.GetProductosSinIEPS(txtFechaI.Text.ToDate(), txtFechaF.Text.ToDate(), UsuarioActual.CveEmpresa) Then
|
||||||
|
Dim DtProductos As DataTable = ObjConta.DtResultados.Copy
|
||||||
|
If DtProductos.Rows.Count > 0 Then
|
||||||
|
Dim ProductosIEPS As String = "<strong>Los siguientes productos o servicios no tienen especificado alguno de los siguientes campos en relación al IEPS: Empaque, presentación o toxicidad</strong><br/><br/>"
|
||||||
|
For Each producto As DataRow In DtProductos.Rows
|
||||||
|
ProductosIEPS = String.Format("{0}<br/>{1}", ProductosIEPS, producto("CodigoPS"))
|
||||||
|
Next
|
||||||
|
Alert(ProductosIEPS, TipoMensaje.MsgAdvertencia)
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjConta.Dispose()
|
ObjConta.Dispose()
|
||||||
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
If DtDatos IsNot Nothing AndAlso DtDatos.Rows.Count > 0 Then
|
||||||
@@ -40,9 +52,9 @@ Partial Class Contabilidad_RepIEPS
|
|||||||
DtDatos = DtDatos.FiltraParametros("TipoDato in (1,2)")
|
DtDatos = DtDatos.FiltraParametros("TipoDato in (1,2)")
|
||||||
End If
|
End If
|
||||||
GvDatos.DataSource = DtDatos
|
GvDatos.DataSource = DtDatos
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
Else
|
Else
|
||||||
Alert("No se encontraron resultados en la consulta")
|
Alert("No se encontraron resultados en la consulta")
|
||||||
End If
|
End If
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
UpLnkAcciones.Update()
|
UpLnkAcciones.Update()
|
||||||
|
|||||||
@@ -1201,7 +1201,7 @@ Partial Class Contratos_Default
|
|||||||
|
|
||||||
If DdlMoneda.SelectedIndex > 0 Then
|
If DdlMoneda.SelectedIndex > 0 Then
|
||||||
If TxtTipoCambio.Text.Trim.Length = 0 Or TxtTipoCambio.Text.Trim.ToDouble = 0.0 Then
|
If TxtTipoCambio.Text.Trim.Length = 0 Or TxtTipoCambio.Text.Trim.ToDouble = 0.0 Then
|
||||||
Alert("Cuando seleccione una moneda diferencte a peso debe especificar el tipo de cambio.", TipoMensaje.MsgAdvertencia)
|
Alert("Cuando seleccione una moneda diferente a peso debe especificar el tipo de cambio.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -513,9 +513,7 @@
|
|||||||
|
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -266,8 +266,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -632,11 +632,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%--<script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -769,12 +769,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=geometry&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=drawing&libraries=geometry&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%-- <script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=drawing&libraries=geometry&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -158,6 +158,7 @@ Partial Class GPS_GeoReferencias
|
|||||||
|
|
||||||
If TieneError Then
|
If TieneError Then
|
||||||
ObjGPS.RollBack()
|
ObjGPS.RollBack()
|
||||||
|
Alert("Ocurrió un error al agregar la georeferencia", TipoMensaje.MsgError)
|
||||||
Else
|
Else
|
||||||
ObjGPS.Commit()
|
ObjGPS.Commit()
|
||||||
Alert("Se agregó correctamente la Ruta", TipoMensaje.MsgInformacion)
|
Alert("Se agregó correctamente la Ruta", TipoMensaje.MsgInformacion)
|
||||||
|
|||||||
@@ -754,11 +754,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places&callback=initMap">
|
|
||||||
</script>
|
|
||||||
<%-- <script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places&callback=initMap">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -3130,9 +3130,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/jquery.minicolors.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/jquery-minicolors/components-color-pickers.min.js"></script>
|
||||||
<script src="Rastreo/JS/GeoRutas.js"></script>
|
<script src="Rastreo/JS/GeoRutas.js"></script>
|
||||||
|
|||||||
@@ -1495,7 +1495,7 @@ Partial Class GPS_Rastreo
|
|||||||
End If
|
End If
|
||||||
'RegistraScript("CreaRuta();")
|
'RegistraScript("CreaRuta();")
|
||||||
ElseIf HdnTipo.Value = "Geocerca" Then
|
ElseIf HdnTipo.Value = "Geocerca" Then
|
||||||
GeoRefString = $"POLYGON(({GeoCerca.Value}))"
|
GeoRefString = $"POLYGON(({GeoCerca.Value} {CommandArg.Value}))"
|
||||||
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Geocerca", True, TxtFechaIG.Text.ToDate, TxtFechaFG.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, MinFecha, MaxFecha, TxtColor.Text, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
If ObjGPS.GeoReferenciaAdd(TxtNombre.Text, -1, GeoRefString, "Geocerca", True, TxtFechaIG.Text.ToDate, TxtFechaFG.Text.ToDate, chkLunes.Checked, chkMartes.Checked, chkMiercoles.Checked, chkJueves.Checked, chkViernes.Checked, chkSabado.Checked, chkDomingo.Checked, MinFecha, MaxFecha, TxtColor.Text, TxtTolerancia.Text.ToEntero, UsuarioActual.CveCliente) Then
|
||||||
For Each Dr As GridViewRow In GvEquiposDetalle.Rows
|
For Each Dr As GridViewRow In GvEquiposDetalle.Rows
|
||||||
If Dr.RowType = DataControlRowType.DataRow Then
|
If Dr.RowType = DataControlRowType.DataRow Then
|
||||||
|
|||||||
@@ -234,7 +234,7 @@
|
|||||||
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content4" ContentPlaceHolderID="H" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places"></script>
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
<script src="../Metronic/assets/global/plugins/datatables2/datatables.min.js"></script>
|
<script src="../Metronic/assets/global/plugins/datatables2/datatables.min.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/datatables2/extensions/Scroller/js/dataTables.scroller.js"></script>
|
<script src="../Metronic/assets/global/plugins/datatables2/extensions/Scroller/js/dataTables.scroller.js"></script>
|
||||||
<script src="../Metronic/assets/global/plugins/datatables2/extensions/KeyTable/js/dataTables.keyTable.js"></script>
|
<script src="../Metronic/assets/global/plugins/datatables2/extensions/KeyTable/js/dataTables.keyTable.js"></script>
|
||||||
|
|||||||
@@ -623,11 +623,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%--<script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -356,11 +356,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places&callback=initMap", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places&callback=initMap">
|
|
||||||
</script>
|
|
||||||
<%-- <script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places&callback=initMap">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -731,8 +731,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -725,8 +725,6 @@
|
|||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -1333,8 +1333,6 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
17504
GPS/data.txt
17504
GPS/data.txt
File diff suppressed because it is too large
Load Diff
@@ -194,7 +194,7 @@
|
|||||||
|
|
||||||
Dim Objinventarios As New ClsInventarios
|
Dim Objinventarios As New ClsInventarios
|
||||||
If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing
|
If Objinventarios.GetAlmacenes(-1, -1, -1, -1) Then Application("GlobalDTAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTAlmacen") = Nothing
|
||||||
If Objinventarios.GetSeccionesAlmacenes(-1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing
|
If Objinventarios.GetSeccionesAlmacenes(-1, -1) Then Application("GlobalDTSeccionAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTSeccionAlmacen") = Nothing
|
||||||
If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing
|
If Objinventarios.GetTiposAlmacenes Then Application("GlobalDTTipoAlmacen") = Objinventarios.DtResultados Else Application("GlobalDTTipoAlmacen") = Nothing
|
||||||
If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing
|
If Objinventarios.GetConceptos Then Application("GlobalDTInvConceptos") = Objinventarios.DtResultados Else Application("GlobalDTInvConceptos") = Nothing
|
||||||
Objinventarios.Dispose()
|
Objinventarios.Dispose()
|
||||||
|
|||||||
70
Inventarios/AjustesSeccionAlmacen.aspx
Normal file
70
Inventarios/AjustesSeccionAlmacen.aspx
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="AjustesSeccionAlmacen.aspx.vb" Inherits="Inventarios_AjustesSeccionAlmacen" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Ajustes de Productos en Secciones de Almacen
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpFiltraEntrega" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet solid grey-cascade portlet-filter">
|
||||||
|
<div class="portlet-title portlet-filterT smalltitle magindate">
|
||||||
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-default" />
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption ">
|
||||||
|
|
||||||
|
<label class="col-md-1 truncate" style="text-align: right;">Almacen:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<asp:DropDownList ID="DdlAlmacen" runat="server" DataValueField="CveAlmacen" DataTextField="Almacen" class="select2me" Width="300px"></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 truncate" style="text-align: right;">Clasificacion:</label>
|
||||||
|
<div class="col-md-3">
|
||||||
|
<asp:DropDownList ID="DdlClasificaciones" runat="server" DataValueField="CveClasificacion" DataTextField="Clasificacion" class="select2me" Width="300px" ></asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
<br />
|
||||||
|
<asp:UpdatePanel runat="server" ID="UppD" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<asp:GridView ID="GvD" DataKeyNames="CvePS,CveUM,CveAlmacen,PU,Existencia,Serie,CveSeccionAlmacen,FechaCaducidad,Lote" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" />
|
||||||
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="5%" />
|
||||||
|
<asp:BoundField HeaderText="Sección Actual" DataField="AlmacenSeccion" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField HeaderText="Existencia" DataField="Existencia" DataFormatString="{0:#,###.##}" ItemStyle-Width="5%" />
|
||||||
|
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:CheckBox ID="Chk" Checked="true" runat="server" ></asp:CheckBox>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Nueva Seccion" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:DropDownList ID="DDlS" runat="server" Width="150px" DataValueField="CveAlmacenSeccion" DataTextField="AlmacenSeccion" class="select2me"></asp:DropDownList>
|
||||||
|
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
<asp:Button ID="BtnCambiarSeccion" runat="server" Text="Cambiar Sección" CssClass="btn btn-primary" />
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
144
Inventarios/AjustesSeccionAlmacen.aspx.vb
Normal file
144
Inventarios/AjustesSeccionAlmacen.aspx.vb
Normal file
@@ -0,0 +1,144 @@
|
|||||||
|
|
||||||
|
Imports System.Data
|
||||||
|
Imports Extensiones
|
||||||
|
|
||||||
|
Partial Class Inventarios_AjustesSeccionAlmacen
|
||||||
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Sub Inventarios_AjustesSeccionAlmacen_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
|
If Not Page.IsPostBack Then
|
||||||
|
CargaCombos()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
DdlAlmacen.DataSource = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
DdlAlmacen.DataBind()
|
||||||
|
|
||||||
|
DdlClasificaciones.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||||
|
DdlClasificaciones.DataBind()
|
||||||
|
DdlClasificaciones.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click
|
||||||
|
CargaDatos()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaDatos()
|
||||||
|
Dim ObjInv As New ClsInventarios
|
||||||
|
|
||||||
|
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlAlmacen.SelectedValue.ToEntero, DdlClasificaciones.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvD.DataSource = ObjInv.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjInv.Dispose()
|
||||||
|
GvD.DataBind()
|
||||||
|
UppD.Update()
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub GvD_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvD.RowDataBound
|
||||||
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
e.Row.FCDropDownList("DDlS").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||||
|
e.Row.FCDropDownList("DDlS").DataBind()
|
||||||
|
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnCambiarSeccion_Click(sender As Object, e As EventArgs) Handles BtnCambiarSeccion.Click
|
||||||
|
Dim ObjInventario As New ClsInventarios
|
||||||
|
Dim ObjPS As New ClsProductosServicios(ObjInventario.IniciaTransacSQL)
|
||||||
|
Dim Dtt As DataTable = Nothing
|
||||||
|
Dim CveMovimientoEntrada As Integer = 0
|
||||||
|
Dim Folio = 0
|
||||||
|
Dim ErrorMovInv As Boolean = False
|
||||||
|
Dim TextoError = ""
|
||||||
|
Dim CveAlmacen As Integer = DdlAlmacen.SelectedValue.ToEntero
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Dim Fecha As Date = DateTime.Now
|
||||||
|
'AGREGAMOS LA ENTRADA
|
||||||
|
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacen, 3, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||||
|
Observaciones:="", Modulo:="ASA/G1")
|
||||||
|
Folio = ObjInventario.Folio
|
||||||
|
|
||||||
|
If CveMovimientoSalida <= 0 Then
|
||||||
|
TextoError = "No se pudo generar el movimiento de salida correctamente"
|
||||||
|
ErrorMovInv = True
|
||||||
|
Else
|
||||||
|
|
||||||
|
Dim CveMovimientoDetalleEntrada As Integer = 0
|
||||||
|
Dim Cont As Integer = 0
|
||||||
|
For Each gvr As GridViewRow In GvD.Rows
|
||||||
|
|
||||||
|
'que este seleccionado y que tenga diferente seccion
|
||||||
|
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCDropDownList("DDlS").SelectedValue.ToEntero <> gvr.DataKey("CveSeccionAlmacen").ToEntero Then
|
||||||
|
|
||||||
|
If gvr.DataKey("CveSeccionAlmacen").ToEntero > 0 Then
|
||||||
|
ObjPS.UpdateAplicaSeccionAlmacen(gvr.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, True)
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.DataKey("Existencia").ToDecimal, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, 0, -1, CveSeccionAlmacen:=gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=gvr.DataKey("Serie"), Lote:=gvr.DataKey("Lote"), FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToDate) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
Dim resultado As DataTable = ObjInventario.DtResultados
|
||||||
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(CveAlmacen, 2, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Observaciones:="", CveMovimientoRelacionado:=CveMovimientoSalida, Modulo:="ASA/G1")
|
||||||
|
Dim ind As Integer = 0
|
||||||
|
|
||||||
|
For Each Row As DataRow In resultado.Rows
|
||||||
|
Dim CvePS = Row("CvePS").ToString().ToEntero()
|
||||||
|
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||||
|
Dim PU As Decimal = Row("PUOriginal").ToString().ToDecimal()
|
||||||
|
Dim CveUM As Integer = Row("CveUM").ToString().ToEntero()
|
||||||
|
Dim CveSeccionAlmacen As Integer = GvD.Rows(ind).FCDropDownList("DDlS").SelectedValue.ToEntero ' IfNull(Row("CveSeccionAlmacen"), "-1").ToString().ToEntero()
|
||||||
|
Dim CostoIndirecto As Decimal = Row("CostoIndirecto").ToString().ToDecimal()
|
||||||
|
Dim Serie As String = Row("Serie").ToString()
|
||||||
|
Dim Lote As String = Row("Lote").ToString()
|
||||||
|
Dim FechaCaducidad As Date = IfNull(Row("FechaCaducidad"), MinFecha).ToString.ToDate
|
||||||
|
|
||||||
|
'actualizamos el PS, para que tenga el aplica seccion
|
||||||
|
|
||||||
|
ObjPS.UpdateAplicaSeccionAlmacen(Row("CvePS").ToString().ToEntero(), UsuarioActual.CveEmpresa, True)
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Cantidad, CveUM, CvePS, PU, -1, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=CveSeccionAlmacen, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
|
ErrorMovInv = True
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
ind += 1
|
||||||
|
Next
|
||||||
|
resultado.Dispose()
|
||||||
|
|
||||||
|
Else
|
||||||
|
TextoError = "No se pudo registrar el movimiento"
|
||||||
|
ErrorMovInv = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
If Not ErrorMovInv Then
|
||||||
|
ObjInventario.Commit()
|
||||||
|
cargadatos
|
||||||
|
Alert("El Movimiento quede registrado correctamente", TipoMensaje.MsgInformacion)
|
||||||
|
Else
|
||||||
|
ObjInventario.RollBack()
|
||||||
|
Alert("Ocurrio un error al registrar el movimiento", TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjInventario.Dispose()
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -86,9 +86,8 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-2">Cliente:</label>
|
<label class="col-md-2">Cliente:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
<asp:DropDownList ID="DdlCliente" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" AutoPostBack="true" Width="150px" AppendDataBoundItems="true" runat="server" DataTextField="Nombre" DataValueField="CveCliente" CssClass="form-control input-sm select2me"></asp:DropDownList>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" OnSelectedIndexChanged="DdlCliente_SelectedIndexChanged" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;">
|
||||||
<asp:RequiredFieldValidator ID="RFVCliente" runat="server" ControlToValidate="DdlCliente" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cliente''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
</ADS:Dropdownlost>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECliente" runat="server" HighlightCssClass="vco" TargetControlID="RFVCliente" Width="350px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-2">Vendedor:</label>
|
<label class="col-md-2">Vendedor:</label>
|
||||||
<div class="col-md-3">
|
<div class="col-md-3">
|
||||||
@@ -210,6 +209,12 @@
|
|||||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
</td>
|
</td>
|
||||||
|
<td runat="server" id="TdSeccionAlmacen" visible="false">
|
||||||
|
<asp:Panel runat="server" DefaultButton="BtnSeccionAddNew">
|
||||||
|
|
||||||
|
<asp:DropDownlist runat="server" DataTextField="Seccion" DataValueField="CveClasificacion" CssClass="form-control input-sm select2me" />
|
||||||
|
</asp:Panel>
|
||||||
|
</td>
|
||||||
<td align="center">
|
<td align="center">
|
||||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" Text="Agregar" />
|
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="Texto" ValidationGroup="GrpAgregar" Text="Agregar" />
|
||||||
</td>
|
</td>
|
||||||
@@ -232,7 +237,7 @@
|
|||||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
ssss
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -391,7 +396,7 @@
|
|||||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="20%" />
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacenDestino_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
ssss
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -421,73 +426,6 @@
|
|||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" runat="server" id="DivSeccionAlmacenOrigen">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenOrigen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenOrigen" runat="server" ControlToValidate="DdlSeccionAlmacenOrigen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Origen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenOrigen"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenOrigen.ClientID.ToString()%>">Sección Almacen O.:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" runat="server" id="DivSeccionAlmacenDestino" visible="false">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenDestino" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenDestino" runat="server" ControlToValidate="DdlSeccionAlmacenDestino" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Destino''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VceSeccionAlmacenDestino" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenDestino"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenDestino.ClientID.ToString()%>">Sección Almacen D.:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccion" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenOrigen" HeaderText="Sección Almacen Origen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenDestino" HeaderText="Sección Almacen Destino" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|||||||
@@ -136,8 +136,7 @@ Partial Class Inventarios_Apartados
|
|||||||
CantidadTotal = 0
|
CantidadTotal = 0
|
||||||
IndexSeccionAlmacen = 0
|
IndexSeccionAlmacen = 0
|
||||||
CvePS = 0
|
CvePS = 0
|
||||||
CreaDtSeccionAlmacen()
|
|
||||||
CargaDdlAlmacen()
|
|
||||||
TipoSeccionAlmacen = 0
|
TipoSeccionAlmacen = 0
|
||||||
|
|
||||||
GvDatos.Columns(5).Visible = UsuarioActual.Empresa.Funcionalidad(563) = "1"
|
GvDatos.Columns(5).Visible = UsuarioActual.Empresa.Funcionalidad(563) = "1"
|
||||||
@@ -166,9 +165,20 @@ Partial Class Inventarios_Apartados
|
|||||||
|
|
||||||
CargaPS()
|
CargaPS()
|
||||||
|
|
||||||
DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
Dim EsWS = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||||
DdlCliente.DataBind()
|
If EsWS Then
|
||||||
DdlCliente.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
DdlClientes.setEsWebService(True)
|
||||||
|
Else
|
||||||
|
DdlClientes.setEsWebService(False)
|
||||||
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
DdlClientes.DataBind()
|
||||||
|
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
'DdlCliente.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
|
'DdlCliente.DataBind()
|
||||||
|
'DdlCliente.Items.Insert(0, New ListItem(" Seleccione ", "-1"))
|
||||||
|
|
||||||
DdlClienteDesapartado.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
DdlClienteDesapartado.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||||
DdlClienteDesapartado.DataBind()
|
DdlClienteDesapartado.DataBind()
|
||||||
@@ -255,7 +265,7 @@ Partial Class Inventarios_Apartados
|
|||||||
TxtnSerieLote.Visible = False
|
TxtnSerieLote.Visible = False
|
||||||
|
|
||||||
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
If DdlProducto2.SelectedValue.ToEntero > 0 Then
|
||||||
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5 ", "PSCodigo").Rows.Count > 0 Then
|
If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=DdlProducto2.SelectedValue.ToEntero).FiltraParametros("Inv_CveMetodoInventario = 5 OR AplicaSerie = 1 ", "PSCodigo").Rows.Count > 0 Then
|
||||||
ThSerieLote.Visible = True
|
ThSerieLote.Visible = True
|
||||||
TdSerieLote.Visible = True
|
TdSerieLote.Visible = True
|
||||||
TxtnSerieLote.Visible = True
|
TxtnSerieLote.Visible = True
|
||||||
@@ -269,9 +279,7 @@ Partial Class Inventarios_Apartados
|
|||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Function isWhitFamily() As Boolean
|
|
||||||
Return (UsuarioActual.CveEmpresa = 66)
|
|
||||||
End Function
|
|
||||||
Protected Sub DdlClasificacion_GV(sender As Object, e As System.EventArgs)
|
Protected Sub DdlClasificacion_GV(sender As Object, e As System.EventArgs)
|
||||||
Dim pDdlClasificacion As DropDownList = CType(sender, DropDownList)
|
Dim pDdlClasificacion As DropDownList = CType(sender, DropDownList)
|
||||||
Dim pDdlProducto As DropDownList = CType(pDdlClasificacion.NamingContainer.FindControl("DdlProducto"), DropDownList)
|
Dim pDdlProducto As DropDownList = CType(pDdlClasificacion.NamingContainer.FindControl("DdlProducto"), DropDownList)
|
||||||
@@ -345,7 +353,7 @@ Partial Class Inventarios_Apartados
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub SeleccionaVendedor()
|
Private Sub SeleccionaVendedor()
|
||||||
DdlVendedor.SelectedValue = "-1"
|
DdlVendedor.SelectedValue = "-1"
|
||||||
DdlVendedor.SelectedValueExist(GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveVendedor", $"CveCliente = {DdlCliente.SelectedValue}"))
|
DdlVendedor.SelectedValueExist(GlobalDTCliente(UsuarioActual.CveEmpresa, -1).FiltroPrimeroValor("CveVendedor", $"CveCliente = {DdlClientes.SelectedValue}"))
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -650,7 +658,7 @@ Partial Class Inventarios_Apartados
|
|||||||
|
|
||||||
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
|
'AGREGAMOS LA SALIDA DEL ALMACEN ORIGEN
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 8, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, Recibio:="", CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, CveCliente:=DdlCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero)
|
Observaciones:=TxtObservaciones.Text.Trim, Recibio:="", CveAlmacenDestino:=DdlAlmacenDestino.SelectedValue.ToEntero, CveCliente:=DdlClientes.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero)
|
||||||
FolioSalida = ObjInventario.Folio
|
FolioSalida = ObjInventario.Folio
|
||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
If CveMovimientoSalida <= 0 Then
|
If CveMovimientoSalida <= 0 Then
|
||||||
@@ -662,16 +670,7 @@ Partial Class Inventarios_Apartados
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 1").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenOrigen").ToString.ToEntero, -Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -683,7 +682,7 @@ Partial Class Inventarios_Apartados
|
|||||||
AlmacenEntrada = DdlAlmacenDestino.SelectedValue.ToEntero
|
AlmacenEntrada = DdlAlmacenDestino.SelectedValue.ToEntero
|
||||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, 9, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
|
CveMovimientoEntrada = ObjInventario.AddMovimiento(AlmacenEntrada, 9, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, -1, -1,
|
||||||
Observaciones:=TxtObservaciones.Text.Trim, Recibio:="-1",
|
Observaciones:=TxtObservaciones.Text.Trim, Recibio:="-1",
|
||||||
CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, CveCliente:=DdlCliente.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero)
|
CveAlmacenDestino:=-1, CveMovimientoRelacionado:=CveMovimientoSalida, CveCliente:=DdlClientes.SelectedValue.ToEntero, CveVendedor:=DdlVendedor.SelectedValue.ToEntero)
|
||||||
FolioEntrada = ObjInventario.Folio
|
FolioEntrada = ObjInventario.Folio
|
||||||
If CveMovimientoEntrada <= 0 Then
|
If CveMovimientoEntrada <= 0 Then
|
||||||
TextoError = "No se pudo generar el movimiento de entrada correctamente"
|
TextoError = "No se pudo generar el movimiento de entrada correctamente"
|
||||||
@@ -691,20 +690,11 @@ Partial Class Inventarios_Apartados
|
|||||||
Else
|
Else
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 1").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenDestino").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -754,7 +744,7 @@ Partial Class Inventarios_Apartados
|
|||||||
DdlSubProyecto.SelectedValue = "-1"
|
DdlSubProyecto.SelectedValue = "-1"
|
||||||
CargaAlmacenes()
|
CargaAlmacenes()
|
||||||
|
|
||||||
DdlCliente.SelectedValue = "-1"
|
DdlClientes.SelectedValue = "-1"
|
||||||
SeleccionaVendedor()
|
SeleccionaVendedor()
|
||||||
|
|
||||||
CargadoDeMov = False
|
CargadoDeMov = False
|
||||||
@@ -910,16 +900,6 @@ Partial Class Inventarios_Apartados
|
|||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 2").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenOrigen").ToString.ToEntero, -Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
@@ -938,20 +918,10 @@ Partial Class Inventarios_Apartados
|
|||||||
Else
|
Else
|
||||||
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
TextoError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 2").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenDestino").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
ErrorMovInv = True
|
|
||||||
TextoError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -989,203 +959,6 @@ Partial Class Inventarios_Apartados
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SECCION ALMACEN"
|
|
||||||
Private Sub CreaDtSeccionAlmacen()
|
|
||||||
DtSeccionAlmacen = New DataTable
|
|
||||||
DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
|
||||||
DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacenOrigen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacenDestino", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CvePS", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacenOrigen", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacenDestino", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("TipoSeccionAlmacen", GetType(Integer))
|
|
||||||
End Sub
|
|
||||||
Private Sub CargaDdlAlmacen()
|
|
||||||
DdlSeccionAlmacenOrigen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccionAlmacenOrigen.DataBind()
|
|
||||||
|
|
||||||
DdlSeccionAlmacenDestino.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccionAlmacenDestino.DataBind()
|
|
||||||
End Sub
|
|
||||||
Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
|
|
||||||
If Not DdlAlmacenOrigen.SelectedValue.ToEntero > 0 Then
|
|
||||||
Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen origen.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If Not DdlAlmacenDestino.SelectedValue.ToEntero > 0 AndAlso Not ChkTransitorio.Checked Then
|
|
||||||
' Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen destino.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
GvSeccion.Columns(2).Visible = True
|
|
||||||
DivSeccionAlmacenDestino.Visible = True
|
|
||||||
|
|
||||||
DivSeccionAlmacenOrigen.Visible = True
|
|
||||||
GvSeccion.Columns(1).Visible = True
|
|
||||||
|
|
||||||
CantidadTotal = gvRow.DataKey("Cantidad").ToDecimal
|
|
||||||
IndexSeccionAlmacen = gvRow.RowIndex
|
|
||||||
CvePS = gvRow.DataKey("CvePS").ToEntero
|
|
||||||
TipoSeccionAlmacen = 1
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkSeccionAlmacenDestino_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
|
|
||||||
Dim CveAlmacenApartado = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen IN (9) AND Estatus = 'Activo' And CveSubProyecto = {DdlSubProyectoDesapartado.SelectedValue.ToEntero}").ToEntero
|
|
||||||
If Not CveAlmacenApartado > 0 Then
|
|
||||||
Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen destino.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
DivSeccionAlmacenOrigen.Visible = True
|
|
||||||
DivSeccionAlmacenDestino.Visible = True
|
|
||||||
GvSeccion.Columns(1).Visible = True
|
|
||||||
GvSeccion.Columns(2).Visible = True
|
|
||||||
|
|
||||||
CantidadTotal = gvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
|
||||||
IndexSeccionAlmacen = gvRow.RowIndex
|
|
||||||
CvePS = gvRow.DataKey("CvePS").ToEntero
|
|
||||||
TipoSeccionAlmacen = 2
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaSeccionAlmacen()
|
|
||||||
Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen} AND TipoSeccionAlmacen = {TipoSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
|
||||||
GvSeccion.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen} AND TipoSeccionAlmacen = {TipoSeccionAlmacen}")
|
|
||||||
GvSeccion.DataBind()
|
|
||||||
|
|
||||||
TxtCantidadSeccion.Text = ""
|
|
||||||
DdlSeccionAlmacenOrigen.SelectedIndex = 0
|
|
||||||
DdlSeccionAlmacenDestino.SelectedIndex = 0
|
|
||||||
Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
|
||||||
If CantidadRestante = 0 Then
|
|
||||||
RVTxtCantidad.MaximumValue = "1"
|
|
||||||
TxtCantidadSeccion.Enabled = False
|
|
||||||
Else
|
|
||||||
RVTxtCantidad.MaximumValue = CantidadRestante.ToString
|
|
||||||
TxtCantidadSeccion.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TipoSeccionAlmacen = 1 Then
|
|
||||||
If CantidadTotalSeccion > 0 Then
|
|
||||||
GvDatos.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = False
|
|
||||||
GvDatos.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
GvDatos.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = True
|
|
||||||
GvDatos.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = ""
|
|
||||||
End If
|
|
||||||
If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 Then
|
|
||||||
DdlAlmacenOrigen.Enabled = False
|
|
||||||
DdlAlmacenOrigen.ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
DdlAlmacenOrigen.Enabled = True
|
|
||||||
DdlAlmacenOrigen.ToolTip = ""
|
|
||||||
End If
|
|
||||||
UpDatos.Update()
|
|
||||||
ElseIf TipoSeccionAlmacen = 2 Then
|
|
||||||
If CantidadTotalSeccion > 0 Then
|
|
||||||
GvDatosDesapartado.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False
|
|
||||||
GvDatosDesapartado.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
GvDatosDesapartado.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = True
|
|
||||||
GvDatosDesapartado.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = ""
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpDatosDesapartado.Update()
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpModalSeccionAlmacen.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim CveAlmacenApartado As Integer = 0
|
|
||||||
If TipoSeccionAlmacen = 2 Then
|
|
||||||
CveAlmacenApartado = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen IN (9) AND Estatus = 'Activo' And CveSubProyecto = {DdlSubProyectoDesapartado.SelectedValue.ToEntero}").ToEntero
|
|
||||||
End If
|
|
||||||
Dim ObjInv As New ClsInventarios
|
|
||||||
Dim CantidadDisponible As Decimal = 0
|
|
||||||
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlSeccionAlmacenOrigen.SelectedValue.ToEntero, If(TipoSeccionAlmacen = 1, DdlAlmacenOrigen.SelectedValue.ToEntero, CveAlmacenApartado),
|
|
||||||
CvePS, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
|
||||||
CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString.ToDecimal
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjInv.Dispose()
|
|
||||||
|
|
||||||
CantidadDisponible -= DtSeccionAlmacen.FiltraParametros($"CvePS = {CvePS} AND CveSeccionAlmacenOrigen = {DdlSeccionAlmacenOrigen.SelectedValue} AND TipoSeccionAlmacen = {TipoSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
|
||||||
|
|
||||||
If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
|
||||||
Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Row As DataRow = Nothing
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
Row = DtSeccionAlmacen.NewRow
|
|
||||||
Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
|
||||||
Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
|
||||||
Row("CveSeccionAlmacenOrigen") = DdlSeccionAlmacenOrigen.SelectedValue.ToEntero
|
|
||||||
Row("SeccionAlmacenOrigen") = DdlSeccionAlmacenOrigen.SelectedItem.Text
|
|
||||||
Row("CveSeccionAlmacenDestino") = DdlSeccionAlmacenDestino.SelectedValue.ToEntero
|
|
||||||
Row("SeccionAlmacenDestino") = DdlSeccionAlmacenDestino.SelectedItem.Text
|
|
||||||
Row("CvePS") = CvePS
|
|
||||||
Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
|
||||||
Row("TipoSeccionAlmacen") = TipoSeccionAlmacen
|
|
||||||
DtSeccionAlmacen.Rows.Add(Row)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
Dim Index As Integer = 0
|
|
||||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
|
||||||
If Dr("Consec").ToString.ToEntero = gvRow.DataKey("Consec").ToEntero() Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Index += 1
|
|
||||||
Next
|
|
||||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
|
||||||
' If Not CveVentaSurtir > 0 Then
|
|
||||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
|
||||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Dim ObjInv As New ClsInventarios
|
|
||||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
|
||||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
|
||||||
' End If
|
|
||||||
' ObjInv.Dispose()
|
|
||||||
' GvVerSeccionesAlmacen.DataBind()
|
|
||||||
' UpVerSeccionesAlmacen.Update()
|
|
||||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -29,9 +29,9 @@ Partial Class Inventarios_CatSeccionesAlmacenes
|
|||||||
|
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
Dim ObjSeccion As New ClsInventarios
|
Dim ObjSeccion As New ClsInventarios
|
||||||
If ObjSeccion.GetSeccionesAlmacenes(-1) Then
|
If ObjSeccion.GetSeccionesAlmacenes(-1, -1) Then
|
||||||
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTSeccionAlmacen(-1) = ObjSeccion.DtResultados
|
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = ObjSeccion.DtResultados
|
||||||
Else
|
Else
|
||||||
GvDatos.DataSource = Nothing
|
GvDatos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -62,7 +62,7 @@ Partial Class Inventarios_CatSeccionesAlmacenes
|
|||||||
Alert("La Seccion se guardó correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Seccion se guardó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTSeccionAlmacen(-1) = ObjSeccion.DtResultados
|
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = ObjSeccion.DtResultados
|
||||||
|
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
CargaGrid(ViewState("Orden").ToString())
|
CargaGrid(ViewState("Orden").ToString())
|
||||||
@@ -108,7 +108,7 @@ Partial Class Inventarios_CatSeccionesAlmacenes
|
|||||||
DdlAlmacen.SelectedIndex = 0
|
DdlAlmacen.SelectedIndex = 0
|
||||||
Alert("La Seccion se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Seccion se actualizo correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTSeccionAlmacen(-1) = ObjSeccion.DtResultados
|
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = ObjSeccion.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjSeccion.Dispose()
|
ObjSeccion.Dispose()
|
||||||
@@ -134,7 +134,7 @@ Partial Class Inventarios_CatSeccionesAlmacenes
|
|||||||
If ObjSeccion.RemoveSeccion(GvRow.DataKey("CveSeccion").ToString.ToEntero) Then
|
If ObjSeccion.RemoveSeccion(GvRow.DataKey("CveSeccion").ToString.ToEntero) Then
|
||||||
Alert("La Seccion se elimino correctamente.", TipoMensaje.MsgInformacion)
|
Alert("La Seccion se elimino correctamente.", TipoMensaje.MsgInformacion)
|
||||||
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
ViewState("DTSeccionesAlmacenes") = ObjSeccion.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||||
GlobalDTSeccionAlmacen(-1) = ObjSeccion.DtResultados
|
GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1) = ObjSeccion.DtResultados
|
||||||
End If
|
End If
|
||||||
ObjSeccion.Dispose()
|
ObjSeccion.Dispose()
|
||||||
If ViewState("Orden").ToString() <> String.Empty Then
|
If ViewState("Orden").ToString() <> String.Empty Then
|
||||||
|
|||||||
@@ -146,7 +146,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Información del movimiento
|
<i class="fa fa-info-circle"></i>Información del movimiento
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
<div class="portlet-body" <%= IIf(chkexpand.Checked = True, "", "style='display:none;'")%>>
|
||||||
@@ -276,7 +275,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-1 truncate" style="width: 110px">
|
<label class="col-md-1 truncate" style="width: 110px">
|
||||||
Observaciones:
|
Observaciones:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-5">
|
<div class="col-md-5">
|
||||||
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
<asp:TextBox ID="TxtObservaciones" TextMode="MultiLine" Rows="2" CssClass="form-control input-sm" runat="server" MaxLength="232"></asp:TextBox>
|
||||||
@@ -333,7 +331,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Agregar Producto
|
<i class="fa fa-info-circle"></i>Agregar Producto
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -408,14 +405,12 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Información de registro
|
<i class="fa fa-info-circle"></i>Información de registro
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Usuario:
|
Usuario:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
<asp:Label ID="LblUsuarioRegistro" runat="server"></asp:Label>
|
||||||
@@ -425,7 +420,6 @@
|
|||||||
<div class="row" style="margin-top: 10px;">
|
<div class="row" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Fecha:
|
Fecha:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
<asp:Label ID="LblFechaRegistro" runat="server"></asp:Label>
|
||||||
@@ -434,7 +428,6 @@
|
|||||||
<div class="row" style="margin-top: 10px;">
|
<div class="row" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Referencia:
|
Referencia:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
<asp:HyperLink ID="HplCompra" Target="_blank" runat="server" Visible="False" CssClass="Texto">Ver Compra</asp:HyperLink>
|
||||||
@@ -447,7 +440,6 @@
|
|||||||
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 10px;">
|
<div class="row" runat="server" id="RowConsignacion" visible="false" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Consignación:
|
Consignación:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
<asp:HyperLink ID="HLConsignacion" Target="_blank" NavigateUrl="#" Text="" runat="server" />
|
||||||
@@ -457,7 +449,6 @@
|
|||||||
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 10px;">
|
<div class="row" runat="server" id="RowTipoCambio" visible="false" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Tipo Cambio:
|
Tipo Cambio:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
<asp:Label Text="" ID="LbTipoCambio" runat="server" />
|
||||||
@@ -466,7 +457,6 @@
|
|||||||
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 10px;">
|
<div class="row" runat="server" id="RowMtoRel" visible="false" style="margin-top: 10px;">
|
||||||
<label class="col-md-3 truncate">
|
<label class="col-md-3 truncate">
|
||||||
Mto. Rel.:
|
Mto. Rel.:
|
||||||
|
|
||||||
</label>
|
</label>
|
||||||
<div class="col-md-6">
|
<div class="col-md-6">
|
||||||
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
<asp:HyperLink ID="lnkMtoRelaioando" CssClass="Texto" runat="server" Target="_blank">ver</asp:HyperLink>
|
||||||
@@ -484,7 +474,6 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="caption uppercase" style="position: relative;">
|
<div class="caption uppercase" style="position: relative;">
|
||||||
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
<i class="fa fa-info-circle"></i>Tipo de Cambio
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="portlet-body">
|
<div class="portlet-body">
|
||||||
@@ -553,94 +542,13 @@
|
|||||||
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<%--<table border="0" cellpadding="0" class="Widthall grides" cellspacing="0">
|
|
||||||
<tbody>
|
|
||||||
<tr class="Titulos">
|
|
||||||
<th style="width: 28px">#</th>
|
|
||||||
<th style="width: 63px">Cant</th>
|
|
||||||
<th style="width: 200px">Clasificación<br />
|
|
||||||
Producto </th>
|
|
||||||
<th width="73px">U.M.</th>
|
|
||||||
<th width="63px" id="tdPU" runat="server" visible="false">P.U.</th>
|
|
||||||
<th width="63px" id="tdCI" runat="server" visible="false">CI</th>
|
|
||||||
<th style="width: 88px" runat="server" id="TrSerieLote2" visible="false">
|
|
||||||
<asp:Label runat="server" ID="LblSerieLote" Visible="false">Serie - Lote</asp:Label></th>
|
|
||||||
<th style="width: 88px" runat="server" id="TrLote2" visible="false">Lote</th>
|
|
||||||
<th style="width: 88px" runat="server" id="TrBatch2" visible="false">Batch</th>
|
|
||||||
<th style="width: 88px" runat="server" id="TrSeccionAlmacen2" visible="false">Sección Almacén</th>
|
|
||||||
<th style="width: 90px;">Observaciones</th>
|
|
||||||
<th style="width: 73px;"></th>
|
|
||||||
</tr>
|
|
||||||
<tr align="center">
|
|
||||||
<td></td>
|
|
||||||
<td>--%>
|
|
||||||
<%--<asp:TextBox ID="txtCantidad" CssClass="form-control input-sm" Width="55px" MaxLength="15" runat="server" ValidationGroup="GprAgregaPS"></asp:TextBox>
|
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidad" runat="server" TargetControlID="txtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
|
||||||
<asp:RequiredFieldValidator ID="RFVCantidad" runat="server" ControlToValidate="txtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="GprAgregaPS"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOCantidad1" runat="server" HighlightCssClass="vco" TargetControlID="RFVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:CustomValidator ID="CVCantidad" runat="server" ClientValidationFunction="ValidaDecimal6digits" ControlToValidate="TxtCantidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> no tiene el formato correcto (6 decimales). Por favor rectifique y vuelva a intentar." ValidateEmptyText="True" ValidationGroup="GprAgregaPS"></asp:CustomValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VCECantidad" runat="server" HighlightCssClass="vco" TargetControlID="CVCantidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</td>
|
|
||||||
<td style="text-align: center;">
|
|
||||||
<div class="psagregar">
|
|
||||||
<div class="comboxes">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:DropDownList ID="DdlUnidad" runat="server" Class="table-group-action-input form-control input-inline input-sm" Style="width: 75px !important;" DataTextField="UnidadMedida" DataValueField="CveUnidadMedida"></asp:DropDownList>
|
|
||||||
<asp:CompareValidator ID="CVUnidad" runat="server" ControlToValidate="ddlUnidad" Type="Integer" Operator="GreaterThan" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Unidad Medida''</b> es necesario, por favor selecione una." Display="None" ValueToCompare="0" ValidationGroup="GprAgregaPS"></asp:CompareValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="CVUnidad" Width="300px"></ajax:ValidatorCalloutExtender>
|
|
||||||
</td>
|
|
||||||
<td id="tdTxtPU" runat="server" visible="false">
|
|
||||||
<asp:TextBox ID="txtPrecio" CssClass="form-control input-sm" runat="server" Width="55px" Visible="false"></asp:TextBox>
|
|
||||||
<ajax:FilteredTextBoxExtender ID="ftbe" runat="server" TargetControlID="txtPrecio" FilterType="Custom, Numbers" ValidChars="+-.," />
|
|
||||||
</td>
|
|
||||||
<td id="TdTotal" runat="server" visible="false"></td>
|
|
||||||
<td id="tdCI2" runat="server" visible="false"></td>
|
|
||||||
<td id="tdAF" runat="server" align="center" visible="false">
|
|
||||||
<asp:UpdatePanel ID="UPPNumEcon" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<asp:Button Text="VinculaAF" Style="display: none;" OnClick="BtnVinculaAF_Click" ClientIDMode="Static" ID="BtnVinculaAF" runat="server" />
|
|
||||||
<asp:HiddenField ID="HdnCveActivoFijo" Value="-1" runat="server" ClientIDMode="Static" />
|
|
||||||
<asp:HiddenField ID="HdnCodigoAF" Value="-1" runat="server" ClientIDMode="Static" />
|
|
||||||
|
|
||||||
<asp:TextBox ID="LblCodigo" runat="server" Text="" onkeyup="EnterAF(event);" onblur="AFBlur();" ClientIDMode="Static" Width="40px"></asp:TextBox>
|
|
||||||
<asp:HyperLink ID="HplMaq" runat="server" ClientIDMode="Static"><img alt="Activo Fijo" width="20px" height="20px" src="/Imagenes/Maquinaria.jpg" style="cursor:pointer;" onclick="AbrirVentana('/AF/PopUpBuscarAF.aspx?OPCION=OC',950,600,'N');"/></asp:HyperLink>
|
|
||||||
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</td>
|
|
||||||
<td runat="server" id="TrSerieLote" visible="false">
|
|
||||||
<asp:Panel runat="server" DefaultButton="BtnSerieAddNew">
|
|
||||||
<asp:TextBox ID="TxtnSerieLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
|
||||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
|
||||||
</asp:Panel>
|
|
||||||
</td>
|
|
||||||
<td runat="server" id="TrLote" visible="false">
|
|
||||||
<asp:TextBox ID="TxtnLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td runat="server" id="TrBatch" visible="false">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td runat="server" id="TrSeccionAlmacen" visible="false">
|
|
||||||
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<asp:TextBox ID="TxtObservacionesdetalle" CssClass="form-control input-sm" runat="server" MaxLength="200"></asp:TextBox>
|
|
||||||
</td>
|
|
||||||
<td align="center">
|
|
||||||
<asp:LinkButton ID="LbAgregar" runat="server" CssClass="btn btn-default" ValidationGroup="GprAgregaPS" Text="Agregar" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
</table>--%>
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" align="Right">
|
<div class="col-md-12" align="Right">
|
||||||
<asp:LinkButton ID="LkAgregar" runat="server" CssClass="btn btn-default" Text="Agregar Producto" />
|
<asp:LinkButton ID="LkAgregar" runat="server" CssClass="btn btn-default" Text="Agregar Producto" />
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<br />
|
<br />
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12" align="right">
|
<div class="col-md-12" align="right">
|
||||||
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
|
<asp:Label ID="LbTotalMovimientos" Text="Total de Movimientos: 0" runat="server" />
|
||||||
@@ -654,21 +562,9 @@
|
|||||||
<asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" />
|
<asp:Button ID="BtnVinculaAFEdit" ClientIDMode="Static" OnClick="BtnVinculaAFEdit_Click" Style="display: none;" runat="server" />
|
||||||
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
<asp:HiddenField runat="server" ID="HdnCodAFEdit" Value="-1" ClientIDMode="Static" />
|
||||||
|
|
||||||
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" ShowHeader="True" EmptyDataText="Aún no hay registros."
|
<asp:GridView ID="GvM" runat="server" GridLines="none" CssClass="tabla_correcto grides Widthall mysmallbtn" ShowHeader="True" EmptyDataText="Aún no hay registros." DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,Serie,CveSeccionAlmacen" AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
||||||
DataKeyNames="No,CveMovimientoDetalle,Cantidad,CvePS,CveUM,PU,Observaciones,CodigoPS,UnidadMedida,CveAF,SerieLote,CveSeccionAlmacen"
|
|
||||||
AutoGenerateColumns="False" AllowPaging="False" ShowFooter="True" ShowHeaderWhenEmpty="True">
|
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="CveMovimientoDetalle" ItemStyle-Font-Size="6pt" Visible="false">
|
<asp:TemplateField HeaderText="" ItemStyle-Font-Size="6pt">
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="lbMovimientoDetalle" runat="server" Text='<%# Eval("CveMovimientoDetalle")%>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="CvePS" ItemStyle-Font-Size="6pt" Visible="false">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="lbCvePS" runat="server" Text='<%# Eval("CvePS")%>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="#" ItemStyle-Font-Size="6pt">
|
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:Literal ID="lbNo" runat="server" Text='<%# Eval("No")%>'></asp:Literal>
|
<asp:Literal ID="lbNo" runat="server" Text='<%# Eval("No")%>'></asp:Literal>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
@@ -687,7 +583,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="43px"></ItemStyle>
|
<ItemStyle Width="43px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Producto" ReadOnly="true" DataField="CodigoPS" ItemStyle-Width="200px" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Producto" ReadOnly="true" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField HeaderText="Unidad">
|
<asp:TemplateField HeaderText="Unidad">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lbUnidad" runat="server" Text='<%# Eval("UnidadMedida")%>'></asp:Literal>
|
<asp:Literal ID="lbUnidad" runat="server" Text='<%# Eval("UnidadMedida")%>'></asp:Literal>
|
||||||
@@ -752,12 +648,12 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
<ItemStyle Width="60px" HorizontalAlign="Center" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="SerieLote" Visible="false">
|
<asp:TemplateField HeaderText="Serie" Visible="false">
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:TextBox ID="TxtSerieLote" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("SerieLote")%>' Style="text-align: right;"></asp:TextBox>
|
<asp:TextBox ID="TxtSerie" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Serie")%>' Style="text-align: right;"></asp:TextBox>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lbSerieLote" runat="server" Text='<%# Eval("SerieLote")%>'></asp:Literal>
|
<asp:Literal ID="lbSerie" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
||||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||||
@@ -772,15 +668,10 @@
|
|||||||
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
||||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Batch" Visible="false">
|
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<EditItemTemplate>
|
|
||||||
<asp:TextBox ID="TxtBatch" CssClass="form-control input-sm" runat="server" Width="80px" Text='<%# Eval("Batch")%>' Style="text-align: right;"></asp:TextBox>
|
|
||||||
</EditItemTemplate>
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LbBatch" runat="server" Text='<%# Eval("Batch")%>'></asp:Literal>
|
<asp:Literal ID="LbCaducidad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
|
||||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" Visible="false">
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
@@ -803,17 +694,8 @@
|
|||||||
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
<ItemStyle Width="90px" HorizontalAlign="Right"></ItemStyle>
|
||||||
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
<FooterStyle HorizontalAlign="Right"></FooterStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
|
||||||
<ItemTemplate>
|
<asp:TemplateField>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField ItemStyle-Width="20px">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="ImgEd" runat="server" AlternateText="Editar" CausesValidation="False" OnClick="EditPS" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField Visible="false">
|
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<center>
|
<center>
|
||||||
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
<asp:LinkButton ID="imgU" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-check'></i>" ValidationGroup="GrpGV" />
|
||||||
@@ -821,7 +703,7 @@
|
|||||||
</center>
|
</center>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<%--<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />--%>
|
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
<asp:LinkButton ID="lnkRemove" runat="server" AlternateText="Eliminar" OnClick="DeleteRow" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si" />
|
<asp:LinkButton ID="lnkRemove" runat="server" AlternateText="Eliminar" OnClick="DeleteRow" CommandArgument='<%# Eval("No")%>' CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea eliminar el concepto?" data-btn-ok-label="si" />
|
||||||
<asp:LinkButton ID="lnkDividir" runat="server" AlternateText="Eliminar" OnClick="DividirRow" CommandArgument='<%# Eval("No")%>' Style="font-size: 9px" CssClass="btn btn-circle btn-sm red" Text="<i class='fas fa-chart-pie-alt'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea dividir el concepto en unidades?" data-btn-ok-label="si" />
|
<asp:LinkButton ID="lnkDividir" runat="server" AlternateText="Eliminar" OnClick="DividirRow" CommandArgument='<%# Eval("No")%>' Style="font-size: 9px" CssClass="btn btn-circle btn-sm red" Text="<i class='fas fa-chart-pie-alt'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Seguro que desea dividir el concepto en unidades?" data-btn-ok-label="si" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -975,7 +857,6 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-5" style="text-align: right;">
|
<div class="col-md-5" style="text-align: right;">
|
||||||
Cantidad
|
Cantidad
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-7">
|
<div class="col-md-7">
|
||||||
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
<asp:TextBox ClientIDMode="Static" ID="TxtCantidadEspecial" Text="" runat="server"></asp:TextBox>
|
||||||
@@ -1417,7 +1298,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
<Triggers>
|
<Triggers>
|
||||||
<asp:PostBackTrigger ControlID="LbDescargarExcelConceptos" />
|
<asp:PostBackTrigger ControlID="LbDescargarExcelConceptos" />
|
||||||
@@ -1426,92 +1306,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="divDescripcion" class="modal ADS fade" role="dialog">
|
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
|
||||||
<span aria-hidden="true">×</span>
|
|
||||||
</button>
|
|
||||||
<h4 class="modal-title" id="myModalLabel" runat="server">Motivo</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div>
|
|
||||||
<br />
|
|
||||||
<label>Descripción:</label>
|
|
||||||
<asp:TextBox ID="TxtDescripcion" runat="server" Height="100" Width="600" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RFVTxtDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:LinkButton ID="BtnRemove" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> Eliminar</asp:LinkButton>
|
|
||||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenModal" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacen" runat="server" ControlToValidate="DdlSeccionAlmacen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacen"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacen:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccionAlmacen" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacen" HeaderText="Sección Almacen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="ModalAgregar" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpAgregar" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpAgregar" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content">
|
<div class="modal-content">
|
||||||
@@ -1549,10 +1344,10 @@
|
|||||||
<label for="<%= txtPrecio.ClientID.ToString()%>">P.U.</label>
|
<label for="<%= txtPrecio.ClientID.ToString()%>">P.U.</label>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="divSerieLote" class="form-group form-md-line-input input-iconright" visible="false">
|
<div runat="server" id="divSerie" class="form-group form-md-line-input input-iconright" visible="false">
|
||||||
<asp:TextBox ID="TxtnSerieLote" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtnSerie" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
||||||
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
<asp:Button Text="" ID="BtnSerieAddNew" OnClick="BtnSerieAddNew_Click" Style="display: none" runat="server" />
|
||||||
<label for="<%= TxtnSerieLote.ClientID.ToString()%>">Serie Lote</label>
|
<label for="<%= TxtnSerie.ClientID.ToString()%>">Serie Lote</label>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">
|
<div runat="server" id="divLote" class="form-group form-md-line-input input-iconright" visible="false">
|
||||||
@@ -1560,11 +1355,6 @@
|
|||||||
<label for="<%= TxtnLote.ClientID.ToString()%>">Lote</label>
|
<label for="<%= TxtnLote.ClientID.ToString()%>">Lote</label>
|
||||||
<br />
|
<br />
|
||||||
</div>
|
</div>
|
||||||
<div runat="server" id="divBatch" class="form-group form-md-line-input input-iconright" visible="false">
|
|
||||||
<asp:TextBox ID="TxtnBatch" CssClass="form-control input-sm" runat="server" Width="80px" Visible="false"></asp:TextBox>
|
|
||||||
<label for="<%= TxtnBatch.ClientID.ToString()%>">Batch</label>
|
|
||||||
<br />
|
|
||||||
</div>
|
|
||||||
<div runat="server" id="divSeccionAlmacen" class="form-group form-md-line-input input-iconright" visible="false">
|
<div runat="server" id="divSeccionAlmacen" class="form-group form-md-line-input input-iconright" visible="false">
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" AppendDataBoundItems="true" DataValueField="CveSeccion" Class="form-control input-sm select2me" Style="width: 95% !important" runat="server" CausesValidation="true">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
@@ -1617,6 +1407,36 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div id="divDescripcion" class="modal ADS fade" role="dialog">
|
||||||
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDescripcion" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-content">
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||||
|
<span aria-hidden="true">×</span>
|
||||||
|
</button>
|
||||||
|
<h4 class="modal-title" id="myModalLabel" runat="server">Motivo</h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div>
|
||||||
|
<br />
|
||||||
|
<label>Descripción:</label>
|
||||||
|
<asp:TextBox ID="TxtDescripcion" runat="server" Height="100" Width="600" TextMode="MultiLine" CausesValidation="true" MaxLength="500"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RFVTxtDescripcion" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtDescripcion" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Descripcion''</b> es necesario, por favor ingréselo." ValidationGroup="GrpObligatorio"></asp:RequiredFieldValidator>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="BtnRemove" runat="server" CssClass="btn btn-primary" ValidationGroup="GrpObligatorio"> Eliminar</asp:LinkButton>
|
||||||
|
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
|
|||||||
@@ -5,7 +5,6 @@ Imports System.Data
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Math
|
|
||||||
|
|
||||||
'Imports DocumentFormat.OpenXml.Wordprocessing
|
'Imports DocumentFormat.OpenXml.Wordprocessing
|
||||||
|
|
||||||
@@ -205,14 +204,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
Private Property DtSeccionAlmacen As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("DtSeccionAlmacen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property IndexSeccionAlmacen As Integer
|
Private Property IndexSeccionAlmacen As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("IndexSeccionAlmacen"), Integer)
|
Return CType(ViewState("IndexSeccionAlmacen"), Integer)
|
||||||
@@ -261,14 +252,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ViewState("DescripcionDetalladaEliminar") = value
|
ViewState("DescripcionDetalladaEliminar") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Public Property CveAFEdit() As Integer
|
|
||||||
Get
|
|
||||||
Return ViewState("CveAFEdit").ToString.ToEntero
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("CveAFEdit") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Public Property CveMovimientoDetalleEdit() As Integer
|
Public Property CveMovimientoDetalleEdit() As Integer
|
||||||
Get
|
Get
|
||||||
Return ViewState("CveMovimientoDetalleEdit").ToString.ToEntero
|
Return ViewState("CveMovimientoDetalleEdit").ToString.ToEntero
|
||||||
@@ -277,6 +261,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ViewState("CveMovimientoDetalleEdit") = value
|
ViewState("CveMovimientoDetalleEdit") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
Public Property CveAFEdit() As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CveAFEdit").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveAFEdit") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -296,13 +288,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CargaCombos()
|
CargaCombos()
|
||||||
TxtFecha.Text = Now.ToShortDateString
|
TxtFecha.Text = Now.ToShortDateString
|
||||||
RVFecha.MaximumValue = Now.ToShortDateString
|
RVFecha.MaximumValue = Now.ToShortDateString
|
||||||
InicializaClientes()
|
|
||||||
|
|
||||||
CantidadTotal = 0
|
CantidadTotal = 0
|
||||||
IndexSeccionAlmacen = 0
|
IndexSeccionAlmacen = 0
|
||||||
Tipo = 0
|
Tipo = 0
|
||||||
CreaDtSeccionAlmacen()
|
|
||||||
CargaDdlAlmacen()
|
|
||||||
|
|
||||||
'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos
|
'si viene una parámetro para cargar un movimiento lo hacemos dentro del procedimiento cargadatos
|
||||||
Select Case UsuarioActual.Empresa.Funcionalidad(103)
|
Select Case UsuarioActual.Empresa.Funcionalidad(103)
|
||||||
@@ -332,6 +322,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
InicializaClientes()
|
||||||
InicializaBitacoraTemporal()
|
InicializaBitacoraTemporal()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(132) = "1" Then
|
||||||
@@ -342,9 +333,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ActivaConsumoInterno()
|
ActivaConsumoInterno()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SECCION ALMACEN EXISTENCIAS
|
|
||||||
GvM.Columns(14).Visible = UsuarioActual.Empresa.Funcionalidad(563).ToString = "1" AndAlso Not CveMovimiento > 0
|
|
||||||
|
|
||||||
'BLOQUEA PERMISOS
|
'BLOQUEA PERMISOS
|
||||||
BtnGuardar.Enabled = PermiteGuardar()
|
BtnGuardar.Enabled = PermiteGuardar()
|
||||||
BtnEliminar.Enabled = PermiteEliminar()
|
BtnEliminar.Enabled = PermiteEliminar()
|
||||||
@@ -378,15 +366,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Return If(UsuarioActual.TienePermisoProceso(184) Or EsConsumoInterno, True, False)
|
Return If(UsuarioActual.TienePermisoProceso(184) Or EsConsumoInterno, True, False)
|
||||||
End Function
|
End Function
|
||||||
Private Sub ActivaPermisoSeccionAlmacen()
|
Private Sub ActivaPermisoSeccionAlmacen()
|
||||||
GvM.Columns(12).Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
If CveMovimiento <= 0 Then
|
||||||
'TrSeccionAlmacen.Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
GvM.Columns(11).Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
||||||
'TrSeccionAlmacen2.Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
End If
|
||||||
divSeccionAlmacen.Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub PermisoVerImportes()
|
Private Sub PermisoVerImportes()
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
'tdPU.Visible = TienePermisoImportes
|
' tdPU.Visible = TienePermisoImportes
|
||||||
'tdTxtPU.Visible = TienePermisoImportes
|
' tdTxtPU.Visible = TienePermisoImportes
|
||||||
GvM.Columns(4).Visible = TienePermisoImportes
|
GvM.Columns(4).Visible = TienePermisoImportes
|
||||||
|
|
||||||
ThTotal.Visible = TienePermisoImportes
|
ThTotal.Visible = TienePermisoImportes
|
||||||
@@ -450,7 +437,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
dt.Columns.Add("CveAF")
|
dt.Columns.Add("CveAF")
|
||||||
dt.Columns.Add("SerieLote", Type.GetType("System.String"))
|
dt.Columns.Add("SerieLote", Type.GetType("System.String"))
|
||||||
dt.Columns.Add("Lote", Type.GetType("System.String"))
|
dt.Columns.Add("Lote", Type.GetType("System.String"))
|
||||||
dt.Columns.Add("Batch", Type.GetType("System.String"))
|
dt.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
|
||||||
|
|
||||||
dt.Columns.Add("Observaciones")
|
dt.Columns.Add("Observaciones")
|
||||||
dt.Columns.Add("CountMovimientoEntradaDetalle")
|
dt.Columns.Add("CountMovimientoEntradaDetalle")
|
||||||
@@ -476,11 +463,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
DdlClasificacion.DataBind()
|
DdlClasificacion.DataBind()
|
||||||
|
|
||||||
DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
DdlSeccion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
DdlSeccion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlSeccion.DataBind()
|
DdlSeccion.DataBind()
|
||||||
|
|
||||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
DdlSeccionAlmacen.DataBind()
|
DdlSeccionAlmacen.DataBind()
|
||||||
|
|
||||||
'Llenar el dropdownlist de monedas
|
'Llenar el dropdownlist de monedas
|
||||||
@@ -791,7 +778,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'Carga Cliente y ClienteSucursal
|
'Carga Cliente y ClienteSucursal
|
||||||
If Mov.CveCliente > 0 Then
|
If Mov.CveCliente > 0 Then
|
||||||
If DdlClientes.Items.FindByValue(Mov.CveCliente.ToString()) Is Nothing Then
|
If DdlClientes.Items.FindByValue(Mov.CveCliente.ToString()) Is Nothing Then
|
||||||
Dim dr As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa).FiltroPrimero(String.Format("CveCliente = {0}", Mov.CveCliente))
|
Dim dr As DataRow = GlobalDTCliente(UsuarioActual.CveEmpresa, CveCliente:=Mov.CveCliente).FiltroPrimero("")
|
||||||
If dr IsNot Nothing Then
|
If dr IsNot Nothing Then
|
||||||
DdlClientes.Items.Insert(0, New ListItem(dr("NombreComercial").ToString, dr("CveCliente").ToString))
|
DdlClientes.Items.Insert(0, New ListItem(dr("NombreComercial").ToString, dr("CveCliente").ToString))
|
||||||
End If
|
End If
|
||||||
@@ -828,6 +815,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
TxtPedidoContrato.Enabled = False
|
TxtPedidoContrato.Enabled = False
|
||||||
TxtPedidoContrato.Text = Mov.PedidoContrato
|
TxtPedidoContrato.Text = Mov.PedidoContrato
|
||||||
|
|
||||||
|
If Mov.CveProveedor > 0 Then
|
||||||
|
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa, Mov.CveProveedor)
|
||||||
|
DdlProveedor.DataBind()
|
||||||
|
DdlProveedor.SelectedValueExist(Mov.CveProveedor)
|
||||||
|
DdlProveedor.Enabled = False
|
||||||
|
TrProveedor.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
'cargar también los movimentos detalle
|
'cargar también los movimentos detalle
|
||||||
If Mov.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
If Mov.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) Then
|
||||||
@@ -848,13 +842,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
PermisoVerImportes()
|
PermisoVerImportes()
|
||||||
|
|
||||||
If DtMov.Rows(0)("CveProveedor").ToString.ToEntero > 0 Then
|
|
||||||
DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa)
|
|
||||||
DdlProveedor.DataBind()
|
|
||||||
DdlProveedor.SelectedValueExist(DtMov.Rows(0)("CveProveedor").ToString)
|
|
||||||
DdlProveedor.Enabled = False
|
|
||||||
TrProveedor.Visible = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("Movimiento No encontrado", TipoMensaje.MsgError)
|
Alert("Movimiento No encontrado", TipoMensaje.MsgError)
|
||||||
@@ -1032,7 +1020,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlClasificacion.SelectedValue = "-1"
|
DdlClasificacion.SelectedValue = "-1"
|
||||||
txtCantidad.Text = ""
|
txtCantidad.Text = ""
|
||||||
TxtnLote.Text = ""
|
TxtnLote.Text = ""
|
||||||
TxtnBatch.Text = ""
|
|
||||||
TxtObservacionesdetalle.Text = ""
|
TxtObservacionesdetalle.Text = ""
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1149,9 +1136,9 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
|
|
||||||
#Region " AGREGAR - GUARDAR "
|
#Region " AGREGAR - GUARDAR "
|
||||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional Batch As String = "-1") As Double
|
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional CveSeccionAlmacen As Integer = -1, Optional Serie As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double
|
||||||
Dim Inv As New ClsInventarios
|
Dim Inv As New ClsInventarios
|
||||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, Batch:=Batch)
|
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, CveSeccionAlmacen:=CveSeccionAlmacen, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||||
Inv.Dispose()
|
Inv.Dispose()
|
||||||
Return Existencia
|
Return Existencia
|
||||||
End Function
|
End Function
|
||||||
@@ -1159,15 +1146,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
'Protected Sub btnAgregar_Click(sender As Object, e As EventArgs) Handles LbAgregar.Click
|
||||||
' AgregarPS()
|
' AgregarPS()
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
Protected Sub btnAgregarDetalle_Click(sender As Object, e As EventArgs) Handles LkAgregarDetalle.Click
|
|
||||||
If LkAgregarDetalle.Text = "Agregar" Then
|
|
||||||
AgregarPS()
|
|
||||||
Else
|
|
||||||
ActualizarPS()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerieAddNew_Click(sender As Object, e As EventArgs)
|
||||||
AgregarPS()
|
AgregarPS()
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1178,14 +1156,13 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, txtPrecio.Text.ToDouble, TxtnSerieLote.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text, TxtnLote.Text.Trim, TxtnBatch.Text.Trim, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text)
|
AddNew(DdlProducto2.SelectedValue.ToEntero, DdlProducto2.SelectedText, DdlUnidad.SelectedValue.ToEntero, DdlUnidad.SelectedItem.Text, txtCantidad.Text.ToDouble, txtPrecio.Text.ToDouble, TxtnSerie.Text.Replace(" ", String.Empty), LblCodigo.Text, HdnCodigoAF.Value, HdnCveActivoFijo.Value, TxtObservacionesdetalle.Text, TxtnLote.Text.Trim, MinFecha, DdlSeccionAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedItem.Text)
|
||||||
LimpiarAgregar()
|
LimpiarAgregar()
|
||||||
|
|
||||||
txtCantidad.Text = ""
|
txtCantidad.Text = ""
|
||||||
TxtnLote.Text = ""
|
TxtnLote.Text = ""
|
||||||
TxtnBatch.Text = ""
|
|
||||||
LblCodigo.Text = ""
|
LblCodigo.Text = ""
|
||||||
TxtnSerieLote.Text = ""
|
TxtnSerie.Text = ""
|
||||||
HdnCodigoAF.Value = "-1"
|
HdnCodigoAF.Value = "-1"
|
||||||
HdnCveActivoFijo.Value = "-1"
|
HdnCveActivoFijo.Value = "-1"
|
||||||
RegistraScript("CodigoAF = "";")
|
RegistraScript("CodigoAF = "";")
|
||||||
@@ -1201,7 +1178,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
Protected Sub AddNew(CvePS As Integer, PS As String, CveUM As Integer, UM As String, Cantidad As Double, PU As Double, SerieLote As String, CodigoAF As String, Codigo As String, CveAF As String, Observaciones As String, Lote As String, Batch As String, 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, SerieLote 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)
|
||||||
If DdlAlmacen.SelectedValue.ToEntero <= 0 Then Alert("Seleccione un almacen", TipoMensaje.MsgAdvertencia) : RegistraScript("playsonidito('142608__autistic-lucario__error.wav')") : DdlProducto2.SelectedText = "" : Exit Sub
|
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
|
Dim Valido As Boolean = True
|
||||||
@@ -1218,9 +1195,9 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'salida
|
'salida
|
||||||
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
|
If Valido AndAlso DdlConcepto.SelectedValue.Contiene({"3", "5", "7", "8", "11", "12", "13", "15", "16", "17", "20", "21", "30", "31"}) Then ' salida de almacen
|
||||||
|
|
||||||
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), If(Batch = "", "-1", Batch))
|
Dim Existencia As Double = GetExistencias(CvePS, CveUM, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, -1, If(SerieLote = "", "-1", SerieLote), If(Lote = "", "-1", Lote), FechaCaducidad)
|
||||||
'LbAgregar.ToolTip = Existencia.ToString
|
' LbAgregar.ToolTip = Existencia.ToString
|
||||||
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(SerieLote <> "", $" AND SerieLote = '{SerieLote}'", "")}") < 0 Then
|
If Existencia - Cantidad - DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUM} {If(SerieLote <> "", $" AND Serie = '{SerieLote}'", "")}") < 0 Then
|
||||||
If Existencia <= 0 Then
|
If Existencia <= 0 Then
|
||||||
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
@@ -1269,7 +1246,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
registro.Item("CveAF") = CveAF
|
registro.Item("CveAF") = CveAF
|
||||||
registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
||||||
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
||||||
registro.Item("Batch") = If(Batch <> "", Batch, "")
|
registro.Item("FechaCaducidad") = FechaCaducidad
|
||||||
registro.Item("Observaciones") = Observaciones
|
registro.Item("Observaciones") = Observaciones
|
||||||
DtMovimientos.Rows.Add(registro)
|
DtMovimientos.Rows.Add(registro)
|
||||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
@@ -1346,10 +1323,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
ElseIf Dr("Estatus").ToString = "U" Then
|
ElseIf Dr("Estatus").ToString = "U" Then
|
||||||
|
|
||||||
If Not ObjInventario.UpdateMovimientoDetalle(Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero,
|
If Not ObjInventario.UpdateMovimientoDetalle(Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveMovimientoDetalle").ToString.ToEntero,
|
|
||||||
Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString,
|
|
||||||
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
|
||||||
Mensaje = "Error al Actualizar los movimientos"
|
Mensaje = "Error al Actualizar los movimientos"
|
||||||
ErrorMovInv = True : Exit For
|
ErrorMovInv = True : Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1360,14 +1334,14 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Else
|
Else
|
||||||
|
|
||||||
If GlobalDTInvConceptos.FiltraParametros(String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue.ToEntero)).Rows.Count > 0 AndAlso GlobalDTInvConceptos.FiltraParametros(String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue.ToEntero)).Rows(0)("Origen").ToString.ToEntero < 0 Then
|
If GlobalDTInvConceptos.FiltraParametros(String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue.ToEntero)).Rows.Count > 0 AndAlso GlobalDTInvConceptos.FiltraParametros(String.Format("CveConcepto = {0}", DdlConcepto.SelectedValue.ToEntero)).Rows(0)("Origen").ToString.ToEntero < 0 Then
|
||||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=If(Dr("SerieLote").ToString = "", "-1", Dr("SerieLote").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString), Batch:=If(Dr("Batch").ToString = "", "-1", Dr("Batch").ToString)) >= Dr("Cantidad").ToString.ToDouble Then
|
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=If(Dr("Serie").ToString = "", "-1", Dr("SerieLote").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString)) >= Dr("Cantidad").ToString.ToDouble Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al Agregar los nuevos movimientos"
|
Mensaje = "Error al Agregar los nuevos movimientos"
|
||||||
ErrorMovInv = True : Exit For
|
ErrorMovInv = True : Exit For
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If UsuarioActual.TienePermisoProceso(114) Then
|
If UsuarioActual.TienePermisoProceso(114) Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("SerieLote").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al Agregar los nuevos movimientos"
|
Mensaje = "Error al Agregar los nuevos movimientos"
|
||||||
ErrorMovInv = True : Exit For
|
ErrorMovInv = True : Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1377,7 +1351,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al Agregar los nuevos movimientos"
|
Mensaje = "Error al Agregar los nuevos movimientos"
|
||||||
ErrorMovInv = True : Exit For
|
ErrorMovInv = True : Exit For
|
||||||
End If
|
End If
|
||||||
@@ -1468,13 +1442,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TotalCantidad As Double = DtMovimientos.SUMD("Cantidad")
|
Dim TotalCantidad As Double = DtMovimientos.SUMD("Cantidad")
|
||||||
If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
|
|
||||||
If TotalCantidad <> DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") Then
|
|
||||||
ObjInventario.RollBack()
|
|
||||||
Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, obs, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Inv/ES", 53, 0, 0, 1, TxtFecha.Text.ToDate, obs, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveTipoPoliza:=3)
|
||||||
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor)
|
CveMovimiento = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, Fecha, tFolio, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, SubProyecto, ActivoFijo, Guia:=TxtGuia.Text, Observaciones:=TxtObservaciones.Text, CvePersonal:=DdlPersonal.SelectedValue.ToEntero, Recibio:=TxtResponsable.Text.Trim, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal, DepartamentoEntrega:=TxtDepartamentoEntrega.Text, PedidoContrato:=TxtPedidoContrato.Text, CveProveedor:=tCveProveedor)
|
||||||
@@ -1491,40 +1458,40 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Dim Cont As Integer = 0
|
Dim Cont As Integer = 0
|
||||||
If DdlConcepto.SelectedValue.Contiene({"3", "11", "13", "21", "30", "31"}) Then
|
If DdlConcepto.SelectedValue.Contiene({"3", "11", "13", "21", "30", "31"}) Then
|
||||||
For Each Dr As DataRow In DtMovimientos.Rows
|
For Each Dr As DataRow In DtMovimientos.Rows
|
||||||
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=If(Dr("SerieLote").ToString = "", "-1", Dr("SerieLote").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString), Batch:=If(Dr("Batch").ToString = "", "-1", Dr("Batch").ToString)) >= Dr("Cantidad").ToString.ToDouble Then
|
If ObjInventario.GetExistenciasPS(Dr("CvePS").ToString.ToEntero, Dr("CveUM").ToString.ToEntero, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), Serie:=If(Dr("Serie").ToString = "", "-1", Dr("SerieLote").ToString), Lote:=If(Dr("Lote").ToString = "", "-1", Dr("Lote").ToString), FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate) >= Dr("Cantidad").ToString.ToDouble Then
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
'Else
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
' For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
' Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
End If
|
'End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(114) Then
|
If UsuarioActual.TienePermisoProceso(114) Then
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
'Else
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
' For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
' Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
End If
|
'End If
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
Mensaje = String.Format("No hay existencias suficientes del producto: {0}", Dr("PS"))
|
Mensaje = String.Format("No hay existencias suficientes del producto: {0}", Dr("PS"))
|
||||||
@@ -1545,20 +1512,20 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, CveAF:=Dr("CveAF").ToString.ToEntero, CveSeccionAlmacen:=Dr("CveSeccionAlmacen").ToString.ToEntero, Serie:=Dr("Serie").ToString, Observaciones:=Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
'Else
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
' If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
' For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont}").Rows
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacen").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal * Tipo) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
' Mensaje = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
End If
|
' End If
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -1797,7 +1764,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Else
|
Else
|
||||||
LimpiarMovimiento()
|
LimpiarMovimiento()
|
||||||
End If
|
End If
|
||||||
DtSeccionAlmacen.Rows.Clear()
|
|
||||||
RegistraScript("playsonidito('beep-07.wav')")
|
RegistraScript("playsonidito('beep-07.wav')")
|
||||||
Else
|
Else
|
||||||
ObjInventario.RollBack()
|
ObjInventario.RollBack()
|
||||||
@@ -1921,7 +1888,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
CveMovimiento = ObjInv.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, TxtFecha.Text.ToDate, TxtFolio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
CveMovimiento = ObjInv.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, DdlConcepto.SelectedValue.ToEntero, 1, TxtFecha.Text.ToDate, TxtFolio.Text.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, SerieLote:=SerieLote)
|
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote)
|
||||||
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||||
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
@@ -2115,10 +2082,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Private Sub VisualizaPU(Opcion As Boolean)
|
Private Sub VisualizaPU(Opcion As Boolean)
|
||||||
'tdPU.Visible = Opcion
|
'tdPU.Visible = Opcion
|
||||||
'tdTxtPU.Visible = Opcion
|
'tdTxtPU.Visible = Opcion
|
||||||
|
|
||||||
txtPrecio.Visible = Opcion
|
txtPrecio.Visible = Opcion
|
||||||
divPrecio.Visible = Opcion
|
|
||||||
|
|
||||||
GvM.Columns(4).Visible = Opcion
|
GvM.Columns(4).Visible = Opcion
|
||||||
|
|
||||||
TdTotal.Visible = Opcion
|
TdTotal.Visible = Opcion
|
||||||
@@ -2131,7 +2095,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
GvM.Columns(6).Visible = Opcion
|
GvM.Columns(6).Visible = Opcion
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub VisualizaAF(Opcion As Boolean)
|
Private Sub VisualizaAF(Opcion As Boolean)
|
||||||
'tdAF.Visible = Opcion
|
tdAF.Visible = Opcion
|
||||||
ThAF.Visible = Opcion
|
ThAF.Visible = Opcion
|
||||||
GvM.Columns(8).Visible = Opcion
|
GvM.Columns(8).Visible = Opcion
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2175,13 +2139,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub ElProductoChange()
|
Private Sub ElProductoChange()
|
||||||
TxtnSerieLote.Visible = False
|
TxtnSerie.Visible = False
|
||||||
divSerieLote.Visible = False
|
divSerie.Visible = False
|
||||||
|
|
||||||
TxtnLote.Visible = False
|
TxtnLote.Visible = False
|
||||||
divLote.Visible = False
|
divLote.Visible = False
|
||||||
TxtnBatch.Visible = False
|
|
||||||
divBatch.Visible = False
|
|
||||||
|
|
||||||
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
EscondeColumnasGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
|
|
||||||
@@ -2190,8 +2152,8 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If MetodoInventario = 5 Then
|
If MetodoInventario = 5 Then
|
||||||
|
|
||||||
'LblSerieLote.Visible = True
|
'LblSerieLote.Visible = True
|
||||||
TxtnSerieLote.Visible = True
|
TxtnSerie.Visible = True
|
||||||
divSerieLote.Visible = True
|
divSerie.Visible = True
|
||||||
|
|
||||||
'TrSerieLote.Visible = True
|
'TrSerieLote.Visible = True
|
||||||
'TrSerieLote2.Visible = True
|
'TrSerieLote2.Visible = True
|
||||||
@@ -2204,9 +2166,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
'TrLote2.Visible = True
|
'TrLote2.Visible = True
|
||||||
GvM.Columns(10).Visible = True
|
GvM.Columns(10).Visible = True
|
||||||
|
|
||||||
TxtnBatch.Visible = True
|
|
||||||
divBatch.Visible = True
|
|
||||||
'TrBatch.Visible = True
|
|
||||||
'TrBatch2.Visible = True
|
'TrBatch2.Visible = True
|
||||||
GvM.Columns(11).Visible = True
|
GvM.Columns(11).Visible = True
|
||||||
End If
|
End If
|
||||||
@@ -2226,27 +2185,28 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
GvM.DataBind()
|
GvM.DataBind()
|
||||||
|
|
||||||
EscondeColumnasGVM(DtTemp)
|
EscondeColumnasGVM(DtTemp)
|
||||||
UppGrid.Update()
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
Private Sub EscondeColumnasGVM(DtTemp As DataTable)
|
||||||
'LblSerieLote.Visible = False
|
'LblSerie.Visible = False
|
||||||
TxtnSerieLote.Visible = False
|
TxtnSerie.Visible = False
|
||||||
divSerieLote.Visible = False
|
|
||||||
|
|
||||||
'TrSerieLote.Visible = False
|
'TrSerieLote.Visible = False
|
||||||
'TrSerieLote2.Visible = False
|
'TrSerieLote2.Visible = False
|
||||||
|
|
||||||
|
GvM.Columns(9).Visible = False
|
||||||
|
'PERMISO SOLO PARA EDITAR SERIELOTE
|
||||||
|
If UsuarioActual.TienePermisoProceso(245) Then
|
||||||
|
GvM.Columns(9).Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
TxtnLote.Visible = False
|
TxtnLote.Visible = False
|
||||||
divLote.Visible = False
|
|
||||||
'TrLote.Visible = False
|
'TrLote.Visible = False
|
||||||
'TrLote2.Visible = False
|
'TrLote2.Visible = False
|
||||||
GvM.Columns(10).Visible = False
|
GvM.Columns(10).Visible = False
|
||||||
|
|
||||||
TxtnBatch.Visible = False
|
'TxtnBatch.Visible = False
|
||||||
divBatch.Visible = False
|
|
||||||
'TrBatch.Visible = False
|
'TrBatch.Visible = False
|
||||||
'TrBatch2.Visible = False
|
'TrBatch2.Visible = False
|
||||||
GvM.Columns(11).Visible = False
|
'GvM.Columns(11).Visible = False
|
||||||
|
|
||||||
Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes = UsuarioActual.TienePermisoProceso(201)
|
||||||
tdPUExtranjero.Visible = False
|
tdPUExtranjero.Visible = False
|
||||||
@@ -2257,19 +2217,22 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
tdCI2.Visible = False
|
tdCI2.Visible = False
|
||||||
GvM.Columns(7).Visible = False
|
GvM.Columns(7).Visible = False
|
||||||
|
|
||||||
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
If DtTemp.SUM("PUExtranjero") > 0 Then
|
||||||
GvM.Columns(9).Visible = False
|
tdPUExtranjero.Visible = TienePermisoImportes
|
||||||
'PERMISO SOLO PARA EDITAR SERIELOTE
|
tdPUExtranjero2.Visible = TienePermisoImportes
|
||||||
If UsuarioActual.TienePermisoProceso(245) Then
|
GvM.Columns(6).Visible = TienePermisoImportes
|
||||||
GvM.Columns(9).Visible = True
|
End If
|
||||||
End If
|
|
||||||
Dim SerieLoteVal As Integer = DtTemp.FiltraParametros("LEN(SerieLote) > 0").Rows.Count()
|
|
||||||
GvM.Columns(9).Visible = False
|
|
||||||
If DtTemp.MAX("SerieLote").ToString <> "" Then
|
|
||||||
'LblSerieLote.Visible = True
|
|
||||||
TxtnSerieLote.Visible = True
|
|
||||||
divSerieLote.Visible = True
|
|
||||||
|
|
||||||
|
If DtTemp.SUM("CostoIndirecto") > 0 Then
|
||||||
|
tdCI.Visible = TienePermisoImportes
|
||||||
|
tdCI2.Visible = TienePermisoImportes
|
||||||
|
GvM.Columns(7).Visible = TienePermisoImportes
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DtTemp IsNot Nothing AndAlso DtTemp.Rows.Count > 0 Then
|
||||||
|
If DtTemp.MAX("Serie").ToString <> "" Then
|
||||||
|
'LblSerie.Visible = True
|
||||||
|
TxtnSerie.Visible = True
|
||||||
'TrSerieLote.Visible = True
|
'TrSerieLote.Visible = True
|
||||||
'TrSerieLote2.Visible = True
|
'TrSerieLote2.Visible = True
|
||||||
GvM.Columns(9).Visible = True
|
GvM.Columns(9).Visible = True
|
||||||
@@ -2277,29 +2240,34 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
If DtTemp.MAX("Lote").ToString <> "" Then
|
If DtTemp.MAX("Lote").ToString <> "" Then
|
||||||
TxtnLote.Visible = True
|
TxtnLote.Visible = True
|
||||||
divLote.Visible = True
|
|
||||||
'TrLote.Visible = True
|
'TrLote.Visible = True
|
||||||
'TrLote2.Visible = True
|
'TrLote2.Visible = True
|
||||||
GvM.Columns(10).Visible = True
|
GvM.Columns(10).Visible = True
|
||||||
|
|
||||||
TxtnBatch.Visible = True
|
'TxtnBatch.Visible = True
|
||||||
divBatch.Visible = True
|
|
||||||
'TrBatch.Visible = True
|
'TrBatch.Visible = True
|
||||||
'TrBatch2.Visible = True
|
'TrBatch2.Visible = True
|
||||||
|
'GvM.Columns(11).Visible = True
|
||||||
|
End If
|
||||||
|
If DtTemp.MAX("FechaCaducidad").ToString <> "" Then
|
||||||
|
|
||||||
GvM.Columns(11).Visible = True
|
GvM.Columns(11).Visible = True
|
||||||
|
|
||||||
|
'TxtnBatch.Visible = True
|
||||||
|
'TrBatch.Visible = True
|
||||||
|
'TrBatch2.Visible = True
|
||||||
|
'GvM.Columns(11).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtTemp.SUM("PUExtranjero") > 0 Then
|
|
||||||
tdPUExtranjero.Visible = TienePermisoImportes
|
|
||||||
tdPUExtranjero2.Visible = TienePermisoImportes
|
If DtTemp.MAX("CveSeccionAlmacen").ToString <> "" Then
|
||||||
GvM.Columns(6).Visible = TienePermisoImportes
|
'TxtnBatch.Visible = True
|
||||||
|
'TrBatch.Visible = True
|
||||||
|
'TrBatch2.Visible = True
|
||||||
|
GvM.Columns(12).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtTemp.SUM("CostoIndirecto") > 0 Then
|
|
||||||
tdCI.Visible = TienePermisoImportes
|
|
||||||
tdCI2.Visible = TienePermisoImportes
|
|
||||||
GvM.Columns(7).Visible = TienePermisoImportes
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2332,18 +2300,18 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
e.Row.FCTextBox("LblEditCodigo").Attributes.Add("onblur", String.Format("AFBlurEdit(this,{0},{1});", e.Row.FCHiddenField("HdnCveActivoFijo").ClientID, e.Row.FCHiddenField("HdnCodigoAF").ClientID))
|
e.Row.FCTextBox("LblEditCodigo").Attributes.Add("onblur", String.Format("AFBlurEdit(this,{0},{1});", e.Row.FCHiddenField("HdnCveActivoFijo").ClientID, e.Row.FCHiddenField("HdnCodigoAF").ClientID))
|
||||||
e.Row.FCImage("ImgAF").Attributes.Add("onclick", String.Format("AbrirVentana('/AF/PopUpBuscarAF.aspx?OPCION=OCE&RI={0}',950,600,'N');", e.Row.RowIndex))
|
e.Row.FCImage("ImgAF").Attributes.Add("onclick", String.Format("AbrirVentana('/AF/PopUpBuscarAF.aspx?OPCION=OCE&RI={0}',950,600,'N');", e.Row.RowIndex))
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(147) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(147) = "1" Then
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
' e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
' e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(e.Row.DBCampo("CveSeccionAlmacen"))
|
' e.Row.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(e.Row.DBCampo("CveSeccionAlmacen"))
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
'PERMISO SOLO PARA EDITAR OBSERVACIONES
|
'PERMISO SOLO PARA EDITAR OBSERVACIONES
|
||||||
If PermiteGuardarObservacionDetalle() Then
|
If PermiteGuardarObservacionDetalle() Then
|
||||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||||
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
||||||
e.Row.FCTextBox("TxtSerieLote").Enabled = False
|
e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = False
|
e.Row.FCTextBox("TxtLote").Enabled = False
|
||||||
e.Row.FCTextBox("TxtBatch").Enabled = False
|
e.Row.FCTextBox("TxtBatch").Enabled = False
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
||||||
@@ -2354,13 +2322,12 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If (CveMovimiento > 0) Or (TieneRelacionado > 0 Or CveMovimientoRelacionado > 0) Then 'CveMovimiento > 0 And e.Row.DBCampo("TienePrePoliza").ToEntero > 0
|
If (CveMovimiento > 0) Or (TieneRelacionado > 0 Or CveMovimientoRelacionado > 0) Then 'CveMovimiento > 0 And e.Row.DBCampo("TienePrePoliza").ToEntero > 0
|
||||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||||
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
e.Row.FCTextBox("LblEditCodigo").Enabled = False
|
||||||
e.Row.FCTextBox("TxtSerieLote").Enabled = False
|
e.Row.FCTextBox("TxtSerie").Enabled = False
|
||||||
e.Row.FCTextBox("TxtLote").Enabled = False
|
e.Row.FCTextBox("TxtLote").Enabled = False
|
||||||
e.Row.FCTextBox("TxtBatch").Enabled = False
|
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Enabled = False
|
||||||
e.Row.FCTextBox("txtPrecio").Enabled = False
|
e.Row.FCTextBox("txtPrecio").Enabled = False
|
||||||
End If
|
End If
|
||||||
e.Row.FCTextBox("TxtSerieLote").Enabled = True
|
e.Row.FCTextBox("TxtSerie").Enabled = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If EsNuevoMov Then
|
If EsNuevoMov Then
|
||||||
@@ -2372,34 +2339,34 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
'DEPENDE PERMISOS HABILITA
|
'DEPENDE PERMISOS HABILITA
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = PermiteEliminar()
|
e.Row.FCLinkButton("lnkRemove").Visible = PermiteEliminar()
|
||||||
e.Row.FCLinkButton("imgEd").Visible = PermiteGuardar()
|
e.Row.FCLinkButton("imgE").Visible = PermiteGuardar()
|
||||||
|
|
||||||
If e.Row.DBCampo("CountMovimientoEntradaDetalle").ToEntero > 0 Then
|
If e.Row.DBCampo("CountMovimientoEntradaDetalle").ToEntero > 0 Then
|
||||||
TieneSalida = True
|
TieneSalida = True
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = False
|
e.Row.FCLinkButton("lnkRemove").Visible = False
|
||||||
e.Row.FCLinkButton("imgEd").Visible = False
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'SI TIENE PREPOLIZAS NO PUEDE EDITAR NI ELIMINAR
|
'SI TIENE PREPOLIZAS NO PUEDE EDITAR NI ELIMINAR
|
||||||
If e.Row.DBCampo("TienePrePoliza").ToEntero > 0 Then
|
If e.Row.DBCampo("TienePrePoliza").ToEntero > 0 Then
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = False
|
e.Row.FCLinkButton("lnkRemove").Visible = False
|
||||||
e.Row.FCLinkButton("imgEd").Visible = False
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'APAGA TODO SI TIENE MOVIMIENTO RELACIONADO
|
'APAGA TODO SI TIENE MOVIMIENTO RELACIONADO
|
||||||
If TieneRelacionado > 0 Or CveMovimientoRelacionado > 0 Then
|
If TieneRelacionado > 0 Or CveMovimientoRelacionado > 0 Then
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = False
|
e.Row.FCLinkButton("lnkRemove").Visible = False
|
||||||
e.Row.FCLinkButton("imgEd").Visible = False
|
e.Row.FCLinkButton("imgE").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'PERMISO SOLO PARA EDITAR OBSERVACIONES
|
'PERMISO SOLO PARA EDITAR OBSERVACIONES
|
||||||
If PermiteGuardarObservacionDetalle() Then
|
If PermiteGuardarObservacionDetalle() Then
|
||||||
e.Row.FCLinkButton("imgEd").Visible = True
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'PERMISO SOLO PARA EDITAR SERIELOTE
|
'PERMISO SOLO PARA EDITAR SERIELOTE
|
||||||
If UsuarioActual.TienePermisoProceso(245) Then
|
If UsuarioActual.TienePermisoProceso(245) Then
|
||||||
e.Row.FCLinkButton("imgEd").Visible = True
|
e.Row.FCLinkButton("imgE").Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If EsNuevoMov Then
|
If EsNuevoMov Then
|
||||||
@@ -2414,14 +2381,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {e.Row.RowIndex}").SUMD("CantidadSeccionAlmacen") > 0 Then
|
|
||||||
e.Row.FCLinkButton("imgEd").Visible = False
|
|
||||||
e.Row.FCLinkButton("imgEd").ToolTip = "Cuenta con sección almacen"
|
|
||||||
e.Row.FCLinkButton("lnkRemove").Visible = False
|
|
||||||
e.Row.FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
|
||||||
e.Row.FCLinkButton("lnkDividir").Visible = False
|
|
||||||
e.Row.FCLinkButton("lnkDividir").ToolTip = "Cuenta con sección almacen"
|
|
||||||
End If
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -2442,7 +2401,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
||||||
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
||||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
||||||
TxtnSerieLote.Text = GvRow.DataKey("SerieLote")
|
TxtnSerie.Text = GvRow.DataKey("Serie")
|
||||||
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
|
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
|
||||||
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
|
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
|
||||||
LkAgregarDetalle.Text = "Actualizar"
|
LkAgregarDetalle.Text = "Actualizar"
|
||||||
@@ -2465,7 +2424,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
DdlUnidad.SelectedValue = GvRow.DataKey("CveUM")
|
||||||
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
CveAFEdit = GvRow.DataKey("CveAF").ToEntero
|
||||||
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
txtPrecio.Text = GvRow.DataKey("PU").ToDouble.FormatoNumero
|
||||||
TxtnSerieLote.Text = GvRow.DataKey("SerieLote")
|
TxtnSerie.Text = GvRow.DataKey("SerieLote")
|
||||||
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
|
TxtObservacionesdetalle.Text = GvRow.DataKey("Observaciones")
|
||||||
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
|
DdlSeccionAlmacen.SelectedValueExist(GvRow.DataKey("CveSeccionAlmacen"))
|
||||||
LkAgregarDetalle.Text = "Actualizar"
|
LkAgregarDetalle.Text = "Actualizar"
|
||||||
@@ -2473,6 +2432,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
RegistraScript("$('#ModalAgregar').modal()")
|
RegistraScript("$('#ModalAgregar').modal()")
|
||||||
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
CargaGVM(DtMovimientos.FiltraParametros("Estatus <> 'E' "))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub GvM_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvM.RowCancelingEdit
|
Protected Sub GvM_RowCancelingEdit(sender As Object, e As GridViewCancelEditEventArgs) Handles GvM.RowCancelingEdit
|
||||||
GvM.EditIndex = -1
|
GvM.EditIndex = -1
|
||||||
|
|
||||||
@@ -2482,7 +2442,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
Dim Precio As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDouble
|
Dim Precio As Double = GvM.Rows(e.RowIndex).FCTextBox("TxtPrecio").Text.ToDouble
|
||||||
Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
|
Dim No As Integer = GvM.Rows(e.RowIndex).DataKey("No").ToEntero
|
||||||
Dim serielote As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerieLote").Text.Replace(" ", String.Empty)
|
Dim serie As String = GvM.Rows(e.RowIndex).FCTextBox("TxtSerie").Text.Replace(" ", String.Empty)
|
||||||
Dim Observaciones As String = GvM.Rows(e.RowIndex).FCTextBox("TxtObservaciones").Text
|
Dim Observaciones As String = GvM.Rows(e.RowIndex).FCTextBox("TxtObservaciones").Text
|
||||||
Dim CveSeccionAlmacen As Integer = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
|
Dim CveSeccionAlmacen As Integer = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero
|
||||||
Dim SeccionAlmacen As String = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedItem.Text
|
Dim SeccionAlmacen As String = GvM.Rows(e.RowIndex).FCDropDownList("DdlSeccionAlmacen").SelectedItem.Text
|
||||||
@@ -2494,7 +2454,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Drs(0)("PU") = Precio
|
Drs(0)("PU") = Precio
|
||||||
Drs(0)("Total") = Drs(0)("Cantidad").ToString.ToDouble * Precio
|
Drs(0)("Total") = Drs(0)("Cantidad").ToString.ToDouble * Precio
|
||||||
Drs(0)("Estatus") = "U"
|
Drs(0)("Estatus") = "U"
|
||||||
Drs(0)("SerieLote") = serielote
|
Drs(0)("Serie") = serie
|
||||||
Drs(0)("Observaciones") = Observaciones
|
Drs(0)("Observaciones") = Observaciones
|
||||||
Drs(0)("CveSeccionAlmacen") = CveSeccionAlmacen
|
Drs(0)("CveSeccionAlmacen") = CveSeccionAlmacen
|
||||||
Drs(0)("SeccionAlmacen") = SeccionAlmacen
|
Drs(0)("SeccionAlmacen") = SeccionAlmacen
|
||||||
@@ -2995,7 +2955,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddNew(Dr("CvePS").ToString.ToEntero, Dr("PSCodigo").ToString, Dr("CveUM").ToString.ToEntero, Dr("UnidadMedida").ToString, 1, Dr("CostoPromedio").ToString.ToDouble, "", "", "", "", "", "", "", -1, "")
|
AddNew(Dr("CvePS").ToString.ToEntero, Dr("PSCodigo").ToString, Dr("CveUM").ToString.ToEntero, Dr("UnidadMedida").ToString, 1, Dr("CostoPromedio").ToString.ToDouble, "", "", "", "", "", "", MinFecha, -1, "")
|
||||||
|
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
TxtCodigoPS.Focus()
|
TxtCodigoPS.Focus()
|
||||||
@@ -3007,7 +2967,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
AddNew(CvePSSerieLote, PSSerieLote, CveUMSerieLote, UMSerieLote, 1, 0, TxtSeriePS.Text.Trim, "", "", "", "", "", "", -1, "")
|
AddNew(CvePSSerieLote, PSSerieLote, CveUMSerieLote, UMSerieLote, 1, 0, TxtSeriePS.Text.Trim, "", "", "", "", "", MinFecha, -1, "")
|
||||||
|
|
||||||
TdSeriePSAdd.Visible = False
|
TdSeriePSAdd.Visible = False
|
||||||
TxtSeriePS.Text = ""
|
TxtSeriePS.Text = ""
|
||||||
@@ -3321,7 +3281,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
#Region "DDL CLIENTE / CLIENTE SUCURSAL - SELECTED INDEX CHANGED"
|
||||||
Private Sub InicializaClientes()
|
Private Sub InicializaClientes()
|
||||||
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then
|
If UsuarioActual.CveEmpresa.Contiene(72, 80) AndAlso CveMovimiento <= 0 Then
|
||||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa)
|
||||||
DdlClientes.DataBind()
|
DdlClientes.DataBind()
|
||||||
|
|
||||||
@@ -3909,7 +3869,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
#Region "DESCARGAR E IMPRIMIR LISTADO"
|
#Region "DESCARGAR E IMPRIMIR LISTADO"
|
||||||
Public Sub DescargarFormato()
|
Public Sub DescargarFormato()
|
||||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & "Empresas\Grales\Formatos\FormatoEntradasSalidas.xlsx"
|
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & "Empresas\Grales\Formatos\FormatoEntradasSalidas.xlsx"
|
||||||
|
|
||||||
Dim Archivo As New IO.FileInfo(Directorio)
|
Dim Archivo As New IO.FileInfo(Directorio)
|
||||||
If Archivo.Exists Then
|
If Archivo.Exists Then
|
||||||
@@ -4065,7 +4025,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb", "xls"), "EXCEL", "CSV")
|
||||||
CargarArchivo(Directorio, file.filename, Tipo)
|
CargarArchivo(Directorio, file.filename, Tipo)
|
||||||
Else
|
Else
|
||||||
@@ -4116,125 +4076,125 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
LnkAgregarNuevoMov.Visible = False
|
LnkAgregarNuevoMov.Visible = False
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region "SECCION ALMACEN"
|
'#Region "SECCION ALMACEN"
|
||||||
Private Sub CreaDtSeccionAlmacen()
|
' Private Sub CreaDtSeccionAlmacen()
|
||||||
DtSeccionAlmacen = New DataTable
|
' DtSeccionAlmacen = New DataTable
|
||||||
DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
' DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
||||||
DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacen", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("CveSeccionAlmacen", GetType(Integer))
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacen", GetType(String))
|
' DtSeccionAlmacen.Columns.Add("SeccionAlmacen", GetType(String))
|
||||||
DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
||||||
End Sub
|
' End Sub
|
||||||
Private Sub CargaDdlAlmacen()
|
' Private Sub CargaDdlAlmacen()
|
||||||
DdlSeccionAlmacenModal.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
' DdlSeccionAlmacenModal.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||||
DdlSeccionAlmacenModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
' DdlSeccionAlmacenModal.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
DdlSeccionAlmacenModal.DataBind()
|
' DdlSeccionAlmacenModal.DataBind()
|
||||||
End Sub
|
' End Sub
|
||||||
Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
' Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
If Not DdlConcepto.SelectedValue.ToEntero > 0 Then
|
' If Not DdlConcepto.SelectedValue.ToEntero > 0 Then
|
||||||
Alert("Tiene que seleccionar un concepto", TipoMensaje.MsgAdvertencia)
|
' Alert("Tiene que seleccionar un concepto", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
Tipo = GlobalDTInvConceptos().FiltroPrimeroValor("Origen", $"CveConcepto = {DdlConcepto.SelectedValue}").ToEntero
|
' Tipo = GlobalDTInvConceptos().FiltroPrimeroValor("Origen", $"CveConcepto = {DdlConcepto.SelectedValue}").ToEntero
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
CantidadTotal = gvRow.DataKey("Cantidad").ToDecimal
|
' CantidadTotal = gvRow.DataKey("Cantidad").ToDecimal
|
||||||
IndexSeccionAlmacen = gvRow.RowIndex
|
' IndexSeccionAlmacen = gvRow.RowIndex
|
||||||
CargaSeccionAlmacen()
|
' CargaSeccionAlmacen()
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
' RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
||||||
End Sub
|
' End Sub
|
||||||
|
|
||||||
Private Sub CargaSeccionAlmacen()
|
' Private Sub CargaSeccionAlmacen()
|
||||||
Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
' Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
||||||
GvSeccionAlmacen.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}")
|
' GvSeccionAlmacen.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}")
|
||||||
GvSeccionAlmacen.DataBind()
|
' GvSeccionAlmacen.DataBind()
|
||||||
|
|
||||||
TxtCantidadSeccion.Text = ""
|
' TxtCantidadSeccion.Text = ""
|
||||||
DdlSeccionAlmacenModal.SelectedIndex = 0
|
' DdlSeccionAlmacenModal.SelectedIndex = 0
|
||||||
Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
' Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
||||||
If CantidadRestante = 0 Then
|
' If CantidadRestante = 0 Then
|
||||||
RVTxtCantidad.MaximumValue = "1"
|
' RVTxtCantidad.MaximumValue = "1"
|
||||||
TxtCantidadSeccion.Enabled = False
|
' TxtCantidadSeccion.Enabled = False
|
||||||
Else
|
' Else
|
||||||
RVTxtCantidad.MaximumValue = CantidadRestante.ToString
|
' RVTxtCantidad.MaximumValue = CantidadRestante.ToString
|
||||||
TxtCantidadSeccion.Enabled = True
|
' TxtCantidadSeccion.Enabled = True
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If CantidadTotalSeccion > 0 Then
|
' If CantidadTotalSeccion > 0 Then
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgEd").Visible = False
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgE").Visible = False
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgEd").ToolTip = "Cuenta con sección almacen"
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgE").ToolTip = "Cuenta con sección almacen"
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = False
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = False
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").Visible = False
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").Visible = False
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").ToolTip = "Cuenta con sección almacen"
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").ToolTip = "Cuenta con sección almacen"
|
||||||
Else
|
' Else
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgEd").Visible = True
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgE").Visible = True
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgEd").ToolTip = ""
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("imgE").ToolTip = ""
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = True
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = True
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = ""
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = ""
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").Visible = True
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").Visible = True
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").ToolTip = ""
|
' GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkDividir").ToolTip = ""
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 AndAlso Tipo = -1 Then
|
' If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 AndAlso Tipo = -1 Then
|
||||||
DdlAlmacen.Enabled = False
|
' DdlAlmacen.Enabled = False
|
||||||
DdlAlmacen.ToolTip = "Cuenta con sección almacen"
|
' DdlAlmacen.ToolTip = "Cuenta con sección almacen"
|
||||||
Else
|
' Else
|
||||||
DdlAlmacen.Enabled = True
|
' DdlAlmacen.Enabled = True
|
||||||
DdlAlmacen.ToolTip = ""
|
' DdlAlmacen.ToolTip = ""
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
UpModalSeccionAlmacen.Update()
|
' UpModalSeccionAlmacen.Update()
|
||||||
UppGrid.Update()
|
' UppGrid.Update()
|
||||||
End Sub
|
' End Sub
|
||||||
|
|
||||||
Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
' Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
If Tipo = -1 Then
|
' If Tipo = -1 Then
|
||||||
Dim ObjInv As New ClsInventarios
|
' Dim ObjInv As New ClsInventarios
|
||||||
Dim CantidadDisponible As Decimal = 0
|
' Dim CantidadDisponible As Decimal = 0
|
||||||
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlSeccionAlmacenModal.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero,
|
' If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlSeccionAlmacenModal.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero,
|
||||||
CvePS, UsuarioActual.CveEmpresa) Then
|
' CvePS, UsuarioActual.CveEmpresa) Then
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
' If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString.ToDecimal
|
' CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString.ToDecimal
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
ObjInv.Dispose()
|
' ObjInv.Dispose()
|
||||||
|
|
||||||
CantidadDisponible -= DtSeccionAlmacen.FiltraParametros($"CvePS = {CvePS} AND CveSeccionAlmacen = {DdlSeccionAlmacenModal.SelectedValue}").SUMD("CantidadSeccionAlmacen")
|
' CantidadDisponible -= DtSeccionAlmacen.FiltraParametros($"CvePS = {CvePS} AND CveSeccionAlmacen = {DdlSeccionAlmacenModal.SelectedValue}").SUMD("CantidadSeccionAlmacen")
|
||||||
|
|
||||||
If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
' If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
||||||
Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
' Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
' End If
|
||||||
End If
|
' End If
|
||||||
|
|
||||||
Dim Row As DataRow = Nothing
|
' Dim Row As DataRow = Nothing
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
' DtSeccionAlmacen.AcceptChanges()
|
||||||
Row = DtSeccionAlmacen.NewRow
|
' Row = DtSeccionAlmacen.NewRow
|
||||||
Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
' Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
||||||
Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
' Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
||||||
Row("CveSeccionAlmacen") = DdlSeccionAlmacenModal.SelectedValue.ToEntero
|
' Row("CveSeccionAlmacen") = DdlSeccionAlmacenModal.SelectedValue.ToEntero
|
||||||
Row("SeccionAlmacen") = DdlSeccionAlmacenModal.SelectedItem.Text
|
' Row("SeccionAlmacen") = DdlSeccionAlmacenModal.SelectedItem.Text
|
||||||
Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
' Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
||||||
DtSeccionAlmacen.Rows.Add(Row)
|
' DtSeccionAlmacen.Rows.Add(Row)
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
' DtSeccionAlmacen.AcceptChanges()
|
||||||
CargaSeccionAlmacen()
|
' CargaSeccionAlmacen()
|
||||||
End Sub
|
' End Sub
|
||||||
|
|
||||||
Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
' Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
Dim Index As Integer = 0
|
' Dim Index As Integer = 0
|
||||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
' For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
||||||
If Dr("Consec").ToString.ToEntero = gvRow.DataKey("Consec").ToEntero() Then
|
' If Dr("Consec").ToString.ToEntero = gvRow.DataKey("Consec").ToEntero() Then
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Index += 1
|
' Index += 1
|
||||||
Next
|
' Next
|
||||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
' DtSeccionAlmacen.Rows.RemoveAt(Index)
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
' DtSeccionAlmacen.AcceptChanges()
|
||||||
CargaSeccionAlmacen()
|
' CargaSeccionAlmacen()
|
||||||
End Sub
|
' End Sub
|
||||||
|
|
||||||
#End Region
|
'#End Region
|
||||||
|
|
||||||
Protected Sub LkAgregar_Click() Handles LkAgregar.Click
|
Protected Sub LkAgregar_Click() Handles LkAgregar.Click
|
||||||
limpiarModalDetalle()
|
limpiarModalDetalle()
|
||||||
@@ -4245,10 +4205,11 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
Private Sub ActualizarPS()
|
Private Sub ActualizarPS()
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDouble, DdlUnidad.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDouble, CveAFEdit,
|
If Not ObjInventario.UpdateMovimientoDetalle(txtCantidad.Text.ToDouble, DdlUnidad.ToEntero, DdlProducto2.SelectedValue.ToEntero, txtPrecio.Text.ToDouble, CveAFEdit,
|
||||||
CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerieLote.Text, TxtObservacionesdetalle.Text,
|
CveMovimientoDetalleEdit, DdlSeccionAlmacen.SelectedValue.ToEntero, TxtnSerie.Text, TxtObservacionesdetalle.Text,
|
||||||
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Alert("Error al Actualizar los movimientos")
|
Alert("Error al Actualizar los movimientos")
|
||||||
End If
|
End If
|
||||||
|
ObjInventario.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub limpiarModalDetalle()
|
Private Sub limpiarModalDetalle()
|
||||||
@@ -4261,7 +4222,7 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
DdlProducto2.SelectedText = ""
|
DdlProducto2.SelectedText = ""
|
||||||
ElProductoChange()
|
ElProductoChange()
|
||||||
txtPrecio.Text = ""
|
txtPrecio.Text = ""
|
||||||
TxtnSerieLote.Text = ""
|
TxtnSerie.Text = ""
|
||||||
TxtObservacionesdetalle.Text = ""
|
TxtObservacionesdetalle.Text = ""
|
||||||
DdlSeccionAlmacen.SelectedValue = "-1"
|
DdlSeccionAlmacen.SelectedValue = "-1"
|
||||||
LkAgregarDetalle.Text = "Agregar"
|
LkAgregarDetalle.Text = "Agregar"
|
||||||
@@ -4273,4 +4234,6 @@ Partial Class Inventarios_EntradasSalidas
|
|||||||
|
|
||||||
UpAgregar.Update()
|
UpAgregar.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RecepcionEntrega.aspx.vb" Inherits="Inventarios_RecepcionEntrega" %>
|
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="EntregaAlmacen.aspx.vb" Inherits="Inventarios_EntregaAlmacen" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
@@ -275,7 +275,7 @@
|
|||||||
<asp:TextBox ID="TxtFechaPendientes" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpPendientes" Width="70px" ClientIDMode="Static"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaPendientes" runat="server" CausesValidation="true" MaxLength="10" ValidationGroup="GrpPendientes" Width="70px" ClientIDMode="Static"></asp:TextBox>
|
||||||
<asp:LinkButton ID="ImgFechaPendientes" Style="background-color: white;" class="btn default " Text="<i style='width:16px; height:16px;' class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaPendientes" Style="background-color: white;" class="btn default " Text="<i style='width:16px; height:16px;' class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaPendientes" runat="server" TargetControlID="TxtFechaPendientes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaPendientes" runat="server" TargetControlID="TxtFechaPendientes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaPendientes" TargetControlID="TxtFechaPendientes" PopupButtonID="ImgFechaPendientes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFechaPendientes" TargetControlID="TxtFechaPendientes" PopupButtonID="ImgFechaPendientes" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPendientes"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> es necesario, por favor ingréselo." ValidationGroup="GrpPendientes"></asp:RequiredFieldValidator>
|
||||||
<asp:CompareValidator ID="CVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpPendientes"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Fecha''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpPendientes"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFecha1Pendientes" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPendientes" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFecha1Pendientes" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPendientes" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -408,14 +408,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<div class="btn-group pull-right">
|
|
||||||
<asp:Button ID="LnkVerSecciones" CssClass="btn green-haze btn-outline btn-circle btn-sm" OnClick="LnkVerSecciones_Click" runat="server" Text="Ver Secciones" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<div class="btn-group pull-right">
|
<div class="btn-group pull-right">
|
||||||
@@ -426,7 +418,7 @@
|
|||||||
|
|
||||||
<%--GV DATOS--%>
|
<%--GV DATOS--%>
|
||||||
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
<asp:GridView ID="GvDatos" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowFooter="True" ShowHeader="true" ShowHeaderWhenEmpty="True"
|
||||||
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
DataKeyNames="Consec,CvePS,Codigo,CodigoBarras,AplicaSerieLote,CveUM,CantidadC,CantidadF,UM,PS,CveClasificacion,CveVentaDetalle,CveTamaño,AplicaSeccion, AplicaSerie,AplicaLote,AplicaCaducidad" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD gvInventario mysmallbtn" data-heighterror="450" data-freezerows="1" GridLines="None">
|
||||||
<HeaderStyle Height="58px" />
|
<HeaderStyle Height="58px" />
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -436,62 +428,18 @@
|
|||||||
<ItemStyle HorizontalAlign="Center" Width="5%" />
|
<ItemStyle HorizontalAlign="Center" Width="5%" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Cant. Venta" DataField="CantidadC" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||||
<%--<asp:TemplateField HeaderText="Cantidad Venta" ItemStyle-Width="10%" HeaderStyle-HorizontalAlign="Right">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="lbCantidadC" runat="server" Width="60px" ClientIDMode="Static"
|
|
||||||
Mask="9,999.99" Text='<%# Eval("CantidadC", "{0:N2}")%>'>
|
|
||||||
</asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
<HeaderStyle CssClass="Titulos" />
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Cant. Surtida" DataField="CantidadS" DataFormatString="{0:#,##0.######}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||||
<asp:TemplateField HeaderText="Cant. a Surtir" ItemStyle-Width="10%">
|
<asp:TemplateField HeaderText="Cant. a Surtir" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" Text="0"></asp:TextBox>
|
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" Text='<%# Eval("CantidadF") %>'></asp:TextBox>
|
||||||
<asp:Button Text="Serie" ID="BtnSerieLote" OnClick="BtnSerieLote_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-xs" runat="server" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<HeaderStyle CssClass="Titulos" />
|
<HeaderStyle CssClass="Titulos" />
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" />
|
||||||
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
|
<asp:HyperLinkField HeaderText="Producto o Servicio" Target="_blank" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="35%" />
|
||||||
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Observación" DataField="ObservacionesDetalle" ItemStyle-Width="7.5%" />
|
||||||
<%--<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="10%" />--%>
|
|
||||||
<%--<asp:TemplateField HeaderText="Almacén">
|
|
||||||
<HeaderStyle HorizontalAlign="Left" />
|
|
||||||
<HeaderTemplate>
|
|
||||||
<div style="padding-left: 24px; font-size: 12px;">
|
|
||||||
<asp:Label ID="lbAlmacen" runat="server" Text="Almacén"></asp:Label>
|
|
||||||
<div style="padding-top: 5px">
|
|
||||||
<asp:DropDownList ID="ddlPAlmacen" runat="server" Style="vertical-align: middle;" Width="100px" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList>
|
|
||||||
<asp:ImageButton ID="ImgAlmacen" runat="server" ToolTip="Aplicar Almacen" OnClick="ImgAlmacen_Click" ImageUrl="/Imagenes/abajo.png" Style="vertical-align: middle;" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</HeaderTemplate>
|
|
||||||
<ItemTemplate>
|
|
||||||
<div style="padding-left: 5px">
|
|
||||||
<asp:DropDownList ID="ddlEAlmacen" runat="server" Width="100px" DataTextField="Almacen" DataValueField="CveAlmacen"></asp:DropDownList></td>
|
|
||||||
</div>
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle Width="15%"></ItemStyle>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
<%--<asp:TemplateField>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Image ID="btnImgDestino" runat="server" ToolTip="Asigna una cantidad a otro Almacén " AlternateText="" ImageUrl="~/Imagenes/transfer.png" />
|
|
||||||
</ItemTemplate>
|
|
||||||
<ItemStyle HorizontalAlign="Center" Width="5%" />
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
<%--<asp:BoundField HeaderText="Sección Almacén" DataField="" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />--%>
|
|
||||||
<asp:TemplateField HeaderText="Sección Almacén">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LBSeccionAlmacen" Text="Ver Sección Almacén" OnClick="LBSeccionAlmacen_Click" runat="server" />
|
|
||||||
<%--<asp:Label Text="1 <br/> 2 <br/> 3 <br/> 4 <br/>" runat="server" ID="LbSeccionAlmacen"></asp:Label>--%>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -508,7 +456,7 @@
|
|||||||
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
<asp:TemplateField HeaderText="Caducidad" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px;">
|
||||||
<asp:TextBox ID="TxtCaducidad" CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox>
|
<asp:TextBox ID="TxtCaducidad" Text='<%# Eval("Caducidad") %>' CssClass="form-control input-sm ADSMaskDate" Style="width: 118px" runat="server" Visible="false"></asp:TextBox>
|
||||||
<span class="input-group-btn ">
|
<span class="input-group-btn ">
|
||||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
@@ -549,64 +497,6 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacen" runat="server" ControlToValidate="DdlSeccionAlmacen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacen"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacen:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccion" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacen" HeaderText="Sección Almacen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<%--AGREGA POR SERIE--%>
|
<%--AGREGA POR SERIE--%>
|
||||||
<div id="DivSerie" class="modal ADS fade" role="dialog">
|
<div id="DivSerie" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
@@ -637,11 +527,11 @@
|
|||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td width="80px">Serie/Lote:</td>
|
<td width="80px">Serie:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox runat="server" ID="TxtSerieLote" ClientIDMode="Static" Width="200px" />
|
<asp:TextBox runat="server" ID="TxtSerie" ClientIDMode="Static" Width="200px" />
|
||||||
<asp:RequiredFieldValidator ID="RFVSerieLote" runat="server" ControlToValidate="TxtSerieLote" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie/Lote''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCESerieLote" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerieLote" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</td>
|
</td>
|
||||||
<td width="80px" runat="server" id="TdCaducidad1">Fecha Caducidad:</td>
|
<td width="80px" runat="server" id="TdCaducidad1">Fecha Caducidad:</td>
|
||||||
<td runat="server" id="TdCaducidad2">
|
<td runat="server" id="TdCaducidad2">
|
||||||
@@ -658,7 +548,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td colspan="3">
|
<td colspan="3">
|
||||||
<code>
|
<code>
|
||||||
<asp:Label ID="LbSerieLoteRecomendado" Text="Serie/Lote Recomendado: <b>PS2505</b>, Caducicdad: <b>25/04/2016</b>" runat="server" />
|
<asp:Label ID="LbSerieRecomendado" Text="Serie/Lote Recomendado: <b>PS2505</b>, Caducicdad: <b>25/04/2016</b>" runat="server" />
|
||||||
</code>
|
</code>
|
||||||
</td>
|
</td>
|
||||||
<td align="right">
|
<td align="right">
|
||||||
@@ -667,9 +557,9 @@
|
|||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="4">
|
<td colspan="4">
|
||||||
<asp:GridView ID="GvSerie" DataKey="SerieLote" DataKeyNames="SerieLote" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="100" data-freezerows="1" GridLines="None">
|
<asp:GridView ID="GvSerie" DataKey="Serie" DataKeyNames="Serie" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="100" data-freezerows="1" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Serie-Folio" DataField="SerieLote" ItemStyle-Width="40%" />
|
<asp:BoundField HeaderText="Serie-Folio" DataField="Serie" ItemStyle-Width="40%" />
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="40%" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="40%" />
|
||||||
<asp:TemplateField HeaderText="Eliminar">
|
<asp:TemplateField HeaderText="Eliminar">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -765,7 +655,6 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
|
||||||
<asp:BoundField HeaderText="Folio" DataField="Lote" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Folio" DataField="Lote" ItemStyle-Width="20%" />
|
||||||
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="20%" />
|
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="20%" />
|
||||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -871,57 +760,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<%--MODAL SECCION ALMACEN--%>
|
|
||||||
<div id="ModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel ID="UpSeccionAlmacen" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Seccion Almacén</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:GridView ID="GVSeccionAlmacen" runat="server" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" RowStyle-Height="25px" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField HeaderText="Seccion" DataField="Seccion" ItemStyle-Width="30%" />
|
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="40%" DataFormatString="{0:d}" />
|
|
||||||
<asp:BoundField HeaderText="Existencia" DataField="Existencia" ItemStyle-Width="30%" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button id="CancelarSeccionAlmacen" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="ModalVerSeccionesAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel ID="UpVerSeccionesAlmacen" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header">
|
|
||||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
|
||||||
<h4 class="modal-title">Sección Almacen</h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<asp:GridView ID="GvVerSeccionesAlmacen" runat="server" EmptyDataText="No se encontraron registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall ScrollAD" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left"/>
|
|
||||||
<asp:BoundField HeaderText="Sección Almacen" DataField="AlmacenSeccion" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:#,###.##}" ItemStyle-HorizontalAlign="Right" />
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<button id="CancelarVerSeccionesAlmacen" type="button" class="btn btn-default" data-dismiss="modal">Cerrar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<div id="ModalVerSugerencias" class="modal ADS fade" role="dialog">
|
<div id="ModalVerSugerencias" class="modal ADS fade" role="dialog">
|
||||||
<asp:UpdatePanel ID="UpVerSugerencias" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpVerSugerencias" class="modal-dialog rowpadding" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
File diff suppressed because it is too large
Load Diff
@@ -374,17 +374,29 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="100px"></ItemStyle>
|
<ItemStyle Width="100px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Serie/Lote" Visible="false">
|
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Sección" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lbSL" runat="server" Text='<%# Eval("SerieLote")%>'></asp:Literal>
|
<asp:Literal ID="lbSA" runat="server" Text='<%# Eval("SeccionAlmacen")%>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="100px"></ItemStyle>
|
<ItemStyle Width="100px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Serie" Visible="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="lbS" runat="server" Text='<%# Eval("Serie")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="100px"></ItemStyle>
|
||||||
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Left" HeaderText="Lote" Visible="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="lbL" runat="server" Text='<%# Eval("Lote")%>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
<ItemStyle Width="70"></ItemStyle>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center" HeaderText="F. Caducidad" Visible="false">
|
<asp:TemplateField ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center" HeaderText="F. Caducidad" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Label ID="lbFCad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}")%>' data-toggle="tooltip"></asp:Label>
|
<asp:Label ID="lbFCad" runat="server" Text='<%# Eval("FechaCaducidad", "{0:d}")%>' data-toggle="tooltip"></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="100px"></ItemStyle>
|
<ItemStyle Width="75px"></ItemStyle>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" HeaderText="Entrada">
|
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Right" HeaderText="Entrada">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -34,11 +34,6 @@ Partial Class Inventarios_Kardex
|
|||||||
CargaCombos()
|
CargaCombos()
|
||||||
ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
ddlAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
If Not UsuarioActual.CveEmpresa.Contiene(4, 7, 11, 12, 13, 66) Then
|
|
||||||
GvM.Columns(6).Visible = True ' SerieLote
|
|
||||||
GvM.Columns(7).Visible = True ' FCaducidad
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.TienePermisoProceso(258) Then GvM.Columns(1).Visible = True
|
If UsuarioActual.TienePermisoProceso(258) Then GvM.Columns(1).Visible = True
|
||||||
|
|
||||||
ddlAlmacen.SelectedValue = If(Request("CveAlmacen") IsNot Nothing, Request("CveAlmacen").ToString, "-1")
|
ddlAlmacen.SelectedValue = If(Request("CveAlmacen") IsNot Nothing, Request("CveAlmacen").ToString, "-1")
|
||||||
@@ -69,9 +64,9 @@ Partial Class Inventarios_Kardex
|
|||||||
|
|
||||||
Private Sub CargaPermisos()
|
Private Sub CargaPermisos()
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
GvM.Columns(11).Visible = TienePermisoImportes ' costo
|
GvM.Columns(13).Visible = TienePermisoImportes ' costo
|
||||||
GvM.Columns(12).Visible = TienePermisoImportes ' importe
|
GvM.Columns(14).Visible = TienePermisoImportes ' importe
|
||||||
GvM.Columns(14).Visible = TienePermisoImportes ' valor
|
GvM.Columns(16).Visible = TienePermisoImportes ' valor
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function isWithFamily() As Boolean
|
Private Function isWithFamily() As Boolean
|
||||||
@@ -197,6 +192,16 @@ Partial Class Inventarios_Kardex
|
|||||||
If CveProducto > 0 Then
|
If CveProducto > 0 Then
|
||||||
Dim DtTemp = CargarKardex(CveProducto)
|
Dim DtTemp = CargarKardex(CveProducto)
|
||||||
If DtTemp IsNot Nothing Then
|
If DtTemp IsNot Nothing Then
|
||||||
|
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
|
||||||
|
AplicaSerie = DtTemp.MAX("Serie") <> ""
|
||||||
|
AplicaSeccion = DtTemp.MAX("SeccionAlmacen") <> ""
|
||||||
|
AplicaLote = DtTemp.MAX("Lote") <> ""
|
||||||
|
AplicaCaducidad = DtTemp.MAX("FechaCaducidad") <> ""
|
||||||
|
If AplicaSeccion Then GvM.Columns(7).Visible = True
|
||||||
|
If AplicaSerie Then GvM.Columns(8).Visible = True
|
||||||
|
If AplicaLote Then GvM.Columns(9).Visible = True
|
||||||
|
If AplicaCaducidad Then GvM.Columns(10).Visible = True
|
||||||
|
|
||||||
'CARGA INDICADORES
|
'CARGA INDICADORES
|
||||||
If UsuarioActual.TienePermisoProceso(201) Then
|
If UsuarioActual.TienePermisoProceso(201) Then
|
||||||
DivIndicadores.Visible = True
|
DivIndicadores.Visible = True
|
||||||
|
|||||||
@@ -1,140 +0,0 @@
|
|||||||
<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="KardexSeccionAlmacen.aspx.vb" Inherits="Inventarios_KardexSeccionAlmacen" %>
|
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
|
||||||
Kardex Secciones de Almacen
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content4" ContentPlaceHolderID="HB" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="HA" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="C" runat="Server">
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpFiltros" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
|
||||||
<div class="portlet-title portlet-filterT smalltitle">
|
|
||||||
<div class="tools">
|
|
||||||
<asp:Button ID="BtnConsultar" OnClick="BtnConsultar_Click" runat="server" Text="Consultar" class="btn btn-primary" />
|
|
||||||
<a href="javascript:;" class="expand"></a>
|
|
||||||
</div>
|
|
||||||
<div class="titlefiltros caption">
|
|
||||||
<div class="row">
|
|
||||||
<label class="col-md-1 ">Producto/Servicio:</label>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" style="width: 100%;" CssClass=" DdlPS" IncluyeTodos="false" CssClassDdl="select2me form-control" DataTextField="PSCodigo" DataValueField="CvePS" />
|
|
||||||
</div>
|
|
||||||
<label class="col-md-1 ">Almacen:</label>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:DropDownList ID="DdlAlmacen" runat="server" AppendDataBoundItems="true" DataTextField="Almacen" DataValueField="CveAlmacen" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
<label class="col-md-1 ">Sección Almacen:</label>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" runat="server" AppendDataBoundItems="true" DataTextField="Seccion" DataValueField="CveSeccion" Class="table-group-action-input form-control input-inline input-sm select2me" Width="100%">
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="portlet-body">
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="row" style="margin-right: 10px; margin-top: 18px;" align="right">
|
|
||||||
<input type="text" id="TxtBusqueda" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
|
||||||
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusqueda','{0}')", GvDatos.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
|
||||||
</div>
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
EmptyDataText="No se han encontrado datos con los filtros seleccionados"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
|
||||||
DataKeyNames="Existencia,CveAlmacenSeccion,AlmacenSeccion,CvePS,CveAlmacen,CveSubProyecto,CveUM,SerieLote" >
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="AlmacenSeccion" ItemStyle-HorizontalAlign="Left" HeaderText="Sección Almacen" />
|
|
||||||
<asp:BoundField DataField="SerieLote" ItemStyle-HorizontalAlign="Left" HeaderText="SerieLote" />
|
|
||||||
<asp:BoundField DataField="Existencia" ItemStyle-HorizontalAlign="Right" HeaderText="Existencia" DataFormatString="{0:N2}" />
|
|
||||||
<asp:TemplateField HeaderText="Traspaso" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-8" runat="server" id="DivSeccionAlmacenDestino" >
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenDestino" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenDestino" runat="server" ControlToValidate="DdlSeccionAlmacenDestino" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Destino''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VceSeccionAlmacenDestino" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenDestino"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenDestino.ClientID.ToString()%>">Sección Almacen Destino:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccion" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenOrigen" HeaderText="Sección Almacen Origen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenDestino" HeaderText="Sección Almacen Destino" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="modal-footer">
|
|
||||||
<asp:Button ID="BtnTraspasar" OnClick="BtnTraspasar_Click" runat="server" Text="Traspasar" CssClass="btn btn-primary" ValidationGroup="VgmTraspasar" />
|
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal">Cancelar</button>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
</asp:Content>
|
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
|
||||||
</asp:Content>
|
|
||||||
|
|
||||||
@@ -1,337 +0,0 @@
|
|||||||
Option Strict On
|
|
||||||
Imports System.Data
|
|
||||||
Imports System.Collections.Generic
|
|
||||||
Imports System.Linq
|
|
||||||
Imports System.Web
|
|
||||||
Imports System.Web.UI.WebControls
|
|
||||||
Imports Extensiones
|
|
||||||
Partial Class Inventarios_KardexSeccionAlmacen
|
|
||||||
Inherits ClsPaginas
|
|
||||||
|
|
||||||
|
|
||||||
#Region "PROPIEDADES"
|
|
||||||
|
|
||||||
Private Property DtSeccionAlmacen As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("DtSeccionAlmacen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CantidadTotal As Decimal
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CantidadTotal"), Decimal)
|
|
||||||
End Get
|
|
||||||
Set(value As Decimal)
|
|
||||||
ViewState("CantidadTotal") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CvePS As Integer
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CvePS"), Integer)
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("CvePS") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CveSeccionAlmacenOrigen As Integer
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CveSeccionAlmacenOrigen"), Integer)
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("CveSeccionAlmacenOrigen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property SeccionAlmacenOrigen As String
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("SeccionAlmacenOrigen"), String)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
ViewState("SeccionAlmacenOrigen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CveAlmacen As Integer
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CveAlmacen"), Integer)
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("CveAlmacen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CveUM As Integer
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CveUM"), Integer)
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("CveUM") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property CveSubProyecto As Integer
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("CveSubProyecto"), Integer)
|
|
||||||
End Get
|
|
||||||
Set(value As Integer)
|
|
||||||
ViewState("CveSubProyecto") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
Private Property SerieLote As String
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("SerieLote"), String)
|
|
||||||
End Get
|
|
||||||
Set(value As String)
|
|
||||||
ViewState("SerieLote") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load
|
|
||||||
If Not IsPostBack Then
|
|
||||||
InicializaValores()
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#Region "CARGAS"
|
|
||||||
|
|
||||||
Private Sub InicializaValores()
|
|
||||||
CantidadTotal = 0
|
|
||||||
SeccionAlmacenOrigen = ""
|
|
||||||
CvePS = 0
|
|
||||||
CveAlmacen = 0
|
|
||||||
CveSeccionAlmacenOrigen = 0
|
|
||||||
CveSubProyecto = 0
|
|
||||||
CveUM = 0
|
|
||||||
SerieLote = ""
|
|
||||||
|
|
||||||
CreaDtSeccionAlmacen()
|
|
||||||
CargaDdlAlmacen()
|
|
||||||
CargaPS()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaPS()
|
|
||||||
DdlPS.setEsWebService(UsuarioActual.Empresa.Funcionalidad(105) = "1")
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
|
||||||
DdlPS.ddlWS.Attributes.Add("data-cveclasificacion", "-1")
|
|
||||||
DdlPS.SelectedText = "Seleccione"
|
|
||||||
DdlPS.SelectedValue = "-1"
|
|
||||||
Else
|
|
||||||
DdlPS.ddl.Items.Clear()
|
|
||||||
DdlPS.ddl.DataSource = GlobalDTPSSimplificado(UsuarioActual.CveEmpresa)
|
|
||||||
DdlPS.ddl.DataBind()
|
|
||||||
DdlPS.ddl.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
End If
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDdlAlmacen()
|
|
||||||
DdlAlmacen.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlAlmacen.DataBind()
|
|
||||||
|
|
||||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Todos", "-1"))
|
|
||||||
DdlSeccionAlmacen.DataBind()
|
|
||||||
|
|
||||||
DdlSeccionAlmacenDestino.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccionAlmacenDestino.DataBind()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
|
||||||
CargaDatos()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaDatos()
|
|
||||||
If Not DdlPS.SelectedValue.ToEntero > 0 Then
|
|
||||||
Alert("Tiene que seleccionar un producto/servicio.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
|
||||||
Alert("Tiene que seleccionar un alamacen.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
|
||||||
If ObjInv.GetKardexSeccionAlmacen(DdlPS.SelectedValue.ToEntero, DdlAlmacen.SelectedValue.ToEntero, DdlSeccionAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
|
||||||
GvDatos.DataSource = ObjInv.DtResultados
|
|
||||||
End If
|
|
||||||
ObjInv.Dispose()
|
|
||||||
GvDatos.DataBind()
|
|
||||||
UpDatos.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
|
|
||||||
#Region "SECCION ALMACEN"
|
|
||||||
Private Sub CreaDtSeccionAlmacen()
|
|
||||||
DtSeccionAlmacen = New DataTable
|
|
||||||
DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacenOrigen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacenDestino", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacenOrigen", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacenDestino", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
DtSeccionAlmacen.Rows.Clear()
|
|
||||||
CantidadTotal = gvRow.DataKey("Existencia").ToDecimal
|
|
||||||
CveSeccionAlmacenOrigen = gvRow.DataKey("CveAlmacenSeccion").ToEntero
|
|
||||||
SeccionAlmacenOrigen = gvRow.DataKey("AlmacenSeccion").ToString
|
|
||||||
CvePS = gvRow.DataKey("CvePS").ToEntero
|
|
||||||
SerieLote = gvRow.DataKey("SerieLote").ToString
|
|
||||||
CveAlmacen = gvRow.DataKey("CveAlmacen").ToEntero
|
|
||||||
CveUM = gvRow.DataKey("CveUM").ToEntero
|
|
||||||
CveSubProyecto = gvRow.DataKey("CveSubProyecto").ToEntero
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
|
||||||
Dim CantidadDisponible As Decimal = 0
|
|
||||||
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(CveSeccionAlmacenOrigen, CveAlmacen, CvePS, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
|
||||||
CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString.ToDecimal
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjInv.Dispose()
|
|
||||||
|
|
||||||
CantidadDisponible -= DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen")
|
|
||||||
|
|
||||||
If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
|
||||||
Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Row As DataRow = Nothing
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
Row = DtSeccionAlmacen.NewRow
|
|
||||||
Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
|
||||||
Row("CveSeccionAlmacenOrigen") = CveSeccionAlmacenOrigen
|
|
||||||
Row("SeccionAlmacenOrigen") = SeccionAlmacenOrigen
|
|
||||||
Row("CveSeccionAlmacenDestino") = DdlSeccionAlmacenDestino.SelectedValue.ToEntero
|
|
||||||
Row("SeccionAlmacenDestino") = DdlSeccionAlmacenDestino.SelectedItem.Text
|
|
||||||
Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
|
||||||
DtSeccionAlmacen.Rows.Add(Row)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
Dim Index As Integer = 0
|
|
||||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
|
||||||
If Dr("Consec").ToString.ToEntero = gvRow.DataKey("Consec").ToEntero() Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Index += 1
|
|
||||||
Next
|
|
||||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaSeccionAlmacen()
|
|
||||||
Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen")
|
|
||||||
GvSeccion.DataSource = DtSeccionAlmacen
|
|
||||||
GvSeccion.DataBind()
|
|
||||||
|
|
||||||
TxtCantidadSeccion.Text = ""
|
|
||||||
DdlSeccionAlmacenDestino.SelectedIndex = 0
|
|
||||||
Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
|
||||||
If CantidadRestante = 0 Then
|
|
||||||
RVTxtCantidad.MaximumValue = "1"
|
|
||||||
TxtCantidadSeccion.Enabled = False
|
|
||||||
Else
|
|
||||||
RVTxtCantidad.MaximumValue = CantidadRestante.ToString
|
|
||||||
TxtCantidadSeccion.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpModalSeccionAlmacen.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnTraspasar_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim ObjInv As New ClsInventarios
|
|
||||||
ObjInv.IniciaTransacSQL()
|
|
||||||
Dim TieneError As Boolean = False
|
|
||||||
Dim MensajeError As String = ""
|
|
||||||
|
|
||||||
'SALIDA
|
|
||||||
Dim CveMovimientoSalida As Integer = ObjInv.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero, 3, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, CveSubProyecto, -1, CveAlmacenDestino:=CveAlmacen)
|
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar el movimiento de salida. Por favor vuelva a intentar."
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Cantidad As Decimal = DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen")
|
|
||||||
|
|
||||||
If Not ObjInv.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, 0, -1, SerieLote:=SerieLote) Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Else
|
|
||||||
If ObjInv.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.Rows
|
|
||||||
If Not ObjInv.AddMovimientosDetalleSeccionesAlmacen(ObjInv.CveMovimientoDetalle, Dr2("CveSeccionAlmacenOrigen").ToString.ToEntero, -Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'ENTRADA
|
|
||||||
If Not TieneError Then
|
|
||||||
Dim CveMovimientoEntrada As Integer = ObjInv.AddMovimiento(CveAlmacen, 2, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, CveSubProyecto, -1, CveMovimientoRelacionado:=CveMovimientoSalida)
|
|
||||||
|
|
||||||
If CveMovimientoEntrada <= 0 Then
|
|
||||||
MensajeError = "Ocurrió un error al guardar el movimiento de entrada correctamente. Por favor vuelva a intentar."
|
|
||||||
TieneError = True
|
|
||||||
Else
|
|
||||||
If ObjInv.GetMovimientosDetalle(CveMovimientoSalida, UsuarioActual.CveEmpresa) Then
|
|
||||||
For Each Dr As DataRow In ObjInv.DtResultados.Rows
|
|
||||||
If Not ObjInv.AddMovimientoDetalle(CveMovimientoEntrada, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
|
||||||
Exit For
|
|
||||||
Else
|
|
||||||
If ObjInv.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.Rows
|
|
||||||
If Not ObjInv.AddMovimientosDetalleSeccionesAlmacen(ObjInv.CveMovimientoDetalle, Dr2("CveSeccionAlmacenDestino").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
If Not TieneError Then
|
|
||||||
ObjInv.Commit()
|
|
||||||
Alert("El traspaso se ha hecho correctamente")
|
|
||||||
CargaDatos()
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal('hide')")
|
|
||||||
Else
|
|
||||||
ObjInv.RollBack()
|
|
||||||
Alert(MensajeError, TipoMensaje.MsgError)
|
|
||||||
End If
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
|
||||||
@@ -124,7 +124,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UppEntrega" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" ID="UppEntrega" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvD" DataKeyNames="CveUM,CvePS, SerieLote,Lote,Batch,CveMovimientoDetalle" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvD" DataKeyNames="CveUM,CvePS,CveSeccionAlmacen,Serie,Lote,FechaCaducidad,CveMovimientoDetalle,CveMovimiento" runat="server" AutoGenerateColumns="False" EmptyDataText="No hay movimientos pendientes" CssClass="table table-hover Widthall" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||||
<%--<HeaderTemplate>
|
<%--<HeaderTemplate>
|
||||||
@@ -144,7 +144,9 @@
|
|||||||
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UnidadMedida" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="Código" DataField="Codigo" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
<asp:BoundField HeaderText="Producto" DataField="PS" ItemStyle-Width="40%" />
|
||||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="Serie" DataField="Serie" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="15%" />
|
||||||
|
<asp:BoundField HeaderText="F. Caducidad" DataField="FechaCaducidad" ItemStyle-Width="15%" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|||||||
@@ -3,10 +3,29 @@
|
|||||||
Partial Class Inventarios_PrestamosdeProveedor
|
Partial Class Inventarios_PrestamosdeProveedor
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Private Property CveProveedor As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CveProveedor").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveProveedor") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Private Property CveMovimiento As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("CveMovimiento").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveMovimiento") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Private Sub Inventarios_PrestamosdeProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub Inventarios_PrestamosdeProveedor_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
|
CveMovimiento = 0
|
||||||
|
CveProveedor = 0
|
||||||
|
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
@@ -42,8 +61,9 @@ Partial Class Inventarios_PrestamosdeProveedor
|
|||||||
If ObjInv.PrestamosdeProveedorGet(tCveProveedor, tFolio, UsuarioActual.CveEmpresa) Then
|
If ObjInv.PrestamosdeProveedorGet(tCveProveedor, tFolio, UsuarioActual.CveEmpresa) Then
|
||||||
GvD.DataSource = ObjInv.DtResultados
|
GvD.DataSource = ObjInv.DtResultados
|
||||||
Dim Dr As Data.DataRow = ObjInv.DtResultados.FiltroPrimero("")
|
Dim Dr As Data.DataRow = ObjInv.DtResultados.FiltroPrimero("")
|
||||||
If Dr IsNot Nothing Then
|
If Dr IsNot Nothing AndAlso tFolio > 0 Then
|
||||||
HdnCveProveedor.Value = Dr("CveProveedor")
|
CveProveedor = Dr("CveProveedor").ToString.ToEntero
|
||||||
|
CveMovimiento = Dr("CveMovimiento").ToString.ToEntero
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -93,14 +113,14 @@ Partial Class Inventarios_PrestamosdeProveedor
|
|||||||
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
||||||
ValidaMovtos += gvr.FCTextBox("TxtCantidad").Text.ToDecimal
|
ValidaMovtos += gvr.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||||
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
If gvr.FCTextBox("TxtCantidad").Text.ToDecimal > 0 Then
|
||||||
Dim SerieLote As String = "-1"
|
Dim Serie As String = "-1"
|
||||||
Dim Lote As String = "-1"
|
Dim Lote As String = "-1"
|
||||||
Dim Batch As String = "-1"
|
Dim FechaCaducidad As Date = MinFecha
|
||||||
If gvr.DataKey("SerieLote") <> "" Then SerieLote = gvr.DataKey("SerieLote")
|
If gvr.DataKey("Serie") <> "" Then Serie = gvr.DataKey("Serie")
|
||||||
If gvr.DataKey("Lote") <> "" Then Lote = gvr.DataKey("Lote")
|
If gvr.DataKey("Lote") <> "" Then Lote = gvr.DataKey("Lote")
|
||||||
If gvr.DataKey("Batch") <> "" Then Batch = gvr.DataKey("Batch")
|
If gvr.DataKey("FechaCaducidad").ToDate > MinFecha Then FechaCaducidad = gvr.DataKey("FechaCaducidad")
|
||||||
|
|
||||||
Dim Valido = ValidaExistencia(gvr.FCTextBox("TxtCantidad").Text.ToDecimal, gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, SerieLote, Lote, Batch)
|
Dim Valido = ValidaExistencia(gvr.FCTextBox("TxtCantidad").Text.ToDecimal, gvr.DataKey("CvePS").ToEntero, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CveSeccionAlmacen").ToEntero, Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||||
If Not Valido Then
|
If Not Valido Then
|
||||||
Alert("No hay existencia del producto a devolver.", TipoMensaje.MsgAdvertencia)
|
Alert("No hay existencia del producto a devolver.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
@@ -127,14 +147,12 @@ Partial Class Inventarios_PrestamosdeProveedor
|
|||||||
'REGISTRA LA SALIDA Y ENTRADA (TRASPASO)
|
'REGISTRA LA SALIDA Y ENTRADA (TRASPASO)
|
||||||
|
|
||||||
Dim Fecha As Date = TxtFechaEntrega.Text.ToDate
|
Dim Fecha As Date = TxtFechaEntrega.Text.ToDate
|
||||||
|
|
||||||
Dim CveMovimientoSalida As Integer
|
Dim CveMovimientoSalida As Integer
|
||||||
Dim tCveProveedor As Integer = HdnCveProveedor.Value.ToEntero
|
|
||||||
Dim CvePS As Integer = 0
|
Dim CvePS As Integer = 0
|
||||||
|
|
||||||
'AGREGAMOS LA SALIDA
|
'AGREGAMOS LA SALIDA
|
||||||
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 29, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
CveMovimientoSalida = ObjInventario.AddMovimiento(DdlAlmacenOrigen.SelectedValue.ToEntero, 29, 1, Fecha, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1,
|
||||||
Observaciones:=TxtObservacionesEntrega.Text.Trim, CveProveedor:=tCveProveedor, Modulo:="PresP")
|
Observaciones:=TxtObservacionesEntrega.Text.Trim, CveProveedor:=CveProveedor, CveMovimientoRelacionado:=CveMovimiento, Modulo:="PresP")
|
||||||
Folio = ObjInventario.Folio
|
Folio = ObjInventario.Folio
|
||||||
|
|
||||||
If CveMovimientoSalida <= 0 Then
|
If CveMovimientoSalida <= 0 Then
|
||||||
@@ -149,7 +167,7 @@ Partial Class Inventarios_PrestamosdeProveedor
|
|||||||
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then
|
If gvr.FCCheckBox("Chk").Checked AndAlso gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal > 0 Then
|
||||||
CveMovimientoDetalleEntrada = gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero
|
CveMovimientoDetalleEntrada = gvr.DataKey("CveMovimientoDetalle").ToString.ToEntero
|
||||||
CvePS = gvr.DataKey("CvePS").ToString.ToEntero
|
CvePS = gvr.DataKey("CvePS").ToString.ToEntero
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, SerieLote:=gvr.DataKey("SerieLote").ToString, Lote:=gvr.DataKey("Lote").ToString, Batch:=gvr.DataKey("Batch").ToString) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, gvr.FCTextBox("TxtCantidad").Text.ToString.ToDecimal, gvr.DataKey("CveUM").ToString.ToEntero, gvr.DataKey("CvePS").ToString.ToEntero, 0, -1, CveMovimientoDetalleEntrada:=CveMovimientoDetalleEntrada, Serie:=gvr.DataKey("Serie").ToString, Lote:=gvr.DataKey("Lote").ToString, FechaCaducidad:=gvr.DataKey("FechaCaducidad").ToString.ToDate) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
TextoError = "Ocurrió un error al guardar los movimientos de salida"
|
||||||
Exit For
|
Exit For
|
||||||
@@ -220,13 +238,13 @@ Partial Class Inventarios_PrestamosdeProveedor
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional Batch As String = "-1") As Boolean
|
Private Function ValidaExistencia(Cantidad As Double, CvePS As Integer, CveUnidadMedida As Integer, CveSeccionAlmacen As Integer, Serie As String, Lote As String, FechaCaducidad As Date) As Boolean
|
||||||
Dim Retorno = True
|
Dim Retorno = True
|
||||||
|
|
||||||
Dim Inv As New ClsInventarios
|
Dim Inv As New ClsInventarios
|
||||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFechaEntrega.Text.ToDate.ToString("yyyy/MM/dd 23:59"), SerieLote:=SerieLote, Lote:=Lote, Batch:=Batch)
|
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, UsuarioActual.CveEmpresa, DdlAlmacenOrigen.SelectedValue.ToEntero, FechaMovto:=TxtFechaEntrega.Text.ToDate.ToString("yyyy/MM/dd 23:59"), Serie:=Serie, Lote:=Lote, FechaCaducidad:=FechaCaducidad, CveSeccionAlmacen:=CveSeccionAlmacen)
|
||||||
Inv.Dispose()
|
Inv.Dispose()
|
||||||
'- DtMovimientos.SUM("Cantidad", $"CvePS = {CvePS} AND CveUM = {CveUnidadMedida} {If(SerieLote <> "-1", $" AND SerieLote = '{SerieLote}'", "")}")
|
|
||||||
|
|
||||||
If Existencia - Cantidad < 0 Then
|
If Existencia - Cantidad < 0 Then
|
||||||
If Existencia < 0 Then
|
If Existencia < 0 Then
|
||||||
|
|||||||
@@ -247,7 +247,7 @@
|
|||||||
<asp:LinkButton ID="ImgFechaPendientes" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
<asp:LinkButton ID="ImgFechaPendientes" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</span>
|
</span>
|
||||||
<ajax:MaskedEditExtender ID="MEEFechaPendientes" runat="server" TargetControlID="TxtFechaPendientes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
<ajax:MaskedEditExtender ID="MEEFechaPendientes" runat="server" TargetControlID="TxtFechaPendientes" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<ajax:CalendarExtender runat="server" ID="CEFechaPendientes" TargetControlID="TxtFechaPendientes" PopupButtonID="ImgFechaPendientes" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
<ajax:CalendarExtender runat="server" ID="CEFechaPendientes" TargetControlID="TxtFechaPendientes" PopupButtonID="ImgFechaPendientes" PopupPosition="BottomLeft" Enabled="True"></ajax:CalendarExtender>
|
||||||
<asp:RequiredFieldValidator ID="RFVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaPendientes''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaPendientes''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||||
<asp:CompareValidator ID="CVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaPendientes''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
<asp:CompareValidator ID="CVFechaPendientes" runat="server" ControlToValidate="TxtFechaPendientes" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''FechaPendientes''</b> no tiene el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardar"></asp:CompareValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCOFechaPendientes1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPendientes" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOFechaPendientes1" runat="server" HighlightCssClass="vco" TargetControlID="RFVFechaPendientes" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -434,15 +434,23 @@
|
|||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" Text="0"></asp:TextBox>
|
<asp:TextBox ID="TbCantidadF" runat="server" Width="60px" Mask="9,999.99" Text="0"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidadF" runat="server" TargetControlID="TbCantidadF" FilterType="Numbers,custom" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="SoloNumerosCantidadF" runat="server" TargetControlID="TbCantidadF" FilterType="Numbers,custom" ValidChars="." />
|
||||||
<asp:Button Text="SerieLote" ID="BtnSerieLote" OnClick="BtnSerieLote_Click" CssClass="btn btn-primary btn-sm" runat="server" Visible="false" />
|
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-primary btn-sm" runat="server" Visible="false" />
|
||||||
<asp:Button Text="Lote-Batch" ID="BtnLote" CssClass="btn btn-primary" OnClick="BtnLote_Click" runat="server" Visible="false" />
|
<asp:Button Text="Lote" ID="BtnLote" CssClass="btn btn-primary" OnClick="BtnLote_Click" runat="server" Visible="false" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="Unidad" DataField="UM" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
||||||
<asp:HyperLinkField HeaderText="Producto o Servicio" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="22.5%" />
|
<asp:HyperLinkField HeaderText="Producto o Servicio" DataTextField="CodigoPS" DataNavigateUrlFields="CvePS" DataNavigateUrlFormatString="/Ventas/ProductosServicios.aspx?CvePS={0}" Target="_blank" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="P.U." DataField="PU" DataFormatString="{0:#,###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||||
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
<asp:BoundField HeaderText="C.I." DataField="CostoIndirecto" DataFormatString="{0:###.####}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%" />
|
||||||
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LbTotal" Text="" runat="server"></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
<FooterTemplate>
|
||||||
|
<asp:Label ID="LbTotal" Text="" runat="server"></asp:Label>
|
||||||
|
</FooterTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="Seccion" DataValueField="CveSeccion" CssClass="select2me" Style="width: 85% !important" runat="server" CausesValidation="true" Visible="false">
|
||||||
@@ -469,20 +477,7 @@
|
|||||||
</div>
|
</div>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="70px" ItemStyle-HorizontalAlign="Center" Visible="false">
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" FooterStyle-HorizontalAlign="Right" ItemStyle-Width="7.5%">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Label ID="LbTotal" Text="" runat="server"></asp:Label>
|
|
||||||
</ItemTemplate>
|
|
||||||
<FooterTemplate>
|
|
||||||
<asp:Label ID="LbTotal" Text="" runat="server"></asp:Label>
|
|
||||||
</FooterTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Dividir" ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="false">
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
<asp:TextBox runat="server" ID="TxtDividir" Width="30px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros2" runat="server" TargetControlID="TxtDividir" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
@@ -695,64 +690,6 @@
|
|||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-6">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacen" runat="server" ControlToValidate="DdlSeccionAlmacen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacen"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacen.ClientID.ToString()%>">Sección Almacen:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccionAlmacen" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacen" HeaderText="Sección Almacen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<%--AGREGAR POR SERIE LOTE--%>
|
<%--AGREGAR POR SERIE LOTE--%>
|
||||||
<div id="DivSerie" class="modal ADS fade" role="dialog">
|
<div id="DivSerie" class="modal ADS fade" role="dialog">
|
||||||
@@ -786,9 +723,9 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td width="80px">Serie/Lote:</td>
|
<td width="80px">Serie/Lote:</td>
|
||||||
<td>
|
<td>
|
||||||
<asp:TextBox runat="server" ID="TxtSerieLote" Width="300px" ClientIDMode="Static" />
|
<asp:TextBox runat="server" ID="TxtSerie" Width="300px" ClientIDMode="Static" />
|
||||||
<asp:RequiredFieldValidator ID="RFVSerieLote" runat="server" ControlToValidate="TxtSerieLote" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie/Lote''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVSerie" runat="server" ControlToValidate="TxtSerie" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Serie''</b> es necesario, por favor ingréselo." ValidationGroup="GrpAgregaSerie"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCESerieLote" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerieLote" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCESerie" runat="server" HighlightCssClass="vco" TargetControlID="RFVSerie" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdCaducidad1" width="80px">Fecha Caducidad:</td>
|
<td runat="server" id="TdCaducidad1" width="80px">Fecha Caducidad:</td>
|
||||||
<td runat="server" id="TdCaducidad2">
|
<td runat="server" id="TdCaducidad2">
|
||||||
@@ -920,7 +857,6 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="20%" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="20%" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="20%" />
|
||||||
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="20%" />
|
|
||||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="20%" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Eliminar" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ Imports Microsoft.Reporting.WebForms
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports System.Linq
|
|
||||||
|
|
||||||
Partial Class Inventarios_RecepcionAlmacen
|
Partial Class Inventarios_RecepcionAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -43,15 +43,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("DtInv") = value
|
ViewState("DtInv") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property DtSeccionAlmacen As DataTable
|
|
||||||
Get
|
|
||||||
Return CType(ViewState("DtSeccionAlmacen"), DataTable)
|
|
||||||
End Get
|
|
||||||
Set(value As DataTable)
|
|
||||||
ViewState("DtSeccionAlmacen") = value
|
|
||||||
End Set
|
|
||||||
End Property
|
|
||||||
|
|
||||||
Private Property dt As DataTable
|
Private Property dt As DataTable
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("dt"), DataTable)
|
Return CType(ViewState("dt"), DataTable)
|
||||||
@@ -116,20 +107,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("DtDatosLoteDetalle") = value
|
ViewState("DtDatosLoteDetalle") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property CvePSSerieLote As Integer
|
Private Property CvePSSerie As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CvePSSerieLote"), Integer)
|
Return CType(ViewState("CvePSSerie"), Integer)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CvePSSerieLote") = value
|
ViewState("CvePSSerie") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property CveUMSerieLote As Integer
|
Private Property CveUMSerie As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CveUMSerieLote"), Integer)
|
Return CType(ViewState("CveUMSerie"), Integer)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveUMSerieLote") = value
|
ViewState("CveUMSerie") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property CantidadTotal As Decimal
|
Private Property CantidadTotal As Decimal
|
||||||
@@ -148,20 +139,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("IndexSeccionAlmacen") = value
|
ViewState("IndexSeccionAlmacen") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property PUSerieLote As Decimal
|
Private Property PUSerie As Decimal
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("PUSerieLote"), Decimal)
|
Return CType(ViewState("PUSerie"), Decimal)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Decimal)
|
Set(value As Decimal)
|
||||||
ViewState("PUSerieLote") = value
|
ViewState("PUSerie") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property CveConsecSerieLote As Integer
|
Private Property CveConsecSerie As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CveConsecSerieLote"), Integer)
|
Return CType(ViewState("CveConsecSerie"), Integer)
|
||||||
End Get
|
End Get
|
||||||
Set(value As Integer)
|
Set(value As Integer)
|
||||||
ViewState("CveConsecSerieLote") = value
|
ViewState("CveConsecSerie") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
Private Property TotalGV As Decimal
|
Private Property TotalGV As Decimal
|
||||||
@@ -272,6 +263,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ViewState("CveCompraSurtir") = value
|
ViewState("CveCompraSurtir") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property CveProveedor As Integer
|
||||||
|
Get
|
||||||
|
Return CType(ViewState("CveProveedor"), Integer)
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveProveedor") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property CvePrePolizaCompra As Integer
|
Private Property CvePrePolizaCompra As Integer
|
||||||
Get
|
Get
|
||||||
Return CType(ViewState("CvePrePolizaCompra"), Integer)
|
Return CType(ViewState("CvePrePolizaCompra"), Integer)
|
||||||
@@ -373,6 +373,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
|
|
||||||
CargaPermisos()
|
CargaPermisos()
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(72, 80) Then DdlAlmacen.AutoPostBack = True
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -384,13 +385,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'IMPORTES
|
'IMPORTES
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
GvInv.Columns(8).Visible = TienePermisoImportes
|
GvInv.Columns(8).Visible = TienePermisoImportes
|
||||||
GvInv.Columns(11).Visible = TienePermisoImportes
|
GvInv.Columns(10).Visible = TienePermisoImportes
|
||||||
|
|
||||||
'SECCION ALMACEN
|
|
||||||
GvInv.Columns(10).Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
|
||||||
|
|
||||||
'SECCION ALMACEN EXISTENCIAS
|
|
||||||
GvInv.Columns(11).Visible = UsuarioActual.Empresa.Funcionalidad(563).ToString = "1"
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
@@ -413,8 +408,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
CantidadTotal = 0
|
CantidadTotal = 0
|
||||||
IndexSeccionAlmacen = 0
|
IndexSeccionAlmacen = 0
|
||||||
CreaDtSeccionAlmacen()
|
|
||||||
CargaDdlAlmacen()
|
|
||||||
|
|
||||||
ddlAlmacenAdd.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (9)")
|
ddlAlmacenAdd.DataSource = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltraParametros("CveTipoAlmacen NOT IN (9)")
|
||||||
ddlAlmacenAdd.DataBind()
|
ddlAlmacenAdd.DataBind()
|
||||||
@@ -485,17 +478,18 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
UpGenerales.Update()
|
UpGenerales.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlAlmacen_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlAlmacen.SelectedIndexChanged
|
||||||
If DdlAlmacen.SelectedValue <> "-1" Then
|
If DdlAlmacen.SelectedValue <> "-1" Then
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
CargaCompra(CveCompraSurtir, CveProveedor)
|
||||||
If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then
|
'For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
Dim Dr As DataRow = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa).FiltroPrimero($"CveAlmacen = {DdlAlmacen.SelectedValue}")
|
' If Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue = "-1" Then
|
||||||
If Dr IsNot Nothing Then
|
' Dim Dr As DataRow = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero).FiltroPrimero("")
|
||||||
Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(Dr("CveSeccion"))
|
' If Dr IsNot Nothing Then
|
||||||
End If
|
' Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValueExist(Dr("CveSeccion"))
|
||||||
End If
|
' End If
|
||||||
Next
|
' End If
|
||||||
UPInv.Update()
|
'Next
|
||||||
|
'UPInv.Update()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -818,8 +812,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
CargaGVInv()
|
CargaGVInv()
|
||||||
|
|
||||||
DtSeccionAlmacen.Rows.Clear()
|
'DtSeccionAlmacen.Rows.Clear()
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
'DtSeccionAlmacen.AcceptChanges()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||||
@@ -829,7 +823,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer)
|
Private Sub CargaCompra(pCveCompra As Integer, pCveProveedor As Integer)
|
||||||
CargaAlmacenes(-1)
|
'CargaAlmacenes(-1)
|
||||||
|
|
||||||
Dim ObjCompras As New ClsCompras
|
Dim ObjCompras As New ClsCompras
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
@@ -838,6 +832,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
If ObjCompras.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
CveCompraSurtir = pCveCompra
|
CveCompraSurtir = pCveCompra
|
||||||
|
CveProveedor = pCveProveedor
|
||||||
CvePrePolizaCompra = ObjCompras.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
|
CvePrePolizaCompra = ObjCompras.DtResultados.Rows(0)("CvePrePoliza").ToString.ToEntero
|
||||||
|
|
||||||
LbProveedor.Text = ObjCompras.DtResultados.Rows(0)("RazonSocial").ToString
|
LbProveedor.Text = ObjCompras.DtResultados.Rows(0)("RazonSocial").ToString
|
||||||
@@ -868,6 +863,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
RecibidaCompleta = False
|
RecibidaCompleta = False
|
||||||
|
|
||||||
|
|
||||||
Dim CargaSoloUsados As Boolean = False
|
Dim CargaSoloUsados As Boolean = False
|
||||||
|
|
||||||
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
If ObjInventario.RecepcionAlmacenGet(pCveCompra, BuscaEntregaDirecta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
@@ -1187,6 +1183,22 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DtInv = DtInv.FiltraParametros("", "PS")
|
DtInv = DtInv.FiltraParametros("", "PS")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim AplicaSeccion, AplicaLote, AplicaCaducidad, AplicaSerie As Boolean
|
||||||
|
If DtInv IsNot Nothing AndAlso DtInv.Rows.Count > 0 Then
|
||||||
|
AplicaSerie = CBool(DtInv.MAX("AplicaSerie"))
|
||||||
|
AplicaSeccion = CBool(DtInv.MAX("AplicaSeccion"))
|
||||||
|
AplicaLote = CBool(DtInv.MAX("AplicaLote"))
|
||||||
|
AplicaCaducidad = CBool(DtInv.MAX("AplicaCaducidad"))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If AplicaSeccion Then GvInv.Columns(11).Visible = True
|
||||||
|
If AplicaLote Then GvInv.Columns(12).Visible = True
|
||||||
|
If AplicaCaducidad Then GvInv.Columns(13).Visible = True
|
||||||
|
|
||||||
|
If AplicaSerie OrElse AplicaSeccion OrElse AplicaLote OrElse AplicaCaducidad Then
|
||||||
|
GvInv.Columns(14).Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
'For Each item As DataRow In DtInv.Rows
|
'For Each item As DataRow In DtInv.Rows
|
||||||
' Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, item("CvePS").ToString.ToEntero).FiltroPrimero("")
|
' Dim Dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, item("CvePS").ToString.ToEntero).FiltroPrimero("")
|
||||||
' If Dr IsNot Nothing Then
|
' If Dr IsNot Nothing Then
|
||||||
@@ -1207,7 +1219,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
GvInv.DataBind()
|
GvInv.DataBind()
|
||||||
UPInv.Update()
|
UPInv.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GVINV_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound
|
Protected Sub GvInv_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvInv.RowDataBound
|
||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
@@ -1216,8 +1228,8 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
If CBool(e.Row.DBCampo("AplicaSerie")) Then
|
If CBool(e.Row.DBCampo("AplicaSerie")) Then
|
||||||
|
|
||||||
'If e.Row.DBCampo("CveMetodoInventario").ToString = "5" Then
|
'If e.Row.DBCampo("CveMetodoInventario").ToString = "5" Then
|
||||||
e.Row.FCButton("BtnSerieLote").Visible = True
|
e.Row.FCButton("BtnSerie").Visible = True
|
||||||
e.Row.FCButton("BtnSerieLote").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PU"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"))
|
e.Row.FCButton("BtnSerie").CommandArgument = String.Format("{0}°{1}°{2}°{3}°{4}°{5}", e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveUM"), e.Row.DBCampo("PU"), e.Row.DBCampo("PS"), e.Row.DBCampo("CantidadF"), e.Row.DBCampo("Consec"))
|
||||||
|
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
@@ -1234,7 +1246,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCButton("BtnSerieLote").Visible = False
|
e.Row.FCButton("BtnSerie").Visible = False
|
||||||
e.Row.FCButton("BtnLote").Visible = False
|
e.Row.FCButton("BtnLote").Visible = False
|
||||||
|
|
||||||
e.Row.FCTextBox("TbCantidadF").Enabled = True
|
e.Row.FCTextBox("TbCantidadF").Enabled = True
|
||||||
@@ -1251,6 +1263,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
|
If CBool(e.Row.DBCampo("AplicaSeccion")) Then
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = True
|
||||||
|
If DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero)
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
||||||
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
e.Row.FCDropDownList("DdlSeccionAlmacen").Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -1286,13 +1304,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
e.Row.FCCheckBox("cbInv").Visible = False
|
e.Row.FCCheckBox("cbInv").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'TotalGV += e.Row.DBCampo("PU").ToString.ToDecimal * e.Row.DBCampo("CantidadF").ToString.ToDecimal
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(147) = "1" Then
|
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").DataBind()
|
|
||||||
e.Row.FCDropDownList("DdlSeccionAlmacen").Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
'End If
|
|
||||||
|
|
||||||
e.Row.FCLabel("LbTotal").Text = ((e.Row.DBCampo("PU").ToDecimal + e.Row.DBCampo("CostoIndirecto").ToDecimal) * e.Row.DBCampo("CantidadF").ToDecimal).FormatoNumero
|
e.Row.FCLabel("LbTotal").Text = ((e.Row.DBCampo("PU").ToDecimal + e.Row.DBCampo("CostoIndirecto").ToDecimal) * e.Row.DBCampo("CantidadF").ToDecimal).FormatoNumero
|
||||||
|
|
||||||
@@ -1338,9 +1349,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
TdSeriePS.Visible = True
|
TdSeriePS.Visible = True
|
||||||
TxtSeriePS.Focus()
|
TxtSeriePS.Focus()
|
||||||
|
|
||||||
CveConsecSerieLote = Gvr.DataKey("Consec").ToEntero
|
CveConsecSerie = Gvr.DataKey("Consec").ToEntero
|
||||||
CvePSSerieLote = Gvr.DataKey("CvePS").ToEntero
|
CvePSSerie = Gvr.DataKey("CvePS").ToEntero
|
||||||
CveUMSerieLote = Gvr.DataKey("CveUM").ToEntero
|
CveUMSerie = Gvr.DataKey("CveUM").ToEntero
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1401,7 +1412,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSeriePS_Click(sender As Object, e As EventArgs)
|
||||||
AgregaSerieLote(TxtSeriePS.Text.Trim, 2)
|
AgregaSerie(TxtSeriePS.Text.Trim, 2)
|
||||||
TdSeriePS.Visible = False
|
TdSeriePS.Visible = False
|
||||||
TxtSeriePS.Text = ""
|
TxtSeriePS.Text = ""
|
||||||
TxtCodigoPS.Text = ""
|
TxtCodigoPS.Text = ""
|
||||||
@@ -1429,7 +1440,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
Protected Sub BtnSerieLote_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
|
|
||||||
@@ -1437,10 +1448,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
LbCantidad.Text = Argumentos(4).FormatoNumero
|
LbCantidad.Text = Argumentos(4).FormatoNumero
|
||||||
TxtFechaCaducidad.Text = Now.ToShortDateString()
|
TxtFechaCaducidad.Text = Now.ToShortDateString()
|
||||||
|
|
||||||
CvePSSerieLote = Argumentos(0).ToEntero
|
CvePSSerie = Argumentos(0).ToEntero
|
||||||
CveUMSerieLote = Argumentos(1).ToEntero
|
CveUMSerie = Argumentos(1).ToEntero
|
||||||
PUSerieLote = Argumentos(2).ToDecimal
|
PUSerie = Argumentos(2).ToDecimal
|
||||||
CveConsecSerieLote = Argumentos(5).ToEntero
|
CveConsecSerie = Argumentos(5).ToEntero
|
||||||
|
|
||||||
CargaSerie(1)
|
CargaSerie(1)
|
||||||
|
|
||||||
@@ -1459,12 +1470,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaSerie(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
Private Sub CargaSerie(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||||
'RegistraScript("document.getElementById(""TxtSerieLote"").focus();")
|
'RegistraScript("document.getElementById(""TxtSerie"").focus();")
|
||||||
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
RegistraScript("$('#DivSerie').modal();", "ModalLote")
|
||||||
|
|
||||||
'Dim AplicaCaducidad = False
|
'Dim AplicaCaducidad = False
|
||||||
'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltraParametros("").Rows(0) IsNot Nothing Then
|
'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||||
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
'If AplicaCaducidad Then
|
'If AplicaCaducidad Then
|
||||||
@@ -1477,11 +1488,11 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
' TdCaducidad2.Visible = False
|
' TdCaducidad2.Visible = False
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote), "Consec DESC")
|
GvSerie.DataSource = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||||
GvSerie.DataBind()
|
GvSerie.DataBind()
|
||||||
|
|
||||||
'VALIDA QUE SIGA AGREGANDO
|
'VALIDA QUE SIGA AGREGANDO
|
||||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote)).Rows.Count < LbCantidad.Text.ToEntero Then
|
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||||
BtnAgregarPS.Enabled = False
|
BtnAgregarPS.Enabled = False
|
||||||
If CerrarCompletado Then
|
If CerrarCompletado Then
|
||||||
RegistraScript("$('#DivSerie').modal('hide');")
|
RegistraScript("$('#DivSerie').modal('hide');")
|
||||||
@@ -1493,7 +1504,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'SI TIENE ENTRADA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE ENTRADA POR SERIE LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0
|
Dim Contador = 0
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerieLote Then
|
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||||
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
Contador = DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec"))).Rows.Count
|
||||||
Gvr.FCCheckBox("cbInv").Enabled = False
|
Gvr.FCCheckBox("cbInv").Enabled = False
|
||||||
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
||||||
@@ -1514,26 +1525,26 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
UPInv.Update()
|
UPInv.Update()
|
||||||
UpSerie.Update()
|
UpSerie.Update()
|
||||||
TxtSerieLote.Text = ""
|
TxtSerie.Text = ""
|
||||||
TxtSerieLote.Focus()
|
TxtSerie.Focus()
|
||||||
|
|
||||||
If Tipo = 1 Then
|
If Tipo = 1 Then
|
||||||
RegistraScript(String.Format("$('#{0}').on('shown.bs.modal', function () {{$('#{0}').focus(); $('#{0}').trigger(jQuery.Event('keypress', {{which: 13}})); }});$('#DivSerie').modal('show'); ", TxtSerieLote.ClientID))
|
RegistraScript(String.Format("$('#{0}').on('shown.bs.modal', function () {{$('#{0}').focus(); $('#{0}').trigger(jQuery.Event('keypress', {{which: 13}})); }});$('#DivSerie').modal('show'); ", TxtSerie.ClientID))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAgregarPS_Click(sender As Object, e As EventArgs)
|
||||||
AgregaSerieLote(TxtSerieLote.Text.Replace(" ", String.Empty), 1)
|
AgregaSerie(TxtSerie.Text.Replace(" ", String.Empty), 1)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub AgregaSerieLote(SerieLote As String, Tipo As Integer)
|
Private Sub AgregaSerie(Serie As String, Tipo As Integer)
|
||||||
'SerieLote = SerieLote.Trim.Replace(" ", " ")
|
'SerieLote = SerieLote.Trim.Replace(" ", " ")
|
||||||
|
|
||||||
If SerieLote.Trim = "" Then
|
If Serie.Trim = "" Then
|
||||||
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("El campo Serie es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim SeriesArreglo = SerieLote.Trim.Split(";"c)
|
Dim SeriesArreglo = Serie.Trim.Split(";"c)
|
||||||
|
|
||||||
'VALIDACION DE SERIES DUPLICADAS
|
'VALIDACION DE SERIES DUPLICADAS
|
||||||
Dim MensajeAlert As New StringBuilder
|
Dim MensajeAlert As New StringBuilder
|
||||||
@@ -1542,10 +1553,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
|
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
|
||||||
|
|
||||||
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
|
'PARA VALIDAR SI LA SERIE ES IGUAL AL CODIGO O CODIGOBARRAS
|
||||||
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltroPrimero("", "PS")
|
Dim dr As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltroPrimero("", "PS")
|
||||||
|
|
||||||
For Each Serie In SeriesArreglo
|
For Each Serie In SeriesArreglo
|
||||||
DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerieLote} AND Serie = '{Serie}'")
|
DtDuplicado = DtDatosDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Serie = '{Serie}'")
|
||||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||||
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado ya se encuentra ingresado.")
|
MensajeAlert.Append($"<br/> El numero de Serie <b>""{Serie}""</b> proporcionado ya se encuentra ingresado.")
|
||||||
Continue For
|
Continue For
|
||||||
@@ -1588,13 +1599,13 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'VALIDA QUE SIGA AGREGANDO
|
'VALIDA QUE SIGA AGREGANDO
|
||||||
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote)).Rows.Count < LbCantidad.Text.ToEntero Then
|
If Not DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie)).Rows.Count < LbCantidad.Text.ToEntero Then
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), SerieLote:=Serie)
|
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:=Serie)
|
||||||
If Existencia < 1 Then
|
If Existencia < 1 Then
|
||||||
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
MensajeSinExistencias.Append($"Serie: <b>{Serie}</b>. <br/>")
|
||||||
Continue For
|
Continue For
|
||||||
@@ -1609,15 +1620,15 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'Dim AplicaCaducidad = False
|
'Dim AplicaCaducidad = False
|
||||||
'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltraParametros("").Rows(0) IsNot Nothing Then
|
'If GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0) IsNot Nothing Then
|
||||||
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerieLote).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
' AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
Row("ConsecId") = CveConsecSerieLote
|
Row("ConsecId") = CveConsecSerie
|
||||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||||
Row("CvePS") = CvePSSerieLote
|
Row("CvePS") = CvePSSerie
|
||||||
Row("CveUM") = CveUMSerieLote
|
Row("CveUM") = CveUMSerie
|
||||||
Row("PU") = PUSerieLote
|
Row("PU") = PUSerie
|
||||||
Row("Serie") = Serie
|
Row("Serie") = Serie
|
||||||
Row("FechaCaducidad") = MinFecha.ToShortDateString
|
Row("FechaCaducidad") = MinFecha.ToShortDateString
|
||||||
|
|
||||||
@@ -1626,7 +1637,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ObjInventarios.Dispose()
|
ObjInventarios.Dispose()
|
||||||
|
|
||||||
If Tipo = 1 Then
|
If Tipo = 1 Then
|
||||||
TxtSerieLote.Text = ""
|
TxtSerie.Text = ""
|
||||||
TxtFechaCaducidad.Text = Now.ToShortDateString
|
TxtFechaCaducidad.Text = Now.ToShortDateString
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -1672,7 +1683,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DtDatosLoteDetalle.Columns.Add("CveUM", GetType(Integer))
|
DtDatosLoteDetalle.Columns.Add("CveUM", GetType(Integer))
|
||||||
DtDatosLoteDetalle.Columns.Add("PU", GetType(Decimal))
|
DtDatosLoteDetalle.Columns.Add("PU", GetType(Decimal))
|
||||||
DtDatosLoteDetalle.Columns.Add("Lote", GetType(String))
|
DtDatosLoteDetalle.Columns.Add("Lote", GetType(String))
|
||||||
DtDatosLoteDetalle.Columns.Add("Batch", GetType(String))
|
|
||||||
DtDatosLoteDetalle.Columns.Add("FechaCaducidad", GetType(String))
|
DtDatosLoteDetalle.Columns.Add("FechaCaducidad", GetType(String))
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1682,20 +1692,20 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
LbLoteProducto2.Text = Argumentos(3)
|
LbLoteProducto2.Text = Argumentos(3)
|
||||||
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
LbLoteCantidad2.Text = Argumentos(4).FormatoNumero
|
||||||
|
|
||||||
CvePSSerieLote = Argumentos(0).ToEntero
|
CvePSSerie = Argumentos(0).ToEntero
|
||||||
CveUMSerieLote = Argumentos(1).ToEntero
|
CveUMSerie = Argumentos(1).ToEntero
|
||||||
PUSerieLote = Argumentos(2).ToDecimal
|
PUSerie = Argumentos(2).ToDecimal
|
||||||
CveConsecSerieLote = Argumentos(5).ToEntero
|
CveConsecSerie = Argumentos(5).ToEntero
|
||||||
|
|
||||||
CargaLote(1)
|
CargaLote(1)
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaLote(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
Private Sub CargaLote(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||||
RegistraScript("$('#DivLote').modal();", "ModalLote")
|
RegistraScript("$('#DivLote').modal();", "ModalLote")
|
||||||
GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerieLote), "Consec DESC")
|
GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||||
GvLote.DataBind()
|
GvLote.DataBind()
|
||||||
|
|
||||||
'VALIDA QUE SIGA AGREGANDO
|
'VALIDA QUE SIGA AGREGANDO
|
||||||
If Not DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", CveConsecSerieLote)) < LbLoteCantidad2.Text.ToDouble Then
|
If Not DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", CveConsecSerie)) < LbLoteCantidad2.Text.ToDouble Then
|
||||||
BtnAddPSLote.Enabled = False
|
BtnAddPSLote.Enabled = False
|
||||||
If CerrarCompletado Then
|
If CerrarCompletado Then
|
||||||
RegistraScript("$('#DivLote').modal('hide');")
|
RegistraScript("$('#DivLote').modal('hide');")
|
||||||
@@ -1707,7 +1717,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
'SI TIENE ENTRADA POR LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
'SI TIENE ENTRADA POR LOTE, BLOQUEAMOS CHECK Y TXTCANTIDAD
|
||||||
Dim Contador = 0.0
|
Dim Contador = 0.0
|
||||||
For Each Gvr As GridViewRow In GvInv.Rows
|
For Each Gvr As GridViewRow In GvInv.Rows
|
||||||
If Gvr.DataKey("CvePS").ToEntero = CvePSSerieLote Then
|
If Gvr.DataKey("CvePS").ToEntero = CvePSSerie Then
|
||||||
Contador = DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
Contador = DtDatosLoteDetalle.SUM("Cantidad", String.Format("ConsecId = {0}", Gvr.DataKey("Consec")))
|
||||||
Gvr.FCCheckBox("cbInv").Enabled = False
|
Gvr.FCCheckBox("cbInv").Enabled = False
|
||||||
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
Gvr.FCTextBox("TbCantidadF").Enabled = False
|
||||||
@@ -1742,10 +1752,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub BtnAddPSLote_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnAddPSLote_Click(sender As Object, e As EventArgs)
|
||||||
AgregaLote(TxtLote.Text.Trim, TxtBatch.Text.Trim, 1)
|
AgregaLote(TxtLote.Text.Trim, TxtFechaCaducidad.Text.ToDate, 1)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub AgregaLote(Lote As String, Batch As String, Tipo As Integer)
|
Private Sub AgregaLote(Lote As String, FechaCaducidad As Date, Tipo As Integer)
|
||||||
|
|
||||||
If Lote.Trim = "" Then
|
If Lote.Trim = "" Then
|
||||||
Alert("El campo Lote es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("El campo Lote es obligatorio. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1758,9 +1768,9 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Dim DtSeriesNuevas As New DataTable
|
Dim DtSeriesNuevas As New DataTable
|
||||||
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
|
DtSeriesNuevas.Columns.Add("Serie", GetType(String))
|
||||||
|
|
||||||
DtDuplicado = DtDatosLoteDetalle.FiltraParametros($"ConsecId = {CveConsecSerieLote} AND Lote = '{Lote}' AND Batch = '{Batch}'")
|
DtDuplicado = DtDatosLoteDetalle.FiltraParametros($"ConsecId = {CveConsecSerie} AND Lote = '{Lote}' ")
|
||||||
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
If DtDuplicado IsNot Nothing AndAlso DtDuplicado.Rows.Count > 0 Then
|
||||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> y Batch = '{Batch}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -1773,28 +1783,28 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerieLote, CveUMSerieLote, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote, Batch:=Batch)
|
Dim Existencia = ObjInventarios.GetExistenciasPS(CvePSSerie, CveUMSerie, UsuarioActual.CveEmpresa, DdlAlmacen.SelectedValue.ToEntero, FechaMovto:=TxtFecha.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||||
If Existencia < CantidadLote Then
|
If Existencia < CantidadLote Then
|
||||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> y Batch = '{Batch}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> y FechaCaducidad = '{FechaCaducidad}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TipoMovimiento = 2 Then
|
If TipoMovimiento = 2 Then
|
||||||
If Not DtExistencias.SUM("Existencia", $"Lote = '{Lote}' Batch = '{Batch}'") = 0 Then
|
If Not DtExistencias.SUM("Existencia", $"Lote = '{Lote}' FechaCaducidad = '{FechaCaducidad}'") = 0 Then
|
||||||
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> y Batch '{Batch}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
Alert($"<br/> El numero de Lote <b>""{Lote}""</b> y FechaCaducidad '{FechaCaducidad}' proporcionado ya se encuentra ingresado.", TipoMensaje.MsgAdvertencia)
|
||||||
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
RegistraScript("playsonidito('142608__autistic-lucario__error.wav')")
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Row("ConsecId") = CveConsecSerieLote
|
Row("ConsecId") = CveConsecSerie
|
||||||
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
Row("Consec") = DtDatosDetalle.Rows.Count + 1
|
||||||
Row("Cantidad") = CantidadLote
|
Row("Cantidad") = CantidadLote
|
||||||
Row("CvePS") = CvePSSerieLote
|
Row("CvePS") = CvePSSerie
|
||||||
Row("CveUM") = CveUMSerieLote
|
Row("CveUM") = CveUMSerie
|
||||||
Row("PU") = PUSerieLote
|
Row("PU") = PUSerie
|
||||||
Row("Lote") = Lote
|
Row("Lote") = Lote
|
||||||
Row("Batch") = Batch
|
Row("FechaCaducidad") = FechaCaducidad
|
||||||
Row("FechaCaducidad") = If(IsDate(TxtFechaCaducidadLote.Text), TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
|
Row("FechaCaducidad") = If(IsDate(TxtFechaCaducidadLote.Text), TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
|
||||||
'Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
|
'Row("FechaCaducidad") = If(AplicaCaducidad, TxtFechaCaducidadLote.Text, MinFecha.ToShortDateString)
|
||||||
|
|
||||||
@@ -1812,10 +1822,10 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvLote_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvLote.RowDeleting
|
Protected Sub GvLote_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvLote.RowDeleting
|
||||||
Dim keyLote As String = e.Keys("Lote").ToString
|
Dim keyLote As String = e.Keys("Lote").ToString
|
||||||
Dim keyBatch As String = e.Keys("Batch").ToString
|
|
||||||
Try
|
Try
|
||||||
For Each dr As DataRow In DtDatosLoteDetalle.Rows
|
For Each dr As DataRow In DtDatosLoteDetalle.Rows
|
||||||
If dr("Lote").ToString = keyLote And dr("Batch").ToString = keyBatch Then
|
If dr("Lote").ToString = keyLote Then
|
||||||
dr.Delete()
|
dr.Delete()
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -1959,14 +1969,39 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
ObjComprasDif.Dispose()
|
ObjComprasDif.Dispose()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Dim ValidaSeccion As Boolean = False : Dim ValidaCaducidad As Boolean = False : Dim ValidaLote As Boolean = False
|
||||||
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
'PASA DATOS DEL GV A DATATABLE PARA MANEJOR CON FOR EACH
|
||||||
Dim Index = 0
|
Dim Index = 0
|
||||||
For Each gvr As GridViewRow In GvInv.Rows
|
For Each gvr As GridViewRow In GvInv.Rows
|
||||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||||
DtInv.Rows(Index)("CantidadSurtidaPantalla") = gvr.FCTextBox("TbCantidadF").Text.ToDouble
|
DtInv.Rows(Index)("CantidadSurtidaPantalla") = gvr.FCTextBox("TbCantidadF").Text.ToDouble
|
||||||
|
|
||||||
|
If CBool(gvr.DataKey("AplicaSeccion")) AndAlso gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero <= 0 Then
|
||||||
|
ValidaSeccion = True
|
||||||
|
End If
|
||||||
|
If CBool(gvr.DataKey("AplicaCaducidad")) AndAlso gvr.FCTextBox("TxtCaducidad").Text.Trim = "" Then
|
||||||
|
ValidaCaducidad = True
|
||||||
|
End If
|
||||||
|
If CBool(gvr.DataKey("AplicaLote")) AndAlso gvr.FCTextBox("TxtLote").Text.Trim = "" Then
|
||||||
|
ValidaLote = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Index += 1
|
Index += 1
|
||||||
Next
|
Next
|
||||||
|
If ValidaSeccion Then
|
||||||
|
Alert("La sección de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
If ValidaCaducidad Then
|
||||||
|
Alert("La caducidad no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
If ValidaLote Then
|
||||||
|
Alert("El lote de almacen no ha sido especificada en todos los productos.", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
|
||||||
'VERIFICA EXISTENCIAS
|
'VERIFICA EXISTENCIAS
|
||||||
If TipoMovimiento > 1 Then
|
If TipoMovimiento > 1 Then
|
||||||
@@ -2002,13 +2037,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(563) = "1" Then
|
|
||||||
If TotalCantidad <> DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") Then
|
|
||||||
Alert("La seccion de almacen no ha sido agregada completamente.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Return False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
Return True
|
Return True
|
||||||
End Function
|
End Function
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs) Handles BtnGuardar.Click
|
||||||
@@ -2196,7 +2224,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
PU = Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (PU))
|
PU = Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (PU))
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), SerieLote:=Dr("Serie").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Serie:=Dr("Serie").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2211,7 +2239,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
PU = (Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (Dr("Cantidad").ToString.ToDecimal * (PU)))) / Dr("Cantidad").ToString.ToDecimal
|
PU = (Math.Round((TotalCompraOC * If(TipoCambio > 1, TipoCambio, 1)), 2).ToDecimal - (SumaTotal - (Dr("Cantidad").ToString.ToDecimal * (PU)))) / Dr("Cantidad").ToString.ToDecimal
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2232,14 +2260,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
'If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
||||||
For Each Dr As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {gvr.RowIndex}").Rows
|
' For Each Dr As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {gvr.RowIndex}").Rows
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
' If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
||||||
ErrorMovInv = True
|
' ErrorMovInv = True
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
' Next
|
||||||
End If
|
'End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
@@ -2296,7 +2324,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
If Not ErrorMovInv AndAlso Dt IsNot Nothing Then
|
If Not ErrorMovInv AndAlso Dt IsNot Nothing Then
|
||||||
For Each Dr As DataRow In Dt.FiltraParametros($"CveVenta={CveVenta}").Rows
|
For Each Dr As DataRow In Dt.FiltraParametros($"CveVenta={CveVenta}").Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaDirecta, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -2357,12 +2385,12 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovtoSalidaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveMovimientoDetalleEntrada:=Dr("CveMovimientoDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovtoEntradaActual, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("PU").ToString.ToDecimal, Dr("CveAF").ToString.ToEntero, Dr("CveSeccionAlmacen").ToString.ToEntero, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveVentaDetalle:=Dr("CveVentaDetalle").ToString.ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -3032,14 +3060,14 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
DtDetalleLote = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", gvr.DataKey("Consec").ToEntero))
|
||||||
If DtDetalle.Rows.Count > 0 Then
|
If DtDetalle.Rows.Count > 0 Then
|
||||||
For Each Dr As DataRow In DtDetalle.Rows
|
For Each Dr As DataRow In DtDetalle.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), SerieLote:=Dr("Serie").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, 1, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Serie:=Dr("Serie").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), Lote:=If(CBool(gvr.DataKey("AplicaLote")), gvr.FCTextBox("TxtLote").Text, ""), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
ElseIf DtDetalleLote.Rows.Count > 0 Then
|
||||||
For Each Dr As DataRow In DtDetalleLote.Rows
|
For Each Dr As DataRow In DtDetalleLote.Rows
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, FechaCaducidad:=If(CBool(gvr.DataKey("AplicaCaducidad")), gvr.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha), CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, gvr.DataKey("CveUM").ToEntero, gvr.DataKey("CvePS").ToEntero, PU, -1, PUTC:=If(DdlMonedaTC.SelectedValue.ToEntero = 1, -1, PUExtranjero), Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveCompraDetalle:=gvr.DataKey("CveCompraDetalle").ToEntero, CveOrdenCompraDetalle:=gvr.DataKey("CveOrdenCompraDetalle").ToEntero, CveVentaDetalle:=gvr.DataKey("CveVentaDetalle").ToEntero, CostoIndirecto:=CostoIndirecto, CveSeccionAlmacen:=If(CBool(gvr.DataKey("AplicaSeccion")), gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero, -1)) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -3832,85 +3860,6 @@ Partial Class Inventarios_RecepcionAlmacen
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SECCION ALMACEN"
|
|
||||||
Private Sub CreaDtSeccionAlmacen()
|
|
||||||
DtSeccionAlmacen = New DataTable
|
|
||||||
DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
|
||||||
DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacen", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
|
||||||
End Sub
|
|
||||||
Private Sub CargaDdlAlmacen()
|
|
||||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccionAlmacen.DataBind()
|
|
||||||
End Sub
|
|
||||||
Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
CantidadTotal = gvRow.FCTextBox("TbCantidadF").Text.ToDecimal
|
|
||||||
IndexSeccionAlmacen = gvRow.RowIndex
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaSeccionAlmacen()
|
|
||||||
Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
|
||||||
GvSeccionAlmacen.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}")
|
|
||||||
GvSeccionAlmacen.DataBind()
|
|
||||||
|
|
||||||
TxtCantidadSeccion.Text = ""
|
|
||||||
DdlSeccionAlmacen.SelectedIndex = 0
|
|
||||||
Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
|
||||||
If CantidadRestante = 0 Then
|
|
||||||
RVTxtCantidad.MaximumValue = "1"
|
|
||||||
TxtCantidadSeccion.Enabled = False
|
|
||||||
Else
|
|
||||||
RVTxtCantidad.MaximumValue = CantidadRestante.ToString
|
|
||||||
TxtCantidadSeccion.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If CantidadTotalSeccion > 0 Then
|
|
||||||
GvInv.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").Enabled = False
|
|
||||||
GvInv.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
GvInv.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").Enabled = True
|
|
||||||
GvInv.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").ToolTip = ""
|
|
||||||
End If
|
|
||||||
UpModalSeccionAlmacen.Update()
|
|
||||||
UPInv.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim Row As DataRow = Nothing
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
Row = DtSeccionAlmacen.NewRow
|
|
||||||
Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
|
||||||
Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
|
||||||
Row("CveSeccionAlmacen") = DdlSeccionAlmacen.SelectedValue.ToEntero
|
|
||||||
Row("SeccionAlmacen") = DdlSeccionAlmacen.SelectedItem.Text
|
|
||||||
Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
|
||||||
DtSeccionAlmacen.Rows.Add(Row)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
Dim Index As Integer = 0
|
|
||||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
|
||||||
If Dr("Consec").ToString.ToEntero = gvRow.DataKey("Consec").ToEntero() Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Index += 1
|
|
||||||
Next
|
|
||||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "DIVIDIR"
|
#Region "DIVIDIR"
|
||||||
|
|
||||||
Protected Sub Dividir(sender As Object, e As EventArgs)
|
Protected Sub Dividir(sender As Object, e As EventArgs)
|
||||||
|
|||||||
@@ -386,7 +386,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
BtnContabilizar.Enabled = PermiteContabilizar()
|
BtnContabilizar.Enabled = PermiteContabilizar()
|
||||||
BtnNuevo.Enabled = PermiteCrearNuevo()
|
BtnNuevo.Enabled = PermiteCrearNuevo()
|
||||||
|
|
||||||
ActivaPermisoSeccionAlmacen()
|
|
||||||
If CveMovimiento > 0 Then
|
If CveMovimiento > 0 Then
|
||||||
PermisoVerImportes()
|
PermisoVerImportes()
|
||||||
End If
|
End If
|
||||||
@@ -417,11 +416,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Private Function PermiteCrearNuevo() As Boolean
|
Private Function PermiteCrearNuevo() As Boolean
|
||||||
Return If(UsuarioActual.TienePermisoProceso(184) Or EsConsumoInterno, True, False)
|
Return If(UsuarioActual.TienePermisoProceso(184) Or EsConsumoInterno, True, False)
|
||||||
End Function
|
End Function
|
||||||
Private Sub ActivaPermisoSeccionAlmacen()
|
|
||||||
' GvM.Columns(12).Visible = UsuarioActual.Empresa.Funcionalidad(147) = "1"
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
Private Sub PermisoVerImportes()
|
Private Sub PermisoVerImportes()
|
||||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||||
End Sub
|
End Sub
|
||||||
@@ -465,7 +460,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
dt.Columns.Add("CveAF")
|
dt.Columns.Add("CveAF")
|
||||||
dt.Columns.Add("SerieLote", Type.GetType("System.String"))
|
dt.Columns.Add("SerieLote", Type.GetType("System.String"))
|
||||||
dt.Columns.Add("Lote", Type.GetType("System.String"))
|
dt.Columns.Add("Lote", Type.GetType("System.String"))
|
||||||
dt.Columns.Add("Batch", Type.GetType("System.String"))
|
|
||||||
|
|
||||||
dt.Columns.Add("Observaciones")
|
dt.Columns.Add("Observaciones")
|
||||||
dt.Columns.Add("CountMovimientoEntradaDetalle")
|
dt.Columns.Add("CountMovimientoEntradaDetalle")
|
||||||
@@ -481,10 +475,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaCombos()
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
DdlSeccion.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccion.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccion.DataBind()
|
|
||||||
|
|
||||||
'Llenar el dropdownlist de monedas
|
'Llenar el dropdownlist de monedas
|
||||||
DdlMoneda.DataSource = GlobalDTMonedas
|
DdlMoneda.DataSource = GlobalDTMonedas
|
||||||
DdlMoneda.DataBind()
|
DdlMoneda.DataBind()
|
||||||
@@ -870,9 +860,9 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " AGREGAR - GUARDAR "
|
#Region " AGREGAR - GUARDAR "
|
||||||
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional Batch As String = "-1") As Double
|
Private Function GetExistencias(CvePS As Integer, CveUnidadMedida As Integer, CveEmpresa As Integer, CveAlmacen As Integer, Optional SerieLote As String = "-1", Optional Lote As String = "-1", Optional FechaCaducidad As Date = MinFecha) As Double
|
||||||
Dim Inv As New ClsInventarios
|
Dim Inv As New ClsInventarios
|
||||||
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, Batch:=Batch)
|
Dim Existencia As Double = Inv.GetExistenciasPS(CvePS, CveUnidadMedida, CveEmpresa, CveAlmacen, -1, FechaMovto:=String.Format("{0} {1}", TxtFecha.Text.ToDate.ToString("yyyy/MM/dd"), TxtHoraInicio.PostedTime), SerieLote:=SerieLote, Lote:=Lote, FechaCaducidad:=FechaCaducidad)
|
||||||
Inv.Dispose()
|
Inv.Dispose()
|
||||||
Return Existencia
|
Return Existencia
|
||||||
End Function
|
End Function
|
||||||
@@ -976,7 +966,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
registro.Item("CveAF") = CveAF
|
registro.Item("CveAF") = CveAF
|
||||||
registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
registro.Item("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
||||||
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
registro.Item("Lote") = If(Lote <> "", Lote, "")
|
||||||
registro.Item("Batch") = If(Batch <> "", Batch, "")
|
|
||||||
registro.Item("Observaciones") = Observaciones
|
registro.Item("Observaciones") = Observaciones
|
||||||
|
|
||||||
registro.Item("CveTamaño") = CveTamaño
|
registro.Item("CveTamaño") = CveTamaño
|
||||||
@@ -1013,7 +1002,6 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
DtMovimientos.Rows(IndexDTUsado)("CveAF") = CveAF
|
DtMovimientos.Rows(IndexDTUsado)("CveAF") = CveAF
|
||||||
DtMovimientos.Rows(IndexDTUsado)("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
DtMovimientos.Rows(IndexDTUsado)("SerieLote") = If(SerieLote <> "", SerieLote, "")
|
||||||
DtMovimientos.Rows(IndexDTUsado)("Lote") = If(Lote <> "", Lote, "")
|
DtMovimientos.Rows(IndexDTUsado)("Lote") = If(Lote <> "", Lote, "")
|
||||||
DtMovimientos.Rows(IndexDTUsado)("Batch") = If(Batch <> "", Batch, "")
|
|
||||||
DtMovimientos.Rows(IndexDTUsado)("Observaciones") = Observaciones
|
DtMovimientos.Rows(IndexDTUsado)("Observaciones") = Observaciones
|
||||||
|
|
||||||
DtMovimientos.Rows(IndexDTUsado)("CveTamaño") = CveTamaño
|
DtMovimientos.Rows(IndexDTUsado)("CveTamaño") = CveTamaño
|
||||||
@@ -1133,7 +1121,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
ImporteConcepto = Dr("PU").ToString.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, ImporteConcepto, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Dr("Observaciones").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) Then
|
||||||
Mensaje = "Error al guardar los movimientos"
|
Mensaje = "Error al guardar los movimientos"
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Exit For
|
Exit For
|
||||||
@@ -1273,7 +1261,7 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
-1, -1, -1, -1, Modulo:="RU/G")
|
-1, -1, -1, -1, Modulo:="RU/G")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, SerieLote:=SerieLote)
|
ObjInv.AddMovimientoDetalle(CveMovimiento, Cantidad, CveUM, CvePS, CostoPromedio, -1, Serie:=SerieLote)
|
||||||
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
ObjInv.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa)
|
||||||
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
DtMovimientos = ObjInv.DtResultados.FiltraParametros("", "CveMovimientoDetalle DESC").AsEnumerable.Take(25).CopyToDataTable
|
||||||
ObjInv.Dispose()
|
ObjInv.Dispose()
|
||||||
|
|||||||
@@ -273,7 +273,7 @@
|
|||||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
ss
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField ItemStyle-Width="10%">
|
<asp:TemplateField ItemStyle-Width="10%">
|
||||||
@@ -475,7 +475,7 @@
|
|||||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="10%" />
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacenDestino_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
xx
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -496,76 +496,6 @@
|
|||||||
|
|
||||||
</ajax:TabContainer>
|
</ajax:TabContainer>
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" runat="server" id="DivSeccionAlmacenOrigen">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenOrigen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenOrigen" runat="server" ControlToValidate="DdlSeccionAlmacenOrigen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Origen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenOrigen"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenOrigen.ClientID.ToString()%>">Sección Almacen O.:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" runat="server" id="DivSeccionAlmacenDestino" visible="false">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenDestino" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenDestino" runat="server" ControlToValidate="DdlSeccionAlmacenDestino" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Destino''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VceSeccionAlmacenDestino" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenDestino"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenDestino.ClientID.ToString()%>">Sección Almacen D.:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccion" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenOrigen" HeaderText="Sección Almacen Origen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenDestino" HeaderText="Sección Almacen Destino" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
|||||||
@@ -176,8 +176,6 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
CantidadTotal = 0
|
CantidadTotal = 0
|
||||||
IndexSeccionAlmacen = 0
|
IndexSeccionAlmacen = 0
|
||||||
CvePS = 0
|
CvePS = 0
|
||||||
CreaDtSeccionAlmacen()
|
|
||||||
CargaDdlAlmacen()
|
|
||||||
TipoSeccionAlmacen = 0
|
TipoSeccionAlmacen = 0
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -783,16 +781,6 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 1").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenOrigen").ToString.ToEntero, -Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -812,16 +800,7 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 1").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenDestino").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -849,16 +828,7 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
MensajeError = "Ocurrió un error al guardar los detalles del movimiento de salida. Por favor vuelva a intentar."
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 2").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenOrigen").ToString.ToEntero, -Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
@@ -880,16 +850,7 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
MensajeError = "Ocurrió un error al guardar los movimientos de entrada"
|
||||||
Exit For
|
Exit For
|
||||||
Else
|
|
||||||
If ObjInventario.CveMovimientoDetalle > 0 AndAlso DtSeccionAlmacen.Rows.Count > 0 Then
|
|
||||||
For Each Dr2 As DataRow In DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {Cont} AND TipoSeccionAlmacen = 2").Rows
|
|
||||||
If Not ObjInventario.AddMovimientosDetalleSeccionesAlmacen(ObjInventario.CveMovimientoDetalle, Dr2("CveSeccionAlmacenDestino").ToString.ToEntero, Dr2("CantidadSeccionAlmacen").ToString.ToDecimal) Then
|
|
||||||
TieneError = True
|
|
||||||
MensajeError = "Ocurrió un error al procesar las secciones de almacen. Por favor vuelva a intentar."
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Next
|
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
Cont += 1
|
Cont += 1
|
||||||
Next
|
Next
|
||||||
@@ -1010,206 +971,6 @@ Partial Class Inventarios_ResguardoMaterial
|
|||||||
UpFiltraLiberacion.Update()
|
UpFiltraLiberacion.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
|
||||||
|
|
||||||
#Region "SECCION ALMACEN"
|
|
||||||
Private Sub CreaDtSeccionAlmacen()
|
|
||||||
DtSeccionAlmacen = New DataTable
|
|
||||||
DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
|
||||||
DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacenOrigen", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CveSeccionAlmacenDestino", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("CvePS", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacenOrigen", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("SeccionAlmacenDestino", GetType(String))
|
|
||||||
DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
|
||||||
DtSeccionAlmacen.Columns.Add("TipoSeccionAlmacen", GetType(Integer))
|
|
||||||
End Sub
|
|
||||||
Private Sub CargaDdlAlmacen()
|
|
||||||
DdlSeccionAlmacenOrigen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacenOrigen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccionAlmacenOrigen.DataBind()
|
|
||||||
|
|
||||||
DdlSeccionAlmacenDestino.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
|
||||||
DdlSeccionAlmacenDestino.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
|
||||||
DdlSeccionAlmacenDestino.DataBind()
|
|
||||||
End Sub
|
|
||||||
Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
|
|
||||||
If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
|
||||||
Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen origen.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If Not DdlAlmacenDestino.SelectedValue.ToEntero > 0 AndAlso Not ChkTransitorio.Checked Then
|
|
||||||
' Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen destino.", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
'End If
|
|
||||||
|
|
||||||
GvSeccion.Columns(2).Visible = True
|
|
||||||
DivSeccionAlmacenDestino.Visible = True
|
|
||||||
|
|
||||||
DivSeccionAlmacenOrigen.Visible = True
|
|
||||||
GvSeccion.Columns(1).Visible = True
|
|
||||||
|
|
||||||
CantidadTotal = gvRow.DataKey("Cantidad").ToDecimal
|
|
||||||
IndexSeccionAlmacen = gvRow.RowIndex
|
|
||||||
CvePS = gvRow.DataKey("CvePS").ToEntero
|
|
||||||
TipoSeccionAlmacen = 1
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkSeccionAlmacenDestino_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
|
|
||||||
If Not DdlAlmacenLiberacion.SelectedValue.ToEntero > 0 Then
|
|
||||||
Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen destino.", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
DivSeccionAlmacenOrigen.Visible = True
|
|
||||||
DivSeccionAlmacenDestino.Visible = True
|
|
||||||
GvSeccion.Columns(1).Visible = True
|
|
||||||
GvSeccion.Columns(2).Visible = True
|
|
||||||
|
|
||||||
CantidadTotal = gvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
|
||||||
IndexSeccionAlmacen = gvRow.RowIndex
|
|
||||||
CvePS = gvRow.DataKey("CvePS").ToEntero
|
|
||||||
TipoSeccionAlmacen = 2
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
|
||||||
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Private Sub CargaSeccionAlmacen()
|
|
||||||
Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen} AND TipoSeccionAlmacen = {TipoSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
|
||||||
GvSeccion.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen} AND TipoSeccionAlmacen = {TipoSeccionAlmacen}")
|
|
||||||
GvSeccion.DataBind()
|
|
||||||
|
|
||||||
TxtCantidadSeccion.Text = ""
|
|
||||||
DdlSeccionAlmacenOrigen.SelectedIndex = 0
|
|
||||||
DdlSeccionAlmacenDestino.SelectedIndex = 0
|
|
||||||
Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
|
||||||
If CantidadRestante = 0 Then
|
|
||||||
RVTxtCantidad.MaximumValue = "1"
|
|
||||||
TxtCantidadSeccion.Enabled = False
|
|
||||||
Else
|
|
||||||
RVTxtCantidad.MaximumValue = CantidadRestante.ToString
|
|
||||||
TxtCantidadSeccion.Enabled = True
|
|
||||||
End If
|
|
||||||
|
|
||||||
If TipoSeccionAlmacen = 1 Then
|
|
||||||
If CantidadTotalSeccion > 0 Then
|
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = False
|
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").Visible = True
|
|
||||||
GvM.Rows(IndexSeccionAlmacen).FCLinkButton("lnkRemove").ToolTip = ""
|
|
||||||
End If
|
|
||||||
If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 Then
|
|
||||||
DdlAlmacen.Enabled = False
|
|
||||||
DdlAlmacen.ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
DdlAlmacen.Enabled = True
|
|
||||||
DdlAlmacen.ToolTip = ""
|
|
||||||
End If
|
|
||||||
UpGenerales.Update()
|
|
||||||
|
|
||||||
ElseIf TipoSeccionAlmacen = 2 Then
|
|
||||||
If CantidadTotalSeccion > 0 Then
|
|
||||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = False
|
|
||||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").Enabled = True
|
|
||||||
GvMLiberacion.Rows(IndexSeccionAlmacen).FCTextBox("TxtCantidad").ToolTip = ""
|
|
||||||
End If
|
|
||||||
If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 Then
|
|
||||||
DdlAlmacenLiberacion.Enabled = False
|
|
||||||
DdlAlmacenLiberacion.ToolTip = "Cuenta con sección almacen"
|
|
||||||
Else
|
|
||||||
DdlAlmacenLiberacion.Enabled = True
|
|
||||||
DdlAlmacenLiberacion.ToolTip = ""
|
|
||||||
End If
|
|
||||||
UpGridLiberacion.Update()
|
|
||||||
UpFiltraLiberacion.Update()
|
|
||||||
End If
|
|
||||||
|
|
||||||
UpModalSeccionAlmacen.Update()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
|
||||||
|
|
||||||
Dim ObjInv As New ClsInventarios
|
|
||||||
Dim CantidadDisponible As Decimal = 0
|
|
||||||
If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlSeccionAlmacenOrigen.SelectedValue.ToEntero, If(TipoSeccionAlmacen = 1, DdlAlmacen.SelectedValue.ToEntero, DdlAlmacenLiberacion.SelectedValue.ToEntero),
|
|
||||||
CvePS, UsuarioActual.CveEmpresa) Then
|
|
||||||
If ObjInv.DtResultados.Rows.Count > 0 Then
|
|
||||||
CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString.ToDecimal
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
ObjInv.Dispose()
|
|
||||||
|
|
||||||
CantidadDisponible -= DtSeccionAlmacen.FiltraParametros($"CvePS = {CvePS} AND CveSeccionAlmacenOrigen = {DdlSeccionAlmacenOrigen.SelectedValue} AND TipoSeccionAlmacen = {TipoSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
|
||||||
|
|
||||||
If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
|
||||||
Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
Dim Row As DataRow = Nothing
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
Row = DtSeccionAlmacen.NewRow
|
|
||||||
Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
|
||||||
Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
|
||||||
Row("CveSeccionAlmacenOrigen") = DdlSeccionAlmacenOrigen.SelectedValue.ToEntero
|
|
||||||
Row("SeccionAlmacenOrigen") = DdlSeccionAlmacenOrigen.SelectedItem.Text
|
|
||||||
Row("CveSeccionAlmacenDestino") = DdlSeccionAlmacenDestino.SelectedValue.ToEntero
|
|
||||||
Row("SeccionAlmacenDestino") = DdlSeccionAlmacenDestino.SelectedItem.Text
|
|
||||||
Row("CvePS") = CvePS
|
|
||||||
Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
|
||||||
Row("TipoSeccionAlmacen") = TipoSeccionAlmacen
|
|
||||||
DtSeccionAlmacen.Rows.Add(Row)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
|
||||||
Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
|
||||||
Dim Index As Integer = 0
|
|
||||||
For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
|
||||||
If Dr("Consec").ToString.ToEntero = gvRow.DataKey("Consec").ToEntero() Then
|
|
||||||
Exit For
|
|
||||||
End If
|
|
||||||
Index += 1
|
|
||||||
Next
|
|
||||||
DtSeccionAlmacen.Rows.RemoveAt(Index)
|
|
||||||
DtSeccionAlmacen.AcceptChanges()
|
|
||||||
CargaSeccionAlmacen()
|
|
||||||
End Sub
|
|
||||||
|
|
||||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
|
||||||
' If Not CveVentaSurtir > 0 Then
|
|
||||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If Not DdlAlmacen.SelectedValue.ToEntero > 0 Then
|
|
||||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
|
||||||
' Exit Sub
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Dim ObjInv As New ClsInventarios
|
|
||||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
|
||||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
|
||||||
' End If
|
|
||||||
' ObjInv.Dispose()
|
|
||||||
' GvVerSeccionesAlmacen.DataBind()
|
|
||||||
' UpVerSeccionesAlmacen.Update()
|
|
||||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
|
||||||
'End Sub
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
Private Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click
|
||||||
|
|||||||
@@ -450,10 +450,10 @@
|
|||||||
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="100px" />
|
<asp:BoundField HeaderText="Observaciones" DataField="Observaciones" ItemStyle-Width="100px" />
|
||||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="90px" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="90px" />
|
||||||
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="90px" />
|
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" ItemStyle-Width="90px" />
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacen" OnClick="LnkSeccionAlmacen_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
s
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
@@ -654,7 +654,7 @@
|
|||||||
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="15%" />
|
<asp:BoundField HeaderText="SerieLote" DataField="SerieLote" ItemStyle-Width="15%" />
|
||||||
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
<asp:TemplateField HeaderText="Sección Almacén" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="10%" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton data-toggle="tooltip" title="Sección Almacen" ID="LnkSeccionAlmacenDestino" OnClick="LnkSeccionAlmacenDestino_Click" CssClass="btn btn-circle btn-xs green" runat="server" Text="<i class='fa fa-pencil'></i>"></asp:LinkButton>
|
sss
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -727,73 +727,6 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%--SECCION DE ALMACEN--%>
|
|
||||||
<div id="DModalSeccionAlmacen" class="modal ADS fade" role="dialog">
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalSeccionAlmacen" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<div class="modal-content">
|
|
||||||
<div class="modal-header ">
|
|
||||||
<h4 class="modal-title">
|
|
||||||
<asp:Literal ID="LtlSeccionAlmacen" Text="Sección Almacen" runat="server"> </asp:Literal></h4>
|
|
||||||
</div>
|
|
||||||
<div class="modal-body">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-2">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtCantidadSeccion" CssClass="form-control" runat="server"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvCantidadSeccion" runat="server" ControlToValidate="TxtCantidadSeccion" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cantidad''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoCantidadSeccion" runat="server" HighlightCssClass="vco" TargetControlID="RfvCantidadSeccion"></ajax:ValidatorCalloutExtender>
|
|
||||||
<asp:RangeValidator ID="RVTxtCantidad" runat="server" ControlToValidate="TxtCantidadSeccion" MinimumValue="0" MaximumValue="1" Type="Double" Text="<b><span style='text-decoration: underline'>ERROR:</span></b><br />No cuenta con la cantidad suficiente." ValidationGroup="VgmSeccion" />
|
|
||||||
<label for="<%= TxtCantidadSeccion.ClientID.ToString()%>">Cantidad:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" runat="server" id="DivSeccionAlmacenOrigen">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenOrigen" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenOrigen" runat="server" ControlToValidate="DdlSeccionAlmacenOrigen" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Origen''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VcoSeccionAlmacenOrigen" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenOrigen"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenOrigen.ClientID.ToString()%>">Sección Almacen O.:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4" runat="server" id="DivSeccionAlmacenDestino" visible="false">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:DropDownList ID="DdlSeccionAlmacenDestino" CssClass="form-control select2me" AppendDataBoundItems="true" Style="width: 100%;" runat="server" DataTextField="Seccion" DataValueField="CveSeccion">
|
|
||||||
</asp:DropDownList>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvSeccionAlmacenDestino" runat="server" ControlToValidate="DdlSeccionAlmacenDestino" InitialValue="-1" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sección Almacen Destino''</b> es necesario, por favor ingréselo." ValidationGroup="VgmSeccion"></asp:RequiredFieldValidator>
|
|
||||||
<ajax:ValidatorCalloutExtender ID="VceSeccionAlmacenDestino" runat="server" HighlightCssClass="vco" TargetControlID="RfvSeccionAlmacenDestino"></ajax:ValidatorCalloutExtender>
|
|
||||||
<label for="<%= DdlSeccionAlmacenDestino.ClientID.ToString()%>">Sección Almacen D.:</label>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-2">
|
|
||||||
<asp:LinkButton ID="LnkAddSeccionAlmacen" data-toggle="tooltip" CssClass="btn btn-default btn-circle btn-xs " OnClick="LnkAddSeccionAlmacen_Click" data-placement="top" ToolTip="Agregar Sección Almacen" runat="server" ValidationGroup="VgmSeccion"><i class="fa fa-plus" style="color:black" aria-hidden="true"></i></asp:LinkButton>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<br />
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvSeccion" runat="server" GridLines="None" ShowHeaderWhenEmpty="true"
|
|
||||||
CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true"
|
|
||||||
AutoGenerateColumns="False" EmptyDataText="No se han agregado datos"
|
|
||||||
DataKeyNames="Consec">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField DataField="CantidadSeccionAlmacen" HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" DataFormatString="{0:#,##0.##}" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenOrigen" HeaderText="Sección Almacen Origen" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:BoundField DataField="SeccionAlmacenDestino" HeaderText="Sección Almacen Destino" ItemStyle-HorizontalAlign="Left" />
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" HeaderText="Comandos">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="LnkEliminarSeccion" runat="server" OnClick="LnkEliminarSeccion_Click" CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="¿Está seguro que desea eliminar la sección?" data-btn-ok-label="si" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
</div>
|
|
||||||
<%--CARGA EXCEL--%>
|
<%--CARGA EXCEL--%>
|
||||||
<div id="DivCargaExcelConceptos" class="modal ADS fade" role="dialog">
|
<div id="DivCargaExcelConceptos" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -1380,7 +1380,7 @@
|
|||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="Serie" DataField="SerieLote" ItemStyle-Width="10%" Visible="false" />
|
<asp:BoundField HeaderText="Serie" DataField="SerieLote" ItemStyle-Width="10%" Visible="false" />
|
||||||
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" />
|
<asp:BoundField HeaderText="Lote" DataField="Lote" ItemStyle-Width="10%" Visible="false" />
|
||||||
<asp:BoundField HeaderText="Batch" DataField="Batch" ItemStyle-Width="10%" Visible="false" />
|
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" DataFormatString="{0:d}" ItemStyle-Width="10%" Visible="false" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|||||||
@@ -2841,7 +2841,7 @@ Partial Class OC
|
|||||||
Dim CveMovimientoEntradaAjuste = ObjInventarios.AddMovimiento(CveAlmacen, 2, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OC/G")
|
Dim CveMovimientoEntradaAjuste = ObjInventarios.AddMovimiento(CveAlmacen, 2, 1, Now, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, -1, Modulo:="OC/G")
|
||||||
If ObjInventarios.GetMovimientosDetalle(CveMovimientoSalidaAjuste, UsuarioActual.CveEmpresa) Then
|
If ObjInventarios.GetMovimientosDetalle(CveMovimientoSalidaAjuste, UsuarioActual.CveEmpresa) Then
|
||||||
For Each Dr As DataRow In ObjInventarios.DtResultados.Rows
|
For Each Dr As DataRow In ObjInventarios.DtResultados.Rows
|
||||||
If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoEntradaAjuste, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, DtInvOCDiferencias.FiltroPrimeroValor("ImporteMovto", $"CveOrdenCompraDetalle = {Dr("CveOrdenCompraDetalle").ToString.ToEntero}").ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, Batch:=Dr("Batch").ToString, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
If Not ObjInventarios.AddMovimientoDetalle(CveMovimientoEntradaAjuste, Dr("Cantidad").ToString.ToDouble, Dr("CveUM").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, DtInvOCDiferencias.FiltroPrimeroValor("ImporteMovto", $"CveOrdenCompraDetalle = {Dr("CveOrdenCompraDetalle").ToString.ToEntero}").ToDouble, Dr("CveAF").ToString.ToEntero, -1, Dr("SerieLote").ToString, Lote:=Dr("Lote").ToString, FechaCaducidad:=Dr("FechaCaducidad").ToString.ToDate, CveOrdenCompraDetalle:=Dr("CveOrdenCompraDetalle").ToString.ToEntero) Then
|
||||||
TieneError = True
|
TieneError = True
|
||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
@@ -4811,7 +4811,7 @@ Partial Class OC
|
|||||||
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
Dim Filesgral As List(Of Archivo) = Anexo.getfiles().Archivos
|
||||||
|
|
||||||
For Each fileItem As Archivo In Filesgral
|
For Each fileItem As Archivo In Filesgral
|
||||||
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", ModExtensiones.DirectorioBaseEmpresas, fileItem.filename)).Replace(".", "")
|
FileExtension = IO.Path.GetExtension(String.Format("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, fileItem.filename)).Replace(".", "")
|
||||||
Filename = fileItem.filename
|
Filename = fileItem.filename
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -6102,7 +6102,7 @@ Partial Class OC
|
|||||||
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
Protected Sub BtnCargaExcel_Click(sender As Object, e As EventArgs) Handles BtnCargaExcel.Click
|
||||||
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
If TxtExcel.getfiles().Archivos.Count > 0 Then
|
||||||
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
Dim file As Archivo = TxtExcel.getfiles().Archivos(0)
|
||||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||||
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
Dim Tipo As String = If(file.Extencion.Contiene("xlsx", "xlsx", "xlsm", "xlsb"), "EXCEL", "CSV")
|
||||||
CargarArchivo(Directorio, file.filename, Tipo)
|
CargarArchivo(Directorio, file.filename, Tipo)
|
||||||
Else
|
Else
|
||||||
@@ -6346,7 +6346,7 @@ Partial Class OC
|
|||||||
Private Function GetPS(Opt As String, Valor As String) As String
|
Private Function GetPS(Opt As String, Valor As String) As String
|
||||||
Dim StrReturn As String = String.Empty
|
Dim StrReturn As String = String.Empty
|
||||||
Dim CvePS As Integer = 0
|
Dim CvePS As Integer = 0
|
||||||
CvePS = GlobalDTPS(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePS", Opt & " = '" & Valor & "'").ToString.ToEntero
|
CvePS = GlobalDTPS(UsuarioActual.CveEmpresa, Estatus:=1).FiltroPrimeroValor("CvePS", Opt & " = '" & Valor & "'").ToString.ToEntero
|
||||||
If CvePS > 0 Then
|
If CvePS > 0 Then
|
||||||
StrReturn = "True|" & CvePS.ToString
|
StrReturn = "True|" & CvePS.ToString
|
||||||
Else
|
Else
|
||||||
@@ -6819,7 +6819,7 @@ Partial Class OC
|
|||||||
GVInv.Columns(4).Visible = True
|
GVInv.Columns(4).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If e.Row.DBCampo("Batch") <> "" Then
|
If e.Row.DBCampo("FechaCaducidad") <> "" Then
|
||||||
GVInv.Columns(4).Visible = True
|
GVInv.Columns(4).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -7509,7 +7509,7 @@ Partial Class OC
|
|||||||
Protected Sub BtnCargaExcelCot_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCargaExcelCot_Click(sender As Object, e As EventArgs)
|
||||||
If TxtExcelCot.getfiles().Archivos.Count > 0 Then
|
If TxtExcelCot.getfiles().Archivos.Count > 0 Then
|
||||||
Dim file As Archivo = TxtExcelCot.getfiles().Archivos(0)
|
Dim file As Archivo = TxtExcelCot.getfiles().Archivos(0)
|
||||||
Dim Directorio As String = ModExtensiones.DirectorioBaseEmpresas & file.patch
|
Dim Directorio As String = AppDomain.CurrentDomain.BaseDirectory & file.patch
|
||||||
CargarArchivoCot(Directorio, file.filename)
|
CargarArchivoCot(Directorio, file.filename)
|
||||||
|
|
||||||
CargaCotizaciones(CveOrdenCompra)
|
CargaCotizaciones(CveOrdenCompra)
|
||||||
|
|||||||
@@ -340,11 +340,5 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
<script
|
<script src="<%= String.Format("https://maps.googleapis.com/maps/api/js?key={0}&libraries=drawing&libraries=places", Extensiones.GOOGLE_MAPS_API_KEY) %>"</script>
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAF7s8wwhzCVXDUYopc9mXxqaWB33cDro4&libraries=places">
|
|
||||||
</script>
|
|
||||||
<%--<script
|
|
||||||
src="https://maps.googleapis.com/maps/api/js?key=AIzaSyAJnZ1CoEUX425C20aqzFw4dYxFL_LfThk&libraries=places">
|
|
||||||
</script>--%>
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -3744,8 +3744,10 @@ Partial Class Clientes
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub GenerarRepCrystal(Formato As String)
|
Private Sub GenerarRepCrystal(Formato As String)
|
||||||
Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta))
|
Dim LogoRutaFisica As String = String.Format("Empresas\{0}\Logo.png", UsuarioActual.CveEmpresa)
|
||||||
Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
Dim logouri = String.Format("{0}://{1}:{2}/ashx/sigfiles.ashx?P={3}", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, Encripta(LogoRutaFisica))
|
||||||
|
Dim Imagen As New System.IO.FileInfo(String.Format("{0}Logo.png", UsuarioActual.Empresa.Ruta))
|
||||||
|
'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa)
|
||||||
|
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
If Imagen.Exists Then
|
If Imagen.Exists Then
|
||||||
|
|||||||
@@ -945,7 +945,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Lote" HeaderText="Lote" />
|
<asp:BoundField DataField="Lote" HeaderText="Lote" />
|
||||||
<asp:BoundField DataField="Batch" HeaderText="Batch" />
|
<asp:BoundField DataField="FechaCaducidad" HeaderText="FechaCaducidad" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -1789,7 +1789,7 @@ Partial Class PV
|
|||||||
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
'Cargo de nueva cuenta el detalle de Ventas (Conceptos)
|
||||||
If Not OcurrioError Then
|
If Not OcurrioError Then
|
||||||
Dim index As Integer = 0
|
Dim index As Integer = 0
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
For Each Row As DataRow In TmpDT.FiltraParametros("EliminarDB = False").Rows
|
||||||
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
Dim CveVentaDetalle As Integer = Row("CveVentaDetalle").ToString.ToEntero()
|
||||||
If CveVentaDetalle > 0 Then
|
If CveVentaDetalle > 0 Then
|
||||||
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
|
If Not ObjVentas.UpdateVentaDetalleRemision(Row("CveVentaDetalle").ToString.ToEntero, Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal(), Row("ImporteIEPS").ToString.ToDecimal(), Row("Obs").ToString, UsuarioActual.CveUsuario) Then
|
||||||
@@ -1847,19 +1847,45 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'RECARGA LOS DATOS
|
'RECARGA LOS DATOS
|
||||||
If ObjVentas.GetVentaDetalle(CveVenta) Then
|
ObjFactura.Dispose()
|
||||||
TmpDT = ObjVentas.DtResultados.Copy()
|
ObjFactura = Nothing
|
||||||
ObjFactura.DtDetalle = TmpDT
|
ObjFactura = New Modelos.Factura(UsuarioActual, CveVenta, UsuarioActual.CveEmpresa)
|
||||||
Else
|
|
||||||
|
If ObjFactura Is Nothing Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
|
Else
|
||||||
|
TmpDT = ObjFactura.DtDetalle
|
||||||
|
TmpDT.Columns.Add("EntregaDirecta", GetType(Integer))
|
||||||
|
TmpDT.Columns.Add("CveMovimientoDetallePedido", GetType(Integer))
|
||||||
|
|
||||||
|
Dim NumRowsPS As Integer = 0
|
||||||
|
Dim CantidadPS As Decimal = 0
|
||||||
|
For Each GvRow As GridViewRow In GvPS.Rows
|
||||||
|
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||||
|
NumRowsPS += 1
|
||||||
|
CantidadPS += GvRow.DataKey("Cantidad").ToDecimal()
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
|
||||||
|
'VALIDA NUMERO DE REGISTROS
|
||||||
|
If TmpDT.Rows.Count <> NumRowsPS Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
'VALIDA CANTIDAD DE REGISTROS
|
||||||
|
If TmpDT.SUM("Cantidad") <> CantidadPS Then
|
||||||
|
OcurrioError = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'GUARDA USADOS
|
'GUARDA USADOS
|
||||||
If Not ObjVentas.EliminarUsados(CveVenta) Then
|
If Not OcurrioError AndAlso Not ObjVentas.EliminarUsados(CveVenta) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TmpDTRecepcionUsados IsNot Nothing Then
|
If Not OcurrioError AndAlso TmpDTRecepcionUsados IsNot Nothing Then
|
||||||
For Each drow As DataRow In TmpDTRecepcionUsados.Rows
|
For Each drow As DataRow In TmpDTRecepcionUsados.Rows
|
||||||
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
If Not ObjVentas.AddVentaUsado(CveVenta, drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("CveBCIUsado").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
@@ -1869,11 +1895,11 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'GUARDAR AJUSTES'
|
'GUARDAR AJUSTES'
|
||||||
If Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
|
If Not OcurrioError AndAlso Not ObjAcum.EliminarGarantiasDetalle(CveVenta) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
If Not OcurrioError AndAlso TmpDTAjustes IsNot Nothing AndAlso TmpDTAjustes.Rows.Count > 0 Then
|
||||||
For Each Dr As DataRow In TmpDTAjustes.Rows
|
For Each Dr As DataRow In TmpDTAjustes.Rows
|
||||||
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
If Not ObjAcum.AddGarantiasDetalle(Dr("CveVentaDetalle").ToString.ToEntero, Dr("CvePS").ToString.ToEntero, Dr("CveFolioGarantia").ToString.ToEntero, Dr("CveTipoUso").ToString.ToEntero,
|
||||||
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
Dr("CodigoEnsamble").ToString, Dr("CodigoLinea").ToString, Dr("CodigoInspeccion").ToString, Dr("CveTipoDefecto").ToString.ToEntero,
|
||||||
@@ -1884,11 +1910,11 @@ Partial Class PV
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'GUARDAR POLIZA VIRTUAL
|
'GUARDAR POLIZA VIRTUAL
|
||||||
If Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
|
If Not OcurrioError AndAlso Not ObjAcum.EliminarPolizaVirtual(CveVenta) Then
|
||||||
OcurrioError = True
|
OcurrioError = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If TmpDTPolizaVirtual IsNot Nothing Then
|
If Not OcurrioError AndAlso TmpDTPolizaVirtual IsNot Nothing Then
|
||||||
For Each drow As DataRow In TmpDTPolizaVirtual.Rows
|
For Each drow As DataRow In TmpDTPolizaVirtual.Rows
|
||||||
If ObjAcum.AddPolizaVirtual(CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
If ObjAcum.AddPolizaVirtual(CveVenta, drow("CveVentaDetalle").ToString().ToEntero(), drow("CvePS").ToString.ToEntero, drow("Cantidad").ToString.ToDecimal, drow("PU").ToString.ToDecimal, drow("Descuento").ToString.ToDecimal,
|
||||||
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
drow("Total").ToString.ToDecimal, drow("TipoServicio").ToString.ToEntero, drow("TipoPoliza").ToString.ToEntero, drow("CveModeloAuto").ToString.ToEntero, drow("AnioVehiculo").ToString.ToEntero, CBool(drow("TieneUsado").ToString),
|
||||||
@@ -2758,13 +2784,18 @@ Partial Class PV
|
|||||||
|
|
||||||
#Region "GVPS"
|
#Region "GVPS"
|
||||||
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting
|
Protected Sub GvPS_RowDeleting(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvPS.RowDeleting
|
||||||
|
|
||||||
Dim DbRow As DataRow = Nothing
|
Dim DbRow As DataRow = Nothing
|
||||||
DbRow = TmpDT.Rows(e.RowIndex)
|
DbRow = TmpDT.Rows(e.RowIndex)
|
||||||
|
|
||||||
EliminarUsados(DbRow("Consec").ToString().ToEntero())
|
Me.CveVentaDetalle = DbRow("CveVentaDetalle").ToString().ToEntero()
|
||||||
|
|
||||||
TmpDT.Rows.Remove(DbRow)
|
If Me.CveVentaDetalle <= 0 Then
|
||||||
|
EliminarUsados(DbRow("Consec").ToString().ToEntero())
|
||||||
|
TmpDT.Rows.Remove(DbRow)
|
||||||
|
Else
|
||||||
|
EliminarUsados()
|
||||||
|
DbRow("EliminarDB") = True
|
||||||
|
End If
|
||||||
|
|
||||||
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
GvPS.DataSource = TmpDT.FiltraParametros("EliminarDB = False")
|
||||||
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
DtInv = TmpDT.Copy.FiltraParametros("CveTipoPS = 2")
|
||||||
@@ -2774,6 +2805,9 @@ Partial Class PV
|
|||||||
|
|
||||||
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion)
|
||||||
|
|
||||||
|
Me.CveVentaDetalle = -1
|
||||||
|
|
||||||
|
|
||||||
UpContado.Update()
|
UpContado.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub GvPS_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvPS.RowDataBound
|
Protected Sub GvPS_RowDataBound(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvPS.RowDataBound
|
||||||
@@ -2920,13 +2954,13 @@ Partial Class PV
|
|||||||
DtTemporal.Columns.Add("Lote", Type.GetType("System.String"))
|
DtTemporal.Columns.Add("Lote", Type.GetType("System.String"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not DtTemporal.Columns.Contains("Batch") Then
|
If Not DtTemporal.Columns.Contains("FechaCaducidad") Then
|
||||||
DtTemporal.Columns.Add("Batch", Type.GetType("System.String"))
|
DtTemporal.Columns.Add("FechaCaducidad", Type.GetType("System.DateTime"))
|
||||||
End If
|
End If
|
||||||
|
|
||||||
GvInv.Columns(4).Visible = DtTemporal.MAX("SerieLote", "SerieLote <> ''") <> "" Or CveVenta <= 0
|
GvInv.Columns(4).Visible = DtTemporal.MAX("SerieLote", "SerieLote <> ''") <> "" Or CveVenta <= 0
|
||||||
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
|
GvInv.Columns(5).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
|
||||||
GvInv.Columns(6).Visible = DtTemporal.MAX("Lote", "Lote <> ''") <> ""
|
GvInv.Columns(6).Visible = DtTemporal.MAX("FechaCaducidad", "FechaCaducidad <> ''") <> ""
|
||||||
|
|
||||||
GvInv.DataSource = DtTemporal.FiltraParametros("EliminarDB = False")
|
GvInv.DataSource = DtTemporal.FiltraParametros("EliminarDB = False")
|
||||||
GvInv.DataBind()
|
GvInv.DataBind()
|
||||||
|
|||||||
@@ -2545,7 +2545,7 @@ Partial Class ProductosyServicios
|
|||||||
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
DdlAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||||
DdlAlmacen.DataBind()
|
DdlAlmacen.DataBind()
|
||||||
|
|
||||||
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa)
|
DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
DdlSeccionAlmacen.Items.Add(New ListItem("Seleccione", "-1"))
|
||||||
DdlSeccionAlmacen.DataBind()
|
DdlSeccionAlmacen.DataBind()
|
||||||
|
|
||||||
|
|||||||
@@ -1614,7 +1614,7 @@
|
|||||||
Almacén:
|
Almacén:
|
||||||
<asp:DropDownList ID="ddlAlmacen" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="select2me" Width="200px"></asp:DropDownList>
|
<asp:DropDownList ID="ddlAlmacen" AppendDataBoundItems="true" runat="server" DataTextField="Almacen" DataValueField="CveAlmacen" CssClass="select2me" Width="200px"></asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<div class=" col-sm-8">
|
<div class=" col-sm-10">
|
||||||
<div class="Widthall" style="overflow-x: auto;">
|
<div class="Widthall" style="overflow-x: auto;">
|
||||||
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Origen" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
|
<asp:GridView ID="GvInv" runat="server" AutoGenerateColumns="false" DataKeyNames="Origen" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" Width="100%" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -1655,7 +1655,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="Lote" HeaderText="Lote" />
|
<asp:BoundField DataField="Lote" HeaderText="Lote" />
|
||||||
<asp:BoundField DataField="Batch" HeaderText="Batch" />
|
<asp:BoundField DataField="FechaCaducidad" HeaderText="FechaCaducidad" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Reference in New Issue
Block a user