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,14 +2,15 @@
|
|||||||
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
|
||||||
|
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
|
||||||
Partial Class Inventarios_EntregaAlmacen
|
Partial Class Inventarios_EntregaAlmacen
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
Private Property CveVentaAD As Integer
|
Private Property CveVentaAD As Integer
|
||||||
Get
|
Get
|
||||||
@@ -317,13 +318,25 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Set(value As Boolean)
|
Set(value As Boolean)
|
||||||
ViewState("CargaBitacora") = value
|
ViewState("CargaBitacora") = value
|
||||||
End Set
|
End Set
|
||||||
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
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
@@ -339,9 +352,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#Region " INICIALIZA VALORES "
|
#Region " INICIALIZA VALORES "
|
||||||
Private Sub InicializaValores()
|
Private Sub InicializaValores()
|
||||||
TipoEstatus = -1
|
TipoEstatus = -1
|
||||||
@@ -412,11 +425,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CreaDtDetalleLote()
|
CreaDtDetalleLote()
|
||||||
CargaPendientes()
|
CargaPendientes()
|
||||||
LimpiaCampos()
|
LimpiaCampos()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " CARGA PARAMETROS - EXCLUSIVO USO AD "
|
#Region " CARGA PARAMETROS - EXCLUSIVO USO AD "
|
||||||
Private Sub CargaParametrosAD()
|
Private Sub CargaParametrosAD()
|
||||||
|
|
||||||
@@ -434,9 +447,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
BtnGuardar.Visible = False
|
BtnGuardar.Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " CARGA PENDIENTES POR SURTIR "
|
#Region " CARGA PENDIENTES POR SURTIR "
|
||||||
Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
Protected Sub DdlCliente_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||||
CargaFolios()
|
CargaFolios()
|
||||||
@@ -552,11 +565,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Select
|
End Select
|
||||||
UpPendientes.Update()
|
UpPendientes.Update()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " CARGA VENTA POR SURTIR "
|
#Region " CARGA VENTA POR SURTIR "
|
||||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
@@ -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
|
||||||
@@ -995,9 +1016,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
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"))
|
||||||
|
|
||||||
If AplicaSerie Then
|
If AplicaSerie Then
|
||||||
@@ -1119,8 +1142,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
'SI ES TRASPASO OBLIGATORIO SURTIR TODO
|
'SI ES TRASPASO OBLIGATORIO SURTIR TODO
|
||||||
If TipoEntrega = 2 Then
|
If TipoEntrega = 2 Then
|
||||||
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
|
||||||
|
|
||||||
@@ -1135,14 +1164,14 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
GvDocs.DataBind()
|
GvDocs.DataBind()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " AGREGAR "
|
#Region " AGREGAR "
|
||||||
|
|
||||||
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnSerie_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
Dim Argumentos As String() = CType(sender, Button).CommandArgument.Split("°"c)
|
||||||
@@ -1169,10 +1198,10 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
UpSerie.Update()
|
UpSerie.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " AGREGA POR SERIE/LOTE "
|
#Region " AGREGA POR SERIE/LOTE "
|
||||||
|
|
||||||
Private Sub CreaDtDetalle()
|
Private Sub CreaDtDetalle()
|
||||||
If DtDatosDetalle Is Nothing Then
|
If DtDatosDetalle Is Nothing Then
|
||||||
DtDatosDetalle = New DataTable
|
DtDatosDetalle = New DataTable
|
||||||
@@ -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
|
||||||
@@ -1387,7 +1416,7 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ActualizaBitacora()
|
ActualizaBitacora()
|
||||||
CargaSerie()
|
CargaSerie()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
#Region "Bitacora"
|
#Region "Bitacora"
|
||||||
Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False)
|
Private Sub ActualizaBitacora(Optional Eliminar As Boolean = False)
|
||||||
@@ -1431,11 +1460,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
Else
|
Else
|
||||||
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
Alert("No hay bitácora para recuperar.", TipoMensaje.ToastInformacion)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
#Region " AGREGA CON LOTE BATCH "
|
#Region " AGREGA CON LOTE BATCH "
|
||||||
|
|
||||||
Private Sub CreaDtDetalleLote()
|
Private Sub CreaDtDetalleLote()
|
||||||
If DtDatosDetalleLote Is Nothing Then
|
If DtDatosDetalleLote Is Nothing Then
|
||||||
DtDatosDetalleLote = New DataTable
|
DtDatosDetalleLote = New DataTable
|
||||||
@@ -1624,9 +1653,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End Try
|
End Try
|
||||||
DtDatosDetalleLote.AcceptChanges()
|
DtDatosDetalleLote.AcceptChanges()
|
||||||
CargaLote()
|
CargaLote()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " AGREGA CON TXT | CODIGO - SERIE "
|
#Region " AGREGA CON TXT | CODIGO - SERIE "
|
||||||
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnCodigoPS_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
@@ -1758,12 +1787,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
TxtCantidadEspecialDiv.Text = "1"
|
TxtCantidadEspecialDiv.Text = "1"
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
|
||||||
#Region " GUARDAR "
|
#Region " GUARDAR "
|
||||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
@@ -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
|
||||||
|
|
||||||
@@ -3667,160 +3696,160 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
CargaGvDatos()
|
CargaGvDatos()
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " TRASPASO - TRANSITORIO "
|
#Region " TRASPASO - TRANSITORIO "
|
||||||
Protected Sub ChkTransitorio_CheckedChanged(sender As Object, e As EventArgs)
|
Protected Sub ChkTransitorio_CheckedChanged(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
TxtResponsable.Text = ""
|
TxtResponsable.Text = ""
|
||||||
DivTransitorio2.Visible = ChkTransitorio.Checked
|
DivTransitorio2.Visible = ChkTransitorio.Checked
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SECCION ALMACEN"
|
#Region "SECCION ALMACEN"
|
||||||
'Private Sub CreaDtSeccionAlmacen()
|
'Private Sub CreaDtSeccionAlmacen()
|
||||||
' DtSeccionAlmacen = New DataTable
|
' DtSeccionAlmacen = New DataTable
|
||||||
' DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
' DtSeccionAlmacen.Columns.Add("CantidadSeccionAlmacen", GetType(Decimal))
|
||||||
' DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("IndexSeccionAlmacen", GetType(Integer))
|
||||||
' DtSeccionAlmacen.Columns.Add("CveSeccionAlmacen", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("CveSeccionAlmacen", GetType(Integer))
|
||||||
' DtSeccionAlmacen.Columns.Add("CvePS", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("CvePS", GetType(Integer))
|
||||||
' DtSeccionAlmacen.Columns.Add("SeccionAlmacen", GetType(String))
|
' DtSeccionAlmacen.Columns.Add("SeccionAlmacen", GetType(String))
|
||||||
' DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
' DtSeccionAlmacen.Columns.Add("Consec", GetType(Integer))
|
||||||
'End Sub
|
'End Sub
|
||||||
'Private Sub CargaDdlAlmacen()
|
'Private Sub CargaDdlAlmacen()
|
||||||
' DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
' DdlSeccionAlmacen.DataSource = GlobalDTSeccionAlmacen(UsuarioActual.CveEmpresa, -1)
|
||||||
' DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
' DdlSeccionAlmacen.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
' DdlSeccionAlmacen.DataBind()
|
' DdlSeccionAlmacen.DataBind()
|
||||||
'End Sub
|
'End Sub
|
||||||
'Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
'Protected Sub LnkSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
' If Not DdlAlmacen.SelectedValue.ToEntero() > 0 Then
|
' If Not DdlAlmacen.SelectedValue.ToEntero() > 0 Then
|
||||||
' Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen.", TipoMensaje.MsgAdvertencia)
|
' Alert("Tiene que tener seleccionado un almacen para registrar seccion almacen.", TipoMensaje.MsgAdvertencia)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' CantidadTotal = gvRow.FCTextBox("TbCantidadF").Text.ToDecimal
|
' CantidadTotal = gvRow.FCTextBox("TbCantidadF").Text.ToDecimal
|
||||||
' IndexSeccionAlmacen = gvRow.RowIndex
|
' IndexSeccionAlmacen = gvRow.RowIndex
|
||||||
' CvePS = gvRow.DataKey("CvePS").ToEntero()
|
' CvePS = gvRow.DataKey("CvePS").ToEntero()
|
||||||
' CargaSeccionAlmacen()
|
' CargaSeccionAlmacen()
|
||||||
' RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
' RegistraScript("$('#DModalSeccionAlmacen').modal()")
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
'Private Sub CargaSeccionAlmacen()
|
'Private Sub CargaSeccionAlmacen()
|
||||||
' Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
' Dim CantidadTotalSeccion As Decimal = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}").SUMD("CantidadSeccionAlmacen")
|
||||||
' GvSeccion.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}")
|
' GvSeccion.DataSource = DtSeccionAlmacen.FiltraParametros($"IndexSeccionAlmacen = {IndexSeccionAlmacen}")
|
||||||
' GvSeccion.DataBind()
|
' GvSeccion.DataBind()
|
||||||
|
|
||||||
' TxtCantidadSeccion.Text = ""
|
' TxtCantidadSeccion.Text = ""
|
||||||
' DdlSeccionAlmacen.SelectedIndex = 0
|
' DdlSeccionAlmacen.SelectedIndex = 0
|
||||||
' Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
' Dim CantidadRestante As Decimal = CantidadTotal - CantidadTotalSeccion
|
||||||
' If CantidadRestante = 0 Then
|
' If CantidadRestante = 0 Then
|
||||||
' RVTxtCantidad.MaximumValue = "1"
|
' RVTxtCantidad.MaximumValue = "1"
|
||||||
' TxtCantidadSeccion.Enabled = False
|
' TxtCantidadSeccion.Enabled = False
|
||||||
' Else
|
' Else
|
||||||
' RVTxtCantidad.MaximumValue = CantidadRestante.ToString()
|
' RVTxtCantidad.MaximumValue = CantidadRestante.ToString()
|
||||||
' TxtCantidadSeccion.Enabled = True
|
' TxtCantidadSeccion.Enabled = True
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' If CantidadTotalSeccion > 0 Then
|
' If CantidadTotalSeccion > 0 Then
|
||||||
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").Enabled = False
|
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").Enabled = False
|
||||||
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").ToolTip = "Cuenta con sección almacen"
|
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").ToolTip = "Cuenta con sección almacen"
|
||||||
|
|
||||||
' Else
|
' Else
|
||||||
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").Enabled = True
|
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").Enabled = True
|
||||||
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").ToolTip = ""
|
' GvDatos.Rows(IndexSeccionAlmacen).FCTextBox("TbCantidadF").ToolTip = ""
|
||||||
|
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 Then
|
' If DtSeccionAlmacen.SUMD("CantidadSeccionAlmacen") > 0 Then
|
||||||
' DdlAlmacen.Enabled = False
|
' DdlAlmacen.Enabled = False
|
||||||
' DdlAlmacen.ToolTip = "Cuenta con sección almacen"
|
' DdlAlmacen.ToolTip = "Cuenta con sección almacen"
|
||||||
' Else
|
' Else
|
||||||
' DdlAlmacen.Enabled = True
|
' DdlAlmacen.Enabled = True
|
||||||
' DdlAlmacen.ToolTip = ""
|
' DdlAlmacen.ToolTip = ""
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' UpModalSeccionAlmacen.Update()
|
' UpModalSeccionAlmacen.Update()
|
||||||
' UpDatos.Update()
|
' UpDatos.Update()
|
||||||
' UpGenerales.Update()
|
' UpGenerales.Update()
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
'Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
'Protected Sub LnkAddSeccionAlmacen_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
' Dim ObjInv As New ClsInventarios
|
' Dim ObjInv As New ClsInventarios
|
||||||
' Dim CantidadDisponible As Decimal = 0
|
' Dim CantidadDisponible As Decimal = 0
|
||||||
' If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlSeccionAlmacen.SelectedValue.ToEntero(), DdlAlmacen.SelectedValue.ToEntero(),
|
' If ObjInv.GetMovimientosDetalleSeccionesAlmacen(DdlSeccionAlmacen.SelectedValue.ToEntero(), DdlAlmacen.SelectedValue.ToEntero(),
|
||||||
' CvePS, UsuarioActual.CveEmpresa) Then
|
' CvePS, UsuarioActual.CveEmpresa) Then
|
||||||
' If ObjInv.DtResultados.Rows.Count > 0 Then
|
' If ObjInv.DtResultados.Rows.Count > 0 Then
|
||||||
' CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString().ToDecimal
|
' CantidadDisponible = ObjInv.DtResultados.Rows(0)("CantidadRestante").ToString().ToDecimal
|
||||||
' End If
|
' End If
|
||||||
' End If
|
' End If
|
||||||
' ObjInv.Dispose()
|
' ObjInv.Dispose()
|
||||||
|
|
||||||
' CantidadDisponible -= DtSeccionAlmacen.FiltraParametros($"CvePS = {CvePS} AND CveSeccionAlmacen = {DdlSeccionAlmacen.SelectedValue}").SUMD("CantidadSeccionAlmacen")
|
' CantidadDisponible -= DtSeccionAlmacen.FiltraParametros($"CvePS = {CvePS} AND CveSeccionAlmacen = {DdlSeccionAlmacen.SelectedValue}").SUMD("CantidadSeccionAlmacen")
|
||||||
|
|
||||||
' If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
' If TxtCantidadSeccion.Text.ToDecimal > CantidadDisponible Then
|
||||||
' Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
' Alert($"No tiene cantidad de producto suficiente en esta seccion de almacen, su cantidad restante es: <b>{CantidadDisponible}</b>", TipoMensaje.MsgAdvertencia)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' Dim Row As DataRow = Nothing
|
' Dim Row As DataRow = Nothing
|
||||||
' DtSeccionAlmacen.AcceptChanges()
|
' DtSeccionAlmacen.AcceptChanges()
|
||||||
' Row = DtSeccionAlmacen.NewRow
|
' Row = DtSeccionAlmacen.NewRow
|
||||||
' Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
' Row("CantidadSeccionAlmacen") = TxtCantidadSeccion.Text.ToDecimal
|
||||||
' Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
' Row("IndexSeccionAlmacen") = IndexSeccionAlmacen
|
||||||
' Row("CveSeccionAlmacen") = DdlSeccionAlmacen.SelectedValue.ToEntero()
|
' Row("CveSeccionAlmacen") = DdlSeccionAlmacen.SelectedValue.ToEntero()
|
||||||
' Row("SeccionAlmacen") = DdlSeccionAlmacen.SelectedItem.Text
|
' Row("SeccionAlmacen") = DdlSeccionAlmacen.SelectedItem.Text
|
||||||
' Row("CvePS") = CvePS
|
' Row("CvePS") = CvePS
|
||||||
' Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
' Row("Consec") = DtSeccionAlmacen.Rows.Count + 1
|
||||||
' DtSeccionAlmacen.Rows.Add(Row)
|
' DtSeccionAlmacen.Rows.Add(Row)
|
||||||
' DtSeccionAlmacen.AcceptChanges()
|
' DtSeccionAlmacen.AcceptChanges()
|
||||||
' CargaSeccionAlmacen()
|
' CargaSeccionAlmacen()
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
'Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
'Protected Sub LnkEliminarSeccion_Click(sender As Object, e As EventArgs)
|
||||||
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
' Dim gvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||||
' Dim Index As Integer = 0
|
' Dim Index As Integer = 0
|
||||||
' For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
' For Each Dr As DataRow In DtSeccionAlmacen.Rows
|
||||||
' If Dr("Consec").ToString().ToEntero() = gvRow.DataKey("Consec").ToEntero() Then
|
' If Dr("Consec").ToString().ToEntero() = gvRow.DataKey("Consec").ToEntero() Then
|
||||||
' Exit For
|
' Exit For
|
||||||
' End If
|
' End If
|
||||||
' Index += 1
|
' Index += 1
|
||||||
' Next
|
' Next
|
||||||
' DtSeccionAlmacen.Rows.RemoveAt(Index)
|
' DtSeccionAlmacen.Rows.RemoveAt(Index)
|
||||||
' DtSeccionAlmacen.AcceptChanges()
|
' DtSeccionAlmacen.AcceptChanges()
|
||||||
' CargaSeccionAlmacen()
|
' CargaSeccionAlmacen()
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
'Protected Sub LnkVerSecciones_Click(sender As Object, e As EventArgs)
|
||||||
' If Not CveVentaSurtir > 0 Then
|
' If Not CveVentaSurtir > 0 Then
|
||||||
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
' Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' If Not DdlAlmacen.SelectedValue.ToEntero() > 0 Then
|
' If Not DdlAlmacen.SelectedValue.ToEntero() > 0 Then
|
||||||
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
' Alert("Tiene que seleccionar el almacen", TipoMensaje.MsgAdvertencia)
|
||||||
' Exit Sub
|
' Exit Sub
|
||||||
' End If
|
' End If
|
||||||
|
|
||||||
' Dim ObjInv As New ClsInventarios
|
' Dim ObjInv As New ClsInventarios
|
||||||
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
' If ObjInv.GetExistenciaSeccionAlmacen(CveVentaSurtir, DdlAlmacen.SelectedValue.ToEntero(), UsuarioActual.CveEmpresa) Then
|
||||||
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
' GvVerSeccionesAlmacen.DataSource = ObjInv.DtResultados
|
||||||
' End If
|
' End If
|
||||||
' ObjInv.Dispose()
|
' ObjInv.Dispose()
|
||||||
' GvVerSeccionesAlmacen.DataBind()
|
' GvVerSeccionesAlmacen.DataBind()
|
||||||
' UpVerSeccionesAlmacen.Update()
|
' UpVerSeccionesAlmacen.Update()
|
||||||
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
' RegistraScript("$('#ModalVerSeccionesAlmacen').modal()")
|
||||||
'End Sub
|
'End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "DIVIDIR"
|
#Region "DIVIDIR"
|
||||||
|
|
||||||
Protected Sub Dividir(sender As Object, e As EventArgs)
|
Protected Sub Dividir(sender As Object, e As EventArgs)
|
||||||
Dim index2 As Integer = 0
|
Dim index2 As Integer = 0
|
||||||
|
|
||||||
@@ -3901,11 +3930,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
index2 += 1
|
index2 += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " GUIAS - SABE QUE ES PORQUE NO VEO QUE SE UTILIZE EN ALGUNA PARTE - EN MIRAS DE ELIMINAR - IPP 24 AGOSTO 2017 "
|
#Region " GUIAS - SABE QUE ES PORQUE NO VEO QUE SE UTILIZE EN ALGUNA PARTE - EN MIRAS DE ELIMINAR - IPP 24 AGOSTO 2017 "
|
||||||
Private Sub BtnNumeroGuia_Click(sender As Object, e As EventArgs) Handles BtnNumeroGuia.Click
|
Private Sub BtnNumeroGuia_Click(sender As Object, e As EventArgs) Handles BtnNumeroGuia.Click
|
||||||
Dim Objeto As New ClsInventarios
|
Dim Objeto As New ClsInventarios
|
||||||
@@ -3939,11 +3968,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "SUGERENCIAS"
|
#Region "SUGERENCIAS"
|
||||||
|
|
||||||
Protected Sub BtnVerSugerencias_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnVerSugerencias_Click(sender As Object, e As EventArgs)
|
||||||
If Not CveVentaSurtir > 0 Then
|
If Not CveVentaSurtir > 0 Then
|
||||||
Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que seleccionar la venta a surtir", TipoMensaje.MsgAdvertencia)
|
||||||
@@ -4043,12 +4072,12 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
params.Add(New ReportParameter("UsuarioImprimio", UsuarioActual.Usuario))
|
||||||
|
|
||||||
ImprimirPDF("Empresas/Grales/Formatos/RepEntregaAlmacenSugerencia.rdlc", DtDatosSugerencias, params, "Equipo GPS")
|
ImprimirPDF("Empresas/Grales/Formatos/RepEntregaAlmacenSugerencia.rdlc", DtDatosSugerencias, params, "Equipo GPS")
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "TipoEntrega"
|
#Region "TipoEntrega"
|
||||||
|
|
||||||
Protected Sub EntregaRadioGroup_Click(sender As Object, e As EventArgs)
|
Protected Sub EntregaRadioGroup_Click(sender As Object, e As EventArgs)
|
||||||
If RbEntregaExterna.Checked Then
|
If RbEntregaExterna.Checked Then
|
||||||
RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveVenta={CveVentaSurtir}',800,547,'N')")
|
RegistraScript($"AbrirVentana('/General/PopUpPaqueteriasGuias.aspx?CveVenta={CveVentaSurtir}',800,547,'N')")
|
||||||
@@ -4075,9 +4104,9 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
ElseIf RbEntregaInterna.Checked Then
|
ElseIf RbEntregaInterna.Checked Then
|
||||||
'RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
'RegistraScript("$('#ModalPaqueteriaInterna').modal('show')")
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "Cliente entrega personal"
|
#Region "Cliente entrega personal"
|
||||||
Private Sub ClienteEntregaPersonal(CveCliente As Integer)
|
Private Sub ClienteEntregaPersonal(CveCliente As Integer)
|
||||||
Dim ObjVentas As New ClsVentas()
|
Dim ObjVentas As New ClsVentas()
|
||||||
@@ -4092,11 +4121,11 @@ Partial Class Inventarios_EntregaAlmacen
|
|||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
UpClentesPersonalEntrega.Update()
|
UpClentesPersonalEntrega.Update()
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "sugerir caducidad"
|
#Region "sugerir caducidad"
|
||||||
|
|
||||||
Private Sub SugiereLoteCaducidad(CveAlmacen As Integer)
|
Private Sub SugiereLoteCaducidad(CveAlmacen As Integer)
|
||||||
Dim TempDT As New DataTable
|
Dim TempDT As New DataTable
|
||||||
Dim DtLotesCaducidad As New DataTable
|
Dim DtLotesCaducidad As New DataTable
|
||||||
@@ -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
|
||||||
|
|||||||
@@ -806,7 +806,7 @@
|
|||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvMaterialesModal" CssClass="table table-hover table-smallpadding Widthall" GridLines="None" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMaterial,CvePS,CveOSDetalle,CveConsecutivo, CveMovimiento" EmptyDataText="Sin Materiales en la Orden de Servicio" ToolTip="Listado de Materiales de Orden de Servicio" Style="text-align: center;">
|
<asp:GridView ID="GvMaterialesModal" CssClass="table table-hover table-smallpadding Widthall" GridLines="None" runat="server" AutoGenerateColumns="False" DataKeyNames="CveMaterial,CvePS,CveOSDetalle,CveConsecutivo, CveMovimiento" EmptyDataText="Sin Materiales en la Orden de Servicio" ToolTip="Listado de Materiales de Orden de Servicio" Style="text-align: center;">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Cantidad" ItemStyle-Width="15%" />
|
<asp:BoundField DataField="Cantidad" ItemStyle-Width="15%" />
|
||||||
<asp:BoundField DataField="UM" ItemStyle-Width="15%" />
|
<asp:BoundField DataField="UM" ItemStyle-Width="15%" />
|
||||||
<asp:TemplateField ItemStyle-Width="45%">
|
<asp:TemplateField ItemStyle-Width="45%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
@@ -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,116 +14,297 @@
|
|||||||
</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">
|
||||||
<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;" />
|
|
||||||
<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>
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
<div class="row">
|
<ajax:TabContainer runat="server" ID="Tabs">
|
||||||
<div class="col-md-12">
|
|
||||||
|
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
<ajax:TabPanel ID="TabIndicadores" runat="server" HeaderText="Indicadores" ClientIDMode="Static" >
|
||||||
DataKeyNames="CveMedico, Medico, CedulaProfesional, FechaNacimiento, Notas, DiasAtencion, Horario, Lugar, Estatus, CveUsuario, FechaIng, CveEmpresa,Telefono, Mail, Especialidad, Celular, Consultorio"
|
<ContentTemplate>
|
||||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:TemplateField HeaderText="Médico" ItemStyle-HorizontalAlign="Left" >
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlMedico" runat="server" Text='<%# Eval("Medico") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Cédula Profesional" ItemStyle-HorizontalAlign="Left" >
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional" >
|
||||||
<ItemTemplate>
|
<ContentTemplate>
|
||||||
<asp:Literal ID="LtlCedulaProfesional" runat="server" Text='<%# Eval("CedulaProfesional", "{0:N0}") %>'></asp:Literal>
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
</ItemTemplate>
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
</asp:TemplateField>
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
<a href="javascript:;" class="expand"></a>
|
||||||
<ItemTemplate>
|
</div>
|
||||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
<div class="titlefiltros caption">
|
||||||
</ItemTemplate>
|
<div class="row" style="height: 32px;">
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlTelefono" runat="server" Text='<%# Eval("Telefono") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</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">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Horario" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlHorario" runat="server" Text='<%# Eval("Horario") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Lugar" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlLugar" runat="server" Text='<%# Eval("Lugar") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
<div class="col-md-1 truncate">
|
||||||
<ItemTemplate>
|
Fecha Inicio:
|
||||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
</div>
|
||||||
</asp:TemplateField>
|
<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:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
<asp:TextBox Width="80px" ID="txtFechaI" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="10"></asp:TextBox>
|
||||||
<ItemTemplate>
|
<span class="input-group-btn ">
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
<asp:LinkButton ID="imgCalendario" class="btn default " Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||||
</ItemTemplate>
|
</span>
|
||||||
</asp:TemplateField>
|
</div>
|
||||||
|
<ajax:MaskedEditExtender ID="MEEFechaI" runat="server" TargetControlID="txtFechaI" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
|
<ajax:CalendarExtender runat="server" ID="Calendario" TargetControlID="txtFechaI" PopupButtonID="ImgCalendario" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||||
<ItemTemplate>
|
<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:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
<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>
|
||||||
<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" />
|
<ajax:ValidatorCalloutExtender ID="vcoFfvFI" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</ItemTemplate>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFI" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaI" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</asp:TemplateField>
|
</div>
|
||||||
|
<div class="col-md-1 truncate">
|
||||||
|
Fecha Fin:
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
</div>
|
||||||
|
<div class="col-md-1" style="min-width: 115px">
|
||||||
</div>
|
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 100px !important; padding: 0px;">
|
||||||
</div>
|
<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>
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
<label class="col-md-1 ">Cliente:</label>
|
||||||
</asp:UpdatePanel>
|
<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">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveMedico, Medico, CedulaProfesional, FechaNacimiento, Notas, DiasAtencion, Horario, Lugar, Estatus, CveUsuario, FechaIng, CveEmpresa,Telefono, Mail, Especialidad, Celular, Consultorio"
|
||||||
|
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
<asp:TemplateField HeaderText="Médico" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlMedico" runat="server" Text='<%# Eval("Medico") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Cédula Profesional" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlCedulaProfesional" runat="server" Text='<%# Eval("CedulaProfesional", "{0:N0}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlTelefono" runat="server" Text='<%# Eval("Telefono") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Especialidad" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Horario" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlHorario" runat="server" Text='<%# Eval("Horario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Lugar" ItemStyle-HorizontalAlign="Left">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlLugar" runat="server" Text='<%# Eval("Lugar") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
<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>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</ContentTemplate>
|
||||||
|
</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;">
|
||||||
@@ -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,73 +20,264 @@
|
|||||||
<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">
|
||||||
<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;" />
|
<ajax:TabContainer runat="server" ID="Tabs">
|
||||||
<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>
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
|
|
||||||
<div class="row">
|
<ajax:TabPanel ID="TabIndicadores" runat="server" HeaderText="Indicadores">
|
||||||
<div class="col-md-12">
|
<ContentTemplate>
|
||||||
|
|
||||||
<div style="max-width: 800px">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
<ContentTemplate>
|
||||||
DataKeyNames="CveProcedimiento, Procedimiento, Estatus, FechaIng, CveUsuario, CveEmpresa, Usuario, EstatusStr"
|
<div class="portlet solid grey-cascade portlet-filter" id="idnecesaria">
|
||||||
EmptyDataText="No se encontraron Procedimientos Registrados" ToolTip="Listado de Procedimientos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
<div class="portlet-title portlet-filterT smalltitle">
|
||||||
<Columns>
|
<div class="tools">
|
||||||
|
<asp:Button ID="BtnConsultar" runat="server" Text="Consultar" class="btn btn-primary" OnClick="BtnConsultar_Click" />
|
||||||
<asp:HyperLinkField HeaderText="Procedimiento" DataNavigateUrlFields="CveProcedimiento" DataNavigateUrlFormatString="CatProcedimientoDetalle.aspx?CveProcedimiento={0}" DataTextField="Procedimiento" Target="_blank" />
|
<a href="javascript:;" class="expand"></a>
|
||||||
|
</div>
|
||||||
<%-- <asp:TemplateField HeaderText="Procedimiento" ItemStyle-HorizontalAlign="Left" >
|
<div class="titlefiltros caption">
|
||||||
<ItemTemplate>
|
<div class="row" style="height: 32px;">
|
||||||
<asp:Literal ID="LtlProcedimiento" runat="server" Text='<%# Eval("Procedimiento") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>--%>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px" Visible="false">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
|
||||||
<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>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</ContentTemplate>
|
<div class="col-md-1 truncate">
|
||||||
</asp:UpdatePanel>
|
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">
|
||||||
|
<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>
|
||||||
|
</div>
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
<div class="col-md-12">
|
||||||
|
|
||||||
|
<div style="max-width: 800px">
|
||||||
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||||
|
DataKeyNames="CveProcedimiento, Procedimiento, Estatus, FechaIng, CveUsuario, CveEmpresa, Usuario, EstatusStr"
|
||||||
|
EmptyDataText="No se encontraron Procedimientos Registrados" ToolTip="Listado de Procedimientos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||||
|
<Columns>
|
||||||
|
|
||||||
|
<asp:HyperLinkField HeaderText="Procedimiento" DataNavigateUrlFields="CveProcedimiento" DataNavigateUrlFormatString="CatProcedimientoDetalle.aspx?CveProcedimiento={0}" DataTextField="Procedimiento" Target="_blank" />
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
|
|
||||||
|
<asp:TemplateField ItemStyle-HorizontalAlign="center" HeaderText="Opciones" ItemStyle-Width="100px" Visible="false">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" OnClick="Edit_Click" CausesValidation="False" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
|
<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>
|
||||||
|
</asp:TemplateField>
|
||||||
|
</Columns>
|
||||||
|
</asp:GridView>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</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