Ventas medicas fuera de linea
This commit is contained in:
@@ -1045,6 +1045,7 @@ Public Class ClsInventarios
|
||||
.Add("@Licencia", SqlDbType.VarChar).Value = Licencia
|
||||
.Add("@Modulo", SqlDbType.VarChar).Value = Modulo
|
||||
.Add("@CveOP", SqlDbType.Int).Value = CveOP
|
||||
|
||||
.Add("@CveFolioGarantia", SqlDbType.Int).Value = CveFolioGarantia
|
||||
End With
|
||||
|
||||
|
||||
@@ -378,7 +378,7 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function AddEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveUsuario As Integer, CveEmpresa As Integer, BackgroundColor As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_EstatusOrdenServicioAdd")
|
||||
@@ -389,7 +389,7 @@ Public Class ClsOS
|
||||
.Add("@Estado", SqlDbType.Bit).Value = Estado
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
|
||||
.Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -407,7 +407,7 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveEstatusOrdenServicio As Integer) As Boolean
|
||||
Public Function UpdateEstatusOrdenServicio(EstatusOrdenServicio As String, TipoEstatus As Integer, Estado As Integer, CveEstatusOrdenServicio As Integer, BackgroundColor As String) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_EstatusOrdenServicioUpdate")
|
||||
@@ -417,6 +417,7 @@ Public Class ClsOS
|
||||
.Add("@TipoEstatus", SqlDbType.Int).Value = TipoEstatus
|
||||
.Add("@Estado", SqlDbType.Bit).Value = Estado
|
||||
.Add("@CveEstatusOrdenServicio", SqlDbType.Int).Value = CveEstatusOrdenServicio
|
||||
.Add("@BackgroundColor", SqlDbType.VarChar).Value = BackgroundColor
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -419,7 +419,7 @@ Public Class ClsVentas
|
||||
Optional DiasCredito As Integer = 0, Optional EsDiasCreditoFijo As Boolean = False, Optional AnticipoEspecial As Boolean = False, Optional Kilometraje As Double = 0, Optional EsAmortizacion As Boolean = False, Optional CveTipoRetencion As Integer = 0,
|
||||
Optional CorreoNotificacion As String = "", Optional FormaPaqueteria As Integer = 1, Optional FacturarSucursal As Boolean = False, Optional VentaDesglosaIEPS As Boolean = False, Optional ServicioDomicilio As Boolean = False, Optional RFCReceptor As String = "", Optional Adjunto As String = "-1",
|
||||
Optional DevolucionImportePagado As Decimal = 0, Optional EsGarantia As Boolean = False, Optional CveLineaAdicional As Integer = -1, Optional DescripcionVenta As String = "",
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1
|
||||
Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional CveTipoVenta As Integer = -1, Optional RequiereOS As Boolean = False
|
||||
) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
@@ -524,6 +524,8 @@ Public Class ClsVentas
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
||||
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
@@ -552,7 +554,9 @@ Public Class ClsVentas
|
||||
Optional TipoDocto As String = "Cot", Optional Vigencia As Date = MinFecha, Optional CondicionesPago As Integer = -1,
|
||||
Optional AtencionA As String = "-1", Optional PedidoContrato As String = "-1", Optional CveFormaPago33 As Integer = -1, Optional CveMetodoPago33 As Integer = -1,
|
||||
Optional CveCliente As Integer = -1, Optional CveClienteSucursal As Integer = -1, Optional OrdenCompra As String = "-1", Optional RetIVA As Double = -1,
|
||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1) As Boolean
|
||||
Optional RetISR As Double = -1, Optional Kilometraje As Double = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
|
||||
Optional RequiereOS As Boolean = False) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUpdate")
|
||||
|
||||
@@ -586,6 +590,7 @@ Public Class ClsVentas
|
||||
.Add("@CveUsoCFDi", SqlDbType.SmallInt).Value = CveUsoCFDi
|
||||
.Add("@ServicioDomicilio", SqlDbType.Bit).Value = ServicioDomicilio
|
||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -100,6 +100,10 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
DT_SubProyectos.Columns.Add("CveSubProyecto", GetType(Integer))
|
||||
DT_SubProyectos.Columns.Add("backgroundColor")
|
||||
|
||||
Dim DT_EstatusOS = New DataTable
|
||||
DT_EstatusOS.Columns.Add("", GetType(Integer))
|
||||
|
||||
|
||||
'son 26
|
||||
Dim Colores() As String = {"#006699", "#0099cc", "#0066cc", "#0033cc", "#0000ff", "#3333ff", "#3333ff", "#6600ff", "#9933ff", "#cc00ff", "#cc00cc", "#cc0099", "#cc3399", "#cc6699", "#cc0066", "#009933", "#00cc00", "#00cc66", "#009999", "#669900", "#99cc00", "#cccc00", "#cc9900", "#ff9900", "#006666", "#669999"}
|
||||
|
||||
@@ -140,6 +144,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
Dim EsCoordinador As Boolean = False
|
||||
|
||||
Dim usuarioActual_ As Usuario = UsuarioActual(context)
|
||||
@@ -239,6 +245,11 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then
|
||||
|
||||
Dim colorString As String = dr("BackgroundColorOS").ToString.Trim
|
||||
|
||||
If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then
|
||||
cevent.backgroundColor = $"#{colorString}"
|
||||
Else
|
||||
If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
|
||||
@@ -248,6 +259,8 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
Else
|
||||
cevent.backgroundColor = "#006699"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
@@ -424,5 +437,16 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Function IsValidHtmlColor(colorString As String) As Boolean
|
||||
Try
|
||||
Dim color As System.Drawing.Color = System.Drawing.ColorTranslator.FromHtml(colorString)
|
||||
' Si no se produce una excepción, el color es válido
|
||||
Return True
|
||||
Catch ex As Exception
|
||||
' Se produce una excepción, el color no es válido
|
||||
Return False
|
||||
End Try
|
||||
End Function
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
@@ -454,7 +454,7 @@
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlAgente" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlAgente"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Agente''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlMedico.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Agente:</label>
|
||||
<label for="<%= DdlMedico.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Médico:</label>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@
|
||||
</asp:DropDownList>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvDdlAgente" CssClass="help-block errorimput" runat="server" ControlToValidate="DdlAgente"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Agente''</b> es necesario." InitialValue="-1" ValidationGroup="VGAcercamiento"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= DdlMedico.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Medico:</label>
|
||||
<label for="<%= DdlMedico.ClientID.ToString()%>"><span style="color: #F3565D">*</span> Médico:</label>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
@@ -367,7 +367,7 @@
|
||||
</div>
|
||||
<div class="portlet-body">
|
||||
|
||||
<asp:GridView ID="GVPendientes" runat="server" DataKeyNames="TipoEntrega,CveVenta,CveTraspasoSolicitud" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
|
||||
<asp:GridView ID="GVPendientes" runat="server" DataKeyNames="TipoEntrega,CveVenta,CveTraspasoSolicitud,CveOS" EmptyDataText="Aun no hay registros." AutoGenerateColumns="False" ShowHeader="true" ShowHeaderWhenEmpty="True" HeaderStyle-CssClass="Titulos" CssClass="table table-striped table-hover Widthall ScrollAD" data-height="200" data-freezerows="1" GridLines="None">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo" DataField="TipoDocto" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="15%" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Nombre" ItemStyle-Width="45%" />
|
||||
|
||||
@@ -107,6 +107,17 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ViewState("CveVentaSurtir") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Property CveOSSurtir As Integer
|
||||
Get
|
||||
Return CType(ViewState("CveOSSurtir"), Integer)
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOSSurtir") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
Private Property TipoEstatus As Integer
|
||||
Get
|
||||
Return CType(ViewState("TipoEstatus"), Integer)
|
||||
@@ -547,6 +558,10 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Protected Sub BtnSurtir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
Dim Boton As LinkButton = CType(sender, LinkButton)
|
||||
|
||||
Dim GvRow As GridViewRow = DirectCast((DirectCast(sender, LinkButton)).NamingContainer, GridViewRow)
|
||||
Dim CveOS As Integer = GvRow.DataKey("CveOS").ToEntero
|
||||
|
||||
CveVentaAD = -1
|
||||
|
||||
If Boton.CommandArgument.ToEntero() > 0 Then
|
||||
@@ -560,7 +575,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Select Case CType(Boton.NamingContainer, GridViewRow).DataKey("TipoEntrega").ToEntero()
|
||||
Case 1 ' VENTA
|
||||
CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero())
|
||||
CargaVentaPorSurtir(CType(sender, LinkButton).CommandArgument.ToEntero(), CveOS:=CveOS)
|
||||
Case 2 ' TRASPASO
|
||||
DivTransitorio1.Visible = True
|
||||
CargaTraspasoPorSurtir(CType(Boton.NamingContainer, GridViewRow).DataKey("CveTraspasoSolicitud").ToEntero())
|
||||
@@ -573,7 +588,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveVentaAD = -2
|
||||
CargaVentaPorSurtir(DdlFolio.SelectedValue.ToEntero())
|
||||
End Sub
|
||||
Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1)
|
||||
Private Sub CargaVentaPorSurtir(CveVenta As Integer, Optional CveAlmacen As Integer = -1, Optional CveOS As Integer = -1)
|
||||
LbSurtida.Visible = False
|
||||
CveContrato = -1
|
||||
CveSubProyecto = -1
|
||||
@@ -582,6 +597,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
TipoEntrega = 1
|
||||
BtnGuardar.Visible = True
|
||||
|
||||
|
||||
|
||||
Dim StrAlmacenes As String = "CveTipoAlmacen IN (1,2,26)"
|
||||
|
||||
If UsuarioActual.CveSubProyecto = 8804 Then
|
||||
@@ -642,6 +659,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
trObsAlmacen.Visible = drE("ObservacionesAlmacen").ToString() <> ""
|
||||
LbObservacionesAlmacen.Text = drE("ObservacionesAlmacen").ToString()
|
||||
CveVentaSurtir = CveVenta
|
||||
CveOSSurtir = CveOS
|
||||
CveAlmacenTraspasoDestino = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoOrigen", "CveAlmacenTraspasoDestino")).ToString().ToEntero()
|
||||
CveAlmacenTraspasoOrigen = drE(If(EsDevolucionVenta = 1 And TipoDocto <> "Rem", "CveAlmacenTraspasoDestino", "CveAlmacenTraspasoOrigen")).ToString().ToEntero()
|
||||
CveContrato = drE("CveContrato").ToString().ToEntero()
|
||||
@@ -857,6 +875,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
EsInterno = CBool(DtDatos.Rows(0)("EsInterno").ToString())
|
||||
CveOP = DtDatos.Rows(0)("CveOP").ToString().ToEntero()
|
||||
CveVentaSurtir = -1
|
||||
CveOSSurtir = -1
|
||||
If DtDatos.SUM("CantidadS") <= 0 Then
|
||||
GvDatos.CssClass = "table table-striped table-hover Widthall ScrollAD gvInventario gvEscondeColumna"
|
||||
Else
|
||||
@@ -945,7 +964,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
'SugerirFecha()
|
||||
If DdlAlmacen.SelectedValue.ToEntero > 0 And CveVentaSurtir > 0 Then
|
||||
CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero)
|
||||
CargaVentaPorSurtir(CveVentaSurtir, CveAlmacen:=DdlAlmacen.SelectedValue.ToEntero, CveOS:=CveOSSurtir)
|
||||
|
||||
If CargaBitacora Then
|
||||
CargaBitacoraSerie()
|
||||
@@ -2002,7 +2021,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC1")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
@@ -2052,7 +2071,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr1("CveAlmacen")}").ToEntero()
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), CveConceptoSalidaSinCosto, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, Modulo:="RE/GSC3")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
|
||||
@@ -2112,7 +2131,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
Dim CveAlmacenExA As Integer = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=10).FiltroPrimeroValor("CveAlmacen", $"CveSubProyecto={CveSubProyecto}").ToEntero()
|
||||
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(CveAlmacenExA, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(CveAlmacenExA, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
@@ -2194,7 +2213,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente),
|
||||
CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G1")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
@@ -2248,7 +2267,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveMovimientoSalida = DtTraspasos.FiltroPrimeroValor("CveMovimientoSalida", $"CveAlmacen = {Dr2("CveAlmacen")}").ToEntero()
|
||||
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim,
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr2("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim,
|
||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente),
|
||||
CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G2")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
@@ -2301,7 +2320,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
If Not CveMovimientoSalida > 0 Then
|
||||
|
||||
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoSalida = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor,
|
||||
CveCliente:=If(UsuarioActual.Empresa.Funcionalidad(146) = "1", -1, CveCliente), CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G3")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
@@ -2359,7 +2378,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
For Each Dr1 As DataRow In DtTraspasos.Select("CveTipoAlmacen = 9")
|
||||
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
|
||||
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
@@ -2403,7 +2422,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If DtGarantias IsNot Nothing AndAlso DtGarantias.Rows.Count > 0 AndAlso CveAlmacenGarantia > 0 Then
|
||||
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
|
||||
CveMovimientoGarantia = ObjInventario.AddMovimiento(CveAlmacenGarantia, 14, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, Modulo:="EA/G5")
|
||||
FolioGarantia = ObjInventario.Folio
|
||||
|
||||
For Each RowGarantia As DataRow In DtGarantias.Rows
|
||||
@@ -2455,7 +2474,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
'Dim AlmacenSinCosto As String = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveTipoAlmacen:=26).FiltroPrimeroValor("Almacen", $"CveAlmacen={CveAlmacenSinCosto}").ToString()
|
||||
|
||||
Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
Dim CveMovimientoDevolucionSinCosto As Integer = ObjInventario.AddMovimiento(DdlAlmacen.SelectedValue.ToEntero(), 41, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), CveMovimientoRelacionado:=CveMovimientoSalida,
|
||||
Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente, Modulo:="RE/G4")
|
||||
Dim FolioDevSinCosto As Integer = ObjInventario.Folio
|
||||
@@ -2539,7 +2558,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
ConceptoMovimiento = 41
|
||||
End If
|
||||
|
||||
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
|
||||
CveMovimiento = ObjInventario.AddMovimiento(Almacen1, ConceptoMovimiento, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text,
|
||||
CveContrato:=CveContrato, CveAlmacenDestino:=tCveAlmacenTraspasoDestino, Modulo:="RE/G7")
|
||||
Folio = ObjInventario.Folio
|
||||
|
||||
@@ -2640,7 +2659,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
'ENTRADA POR TRASPASO CUANDO ES REMISION
|
||||
If Not ErrorMovInv Then
|
||||
If tCveAlmacenTraspasoDestino > 0 AndAlso Not (TipoMovimiento = 2 And TipoDocto = "Dev" And EsDevolucionVenta = 1) Then ' TRASPASO CUANDO ES REMISION
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(tCveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato,
|
||||
CveMovimientoEntrada = ObjInventario.AddMovimiento(tCveAlmacenTraspasoDestino, 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato,
|
||||
CveMovimientoRelacionado:=CveMovimiento, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(), Modulo:="RE/G8")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
Dim ImporteAlmacen As Decimal = 0
|
||||
@@ -2695,7 +2714,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
For Each Dr As DataRow In DtTempApartados.Rows
|
||||
|
||||
If CveMovimientoSalidaApartado = -1 Or CveAlmacenApartado <> Dr("CveAlmacen").ToString().ToEntero() Then
|
||||
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoSalidaApartado = ObjInventario.AddMovimiento(CveAlmacenOrigen, 8, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor, CveCliente:=CveCliente,
|
||||
CveAlmacenDestino:=Dr("CveAlmacen").ToString().ToEntero(), Modulo:="RE/G9")
|
||||
FolioSalida = ObjInventario.Folio
|
||||
@@ -2742,7 +2761,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CveMovimientoSalida = Dr1("CveMovimientoSalida").ToString().ToEntero()
|
||||
|
||||
CveMovimientoEntradaApartado = ObjInventario.AddMovimiento(Dr1("CveAlmacen").ToString().ToEntero(), 9, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||
-1, CveVentaSurtir, -1, -1, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(),
|
||||
-1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir, Observaciones:=TxtObservaciones.Text.Trim, CveAlmacenDestino:=DdlAlmacen.SelectedValue.ToEntero(),
|
||||
CveMovimientoRelacionado:=CveMovimientoSalida, Guia:=TxtGuia.Text, CveContrato:=CveContrato, CveVendedor:=CveVendedor,
|
||||
CveCliente:=CveCliente, Modulo:="RE/G10")
|
||||
FolioEntrada = ObjInventario.Folio
|
||||
@@ -2880,7 +2899,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
End If
|
||||
|
||||
If DtPSVirtual IsNot Nothing AndAlso DtPSVirtual.Rows.Count > 0 AndAlso CveAlmacenVirtual > 0 AndAlso CveConceptoMovimientoVirtual > 0 Then
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1,
|
||||
CveMovimientoVirtual = ObjInventario.AddMovimiento(CveAlmacenVirtual, CveConceptoMovimientoVirtual, 1, TxtFecha.Text.ToDate, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, CveVentaSurtir, -1, -1, CveOS:=CveOSSurtir,
|
||||
Observaciones:=TxtObservaciones.Text.Trim, Guia:=TxtGuia.Text, CveMovimientoRelacionado:=CveMovimientoRelacionadoVirtual, Modulo:="RE/G6")
|
||||
FolioVirtual = ObjInventario.Folio
|
||||
|
||||
@@ -2941,9 +2960,12 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
'AGREGA BITACORA A VENTA
|
||||
If Not ErrorMovInv Then
|
||||
Dim MensajeBitacora As String = If(TipoMovimiento = 1, "Surtida", "Devuelta")
|
||||
If Not ObjEventos.AddEventoBitacora(String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora), "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir) Then
|
||||
Dim LigaVenta As String = String.Format("Venta {2} en Folio: <a href=""/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}"" target=""_blank"">{1}</a>", CveMovimiento, Folio, MensajeBitacora)
|
||||
|
||||
If Not ObjEventos.AddEventoBitacora(LigaVenta, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVenta:=CveVentaSurtir, CveOS:=CveOSSurtir) Then
|
||||
ErrorMovInv = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
'Paqueterias guias
|
||||
@@ -3610,6 +3632,8 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
'VARIABLES GENERALES
|
||||
CveVentaSurtir = -1
|
||||
CveOSSurtir = -1
|
||||
|
||||
DtDatosDetalle = Nothing
|
||||
DtDatosDetalleLote = Nothing
|
||||
DtDatos = Nothing
|
||||
@@ -4137,6 +4161,7 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
' HdnCveVenta.Value = GvRow.DataKey("CveVenta");
|
||||
' CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
||||
|
||||
|
||||
' UpModalEditarentrega.Update();
|
||||
' RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
'}
|
||||
|
||||
@@ -394,7 +394,7 @@ Partial Class OS_Asignaciones
|
||||
|
||||
lrds.Add(rds)
|
||||
lrds.Add(rds2)
|
||||
ObjOS.Dispose()
|
||||
|
||||
|
||||
Dim ReporteByte As Byte() = StreamPDF(RutaReporte.FullName, lrds, params, NombreArchivo:=String.Format("OrdenServicio-{0}", CveFolio))
|
||||
|
||||
|
||||
@@ -102,7 +102,7 @@
|
||||
<ContentTemplate>
|
||||
<asp:HiddenField ClientIDMode="Static" runat="server" ID="HdnCveEstatus" Value="-1" />
|
||||
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveEstatusOrdenServicio,TipoEstatus,TipoEstatusTexto,EstatusOrdenServicio,EstatusBool,Estado,Orden" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Estatus de Ordenes de Servicios">
|
||||
<asp:GridView ID="GvDatos" runat="server" GridLines="None" DataKeyNames="CveEstatusOrdenServicio,TipoEstatus,TipoEstatusTexto,EstatusOrdenServicio,EstatusBool,Estado,Orden,BackgroundColor" CssClass="table table-striped table-advance table-hover Widthall" CellSpacing="0" Width="100%" AutoGenerateColumns="False" EmptyDataText="No se encontraron registros" ToolTip="Listado de Estatus de Ordenes de Servicios">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="EstatusOrdenServicio" HeaderText="Estatus Orden Servicio" ItemStyle-HorizontalAlign="Left" />
|
||||
<asp:BoundField DataField="Estado" HeaderText="Estado" ItemStyle-HorizontalAlign="Left" />
|
||||
@@ -203,6 +203,15 @@
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control" />
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Estatus:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtBackgroundColor" runat="server" CssClass="form-control" CausesValidation="true" ClientIDMode="Static" MaxLength="6" Width="100px"></asp:TextBox>
|
||||
<label for="<%= TxtBackgroundColor.ClientID.ToString()%>">Color:</label>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
<div class="modal-footer">
|
||||
@@ -224,12 +233,27 @@
|
||||
<asp:HiddenField ID="HdnID" runat="server" Value="-1" ClientIDMode="Static" />
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
|
||||
|
||||
<link type="text/css" href="../Scripts/jquery.simple-color-picker.css" rel="stylesheet" />
|
||||
|
||||
<script src="/Metronic/assets/global/scripts/datatable.js"></script>
|
||||
<script src="/Metronic/assets/global/plugins/datatables/all.min.js"></script>
|
||||
|
||||
<script type="text/javascript" src="../Scripts/jquery.simple-color-picker.js"></script>
|
||||
|
||||
|
||||
|
||||
bootstrap-colorpicker.min.css
|
||||
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
function ShowDivRegistro() {
|
||||
$('#divAddImpuestoLocal').modal();
|
||||
}
|
||||
|
||||
@@ -67,6 +67,7 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
CargarTodosLosDatos()
|
||||
CveEstatuOS = -1
|
||||
End If
|
||||
RegistraScript(" $('#TxtBackgroundColor').simpleColorPicker();")
|
||||
End Sub
|
||||
|
||||
Private Sub CargarTodosLosDatos()
|
||||
@@ -93,24 +94,28 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
End Sub
|
||||
|
||||
Private Sub BtnAgregarEstatus_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatus.Click
|
||||
|
||||
TxtEstatusOS.Text = ""
|
||||
TxtBackgroundColor.Text = ""
|
||||
BtnAgregarEstatusOS.Text = "Agregar"
|
||||
divChkEstatus.Visible = False
|
||||
UpBodyEstatus.Update()
|
||||
UpFooter.Update()
|
||||
RegistraScript("$('#divAddEstatusOS').modal();LimpiaModal()")
|
||||
|
||||
End Sub
|
||||
Protected Sub BtnAgregarEstatusOS_Click(sender As Object, e As EventArgs) Handles BtnAgregarEstatusOS.Click
|
||||
Dim ObjEstatusOrdenServicios As New ClsOS
|
||||
Dim TieneError = False
|
||||
|
||||
If HdnModalidad.Value = "I" Then
|
||||
If ObjEstatusOrdenServicios.AddEstatusOrdenServicio(TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, If(ChkEstatus.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjEstatusOrdenServicios.AddEstatusOrdenServicio(TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, If(ChkEstatus.Checked, 1, 0), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, TxtBackgroundColor.Text.Replace("#", "")) Then
|
||||
'CargaDatos()
|
||||
Alert("Estatus agregado")
|
||||
End If
|
||||
Else
|
||||
If HdnID.Value.ToEntero <> -1 Then
|
||||
If Not ObjEstatusOrdenServicios.UpdateEstatusOrdenServicio(TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, If(ChkEstatus.Checked, 1, 0), HdnID.Value.ToEntero) Then
|
||||
If Not ObjEstatusOrdenServicios.UpdateEstatusOrdenServicio(TxtEstatusOS.Text.Trim, DdlTipoEstatus.SelectedValue.ToEntero, If(ChkEstatus.Checked, 1, 0), HdnID.Value.ToEntero, TxtBackgroundColor.Text.Replace("#", "")) Then
|
||||
TieneError = True
|
||||
End If
|
||||
End If
|
||||
@@ -140,6 +145,7 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
TxtEstatusOS.Text = GvRow.DataKey("EstatusOrdenServicio")
|
||||
ChkEstatus.Checked = If(GvRow.DataKey("Estado").ToString = "Activo", True, False)
|
||||
CveEstatuOS = GvRow.DataKey("CveEstatusOrdenServicio").ToEntero
|
||||
TxtBackgroundColor.Text = "#" & GvRow.DataKey("BackgroundColor")
|
||||
BtnAgregarEstatusOS.Text = "Actualizar"
|
||||
divChkEstatus.Visible = True
|
||||
UpBodyEstatus.Update()
|
||||
@@ -205,10 +211,16 @@ Partial Class OS_CatEstatusOrdenServicio
|
||||
Dim tableResultado As DataTable = DTUsuarios
|
||||
For Each Estatus As DataRow In DtEstatusOS.Rows
|
||||
Dim CveColumnaEstatus As String = Estatus.Item("CveEstatusOrdenServicio").ToString
|
||||
|
||||
If Not tableResultado.Columns.Contains(CveColumnaEstatus) Then
|
||||
tableResultado.Columns.Add(CveColumnaEstatus, Type.GetType("System.Boolean"))
|
||||
End If
|
||||
|
||||
For Each Usuario As DataRow In tableResultado.Rows
|
||||
Usuario.Item(CveColumnaEstatus) = Not IsNothing(DTEstatusUsuarios.FiltroPrimero(String.Format("CveUsuario = {0} and CveEstatusOrdenServicio = {1}", Usuario.Item("CveUsuario"), CveColumnaEstatus)))
|
||||
Next
|
||||
|
||||
|
||||
Next
|
||||
DtEstatusUsuariosAsociados = tableResultado
|
||||
End Sub
|
||||
|
||||
@@ -215,7 +215,7 @@
|
||||
<div class="row" id="DVAMedicoProcedimiento" runat="server" visible="false">
|
||||
|
||||
<div class="col-md-2" style="margin-top: 5px">
|
||||
<b>Medico:</b>
|
||||
<b>Médico:</b>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4" style="margin-top: 5px; text-align: left">
|
||||
|
||||
@@ -855,6 +855,10 @@ Partial Class OS_RepServicioDomicilio
|
||||
|
||||
Dim CveSubProyectoTecnico As Integer = If(DdlTecnicoAsignar.SelectedValue.ToEntero > 0, GlobalDTUsuarios(DdlTecnicoAsignar.SelectedValue.ToEntero, UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveSubProyecto", " CveSubProyecto > 0 ").ToEntero, -1)
|
||||
|
||||
If CveSubProyectoTecnico = 0 And DdlTecnicoAsignar.SelectedValue.ToEntero = 100 Then
|
||||
CveSubProyectoTecnico = GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1).FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
End If
|
||||
|
||||
|
||||
If TipoAccion = OSModalTipoAccion.Asignacion AndAlso Not CveSubProyectoTecnico > 0 Then
|
||||
Alert("No se encontro el subproyecto o centro de costo del tecnico seleccionado.")
|
||||
|
||||
31
Scripts/jquery.simple-color-picker.css
Normal file
31
Scripts/jquery.simple-color-picker.css
Normal file
@@ -0,0 +1,31 @@
|
||||
html, body { height: 100%; }
|
||||
div.color-picker {
|
||||
border-left: 1px solid #000;
|
||||
border-top: 1px solid #000;
|
||||
left: 0px;
|
||||
top: 0px;
|
||||
padding: 0px;
|
||||
position: absolute;
|
||||
position: relative;
|
||||
z-index: 1000;
|
||||
}
|
||||
div.color-picker ul {
|
||||
list-style: none;
|
||||
padding: 0px;
|
||||
margin: 0px;
|
||||
float: left;
|
||||
position: absolute;
|
||||
position: relative;
|
||||
}
|
||||
div.color-picker ul li {
|
||||
display: block;
|
||||
width: 15px;
|
||||
height: 15px;
|
||||
border-right: 1px solid #000;
|
||||
border-bottom: 1px solid #000;
|
||||
margin: 0px;
|
||||
float: left;
|
||||
cursor: pointer;
|
||||
position: absolute;
|
||||
position: relative;
|
||||
}
|
||||
104
Scripts/jquery.simple-color-picker.js
Normal file
104
Scripts/jquery.simple-color-picker.js
Normal file
@@ -0,0 +1,104 @@
|
||||
|
||||
$.fn.simpleColorPicker = function(options) {
|
||||
var defaults = {
|
||||
colorsPerLine: 8,
|
||||
colors: ['#000000', '#444444', '#666666', '#999999', '#cccccc', '#eeeeee', '#f3f3f3', '#ffffff'
|
||||
, '#ff0000', '#ff9900', '#ffff00', '#00ff00', '#00ffff', '#0000ff', '#9900ff', '#ff00ff'
|
||||
, '#f4cccc', '#fce5cd', '#fff2cc', '#d9ead3', '#d0e0e3', '#cfe2f3', '#d9d2e9', '#ead1dc'
|
||||
, '#ea9999', '#f9cb9c', '#ffe599', '#b6d7a8', '#a2c4c9', '#9fc5e8', '#b4a7d6', '#d5a6bd'
|
||||
, '#e06666', '#f6b26b', '#ffd966', '#93c47d', '#76a5af', '#6fa8dc', '#8e7cc3', '#c27ba0'
|
||||
, '#cc0000', '#e69138', '#f1c232', '#6aa84f', '#45818e', '#3d85c6', '#674ea7', '#a64d79'
|
||||
, '#990000', '#b45f06', '#bf9000', '#38761d', '#134f5c', '#0b5394', '#351c75', '#741b47'
|
||||
, '#660000', '#783f04', '#7f6000', '#274e13', '#0c343d', '#073763', '#20124d', '#4C1130'],
|
||||
showEffect: '',
|
||||
hideEffect: '',
|
||||
onChangeColor: false,
|
||||
includeMargins:false,
|
||||
};
|
||||
|
||||
var opts = $.extend(defaults, options);
|
||||
|
||||
return this.each(function() {
|
||||
var txt = $(this);
|
||||
|
||||
var colorsMarkup = '';
|
||||
|
||||
var prefix = txt.attr('id').replace(/-/g, '') + '_';
|
||||
|
||||
for(var i = 0; i < opts.colors.length; i++){
|
||||
var item = opts.colors[i];
|
||||
|
||||
var breakLine = '';
|
||||
if (i % opts.colorsPerLine == 0)
|
||||
breakLine = 'clear: both; ';
|
||||
|
||||
if (i > 0 && breakLine && $.browser && $.browser.msie && $.browser.version <= 7) {
|
||||
breakLine = '';
|
||||
colorsMarkup += '<li style="float: none; clear: both; overflow: hidden; background-color: #fff; display: block; height: 1px; line-height: 1px; font-size: 1px; margin-bottom: -2px;"></li>';
|
||||
}
|
||||
|
||||
colorsMarkup += '<li id="' + prefix + 'color-' + i + '" class="color-box" style="' + breakLine + 'background-color: ' + item + '" title="' + item + '"></li>';
|
||||
}
|
||||
|
||||
var box = $('<div id="' + prefix + 'color-picker" class="color-picker" style="position: absolute; left: 0px; top: 0px;"><ul>' + colorsMarkup + '</ul><div style="clear: both;"></div></div>');
|
||||
$('body').append(box);
|
||||
box.hide();
|
||||
|
||||
box.find('li.color-box').click(function() {
|
||||
if (txt.is('input')) {
|
||||
txt.val(opts.colors[this.id.substr(this.id.indexOf('-') + 1)]);
|
||||
txt.blur();
|
||||
}
|
||||
if ($.isFunction(defaults.onChangeColor)) {
|
||||
defaults.onChangeColor.call(txt, opts.colors[this.id.substr(this.id.indexOf('-') + 1)]);
|
||||
}
|
||||
hideBox(box);
|
||||
});
|
||||
|
||||
$('body').on('click', function() {
|
||||
hideBox(box);
|
||||
});
|
||||
|
||||
box.click(function(event) {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
var positionAndShowBox = function(box) {
|
||||
var pos = txt.offset();
|
||||
var left = pos.left + txt.outerWidth(opts.includeMargins) - box.outerWidth(opts.includeMargins);
|
||||
if (left < pos.left) left = pos.left;
|
||||
box.css({ left: left, top: (pos.top + txt.outerHeight(opts.includeMargins)) });
|
||||
showBox(box);
|
||||
}
|
||||
|
||||
txt.click(function(event) {
|
||||
event.stopPropagation();
|
||||
if (!txt.is('input')) {
|
||||
// element is not an input so probably a link or div which requires the color box to be shown
|
||||
positionAndShowBox(box);
|
||||
}
|
||||
});
|
||||
|
||||
txt.focus(function() {
|
||||
positionAndShowBox(box);
|
||||
});
|
||||
|
||||
function hideBox(box) {
|
||||
if (opts.hideEffect == 'fade')
|
||||
box.fadeOut();
|
||||
else if (opts.hideEffect == 'slide')
|
||||
box.slideUp();
|
||||
else
|
||||
box.hide();
|
||||
}
|
||||
|
||||
function showBox(box) {
|
||||
if (opts.showEffect == 'fade')
|
||||
box.fadeIn();
|
||||
else if (opts.showEffect == 'slide')
|
||||
box.slideDown();
|
||||
else
|
||||
box.show();
|
||||
}
|
||||
});
|
||||
};
|
||||
@@ -9,7 +9,7 @@
|
||||
padding: 0px 5px;
|
||||
}
|
||||
|
||||
.nolineheight {
|
||||
.nolineheight {ChkRequiereTecnico
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
@@ -559,6 +559,41 @@
|
||||
<td colspan="3">
|
||||
<asp:TextBox ID="TxtDescripcionVenta" runat="server" Rows="2" TextMode="MultiLine" Width="100%" MaxLength="300" CssClass="form-control input-sm" Enabled="false"></asp:TextBox></td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
<tr runat="server" id="TrVentasMedicas1" visible="false">
|
||||
<td><b>Médico:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
<td><b>Procedimiento:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="130px">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
<tr runat="server" id="TrVentasMedicas2" visible="false">
|
||||
<td runat="server" id="TdRequiereTecnico1" visible="false">
|
||||
<b>Requiere Técnico:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdRequiereTecnico2" visible="false">
|
||||
<asp:CheckBox ID="ChkRequiereTecnico" runat="server" OnCheckedChanged="ChkRequiereTecnico_CheckedChanged" AutoPostBack="true" />
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS1" visible ="false">
|
||||
<b>Fecha de Orden:</b>
|
||||
</td>
|
||||
<td runat="server" id="TdFechaOS2" visible ="false">
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 130px" step="1"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -5328,7 +5363,7 @@
|
||||
<div style="max-height: 300px; overflow-y: auto;">
|
||||
<asp:GridView ID="GvRem" runat="server" AutoGenerateColumns="false" GridLines="None"
|
||||
CssClass="table table-grid table-striped table-advance table-hover Widthall"
|
||||
DataKeyNames="CveVenta, SubTotal, IVA,Total, CveContrato,Surtido" AllowPaging="False">
|
||||
DataKeyNames="CveVenta, SubTotal, IVA,Total, CveContrato,Surtido,Medico,Procedimiento" AllowPaging="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -5348,7 +5383,7 @@
|
||||
</asp:GridView>
|
||||
|
||||
<asp:GridView ID="GvRemPS" runat="server" AutoGenerateColumns="false" GridLines="None" Visible="false" CssClass="table table-grid table-striped table-advance table-hover Widthall"
|
||||
DataKeyNames="CveVentaDetalle, PU, Total, Cantidad, CveContrato,Surtido" AllowPaging="False">
|
||||
DataKeyNames="CveVentaDetalle, PU, Total, Cantidad, CveContrato,Surtido,Medico,Procedimiento" AllowPaging="False">
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<ItemTemplate>
|
||||
@@ -8366,6 +8401,105 @@
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID="LblDvModalTipoVentaTitulo" runat="server">Tipo de Venta</asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="min-height: 233.45px">
|
||||
|
||||
<%--Tipo Venta--%>
|
||||
<div class="row" runat="server" visible="True" id="DvModalTipoVentaPasoTipo" >
|
||||
<div class="col-md-4" >
|
||||
</div>
|
||||
<div class="col-md-4" style="text-align:left!important" >
|
||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Vertical" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged">
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="col-md-4" >
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClientesWS">Cliente:</asp:Label>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label>
|
||||
<asp:DropDownList ID="DdlMedicoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlMedicoModal" runat="server" CssClass="help-block errorimput" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlMedicoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Medico''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlMedicoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlMedicoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
|
||||
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" >
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:RequiredFieldValidator ID="RfvDdlProcedimientoModal" runat="server" CssClass="help-block errorimput" Display="None" InitialValue="-1"
|
||||
ControlToValidate="DdlProcedimientoModal" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpModalVentaMedica"></asp:RequiredFieldValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlProcedimientoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlProcedimientoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%-- Requiere Os y Fecha OS --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoRequiereOS">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Requiere Técnico:</asp:Label>
|
||||
<asp:CheckBox ID="ChkRequiereTecnicoModal" runat="server" CssClass="form-control" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" />
|
||||
</div>
|
||||
<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 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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkDvModalTipoVentaAceptar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkDvModalTipoVentaAceptar_Click" Text="Aceptar" Visible="false" ValidationGroup="GrpModalVentaMedica" />
|
||||
<asp:LinkButton ID="LnkDvModalTipoVentaCancelar" ClientIDMode="Static" runat="server" CssClass="btn btn-default" OnClick="LnkDvModalTipoVentaCancelar_Click" Text="Cancelar" />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
|
||||
@@ -978,6 +978,15 @@ Partial Class Ventas
|
||||
Return ViewState("CveOS").ToString().ToEntero()
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Private Property CveOSVentaMedica As Integer
|
||||
Get
|
||||
Return ViewState("CveOSVentaMedica").ToString().ToEntero()
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveOSVentaMedica") = value
|
||||
End Set
|
||||
End Property
|
||||
Private ReadOnly Property SaldoVenta As Decimal
|
||||
Get
|
||||
Return If(IsNothing(ViewState("SaldoVenta")), 0, ViewState("SaldoVenta").ToString().ToDecimal)
|
||||
@@ -2434,6 +2443,8 @@ Partial Class Ventas
|
||||
CveAlmacenDevolucion = 0
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
txtFechaICot.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIRem.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
TxtFechaIPed.Text = NowADS().AddMonths(-3).ToShortDateString
|
||||
@@ -2582,9 +2593,15 @@ Partial Class Ventas
|
||||
CargaFormaEntrega()
|
||||
CargaCuentasTerminal()
|
||||
CargaDdlNCPS()
|
||||
|
||||
CargarCamiones()
|
||||
|
||||
|
||||
CargaMedicos()
|
||||
CargaProcedimientos()
|
||||
CargaDdlClientes()
|
||||
|
||||
|
||||
|
||||
'SI USUARIO USA AMORTIZACIÓN CONTABLE, se carga las tablas para usarlas mas adelante
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaAC Then
|
||||
|
||||
@@ -3011,7 +3028,6 @@ Partial Class Ventas
|
||||
CveEstatus = 2
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3424,6 +3440,12 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 AndAlso Request("VM") IsNot Nothing AndAlso IsNumeric(Request("VM")) AndAlso Request("VM").ToEntero() = 1 Then
|
||||
EsVentaMedica = True
|
||||
CargaTiposVenta()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
@@ -7682,6 +7704,60 @@ Partial Class Ventas
|
||||
'DdlClasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa)
|
||||
DdlClasificacion.DataBind()
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
Private Sub CargaTiposVenta()
|
||||
|
||||
' 
|
||||
'Dim Dttemp = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ").FiltraParametros("", {"", ""})
|
||||
|
||||
RBLTipoVenta.DataSource = GlobalDTTipoVenta().FiltraParametros("Estatus = 'True' ")
|
||||
RBLTipoVenta.DataBind()
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
|
||||
|
||||
For Each item As ListItem In RBLTipoVenta.Items
|
||||
item.Text = $"  {item.Text}"
|
||||
Next
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProcedimientos()
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMedicos()
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDdlClientes()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.ddl.Items.Clear()
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPS(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost, Optional AplicaParaVenta As Boolean = True)
|
||||
|
||||
Objeto.setEsWebService(UsuarioActual.Empresa.Funcionalidad(141).ToString() = "1")
|
||||
@@ -10099,6 +10175,8 @@ Partial Class Ventas
|
||||
DebeTimbrar = False
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If DebeTimbrar AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Egs", "Ant", "Dev") Then
|
||||
If UsuarioActual.Empresa.TipoFacturacion = "CFDi" AndAlso (UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1) Then
|
||||
|
||||
@@ -13051,7 +13129,8 @@ Partial Class Ventas
|
||||
DiasCredito:=factura.DiasCredito, EsDiasCreditoFijo:=factura.EsDiasCreditoFijo, AnticipoEspecial:=If(TrAntEspecial.Visible, ChkAntEspecial.Checked, False),
|
||||
Kilometraje:=TxtKilometraje.Text.ToDouble, EsAmortizacion:=EsNCAmortizacion, CveTipoRetencion:=factura.CveTipoRetencion, CorreoNotificacion:=TxtCorreoNotificaciones.Text,
|
||||
FormaPaqueteria:=RblPaqueteria.SelectedValue.ToEntero, FacturarSucursal:=factura.FacturarSucursal, VentaDesglosaIEPS:=factura.VentaDesglosaIEPS, RFCReceptor:=RFCReceptor, Adjunto:=Adjunto, DevolucionImportePagado:=factura.DevolucionImportePagado, EsGarantia:=factura.EsGarantia, ServicioDomicilio:=TrServicioDomicilio.Visible,
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta) Then
|
||||
CveLineaAdicional:=DdlLineaAdicional.SelectedValue.ToEntero(), DescripcionVenta:=DescripcionVenta,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, RequiereOS:=ChkRequiereTecnico.Checked) Then
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
Else
|
||||
If factura.TipoDocto.Contiene("Dev", "Egs") OrElse DtVentasNC IsNot Nothing OrElse CveEstatusRefacturacion > 0 OrElse CveAnticipoPadre > 0 Then
|
||||
@@ -13390,6 +13469,18 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
If EsVentaMedica AndAlso ErrorList.Count = 0 AndAlso ChkRequiereTecnico.Checked Then
|
||||
GeneraOS(ObjVentas.IniciaTransacSQL, ErrorList)
|
||||
|
||||
If ErrorList.Count = 0 Then
|
||||
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOSVentaMedica) Then
|
||||
ErrorList.Add("Ocurrió un error al guardar la venta en Ordenes de Servicio")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
'Si viene de OS, Se guarda CveVenta en OS
|
||||
If CveOS > 0 Then
|
||||
If Not ObjOS.UpdateVentaOS(factura.CveVenta, CveOS) Then
|
||||
@@ -30658,6 +30749,8 @@ Partial Class Ventas
|
||||
CambiaTipoComprobante()
|
||||
|
||||
Dim MensajeRemisiones As New StringBuilder
|
||||
Dim MensajeRemisionesMedicas As New StringBuilder
|
||||
Dim EsRemisionMedica As Boolean = False
|
||||
Dim ObsOC As New StringBuilder
|
||||
Dim ObsPedido As New StringBuilder
|
||||
Dim ObsInv As New StringBuilder
|
||||
@@ -30667,6 +30760,17 @@ Partial Class Ventas
|
||||
Dim MetodoPagoDif As Boolean = False
|
||||
|
||||
For Each Dr As DataRow In dtSeleccionadas.Rows
|
||||
|
||||
If Dr("Medico").ToString.Length > 0 Then
|
||||
MensajeRemisionesMedicas.Append($"Dr. {Dr("MEdico").ToString}{vbCrLf}")
|
||||
EsRemisionMedica = True
|
||||
End If
|
||||
If Dr("Medico").ToString.Length > 0 Then
|
||||
MensajeRemisionesMedicas.Append($"Procedimiento {Dr("Procedimiento")}{vbCrLf}")
|
||||
EsRemisionMedica = True
|
||||
End If
|
||||
MensajeRemisionesMedicas.Append($"Rem. {Dr("Folio")} {If(Dr("ObsFact").ToString().Length > 0, $"({Dr("ObsFact")})", "")}{vbCrLf}")
|
||||
|
||||
MensajeRemisiones.AppendFormat("{0} {1}, ", Dr("Folio"), If(Dr("ObsFact").ToString().Length > 0, $"({Dr("ObsFact")})", ""))
|
||||
ObsOC.AppendFormat("{0}, ", Dr("ObsOC"))
|
||||
ObsPedido.AppendFormat("{0}, ", Dr("ObsPedido"))
|
||||
@@ -30677,7 +30781,14 @@ Partial Class Ventas
|
||||
End If
|
||||
CveMetodoPago = Dr("CveMetodoPago33").ToString().ToEntero()
|
||||
Next
|
||||
|
||||
If EsRemisionMedica Then
|
||||
TxtObsFact.Text = If(MensajeRemisionesMedicas.ToString().Length > 0, MensajeRemisionesMedicas.ToString().Substring(0, MensajeRemisionesMedicas.ToString().Length - 2), "")
|
||||
Else
|
||||
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
|
||||
End If
|
||||
|
||||
|
||||
TxtOrdenCompra.Text = If(ObsOC.ToString().Length > 0, ObsOC.ToString().Substring(0, ObsOC.ToString().Length - 2), "")
|
||||
TxtPedidoContrato.Text = If(ObsPedido.ToString().Length > 0, ObsPedido.ToString().Substring(0, ObsPedido.ToString().Length - 2), "")
|
||||
TxtObsAlmacen.Text = If(ObsInv.ToString().Length > 0, ObsInv.ToString().Substring(0, ObsInv.ToString().Length - 2), "")
|
||||
@@ -34444,6 +34555,22 @@ Partial Class Ventas
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Property EsVentaMedica As Boolean
|
||||
Get
|
||||
If ViewState("EsVentaMedica") Is Nothing Then
|
||||
ViewState("EsVentaMedica") = False
|
||||
End If
|
||||
|
||||
Return Boolean.Parse(ViewState("EsVentaMedica").ToString)
|
||||
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsVentaMedica") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
'Property SucursalOrigenCP As Modelos.SucursalModel
|
||||
' Get
|
||||
' If ViewState("SucursalOrigenCP") Is Nothing Then
|
||||
@@ -35407,5 +35534,229 @@ Partial Class Ventas
|
||||
DdlFormaCliente.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
#Region "VENTAS MEDICAS"
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub RBLTipoVenta_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = False
|
||||
DvModalTipoVentaPasoCliente.Visible = True
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = True
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
|
||||
TxtFechaModal.Text = NowADS.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
LnkDvModalTipoVentaAceptar.Visible = True
|
||||
|
||||
'si es A - Vista o ,Fuera De Linea requiere tecnico
|
||||
If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
ChkRequiereTecnicoModal.Checked = True
|
||||
ChkRequiereTecnicoModal.Enabled = False
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
'Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
' If DdlClientesWS.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
' DvModalTipoVentaPasoCliente.Visible = False
|
||||
' DvModalTipoVentaPasoRequiereOS.Visible = True
|
||||
|
||||
|
||||
|
||||
' 'si es A - Vista o ,Fuera De Linea requiere tecnico
|
||||
' If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
' ChkRequiereTecnicoModal.Checked = True
|
||||
' ChkRequiereTecnicoModal.Enabled = False
|
||||
' DvModalRequiereOSFecha.Visible = True
|
||||
' End If
|
||||
|
||||
' End If
|
||||
|
||||
' UpDvModalTipoVenta.Update()
|
||||
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlMedicoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' ModalValidaMedicoProcedimiento()
|
||||
'End Sub
|
||||
|
||||
'Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
' ModalValidaMedicoProcedimiento()
|
||||
'End Sub
|
||||
|
||||
Protected Sub ModalValidaMedicoProcedimiento()
|
||||
|
||||
If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||
LnkDvModalTipoVentaAceptar.Visible = True
|
||||
Else
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = True
|
||||
DvModalTipoVentaPasoCliente.Visible = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
|
||||
ChkRequiereTecnicoModal.Enabled = True
|
||||
|
||||
DdlClientesWS.txtText.Value = ""
|
||||
DdlClientesWS.txtValue.Value = ""
|
||||
DdlClientesWS.ddl.SelectedValueExist(-1)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
|
||||
RBLTipoVenta.SelectedValue = Nothing
|
||||
|
||||
DdlMedicoModal.SelectedValueExist(-1)
|
||||
DdlProcedimientoModal.SelectedValueExist(-1)
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlClientesWS.SelectedValue.ToEntero > 0 Then
|
||||
ViewState("CveCliente") = DdlClientesWS.SelectedValue.ToEntero
|
||||
Else
|
||||
Alert("Debe de seleccionar un cliente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
|
||||
Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||
TxtFechaOS.Text = TxtFechaModal.Text
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
TdFechaOS1.Visible = True
|
||||
TdFechaOS2.Visible = True
|
||||
Else
|
||||
TdFechaOS1.Visible = False
|
||||
TdFechaOS2.Visible = False
|
||||
End If
|
||||
|
||||
DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
|
||||
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
|
||||
|
||||
'si es A - Vista o ,Fuera De Linea requiere tecnico
|
||||
If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
TdFechaOS1.Visible = True
|
||||
TdFechaOS2.Visible = True
|
||||
ChkRequiereTecnico.Checked = True
|
||||
ChkRequiereTecnico.Enabled = False
|
||||
DdlTipoComprobante.SelectedValueExist("Rem")
|
||||
Else
|
||||
|
||||
DdlTipoComprobante.SelectedValueExist("Ing")
|
||||
End If
|
||||
DdlTipoComprobante.Enabled = False
|
||||
|
||||
TdRequiereTecnico1.Visible = True
|
||||
TdRequiereTecnico2.Visible = True
|
||||
|
||||
|
||||
CargaCliente(CveCliente)
|
||||
|
||||
DdlTipoComprobante_SelectedIndexChanged(sender, Nothing)
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Private Function GeneraOS(ByRef TransacSQL As SqlTransaction, ByRef errorList As List(Of String)) As Boolean
|
||||
|
||||
|
||||
Dim Errores As Boolean = False
|
||||
|
||||
Dim ObjOrdenServicio As New ClsOS(TransacSQL)
|
||||
|
||||
Dim CveOSTipo As Integer = -1
|
||||
|
||||
If ObjOrdenServicio.GetTipoOrdenesServicios(UsuarioActual.CveEmpresa) Then
|
||||
CveOSTipo = ObjOrdenServicio.DtResultados.FiltroPrimeroValor("CveOrdenServicioTipo", " Estatus = 'Activo' ").ToEntero
|
||||
End If
|
||||
|
||||
Dim EstatusOrdenServicio As Integer = GlobalDTEstatusOrdenServicios(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveEstatusOrdenServicio", "TipoEstatus = 1").ToEntero
|
||||
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFecha.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, -1, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSubProyectoDatos.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFecha.Text.Replace(",", "").ToDateTime) Then
|
||||
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la orden de servicio.")
|
||||
Errores = True
|
||||
End If
|
||||
|
||||
Dim CvePSDetalle As Integer = UsuarioActual.Empresa.Funcionalidad(708).ToEntero
|
||||
|
||||
If Not CvePSDetalle > 0 Then
|
||||
errorList.Add("No se tiene asignado un producto para la orden de servicio (FNC 708).")
|
||||
Errores = True
|
||||
End If
|
||||
|
||||
If Not Errores Then
|
||||
|
||||
Dim CveOsDetalle = ObjOrdenServicio.AddOrdenesServiciosDetalle(ObjOrdenServicio.CveOS, CvePSDetalle, 1, -1, -1, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", False, True, False, -1, "-1", "-1", "-1", "", UsuarioActual.CveUsuario, Archivo:="")
|
||||
|
||||
If CveOsDetalle > 0 Then
|
||||
'MENSAJE PRINCIPAL
|
||||
Dim MensajeAlertOS As New StringBuilder
|
||||
MensajeAlertOS.AppendFormat(String.Format("<br/>La Orden de Servicio: <b>{0}</b> se generó correctamente.<br/><br/>", ObjOrdenServicio.Folio))
|
||||
MensajeAlert.AppendFormat("<ul><li><a class=""Texto"" href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar PDF</a></li></ul><br/>", Encripta(String.Format("OP=OS&CVEOS={0}", ObjOrdenServicio.CveOS)))
|
||||
Dim Liga = $"document.location.href=""/OS/RepOrdenesServicios.aspx"";"
|
||||
Alert(MensajeAlertOS.ToString, TipoMensaje.MsgInformacion, Liga)
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la el detalle de la orden de servicio.")
|
||||
Errores = True
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
Return If(Errores, False, True)
|
||||
|
||||
End Function
|
||||
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
@@ -321,7 +321,9 @@
|
||||
<asp:Label ID="LblMedioCaptacionCRM" runat="server" Text=""></asp:Label></td>
|
||||
</tr>
|
||||
|
||||
<tr>
|
||||
|
||||
|
||||
<tr runat="server" id="TrVentasMedicas1">
|
||||
<td><b>Medico:</b></td>
|
||||
<td>
|
||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico">
|
||||
@@ -335,7 +337,7 @@
|
||||
</asp:DropDownList>
|
||||
</td>
|
||||
</tr>
|
||||
<tr >
|
||||
<tr runat="server" id="TrVentasMedicas2">
|
||||
<td runat="server" id="TdRequiereTecnico1" visible="false">
|
||||
<b>Requiere Técnico:</b>
|
||||
</td>
|
||||
@@ -349,6 +351,7 @@
|
||||
<asp:TextBox ID="TxtFecha" type="datetime-local" runat="server" CssClass="form-control" CausesValidation="true" Style="width: 100%" step="1"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1522,9 +1525,12 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlPS">Producto Servicio:</asp:Label>
|
||||
<ADS:Dropdownlost runat="server" ID="DdlPS" CssStyle="width: 100%;" CssClass="DdlPS " CssClassDdl="form-control select2me " IncluyeTodos="false" DataTextField="PSCodigo" DataValueField="CvePS" data-onresult="CargaExistenciaAlmacenes" />
|
||||
<label for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>
|
||||
<%--<label for="<%= DdlPS.ClientID.ToString()%>">Producto Servicio:</label>--%>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -1591,29 +1597,98 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<ContentTemplate>
|
||||
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
|
||||
|
||||
|
||||
<div class="modal-content">
|
||||
<div class="modal-header ">
|
||||
<h4 class="modal-title">Tipo de Venta</h4>
|
||||
<h4 class="modal-title">
|
||||
<asp:Label ID=""></asp:Label>
|
||||
Tipo de Venta
|
||||
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged">
|
||||
<div class="modal-body" style="min-height:130.15px">
|
||||
|
||||
<%--Tipo Venta--%>
|
||||
<div runat="server" visible="True" id="DvModalTipoVentaPasoTipo">
|
||||
<asp:RadioButtonList ID="RBLTipoVenta" DataTextField="TipoVenta" RepeatDirection="Horizontal" DataValueField="CveTipoVenta" runat="server" AutoPostBack="true" OnSelectedIndexChanged="RBLTipoVenta_SelectedIndexChanged">
|
||||
</asp:RadioButtonList>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<%--Cliente--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoCliente">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright selectmodal">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlClientesWS">Cliente:</asp:Label>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 90%;" Onselectedindexchange="DdlClientesWS_selectedindexchange" ></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<%-- Requiere Os y Fecha OS --%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoRequiereOS">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Requiere Técnico::</asp:Label>
|
||||
<asp:CheckBox ID="ChkRequiereTecnicoModal" runat="server" CssClass="form-control" OnCheckedChanged="ChkRequiereTecnicoModal_CheckedChanged" AutoPostBack="true" />
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal" runat="server" id="DvModalRequiereOSFecha" visible ="false">
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-lg-12" style="text-align:right;margin-top:5px!">
|
||||
<asp:LinkButton ID="LnkDvModalTipoVentaSeuigenteRequiereTecnico" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkDvModalTipoVentaSeuigenteRequiereTecnico_Click" Text="Siguiente"/>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<%--Medico Procedimiento--%>
|
||||
<div runat="server" visible="False" id="DvModalTipoVentaPasoMedicoProcedimiento">
|
||||
<div class="row">
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Medico:</asp:Label>
|
||||
<asp:DropDownList ID="DdlMedicoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlMedicoModal_SelectedIndexChanged">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright selectmodal">
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
|
||||
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento"
|
||||
AutoPostBack="true" OnSelectedIndexChanged="DdlProcedimientoModal_SelectedIndexChanged">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkDvModalTipoVentaAceptar" ClientIDMode="Static" runat="server" CssClass="btn btn-primary" OnClick="LnkDvModalTipoVentaAceptar_Click" Text="Aceptar" Visible="false" />
|
||||
<asp:LinkButton ID="LnkDvModalTipoVentaCancelar" ClientIDMode="Static" runat="server" CssClass="btn btn-default" OnClick="LnkDvModalTipoVentaCancelar_Click" Text="Cancelar" />
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
</asp:Content>
|
||||
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
|
||||
@@ -2414,7 +2414,7 @@ Partial Class VentasMedicas
|
||||
Me.CveEstadoCancelacion = 0
|
||||
|
||||
|
||||
TxtFecha.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
TxtFechaOS.Text = NowADS().ToDateTime.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(177) Then
|
||||
DdlTipoComprobante.Items.Insert(4, New ListItem("Pedido de Contrato", "Ped"))
|
||||
@@ -2422,11 +2422,7 @@ Partial Class VentasMedicas
|
||||
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(595) = "1" Then
|
||||
' ImgDescPU.Visible = False
|
||||
' ImgDescConcepto.Visible = False
|
||||
' DdlTipoComprobante.Items.Insert(DdlTipoComprobante.Items.Count, New ListItem("Autorización", "PA"))
|
||||
'End If
|
||||
|
||||
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(558) = "1" Then
|
||||
LnkAgregarCliente.Visible = False
|
||||
@@ -2439,18 +2435,8 @@ Partial Class VentasMedicas
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'If UsuarioActual.Empresa.Funcionalidad(561).ToString() = "1" Then
|
||||
' thPoliza.Visible = True
|
||||
' thPoliza2.Visible = True
|
||||
'End If
|
||||
|
||||
|
||||
|
||||
|
||||
SetValues()
|
||||
|
||||
CvePresupuesto = 0
|
||||
|
||||
'MODALIDADES
|
||||
@@ -2473,8 +2459,7 @@ Partial Class VentasMedicas
|
||||
LblUsuario.Text = UsuarioActual.Usuario
|
||||
LblFechaRegistro.Text = NowADS().ToShortDateString()
|
||||
|
||||
'ImgDescPU.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '0'; $get('LblPrecio1').style.display = ''; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
|
||||
'ImgDescConcepto.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '1'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = ''; $get('LblSubTotal1').style.display = 'none'; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = ''; $get('BtnAplicarDescG').style.display = 'none'; $get('TrMotivoDescuento').style.display = '';")
|
||||
|
||||
ImgDescTotal.Visible = False
|
||||
|
||||
ImgDescTotal.Attributes.Add("onclick", "javascript:$('#ModalDescuento').modal(); $get('LblTitulo1').style.display = ''; $get('LblTitulo2').style.display = 'none'; $get('LblTituloTipo1').style.display = ''; $get('LblTituloTipo2').style.display = 'none'; $get('HdnTipoDescuento').value = '2'; $get('LblPrecio1').style.display = 'none'; $get('LblTotalPS1').style.display = 'none'; $get('LblSubTotal1').style.display = ''; $get('LblAmort').style.display = 'none'; $get('BtnAplicarDescP').style.display = 'none'; $get('BtnAplicarDescG').style.display = ''; $get('TrMotivoDescuento').style.display = '';")
|
||||
@@ -2501,6 +2486,7 @@ Partial Class VentasMedicas
|
||||
CargaAgentes()
|
||||
CargaProcedimientos()
|
||||
CargaTiposVenta()
|
||||
CargaDdlClientes()
|
||||
|
||||
|
||||
|
||||
@@ -2833,6 +2819,20 @@ Partial Class VentasMedicas
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaDdlClientes()
|
||||
If UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.setEsWebService(True)
|
||||
Else
|
||||
DdlClientesWS.setEsWebService(False)
|
||||
If Not UsuarioActual.Empresa.Funcionalidad(105) = "1" Then
|
||||
DdlClientesWS.ddl.Items.Clear()
|
||||
DdlClientesWS.DataSource = GlobalDTCliente(UsuarioActual.CveEmpresa, -1)
|
||||
DdlClientesWS.DataBind()
|
||||
DdlClientesWS.ddl.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Private Sub BloqueaClasificaciones()
|
||||
If UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso DdlTipoComprobante.SelectedValue = "Cot" Then
|
||||
@@ -4337,11 +4337,18 @@ Partial Class VentasMedicas
|
||||
Private Sub CargaProcedimientos()
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
End Sub
|
||||
|
||||
Private Sub CargaAgentes()
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
DdlProcedimientoModal.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaPSRemision(CveClasificacion As Integer, Objeto As ADServerControl.Dropdownlost)
|
||||
@@ -14283,29 +14290,152 @@ Partial Class VentasMedicas
|
||||
CargaFormaPago(DdlMetodoPago33.SelectedValue.ToEntero())
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
TdFechaOS2.Visible = ChkRequiereTecnicoModal.Checked
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub RBLTipoVenta_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero > 0 Then
|
||||
DvModalTipoVentaPasoTipo.Visible = False
|
||||
DvModalTipoVentaPasoCliente.Visible = True
|
||||
'DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
'DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
End If
|
||||
UpDvModalTipoVenta.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlClientesWS_selectedindexchange(sender As Object, e As EventArgs)
|
||||
|
||||
If DdlClientesWS.SelectedValue.ToEntero > 0 Then
|
||||
|
||||
DvModalTipoVentaPasoCliente.Visible = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = True
|
||||
|
||||
TxtFechaModal.Text = NowADS.ToString("yyyy-MM-dd HH:mm:ss").Replace(" ", "T")
|
||||
|
||||
'si es A - Vista o ,Fuera De Linea requiere tecnico
|
||||
If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
ChkRequiereTecnicoModal.Checked = True
|
||||
ChkRequiereTecnicoModal.Enabled = False
|
||||
DvModalRequiereOSFecha.Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaSeuigenteRequiereTecnico_Click(sender As Object, e As EventArgs)
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
If Not IsDate(TxtFechaModal.Text.Replace(",", "")) Then
|
||||
Alert("El campo fecha no es valido.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = True
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlMedicoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ModalValidaMedicoProcedimiento()
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlProcedimientoModal_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
ModalValidaMedicoProcedimiento()
|
||||
End Sub
|
||||
|
||||
Protected Sub ModalValidaMedicoProcedimiento()
|
||||
|
||||
If DdlMedicoModal.SelectedValue.ToEntero > 0 AndAlso DdlProcedimientoModal.SelectedValue.ToEntero > 0 Then
|
||||
LnkDvModalTipoVentaAceptar.Visible = True
|
||||
Else
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaCancelar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
LnkDvModalTipoVentaAceptar.Visible = False
|
||||
|
||||
DvModalTipoVentaPasoTipo.Visible = True
|
||||
DvModalTipoVentaPasoCliente.Visible = False
|
||||
DvModalTipoVentaPasoRequiereOS.Visible = False
|
||||
DvModalTipoVentaPasoMedicoProcedimiento.Visible = False
|
||||
|
||||
DdlClientesWS.txtText.Value = ""
|
||||
DdlClientesWS.txtValue.Value = ""
|
||||
DdlClientesWS.ddl.SelectedValueExist(-1)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = False
|
||||
ChkRequiereTecnicoModal.Checked = False
|
||||
|
||||
RBLTipoVenta.SelectedValue = Nothing
|
||||
|
||||
DdlMedicoModal.SelectedValueExist(-1)
|
||||
DdlProcedimientoModal.SelectedValueExist(-1)
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkDvModalTipoVentaAceptar_Click(sender As Object, e As EventArgs)
|
||||
|
||||
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||
TxtFecha.Text = TxtFechaModal.Text
|
||||
|
||||
If ChkRequiereTecnicoModal.Checked Then
|
||||
TdFechaOS1.Visible = True
|
||||
TdFechaOS2.Visible = True
|
||||
Else
|
||||
TdFechaOS1.Visible = False
|
||||
TdFechaOS2.Visible = False
|
||||
End If
|
||||
|
||||
DdlMedico.SelectedValueExist(DdlMedicoModal.SelectedValue)
|
||||
DdlProcedimiento.SelectedValueExist(DdlProcedimientoModal.SelectedValue)
|
||||
|
||||
'si es A - Vista o ,Fuera De Linea requiere tecnico
|
||||
If RBLTipoVenta.SelectedValue.ToEntero.Contiene(1, 3) Then
|
||||
TdFechaOS1.Visible = True
|
||||
TdFechaOS2.Visible = True
|
||||
ChkRequiereTecnico.Checked = True
|
||||
ChkRequiereTecnico.Enabled = False
|
||||
End If
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||
TdRequiereTecnico1.Visible = True
|
||||
TdRequiereTecnico2.Visible = True
|
||||
End If
|
||||
|
||||
CargaCliente(DdlClientesWS.SelectedValue.ToEntero)
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
UpCliente.Update()
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
|
||||
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
|
||||
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnicoModal_CheckedChanged(sender As Object, e As EventArgs)
|
||||
|
||||
DvModalRequiereOSFecha.Visible = ChkRequiereTecnicoModal.Checked
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user