SMS - 2024.01.23 OS en viar Solicitar paciente y Episodio

This commit is contained in:
rakcsle
2024-01-24 16:15:34 -07:00
parent 886f18065e
commit 87e5151a57
4 changed files with 64 additions and 9 deletions

View File

@@ -2156,7 +2156,7 @@ Namespace Modelos
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta,
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir) Then
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir, Paciente:=factura.Paciente, Episodio:=factura.Episodio) Then
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
@@ -7647,6 +7647,9 @@ Namespace Modelos
Public Property CveProcedimiento As Integer = -1
Public Property Procedimiento As String = ""
Public Property CveTipoVenta As Integer = -1
Public Property Paciente As String = ""
Public Property Episodio As String = ""
#End Region
End Class

View File

@@ -1283,7 +1283,28 @@
</button>
<h4 class="modal-title" >Material Utilizado</h4>
</div>
<div class="modal-body">
<div class="modal-body">
<div class="row">
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtPacienteModal" >
<asp:TextBox ID="TxtPacienteModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtPacienteModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPacienteModal"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Paciente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
<label for="<%= TxtPacienteModal.ClientID.ToString()%>">Paciente:</label>
</div>
</div>
<div class="col-md-6">
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtEpisodioModal">
<asp:TextBox ID="TxtEpisodioModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
<asp:RequiredFieldValidator ID="RfvTxtEpisodioModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEpisodioModal"
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Episodio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
<label for="<%= TxtEpisodioModal.ClientID.ToString()%>">Episodio:</label>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
@@ -1342,7 +1363,8 @@
</div>
<div class="modal-footer">
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si" ValidationGroup="GrpDevolucion"
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si"
ValidationGroup="GrpMaterialUtilizado" CausesValidation="true"
OnClick="LnkModalMaterialUtilizado_Click" >Guardar</asp:LinkButton>
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>

View File

@@ -473,6 +473,9 @@ Partial Class OS_OrdenesServicios
DVEpisodioPaciente.Visible = True
DvTxtPacienteModal.Visible = True
DvTxtEpisodioModal.Visible = True
If CveOS > 0 And TipoEstatus >= 3 Then
DdlUsuarioAtendio.Enabled = True
DVUsuarioAtendio3.Visible = True
@@ -3023,6 +3026,12 @@ Partial Class OS_OrdenesServicios
LnkModalMaterialUtilizado.Visible = False
End If
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
TxtPacienteModal.Text = TxtPaciente.Text
TxtEpisodioModal.Text = TxtIdentificadorCliente.Text
End If
UpModalMaterialUtilizado.Update()
End Sub
@@ -3038,6 +3047,21 @@ Partial Class OS_OrdenesServicios
Protected Sub LnkModalMaterialUtilizado_Click(sender As Object, e As EventArgs)
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
If TxtPacienteModal.Text.Trim.Length = 0 Then
Alert("Debe de proporcionar el paciente.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
If TxtEpisodioModal.Text.Trim.Length = 0 Then
Alert("Debe de proporcionar el episodio.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
Dim CveSubProyectoPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveSubProyecto").ToEntero
@@ -3307,6 +3331,8 @@ Partial Class OS_OrdenesServicios
ObjFactura.FechaParaSurtir = TxtFechaCita.Text.ToDateTime
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
ObjFactura.CveVentaRelacion = CveVentaPedido
ObjFactura.Paciente = TxtPacienteModal.Text.Trim
ObjFactura.Episodio = TxtEpisodioModal.Text.Trim
For Each GvRow As GridViewRow In GvMU.Rows

View File

@@ -17605,7 +17605,7 @@ Partial Class Ventas
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
AgregarPS()
End Sub
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer) As Boolean 'NO TOCAR - IPP
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "") As Boolean 'NO TOCAR - IPP
'VALIDA PARAMETROS
If CvePS <= 0 Or CveUM <= 0 Then
@@ -17613,6 +17613,10 @@ Partial Class Ventas
Return False
End If
If PSValidarModal.Trim.Length > 0 Then
HdnPS.Value = PSValidarModal
End If
If HdnPS.Value = "" Or HdnPS.Value = "-1" Then
Alert("Es necesario seleccionar el Producto o Servicio a facturar.", TipoMensaje.MsgAdvertencia)
Return False
@@ -17697,7 +17701,7 @@ Partial Class Ventas
'VALIDA EXISTENCIA
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186}) Then
If CveVenta <= 0 OrElse Me.EsCreaApartirDe Then
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
Return False
End If
@@ -17712,7 +17716,7 @@ Partial Class Ventas
'SUMA LO YA RESTADO EN PENDIENTE POR SURTIR QUE PERTENESCA A LA VENTA.
'PARA QUE NO RESTE LA EXISTENCIA 2 VECES Y PUEDAS COMPARAR LO REAL
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
Return False
End If
@@ -36365,15 +36369,15 @@ Partial Class Ventas
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
If Cantidad > 0 Then
If Not ValidaAgregarPS(CvePS, CveUnidadMedida, PU, 2) Then
If Not ValidaAgregarPS(CvePS, CveUnidadMedida, PU, 2, Cantidad, CodigoPS) Then
Alert("No hay existencia.", TipoMensaje.MsgAdvertencia)
Exit Sub
End If
End If
Next
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked