Merge branch 'master' of http://192.168.10.111:8383/SIG
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
|
||||
|
||||
|
||||
@@ -3363,9 +3363,6 @@ Public Class ClsNominas
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||
End Sub
|
||||
Public Function RunQuery(errormsg As String) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
Try
|
||||
@@ -3684,6 +3681,43 @@ Public Class ClsNominas
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function ConceptosGetallnewEmpresa(CveEmpresaOrigen As Integer, CveEmpresaDestino As Integer) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_ConceptosGetallnewEmpresa", CommandType.StoredProcedure)
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveEmpresaOrigen", SqlDbType.Int).Value = CveEmpresaOrigen
|
||||
.Add("@CveEmpresaDestino", SqlDbType.Int).Value = CveEmpresaDestino
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al clonar los conceptos de nominas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
Public Function CargaPeriodosEjercicio(ejercicio As Int32, cveTipoPeriodo As Int32, cveSubTipoPeriodo As Int32, numero As Int32, fechaInicio As String, cveEmpresa As Int32, cveUsuario As Int32) As Boolean
|
||||
Dim retorno As Boolean = False
|
||||
DataAdapter("PA_Nom_CargaPeriodosEjercicio", CommandType.StoredProcedure)
|
||||
addParameters("@Ejercicio", SqlDbType.Int, ejercicio)
|
||||
addParameters("@CveTipoPeriodo", SqlDbType.Int, cveTipoPeriodo)
|
||||
addParameters("@CveSubTipoPeriodo", SqlDbType.Int, cveSubTipoPeriodo)
|
||||
addParameters("@Numero", SqlDbType.Int, numero)
|
||||
addParameters("@FechaInicio", SqlDbType.VarChar, fechaInicio)
|
||||
addParameters("@CveEmpresa", SqlDbType.Int, cveEmpresa)
|
||||
addParameters("@CveUsuario", SqlDbType.Int, cveUsuario)
|
||||
retorno = RunQuery("Ocurrió un error al realizar la carga de periodos.")
|
||||
Return retorno
|
||||
End Function
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Public Sub addParameters(varsql As String, sqltipe As SqlDbType, valor As Object)
|
||||
SqlAdapter.SelectCommand.Parameters.Add(varsql, sqltipe).Value = valor
|
||||
End Sub
|
||||
#Region "IDisposable Support"
|
||||
' IDisposable
|
||||
Protected Overridable Sub Dispose(ByVal disposing As Boolean)
|
||||
|
||||
@@ -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
|
||||
@@ -5989,7 +5994,8 @@ Public Class ClsVentas
|
||||
|
||||
|
||||
|
||||
Public Function AddMedico(Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function AddMedico(Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosAdd")
|
||||
@@ -6005,6 +6011,11 @@ Public Class ClsVentas
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@Mail", SqlDbType.VarChar).Value = Mail
|
||||
.Add("@Especialidad", SqlDbType.VarChar).Value = Especialidad
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
@@ -6016,7 +6027,8 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateMedico(CveMedico As Integer, Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean
|
||||
Public Function UpdateMedico(CveMedico As Integer, Medico As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Estatus As Boolean, CveUsuario As Integer,
|
||||
CveEmpresa As Integer, Telefono As String, Mail As String, Especialidad As String) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_MedicosUpdate")
|
||||
@@ -6032,6 +6044,9 @@ Public Class ClsVentas
|
||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@Telefono", SqlDbType.VarChar).Value = Telefono
|
||||
.Add("@Mail", SqlDbType.VarChar).Value = Mail
|
||||
.Add("@Especialidad", SqlDbType.VarChar).Value = Especialidad
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
|
||||
@@ -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,17 +245,24 @@ Public Class CargaEventos : Implements IHttpHandler, IRequiresSessionState
|
||||
|
||||
If usuarioActual_.Empresa.Funcionalidad(578) = "1" Then
|
||||
|
||||
If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
|
||||
cevent.backgroundColor = "#025716"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
|
||||
cevent.backgroundColor = "#730505"
|
||||
Dim colorString As String = dr("BackgroundColorOS").ToString.Trim
|
||||
|
||||
If colorString.Length > 0 AndAlso IsValidHtmlColor(colorString) Then
|
||||
cevent.backgroundColor = $"#{colorString}"
|
||||
Else
|
||||
cevent.backgroundColor = "#006699"
|
||||
If dr("TipoEstatusOS").ToString.ToEntero.Contiene(1, 2, 3) Then
|
||||
cevent.backgroundColor = "#006699"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(4) Then
|
||||
cevent.backgroundColor = "#025716"
|
||||
ElseIf dr("TipoEstatusOS").ToString.ToEntero.Contiene(5) Then
|
||||
cevent.backgroundColor = "#730505"
|
||||
Else
|
||||
cevent.backgroundColor = "#006699"
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
'VERIFICAMOS SI TIENE O NO RECURRENCIA
|
||||
@@ -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>
|
||||
|
||||
|
||||
@@ -8598,7 +8598,9 @@ Partial Class Compras_Compras
|
||||
If Not ObjCompra.UpdateCompraDetalle(Row("CvePS").ToString.ToEntero, Row("Cantidad").ToString.ToDecimal, Row("PU").ToString.ToDecimal, Row("IVA").ToString.ToDecimal, Row("Total").ToString.ToDecimal,
|
||||
Row("Descuento").ToString.ToDecimal, Row("Obs").ToString, Row("CveSubProyecto").ToString.ToEntero, Row("CvePresupuestoEgreso").ToString.ToEntero, CveAF, Row("CveCompraDetalle").ToString.ToEntero, CvePersonal:=CvePersonal, CveTipoGasto:=Row("CveTipoGasto").ToString.ToEntero, AF_Medida:=Row("AFMedida").ToString.ToEntero, AF_TipoMantenimiento:=Row("AFTipoMantenimiento").ToString.ToEntero, Referencia:=Referencia,
|
||||
RetIVA:=Row("RetIVA").ToString.ToDecimal, RetISR:=Row("RetISR").ToString.ToDecimal, IEPSPS:=Row("IEPSPS").ToString.ToDecimal, IEPSPSIVA:=Row("IEPSPSIVA").ToString.ToDecimal,
|
||||
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal, IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso ChkEsNoDeducible.Checked, True, False), CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero) Then
|
||||
IVAPorcentaje:=Row("IVAPorcentaje").ToString.ToDecimal, RetIVAPorcentaje:=Row("RetIVAPorcentaje").ToString.ToDecimal, RetISRPorcentaje:=Row("RetISRPorcentaje").ToString.ToDecimal,
|
||||
IEPSPSPorcentaje:=Row("IEPSPSPorcentaje").ToString.ToDecimal, IEPSPSIVAPorcentaje:=Row("IEPSPSIVAPorcentaje").ToString.ToDecimal, NoDeducible:=If((Row("NoDeducible").ToString().ToUpper().Contiene("TRUE", "1")) AndAlso ChkEsNoDeducible.Checked, True, False),
|
||||
CveContratoDetalle:=Row("CveContratoDetalle").ToString.ToEntero) Then
|
||||
|
||||
Retorno = False
|
||||
Exit For
|
||||
@@ -10884,7 +10886,7 @@ Partial Class Compras_Compras
|
||||
|
||||
|
||||
Try
|
||||
TmpDT.Rows(Index)("CveActivoFijo") = Nothing
|
||||
TmpDT.Rows(Index)("CveActivoFijo") = -1
|
||||
TmpDT.AcceptChanges()
|
||||
Catch ex As Exception
|
||||
|
||||
|
||||
@@ -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%" />
|
||||
|
||||
@@ -106,7 +106,18 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
Set(value As Integer)
|
||||
ViewState("CveVentaSurtir") = value
|
||||
End Set
|
||||
End Property
|
||||
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,15 +588,17 @@ 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
|
||||
CveOP = -1
|
||||
DtDatos = Nothing
|
||||
TipoEntrega = 1
|
||||
BtnGuardar.Visible = True
|
||||
|
||||
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
|
||||
@@ -3609,7 +3631,9 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
CargaFolios()
|
||||
|
||||
'VARIABLES GENERALES
|
||||
CveVentaSurtir = -1
|
||||
CveVentaSurtir = -1
|
||||
CveOSSurtir = -1
|
||||
|
||||
DtDatosDetalle = Nothing
|
||||
DtDatosDetalleLote = Nothing
|
||||
DtDatos = Nothing
|
||||
@@ -4122,27 +4146,28 @@ Partial Class Inventarios_EntregaAlmacen
|
||||
|
||||
|
||||
DtDatos = TempDT
|
||||
End Sub
|
||||
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
|
||||
'Protected void LnkEditarDir_Click(Object sender, EventArgs e)
|
||||
'{
|
||||
|
||||
|
||||
' int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
|
||||
|
||||
' HdnCveVenta.Value = GvRow.DataKey("CveVenta");
|
||||
' CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
||||
|
||||
' UpModalEditarentrega.Update();
|
||||
' RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
'}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
'Protected void LnkEditarDir_Click(Object sender, EventArgs e)
|
||||
'{
|
||||
|
||||
|
||||
' int CveCliente = GvRow.DataKey("CveCliente").ToEntero();
|
||||
' int CveDireccion = GvRow.DataKey("CveDireccionEnvio").ToEntero();
|
||||
|
||||
' HdnCveVenta.Value = GvRow.DataKey("CveVenta");
|
||||
' CargaModalCombosDirecciones(CveCliente, CveDireccion);
|
||||
|
||||
|
||||
' UpModalEditarentrega.Update();
|
||||
' RegistraScript("$('#DivEditarEntrega').modal('show');");
|
||||
'}
|
||||
|
||||
|
||||
|
||||
Protected Sub LnkEditarDir_Click(sender As Object, e As EventArgs)
|
||||
|
||||
HdnCveVenta.Value = CveVentaSurtir.ToString
|
||||
|
||||
@@ -19,7 +19,10 @@
|
||||
<asp:UpdatePanel ID="UppAddAcciones" runat="server">
|
||||
<ContentTemplate>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkAddPeriodo" runat="server" Text="Agregar"><i class="fa fa-plus-circle"></i> Agregar</asp:LinkButton>
|
||||
<asp:LinkButton ID="LnkAddPeriodo" runat="server" ><i class="fa fa-plus-circle"></i> Agregar</asp:LinkButton>
|
||||
</li>
|
||||
<li>
|
||||
<asp:LinkButton ID="LnkCargaMasivaModal" runat="server" OnClick="LnkCargaMasivaModal_Click"> Carga Masiva</asp:LinkButton>
|
||||
</li>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
@@ -477,6 +480,72 @@
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="divCargaMasiva" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargaMasiva" class="modal-dialog modal" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="H1" runat="server">
|
||||
<asp:Label runat="server" ID="Label1" Text="Agregar Periodo"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">Ejercicio:</div>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlEjercicioCM" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Tipo Periodo:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlTipoPeriodoCM" CssClass="select2me form-control" runat="server" DataValueField="CveTipoPeriodo" DataTextField="TipoPeriodo" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left">Subtipo Periodo:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtCveSubTipoPeriodoCM" Text="1" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Numero:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtNumeroCM" Text="1" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left; padding-top: 10px;">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-left: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioCM" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkFechaInicioCM" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicioCM" runat="server" TargetControlID="TxtFechaInicioCM" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEEFechaInicioCM" runat="server" TargetControlID="TxtFechaInicioCM" PopupButtonID="LnkFechaInicioCM" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargaMasiva" OnClick="LnkCargaMasiva_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno validacion"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script>function ADSBegin() { FiltrarTablaV2('.TxtBusqueda', '.GvDatos') }</script>
|
||||
|
||||
@@ -60,9 +60,11 @@ Partial Class Nomina_CatPeriodos
|
||||
Private Sub CargaTipoPeriodo()
|
||||
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo
|
||||
DdlTipoPeriodoAdd.DataSource = GlobalDTTipoPeriodo
|
||||
DdlTipoPeriodoCM.DataSource = GlobalDTTipoPeriodo
|
||||
|
||||
DdlTipoPeriodo.DataBind()
|
||||
DdlTipoPeriodoAdd.DataBind()
|
||||
DdlTipoPeriodoCM.DataBind()
|
||||
|
||||
|
||||
End Sub
|
||||
@@ -71,11 +73,14 @@ Partial Class Nomina_CatPeriodos
|
||||
Dim ObjNom_Periodos As New ClsNominas
|
||||
If ObjNom_Periodos.GetEjercicios(UsuarioActual.CveEmpresa) Then
|
||||
DdlEjercicio.DataSource = ObjNom_Periodos.DtResultados
|
||||
DdlEjercicioCM.DataSource = ObjNom_Periodos.DtResultados
|
||||
Else
|
||||
DdlEjercicio.DataSource = Nothing
|
||||
DdlEjercicioCM.DataSource = Nothing
|
||||
End If
|
||||
ObjNom_Periodos.Dispose()
|
||||
DdlEjercicio.DataBind()
|
||||
DdlEjercicioCM.DataBind()
|
||||
DdlEjercicio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||
|
||||
End Sub
|
||||
@@ -368,4 +373,23 @@ Partial Class Nomina_CatPeriodos
|
||||
Next
|
||||
UpModalPerido.Update()
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCargaMasiva_Click(sender As Object, e As EventArgs)
|
||||
Dim ejercicio As Integer = DdlEjercicioCM.SelectedValue.ToEntero()
|
||||
Dim cveTipoPeriodo As Integer = DdlTipoPeriodoCM.SelectedValue.ToEntero()
|
||||
Dim cveSubTipoPeriodo As Integer = TxtCveSubTipoPeriodoCM.Text.ToEntero()
|
||||
Dim numero As Integer = TxtNumeroCM.Text.ToEntero()
|
||||
Dim fechaInicio As String = TxtFechaInicioCM.Text
|
||||
|
||||
Using onom As New ClsNominas
|
||||
If onom.CargaPeriodosEjercicio(ejercicio, cveTipoPeriodo, cveSubTipoPeriodo, numero, fechaInicio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario) Then
|
||||
Alert("Se cargo satisfactoriamente.")
|
||||
End If
|
||||
End Using
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkCargaMasivaModal_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript("$('#divCargaMasiva').modal('show');")
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -323,7 +323,7 @@
|
||||
<div class="row">
|
||||
<label class="col-md-1 compoonenlabel" style="max-width: 65px;">Ejercicio: </label>
|
||||
<div class="col-md-1">
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" OnSelectedIndexChanged="DdlEjercicios_SelectedIndexChanged" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
<asp:DropDownList ID="DdlEjercicios" runat="server" OnSelectedIndexChanged="DdlEjercicios_SelectedIndexChanged" AutoPostBack="true" Style="width: 100% !important;" CssClass="select2me" DataValueField="Ejercicio" DataTextField="Ejercicio"></asp:DropDownList>
|
||||
</div>
|
||||
|
||||
<label class="col-md-1 compoonenlabel" style="max-width: 100px;">Tipo Período:</label>
|
||||
@@ -4672,7 +4672,72 @@
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<div id="divCargaMasiva" class="modal ADS fade" role="dialog">
|
||||
<asp:UpdatePanel ID="UpCargaMasiva" class="modal-dialog modal" tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content rowpadding">
|
||||
<div class="modal-header">
|
||||
<button type="button" class="close" data-dismiss="modal" aria-label="Close">
|
||||
<span aria-hidden="true">×</span>
|
||||
</button>
|
||||
<h4 class="modal-title" id="H1" runat="server">
|
||||
<asp:Label runat="server" ID="Label3" Text="Agregar Periodo"></asp:Label>
|
||||
</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<br />
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-2">Ejercicio:</div>
|
||||
<div class="col-md-4">
|
||||
<asp:DropDownList ID="DdlEjercicioCM" DataTextField="Ejercicio" DataValueField="Ejercicio" CssClass="form-control input-sm select2me" runat="server"></asp:DropDownList>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left">Tipo Periodo:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:DropDownList ID="DdlTipoPeriodoCMB" CssClass="select2me form-control" runat="server" DataValueField="CveTipoPeriodo" DataTextField="TipoPeriodo" Width="100%"></asp:DropDownList>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left">Subtipo Periodo:</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtCveSubTipoPeriodoCM" Text="1" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
</div>
|
||||
<br />
|
||||
<div class="row">
|
||||
<div class="col-xs-2" style="text-align: left;">
|
||||
Numero:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<asp:TextBox ID="TxtNumeroCM" Text="1" runat="server" CssClass=" form-control input-sm" CausesValidation="true" MaxLength="70" ValidationGroup="GrpGuardar" Width="100%"></asp:TextBox>
|
||||
</div>
|
||||
<div class="col-xs-2" style="text-align: left; padding-top: 10px;">
|
||||
Fecha Inicio:
|
||||
</div>
|
||||
<div class="col-xs-4">
|
||||
<div class="input-group input-sm input-small date date-picker" data-date-format="dd/mm/yyyy" style="padding-left: 0px;">
|
||||
<asp:TextBox ID="TxtFechaInicioCM" runat="server" CssClass="form-control" MaxLength="10"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton runat="server" ID="LnkFechaInicioCM" class="btn default"><i class="fa fa-calendar"></i></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaInicioCM" runat="server" TargetControlID="TxtFechaInicioCM" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender ID="CEEFechaInicioCM" runat="server" TargetControlID="TxtFechaInicioCM" PopupButtonID="LnkFechaInicioCM" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<asp:LinkButton ID="LnkCargaMasiva" OnClick="LnkCargaMasiva_Click" runat="server" CssClass="btn btn-primary" ValidationGroup="grpno validacion"> <i class='material-icons'>done_all</i> Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
</div>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -21,7 +21,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
get { return 5; }
|
||||
}
|
||||
|
||||
|
||||
private DateTime FechaInicioPeriodo
|
||||
{
|
||||
get
|
||||
@@ -448,8 +448,10 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
DdlEjercicios.DataSource = dtejercicio;
|
||||
DdlEjerciciosCM.DataSource = dtejercicio;
|
||||
DdlEjercicioCM.DataSource = dtejercicio;
|
||||
DdlEjercicios.DataBind();
|
||||
DdlEjerciciosCM.DataBind();
|
||||
DdlEjercicioCM.DataBind();
|
||||
ListItem litem = null;
|
||||
if ((dtejercicio != null) && dtejercicio.Rows.Count > 0)
|
||||
{
|
||||
@@ -487,6 +489,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa);
|
||||
DdlTipoPeriodoCM.DataSource = DdlTipoPeriodo.DataSource;
|
||||
DdlTipoPeriodoSim.DataSource = DdlTipoPeriodo.DataSource;
|
||||
DdlTipoPeriodoCMB.DataSource = DdlTipoPeriodo.DataSource;
|
||||
DdlTipoPeriodoCMB.DataBind();
|
||||
DdlTipoPeriodoSim.DataBind();
|
||||
DdlTipoPeriodoCM.DataBind();
|
||||
DdlTipoPeriodo.DataBind();
|
||||
@@ -507,6 +511,11 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
{
|
||||
if (objperiodos.GetPeriodos(tipoPeriodo, UsuarioActual.CveEmpresa, ejercicio, -1, -1))
|
||||
{
|
||||
if (objperiodos.DtResultados.Rows.Count == 0)
|
||||
{
|
||||
|
||||
Alert("No existen periodos registrados en este año y tipo de periodo,¿desea registrarlos masivamente?",TipoMensaje.MsgConfirmacion, "$(\"#divCargaMasiva\").modal(\"show\");",TextoConfirmacion:"Aceptar",TextoSegundoBoton:"No");
|
||||
}
|
||||
dtPeriodos = objperiodos.DtResultados.FiltraParametros("Estatus IN (1,2,3,4,5)");
|
||||
}
|
||||
}
|
||||
@@ -518,14 +527,13 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
|
||||
protected void DdlEjercicios_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
cargaPeriodos();
|
||||
{
|
||||
cargaPeriodos();
|
||||
}
|
||||
|
||||
protected void DdlTipoPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
{
|
||||
cargaPeriodos();
|
||||
DdlEjercicios.AutoPostBack = true;
|
||||
cargaPeriodos();
|
||||
}
|
||||
|
||||
protected void DdlPeriodo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
@@ -10943,4 +10951,22 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
|
||||
|
||||
|
||||
|
||||
protected void LnkCargaMasiva_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
int ejercicio = DdlEjercicioCM.SelectedValue.ToEntero();
|
||||
int cveTipoPeriodo = DdlTipoPeriodoCMB.SelectedValue.ToEntero();
|
||||
int cveSubTipoPeriodo = TxtCveSubTipoPeriodoCM.Text.ToEntero();
|
||||
int numero = TxtNumeroCM.Text.ToEntero();
|
||||
string fechaInicio = TxtFechaInicioCM.Text;
|
||||
|
||||
using (ClsNominas onom = new ClsNominas())
|
||||
{
|
||||
if (onom.CargaPeriodosEjercicio(ejercicio, cveTipoPeriodo, cveSubTipoPeriodo, numero, fechaInicio, UsuarioActual.CveEmpresa, UsuarioActual.CveUsuario))
|
||||
{
|
||||
Alert("Se cargo satisfactoriamente.");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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,11 +233,26 @@
|
||||
<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
|
||||
tableResultado.Columns.Add(CveColumnaEstatus, Type.GetType("System.Boolean"))
|
||||
|
||||
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">
|
||||
@@ -422,7 +422,7 @@
|
||||
CssClass="btn btn-circle btn-sm red" Text="<i class='icon-trash'></i>" data-toggle="confirmation" data-popout="true" data-original-title="confirmar" data-btn-ok-label="si" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TREspecificaiones" >
|
||||
<tr runat="server" id="TREspecificaiones" >
|
||||
<td colspan="5">
|
||||
<table style="width: 100%;">
|
||||
<tr style="background-color: #E0E3DA;">
|
||||
|
||||
@@ -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.")
|
||||
|
||||
@@ -135,7 +135,7 @@ Partial Class RH_CatPuesto
|
||||
CargaCatalogoOcupaciones()
|
||||
|
||||
|
||||
If ObjPuestos.GetPuestos(-1) Then
|
||||
If ObjPuestos.GetPuestos(UsuarioActual.CveEmpresa) Then
|
||||
GvPuestos.DataSource = ObjPuestos.DtResultados.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa)
|
||||
|
||||
GlobalDTRHPuestos(UsuarioActual.CveEmpresa) = ObjPuestos.DtResultados
|
||||
@@ -344,12 +344,12 @@ Partial Class RH_CatPuesto
|
||||
|
||||
If CvePuesto = -1 And Actualizar = False Then
|
||||
If ObjPuestos.AddPuesto(TxtPuesto.Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlOcupacion.SelectedValue.ToEntero) Then
|
||||
If ObjPuestos.GetPuestos(-1) Then Application("GlobalDTRHPuestos") = ObjPuestos.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
|
||||
If ObjPuestos.GetPuestos(UsuarioActual.CveEmpresa) Then Application("GlobalDTRHPuestos") = ObjPuestos.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
|
||||
Alert("Puesto agregado correctamente.")
|
||||
End If
|
||||
Else
|
||||
If ObjPuestos.UpdatePuesto(CvePuesto, TxtPuesto.Text.Trim, estatus, UsuarioActual.CveUsuario, DdlOcupacion.SelectedValue.ToEntero) Then
|
||||
If ObjPuestos.GetPuestos(-1) Then Application("GlobalDTRHPuestos") = ObjPuestos.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
|
||||
If ObjPuestos.GetPuestos(UsuarioActual.CveEmpresa) Then Application("GlobalDTRHPuestos") = ObjPuestos.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
|
||||
Alert("Puesto actualizado correctamente.")
|
||||
End If
|
||||
End If
|
||||
@@ -372,7 +372,7 @@ Partial Class RH_CatPuesto
|
||||
Dim _CvePuesto As Integer = GvRow.DataKey("CvePuesto").ToEntero
|
||||
|
||||
If objRH.RemovePuesto(_CvePuesto) Then
|
||||
If objRH.GetPuestos(-1) Then Application("GlobalDTRHPuestos") = objRH.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
|
||||
If objRH.GetPuestos(UsuarioActual.CveEmpresa) Then Application("GlobalDTRHPuestos") = objRH.DtResultados Else Application("GlobalDTRHPuestos") = Nothing
|
||||
CargaDatos()
|
||||
Else
|
||||
Alert("Ocurrio un error al eliminar el puesto", TipoMensaje.MsgError)
|
||||
|
||||
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();
|
||||
}
|
||||
});
|
||||
};
|
||||
File diff suppressed because it is too large
Load Diff
@@ -147,7 +147,8 @@ Partial Class Sistemas_Empresa
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
DdlEmpresa.DataSource = GlobalDTEmpresas
|
||||
DdlEmpresa.DataBind()
|
||||
CargaDdlPac()
|
||||
CargaRegimenFiscal()
|
||||
CargaGridIndicadores()
|
||||
@@ -994,4 +995,28 @@ Partial Class Sistemas_Empresa
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LnkClonmarCNomModal_Click(sender As Object, e As EventArgs)
|
||||
|
||||
RegistraScript("$('#ModalClonarConceptosNominas').modal();")
|
||||
End Sub
|
||||
Protected Sub LnkClonarConceptosNomina_Click(sender As Object, e As EventArgs)
|
||||
Dim CveEmpresaOrigen = DdlEmpresa.SelectedValue.ToEntero()
|
||||
Dim cveEmpresaDestino = CveEmpresa ' Request("CveEmpresa").ToString().ToEntero()
|
||||
If (CveEmpresaOrigen > 0 AndAlso cveEmpresaDestino > 0) Then
|
||||
Using onom = New ClsNominas
|
||||
If onom.ConceptosGetallnewEmpresa(CveEmpresaOrigen, CveEmpresa) Then
|
||||
Alert("los conceptos se clonaron satisfactoriamente", TipoMensaje.MsgInformacion)
|
||||
|
||||
End If
|
||||
End Using
|
||||
Else
|
||||
If CveEmpresaOrigen > 0 Then
|
||||
Alert("ya debe estar generado la empresa destino", TipoMensaje.MsgAdvertencia)
|
||||
Else
|
||||
Alert("Debe seleccionar una empresa Origen", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
End If
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<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"
|
||||
DataKeyNames="CveMedico, Medico, CedulaProfesional, FechaNacimiento, Notas, DiasAtencion, Horario, Lugar, Estatus, CveUsuario, FechaIng, CveEmpresa,Telefono, Mail, Especialidad"
|
||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD" GridLines="None">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Medico" ItemStyle-HorizontalAlign="Left" >
|
||||
@@ -54,17 +54,23 @@
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
</asp:TemplateField>
|
||||
|
||||
<asp:TemplateField HeaderText="Notas" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlNotas" runat="server" Text='<%# Eval("Notas") %>'></asp:Literal>
|
||||
<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="Dias Atención" ItemStyle-HorizontalAlign="Left">
|
||||
<asp:TemplateField HeaderText="Especialidad" ItemStyle-HorizontalAlign="Left">
|
||||
<ItemTemplate>
|
||||
<asp:Literal ID="LtlDiasAtencion" runat="server" Text='<%# Eval("DiasAtencion") %>'></asp:Literal>
|
||||
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -172,6 +178,29 @@
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTelefono" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MEETelefono" runat="server" TargetControlID="TxtTelefono" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtTelefono.ClientID.ToString()%>">Teléfono:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMail" CssClass="form-control " runat="server" MaxLength="300" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:FilteredTextBoxExtender ID="FilTxtMail" runat="server" FilterType="Numbers, LowercaseLetters, UppercaseLetters, Custom" ValidChars=".;@_-ñ" TargetControlID="TxtMail" />
|
||||
<asp:RegularExpressionValidator ID="RETxtMail" runat="server" CssClass="help-block errorimput"
|
||||
ValidationExpression="(([a-zA-Z0-9ñÑ_\-\.]+)@((\[[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.)|(([a-zA-Z0-9\-]+\.)+))([a-zA-Z]{2,4}|[0-9]{1,3})(\]?)(\s*;\s*|\s*$))*"
|
||||
ControlToValidate="TxtMail" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Correo''</b> no es válido, por favor ingrése uno correcto." ValidationGroup="GrpGuardarRegistro"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtMail.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtEspecialidad" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtEspecialidad.ClientID.ToString()%>">Especialidad:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtNotas" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtNotas.ClientID.ToString()%>">Notas:</label>
|
||||
@@ -197,7 +226,7 @@
|
||||
<div class="form-group form-md-line-input input-iconright" id="DVEstatus" runat="server" >
|
||||
<asp:CheckBox ID="ChkEstatus" CssClass="form-control make-switchsd" data-size="small" runat="server" style="margin-top:7px" ></asp:CheckBox>
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
@@ -50,12 +50,14 @@ Partial Class Ventas_CatMedicos
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
|
||||
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
|
||||
|
||||
If CveMedico > 0 Then
|
||||
If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.UpdateMedico(CveMedico, TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, TxtEspecialidad.Text) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
If ObjVentas.AddMedico(TxtMedico.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, TxtDiasAtencion.Text.Trim, TxtHorario.Text.Trim, TxtLugar.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, TxtEspecialidad.Text) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
@@ -123,6 +125,10 @@ Partial Class Ventas_CatMedicos
|
||||
TxtDiasAtencion.Text = ""
|
||||
TxtHorario.Text = ""
|
||||
TxtLugar.Text = ""
|
||||
TxtMail.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtEspecialidad.Text = ""
|
||||
|
||||
|
||||
DVEstatus.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
@@ -149,6 +155,10 @@ Partial Class Ventas_CatMedicos
|
||||
TxtLugar.Text = GvRow.DataKey("Lugar")
|
||||
ChkEstatus.Checked = Boolean.Parse(GvRow.DataKey("Estatus"))
|
||||
|
||||
TxtMail.Text = GvRow.DataKey("Mail")
|
||||
TxtTelefono.Text = GvRow.DataKey("Telefono")
|
||||
TxtEspecialidad.Text = GvRow.DataKey("Especialidad")
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Medico {TxtCedulaProfecional.Text}"
|
||||
|
||||
@@ -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
|
||||
@@ -30646,6 +30737,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
|
||||
@@ -30655,6 +30748,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"))
|
||||
@@ -30665,7 +30769,14 @@ Partial Class Ventas
|
||||
End If
|
||||
CveMetodoPago = Dr("CveMetodoPago33").ToString().ToEntero()
|
||||
Next
|
||||
TxtObsFact.Text = If(MensajeRemisiones.ToString().Length > 0, MensajeRemisiones.ToString().Substring(0, MensajeRemisiones.ToString().Length - 2), "")
|
||||
|
||||
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), "")
|
||||
@@ -34432,6 +34543,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
|
||||
@@ -35395,5 +35522,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>
|
||||
|
||||
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
||||
|
||||
|
||||
<asp:UpdatePanel runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional" RenderMode="Inline">
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpDvModalTipoVenta" UpdateMode="Conditional" >
|
||||
<ContentTemplate>
|
||||
<div id="DvModalTipoVenta" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog">
|
||||
|
||||
|
||||
|
||||
<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">
|
||||
</asp:RadioButtonList>
|
||||
<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>
|
||||
|
||||
<%--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>
|
||||
</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
|
||||
|
||||
If RBLTipoVenta.SelectedValue.ToEntero = 2 Then
|
||||
TdRequiereTecnico1.Visible = True
|
||||
TdRequiereTecnico2.Visible = True
|
||||
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
|
||||
|
||||
RegistraScript("$('#DvModalTipoVenta').modal('hide');")
|
||||
UpCliente.Update()
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub ChkRequiereTecnico_CheckedChanged(sender As Object, e As EventArgs)
|
||||
Protected Sub LnkDvModalTipoVentaSeuigenteRequiereTecnico_Click(sender As Object, e As EventArgs)
|
||||
|
||||
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
|
||||
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
|
||||
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
|
||||
|
||||
TdRequiereTecnico1.Visible = True
|
||||
TdRequiereTecnico2.Visible = True
|
||||
|
||||
CargaCliente(DdlClientesWS.SelectedValue.ToEntero)
|
||||
|
||||
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
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user