Indicadores Medicos, procedimientos
This commit is contained in:
@@ -160,6 +160,7 @@ Public Class ClsClientes
|
|||||||
Public Property CodigoRegimenFiscal As String
|
Public Property CodigoRegimenFiscal As String
|
||||||
Public Property RegimenFiscal As String
|
Public Property RegimenFiscal As String
|
||||||
Public Property RepresentanteLegal As String
|
Public Property RepresentanteLegal As String
|
||||||
|
Public Property CveAlmacenAsignado As Integer
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -406,6 +407,8 @@ Public Class ClsClientes
|
|||||||
_RegimenFiscal = Data(0)("RegimenFiscal").ToString
|
_RegimenFiscal = Data(0)("RegimenFiscal").ToString
|
||||||
_CodigoRegimenFiscal = Data(0)("CodigoRegimenFiscal").ToString
|
_CodigoRegimenFiscal = Data(0)("CodigoRegimenFiscal").ToString
|
||||||
_RepresentanteLegal = Data(0)("RepresentanteLegal").ToString
|
_RepresentanteLegal = Data(0)("RepresentanteLegal").ToString
|
||||||
|
Me.CveAlmacenAsignado = Data(0)("CveAlmacenAsignado").ToString.ToEntero
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|||||||
@@ -6141,6 +6141,25 @@ Public Class ClsInventarios
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdatePedidoDetalleCantidad(CveVentaDetalle As Integer, Cantidad As Decimal) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_VentasDetalleCantidadUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveVentaDetalle", SqlDbType.Int).Value = CveVentaDetalle
|
||||||
|
.Add("@Cantidad", SqlDbType.Money).Value = Cantidad
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al actualizar la cantidad de pedido.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region " IDisposable Support "
|
#Region " IDisposable Support "
|
||||||
' IDisposable
|
' IDisposable
|
||||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||||
@@ -6169,6 +6188,8 @@ Public Class ClsInventarios
|
|||||||
Dispose(True)
|
Dispose(True)
|
||||||
GC.SuppressFinalize(Me)
|
GC.SuppressFinalize(Me)
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -6359,6 +6359,31 @@ Public Class ClsVentas
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
Public Function GetVentasMedicasIndicadoresRep(Grupo As Integer, FechaI As Date, FechaF As Date, CveCliente As Integer, CveMedico As Integer, CveProcedimiento As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Vta_VentasMedicasIndicadoresRepGet")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@Grupo", SqlDbType.Int).Value = Grupo
|
||||||
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
|
.Add("@CveCliente", SqlDbType.Int).Value = CveCliente
|
||||||
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
|
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||||
|
.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 ultilidades.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||||
|
End Try
|
||||||
|
Return Retorno
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
#Region "IDisposable Support"
|
#Region "IDisposable Support"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -659,9 +659,11 @@ Partial Class Compras_ReembolsosComprobaciones
|
|||||||
|
|
||||||
'registramos el nuevo IE
|
'registramos el nuevo IE
|
||||||
If CveCajaChica > 0 Then
|
If CveCajaChica > 0 Then
|
||||||
|
|
||||||
|
Dim ImporIEPago As Decimal = ImporteMovto + gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||||
CveIEPago = 0
|
CveIEPago = 0
|
||||||
Dim FolioIENew As String = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
Dim FolioIENew As String = ObjIE.GetNextFolio(CveCajaChica, 6).ToString
|
||||||
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.ToDate), FolioIENew, gvr.DataKey("Proveedor"), ImporteMovto, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
CveIEPago = ObjIE.AddBancos_IE(CveCajaChica, 6, If(ChkReembolsarSinBancos.Checked, TxtFechaPrePoliza.Text.ToDate, TxtFechaDocumento.Text.ToDate), FolioIENew, gvr.DataKey("Proveedor"), ImporIEPago, CveMoneda, 0.0, $"{gvr.DataKey("Proveedor")} F:{gvr.DataKey("SerieFolio")} {If(DdlPersonal.Visible, DdlPersonal.SelectedItem.Text, DdlCajaChica.SelectedItem.Text)}", "", False, True, -1, CvePrePolizaPago, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FueConciliado:=If(ChkReembolsarSinBancos.Checked Or CveCajaChica > 0, True, False))
|
||||||
TipoCambioPago = 1
|
TipoCambioPago = 1
|
||||||
Else
|
Else
|
||||||
CveIEPago = CveIERegistrado
|
CveIEPago = CveIERegistrado
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.Data.SqlClient
|
||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
@@ -320,6 +321,18 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property PedidoBloqueCantidad As Boolean
|
||||||
|
Get
|
||||||
|
If ViewState("PedidoBloqueCantidad") Is Nothing Then
|
||||||
|
ViewState("PedidoBloqueCantidad") = False
|
||||||
|
End If
|
||||||
|
Return Boolean.Parse(ViewState("PedidoBloqueCantidad").ToString)
|
||||||
|
End Get
|
||||||
|
Set(value As Boolean)
|
||||||
|
ViewState("PedidoBloqueCantidad") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -644,7 +657,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
EsDevolucionVenta = drE("EsDevolucionVenta").ToString().ToEntero()
|
EsDevolucionVenta = drE("EsDevolucionVenta").ToString().ToEntero()
|
||||||
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString()
|
TipoDocto = DtDatos.Rows(0)("TipoDocto").ToString()
|
||||||
TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0 Or CveVentaAD > 0), 1, 2)
|
TipoMovimiento = If(TipoDocto.Contiene({"Rem", "Ped", "Ing", "Ped", "PeC", "Ant"}) And (EsDevolucionVenta = 0 Or CveVentaAD > 0), 1, 2)
|
||||||
|
|
||||||
LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString()
|
LbCliente.Text = DtDatos.Rows(0)("Nombre").ToString()
|
||||||
HLFolio.Text = drE("SerieFolio").ToString()
|
HLFolio.Text = drE("SerieFolio").ToString()
|
||||||
@@ -663,8 +676,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
|
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
|
||||||
CveVentaSurtir = CveVenta
|
CveVentaSurtir = CveVenta
|
||||||
CveOSSurtir = CveOS
|
CveOSSurtir = CveOS
|
||||||
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
|
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
|
||||||
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
|
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem" And TipoDocto <> "Ped", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
|
||||||
CveContrato = drE("CveContrato").ToString().ToEntero()
|
CveContrato = drE("CveContrato").ToString().ToEntero()
|
||||||
CveVendedor = drE("CveVendedor").ToString().ToEntero()
|
CveVendedor = drE("CveVendedor").ToString().ToEntero()
|
||||||
CveCliente = drE("CveCliente").ToString().ToEntero()
|
CveCliente = drE("CveCliente").ToString().ToEntero()
|
||||||
@@ -693,7 +706,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario"
|
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If CveAlmacenTraspasoDestino > 0 And Not (TipoMovimiento = 2 And TipoDocto = "Rem") Then
|
If CveAlmacenTraspasoDestino > 0 And Not (TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped")) Then
|
||||||
DivTipoCambioAdvertencia.Visible = True
|
DivTipoCambioAdvertencia.Visible = True
|
||||||
LtTipoCambioAdvertencia.Text = $"Los productos seran Trasladados al Almacen: <b>{GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoDestino}")}</b>"
|
LtTipoCambioAdvertencia.Text = $"Los productos seran Trasladados al Almacen: <b>{GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Almacen", $"CveAlmacen = {CveAlmacenTraspasoDestino}")}</b>"
|
||||||
Else
|
Else
|
||||||
@@ -701,7 +714,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'DEVOLUCION REMISION
|
'DEVOLUCION REMISION
|
||||||
If TipoMovimiento = 2 And TipoDocto = "Rem" And Not CveAlmacenTraspasoDestino > 0 Then
|
If TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped") And Not CveAlmacenTraspasoDestino > 0 Then
|
||||||
Alert("La remisión que se intenta devolver presenta inconsistencias. Comuniquese con servicio tecnico SIG.", TipoMensaje.MsgError)
|
Alert("La remisión que se intenta devolver presenta inconsistencias. Comuniquese con servicio tecnico SIG.", TipoMensaje.MsgError)
|
||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
End If
|
End If
|
||||||
@@ -833,6 +846,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
UpGenerales.Update()
|
UpGenerales.Update()
|
||||||
If CveAlmacen <= 0 Then CargaGvDatos()
|
If CveAlmacen <= 0 Then CargaGvDatos()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then
|
||||||
|
PedidoBloqueCantidad = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Private Sub CargaTraspasoPorSurtir(CveTraspaso As Integer)
|
Private Sub CargaTraspasoPorSurtir(CveTraspaso As Integer)
|
||||||
LbSurtida.Visible = False
|
LbSurtida.Visible = False
|
||||||
@@ -997,6 +1018,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'código temporal
|
'código temporal
|
||||||
Dim AplicaSerie As Boolean = CBool(e.Row.DBCampo("AplicaSerie"))
|
Dim AplicaSerie As Boolean = CBool(e.Row.DBCampo("AplicaSerie"))
|
||||||
|
|
||||||
@@ -1121,6 +1144,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
e.Row.FCCheckBox("cbInv").Enabled = False
|
e.Row.FCCheckBox("cbInv").Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If PedidoBloqueCantidad Then
|
||||||
|
e.Row.FCTextBox("TbCantidadF").Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -1365,7 +1394,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If Tipo < 3 Then
|
If Tipo < 3 Then
|
||||||
CargaSerie(True, cargaMasivo)
|
CargaSerie(True, CargaMasivo)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -1849,7 +1878,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If EsDevolucionVenta = 1 Or TipoDocto.Contiene({"Ped"}) Then
|
If EsDevolucionVenta = 1 Or TipoDocto.Contiene({"Ped"}) Then
|
||||||
If Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem")) Then ' condicion si hay una devolucion de remision, no verifique la totalidad surtido
|
If Not (EsDevolucionVenta = 1 And TipoDocto.Contiene("Rem", "Ped")) Then ' condicion si hay una devolucion de remision, no verifique la totalidad surtido
|
||||||
For Each Gvr As GridViewRow In GvDatos.Rows
|
For Each Gvr As GridViewRow In GvDatos.Rows
|
||||||
If Not Gvr.FCCheckBox("cbInv").Checked Or (Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal <> Gvr.DataKey("CantidadC").ToString().ToDecimal) Then
|
If Not Gvr.FCCheckBox("cbInv").Checked Or (Gvr.FCCheckBox("cbInv").Checked AndAlso Gvr.FCTextBox("TbCantidadF").Text.ToDecimal <> Gvr.DataKey("CantidadC").ToString().ToDecimal) Then
|
||||||
Alert("Es necesario surtir todos los productos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
Alert("Es necesario surtir todos los productos. Por favor rectifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -1864,9 +1893,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
Dim EsInterno As Integer = -1
|
Dim EsInterno As Integer = -1
|
||||||
If TipoDocto = "Ped" Then
|
'If TipoDocto = "Ped" Then
|
||||||
EsInterno = If(Me.EsInterno, 1, 0)
|
' EsInterno = If(Me.EsInterno, 1, 0)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim ObjInventario As New ClsInventarios
|
Dim ObjInventario As New ClsInventarios
|
||||||
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
Dim ObjConta As New ClsContabilidad(ObjInventario.IniciaTransacSQL())
|
||||||
@@ -2007,9 +2036,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim CantidadSalidaSinCosto As Decimal = 0
|
Dim CantidadSalidaSinCosto As Decimal = 0
|
||||||
|
|
||||||
'' COMIENZA: SIN COSTO
|
'' COMIENZA: SIN COSTO
|
||||||
If TipoDocto.Contiene("Ing", "Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" AndAlso TipoMovimiento = 1 Then
|
If TipoDocto.Contiene("Ing", "Rem", "Ped") AndAlso UsuarioActual.Empresa.Funcionalidad(587) = "1" AndAlso TipoMovimiento = 1 Then
|
||||||
|
|
||||||
Dim CveConceptoSalidaSinCosto As Integer = If(TipoDocto.Contiene("Rem"), 8, 40)
|
Dim CveConceptoSalidaSinCosto As Integer = If(TipoDocto.Contiene("Rem", "Ped"), 8, 40)
|
||||||
|
|
||||||
For Each Dr As DataRow In DtDatos.Rows
|
For Each Dr As DataRow In DtDatos.Rows
|
||||||
If Dr("CantidadGV").ToString().ToDecimal > 0 Then
|
If Dr("CantidadGV").ToString().ToDecimal > 0 Then
|
||||||
@@ -2128,7 +2157,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
'ENTRADA POR TRASPASO A ENTREGA POR ADELANTADO
|
'ENTRADA POR TRASPASO A ENTREGA POR ADELANTADO
|
||||||
If TipoDocto = "Rem" AndAlso Not ErrorMovInv Then
|
If TipoDocto.Contiene("Rem", "Ped") AndAlso Not ErrorMovInv Then
|
||||||
For Each Dr1 As DataRow In DtTraspasos.Select("CveTipoAlmacen = 26")
|
For Each Dr1 As DataRow In DtTraspasos.Select("CveTipoAlmacen = 26")
|
||||||
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
|
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
|
||||||
|
|
||||||
@@ -2164,7 +2193,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 AndAlso TipoDocto.Contiene("Rem") Then
|
If Not ErrorMovInv AndAlso CveMovimientoSalida > 0 AndAlso TipoDocto.Contiene("Rem", "Ped") Then
|
||||||
Dim CvePrePolizaSinCosto As Integer = ObjConta.AddPrePolizas("EA/SinCost", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrega", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePolizaSinCosto As Integer = ObjConta.AddPrePolizas("EA/SinCost", 53, 0, 0, 1, TxtFecha.Text.ToDate, "Entrega", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
If CvePrePolizaSinCosto > 0 Then
|
If CvePrePolizaSinCosto > 0 Then
|
||||||
|
|
||||||
@@ -2415,7 +2444,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim TotalGarantia As Decimal = 0
|
Dim TotalGarantia As Decimal = 0
|
||||||
|
|
||||||
' COMIENZA: GARANTIAS
|
' COMIENZA: GARANTIAS
|
||||||
If Not ErrorMovInv AndAlso TipoDocto.Contiene("Ing", "Rem") AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoMovimiento = 1 Then
|
If Not ErrorMovInv AndAlso TipoDocto.Contiene("Ing", "Rem", "Ped") AndAlso UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoMovimiento = 1 Then
|
||||||
|
|
||||||
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
Dim CveAlmacenGarantia As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=6).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||||
Dim DtGarantias As DataTable = Nothing
|
Dim DtGarantias As DataTable = Nothing
|
||||||
@@ -2527,7 +2556,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CantidadPendientePorSalir = CantidadPendientePorSalir - CantidadEntradaSinCosto
|
CantidadPendientePorSalir = CantidadPendientePorSalir - CantidadEntradaSinCosto
|
||||||
End If
|
End If
|
||||||
'si el alamcen del que salio, es el mismo que entra, no hay traspasos.
|
'si el alamcen del que salio, es el mismo que entra, no hay traspasos.
|
||||||
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" Then CveAlmacenTraspasoDestino = 0
|
If CveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero() And TipoDocto <> "Rem" And TipoDocto <> "Ped" Then CveAlmacenTraspasoDestino = 0
|
||||||
|
|
||||||
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
If Not ErrorMovInv AndAlso CantidadPendientePorSalir > 0 Then
|
||||||
Dim ConceptoMovimiento As Integer = 3
|
Dim ConceptoMovimiento As Integer = 3
|
||||||
@@ -2537,13 +2566,13 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Dim Almacen1 As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
Dim Almacen1 As Integer = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
Dim tCveAlmacenTraspasoDestino As Integer = CveAlmacenTraspasoDestino
|
Dim tCveAlmacenTraspasoDestino As Integer = CveAlmacenTraspasoDestino
|
||||||
|
|
||||||
If TipoDocto = "Rem" AndAlso tCveAlmacenTraspasoDestino = 0 Then
|
If TipoDocto.Contiene("Rem", "Ped") AndAlso tCveAlmacenTraspasoDestino = 0 Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
TextoError.AppendFormat("Ocurrió un error. no se tiene definido el almacen destino")
|
TextoError.AppendFormat("Ocurrió un error. no se tiene definido el almacen destino")
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'DEVOLUCION REMISION
|
'DEVOLUCION REMISION
|
||||||
If TipoMovimiento = 2 And TipoDocto = "Rem" Then
|
If TipoMovimiento = 2 And TipoDocto.Contiene("Rem", "Ped") Then
|
||||||
ConceptoMovimiento = 8
|
ConceptoMovimiento = 8
|
||||||
Almacen1 = CveAlmacenTraspasoDestino
|
Almacen1 = CveAlmacenTraspasoDestino
|
||||||
tCveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero()
|
tCveAlmacenTraspasoDestino = DdlAlmacen.SelectedValue.ToEntero()
|
||||||
@@ -3012,8 +3041,8 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 Then
|
If EsDevolucionVenta = 1 AndAlso CveOSSurtir > 0 AndAlso TipoMovimiento = 2 AndAlso TipoDocto = "Ped" Then
|
||||||
If Not CierreOS(CveOSSurtir) Then
|
If Not CierreOS(CveOSSurtir, CveMovimiento, ObjInventario.IniciaTransacSQL) Then
|
||||||
ErrorMovInv = True
|
ErrorMovInv = True
|
||||||
Alert("Error al finalizar orden de servicio", TipoMensaje.MsgError)
|
Alert("Error al finalizar orden de servicio", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
@@ -3074,7 +3103,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'SI NO ES GARANTIA MANDA A RECIBIR AL USADO
|
'SI NO ES GARANTIA MANDA A RECIBIR AL USADO
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDocto = "Rem" AndAlso CveMovimientoGarantia <= 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" AndAlso TipoDocto.Contiene("Rem", "Ped") AndAlso CveMovimientoGarantia <= 0 Then
|
||||||
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
|
Msg.AppendFormat("<br/><br/>Recibir Usado: <b><a href=""/Inventarios/RecepcionUsados.aspx?CveRemision={0}"" target=""_blank"" class=""Texto"">Ir a Recepción de Usados</a></b>", CveVentaSurtir)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -4228,16 +4257,42 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function CierreOS(CveOSCerrar As Integer) As Boolean
|
Private Function CierreOS(CveOSCerrar As Integer, CveMovimientoGenerado As Integer, ByRef TransaccionSql As SqlTransaction) As Boolean
|
||||||
|
|
||||||
Dim Respuesta As Boolean = True
|
Dim Respuesta As Boolean = True
|
||||||
|
|
||||||
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
|
Dim CveOSEstatusFinalizada As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 4").ToEntero
|
||||||
|
|
||||||
If CveOSEstatusFinalizada > 0 Then
|
If CveOSEstatusFinalizada > 0 Then
|
||||||
Dim ObjOS As New ClsOS()
|
|
||||||
|
Dim ObjOS As New ClsOS(TransaccionSql)
|
||||||
|
|
||||||
Respuesta = ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOSCerrar)
|
Respuesta = ObjOS.UpdateOrdenesServiciosEstatus(CveOSEstatusFinalizada, UsuarioActual.CveUsuario, CveOSCerrar)
|
||||||
ObjOS.Dispose()
|
|
||||||
|
If Respuesta Then
|
||||||
|
|
||||||
|
Dim ObjInventario As New ClsInventarios(ObjOS.IniciaTransacSQL)
|
||||||
|
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimientoGenerado, UsuarioActual.CveEmpresa) Then
|
||||||
|
|
||||||
|
For Each Dr As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
|
||||||
|
Dim CveVentaDetalle As Integer = Dr("CveVentaDetalle").ToString().ToEntero()
|
||||||
|
Dim Cantidad As Decimal = Dr("Cantidad").ToString().ToDecimal
|
||||||
|
|
||||||
|
If CveVentaDetalle > 0 Then
|
||||||
|
If Not ObjInventario.UpdatePedidoDetalleCantidad(CveVentaDetalle, Cantidad) Then
|
||||||
|
Respuesta = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
Respuesta = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
Alert("No se pudo obtener el estado para finalizar la orden de servicio.")
|
Alert("No se pudo obtener el estado para finalizar la orden de servicio.")
|
||||||
Respuesta = False
|
Respuesta = False
|
||||||
|
|||||||
@@ -1278,13 +1278,13 @@
|
|||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
<asp:GridView ID="GvSolicitarDevolucion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
<asp:GridView ID="GvSolicitarDevolucion" runat="server" AutoGenerateColumns="False" EmptyDataText="No se han capturado Historial"
|
||||||
DataKeyNames="CveVentaDetalle,Cantidad"
|
DataKeyNames="CveVentaDetalle,Cantidad,CveAlmacenActual,CvePS,CveUM,PU,CveMovimientoDetalle,Lote,Serie,FechaCaducidad"
|
||||||
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvSolicitarDevolucion_RowDataBound">
|
CssClass="table table-striped table-advance table-hover Widthall" GridLines="None" OnRowDataBound="GvSolicitarDevolucion_RowDataBound">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<HeaderTemplate>Cant.</HeaderTemplate>
|
<HeaderTemplate>Cant.</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LblCantidad" runat="server" Text='<%# Eval("Cantidad") %>'></asp:Literal>
|
<asp:Literal ID="LblCantidad" runat="server" Text='<%# Eval("Cantidad", "{0:F2}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -291,6 +291,17 @@ Partial Class OS_OrdenesServicios
|
|||||||
ViewState("ClienteMail") = value
|
ViewState("ClienteMail") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property DTSolicitudDev As DataTable
|
||||||
|
Get
|
||||||
|
Return If(ViewState("DTSolicitudDev") Is Nothing, New DataTable, DirectCast(ViewState("DTSolicitudDev"), DataTable))
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DTSolicitudDev") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
@@ -1932,7 +1943,7 @@ Partial Class OS_OrdenesServicios
|
|||||||
e.Row.FCLabel("LtlCuentaEquipoS").Visible = False
|
e.Row.FCLabel("LtlCuentaEquipoS").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Or UsuarioActual.Empresa.Funcionalidad(578) = "1" Then
|
||||||
e.Row.FCHtmlTableRow("TREspecificaiones").Visible = False
|
e.Row.FCHtmlTableRow("TREspecificaiones").Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -3042,20 +3053,21 @@ Partial Class OS_OrdenesServicios
|
|||||||
LnkModalSolicitarDevolucion.Visible = True
|
LnkModalSolicitarDevolucion.Visible = True
|
||||||
|
|
||||||
GvSolicitarDevolucion.DataSource = Nothing
|
GvSolicitarDevolucion.DataSource = Nothing
|
||||||
|
DTSolicitudDev = New DataTable
|
||||||
|
|
||||||
Dim ObjOS As New ClsOS
|
Dim ObjOS As New ClsOS
|
||||||
Dim DTTemp As New DataTable
|
|
||||||
|
|
||||||
|
|
||||||
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, UsuarioActual.CveEmpresa) Then
|
If ObjOS.GetOrdenesServicioDevolucionMaterial(CveOS, CveVenta, UsuarioActual.CveEmpresa) Then
|
||||||
DTTemp = ObjOS.DtResultados
|
DTSolicitudDev = ObjOS.DtResultados
|
||||||
GvSolicitarDevolucion.DataSource = DTTemp
|
GvSolicitarDevolucion.DataSource = DTSolicitudDev
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ObjOS.Dispose()
|
ObjOS.Dispose()
|
||||||
GvSolicitarDevolucion.DataBind()
|
GvSolicitarDevolucion.DataBind()
|
||||||
|
|
||||||
Dim EsDevolucionVenta As Boolean = (DTTemp.FiltroPrimeroValor("EsDevolucionVenta", "").ToEntero > 0)
|
Dim EsDevolucionVenta As Boolean = (DTSolicitudDev.FiltroPrimeroValor("EsDevolucionVenta", "").ToEntero > 0)
|
||||||
|
|
||||||
RegistraScript("$('#DVModalSolicitarDevolucion').modal();")
|
RegistraScript("$('#DVModalSolicitarDevolucion').modal();")
|
||||||
|
|
||||||
@@ -3077,6 +3089,18 @@ Partial Class OS_OrdenesServicios
|
|||||||
|
|
||||||
Protected Sub LnkModalSolicitarDevolucion_Click(sender As Object, e As EventArgs)
|
Protected Sub LnkModalSolicitarDevolucion_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
|
||||||
|
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||||
|
Dim CveSubProyectoPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||||
|
Dim CveVentaPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveVenta").ToEntero
|
||||||
|
|
||||||
|
Dim CveAlmacenDestino As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, 10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto = {CveSubProyectoPedido}").ToEntero
|
||||||
|
|
||||||
|
If Not CveAlmacenDestino > 0 Then
|
||||||
|
Alert("No se encontro almacen de entrega por adelantado")
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim PropcesoOK As Boolean = True
|
Dim PropcesoOK As Boolean = True
|
||||||
Dim ObjV As New ClsVentas
|
Dim ObjV As New ClsVentas
|
||||||
ObjV.IniciaTransacSQL()
|
ObjV.IniciaTransacSQL()
|
||||||
@@ -3101,6 +3125,76 @@ Partial Class OS_OrdenesServicios
|
|||||||
Next
|
Next
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If PropcesoOK Then
|
||||||
|
|
||||||
|
Dim ObjInventario As New ClsInventarios(ObjV.IniciaTransacSQL())
|
||||||
|
|
||||||
|
Dim CveMovimiento As Integer = ObjInventario.AddMovimiento(CveAlmacenActual, 8, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaPedido, CveSubProyectoPedido, -1, CveOS:=CveOS, CveAlmacenDestino:=CveAlmacenDestino)
|
||||||
|
|
||||||
|
If CveMovimiento > 0 Then
|
||||||
|
|
||||||
|
For Each GvRow As GridViewRow In GvSolicitarDevolucion.Rows
|
||||||
|
|
||||||
|
Dim Cantidad As Decimal = GvRow.DataKey("Cantidad").ToDecimal
|
||||||
|
Dim CantidadDev As Decimal = GvRow.FCTextBox("TxtDev").Text.ToDecimal
|
||||||
|
Dim CantidadRegistro = Cantidad - CantidadDev
|
||||||
|
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||||
|
Dim CveUM As Integer = GvRow.DataKey("CveUM").ToEntero
|
||||||
|
Dim PU As Decimal = GvRow.DataKey("PU").ToDecimal
|
||||||
|
Dim CveVentaDetalle As Integer = GvRow.DataKey("CveVentaDetalle").ToEntero
|
||||||
|
Dim CveMovimientoDetalle As Integer = GvRow.DataKey("CveMovimientoDetalle").ToEntero
|
||||||
|
Dim Lote As String = GvRow.DataKey("Lote")
|
||||||
|
Dim Serie As String = GvRow.DataKey("Serie")
|
||||||
|
Dim FechaCaducidad As DateTime = GvRow.DataKey("FechaCaducidad").ToDateTime
|
||||||
|
|
||||||
|
If CantidadRegistro > 0 Then
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimiento, CantidadRegistro, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||||
|
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||||
|
PropcesoOK = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
If PropcesoOK Then
|
||||||
|
|
||||||
|
Dim CveMovimientoSalida As Integer = ObjInventario.AddMovimiento(CveAlmacenDestino, 9, CveMoneda, ClsPaginas.NowADS(), -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaPedido, CveSubProyectoPedido, -1, CveOS:=CveOS, CveMovimientoRelacionado:=CveMovimiento)
|
||||||
|
|
||||||
|
If ObjInventario.GetMovimientosDetalle(CveMovimiento, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
For Each dRow As DataRow In ObjInventario.DtResultados.Rows
|
||||||
|
|
||||||
|
Dim Cantidad As Decimal = dRow("Cantidad").ToString.ToDecimal
|
||||||
|
Dim CvePS As Integer = dRow("CvePS").ToString.ToEntero
|
||||||
|
Dim CveUM As Integer = dRow("CveUM").ToString.ToEntero
|
||||||
|
Dim PU As Decimal = dRow("PU").ToString.ToDecimal
|
||||||
|
Dim CveVentaDetalle As Integer = dRow("CveVentaDetalle").ToString.ToEntero
|
||||||
|
Dim CveMovimientoDetalle As Integer = dRow("CveMovimientoDetalle").ToString.ToEntero
|
||||||
|
Dim Lote As String = dRow("Lote").ToString
|
||||||
|
Dim Serie As String = dRow("Serie").ToString
|
||||||
|
Dim FechaCaducidad As DateTime = dRow("FechaCaducidad").ToString.ToDateTime
|
||||||
|
|
||||||
|
If Not ObjInventario.AddMovimientoDetalle(CveMovimientoSalida, Cantidad, CveUM, CvePS, PU, CveVentaDetalle:=CveVentaDetalle, CveMovimientoDetalleEntrada:=CveMovimientoDetalle, Lote:=Lote, Serie:=Serie, FechaCaducidad:=FechaCaducidad) Then
|
||||||
|
Alert("Error al agregar detalle de movimiento.", TipoMensaje.MsgAdvertencia)
|
||||||
|
PropcesoOK = False
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
|
Next
|
||||||
|
|
||||||
|
Else
|
||||||
|
PropcesoOK = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
Else
|
||||||
|
PropcesoOK = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If PropcesoOK Then
|
If PropcesoOK Then
|
||||||
'ObjV.RollBack()
|
'ObjV.RollBack()
|
||||||
|
|||||||
@@ -14,23 +14,205 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpAgregar">
|
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Always">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkAgregarMedico" OnClick="LnkAgregarMedico_Click" data-toggle="tooltip" data-placement="left" title="Agregar Medico" Text="<i class='fa fa-plus'></i> Agregar Medico"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkAgregarMedico" OnClick="LnkAgregarMedico_Click" data-toggle="tooltip" data-placement="left" title="Agregar Medico" Text="<i class='fa fa-plus'></i> Agregar Medico"></asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
|
||||||
|
<ajax:TabContainer runat="server" ID="Tabs">
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabIndicadores" runat="server" HeaderText="Indicadores" ClientIDMode="Static" >
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<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" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row" style="height: 32px;">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Inicio:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Grupo:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlGrupo" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||||
|
<asp:ListItem Value="1" Selected="True">Médico</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2" >Procedimiento</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3" >Clientes</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Médico:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||||
|
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Procedimiento:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
||||||
|
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpIndicadores" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="max-width:900px">
|
||||||
|
|
||||||
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;max-width:900px" align="left;">
|
||||||
|
<input type="text" id="TxtBusquedaIndicadores" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvIndicadores.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvIndicadores.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="max-width:900px">
|
||||||
|
<div class="col-md-12" style="max-width:900px">
|
||||||
|
|
||||||
|
<asp:GridView ID="GvIndicadores" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames=""
|
||||||
|
EmptyDataText="No se encontraron registros" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("Grupo") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlnVentas" runat="server" Text='<%# Eval("nVentas") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Utilidad" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlUtilidad" runat="server" Text='<%# Eval("Utilidad", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Venta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSerieFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="90px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="Fecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Dias Trans." ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px" >
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDias" runat="server" Text='<%# Eval("Dias") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabMedicos" runat="server" HeaderText="Médicos" ClientIDMode="Static">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||||
<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;" />
|
<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>
|
<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>
|
</div>
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
|
|
||||||
@@ -62,12 +244,6 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<%-- <asp:TemplateField HeaderText="Correo" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlMail" runat="server" Text='<%# Eval("Mail") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Especialidad" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Especialidad" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
||||||
@@ -120,11 +296,16 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
</ajax:TabContainer>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
|
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog" style="width: 450px;">
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||||
@@ -296,10 +477,25 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div style="display:none!important">
|
||||||
|
<%--<asp:Button runat="server" ClientIDMode="Static" ID="BtnValidaExcelTab" OnClick="BtnValidaExcelTab_Click" />--%>
|
||||||
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
<%-- <script>
|
||||||
|
|
||||||
|
$(document).ready(function () {
|
||||||
|
$("#TabIndicadores").click(function () { validaExcelTab(); });
|
||||||
|
$("#TabMedicos").click(function () { validaExcelTab(); });
|
||||||
|
});
|
||||||
|
|
||||||
|
|
||||||
|
function validaExcelTab() {
|
||||||
|
$('#BtnValidaExcelTab').click();
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>--%>
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Extensions.Primitives
|
||||||
|
|
||||||
Partial Class Ventas_CatMedicos
|
Partial Class Ventas_CatMedicos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -21,7 +21,9 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
CargaCombos()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
BtnConsultar_Click(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -41,8 +43,12 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
ValidaExcelTab()
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||||
@@ -134,8 +140,6 @@ Partial Class Ventas_CatMedicos
|
|||||||
TxtCelular.Text = ""
|
TxtCelular.Text = ""
|
||||||
TxtEspecialidad.Text = ""
|
TxtEspecialidad.Text = ""
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
DVEstatus.Visible = False
|
DVEstatus.Visible = False
|
||||||
ChkEstatus.Checked = True
|
ChkEstatus.Checked = True
|
||||||
|
|
||||||
@@ -177,4 +181,95 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#Region "INDICADORES"
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||||
|
txtFechaF.Text = NowADS().ToShortDateString
|
||||||
|
|
||||||
|
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlMedico.DataBind()
|
||||||
|
|
||||||
|
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlProcedimiento.DataBind()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
Dim objVentas As New ClsVentas
|
||||||
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
|
If objVentas.GetVentasMedicasIndicadoresRep(DdlGrupo.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, CveCliente, DdlMedico.SelectedValue.ToEntero, DdlProcedimiento.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvIndicadores.DataSource = objVentas.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
objVentas.Dispose()
|
||||||
|
|
||||||
|
GvIndicadores.DataBind()
|
||||||
|
|
||||||
|
ValidaExcelTab()
|
||||||
|
|
||||||
|
UpIndicadores.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "EXCEL"
|
||||||
|
|
||||||
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
|
||||||
|
|
||||||
|
If Tabs.ActiveTabIndex = 0 Then
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||||
|
SbFiltros.Append($"Grupo:{DdlGrupo.SelectedItem.Text}, Médico: {DdlMedico.SelectedItem.Text}, Procedimiento: {DdlProcedimiento.SelectedItem.Text}")
|
||||||
|
GvIndicadores.ExportToExcelGembox("IndicadoresMedicos", UsuarioActual, "Indicadores Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
Else
|
||||||
|
GvDatos.Columns(10).Visible = False
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||||
|
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
GvDatos.Columns(10).Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Sub ValidaExcelTab()
|
||||||
|
If Tabs.ActiveTabIndex = 0 Then
|
||||||
|
LnkExportar.Visible = GvDatos.Rows.Count > 0
|
||||||
|
Else
|
||||||
|
LnkExportar.Visible = GvIndicadores.Rows.Count > 0
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -20,15 +20,207 @@
|
|||||||
<a runat="server" href="~/Ventas/CatProcedimientoDetalle.aspx?CveProcedimiento=-1" target="_blank"
|
<a runat="server" href="~/Ventas/CatProcedimientoDetalle.aspx?CveProcedimiento=-1" target="_blank"
|
||||||
data-toggle="tooltip" data-placement="left" title="Agregar Procedimiento" ><i class='fa fa-plus'></i> Agregar Procedimiento</a>
|
data-toggle="tooltip" data-placement="left" title="Agregar Procedimiento" ><i class='fa fa-plus'></i> Agregar Procedimiento</a>
|
||||||
</li>
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server" Visible="false"><i class="fa fa-file-excel-o"></i> Excel</asp:LinkButton>
|
||||||
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
|
|
||||||
|
<ajax:TabContainer runat="server" ID="Tabs">
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabIndicadores" runat="server" HeaderText="Indicadores">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<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" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
|
<div class="titlefiltros caption">
|
||||||
|
<div class="row" style="height: 32px;">
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Inicio:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaI" runat="server" ControlToValidate="txtFechaI" Display="None" ErrorMessage="El campo <b>''Fecha Inicial''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
|
<asp:TextBox Width="80px" ID="txtFechaF" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
|
<span class="input-group-btn ">
|
||||||
|
<asp:LinkButton ID="imgCalendarioF" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaF" runat="server" TargetControlID="txtFechaF" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
|
<ajax:CalendarExtender runat="server" ID="Calendario2" TargetControlID="txtFechaF" PopupButtonID="imgCalendarioF" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
|
<asp:RequiredFieldValidator ID="rfvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="Valida"></asp:RequiredFieldValidator>
|
||||||
|
<asp:CompareValidator ID="cvFechaF" runat="server" ControlToValidate="txtFechaF" Display="None" ErrorMessage="El campo <b>''Fecha Final''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="Valida"></asp:CompareValidator>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoRfvFF" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<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>
|
||||||
|
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Grupo:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlGrupo" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
||||||
|
<asp:ListItem Value="1" >Médico</asp:ListItem>
|
||||||
|
<asp:ListItem Value="2" Selected="True">Procedimiento</asp:ListItem>
|
||||||
|
<asp:ListItem Value="3" >Clientes</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body" style="display: none">
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Médico:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||||
|
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Procedimiento:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
||||||
|
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:UpdatePanel runat="server" ID="UpIndicadores" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12" style="max-width:900px">
|
||||||
|
|
||||||
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;max-width:900px" align="left;">
|
||||||
|
<input type="text" id="TxtBusquedaIndicadores" class="form-control input-sm" onkeyup="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvIndicadores.ClientID) %>" style="display: inline-block; margin-right: -20px; width: 150px;" />
|
||||||
|
<a href="javascript:;" onclick="<%= String.Format("FiltrarTabla('TxtBusquedaIndicadores','{0}')", GvIndicadores.ClientID) %>" style="margin-top: -3px;" class="btn btn-circle btn-sm label-info"><i class="icon-magnifier"></i></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="row" style="max-width:900px">
|
||||||
|
<div class="col-md-12" style="max-width:900px">
|
||||||
|
|
||||||
|
<asp:GridView ID="GvIndicadores" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames=""
|
||||||
|
EmptyDataText="No se encontraron registros" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<%--CveClave Grupo Total nVentas Utilidad SerieFolio Fecha--%>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Grupo" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlGrupo" runat="server" Text='<%# Eval("Grupo") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Total" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTotal" runat="server" Text='<%# Eval("Total", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Cantidad" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlnVentas" runat="server" Text='<%# Eval("nVentas") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Utilidad" ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlUtilidad" runat="server" Text='<%# Eval("Utilidad", "{0:N2}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Venta" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="70px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlSerieFolio" runat="server" Text='<%# Eval("SerieFolio") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Fecha" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="90px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="Fecha" runat="server" Text='<%# Eval("Fecha", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Dias Trans." ItemStyle-HorizontalAlign="Right" ItemStyle-Width="70px" >
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlDias" runat="server" Text='<%# Eval("Dias") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
<ajax:TabPanel ID="TabProcedimientos" runat="server" HeaderText="Procedimientos">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
<div class="row" style="margin-left: 0px; margin-top: 5px; margin-bottom: 5px; text-align: right; margin-right: 5px;" align="left">
|
||||||
<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;" />
|
<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>
|
<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>
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
@@ -43,11 +235,7 @@
|
|||||||
|
|
||||||
<asp:HyperLinkField HeaderText="Procedimiento" DataNavigateUrlFields="CveProcedimiento" DataNavigateUrlFormatString="CatProcedimientoDetalle.aspx?CveProcedimiento={0}" DataTextField="Procedimiento" Target="_blank" />
|
<asp:HyperLinkField HeaderText="Procedimiento" DataNavigateUrlFields="CveProcedimiento" DataNavigateUrlFormatString="CatProcedimientoDetalle.aspx?CveProcedimiento={0}" DataTextField="Procedimiento" Target="_blank" />
|
||||||
|
|
||||||
<%-- <asp:TemplateField HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" >
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlProcedimiento" runat="server" Text='<%# Eval("Procedimiento") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -73,20 +261,23 @@
|
|||||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
<asp:LinkButton ID="LnkEliminar" OnClick="LnkEliminar_Click" runat="server" Visible="true" AlternateText="Reasignar" CausesValidation="False" CssClass="btn btn-circle btn-sm red" Text="<i title='Reasignar' class='icon-trash' title='Eliminar' ></i>" data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</ajax:TabPanel>
|
||||||
|
|
||||||
|
</ajax:TabContainer>
|
||||||
|
|
||||||
|
|
||||||
<div id="DVAgregarProcedimiento" class="modal ADS fade" role="dialog">
|
<div id="DVAgregarProcedimiento" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog" style="width: 450px;">
|
<div class="modal-dialog" style="width: 450px;">
|
||||||
|
|||||||
@@ -22,7 +22,9 @@ Partial Class Ventas_CatProcedimientos
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
CargaCombos()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
BtnConsultar_Click(Nothing, Nothing)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -148,6 +150,98 @@ Partial Class Ventas_CatProcedimientos
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
#Region "INDICADORES"
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
|
||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
txtFechaI.Text = NowADS().FirstDayOfMonth.ToShortDateString
|
||||||
|
txtFechaF.Text = NowADS().ToShortDateString
|
||||||
|
|
||||||
|
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlMedico.DataBind()
|
||||||
|
|
||||||
|
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlProcedimiento.DataBind()
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
|
||||||
|
Dim objVentas As New ClsVentas
|
||||||
|
Dim CveCliente As Integer = If(DdlClientes.SelectedValue.ToEntero > 0, DdlClientes.SelectedValue.ToEntero, -1)
|
||||||
|
If objVentas.GetVentasMedicasIndicadoresRep(DdlGrupo.SelectedValue.ToEntero, txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, CveCliente, DdlMedico.SelectedValue.ToEntero, DdlProcedimiento.SelectedValue.ToEntero, UsuarioActual.CveEmpresa) Then
|
||||||
|
GvIndicadores.DataSource = objVentas.DtResultados
|
||||||
|
End If
|
||||||
|
|
||||||
|
objVentas.Dispose()
|
||||||
|
|
||||||
|
GvIndicadores.DataBind()
|
||||||
|
|
||||||
|
ValidaExcelTab()
|
||||||
|
|
||||||
|
UpIndicadores.Update()
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
#Region "EXCEL"
|
||||||
|
|
||||||
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
|
||||||
|
|
||||||
|
If Tabs.ActiveTabIndex = 0 Then
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||||
|
SbFiltros.Append($"Grupo:{DdlGrupo.SelectedItem.Text}, Médico: {DdlMedico.SelectedItem.Text}, Procedimiento: {DdlProcedimiento.SelectedItem.Text}")
|
||||||
|
GvIndicadores.ExportToExcelGembox("IndicadoresMedicos", UsuarioActual, "Indicadores Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
ElseIf Tabs.ActiveTabIndex = 1 Then
|
||||||
|
'GvDatos.Columns(10).Visible = False
|
||||||
|
Dim SbFiltros As New StringBuilder()
|
||||||
|
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||||
|
GvDatos.ExportToExcelGembox("CatProcedimientos", UsuarioActual, "Catálogo de Procedimientos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
|
'GvDatos.Columns(10).Visible = True
|
||||||
|
Else
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Public Overrides Sub VerifyRenderingInServerForm(ByVal control As Control)
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
Sub ValidaExcelTab()
|
||||||
|
If Tabs.ActiveTabIndex = 0 Then
|
||||||
|
LnkExportar.Visible = GvDatos.Rows.Count > 0
|
||||||
|
Else
|
||||||
|
LnkExportar.Visible = GvIndicadores.Rows.Count > 0
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -587,7 +587,7 @@
|
|||||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" data-size="small" CssClass="make-switchsd" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" />
|
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" data-size="small" CssClass="make-switchsd" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" />
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdFechaOS1" visible ="false">
|
<td runat="server" id="TdFechaOS1" visible ="false">
|
||||||
<b>Fecha de Orden:</b>
|
<b>Fecha de Cirugia:</b>
|
||||||
</td>
|
</td>
|
||||||
<td runat="server" id="TdFechaOS2" visible ="false">
|
<td runat="server" id="TdFechaOS2" visible ="false">
|
||||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" data-size="small" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" step="1"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" data-size="small" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px" step="1"></asp:TextBox>
|
||||||
@@ -5494,7 +5494,8 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
<%--<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />--%>
|
||||||
|
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' ToolTip='<%#If(Eval("Habilitado").ToString <> "", "Debe de surtirla para facturarla.", "")%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||||
<ControlStyle Width="8px" />
|
<ControlStyle Width="8px" />
|
||||||
@@ -5505,6 +5506,7 @@
|
|||||||
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="SubTotal" DataField="SubTotal" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="IVA" DataField="Iva" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="IVA" DataField="Iva" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Surtido" HeaderText="Surtido" ItemStyle-HorizontalAlign="Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
@@ -5513,7 +5515,8 @@
|
|||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
<%--<asp:CheckBox ID="Chk" runat="server" Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />--%>
|
||||||
|
<asp:CheckBox ID="Chk" runat="server" Enabled='<%#If(Eval("Habilitado").ToString <> "", CBool(Eval("Habilitado").ToString), False)%>' ToolTip='<%#If(Eval("Habilitado").ToString <> "", "Debe de surtirla para facturarla.", "")%>' Checked='<%#If(Eval("Aplicado").ToString <> "", CBool(Eval("Aplicado").ToString), False)%>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
<ItemStyle Width="8px" HorizontalAlign="Center" />
|
||||||
<ControlStyle Width="8px" />
|
<ControlStyle Width="8px" />
|
||||||
@@ -5534,6 +5537,7 @@
|
|||||||
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField HeaderText="Producto" DataField="CodigoPS" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="Total" DataField="Total" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
|
<asp:BoundField DataField="Surtido" HeaderText="Surtido" ItemStyle-HorizontalAlign="Center" />
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -8464,7 +8468,7 @@
|
|||||||
<asp:CheckBox ID="ChkRequiereTecnicoModal" data-size="small" CssClass="make-switchsd" runat="server" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" />
|
<asp:CheckBox ID="ChkRequiereTecnicoModal" data-size="small" CssClass="make-switchsd" runat="server" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" />
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
<div class="form-group col-md-6 form-md-line-input input-iconright " runat="server" id="DvModalRequiereOSFecha" visible="false">
|
||||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="TxtFechaModal">Fecha cirugía:</asp:Label>
|
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="TxtFechaModal">Fecha De Orden:</asp:Label>
|
||||||
<asp:TextBox ID="TxtFechaModal" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%" step="1"></asp:TextBox>
|
<asp:TextBox ID="TxtFechaModal" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%" step="1"></asp:TextBox>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -8484,7 +8488,7 @@
|
|||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="30px">
|
<asp:TemplateField ItemStyle-HorizontalAlign="Right" HeaderText="Cant." ItemStyle-Width="30px">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtCantidad" runat="server" Text="1" Width="30px"></asp:TextBox>
|
<asp:TextBox ID="TxtCantidad" runat="server" Text="0" Width="30px"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
<ajax:FilteredTextBoxExtender ID="FilTxtCantidad" runat="server" TargetControlID="TxtCantidad" FilterType="Custom, Numbers" ValidChars="." />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|||||||
@@ -2312,6 +2312,18 @@ Partial Class Ventas
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Public Property CveAlmacenAsignado As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CveAlmacenAsignado") Is Nothing Then
|
||||||
|
ViewState("CveAlmacenAsignado") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CveAlmacenAsignado").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CveAlmacenAsignado") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
@@ -6803,6 +6815,10 @@ Partial Class Ventas
|
|||||||
Else
|
Else
|
||||||
Alert("Ocurrió un error al cargar los datos del cliente. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al cargar los datos del cliente. Por favor vuelva a intentar.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
CveAlmacenAsignado = ObjCliente.CveAlmacenAsignado
|
||||||
|
|
||||||
End If
|
End If
|
||||||
ObjCliente.Dispose()
|
ObjCliente.Dispose()
|
||||||
|
|
||||||
@@ -13092,7 +13108,7 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'ASIGNA EL VALOR DEL ALMACEN AL PEDIDO
|
'ASIGNA EL VALOR DEL ALMACEN AL PEDIDO
|
||||||
If factura.TipoDocto = "Ped" Then
|
If factura.TipoDocto = "Ped" And EsVentaMedica = False Then
|
||||||
If CveAlmacenTraspasoDestino <= 0 Then
|
If CveAlmacenTraspasoDestino <= 0 Then
|
||||||
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
|
CveAlmacenTraspasoDestino = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveAlmacen", $"CveTipoAlmacen = 10 AND CveSubProyecto = {DdlSubProyectoDatos.SelectedValue}").ToString().ToEntero()
|
||||||
End If
|
End If
|
||||||
@@ -13103,9 +13119,14 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.CveEmpresa.Contiene(186) AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then
|
If UsuarioActual.CveEmpresa.Contiene(186) AndAlso EsVentaMedica AndAlso RBLTipoVenta.SelectedValue.ToEntero <> 2 Then
|
||||||
CveAlmacenTraspasoDestino = 1031 'FIXME OIC 2023-12-12 Por definir almacen
|
|
||||||
|
If CveAlmacenAsignado <= 0 Then
|
||||||
|
ErrorList.Add("Ocurrió un error al seleccionar el almacen de entrega por adelantado de la sucursal.")
|
||||||
|
Else
|
||||||
|
CveAlmacenTraspasoDestino = CveAlmacenAsignado
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim TotalImpuestoLocal As Double = 0
|
Dim TotalImpuestoLocal As Double = 0
|
||||||
@@ -34922,6 +34943,8 @@ Partial Class Ventas
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
'Property SucursalOrigenCP As Modelos.SucursalModel
|
'Property SucursalOrigenCP As Modelos.SucursalModel
|
||||||
' Get
|
' Get
|
||||||
' If ViewState("SucursalOrigenCP") Is Nothing Then
|
' If ViewState("SucursalOrigenCP") Is Nothing Then
|
||||||
@@ -36026,9 +36049,8 @@ Partial Class Ventas
|
|||||||
TdFechaOS2.Visible = True
|
TdFechaOS2.Visible = True
|
||||||
ChkRequiereTecnico.Checked = True
|
ChkRequiereTecnico.Checked = True
|
||||||
ChkRequiereTecnico.Enabled = False
|
ChkRequiereTecnico.Enabled = False
|
||||||
DdlTipoComprobante.SelectedValueExist("Rem")
|
DdlTipoComprobante.SelectedValueExist("Ped")
|
||||||
Else
|
Else
|
||||||
|
|
||||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||||
End If
|
End If
|
||||||
DdlTipoComprobante.Enabled = False
|
DdlTipoComprobante.Enabled = False
|
||||||
|
|||||||
Reference in New Issue
Block a user