Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -1588,6 +1588,58 @@ Public Class ClsInventarios
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetExistenciasCaducidad(CvePS As Integer, CveAlmacen As Integer, CveUsuario As Integer, CveEmpresa As Integer, Optional CveAlmacenes As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ExistenciaCaducidadGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CveAlmacen", SqlDbType.VarChar).Value = CveAlmacen
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacenes", SqlDbType.VarChar).Value = CveAlmacenes
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch Ex1 As SqlException
|
||||
|
||||
Me.OnError("Ocurrió un error al obtener el kardex de almacen.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el kardex de almacen.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
Public Function GetProductosCaducidad(CveProveedor As Integer, FechaInicio As Date, FechaFin As Date, CveSubProyecto As Integer, CveClasificacion As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Inv_ProductosCaducidadGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor
|
||||
.Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio
|
||||
.Add("@FechaFin", SqlDbType.Date).Value = FechaFin
|
||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener el listo de caducidad de productos.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
#Region " INVENTARIOS - REPORTES "
|
||||
|
||||
@@ -38,14 +38,14 @@ Public Class ClsPaginas
|
||||
|
||||
|
||||
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return False
|
||||
Else
|
||||
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
End If
|
||||
End Get
|
||||
Public ReadOnly Property EsProduccion As Boolean
|
||||
Get
|
||||
If IsNothing(System.Configuration.ConfigurationManager.AppSettings("EsProduccion")) Then
|
||||
Return False
|
||||
Else
|
||||
Return (System.Configuration.ConfigurationManager.AppSettings("EsProduccion").ToString() = "1")
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
#Region "Propiedades"
|
||||
@@ -3783,6 +3783,7 @@ Public Class ClsPaginas
|
||||
PaginaDict.Add("/Contratos/Contrato2.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Flotillas/CatMantenimientos.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Inventarios/PaqueteDetalles.aspx".ToUpper(), -1)
|
||||
PaginaDict.Add("/Inventarios/RepProductosPorCaducar.aspx".ToUpper(), 693)
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -56,8 +56,8 @@ Public Class ClsProductosServicios
|
||||
Public Property CveMetodoInventario As Integer
|
||||
Public Property CveTipoPS As Integer
|
||||
Public Property Estado2 As Integer
|
||||
Public Property CveMarca As Integer
|
||||
|
||||
Public Property CveMarca As Integer
|
||||
|
||||
Public Property IEPSPorcentaje As Double
|
||||
|
||||
Public Property AplicaIEPS As Boolean
|
||||
@@ -202,11 +202,11 @@ Public Class ClsProductosServicios
|
||||
CveConexion = 0
|
||||
End If
|
||||
|
||||
End Sub
|
||||
End Sub
|
||||
#End Region
|
||||
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1",
|
||||
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
|
||||
Public Function GetPS(CvePS As Integer, CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional Codigo2 As String = "-1",
|
||||
Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional EsPaquete As Integer = -1, Optional CveSubProyecto As Integer = -1,
|
||||
Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional CveTipoPS As Integer = -1,
|
||||
Optional CveCompuesto As Integer = -1, Optional SATClavePS As String = "-1", Optional TopSelect As Integer = 10000) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -1685,10 +1685,10 @@ Public Class ClsProductosServicios
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
|
||||
#Region "Precios Lista"
|
||||
Public Function GetPSPreciosLista(CveEmpresa As Integer, CvePrecioLista As Integer, Optional CveClasificacion As Integer = -1, Optional CvePS As Integer = -1,
|
||||
Optional CveProveedor As Integer = -1, Optional Estado As Integer = -1, Optional Marcas As String = "-1", Optional CveModelo As Integer = -1) As Boolean
|
||||
@@ -1846,7 +1846,7 @@ Public Class ClsProductosServicios
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
End Function
|
||||
Public Function GetPSExistenciasWS(CvePS As Integer, CvePrecioLista 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,
|
||||
Optional FechaMovto As String = "-1", Optional Serie As String = "-1", Optional CveVendedor As Integer = -1, Optional CveCliente As Integer = -1,
|
||||
@@ -1855,38 +1855,38 @@ Public Class ClsProductosServicios
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_ProductosExistenciasWSGet")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||
.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("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||
End With
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||
.Add("@CvePrecioLista", SqlDbType.Int).Value = CvePrecioLista
|
||||
.Add("@CveUnidadMedida", SqlDbType.Int).Value = CveUnidadMedida
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveAlmacen", SqlDbType.Int).Value = CveAlmacen
|
||||
.Add("@CveSeccionAlmacen", SqlDbType.Int).Value = CveSeccionAlmacen
|
||||
.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("@Serie", SqlDbType.VarChar).Value = Serie
|
||||
.Add("@Lote", SqlDbType.VarChar).Value = Lote
|
||||
.Add("@Batch", SqlDbType.VarChar).Value = Batch
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||
.Add("@ExcluyeAdelantado", SqlDbType.Int).Value = ExcluyeAdelantado
|
||||
.Add("@PendientePorSurtir", SqlDbType.Int).Value = PendientePorSurtir
|
||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al obtener las productos y sus existencias.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
|
||||
End Try
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
#Region "Porcentaje Productos"
|
||||
Public Function GetPorcentajeProductos(CveCliente As Integer) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -3258,7 +3258,7 @@ Partial Class Bancos_ProveedoresAbonar
|
||||
' Alert(alertaContabilizacion, ModExtensiones.TipoMensaje.MsgInformacion)
|
||||
|
||||
Else
|
||||
Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
'Alert("Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico", TipoMensaje.MsgError)
|
||||
MsgError = "Ocurrio un error al contabilizar, pongase en contacto con Soporte Técnico"
|
||||
End If
|
||||
|
||||
|
||||
@@ -3876,7 +3876,7 @@ Partial Class PopUpVerFactura
|
||||
Dr("Abono") = 0
|
||||
DtMovimientosPoliza.Rows.Add(Dr)
|
||||
End If
|
||||
ElseIf UsuarioActual.CveEmpresa = 119 Then
|
||||
ElseIf UsuarioActual.CveEmpresa.Contiene(119, 141) Then
|
||||
Dim PreP As New ClsContabilidad
|
||||
If PreP.GetPrePolizasDetalle(-1, CveIE) Then
|
||||
DtMovimientosPoliza = New DataTable
|
||||
@@ -3889,8 +3889,8 @@ Partial Class PopUpVerFactura
|
||||
|
||||
For Each drt As DataRow In PreP.DtResultados.Rows
|
||||
Dim Dr = DtMovimientosPoliza.NewRow
|
||||
Dr("CODIGO") = drt("ContpaqCodigo")
|
||||
Dr("Cuenta") = drt("ContpaqCuenta")
|
||||
Dr("CODIGO") = drt("CuentaCodigo")
|
||||
Dr("Cuenta") = drt("CuentaNombre")
|
||||
Dr("Cargo") = If(drt("TipoMovto").ToString = "False", drt("ImporteMN"), "0")
|
||||
Dr("Abono") = If(drt("TipoMovto").ToString = "True", drt("ImporteMN"), "0")
|
||||
DtMovimientosPoliza.Rows.Add(Dr)
|
||||
|
||||
@@ -1026,6 +1026,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
AplicaCaducidad = If(GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePSSerie).FiltraParametros("").Rows(0)("AplicaCaducidad").ToString = "True", True, False)
|
||||
End If
|
||||
|
||||
GvSerie.Columns(1).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
|
||||
If AplicaCaducidad Then
|
||||
GvSerie.Columns(1).Visible = True
|
||||
TdCaducidad1.Visible = True
|
||||
@@ -1229,6 +1231,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Private Sub CargaLote(Optional CerrarCompletado As Boolean = False)
|
||||
|
||||
RegistraScript("$('#DivLote').modal('show')")
|
||||
GvLote.Columns(2).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvLote.DataSource = DtDatosDetalleLote.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvLote.DataBind()
|
||||
|
||||
|
||||
@@ -127,6 +127,9 @@
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkSeries" Visible="false" runat="server"><i class="fa fa-list"></i> Series Disponibles</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCaducidad" Visible="false" runat="server"><i class="fa fa-list"></i> Caducidad de producto</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<a target="_blank" class="ayuda" href="../Documentacion/DocumentacionInventarios.aspx#Kardex"> </a>
|
||||
</li>
|
||||
@@ -378,6 +381,11 @@
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioD" Text='<%# Eval("FolioDocto")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" HeaderText="Folio Rel." Visible="false">
|
||||
<ItemTemplate>
|
||||
<asp:HyperLink runat="server" Target="_blank" ID="hlFolioDr" Text='<%# Eval("FolioRelacionEntrada")%>' NavigateUrl='<%# Eval("CveVentaRelacionada", "/Ventas/Ventas.aspx?CveVenta={0}")%>' CssClass="Texto" />
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField ItemStyle-Width="100px" ItemStyle-HorizontalAlign="Left" HeaderText="U. M.">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="lbUm" runat="server" Text='<%# Eval("UnidadMedida")%>' data-toggle="tooltip" title='<%# Eval("CveUnidadMedida")%>'></asp:Label>
|
||||
@@ -538,6 +546,43 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DivModalCaducidad" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpdatePanel2" UpdateMode="Conditional" RenderMode="Inline" style="width:50%">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="Literal1" Text="Producto con caducidad" runat="server"> </asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row" style="width:100%">
|
||||
<div style="width:98%;margin-left:1.5%;margin-right:1.5%">
|
||||
<asp:UpdatePanel ID="UpProductoCaducidad" runat="server" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvProductoCaducidad" Width="98%" runat="server" ShowHeader="true" EmptyDataText="No hay registros." AutoGenerateColumns="False" AllowPaging="False"
|
||||
ShowFooter="True" ShowHeaderWhenEmpty="True" CssClass="table table-striped table-advance table-hover ScrollAD" GridLines="None"
|
||||
DataKeyNames="Almacen,Cantidad,FechaCaducidad">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Almacén" DataField="Almacen"/>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right"/>
|
||||
<asp:BoundField HeaderText="Fecha Caducidad" DataField="FechaCaducidad" DataFormatString="{0:dd/MM/yyyy}"/>
|
||||
</Columns>
|
||||
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<button type="button" class="btn btn-primary" data-dismiss="modal">Cerrar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
|
||||
@@ -66,9 +66,9 @@ Partial Class Inventarios_Kardex
|
||||
Private Sub CargaPermisos()
|
||||
If UsuarioActual.CveRol = 1 Then ChkAgruparAlmacen.Visible = True
|
||||
Dim TienePermisoImportes As Boolean = UsuarioActual.TienePermisoProceso(201)
|
||||
GvM.Columns(13).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(16).Visible = TienePermisoImportes ' valor
|
||||
GvM.Columns(14).Visible = TienePermisoImportes ' costo
|
||||
GvM.Columns(15).Visible = TienePermisoImportes ' importe
|
||||
GvM.Columns(17).Visible = TienePermisoImportes ' valor
|
||||
End Sub
|
||||
|
||||
Private Function isWithFamily() As Boolean
|
||||
@@ -87,7 +87,7 @@ Partial Class Inventarios_Kardex
|
||||
CBLTiposAlmacen.DataSource = GlobalDTTipoAlmacen(-1)
|
||||
CBLTiposAlmacen.DataBind()
|
||||
For Each item As ListItem In CBLTiposAlmacen.Items
|
||||
If item.Text = "Entrega Adelantado" Then
|
||||
If item.Text.Contiene("Entrega Adelantado", "Transitorio") Then
|
||||
item.Selected = False
|
||||
Else
|
||||
item.Selected = True
|
||||
@@ -199,13 +199,18 @@ Partial Class Inventarios_Kardex
|
||||
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
|
||||
|
||||
GvM.Columns(6).Visible = DtTemp.MAX("FolioRelacionEntrada") <> ""
|
||||
|
||||
If AplicaSeccion Then GvM.Columns(8).Visible = True
|
||||
If AplicaSerie Then GvM.Columns(9).Visible = True
|
||||
If AplicaLote Then GvM.Columns(10).Visible = True
|
||||
If AplicaCaducidad Then GvM.Columns(11).Visible = True
|
||||
|
||||
Dim AuxAplicaSerie As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaSerie") = "True"
|
||||
Dim AuxAplicaCad As Boolean = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CveProducto).FiltroPrimeroValor("AplicaCaducidad") = "True"
|
||||
LnkSeries.Visible = AuxAplicaSerie
|
||||
LnkCaducidad.Visible = AuxAplicaCad
|
||||
'CARGA INDICADORES
|
||||
If UsuarioActual.TienePermisoProceso(201) Then
|
||||
DivIndicadores.Visible = True
|
||||
@@ -324,6 +329,19 @@ Partial Class Inventarios_Kardex
|
||||
ObjInventarios.Dispose()
|
||||
GvSeries.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargarCaducidadProducto()
|
||||
Dim almacenes As String = ddlAlmacen.GetSelectedValues()
|
||||
If almacenes = "" Then
|
||||
almacenes = "-1"
|
||||
End If
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetExistenciasCaducidad(ddlProducto2.SelectedValue.ToEntero(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
|
||||
GvProductoCaducidad.DataSource = ObjInventarios.DtResultados
|
||||
End If
|
||||
ObjInventarios.Dispose()
|
||||
GvProductoCaducidad.DataBind()
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
#Region " IMPRIMIR "
|
||||
@@ -440,6 +458,12 @@ Partial Class Inventarios_Kardex
|
||||
UpGridSeries.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalSerie"))
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCaducidad_OnClick(sender As Object, e As EventArgs) Handles LnkCaducidad.Click
|
||||
CargarCaducidadProducto()
|
||||
UpProductoCaducidad.Update()
|
||||
RegistraScript(String.Format("$('#{0}').modal('show');", "DivModalCaducidad"))
|
||||
End Sub
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -200,7 +200,8 @@
|
||||
<asp:Label runat="server" ID="LblProyectado" Text="Incluir Proyectados" class="col-md-1 truncate" />
|
||||
<div class="col-md-2">
|
||||
<asp:DropDownList ID="DdlProyeccionFiltro" runat="server" CssClass="select2me" Width="100%" >
|
||||
<asp:ListItem Text="Si" Value="1" />
|
||||
<asp:ListItem Text="Entradas" Value="1" />
|
||||
<asp:ListItem Text="Salidas" Value="2" />
|
||||
<asp:ListItem Text="No" Value="0" Selected="True" />
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
|
||||
@@ -489,7 +489,7 @@
|
||||
<asp:LinkButton runat="server" ID="LnkCaducidad" class="btn default" Visible="false"> <i class="fa fa-calendar"></i> </asp:LinkButton>
|
||||
</span>
|
||||
<ajax:MaskedEditExtender ID="MEECaducidad" runat="server" TargetControlID="TxtCaducidad" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomRight" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CECaducidad" TargetControlID="TxtCaducidad" PopupButtonID="LnkCaducidad" PopupPosition="BottomLeft" Enabled="True" Format="dd/MM/yyyy"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="RFVCaducidad" runat="server" ControlToValidate="TxtCaducidad" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCECaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RFVCaducidad"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -1824,6 +1824,7 @@ Partial Class Inventarios_RecepcionAlmacen
|
||||
End Sub
|
||||
Private Sub CargaLote(Tipo As Integer, Optional CerrarCompletado As Boolean = False)
|
||||
RegistraScript("$('#DivLote').modal();", "ModalLote")
|
||||
GvLote.Columns(2).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvLote.DataSource = DtDatosLoteDetalle.FiltraParametros(String.Format("ConsecId = {0}", CveConsecSerie), "Consec DESC")
|
||||
GvLote.DataBind()
|
||||
|
||||
|
||||
@@ -35,7 +35,7 @@ Partial Class Inventarios_RepApartados
|
||||
DdlSubProyectos.DataBind()
|
||||
DdlSubProyectos.Items.Insert(0, New ListItem(" Todas ", "-1"))
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
@@ -44,15 +44,9 @@ Partial Class Inventarios_RepApartados
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
If UsuarioActual.CveEmpresa = 119 Then
|
||||
DdlClienteTraspasar.setEsWebService(True)
|
||||
Else
|
||||
DdlClienteTraspasar.setEsWebService(False)
|
||||
DdlClienteTraspasar.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClienteTraspasar.DataBind()
|
||||
DdlClienteTraspasar.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
|
||||
|
||||
DdlClienteTraspasar.setEsWebService(True)
|
||||
|
||||
Dim DTVendedores As New DataTable
|
||||
DTVendedores = GlobalDTVendedores(UsuarioActual.CveEmpresa, True)
|
||||
DTVendedores.Merge(GlobalDTVendedores(UsuarioActual.CveEmpresa, False))
|
||||
@@ -139,7 +133,13 @@ Partial Class Inventarios_RepApartados
|
||||
End If
|
||||
|
||||
DdlClienteTraspasar.SelectedValue = "-1"
|
||||
DdlClienteTraspasar.SelectedText = "Seleccione"
|
||||
DdlClienteTraspasar.SelectedText = "Seleccione"
|
||||
|
||||
|
||||
If UsuarioActual.CveVendedor > 0 AndAlso CveVendedor.ToEntero <= 0 Then
|
||||
CveVendedor = UsuarioActual.CveVendedor.ToString
|
||||
End If
|
||||
|
||||
|
||||
DdlVendedor.SelectedValueExist(CveVendedor)
|
||||
DdlSubProyectos.SelectedValueExist(CveSucursal)
|
||||
|
||||
104
Inventarios/RepProductosPorCaducar.aspx
Normal file
104
Inventarios/RepProductosPorCaducar.aspx
Normal file
@@ -0,0 +1,104 @@
|
||||
<%@ Page Title="Compras - Reporte de Productos por Caducar" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="RepProductosPorCaducar.aspx.cs" Inherits="Inventarios_RepProductosPorCaducar" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||
<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="HB" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content4" ContentPlaceHolderID="E" runat="Server">
|
||||
Reporte de Productos por Caducar
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||
<asp:UpdatePanel ID="UpLnkAcciones" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirPDF" runat="server" OnClick="LnkImprimirPDF_Click" Visible="true"><i class="fa fa-file-pdf-o"></i><span style="padding: 10px">PDF</span></asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkImprimirExcel" runat="server" OnClick="LnkImprimirExcel_Click" Visible="true"><i class="fa fa-file-excel-o"></i><span style="padding: 10px">Excel</span></asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
<Triggers>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirPDF"/>
|
||||
<asp:PostBackTrigger ControlID="LnkImprimirExcel"/>
|
||||
</Triggers>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div id="PFiltros" class="portlet solid grey-cascade portlet-filter">
|
||||
<div class="portlet-title portlet-filterT smalltitle">
|
||||
<div class="tools">
|
||||
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" OnClick="BtnConsultar_Click" class="btn btn-primary" ValidationGroup="Valida" />
|
||||
<a href="javascript:;" class="expand"></a>
|
||||
</div>
|
||||
<div class="titlefiltros caption">
|
||||
<div class="row" style="margin-left: 10px;">
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Proveedor:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<ADS:Dropdownlost ID="DdlProveedor" runat="server" DataValueField="CveProveedor" DataTextField="RazonSocial" CssClassDdl="select2me" Width="100%" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Fecha Inicio:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;display:flex">
|
||||
<asp:TextBox ID="TxtFechaInicio" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="ImgCalFechaIEjec" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MEEFechaIEjec" runat="server" TargetControlID="TxtFechaInicio" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalFechaIEjec" runat="server" TargetControlID="TxtFechaInicio" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Fecha Fin:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="width: 100% !important; padding: 0px;display:flex">
|
||||
<asp:TextBox ID="TxtFechaFin" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LinkButton1" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtFechaFin" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CalendarExtender1" runat="server" TargetControlID="TxtFechaFin" PopupButtonID="ImgCalFechaIEjec" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Sucursal:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList runat="server" ID="DdlSucursal" CssClass="select2me" DataTextField="SubProyecto" DataValueField="CveSubProyecto"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-sm-1" style="text-align:right">
|
||||
<label>Clasificación:</label>
|
||||
</div>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList runat="server" ID="DdlClasificacion" CssClass="select2me" DataTextField="Clasificacion" DataValueField="CveClasificacion" Width="100%"/>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="Cantidad,PS,Lote,FechaCaducidad" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Reporte de productos caducidad " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Cantidad" DataField="Cantidad" DataFormatString="{0:n2}" ItemStyle-HorizontalAlign="Right" />
|
||||
<asp:BoundField HeaderText="PS" DataField="PS" />
|
||||
<asp:BoundField HeaderText="Lote" DataField="Lote" />
|
||||
<asp:BoundField HeaderText="FechaCaducidad" DataField="FechaCaducidad" DataFormatString = "{0:dd/MM/yyyy}" />
|
||||
</Columns>
|
||||
</asp:GridView>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
</asp:Content>
|
||||
141
Inventarios/RepProductosPorCaducar.aspx.cs
Normal file
141
Inventarios/RepProductosPorCaducar.aspx.cs
Normal file
@@ -0,0 +1,141 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
using System.Data;
|
||||
using Microsoft.Reporting.WebForms;
|
||||
using System.Text;
|
||||
|
||||
public partial class Inventarios_RepProductosPorCaducar : ClsPaginas
|
||||
{
|
||||
private DataTable DTDatos
|
||||
{
|
||||
get
|
||||
{
|
||||
return (DataTable)ViewState["DTDatos"];
|
||||
}
|
||||
|
||||
set
|
||||
{
|
||||
ViewState["DTDatos"] = value;
|
||||
}
|
||||
}
|
||||
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
if (!IsPostBack)
|
||||
{
|
||||
CargaFiltros();
|
||||
CargarDatos();
|
||||
}
|
||||
}
|
||||
|
||||
private void CargarDatos()
|
||||
{
|
||||
ClsInventarios ObjInventarios = new ClsInventarios();
|
||||
if (ObjInventarios.GetProductosCaducidad(DdlProveedor.SelectedValue.ToEntero(),TxtFechaInicio.Text.ToDate(),TxtFechaFin.Text.ToDate(), DdlSucursal.SelectedValue.ToEntero(),
|
||||
DdlClasificacion.SelectedValue.ToEntero()))
|
||||
{
|
||||
GvDatos.DataSource = ObjInventarios.DtResultados;
|
||||
DTDatos = ObjInventarios.DtResultados;
|
||||
}
|
||||
ObjInventarios.Dispose();
|
||||
GvDatos.DataBind();
|
||||
}
|
||||
|
||||
private void CargaFiltros()
|
||||
{
|
||||
CargarFechaText();
|
||||
CargarProveedores();
|
||||
CargarSucursales();
|
||||
CargarClasificaciones();
|
||||
|
||||
}
|
||||
|
||||
private void CargarFechaText()
|
||||
{
|
||||
DateTime date = new DateTime(DateTime.Today.Year, DateTime.Today.Month,1);
|
||||
TxtFechaInicio.Text = date.ToString("dd/MM/yyyy");
|
||||
TxtFechaFin.Text = date.AddMonths(1).AddDays(-1).ToString("dd/MM/yyyy");
|
||||
}
|
||||
|
||||
private void CargarProveedores()
|
||||
{
|
||||
DdlProveedor.setEsWebService(true);
|
||||
DdlProveedor.Attributes.Add("data-metodo", "getproveedores");
|
||||
DdlProveedor.SelectedValue = "-1";
|
||||
DdlProveedor.SelectedText = "Todos";
|
||||
}
|
||||
|
||||
private void CargarSucursales()
|
||||
{
|
||||
ClsSubProyectos ObjSubProyectos = new ClsSubProyectos();
|
||||
if (ObjSubProyectos.GetSubProyectos(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlSucursal.DataSource = ObjSubProyectos.DtResultados;
|
||||
}
|
||||
ObjSubProyectos.Dispose();
|
||||
DdlSucursal.DataBind();
|
||||
DdlSucursal.Items.Insert(0, new ListItem("Todas", "-1"));
|
||||
}
|
||||
|
||||
private void CargarClasificaciones()
|
||||
{
|
||||
ClsClasificaciones ObjClasificacion = new ClsClasificaciones();
|
||||
if (ObjClasificacion.GetClasificaciones(UsuarioActual.CveEmpresa))
|
||||
{
|
||||
DdlClasificacion.DataSource = ObjClasificacion.DtResultados;
|
||||
}
|
||||
ObjClasificacion.Dispose();
|
||||
DdlClasificacion.DataBind();
|
||||
DdlClasificacion.Items.Insert(0,new ListItem("Todas","-1"));
|
||||
}
|
||||
|
||||
protected void BtnConsultar_Click(object sender, EventArgs e)
|
||||
{
|
||||
CargarDatos();
|
||||
UpDatos.Update();
|
||||
}
|
||||
|
||||
protected void LnkImprimirPDF_Click(object sender, EventArgs e)
|
||||
{
|
||||
ImprimirReporte("PDF");
|
||||
}
|
||||
|
||||
protected void LnkImprimirExcel_Click(object sender, EventArgs e)
|
||||
{
|
||||
ImprimirReporte("Excel");
|
||||
}
|
||||
|
||||
private void ImprimirReporte(string formato)
|
||||
{
|
||||
StringBuilder Filtros = new StringBuilder();
|
||||
Filtros.AppendFormat("<strong>Proveedor: </strong>{0} ", DdlProveedor.SelectedText);
|
||||
Filtros.AppendFormat("<strong>Fecha Inicio: </strong>{0} ", TxtFechaInicio.Text);
|
||||
Filtros.AppendFormat("<strong>Fecha Fin: </strong>{0} ", TxtFechaFin.Text);
|
||||
Filtros.AppendFormat("<strong>Sucursal: </strong>{0} ", DdlSucursal.SelectedItem.Text);
|
||||
Filtros.AppendFormat("<strong>Clasificación: </strong>{0} ", DdlClasificacion.SelectedItem.Text);
|
||||
List<ReportParameter> @params = new List<ReportParameter>();
|
||||
|
||||
@params.Add(new ReportParameter("Filtros", Filtros.ToString()));
|
||||
@params.Add(new ReportParameter("UsuarioImprimio", UsuarioActual.Nombre));
|
||||
@params.Add(new ReportParameter("NombreEmpresa", UsuarioActual.Empresa.Empresa));
|
||||
|
||||
var logouri = string.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa);
|
||||
System.IO.FileInfo Imagen = new System.IO.FileInfo(string.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta));
|
||||
if (Imagen.Exists)
|
||||
{
|
||||
@params.Add(new ReportParameter("LogoPath", logouri));
|
||||
}
|
||||
else
|
||||
{
|
||||
@params.Add(new ReportParameter("LogoPath", ""));
|
||||
}
|
||||
@params.Add(new ReportParameter("FechaCaducidadHeader", (UsuarioActual.Empresa.Funcionalidad(147) == "Fecha Elaboración" ? "Fecha Elaboración" : "Fecha Caducidad")));
|
||||
|
||||
ImprimirPDF("Empresas/Grales/Formatos/RepProductosCaducidad.rdlc", DTDatos, @params, "Reporte de Productos por Caducar", formato);
|
||||
}
|
||||
}
|
||||
@@ -1016,7 +1016,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -1316,6 +1316,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
|
||||
GvDatos.Columns(5).Visible = DtTemp.MAX("Serie").ToString <> ""
|
||||
GvDatos.Columns(6).Visible = DtTemp.MAX("Lote").ToString <> ""
|
||||
GvDatos.Columns(7).HeaderText = If(UsuarioActual.Empresa.Funcionalidad(147) = "Fecha Elaboración", "Fecha Elaboración", "Fecha Caducidad")
|
||||
GvDatos.Columns(7).Visible = DtTemp.MAX("FechaCaducidad").ToString.ToDate > MinFecha
|
||||
GvDatos.Columns(8).Visible = DtTemp.MAX("CveSeccionAlmacen").ToString.ToEntero > 0
|
||||
|
||||
@@ -1731,7 +1732,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim ImporteDecimal As Decimal = importe.ToDecimal.RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, ImporteDecimal, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1,
|
||||
CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=ImporteDecimal) Then
|
||||
ErrorMovInv = True
|
||||
TextoError = "Ocurrió un erro al cancelar el traspaso"
|
||||
@@ -1823,7 +1824,7 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim Fecha As Date = TxtFechaRecepcion.Text.ToDate
|
||||
|
||||
Dim CveAlmacenEntrada As Integer = GvDatosRecepcion.Rows(0).DataKey("CveAlmacenDestino").ToEntero
|
||||
Dim CveAlmacenSalida As Integer = GvDatosRecepcion.Rows(0).DataKey("CveAlmacenSalida").ToEntero
|
||||
Dim CveAlmacenSalida As Integer = DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero
|
||||
|
||||
Dim TipoAlmacenDestino As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenEntrada}").ToEntero()
|
||||
Dim TipoAlmacenOrigen As Integer = GlobalDTAlmacenUsuarios(UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveTipoAlmacen", $"CveAlmacen = {CveAlmacenSalida}").ToEntero()
|
||||
@@ -1902,11 +1903,11 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
Dim importe As Decimal = resultado.SUMD("Total").RoundSQL
|
||||
Dim IdCtaContable As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", DdlAlmacenTransitorioRecepcion.SelectedValue.ToEntero)).ToEntero
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 289, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoSalida, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importe, TxtObservaciones.Text, 68, TxtObservaciones.Text, Fecha, IdCtaContable, -1, CveMovimientoAlmacen:=CveMovimientoEntrada, ImporteMX:=importe, Contabilizable:=False) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
End If
|
||||
@@ -2027,8 +2028,8 @@ Partial Class Inventarios_TraspasoAlmacen
|
||||
TxtObservacionesRecepcion.Text = ""
|
||||
|
||||
Dim Mensaje As StringBuilder = New StringBuilder
|
||||
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoSalida)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoSalida))) 'onclick='ImprimirTraslado()'
|
||||
Mensaje.AppendFormat("Se realizo correctamente la recepción. <br/> Folio de Entrada: <b><a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{0}</a></b>", Folio, CveMovimientoEntrada)
|
||||
Mensaje.AppendFormat("<br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoEntrada))) 'onclick='ImprimirTraslado()'
|
||||
If CveMovimientoVirtualEntrada > 0 Then Mensaje.AppendFormat("<br/><br/><br/>Folio Virtual <b> <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={1}"" target=""_blank"">{2}</a> </b> <br/><a target='_blank' href='/Compras/PopUpVerFactura.aspx?P={0}'>Imprimir Reporte</a>", Encripta(String.Format("OP=Alm&CveMovimiento={0}", CveMovimientoVirtualEntrada)), CveMovimientoVirtualEntrada, FolioVirtualEntrada) 'onclick='ImprimirTraslado()'
|
||||
|
||||
|
||||
|
||||
@@ -876,7 +876,7 @@
|
||||
<div class="row" style="margin-top: 5px;" runat="server" id="DivTiempoCaducidad" visible="false">
|
||||
<label class="col-md-6 truncate">Tiempo de Caducidad</label>
|
||||
<div class="col-md-6">
|
||||
<asp:TextBox runat="server" ID="TxtTiempoCaducidad"/><label>Días</label>
|
||||
<asp:TextBox runat="server" ID="TxtTiempoCaducidad" Width="75px"/><label>Días</label>
|
||||
<asp:RegularExpressionValidator ID="RfvTxtTiempoCaducidad" runat="server" ControlToValidate="TxtTiempoCaducidad" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tiempo Caducidad''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardar" ValidationExpression="\d{1,}" Display="None"></asp:RegularExpressionValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VceTxtTiempoCaducidad" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtTiempoCaducidad" Width="300px" ></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
|
||||
@@ -876,6 +876,10 @@ Partial Class ProductosyServicios
|
||||
ChkLote.Checked = ObjProductosServicios.AplicaLote
|
||||
ChkCaducidad.Checked = ObjProductosServicios.AplicaCaducidad
|
||||
ChkSeccion.Checked = ObjProductosServicios.AplicaSeccion
|
||||
If ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad") IsNot Nothing Then
|
||||
TxtTiempoCaducidad.Text = ObjProductosServicios.DtResultados.Rows(0)("TiempoCaducidad").ToString()
|
||||
DivTiempoCaducidad.Visible = ChkCaducidad.Checked
|
||||
End If
|
||||
|
||||
If ObjProductosServicios.AplicaSeccion Then
|
||||
CargaGvSeccionAlmacen()
|
||||
|
||||
Reference in New Issue
Block a user