SMS - 2024.02.22

This commit is contained in:
rakcsle
2024-02-23 08:38:28 -07:00
parent 28215a387e
commit 85a65dd637
8 changed files with 181 additions and 18 deletions

View File

@@ -73,7 +73,7 @@ Public Class ClsOS
Public Property CveVenta As Integer = -1
Public Property Paciente As String
Public Property IdentificadorCliente As String
Public Property FolioAdicional As String
Private Class Especificaciones
Public CveValor As Integer
Public CvePSCaracteristica As Integer
@@ -595,6 +595,7 @@ Public Class ClsOS
Me.Paciente = Data.Rows(0)("Paciente").ToString
Me.IdentificadorCliente = Data.Rows(0)("IdentificadorCliente").ToString
Me.CveVenta = Data.Rows(0)("CveVenta").ToString.ToEntero
Me.FolioAdicional = Data.Rows(0)("FolioAdicional").ToString
End If
Retorno = True
@@ -1308,7 +1309,7 @@ Public Class ClsOS
Return Retorno
End Function
Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer, Optional Paciente As String = "-1", Optional Episodio As String = "-1", Optional FolioAdicional As String = "") As Boolean
Dim Retorno As Boolean = False
DataAdapter("PA_OS_UpdateVentaOS")
@@ -1318,6 +1319,7 @@ Public Class ClsOS
.Add("@CveOS", SqlDbType.Int).Value = CveOS
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
.Add("@FolioAdicional", SqlDbType.VarChar).Value = FolioAdicional
End With
Try

View File

@@ -406,6 +406,7 @@ Partial Class Inventarios_EntradasSalidas
EsConsumoInterno = False
EsNuevoMov = False
CvePrePoliza = -1
CveEntregaAlmacen = -1
CreaDT()
CargaCombos()

View File

@@ -220,26 +220,42 @@
DataKeyNames="Cantidad,CvePS,CveUM,Consec,AplicaSeccion,AplicaSerie,AplicaCaducidad,AplicaLote,CodigoPS" runat="server" AutoGenerateColumns="false"
EmptyDataText="No se encontraron datos con los filtros especificados" CssClass="table table-striped table-hover Widthall" BorderColor="#D3D3D3" GridLines="None">
<Columns>
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="15%" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
<%--0--%>
<asp:BoundField HeaderText="Cant. Necesaria" DataField="Cantidad" ItemStyle-Width="30px" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
<%--1--%>
<asp:BoundField HeaderText="Cant. Disponible" DataField="CantidadDisponible2" ItemStyle-Width="30px" DataFormatString="{0:###,###,###,##0.##}" ItemStyle-HorizontalAlign="Right" />
<%--2--%>
<asp:BoundField HeaderText="Producto/Servicio" DataField="CodigoPS" ItemStyle-Width="40%" />
<%--3--%>
<asp:BoundField HeaderText="Unidad Medida" DataField="UnidadMedida" ItemStyle-Width="20%" />
<%--4--%>
<asp:TemplateField HeaderText="Serie">
<ItemTemplate>
<asp:Button Text="Serie" ID="BtnSerie" OnClick="BtnSerie_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" />
<asp:LinkButton Text="<i class='fa fa-star'></i>" ID="BtnSeriePaquete" OnClick="BtnSeriePaquete_Click" CssClass="btn btn-xs btn-primary" runat="server" Style="float: left;" data-toggle="tooltip" title="Seleccionar como serie del paquete" />
</ItemTemplate>
</asp:TemplateField>
<%--5--%>
<asp:TemplateField HeaderText="Sección">
<ItemTemplate>
<asp:DropDownList ID="DdlSeccionAlmacen" DataTextField="SeccionAlmacen" AppendDataBoundItems="true" DataValueField="CveSeccionAlmacen" CssClass="select2me" runat="server" />
</ItemTemplate>
</asp:TemplateField>
<%--6--%>
<asp:TemplateField HeaderText="Lote/Caducidad" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="270px">
<ItemTemplate>
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="100%" runat="server" CausesValidation="true" AutoPostBack="true" OnSelectedIndexChanged="DdlCaducidadProducto_SelectedIndexChanged">
<asp:ListItem Selected="True" Text="-" Value="|"></asp:ListItem>
</asp:DropDownList>
</ItemTemplate>
</asp:TemplateField>
<%--7--%>
<asp:TemplateField HeaderText="Lote">
<ItemTemplate>
<asp:TextBox ID="TxtLote" CssClass="form-control input-sm" runat="server" Width="80px" Style="text-align: right;"></asp:TextBox>
</ItemTemplate>
</asp:TemplateField>
<%--8--%>
<asp:TemplateField HeaderText="Fecha Caducidad">
<ItemTemplate>
@@ -273,6 +289,7 @@
</ItemTemplate>
</asp:TemplateField>
<%--9--%>
<asp:TemplateField HeaderText="Dividir " ItemStyle-Width="80px" ItemStyle-HorizontalAlign="Center" Visible="True">
<ItemTemplate>
<asp:TextBox runat="server" ID="TxtDividir" Width="30px" onkeydown="return evitarPostBack(event);"></asp:TextBox>

View File

@@ -363,8 +363,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
GvDatosArmado.Columns(4).Visible = DtDatosArmado.MAX("AplicaSerie", "") = "True"
GvDatosArmado.Columns(5).Visible = DtDatosArmado.MAX("AplicaSeccion") = "True"
GvDatosArmado.Columns(6).Visible = DtDatosArmado.MAX("AplicaLote") = "True"
GvDatosArmado.Columns(7).Visible = DtDatosArmado.MAX("AplicaCaducidad") = "True"
GvDatosArmado.Columns(7).Visible = DtDatosArmado.MAX("AplicaLote") = "True"
GvDatosArmado.Columns(8).Visible = DtDatosArmado.MAX("AplicaCaducidad") = "True"
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
GvDatosArmado.Columns(6).Visible = True
GvDatosArmado.Columns(7).Visible = False
GvDatosArmado.Columns(8).Visible = False
End If
'If ErrorExistencias Then
' GvDatosArmado.Columns(4).Visible = False
@@ -476,6 +483,13 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
GvDatosArmado.Columns(6).Visible = DtDatosDesArmado.MAX("AplicaLote") = "True"
GvDatosArmado.Columns(7).Visible = DtDatosDesArmado.MAX("AplicaCaducidad") = "True"
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
GvDatosArmado.Columns(6).Visible = True
GvDatosArmado.Columns(7).Visible = False
GvDatosArmado.Columns(8).Visible = False
End If
BtnGuadarDesarmado.Visible = True
TotalDesarmado.Visible = True
@@ -534,21 +548,48 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
End If
If gvr.DataKey("AplicaLote") = "True" Then
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
Exit Sub
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
Dim DdlCaducidadProducto As DropDownList = gvr.FCDropDownList("DdlCaducidadProducto")
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
Dim Lote As String = ArrayCaducidad(0)
Dim FechaCaducidad As String = ArrayCaducidad(1)
If gvr.DataKey("AplicaLote") = "True" Then
If Lote = "" Then
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If gvr.DataKey("AplicaCaducidad") = "True" Then
If FechaCaducidad.ToDate <= MinFecha Then
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Else
If gvr.DataKey("AplicaLote") = "True" Then
If gvr.FCTextBox("TxtLote").Text.Trim = "" Then
Alert("Es necesario ingresas todos los lotes de los componentes.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
If gvr.DataKey("AplicaCaducidad") = "True" Then
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
End If
If gvr.DataKey("AplicaCaducidad") = "True" Then
If gvr.FCTextBox("TxtCaducidad").Text.ToDate <= MinFecha Then
Alert("Es necesario ingresas todos las fechas de caducidad de los componentes.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Next
Case 2 ' DESARMADO
@@ -645,6 +686,15 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
FechaCaducidad = If(CBool(GvRow.DataKey("AplicaCaducidad")) AndAlso GvRow.FCTextBox("TxtCaducidad").ToString().ToDate > MinFecha, GvRow.FCTextBox("TxtCaducidad").Text.ToDate, MinFecha)
Lote = If(CBool(GvRow.DataKey("AplicaLote")), GvRow.FCTextBox("TxtLote").Text.Trim, "-1")
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
Lote = ArrayCaducidad(0)
FechaCaducidad = ArrayCaducidad(1).ToDate
End If
Dim Existencia As Decimal = ObjInventarioVal.GetExistenciasPS(GvRow.DataKey("CvePS").ToEntero, GvRow.DataKey("CveUM").ToEntero, UsuarioActual.CveEmpresa, CveAlmacen:=DdlAlmacenArmado.SelectedValue.ToEntero(), FechaMovto:=TxtFechaArmado.Text.ToDateTime.ToString("yyyy/MM/dd HH:mm"), Serie:="-1", Lote:=Lote, FechaCaducidad:=FechaCaducidad)
@@ -750,6 +800,16 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
If Gvr.DataKey("Cantidad").ToString.ToDouble > 0 Then
Dim Lote As String = If(Gvr.FCTextBox("TxtLote").Text = "", "-1", Gvr.FCTextBox("TxtLote").Text)
Dim FechaCaducidad As String = If(Gvr.FCTextBox("TxtCaducidad").Text = "", "-1", Gvr.FCTextBox("TxtCaducidad").Text)
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
Dim DdlCaducidadProducto As DropDownList = Gvr.FCDropDownList("DdlCaducidadProducto")
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
Lote = ArrayCaducidad(0)
FechaCaducidad = ArrayCaducidad(1)
End If
Dim CveSeccionAlmacen As Integer = Gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
If CBool(Gvr.DataKey("AplicaSerie")) Then
For Each Dr As DataRow In DtDatosDetalle.FiltraParametros(String.Format("ConsecId = {0}", Gvr.DataKey("Consec").ToEntero)).Rows
@@ -1134,10 +1194,64 @@ Partial Class Inventarios_PaquetesArmadoDesarmado
e.Row.FCButton("BtnDividir").CommandArgument = e.Row.RowIndex.ToString()
e.Row.FCTextBox("TxtDividir").Attributes.Add("onkeyup", String.Format("LimitaCantidad({0},this,'{1}');", e.Row.DBCampo("Cantidad"), e.Row.FCButton("BtnDividir").ClientID))
If Boolean.Parse(e.Row.DataKey("AplicaLote")) Or Boolean.Parse(e.Row.DataKey("AplicaCaducidad")) Then
CargarCaducidadProducto(e.Row.DataKey("CvePS").ToEntero, e.Row.FCDropDownList("DdlCaducidadProducto"))
End If
End If
End Sub
Protected Sub DdlCaducidadProducto_SelectedIndexChanged(sender As Object, e As EventArgs)
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, DropDownList)).NamingContainer, GridViewRow)
Dim AplicaLote As Boolean = Boolean.Parse(GvRow.DataKey("AplicaLote"))
Dim AplicaCaducidad As Boolean = Boolean.Parse(GvRow.DataKey("AplicaCaducidad"))
Dim DdlCaducidadProducto As DropDownList = GvRow.FCDropDownList("DdlCaducidadProducto")
Dim ArrayCaducidad As String() = DdlCaducidadProducto.SelectedValue.Split("|"c)
Dim Lote As String = ArrayCaducidad(0)
Dim FechaCaducidad As String = ArrayCaducidad(1)
If AplicaLote Then
GvRow.FCTextBox("TxtLote").Text = Lote
End If
If AplicaCaducidad Then
GvRow.FCTextBox("TxtCaducidad").Text = FechaCaducidad
End If
UpDatosArmado.Update()
End Sub
Private Sub CargarCaducidadProducto(CvePS As Integer, ByRef DdlLoteFechaCaducidad As DropDownList)
Dim almacenes As String = DdlAlmacenArmado.SelectedValue
If almacenes = "" Then
almacenes = "-1"
End If
Dim ObjInventarios As New ClsInventarios
If ObjInventarios.GetExistenciasCaducidad(CvePS, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, almacenes) Then
For Each dr As DataRow In ObjInventarios.DtResultados.Rows
DdlLoteFechaCaducidad.Items.Add(New ListItem($"Lote: {dr("Lote").ToString} - Cad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
Next
End If
ObjInventarios.Dispose()
End Sub
Protected Sub Dividir(sender As Object, e As EventArgs)
Dim index2 As Integer = 0

View File

@@ -234,6 +234,8 @@
</cc1:TimeSelector>
</ItemTemplate>
</asp:TemplateField>
<%--11--%>
<asp:BoundField DataField="SerieFolio" HeaderText="Folio Ped" ItemStyle-HorizontalAlign="Left" Visible="false" />
</Columns>
</asp:GridView>
</div>

View File

@@ -100,6 +100,7 @@ Partial Class OS_Asignaciones
GvNA.Columns(7).Visible = True
GvNA.Columns(8).Visible = True
GvNA.Columns(11).Visible = True
GvNA.Columns(2).HeaderText = "Hospital"

View File

@@ -290,6 +290,27 @@
</div>
<div class="row" id="DivFolioAdicional" runat="server" visible="false">
<div class="col-md-2" style="margin-top: 5px">
<b>Folio Adicional:</b>
</div>
<div class="col-md-4" style="margin-top: 5px; text-align: left">
<asp:Label runat="server" ID="LblFolioAdicional"></asp:Label>
</div>
<div class="col-md-2" style="margin-top: 5px">
</div>
<div class="col-md-3" style="margin-top: 5px; text-align: left">
</div>
</div>
</div>
</div>
@@ -1321,6 +1342,7 @@
</div>
</div>
</div>
<br />
<div class="row">
<div class="col-md-12">

View File

@@ -733,6 +733,10 @@ Partial Class OS_OrdenesServicios
TxtPaciente.Text = ObjOS.Paciente
TxtIdentificadorCliente.Text = ObjOS.IdentificadorCliente
LblFolioAdicional.Text = ObjOS.FolioAdicional
DivFolioAdicional.Visible = If(ObjOS.FolioAdicional.Trim.Length > 0, True, False)
CargaEventoBitacora()
CargaHistorial()
@@ -3314,7 +3318,7 @@ Partial Class OS_OrdenesServicios
ProcesoOK = False
End If
If ProcesoOK Then
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim, FolioAdicional:=TxtFolioRemisionModal.Text.Trim) Then
ProcesoOK = False
End If
End If