SMS 2024.02.08 y SMS 2024.02.09 Retro
This commit is contained in:
@@ -2010,7 +2010,7 @@ Public Class ClsInventarios
|
||||
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, Optional ExcluyeTransitorios As Integer = -1) As Decimal
|
||||
Optional ExcluyeApartados As Integer = 1, Optional RestringirAlmacenes As Integer = -1, Optional ExcluyeTransitorios As Integer = -1, Optional BuscarEnTabla As Boolean = False) As Decimal
|
||||
Dim Retorno As Decimal = -1
|
||||
|
||||
If FechaMovto = "-1" Then
|
||||
@@ -2037,6 +2037,7 @@ Public Class ClsInventarios
|
||||
.Add("@ExcluyeApartados", SqlDbType.Int).Value = ExcluyeApartados
|
||||
.Add("@ExcluyeTransitorios", SqlDbType.Int).Value = ExcluyeTransitorios
|
||||
.Add("@RestringirAlmacenes", SqlDbType.Int).Value = RestringirAlmacenes
|
||||
.Add("@BuscarEnTabla", SqlDbType.Bit).Value = BuscarEnTabla
|
||||
|
||||
.Add("@Existencia", SqlDbType.Money).Direction = ParameterDirection.Output
|
||||
.Add("@CvePSRetorno", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
@@ -4119,7 +4119,7 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Carta Porte 3.0</Value>
|
||||
<Value>Carta Porte 2.0</Value>
|
||||
<Style>
|
||||
<FontFamily>calibri</FontFamily>
|
||||
<FontSize>7pt</FontSize>
|
||||
|
||||
@@ -580,9 +580,9 @@
|
||||
</asp:TemplateField>
|
||||
|
||||
<%--8--%>
|
||||
<asp:TemplateField HeaderText="Lote/caducidades" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="150px">
|
||||
<asp:TemplateField HeaderText="Lote/Caducidad" ItemStyle-HorizontalAlign="Left" Visible="false" ItemStyle-Width="270px">
|
||||
<ItemTemplate>
|
||||
<asp:DropDownList ID="DdlCaducidadProducto" CssClass="select2me" Width="150px" runat="server" CausesValidation="true" AutoPostBack="true" OnSelectedIndexChanged="DdlCaducidadProducto_SelectedIndexChanged">
|
||||
<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>
|
||||
|
||||
@@ -1005,8 +1005,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If AplicaLote Then GvDatos.Columns(9).Visible = True
|
||||
If AplicaCaducidad Then GvDatos.Columns(10).Visible = True
|
||||
|
||||
If AplicaLote Or AplicaCaducidad Then
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
GvDatos.Columns(8).Visible = True
|
||||
GvDatos.Columns(9).Visible = False
|
||||
GvDatos.Columns(10).Visible = False
|
||||
End If
|
||||
|
||||
If Not String.IsNullOrWhiteSpace(UsuarioActual.Empresa.Funcionalidad(147)) Then
|
||||
@@ -1252,7 +1254,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
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} - Caducidad: {dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}", $"{dr("Lote").ToString}|{dr("FechaCaducidad").ToString.ToDate.ToString("dd/MM/yyyy")}"))
|
||||
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
|
||||
@@ -2045,8 +2047,24 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If gvr.FCCheckBox("cbInv").Checked AndAlso gvr.FCTextBox("TbCantidadF").Text.ToDecimal > 0 Then
|
||||
DtDatos.Rows(Index)("CantidadGV") = gvr.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||
DtDatos.Rows(Index)("CveSeccion") = gvr.FCDropDownList("DdlSeccionAlmacen").SelectedValue.ToEntero()
|
||||
DtDatos.Rows(Index)("FechaCaducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
DtDatos.Rows(Index)("Lote") = gvr.FCTextBox("TxtLote").Text
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
'Esto es por que
|
||||
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)
|
||||
|
||||
DtDatos.Rows(Index)("FechaCaducidad") = FechaCaducidad.ToDate
|
||||
DtDatos.Rows(Index)("Lote") = Lote
|
||||
|
||||
Else
|
||||
DtDatos.Rows(Index)("FechaCaducidad") = gvr.FCTextBox("TxtCaducidad").Text.ToDate
|
||||
DtDatos.Rows(Index)("Lote") = gvr.FCTextBox("TxtLote").Text
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
Index += 1
|
||||
Next
|
||||
|
||||
@@ -85,10 +85,19 @@
|
||||
</div>
|
||||
|
||||
|
||||
<label class="col-md-1 ">Cliente:</label>
|
||||
<%-- <label class="col-md-1 ">Cliente:</label>
|
||||
<div class="col-md-1">
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
<label class="col-md-1 ">Hospital:</label>
|
||||
<div class="col-md-1">
|
||||
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="Clave" CausesValidation="true" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<label class="col-md-1 truncate">Vendedor:</label>
|
||||
@@ -147,15 +156,7 @@
|
||||
|
||||
|
||||
</div>
|
||||
<div class="row">
|
||||
<label class="col-md-1 ">Hospital:</label>
|
||||
<div class="col-md-1">
|
||||
|
||||
<asp:DropDownList ID="DdlClienteSucursal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveClienteSucursal" CausesValidation="true" Width="100%" >
|
||||
</asp:DropDownList>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
@@ -51,14 +51,14 @@ Partial Class OS_RepOSMedicas
|
||||
|
||||
'CargaClientes
|
||||
Dim EsWS As Boolean = If(UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(141) = "1", True, False)
|
||||
If EsWS Then
|
||||
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
|
||||
'If EsWS Then
|
||||
' 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
|
||||
|
||||
'Vendedor
|
||||
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros("VendedorTipo in (1,4)") 'vendedores y vendedores de piso
|
||||
@@ -139,12 +139,13 @@ Partial Class OS_RepOSMedicas
|
||||
Dim ObjOS As New ClsOS
|
||||
Dim FechaI As Date = If(txtFechaI.Text.Trim = "", MinFecha, txtFechaI.Text.ToDate)
|
||||
Dim FechaF As Date = If(txtFechaF.Text.Trim = "", MaxFecha, txtFechaF.Text.ToDate)
|
||||
Dim Cvecliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||
Dim Cvecliente As Integer = DdlClienteSucursalCliente()
|
||||
Dim CveClienteSucursal As Integer = DdlClienteSucursalSucursal()
|
||||
LnkPersonalizar.Visible = False
|
||||
|
||||
If ObjOS.GetRepOrdenesServicioMedicasRep(FechaI, FechaF, Cvecliente, DdlVendedor.SelectedValue.ToEntero, DdlEstatusOS.SelectedValue.ToEntero, DdlTecnico.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, UsuarioActual.CveEmpresa,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveEspecialidad:=DdlEspecialidad.SelectedValue.ToEntero,
|
||||
CveClienteSucursal:=DdlClienteSucursal.SelectedValue.ToEntero) Then
|
||||
CveClienteSucursal:=CveClienteSucursal) Then
|
||||
GvDatos.DataSource = ObjOS.DtResultados
|
||||
If ObjOS.DtResultados IsNot Nothing AndAlso ObjOS.DtResultados.Rows.Count > 0 Then
|
||||
LnkPersonalizar.Visible = True
|
||||
@@ -170,12 +171,12 @@ Partial Class OS_RepOSMedicas
|
||||
#End Region
|
||||
|
||||
|
||||
Private Sub CargaClientes()
|
||||
DdlClientes.ddl.Items.Clear()
|
||||
DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||
DdlClientes.DataBind()
|
||||
DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End Sub
|
||||
'Private Sub CargaClientes()
|
||||
' DdlClientes.ddl.Items.Clear()
|
||||
' DdlClientes.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1) '.FiltraParametros($"CveClienteClasificacion = {DdlClienteClasificacion.SelectedValue.ToEntero} OR {DdlClienteClasificacion.SelectedValue.ToEntero} = -1")
|
||||
' DdlClientes.DataBind()
|
||||
' DdlClientes.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
'End Sub
|
||||
|
||||
Protected Sub DdlProyecto_SelectedIndexChanged(sender As Object, e As System.EventArgs) Handles DdlProyecto.SelectedIndexChanged
|
||||
CargarSubProyecto(DdlSubProyecto, DdlProyecto.SelectedValue)
|
||||
@@ -218,19 +219,31 @@ Partial Class OS_RepOSMedicas
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnPersonalizar_Click(sender As Object, e As System.EventArgs) Handles BtnPersonalizar.Click
|
||||
|
||||
|
||||
Personaliza()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub Personaliza()
|
||||
|
||||
GvDatos.Columns(13).Visible = ChkObservaciones.Checked
|
||||
|
||||
CargaDatos()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function DdlClienteSucursalCliente() As Integer
|
||||
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||
Return -1
|
||||
Else
|
||||
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||
Return If(array(0).ToEntero > 0, array(0).ToEntero, -1)
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function DdlClienteSucursalSucursal() As Integer
|
||||
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||
Return -1
|
||||
Else
|
||||
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
|
||||
End If
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -553,6 +553,20 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveClienteSucursalOS As Integer
|
||||
Get
|
||||
If ViewState("CveClienteSucursalOS") Is Nothing Then
|
||||
ViewState("CveClienteSucursalOS") = -1
|
||||
End If
|
||||
Return ViewState("CveClienteSucursalOS").ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveClienteSucursalOS") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Property CveClienteSucursal As Integer
|
||||
Get
|
||||
If ViewState("CveClienteSucursal") Is Nothing Then
|
||||
@@ -36418,17 +36432,17 @@ Partial Class Ventas
|
||||
Return If(array(0).ToEntero > 0, array(0).ToEntero, -1)
|
||||
End If
|
||||
End Function
|
||||
Private Function DdlClienteSucursalSucursal() As Integer
|
||||
|
||||
Private Function DdlClienteSucursalSucursal() As Integer
|
||||
If DdlClienteSucursal.SelectedValue = "-1" Then
|
||||
Return -1
|
||||
Else
|
||||
Dim array As String() = DdlClienteSucursal.SelectedValue.Split("|"c)
|
||||
Return If(array(1).ToEntero > 0, array(1).ToEntero, -1)
|
||||
End If
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Private Sub SeleccionarClienteSucursal(CveCliente As Integer)
|
||||
|
||||
Dim IndexSeleccion As Integer = 0
|
||||
@@ -36521,6 +36535,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
CveClienteSucursalOS = DdlClienteSucursalSucursal()
|
||||
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
@@ -36610,7 +36625,17 @@ Partial Class Ventas
|
||||
|
||||
CargaCliente(CveCliente)
|
||||
|
||||
DdlSucursalCliente.SelectedValueExist(DdlClienteSucursalSucursal)
|
||||
|
||||
' Si es pago directo no asigna la sucurasl al dll
|
||||
If RBLTipoVenta.SelectedValue.ToEntero <> 2 Then
|
||||
If DdlClienteSucursalSucursal() > 0 Then
|
||||
DdlSucursalCliente.SelectedValueExist(DdlClienteSucursalSucursal())
|
||||
Else
|
||||
If DdlSucursalCliente.Items.Count >= 2 Then
|
||||
DdlSucursalCliente.SelectedIndex = 1
|
||||
End If
|
||||
End If
|
||||
End If
|
||||
|
||||
DdlTipoComprobante_SelectedIndexChanged(sender, Nothing)
|
||||
|
||||
@@ -36734,8 +36759,10 @@ Partial Class Ventas
|
||||
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
|
||||
|
||||
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveClienteOS, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=CveClienteSucursalOS,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
|
||||
Paciente:=TxtPaciente.Text, IdentificadorCliente:=TxtEpisodio.Text) Then
|
||||
|
||||
Reference in New Issue
Block a user