Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -292,12 +292,11 @@ Public Class ClsContabilidad
|
||||
|
||||
Public Function UpdatePrePolizasDetalle(CvePrePolizaDetalle As Integer, Concepto As String, CveSubProyecto As Integer, IdCtaContable As Integer, TipoMovto As Boolean, ImporteMN As Decimal, Optional CveTipoGasto As Integer = -1,
|
||||
Optional CveConceptoContable As Integer = -1, Optional CveProveedor As Integer = -1, Optional CveCompra As Integer = -1, Optional CvePersonal As Integer = -1, Optional CveCliente As Integer = -1, Optional CveVenta As Integer = -1,
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1, Optional TipoCambio As Decimal = -1) As Boolean
|
||||
|
||||
Optional Referencia As String = "-1", Optional CveUsuarioModifico As Integer = -1, Optional CveCuenta As Integer = -1, Optional PorcentajeImpuesto As Decimal = -1, Optional Importe As Decimal = -1, Optional CveIE As Integer = -1,
|
||||
Optional TipoCambio As Decimal = -1, Optional CveClasificacion As Integer = -1) As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_Conta_PrePolizasDetalleUpdate")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CvePrePolizaDetalle", SqlDbType.Int).Value = CvePrePolizaDetalle
|
||||
.Add("@Concepto", SqlDbType.VarChar).Value = Concepto
|
||||
@@ -318,13 +317,12 @@ Public Class ClsContabilidad
|
||||
.Add("@CveUsuarioModifico", SqlDbType.Int).Value = CveUsuarioModifico
|
||||
.Add("@CveCuenta", SqlDbType.Int).Value = CveCuenta
|
||||
.Add("@CveIE", SqlDbType.Int).Value = CveIE
|
||||
|
||||
.Add("@CveClasificacion", SqlDbType.Int).Value = CveClasificacion
|
||||
End With
|
||||
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
|
||||
Catch ex As Exception
|
||||
If ex.Message.Contains("CuentasResultados_SubProyectos") Then
|
||||
OnError("El concepto requiere que se le especifique centro de costo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||
|
||||
@@ -1305,7 +1305,7 @@ Public Class ClsOS
|
||||
|
||||
Return Retorno
|
||||
End Function
|
||||
Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer) As Boolean
|
||||
Public Function UpdateVentaOS(CveVenta As Integer, CveOS As Integer, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_OS_UpdateVentaOS")
|
||||
@@ -1313,6 +1313,8 @@ Public Class ClsOS
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveOS", SqlDbType.Int).Value = CveOS
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
End With
|
||||
|
||||
Try
|
||||
|
||||
@@ -59,7 +59,7 @@ Public Class ClsVentas
|
||||
Public Property Neto As Double
|
||||
Public Property PorNeto As Double
|
||||
Public Property CveClasificacionDetalle As Integer
|
||||
|
||||
Public Property CveMedicoNuevo As Integer = -1
|
||||
|
||||
|
||||
#End Region
|
||||
@@ -439,8 +439,7 @@ Public Class ClsVentas
|
||||
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 RequiereOS As Boolean = False,
|
||||
Optional FechaParaSurtir As DateTime = MinFecha
|
||||
) As Boolean
|
||||
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
|
||||
DataAdapter("PA_VentasAdd")
|
||||
@@ -547,6 +546,9 @@ Public Class ClsVentas
|
||||
.Add("@RequiereOS", SqlDbType.Int).Value = RequiereOS
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = If(FechaParaSurtir = MinFecha, Fecha, FechaParaSurtir)
|
||||
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
|
||||
|
||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||
End With
|
||||
@@ -576,7 +578,8 @@ Public Class ClsVentas
|
||||
Optional AtencionA As String = "", Optional PedidoContrato As String = "", 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 Decimal = -1,
|
||||
Optional RetISR As Decimal = -1, Optional Kilometraje As Decimal = 0, Optional CveUsoCFDi As Integer = -1, Optional ServicioDomicilio As Boolean = False, Optional CveVendedor As Integer = -1,
|
||||
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha) As Boolean
|
||||
Optional RequiereOS As Boolean = False, Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1, Optional FechaParaSurtir As DateTime = MinFecha,
|
||||
Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasUpdate")
|
||||
@@ -613,6 +616,8 @@ Public Class ClsVentas
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
End With
|
||||
|
||||
Try
|
||||
@@ -627,7 +632,7 @@ Public Class ClsVentas
|
||||
|
||||
Public Function UpdateObservacionesVenta(CveVenta As Integer, CveEmpresa As Integer, CveVendedor As Integer, Observaciones As String, FormaPaqueteria As Integer, CorreoNotificaciones As String, ObservacionesAlm As String,
|
||||
Pedido As String, OrdenCompra As String, FechaPago As String, CveUsoCFDI As Integer, Optional DescripcionVenta As String = "-1", Optional CveMedico As Integer = -1, Optional CveProcedimiento As Integer = -1,
|
||||
Optional FechaParaSurtir As DateTime = MinFecha) As Boolean
|
||||
Optional FechaParaSurtir As DateTime = MinFecha, Optional Paciente As String = "-1", Optional Episodio As String = "-1") As Boolean
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentasObservacionesUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -646,6 +651,8 @@ Public Class ClsVentas
|
||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||
.Add("@FechaParaSurtir", SqlDbType.DateTime).Value = FechaParaSurtir
|
||||
.Add("@Paciente", SqlDbType.VarChar).Value = Paciente
|
||||
.Add("@Episodio", SqlDbType.VarChar).Value = Episodio
|
||||
|
||||
End With
|
||||
Try
|
||||
@@ -6020,7 +6027,24 @@ Public Class ClsVentas
|
||||
|
||||
End Function
|
||||
|
||||
Public Function UpdateVentaCorte(CveVenta As Integer, CveEmpresa As Integer, CveCorte As Integer) As Boolean
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
DataAdapter("PA_Vta_VentaCorteUpdate")
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||
.Add("@CveCorte", SqlDbType.Int).Value = CveCorte
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al eliminar los datos de facturación.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
End Function
|
||||
|
||||
#Region "TIPO VENTA"
|
||||
|
||||
@@ -6072,9 +6096,10 @@ 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, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Consultorio As String, Optional CveMedicoSubEspecialidad As Integer = -1,
|
||||
Optional Torre As String = "-1") As Boolean
|
||||
Optional Torre As String = "-1") As Integer
|
||||
|
||||
Dim Retorno As Boolean = False
|
||||
CveMedicoNuevo = -1
|
||||
DataAdapter("PA_Vta_MedicosAdd")
|
||||
|
||||
With SqlAdapter.SelectCommand.Parameters
|
||||
@@ -6095,16 +6120,20 @@ Public Class ClsVentas
|
||||
.Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio
|
||||
.Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad
|
||||
.Add("@Torre", SqlDbType.VarChar).Value = Torre
|
||||
.Add("@CveMedicoNuevo", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||
|
||||
|
||||
|
||||
End With
|
||||
Try
|
||||
SqlAdapter.Fill(Data)
|
||||
CveMedicoNuevo = SqlAdapter.SelectCommand.Parameters("@CveMedicoNuevo").Value.ToString.ToEntero
|
||||
Retorno = True
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al guardar el Medico.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
||||
End Try
|
||||
Return Retorno
|
||||
|
||||
Return CveMedicoNuevo
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
@@ -2156,7 +2156,7 @@ Namespace Modelos
|
||||
CveMetodoPago33:=factura.CveMetodoPago33, CveUsoCFDI:=factura.CveUsoCFDI, OrdenCompra:=factura.OrdenCompra, CveCuentaTerminal:=factura.CveCuentaTerminal, CveTipoRelacion:=factura.CveTipoRelacion, ImpuestoLocal:=TotalImpuestoLocal,
|
||||
CveVentaRelacion:=(If(factura.CveVentaRelacion.ToEntero > 0, factura.CveVentaRelacion, -1)), ImporteRelacion:=(If(factura.ImporteRelacion <> Nothing, factura.ImporteRelacion, -1)),
|
||||
CveTipoAmortizacionAnticipo:=factura.CveTipoAmortizacionAnticipo, CveEmpresaCRM:=CveEmpresaCRM, EsInterno:=EsInterno, ServicioDomicilio:=factura.ServicioDomicilio, RFCReceptor:=RFCReceptor, EsGarantia:=factura.EsGarantia, DescripcionVenta:=factura.DescripcionVenta,
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir) Then
|
||||
CveMedico:=factura.CveMedico, CveProcedimiento:=factura.CveProcedimiento, CveTipoVenta:=factura.CveTipoVenta, FechaParaSurtir:=factura.FechaParaSurtir, Paciente:=factura.Paciente, Episodio:=factura.Episodio) Then
|
||||
|
||||
ErrorList.Add("Ocurrió un error al Generar la Venta.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
|
||||
@@ -7647,6 +7647,9 @@ Namespace Modelos
|
||||
Public Property CveProcedimiento As Integer = -1
|
||||
Public Property Procedimiento As String = ""
|
||||
Public Property CveTipoVenta As Integer = -1
|
||||
|
||||
Public Property Paciente As String = ""
|
||||
Public Property Episodio As String = ""
|
||||
#End Region
|
||||
|
||||
End Class
|
||||
|
||||
@@ -2460,11 +2460,13 @@ Public Class Timbrado
|
||||
|
||||
#Region "Comercio Exterior"
|
||||
|
||||
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto Then
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then
|
||||
If UsuarioActual.CveEmpresa = 172 Then
|
||||
|
||||
'DATOS GENERALES
|
||||
cfdi.ComercioExterior20(ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado,
|
||||
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto Then
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then
|
||||
|
||||
'DATOS GENERALES
|
||||
cfdi.ComercioExterior20(ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.ClavedePedimento,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.CertificadoOrigen,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen,
|
||||
@@ -2473,9 +2475,9 @@ Public Class Timbrado
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Observaciones,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.TipoCambioUSD,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.TotalUSD)
|
||||
'EMISOR
|
||||
cfdi.ComercioExterior20Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP))
|
||||
cfdi.ComercioExterior20Domicilio(ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle,
|
||||
'EMISOR
|
||||
cfdi.ComercioExterior20Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP))
|
||||
cfdi.ComercioExterior20Domicilio(ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Colonia,
|
||||
@@ -2485,9 +2487,9 @@ Public Class Timbrado
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Estado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CP)
|
||||
'RECEPTOR
|
||||
cfdi.ComercioExterior20Receptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib)
|
||||
cfdi.ComercioExterior20DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle,
|
||||
'RECEPTOR
|
||||
cfdi.ComercioExterior20Receptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib)
|
||||
cfdi.ComercioExterior20DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia,
|
||||
@@ -2498,8 +2500,8 @@ Public Class Timbrado
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.CP)
|
||||
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario IsNot Nothing Then
|
||||
cfdi.ComercioExterior20Destinatario(ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib,
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario IsNot Nothing Then
|
||||
cfdi.ComercioExterior20Destinatario(ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Nombre,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroExterior,
|
||||
@@ -2511,27 +2513,104 @@ Public Class Timbrado
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Estado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.CP)
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
'MERCANCIAS
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then
|
||||
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias
|
||||
cfdi.ComercioExterior20Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
||||
If concep.DescripcionesEspecificas.Marca <> "" Then
|
||||
cfdi.ComercioExterior20MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
||||
'MERCANCIAS
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then
|
||||
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias
|
||||
cfdi.ComercioExterior20Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
||||
If concep.DescripcionesEspecificas.Marca <> "" Then
|
||||
cfdi.ComercioExterior20MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
||||
concep.DescripcionesEspecificas.Modelo,
|
||||
concep.DescripcionesEspecificas.SubModelo,
|
||||
concep.DescripcionesEspecificas.NumeroSerie)
|
||||
End If
|
||||
Next
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
|
||||
If Ventas.Cliente.AplicaComercioExterior And ObjCFDITimbre.Complementos.ComercioExterior.AplicaComercioExteriorSubProyecto Then
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior IsNot Nothing Then
|
||||
|
||||
'DATOS GENERALES
|
||||
cfdi.ComercioExterior11(ObjCFDITimbre.Complementos.ComercioExterior.MotivoTraslado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.TipoOperacion,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.ClavedePedimento,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.CertificadoOrigen,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.NumCertificadoOrigen,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.NumeroExportadorConfiable,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Incoterm,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Subdivision,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Observaciones,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.TipoCambioUSD,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.TotalUSD)
|
||||
'EMISOR
|
||||
cfdi.ComercioExterior11Emisor(If(EmisorRFC.Length >= 12, "", ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CURP))
|
||||
cfdi.ComercioExterior11Domicilio(ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroExterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.NumeroInterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Colonia,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Localidad,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Referencia,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Municipio,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Estado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Emisor.CP)
|
||||
'RECEPTOR
|
||||
cfdi.ComercioExterior11Receptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumRegIdTrib)
|
||||
cfdi.ComercioExterior11DomicilioReceptor(ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroExterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.NumeroInterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Colonia,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Localidad,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Referencia,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Municipio,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Estado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Receptor.CP)
|
||||
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior.Destinatario IsNot Nothing Then
|
||||
cfdi.ComercioExterior11Destinatario(ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumRegIdTrib,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Nombre,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Calle,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroExterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.NumeroInterior,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Colonia,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Localidad,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Referencia,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Municipio,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Estado,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.Pais,
|
||||
ObjCFDITimbre.Complementos.ComercioExterior.Destinatario.CP)
|
||||
End If
|
||||
|
||||
|
||||
'MERCANCIAS
|
||||
If ObjCFDITimbre.Complementos.ComercioExterior.Mercancias IsNot Nothing AndAlso ObjCFDITimbre.Complementos.ComercioExterior.Mercancias.Count > 0 Then
|
||||
For Each concep As CFDIComercioExterior11Mercancias In ObjCFDITimbre.Complementos.ComercioExterior.Mercancias
|
||||
cfdi.ComercioExterior11Mercancia(concep.NoIdentificacion, concep.FraccionArancelaria, concep.CantidadAduana, concep.UnidadAduana, concep.ValorUnitarioAduana, concep.ValorDolares)
|
||||
If concep.DescripcionesEspecificas.Marca <> "" Then
|
||||
cfdi.ComercioExterior11MercanciaDescripcionesEspeciales(concep.DescripcionesEspecificas.Marca,
|
||||
concep.DescripcionesEspecificas.Modelo,
|
||||
concep.DescripcionesEspecificas.SubModelo,
|
||||
concep.DescripcionesEspecificas.NumeroSerie)
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
End if
|
||||
#End Region
|
||||
|
||||
|
||||
|
||||
@@ -129,11 +129,12 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
|
||||
If Metodo = "RegistraRemision" Then
|
||||
|
||||
context.Response.ContentType = "application/json"
|
||||
Dim Auth As AuthMessage = ValidarSolicitud(context)
|
||||
|
||||
MsgLog.AppendLine("Validado:" & Auth.IsSuccess)
|
||||
If Auth.IsSuccess Then
|
||||
retorno = RegistraRemision(context)
|
||||
retorno = RegistraRemision(context, MsgLog)
|
||||
Else
|
||||
context.Response.StatusCode = Auth.StatusCode
|
||||
retorno = JsonConvert.SerializeObject(Auth.ErrorMessage)
|
||||
@@ -335,15 +336,14 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
End Function
|
||||
|
||||
Private Function RegistraRemision(ByVal context As HttpContext) As String
|
||||
Private Function RegistraRemision(ByVal context As HttpContext, ByRef MsgLog As StringBuilder) As String
|
||||
|
||||
Dim TieneError As Boolean = False
|
||||
Dim JsonRequest As JObject = Nothing
|
||||
Dim Respuesta As New ResponseMsg
|
||||
Dim RespuestaError As New ResponseMsgError
|
||||
Dim MsgLog As New StringBuilder
|
||||
Try
|
||||
|
||||
Try
|
||||
MsgLog.AppendLine("1.0 Registra")
|
||||
If context.Request.InputStream IsNot Nothing Then
|
||||
Using reader As New StreamReader(context.Request.InputStream)
|
||||
@@ -355,6 +355,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
TieneError = True
|
||||
End If
|
||||
Else
|
||||
MsgLog.AppendLine("json:" & json)
|
||||
TieneError = True
|
||||
End If
|
||||
End Using
|
||||
@@ -362,7 +363,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
MsgLog.AppendLine("1.1 accedido")
|
||||
If TieneError Then
|
||||
RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado"
|
||||
RespuestaError.message = "No se pudo procesar la solicitud - Formato mal formado (1.1)"
|
||||
context.Response.StatusCode = 200
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
End If
|
||||
@@ -378,6 +379,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim ObjInventario As New ClsInventarios(ObjClientes.IniciaTransacSQL())
|
||||
Dim CveSubProyecto, CveCliente, CveMoneda, CvePS As Integer
|
||||
Dim Cantidad, PU, Descuento As Decimal
|
||||
Dim CveDireccionEnvio As Integer = 0
|
||||
Dim Obs As String = ""
|
||||
CveSubProyecto = 12659 ' fijo Ecommerce
|
||||
CveCliente = 0
|
||||
@@ -387,8 +389,8 @@ Public Class E119 : Implements IHttpHandler
|
||||
Dim RFC As String = ""
|
||||
Dim NombreCliente As String = ""
|
||||
If JsonRequest("billing") IsNot Nothing Then
|
||||
RFC = JsonRequest("billing").First("first_name").ToString()
|
||||
NombreCliente = JsonRequest("billing").First("first_name").ToString() & " " & JsonRequest("billing").First("last_name").ToString()
|
||||
RFC = JsonRequest("billing")("first_name").ToString()
|
||||
NombreCliente = JsonRequest("billing")("first_name").ToString() & " " & JsonRequest("billing")("last_name").ToString()
|
||||
End If
|
||||
|
||||
'BUSCAR SI ESTÁ REGISTRADO EL CLIENTE
|
||||
@@ -406,16 +408,16 @@ Public Class E119 : Implements IHttpHandler
|
||||
MsgLog.AppendLine("1.5 crear cliente")
|
||||
If JsonRequest("billing") IsNot Nothing Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim Direccion As String = If(JsonRequest("billing").First("address_1") Is Nothing, "", JsonRequest("billing").First("address_1").ToString())
|
||||
Dim Direccion As String = If(JsonRequest("billing")("address_1") Is Nothing, "", JsonRequest("billing")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("billing").First("city") Is Nothing, "", JsonRequest("billing").First("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("billing").First("city") Is Nothing, "", JsonRequest("billing").First("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("billing").First("postcode") Is Nothing, "", JsonRequest("billing").First("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("billing").First("phone") Is Nothing, "", JsonRequest("billing").First("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("billing").First("email") Is Nothing, "", JsonRequest("billing").First("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("billing").First("state") Is Nothing, "", JsonRequest("billing").First("state").ToString())
|
||||
Dim Ciudad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("billing")("city") Is Nothing, "", JsonRequest("billing")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("billing")("postcode") Is Nothing, "", JsonRequest("billing")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("billing")("phone") Is Nothing, "", JsonRequest("billing")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("billing")("email") Is Nothing, "", JsonRequest("billing")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("billing")("state") Is Nothing, "", JsonRequest("billing")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
@@ -437,13 +439,58 @@ Public Class E119 : Implements IHttpHandler
|
||||
End If
|
||||
|
||||
End If
|
||||
' shiping
|
||||
'shiping_lines/ method_id: free_shipping/local_pickup
|
||||
If JsonRequest("shipping") IsNot Nothing AndAlso Not TieneError Then
|
||||
Dim CveEstado As Integer = -1
|
||||
Dim Direccion As String = If(JsonRequest("shipping")("address_1") Is Nothing, "", JsonRequest("shipping")("address_1").ToString())
|
||||
Dim NumExt As String = ""
|
||||
Dim NumInt As String = ""
|
||||
Dim Colonia As String = ""
|
||||
Dim Ciudad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim Localidad As String = If(JsonRequest("shipping")("city") Is Nothing, "", JsonRequest("shipping")("city").ToString())
|
||||
Dim CP As String = If(JsonRequest("shipping")("postcode") Is Nothing, "", JsonRequest("shipping")("postcode").ToString())
|
||||
Dim Telefono As String = If(JsonRequest("shipping")("phone") Is Nothing, "", JsonRequest("shipping")("phone").ToString())
|
||||
Dim Correo As String = If(JsonRequest("shipping")("email") Is Nothing, "", JsonRequest("shipping")("email").ToString())
|
||||
Dim Estado As String = If(JsonRequest("shipping")("state") Is Nothing, "", JsonRequest("shipping")("state").ToString())
|
||||
If Not String.IsNullOrEmpty(Estado) Then
|
||||
CveEstado = ClsPaginas.GlobalDTGralEstados("MEX").FiltroPrimeroValor("CveEstado", $"NombreEstado = '{Estado.Trim}'").ToEntero()
|
||||
If CveEstado <= 0 Then 'SI NO ENCUENTRA EL ESTADO INGRESA EL DE SONORA
|
||||
CveEstado = 26
|
||||
End If
|
||||
Else
|
||||
CveEstado = 26
|
||||
End If
|
||||
|
||||
If ObjClientes.DireccionEnvioGet(-1, CveCliente, -1) Then
|
||||
Dim dtt As DataTable = ObjClientes.DtResultados
|
||||
If dtt IsNot Nothing AndAlso dtt.Rows.Count > 0 Then
|
||||
dtt = dtt.FiltraParametros($"EnvioDireccion = '{Direccion}' and EnvioCP = '{CP}'")
|
||||
If dtt.Rows.Count > 0 Then
|
||||
CveDireccionEnvio = dtt.FiltroPrimeroValor("CveDireccionEnvio").ToEntero
|
||||
End If
|
||||
Else
|
||||
CveDireccionEnvio = ObjClientes.DireccionEnvioAdd(CveCliente, Direccion, NumExt, NumInt, Colonia, Ciudad, Estado, CP, "", 100, 1)
|
||||
End If
|
||||
End If
|
||||
|
||||
Else
|
||||
MsgLog.AppendLine("1.5.9 sin datos cliente")
|
||||
TieneError = True
|
||||
Resp.Mensajes.Add("no existen datos del cliente")
|
||||
End If
|
||||
|
||||
MsgLog.AppendLine("1.6 inicio generar venta")
|
||||
ObjFactura = Modelos.Factura.CrearVentaNueva(Usuario, CveSubProyecto, CveCliente, CveMoneda, "Rem")
|
||||
MsgLog.AppendFormat("1.6.0 objeto creado {0}", If(ObjFactura IsNot Nothing, "si", "no"))
|
||||
|
||||
If JsonRequest("shiping_lines") IsNot Nothing Then
|
||||
' shiping
|
||||
'shiping_lines/ method_id: free_shipping/local_pickup
|
||||
Dim Entrega As String = If(JsonRequest("shiping_lines")("method_id") Is Nothing, "", JsonRequest("shiping_lines")("method_id").ToString())
|
||||
ObjFactura.Alfa1 = Entrega
|
||||
End If
|
||||
|
||||
ObjFactura.CveDireccionEnvio = cvedireccionenvio
|
||||
|
||||
If JsonRequest("line_items") IsNot Nothing Then
|
||||
Dim ListaPS As JArray = JArray.Parse(JsonRequest("line_items").ToString())
|
||||
Dim Consec As Integer = 1
|
||||
@@ -470,6 +517,7 @@ Public Class E119 : Implements IHttpHandler
|
||||
Resp.Mensajes.Add("no existen productos definidos")
|
||||
End If
|
||||
|
||||
|
||||
If ObjFactura IsNot Nothing AndAlso Not TieneError Then
|
||||
MsgLog.AppendLine("1.7 agregar la remision")
|
||||
Resp = ObjFactura.EmitirFactura(False, Transac:=ObjClientes.IniciaTransacSQL())
|
||||
@@ -528,9 +576,10 @@ Public Class E119 : Implements IHttpHandler
|
||||
|
||||
Catch ex As Exception
|
||||
TieneError = True
|
||||
Finally
|
||||
MsgLog.ToString.GuardaLogAD("LogE119")
|
||||
End Try
|
||||
|
||||
MsgLog.ToString.GuardaLogAD("LogE119")
|
||||
If TieneError Then
|
||||
context.Response.StatusCode = 200
|
||||
Return JsonConvert.SerializeObject(RespuestaError)
|
||||
|
||||
@@ -63,10 +63,10 @@ Partial Class Compras_RepComplementoPago
|
||||
Private Sub CargaDatos()
|
||||
|
||||
Dim CveProveedor As Integer = If(DdlProveedores.SelectedValue.ToEntero = 0, -1, DdlProveedores.SelectedValue.ToEntero)
|
||||
Dim CveTipoProveedor = DdlTipoProveedor.SelectedValue.ToEntero
|
||||
Dim FechaInicio = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
|
||||
Dim FechaFin = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
|
||||
Dim TipoConsulta = If(ChkViculadas.Checked, 2, 1)
|
||||
Dim CveTipoProveedor As Integer = DdlTipoProveedor.SelectedValue.ToEntero
|
||||
Dim FechaInicio As Date = If(IsDate(TxtFiltrosFechaInicio.Text), TxtFiltrosFechaInicio.Text.ToDate, MinFecha)
|
||||
Dim FechaFin As Date = If(IsDate(TxtFiltrosFechaFin.Text), TxtFiltrosFechaFin.Text.ToDate, MaxFecha)
|
||||
Dim TipoConsulta As Integer = If(ChkViculadas.Checked, 2, 1)
|
||||
Dim Count As Integer = 0
|
||||
|
||||
Dim ObjCompras As New ClsCompras
|
||||
|
||||
@@ -440,7 +440,7 @@
|
||||
<div class="portlet-body nomarginleftright form-horizontal form-row-sepe formnombottom ">
|
||||
|
||||
<asp:GridView ID="GvPrePoliza" runat="server" AutoGenerateColumns="False" CssClass="table table-striped table-advance table-hover mysmallbtn GvPrePoliza" GridLines="None"
|
||||
DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,ImporteMN,Cargo,Abono,CveIE" Width="100%" >
|
||||
DataKeyNames="CvePrePolizaDetalle,CvePrePoliza,IdMov, CveConceptoContable, CveSubProyecto, CveTipoGasto,Referencia,CveVenta,CveCompra, CveProveedor, CveCliente, CvePersonal, CveCuenta, PorcentajeImpuesto,TipoMovto,EsComplementaria,EsMonedaExtranjera,Concepto,CveClasificacion,ContadoCuenta,ContadoTipoTransaccion,ContadoNumeroFolio,ContadoBeneficiario,ContadoObservaciones,ContadoImporte,TC,ImporteME,ImporteMN,Cargo,Abono,CveIE,Modificado" Width="100%" >
|
||||
<Columns>
|
||||
<asp:TemplateField>
|
||||
<HeaderTemplate>Movimiento</HeaderTemplate>
|
||||
@@ -528,8 +528,7 @@
|
||||
<ItemTemplate>
|
||||
<asp:LinkButton ID="LnkEdit" runat="server" AlternateText="Actualizar" CausesValidation="True" CommandName="Update" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||
<asp:LinkButton ID="LnkEliminar" OnClick="LnkGvPrePolizaEliminar_Click" runat="server" AlternateText="Eliminar" 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" />
|
||||
<asp:CheckBox runat="server" ID="chkModificado" Checked="false" Visible="false"/>
|
||||
data-toggle="confirmation" data-popout="true" data-original-title="Confirmar" data-btn-ok-label="si" />
|
||||
</ItemTemplate>
|
||||
<ItemStyle Width="75px" />
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -558,9 +558,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen"))
|
||||
If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE"))
|
||||
|
||||
If e.Row.DBCampo("Modificado") = "True" Then
|
||||
e.Row.FCCheckBox("chkModificado").Checked = True
|
||||
End If
|
||||
End If
|
||||
|
||||
If e.Row.RowType = DataControlRowType.Header Then
|
||||
@@ -1145,9 +1142,8 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Dim CveIEAgregado As Integer = -1
|
||||
For Each row As GridViewRow In GvPrePoliza.Rows
|
||||
If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then
|
||||
If row.FCCheckBox("chkModificado").Checked Then
|
||||
If CBool(row.DataKey("Modificado")) Then
|
||||
contador = contador + 1
|
||||
|
||||
Dim ImporteIE As Decimal = If(row.FCLabel("TxtCargo").Text.ToDecimal <> 0, row.FCLabel("TxtCargo").Text.ToDecimal, row.FCLabel("TxtAbono").Text.ToDecimal)
|
||||
|
||||
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
|
||||
@@ -1166,7 +1162,7 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
|
||||
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, CveClasificacion:=row.DataKey("CveClasificacion").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text,
|
||||
TipoCambio:=row.DataKey("TC").ToDecimal,
|
||||
CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then
|
||||
@@ -1176,8 +1172,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
End If
|
||||
Else
|
||||
contador = contador + 1
|
||||
|
||||
|
||||
Dim ImporteIE As Decimal = If(row.DataKey("Cargo").ToDecimal <> 0, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal)
|
||||
|
||||
If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then
|
||||
@@ -1191,14 +1185,14 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Exit For
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLabel("TxtCargo").Text.ToDecimal <> 0, False, True),
|
||||
If(row.FCLabel("TxtCargo").Text.ToDecimal <> 0, row.FCLabel("TxtCargo").Text.ToDecimal, row.FCLabel("TxtAbono").Text.ToDecimal),
|
||||
If(row.FCLabel("TxtCargo").Text.ToDecimal <> 0, row.FCLabel("TxtCargo").Text.ToDecimal, row.FCLabel("TxtAbono").Text.ToDecimal),
|
||||
Dim tTipoMovto As Boolean = If(row.DataKey("TipoMovto") = "True", True, False)
|
||||
If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, tTipoMovto,
|
||||
If(Not tTipoMovto, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
|
||||
If(Not tTipoMovto, row.DataKey("Cargo").ToDecimal, row.DataKey("Abono").ToDecimal),
|
||||
row.DataKey("CveConceptoContable").ToEntero, row.DataKey("Referencia").ToString, row.FCLiteral("TxtConcepto").Text,
|
||||
CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero,
|
||||
CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero),
|
||||
CveProveedor:=row.DataKey("CveProveedor").ToEntero,
|
||||
CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveClasificacion:=row.DataKey("CveClasificacion").ToEntero,
|
||||
CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero,
|
||||
CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal, CveIE:=CveIEAgregado) Then
|
||||
OcurrioError = True
|
||||
@@ -1208,6 +1202,13 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
|
||||
Next
|
||||
End If
|
||||
If Not OcurrioError AndAlso ObjContabilidad.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
If ObjContabilidad.ValorPolizaDescuadre > 0 Then
|
||||
OcurrioError = True
|
||||
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjContabilidad.MensajePolizaDescuadre} Diferencia:{ObjContabilidad.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
Else
|
||||
OcurrioError = True
|
||||
End If
|
||||
@@ -1217,31 +1218,22 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
OnError("Ocurrío un error al actualizar la PrePoliza", ex)
|
||||
End Try
|
||||
|
||||
If ObjContabilidad.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual) Then
|
||||
If ObjContabilidad.ValorPolizaDescuadre > 0 Then
|
||||
OcurrioError = True
|
||||
Alert("Error en validacion de prepoliza cuadre", TipoMensaje.MsgAdvertencia)
|
||||
GuardaLogAD($"Compras/Compras-Actualizar | Error:{ObjContabilidad.MensajePolizaDescuadre} Diferencia:{ObjContabilidad.ValorDiferencia} | CvePrePoliza:{CvePrePoliza}", "LogPrePolizas")
|
||||
End If
|
||||
End If
|
||||
|
||||
If Not OcurrioError Then
|
||||
ObjContabilidad.Commit()
|
||||
CargaPrePoliza(CvePrePoliza)
|
||||
Alert("La PrePoliza se actualizó correctamente.", TipoMensaje.MsgInformacion, JSBtnAceptar:=$"window.location.href=""./RegPrePolizaS.aspx?CvePrePoliza={Me.CvePrePoliza}""", ShowCloseButton:=False)
|
||||
Else
|
||||
ObjContabilidad.RollBack()
|
||||
Alert("Ocurrio un error al actualizar la PrePoliza.", TipoMensaje.MsgError)
|
||||
End If
|
||||
|
||||
ObjContabilidad.Dispose()
|
||||
CargaPrePoliza(CvePrePoliza)
|
||||
|
||||
If Not OcurrioError Then
|
||||
If IdPoliza > 0 AndAlso contador > 0 Then
|
||||
Contabilizar()
|
||||
End If
|
||||
'If Not OcurrioError Then
|
||||
' If IdPoliza > 0 AndAlso contador > 0 Then
|
||||
' Contabilizar()
|
||||
' End If
|
||||
|
||||
End If
|
||||
'End If
|
||||
End Sub
|
||||
Protected Sub LnkAddConcepto_Click(sender As Object, e As EventArgs)
|
||||
RegistraScript(String.Format("$('#{0}').modal();", "DivEditConcepto"))
|
||||
@@ -1731,7 +1723,6 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
GvPrePoliza.DataBind()
|
||||
UpPrePoliza.Update()
|
||||
GvPrePoliza.Visible = True
|
||||
If IndiceGrid >= 0 Then GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True
|
||||
|
||||
TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero
|
||||
TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero
|
||||
@@ -1998,22 +1989,15 @@ Partial Class ContabilidadC_RegPrePolizaS
|
||||
Protected Sub DdlTipoGasto_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
If UpPrePoliza.Visible Then
|
||||
|
||||
|
||||
For Each dRow As DataRow In DtMovimientos.Rows
|
||||
dRow("CveTipoGasto") = DdlTipoGasto.SelectedValue
|
||||
dRow("TipoGasto") = DdlTipoGasto.SelectedItem.Text
|
||||
dRow("Modificado") = True
|
||||
Next
|
||||
|
||||
DtMovimientos.AcceptChanges()
|
||||
GvPrePoliza.DataSource = DtMovimientos
|
||||
GvPrePoliza.DataBind()
|
||||
|
||||
For Each Gvr As GridViewRow In GvPrePoliza.Rows
|
||||
'Gvr.FCDropDownList("DdlTipoGasto").SelectedValueExist(DdlTipoGasto.SelectedValue)
|
||||
Gvr.FCCheckBox("chkModificado").Checked = True
|
||||
|
||||
Next
|
||||
|
||||
UpPrePoliza.Update()
|
||||
End If
|
||||
If divMovtos.Visible Then
|
||||
|
||||
@@ -366,7 +366,17 @@
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Tipo de Comprobante: I - Ingreso </Value>
|
||||
<Value>Tipo de Comprobante: </Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
<TextDecoration>None</TextDecoration>
|
||||
<Color>#000000</Color>
|
||||
</Style>
|
||||
</TextRun>
|
||||
<TextRun>
|
||||
<Value>= IIF(Parameters!Tipo.Value = "INGRESO","I - Ingreso","E - Egreso")</Value>
|
||||
<Style>
|
||||
<FontStyle>Normal</FontStyle>
|
||||
<FontSize>8pt</FontSize>
|
||||
|
||||
@@ -437,7 +437,6 @@
|
||||
<PaddingBottom>2pt</PaddingBottom>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<rd:Selected>true</rd:Selected>
|
||||
</CellContents>
|
||||
</TablixCell>
|
||||
</TablixCells>
|
||||
@@ -791,12 +790,24 @@ CIUDAD DE MEXICO</Value>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.80781cm</Top>
|
||||
<Left>4.60107cm</Left>
|
||||
<Height>1.56146cm</Height>
|
||||
<Width>8.54466cm</Width>
|
||||
<Width>10.0923cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -645,12 +645,24 @@ CIUDAD DE MEXICO</Value>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.93835cm</Top>
|
||||
<Left>4.45623cm</Left>
|
||||
<Left>4.49034cm</Left>
|
||||
<Height>1.56146cm</Height>
|
||||
<Width>8.54466cm</Width>
|
||||
<Width>9.99987cm</Width>
|
||||
<ZIndex>1</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
|
||||
@@ -1529,12 +1529,24 @@ CIUDAD DE MEXICO</Value>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
<Paragraph>
|
||||
<TextRuns>
|
||||
<TextRun>
|
||||
<Value>Telefono +52 551 563 3271 support@smsmedicalsolutions.com</Value>
|
||||
<Style>
|
||||
<FontSize>8pt</FontSize>
|
||||
<FontWeight>Bold</FontWeight>
|
||||
</Style>
|
||||
</TextRun>
|
||||
</TextRuns>
|
||||
<Style />
|
||||
</Paragraph>
|
||||
</Paragraphs>
|
||||
<rd:DefaultName>Textbox6</rd:DefaultName>
|
||||
<Top>0.63635cm</Top>
|
||||
<Left>8.55215cm</Left>
|
||||
<Height>1.13405cm</Height>
|
||||
<Width>8.54466cm</Width>
|
||||
<Left>7.67902cm</Left>
|
||||
<Height>1.52889cm</Height>
|
||||
<Width>10.41731cm</Width>
|
||||
<ZIndex>2</ZIndex>
|
||||
<Style>
|
||||
<Border>
|
||||
@@ -2288,6 +2300,7 @@ CIUDAD DE MEXICO</Value>
|
||||
</Style>
|
||||
</Textbox>
|
||||
<Line Name="Line5">
|
||||
<Top>0cm</Top>
|
||||
<Left>0.13678cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>20.28859cm</Width>
|
||||
@@ -2299,6 +2312,7 @@ CIUDAD DE MEXICO</Value>
|
||||
</Style>
|
||||
</Line>
|
||||
<Line Name="Line4">
|
||||
<Top>0cm</Top>
|
||||
<Left>0.13678cm</Left>
|
||||
<Height>0cm</Height>
|
||||
<Width>25.72414cm</Width>
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1455,7 +1455,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim FechaVencimiento As Date = Row("Fecha Vencimiento").ToString().ToDate
|
||||
Dim CveMoneda As Integer = 1
|
||||
Dim CveProveedorSucursal As Integer = If(dt.Columns.Contains("CveProveedorSucursal"), Row("CveProveedorSucursal").ToString(), "0").ToEntero
|
||||
Dim PorcentajeIVA As String = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString(), "0")
|
||||
Dim PorcentajeIVA As Decimal = If(dt.Columns.Contains("PorcentajeIVA"), Row("PorcentajeIVA").ToString(), "0").ToDecimal
|
||||
Dim ImpuestosLocales As Decimal = If(dt.Columns.Contains("ImpuestosLocales"), Row("ImpuestosLocales").ToString(), "0").ToDecimal
|
||||
Dim RetIVAPorcentaje As Decimal = If(dt.Columns.Contains("RetIVAPorcentaje"), Row("RetIVAPorcentaje").ToString(), "0").ToDecimal
|
||||
Dim RetISRPorcentaje As Decimal = If(dt.Columns.Contains("RetISRPorcentaje"), Row("RetISRPorcentaje").ToString(), "0").ToDecimal
|
||||
@@ -1499,14 +1499,14 @@ Partial Class General_SaldosIniciales
|
||||
End If
|
||||
If Not ObjCompras.AddCompra(TipoDocto, "", Serie, Folio, Folio2, CveProveedor.ToEntero(), SubTotal, 0, 0, IVA, RetIVA, RetISR, IEPS, 0, 0, Total, Fecha, CveMoneda, TipoCambio.ToDecimal, FechaVencimiento,
|
||||
False, CodProvee, 1, CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveProveedorSucursal:=CveProveedorSucursal,
|
||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA.ToDecimal, TotalOriginal:=Total, CveSubProyecto:=CveSubProyecto) Then
|
||||
NumeroReembolso:=Transaccion, PorcentajeIVA:=PorcentajeIVA, TotalOriginal:=Total, CveSubProyecto:=CveSubProyecto) Then
|
||||
ErrorCompras = True
|
||||
Exit For
|
||||
End If
|
||||
CveCompra = ObjCompras.CveCompra
|
||||
|
||||
'Compra Detalle
|
||||
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, Sucursal.ToEntero(), -1, 0, 1, SubTotal, 0.16D, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA.ToDecimal, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then
|
||||
If Not ObjCompras.AddCompraDetalle(CveCompra, CveUnidadMedida, CvePS, CveSubProyecto, -1, 0, 1, SubTotal, SubTotal * PorcentajeIVA, SubTotal, 0, "Carga Inicial", -1, IVAPorcentaje:=PorcentajeIVA, RetIVAPorcentaje:=RetIVAPorcentaje, RetISRPorcentaje:=RetISRPorcentaje) Then
|
||||
ErrorCompras = True
|
||||
Exit For
|
||||
End If
|
||||
@@ -1518,7 +1518,7 @@ Partial Class General_SaldosIniciales
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, SubTotal, SubTotal, 6, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveClasificacion:=CveClasificacion, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
||||
|
||||
If IVA > 0 Then
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA.ToDecimal) Then ErrorCompras = True : Exit For
|
||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IVA, IVA, 14, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero(), CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeIVA) Then ErrorCompras = True : Exit For
|
||||
End If
|
||||
|
||||
If IEPS > 0 Then If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, IEPS, IEPS, 25, Folio, String.Format("{0}-{1}", Serie, Folio), CveCompra:=CveCompra, CveProveedor:=CveProveedor, CveSubProyecto:=Sucursal.ToEntero()) Then ErrorCompras = True : Exit For
|
||||
@@ -3509,7 +3509,7 @@ Partial Class General_SaldosIniciales
|
||||
Dim CveSATRiesgoPuesto As Integer = 1
|
||||
Dim CveJornada As Integer = 1
|
||||
|
||||
If Sexo.ToUpper.Contains("Masculino") Then CveGenero = 1 Else CveGenero = 2
|
||||
If Sexo.ToUpper.Contiene("Masculino", "1: Masculino") Then CveGenero = 1 Else CveGenero = 2
|
||||
If AltaIMSS.ToUpper.Contiene("SI", "1") Then AltaIMSS = "True" Else AltaIMSS = "False"
|
||||
myarraystr = EstadoCivil.Split(":"c)
|
||||
If (myarraystr.Length > 1) Then
|
||||
|
||||
@@ -1,16 +1,10 @@
|
||||
Imports System.Data
|
||||
Imports System.Globalization
|
||||
Imports Extensiones
|
||||
Imports System.Web.Services
|
||||
Imports Newtonsoft.Json
|
||||
Imports System.Drawing
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Request
|
||||
Imports ADSNetLibrary.SIGAPI.Services.CRM
|
||||
Imports Telerik.Web.UI.Scheduler.Views
|
||||
Imports Microsoft.EntityFrameworkCore.Storage.ValueConversion.Internal
|
||||
|
||||
'Imports System.Reflection
|
||||
'Imports Telerik.Web.UI
|
||||
Imports ADSNetLibrary.SIGAPI.Models.CRM.Response
|
||||
|
||||
Partial Class Inicio
|
||||
Inherits ClsPaginas
|
||||
@@ -31,7 +25,7 @@ Partial Class Inicio
|
||||
theDataSet.ReadXml(theReader)
|
||||
|
||||
If theDataSet.Tables(0).Rows(0)("Uuid").ToString() <> "null" Then
|
||||
Dim sb = New StringBuilder()
|
||||
Dim sb As New StringBuilder()
|
||||
|
||||
For Each item As DataRow In theDataSet.Tables(0).Rows
|
||||
sb.AppendFormat("{0};", item("Uuid").ToString())
|
||||
@@ -161,7 +155,7 @@ Partial Class Inicio
|
||||
If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad Then
|
||||
Dim ObjPolizas As New ClsContPAQi(UsuarioActual.Empresa)
|
||||
If ObjPolizas.GetPolizasCuadre() And ObjPolizas.DtResultados.Rows.Count > 0 Then
|
||||
Dim ObjNotificacion = ItemNotificaciones(String.Format("Polizas de cuadre {0}", ObjPolizas.DtResultados.Rows.Count), Ico:="icon-calculator", Tipo:="warning", Link:="/Contabilidad/RepPolizasCuadre.aspx")
|
||||
Dim ObjNotificacion As String = ItemNotificaciones(String.Format("Polizas de cuadre {0}", ObjPolizas.DtResultados.Rows.Count), Ico:="icon-calculator", Tipo:="warning", Link:="/Contabilidad/RepPolizasCuadre.aspx")
|
||||
NotificacionesPendientes(ObjNotificacion)
|
||||
End If
|
||||
ObjPolizas.Dispose()
|
||||
@@ -172,7 +166,7 @@ Partial Class Inicio
|
||||
Dim OC As New ClsOC
|
||||
If OC.GetOrdenesPendientes("-1", 0, UsuarioActual.CveEmpresa, -1, -1, -1, UsuarioActual.CveUsuario, -1) Then
|
||||
If (OC.DtResultados.Rows.Count > 0) Then
|
||||
Dim ObjNotificacion = ItemNotificaciones(String.Format("Orden de Compra por atender {0}", OC.DtResultados.Rows.Count), Ico:="fa fa-tags", Tipo:="warning", Link:="/OC/RepOC.aspx")
|
||||
Dim ObjNotificacion As String = ItemNotificaciones(String.Format("Orden de Compra por atender {0}", OC.DtResultados.Rows.Count), Ico:="fa fa-tags", Tipo:="warning", Link:="/OC/RepOC.aspx")
|
||||
NotificacionesPendientes(ObjNotificacion)
|
||||
End If
|
||||
End If
|
||||
@@ -263,7 +257,7 @@ Partial Class Inicio
|
||||
If ObjProveedor.GetEvaluacionesProveedores(-1, -1, UsuarioActual.CveEmpresa) Then
|
||||
If ObjProveedor.DtResultados.COUNT("CveEvaluacionProveedor", $"Evaluado = 0 AND CveUsuario={UsuarioActual.CveUsuario}") > 0 Then
|
||||
Dim Mensaje As String = "Hay evaluaciones pendientes de proveedores. ¿Desea realizarlas ahora?"
|
||||
Dim MsgAccionAceptar = "window.open(""/Compras/EvaluacionProveedor.aspx?CveProveedor=-1"");"
|
||||
Dim MsgAccionAceptar As String = "window.open(""/Compras/EvaluacionProveedor.aspx?CveProveedor=-1"");"
|
||||
|
||||
Alert(Mensaje, TipoMensaje.MsgConfirmacion, JSBtnAceptar:=MsgAccionAceptar, TextoConfirmacion:=" Si ", TextoCancelacion:=" No ")
|
||||
End If
|
||||
@@ -350,7 +344,7 @@ Partial Class Inicio
|
||||
|
||||
Private Sub MuestraPsProximosAVencer()
|
||||
|
||||
Dim ObjInventarios = New ClsInventarios
|
||||
Dim ObjInventarios As New ClsInventarios
|
||||
If ObjInventarios.GetProductosCaducidad(-1, MinFecha, NowADS().AddDays(30), -1, -1, -1, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Opcion:=2, CveCompuesto:=-1) Then
|
||||
|
||||
If ObjInventarios.DtResultados.Rows.Count > 0 Then
|
||||
@@ -359,11 +353,9 @@ Partial Class Inicio
|
||||
Else
|
||||
GvModalPSPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
Else
|
||||
GvModalPSPorCaducar.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjInventarios.Dispose()
|
||||
GvModalPSPorCaducar.DataBind()
|
||||
|
||||
@@ -560,9 +552,9 @@ Partial Class Inicio
|
||||
Dim CveEventoEstatus As Integer = -1
|
||||
FechaI = NowADS().AddDays(-180)
|
||||
FechaF = NowADS()
|
||||
If ObjProspectos.GetRepEventos(-1, 1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||
If ObjProspectos.GetRepEventos(-1, -1, -1, "-1", "-1", -1, -1, -1, 1, -1, -1, "-1", -1, -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, FechaI, FechaF) Then
|
||||
|
||||
Dim DT As DataTable = ObjProspectos.DtResultados.Clone.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}")
|
||||
Dim DT As DataTable = ObjProspectos.DtResultados.Clone.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa} AND (CveTipoEvento =1 OR CveTipoEvento =3 OR CveTipoEvento =5 OR )")
|
||||
|
||||
If ChkOIPorHacer.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioPara = {0} AND CveEmpresa = {1}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)))
|
||||
If ChkOIAsigne.Checked Then DT.Merge(ObjProspectos.DtResultados.FiltraParametros(String.Format("CveUsuarioDe = {0} AND CveEmpresa = {1} ", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)))
|
||||
@@ -772,10 +764,8 @@ Partial Class Inicio
|
||||
Private Sub CargaDdlAcercamientoCRM()
|
||||
DdlAcercamientoCRM.Items.Clear()
|
||||
|
||||
Dim cRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
|
||||
|
||||
Dim aceramientoGet = New RequestAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM:=DdlEmpresaCRM.SelectedValue.ToEntero)
|
||||
Dim cRMService As New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim aceramientoGet As New RequestAcercamiento(UsuarioActual.CveEmpresa, CveEmpresaCRM:=DdlEmpresaCRM.SelectedValue.ToEntero)
|
||||
Dim objAcercamiento = cRMService.GetAceracamientoCRM(aceramientoGet)
|
||||
If objAcercamiento.IsSuccess Then
|
||||
DdlAcercamientoCRM.DataSource = objAcercamiento.Result
|
||||
@@ -788,8 +778,8 @@ Partial Class Inicio
|
||||
Private Sub CargaDdlContactoCRM()
|
||||
DdlContactoCRM.Items.Clear()
|
||||
|
||||
Dim cRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim contactoEmpresaCRM = New RequestContactoEmpresaCRM(DdlEmpresaCRM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1)
|
||||
Dim cRMService As New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim contactoEmpresaCRM As New RequestContactoEmpresaCRM(DdlEmpresaCRM.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, -1)
|
||||
Dim objServicio = cRMService.GetContactosEmpresasCRM(contactoEmpresaCRM)
|
||||
|
||||
If objServicio.IsSuccess Then
|
||||
@@ -818,13 +808,13 @@ Partial Class Inicio
|
||||
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
Dim FechaInicio = TxtFechaInicioAgenda.Text.ToDateTime()
|
||||
Dim FechaFin = TxtFechaFinAgenda.Text.ToDateTime()
|
||||
Dim validacionesAgendaOpcionesOK = True
|
||||
Dim FechaInicio As DateTime = TxtFechaInicioAgenda.Text.ToDateTime()
|
||||
Dim FechaFin As DateTime = TxtFechaFinAgenda.Text.ToDateTime()
|
||||
Dim validacionesAgendaOpcionesOK As Boolean = True
|
||||
|
||||
RegistraScript("GetView();")
|
||||
|
||||
Dim RecurrenciaTipo = 0, Frecuencia = -1, DiasSemana = "-1", Dias = -1, Mes = -1, RecurrenciaFin = "-1"
|
||||
Dim RecurrenciaTipo As Integer = 0, Frecuencia As Integer = -1, DiasSemana As String = "-1", Dias As Integer = -1, Mes As Integer = -1, RecurrenciaFin As String = "-1"
|
||||
If CheckRecurrencia.Checked Then
|
||||
RecurrenciaTipo = RBLRecurrencia.SelectedValue.ToEntero
|
||||
Frecuencia = TxtFrecuencia.Text.ToEntero
|
||||
@@ -832,7 +822,7 @@ Partial Class Inicio
|
||||
'OBTENEMOS LOS DIAS SELECCIONADOS EN LA OPCION DE RECURRENCIA POR SEMANA
|
||||
Select Case RecurrenciaTipo
|
||||
Case 3
|
||||
Dim StringDias = ""
|
||||
Dim StringDias As String = ""
|
||||
For Each item As ListItem In CheckDiasSemana.Items
|
||||
If item.Selected Then
|
||||
If StringDias.Length > 0 Then
|
||||
@@ -1022,8 +1012,8 @@ Partial Class Inicio
|
||||
Public Shared Function ActualizaEvento(ClsEvent As CalendarEvent) As String
|
||||
Dim ObjEventos As New ClsOIEventos
|
||||
|
||||
Dim FechaInicio = DateTimeOffset.Parse(ClsEvent.start).DateTime
|
||||
Dim FechaFin = DateTimeOffset.Parse(ClsEvent.end).DateTime
|
||||
Dim FechaInicio As DateTime = DateTimeOffset.Parse(ClsEvent.start).DateTime
|
||||
Dim FechaFin As DateTime = DateTimeOffset.Parse(ClsEvent.end).DateTime
|
||||
|
||||
If ObjEventos.UpdateEvento("-1", "-1", -1, -1, -1, FechaInicio, FechaFin, -1, "-1", ClsEvent.id) Then
|
||||
End If
|
||||
@@ -1162,7 +1152,7 @@ Partial Class Inicio
|
||||
If i = index Then
|
||||
serie.name = row(i).ToString()
|
||||
Else
|
||||
Dim actual = row(i).ToString().ToDouble
|
||||
Dim actual As Double = row(i).ToString().ToDouble
|
||||
serie.data.Add(actual)
|
||||
anterior = actual
|
||||
End If
|
||||
@@ -1450,7 +1440,7 @@ Partial Class Inicio
|
||||
If UsuarioActual.CveEmpresa = 140 Then
|
||||
DVDescargasBDH.Visible = True
|
||||
|
||||
Dim TmpDT = New DataTable()
|
||||
Dim TmpDT As New DataTable()
|
||||
|
||||
Dim ObjDoc As New ClsEdocumentacion
|
||||
If ObjDoc.DocumentacionGet(-1, -1, 1, UsuarioActual.Empresa.CveEmpresa, Modulo:=8) Then
|
||||
@@ -1541,8 +1531,8 @@ Partial Class Inicio
|
||||
|
||||
Private Sub CargaDdlEmpresaCRM()
|
||||
|
||||
Dim cRMService = New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim parametros = New RequestEmpresasCRM(UsuarioActual.CveEmpresa, -1, CveMedioCaptacion:=-1)
|
||||
Dim cRMService As New CRMService(System.Configuration.ConfigurationManager.ConnectionStrings("Conexion").ConnectionString)
|
||||
Dim parametros As New RequestEmpresasCRM(UsuarioActual.CveEmpresa, -1, CveMedioCaptacion:=-1)
|
||||
Dim objServicio = cRMService.GetEmpresasCRM(parametros)
|
||||
|
||||
If objServicio.IsSuccess Then
|
||||
@@ -1554,9 +1544,6 @@ Partial Class Inicio
|
||||
If objServicio.Result.Count > 0 Then
|
||||
DdlEmpresaCRM_SelectedIndexChanged(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -421,6 +421,14 @@
|
||||
<asp:Label Text="" ID="LblFolioOrdenCorte" runat="server" />
|
||||
</div>
|
||||
</div>
|
||||
<div class="row" runat="server" id="divOS" visible="false" style="margin-top: 5px;">
|
||||
<label class="col-md-4 truncate">
|
||||
OS:
|
||||
</label>
|
||||
<div class="col-md-8">
|
||||
<asp:HyperLink ID="HplOS" CssClass="Texto" runat="server" Target="_blank"></asp:HyperLink>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -840,6 +840,12 @@ Partial Class Inventarios_EntradasSalidas
|
||||
LblFolioOrdenCorte.Text = DtMov.Rows(0)("FolioOrdendeCorte").ToString
|
||||
End If
|
||||
|
||||
If DtMov.Rows(0)("CveOS").ToString.ToEntero() > 0 Then
|
||||
divOS.Visible = True
|
||||
HplOS.Text = DtMov.Rows(0)("OSFolio").ToString
|
||||
HplOS.NavigateUrl = $"/OS/OrdenesServicios.aspx?CveOS={DtMov.Rows(0)("CveOS")}"
|
||||
End If
|
||||
|
||||
|
||||
If (DdlAlmacen.Items.FindByValue(Mov.CveAlmacen.ToString()) Is Nothing) Then
|
||||
Dim dr As DataRow = GlobalDTAlmacen(UsuarioActual.CveEmpresa, CveEstatus:=-1).FiltroPrimero(String.Format("CveAlmacen = {0}", Mov.CveAlmacen))
|
||||
|
||||
@@ -167,6 +167,7 @@
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:GridView ID="GvVentas" ClientIDMode="Static" Width="100%" runat="server" GridLines="None" BorderWidth="0" CssClass="table table-striped table-hover Widthall ScrollAD" OnRowDataBound="GvVentas_RowDataBound"
|
||||
DataKeyNames="EsDevolucionVenta"
|
||||
data-sort="true" EmptyDataText="No se encontraron resultados." AutoGenerateColumns="False" >
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Tipo Docto" DataField="TipoDocto" ItemStyle-Width="55px" />
|
||||
@@ -191,6 +192,7 @@
|
||||
<ItemTemplate>
|
||||
|
||||
<asp:HyperLink ID="lnkSurtir" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm blue" Text="Surtir <i class='fa fa-arrow-right' ></i>"></asp:HyperLink>
|
||||
<asp:HyperLink ID="LnkRecibir" Visible="false" NavigateUrl='<%# Eval("CveVenta", "/Inventarios/EntregaAlmacen.aspx?CveVenta={0}") %>' runat="server" CssClass="btn btn-sm yellow-gold" Text="recibir <i class='fa fa-arrow-left' ></i>"></asp:HyperLink>
|
||||
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
|
||||
@@ -324,6 +324,13 @@ Partial Class RepNotasSinAlmacen
|
||||
e.Row.Cells(2).Text = $"{e.Row.DBCampo("Fecha").ToDateTime.ToString("dd/MM/yyyy")}"
|
||||
End If
|
||||
|
||||
|
||||
|
||||
If e.Row.DataKey("EsDevolucionVenta").ToEntero = 1 Then
|
||||
e.Row.FCHyperLink("lnkSurtir").Visible = False
|
||||
e.Row.FCHyperLink("LnkRecibir").Visible = True
|
||||
End If
|
||||
|
||||
End If
|
||||
End Sub
|
||||
End Class
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</div>
|
||||
|
||||
<div class="copyright">
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2023 © AD Sistemas.</asp:Literal>
|
||||
<asp:Literal ID="Ltlcopyright" runat="server">2024 © AD Sistemas.</asp:Literal>
|
||||
</div>
|
||||
<%--<div class="col-lg-offset-4 col-md-offset-4 col-sm-offset-3 col-lg-4 col-md-4 col-sm-6 col-xs-12 text-right">
|
||||
<asp:LinkButton ID="linkRegistrar" runat="server" CssClass="restaurar-password" OnClientClick="window.location.href='ActivarUsuario.aspx'">Registrar</asp:LinkButton>
|
||||
|
||||
@@ -489,6 +489,7 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
}
|
||||
private void CargaTiposPeriodo()
|
||||
{
|
||||
set_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa, null);
|
||||
DdlTipoPeriodo.DataSource = get_GlobalDTTipoPeriodos(UsuarioActual.CveEmpresa);
|
||||
DdlTipoPeriodoCM.DataSource = DdlTipoPeriodo.DataSource;
|
||||
DdlTipoPeriodoSim.DataSource = DdlTipoPeriodo.DataSource;
|
||||
@@ -7541,7 +7542,8 @@ public partial class Nomina_Nomina2 : ClsPaginas
|
||||
GvConceptossimulador.DataSource = new DataTable();
|
||||
LblSalarioDiarioSimula.Text = "";
|
||||
GvConceptossimulador.DataBind();
|
||||
DdlTipoPeriodoSim.SelectedValue = "1";
|
||||
DdlTipoPeriodoSim.SelectedValueExist(4);
|
||||
DdlTipoPeriodoSim.SelectedValueExist(1);
|
||||
RegistraScript("$('#DSimulador').modal()");
|
||||
UpSimulador.Update();
|
||||
}
|
||||
|
||||
@@ -313,7 +313,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
|
||||
if (CveCircular > 0)
|
||||
{
|
||||
|
||||
CargaDatos();
|
||||
string[] correos;
|
||||
correos = TxtCorreo.Text.Split(';');
|
||||
byte[] ArchivoBytes = ArchivoBytesArrya(HkArchivo.Text);
|
||||
@@ -321,7 +321,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
int Contador = 0;
|
||||
foreach (string Correo in correos)
|
||||
{
|
||||
MandaCorreo(TxtAsunto.Text, Correo, Contador > 0 ? "" : TxtCorreoAdicional.Text, TxtCircular.Text.Replace("< ", "<"), ArchivoBytes, HkArchivo.Text);
|
||||
MandaCorreo(TxtAsunto.Text, Correo, Contador > 0 ? "" : TxtCorreoAdicional.Text, TxtCircular.Text.Replace("< ", "<"), ArchivoBytes, HkArchivo.Text, CircularInsertado);
|
||||
Contador += 1;
|
||||
}
|
||||
BtnGuardar.Text = "Actualizar";
|
||||
@@ -375,7 +375,6 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
string FileExtension = "-1";
|
||||
List<Archivo> Filesgral = TxtArchivo.getfiles().Archivos;
|
||||
//string Filename = "";
|
||||
|
||||
foreach (Archivo fileItem in Filesgral)
|
||||
{
|
||||
try
|
||||
@@ -446,7 +445,7 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
private void MandaCorreo(string Asunto, string Para, string ArrayCC, string body, byte[] ArchivoBinario, string NombreArchivo)
|
||||
private void MandaCorreo(string Asunto, string Para, string ArrayCC, string body, byte[] ArchivoBinario, string NombreArchivo,int CircularInsertado=-1)
|
||||
{
|
||||
string a = string.Format("{0} -- {1} --- {2}", Asunto, Para, ArrayCC);
|
||||
a.GuardaLog();
|
||||
@@ -485,6 +484,22 @@ public partial class OI_CircularDetalleB : ClsPaginas
|
||||
|
||||
return new byte[] { };
|
||||
}
|
||||
private byte[] ArchivoBytesArryarutaCompleta(string ArchivoEnviar)
|
||||
{
|
||||
if (File.Exists(ArchivoEnviar))
|
||||
{
|
||||
System.IO.FileStream fs = System.IO.File.Open(ArchivoEnviar, System.IO.FileMode.Open, System.IO.FileAccess.Read);
|
||||
byte[] buff = new byte[fs.Length + 1];
|
||||
if (fs.Length > 0)
|
||||
{
|
||||
fs.Read(buff, 0, (fs.Length.ToString().ToEntero() - 1));
|
||||
fs.Close();
|
||||
}
|
||||
return buff;
|
||||
}
|
||||
|
||||
return new byte[] { };
|
||||
}
|
||||
|
||||
|
||||
protected void RLBTipoEnvioTipo_SelectedIndexChanged(object sender, EventArgs e)
|
||||
|
||||
@@ -18,8 +18,8 @@ Partial Class OI_RepMinutas
|
||||
End Sub
|
||||
|
||||
Private Sub CargaFiltros()
|
||||
txtFechaI.Text = New Date(NowADS().Year, NowADS().Month, 1).ToShortDateString
|
||||
txtFechaF.Text = NowADS().ToShortDateString
|
||||
TxtFechaI.Text = NowADS().ToShortDateString()
|
||||
TxtFechaF.Text = (NowADS().AddMonths(1)).ToShortDateString()
|
||||
End Sub
|
||||
Public Sub CargaDatosOIMinutas()
|
||||
Dim ObjProspectos As New ClsOIEventos
|
||||
|
||||
@@ -29,8 +29,8 @@ public partial class OI_RepReuniones : ClsPaginas
|
||||
|
||||
private void CargaFiltros()
|
||||
{
|
||||
TxtFechaI.Text = new DateTime(NowADS().Year, NowADS().Month, 1).ToShortDateString();
|
||||
TxtFechaF.Text = NowADS().ToShortDateString();
|
||||
TxtFechaI.Text = NowADS().ToShortDateString();
|
||||
TxtFechaF.Text = (NowADS().AddMonths(1)).ToShortDateString();
|
||||
TxtCFechaInicio.Text = TxtFechaI.Text;
|
||||
TxtCFechaFin.Text = TxtFechaF.Text;
|
||||
}
|
||||
|
||||
@@ -479,7 +479,7 @@ public partial class OI_TareaDetalle : ClsPaginas
|
||||
CveTipoEvento = drow["CveTipoEvento"].ToString().ToEntero();
|
||||
|
||||
|
||||
if(CveTipoEvento == 3)
|
||||
if(CveTipoEvento == 3 && CveEventoPadre<=0)
|
||||
{
|
||||
DivAvance.Visible = false;
|
||||
}
|
||||
|
||||
@@ -1283,7 +1283,28 @@
|
||||
</button>
|
||||
<h4 class="modal-title" >Material Utilizado</h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtPacienteModal" >
|
||||
<asp:TextBox ID="TxtPacienteModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="50"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtPacienteModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtPacienteModal"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Paciente''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtPacienteModal.ClientID.ToString()%>">Paciente:</label>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" runat="server" visible="false" id="DvTxtEpisodioModal">
|
||||
<asp:TextBox ID="TxtEpisodioModal" runat="server" CssClass="form-control" CausesValidation="true" MaxLength="20"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtEpisodioModal" runat="server" CssClass="help-block errorimput" ControlToValidate="TxtEpisodioModal"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Episodio''</b> es necesario, por favor ingréselo." ValidationGroup="GrpMaterialUtilizado"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtEpisodioModal.ClientID.ToString()%>">Episodio:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
@@ -1342,7 +1363,8 @@
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
|
||||
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si" ValidationGroup="GrpDevolucion"
|
||||
<asp:LinkButton ID="LnkModalMaterialUtilizado" runat="server" CssClass="btn btn-primary" data-toggle="confirmation" data-popout="true" data-original-title="El material definido es el correcto?" data-btn-ok-label="si"
|
||||
ValidationGroup="GrpMaterialUtilizado" CausesValidation="true"
|
||||
OnClick="LnkModalMaterialUtilizado_Click" >Guardar</asp:LinkButton>
|
||||
<button type="button" class="btn btn-default" data-dismiss="modal">Cancelar</button>
|
||||
|
||||
|
||||
@@ -473,6 +473,9 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
DVEpisodioPaciente.Visible = True
|
||||
|
||||
DvTxtPacienteModal.Visible = True
|
||||
DvTxtEpisodioModal.Visible = True
|
||||
|
||||
If CveOS > 0 And TipoEstatus >= 3 Then
|
||||
DdlUsuarioAtendio.Enabled = True
|
||||
DVUsuarioAtendio3.Visible = True
|
||||
@@ -682,7 +685,7 @@ Partial Class OS_OrdenesServicios
|
||||
DdlEstatusOS.SelectedValue = ObjOS.CveEstatusOrdenServicio.ToString
|
||||
|
||||
'If TipoEstatus = 2 Then
|
||||
LnkTecnico.Visible = True
|
||||
'LnkTecnico.Visible = True
|
||||
'End If
|
||||
|
||||
If TipoEstatus = 3 Then
|
||||
@@ -3023,6 +3026,12 @@ Partial Class OS_OrdenesServicios
|
||||
LnkModalMaterialUtilizado.Visible = False
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
TxtPacienteModal.Text = TxtPaciente.Text
|
||||
TxtEpisodioModal.Text = TxtIdentificadorCliente.Text
|
||||
|
||||
End If
|
||||
|
||||
UpModalMaterialUtilizado.Update()
|
||||
|
||||
End Sub
|
||||
@@ -3038,6 +3047,21 @@ Partial Class OS_OrdenesServicios
|
||||
|
||||
Protected Sub LnkModalMaterialUtilizado_Click(sender As Object, e As EventArgs)
|
||||
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
|
||||
If TxtPacienteModal.Text.Trim.Length = 0 Then
|
||||
Alert("Debe de proporcionar el paciente.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If TxtEpisodioModal.Text.Trim.Length = 0 Then
|
||||
Alert("Debe de proporcionar el episodio.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim CveAlmacenActual As Integer = DTSolicitudDev.FiltroPrimeroValor("CveAlmacenActual").ToEntero
|
||||
Dim CveMoneda As Integer = DTSolicitudDev.FiltroPrimeroValor("CveMoneda").ToEntero
|
||||
Dim CveSubProyectoPedido As Integer = DTSolicitudDev.FiltroPrimeroValor("CveSubProyecto").ToEntero
|
||||
@@ -3247,14 +3271,21 @@ Partial Class OS_OrdenesServicios
|
||||
End If
|
||||
|
||||
If ProcesoOK Then
|
||||
|
||||
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS) Then
|
||||
If Not ObjOS.UpdateVentaOS(Respuesta.CveVenta, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
If ProcesoOK Then
|
||||
If Not ObjOS.UpdateVentaOS(-1, CveOS, TxtPacienteModal.Text.Trim, TxtEpisodioModal.Text.Trim) Then
|
||||
ProcesoOK = False
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -3307,6 +3338,8 @@ Partial Class OS_OrdenesServicios
|
||||
ObjFactura.FechaParaSurtir = TxtFechaCita.Text.ToDateTime
|
||||
ObjFactura.CveClienteSucursal = DdlSucursalCliente.SelectedValue.ToEntero
|
||||
ObjFactura.CveVentaRelacion = CveVentaPedido
|
||||
ObjFactura.Paciente = TxtPacienteModal.Text.Trim
|
||||
ObjFactura.Episodio = TxtEpisodioModal.Text.Trim
|
||||
|
||||
For Each GvRow As GridViewRow In GvMU.Rows
|
||||
|
||||
|
||||
@@ -842,50 +842,12 @@
|
||||
|
||||
|
||||
function selectDate(start, end, allDay) {
|
||||
<%-- $('#ModalAgenda').modal('show');
|
||||
$("#SpanTituloAgenda").html("Agregar Evento");
|
||||
|
||||
$("#HdnCveEvento").val(-1);
|
||||
|
||||
$("#DdlAgedaTipo").val("-1");
|
||||
$("#DdlPrioridad").val("1");
|
||||
|
||||
$("#TxtAsuntoAgenda").val("");
|
||||
$("#TxtDescripcionAgenda").val("");
|
||||
$("#TxtFechaInicioAgenda").val("" + start.format("DD/MM/YYYY 08:00"));
|
||||
$("#TxtFechaFinAgenda").val("" + start.format("DD/MM/YYYY 09:00"));
|
||||
|
||||
$("#UpRecurrencia").hide();
|
||||
$("#CheckRecurrencia").prop('checked', false);
|
||||
|
||||
$get("HdnDiasSemanaAgendar").value = -1;
|
||||
|
||||
$('#<%=RBLRecurrencia.ClientID %>').find("input[value='1']").prop("checked", true);
|
||||
$('#<%=TrDiasSemanaAdd.ClientID %>').css("display", "none");
|
||||
$("#DivDescripcionUpdate").css("display", "none");
|
||||
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "block");
|
||||
$('#<%=LblTextoFrecuencia.ClientID%>').html("Hora(s)");
|
||||
|
||||
$("#TxtFrecuencia").val("1");
|
||||
$("#TxtNumeroOcurrencias").val("");
|
||||
$("#TxtFechaFinRecurrencia").val("");
|
||||
|
||||
$("#ChkGastoRecurrente").prop('checked', false);
|
||||
$("#TxtImporteGastoRecurrente").val("");--%>
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
function updateEvent(event, element) {
|
||||
|
||||
|
||||
|
||||
//$('#ModalAgenda').modal('show');
|
||||
|
||||
|
||||
// $get("HdnDiasSemanaAgendar").value =
|
||||
|
||||
|
||||
|
||||
|
||||
$('#<%=HFCveOS.ClientID%>').val(event.CveOS);
|
||||
@@ -895,89 +857,7 @@
|
||||
$('#<%=HFOCveOIEvento.ClientID%>').val(event.id);
|
||||
|
||||
$('#<%=LnkCommando.ClientID%>').click();
|
||||
|
||||
<%-- $("#DivDescripcionUpdate").css("display", "block");
|
||||
$("#<%=TxtDescripcionAgenda.ClientID%>").css("display", "none");
|
||||
$("#HdnCveEvento").val(event.id);
|
||||
|
||||
$("#TxtNumeroOcurrencias").val('');
|
||||
$("#TxtFechaFinRecurrencia").val('');
|
||||
$("#TxtFrecuencia").val('');
|
||||
|
||||
$("#TxtAsuntoAgenda").val(event.title);
|
||||
//SE MUESTRA EL TEXTO HTML EN EL DIV DE LA DESCRIPCION SIN PERMITIR EDITAR,
|
||||
//SE ASIGNA -1 EN EL TEXBOX PARA QUE NO REALICE CAMBIOS EN BD
|
||||
$("#DivDescripcionUpdate").html(event.description);
|
||||
$("#TxtDescripcionAgenda").val("-1");
|
||||
|
||||
$("#DdlAgedaTipo").val(event.cveagendatipo);
|
||||
$("#DdlPrioridad").val(event.prioridad);
|
||||
$('#LblSubProyecto').text(event.SubProyecto);
|
||||
$('#LblDireccion').text(event.Direccion);
|
||||
|
||||
|
||||
|
||||
$("#TxtFechaInicioAgenda").val("" + event.start.format("DD/MM/YYYY HH:mm"));
|
||||
|
||||
$("#TxtFechaFinAgenda").val("" + event.end.format("DD/MM/YYYY HH:mm"));
|
||||
|
||||
//Identifica el tipo de Fecha Termino de la Recurrencia
|
||||
if (event.recurrenciafin == 0) {
|
||||
$("#TxtFrecuencia").val('0');
|
||||
} else if (!isNaN(event.recurrenciafin)) {
|
||||
$("#RBNumeroOcurrencias").prop('checked', true);
|
||||
$("#TxtNumeroOcurrencias").val(event.recurrenciafin);
|
||||
} else {
|
||||
$("#RBFechaFin").prop('checked', true);
|
||||
$("#TxtFechaFinRecurrencia").val("" + event.recurrenciafin);
|
||||
}
|
||||
|
||||
//GASTO RECURRENTE
|
||||
//Si el evento es tipo 10 = Gasto Mes, activa gasto recurrente
|
||||
if (event.CveTipoEvento == 10) {
|
||||
$("#ChkGastoRecurrente").prop('checked', true);
|
||||
$("#TxtImporteGastoRecurrente").val(event.Importe);
|
||||
} else {
|
||||
$("#ChkGastoRecurrente").prop('checked', false);
|
||||
$("#TxtImporteGastoRecurrente").val('');
|
||||
}
|
||||
|
||||
//Verifica que hay Recurrencia para activar los campos y poner sus valores respectivos
|
||||
if (event.recurrenciatipo > 0) {
|
||||
$("#CheckRecurrencia").prop('checked', true);
|
||||
|
||||
// CHECKEA EL TIPO DE RECURRENCIA QUE TENGA EL EVENTO
|
||||
var text = event.recurrenciatipo;
|
||||
var radio = $("[id*=RBLRecurrencia] label:contains('" + text + "')").closest("td").find("input");
|
||||
radio.attr("checked", "checked");
|
||||
|
||||
// CHECKEA LOS DIAS SELECCIONADOS DE LA RECURRENCIA DE SEMANA
|
||||
$get("HdnDiasSemanaAgendar").value = event.diassemana;
|
||||
|
||||
//LLENA TEXTO DE FRECUENCIA DE RECURRENCIA
|
||||
$("#TxtFrecuencia").val("" + event.frecuencia);
|
||||
} else {
|
||||
$("#CheckRecurrencia").prop('checked', false);
|
||||
}
|
||||
|
||||
|
||||
//ESCONDE O MUESTRA EL DIV DE LAS OPCIONES DE RECURRENCIA
|
||||
if ($get('CheckRecurrencia').checked) {
|
||||
$("#UpRecurrencia").show();
|
||||
} else {
|
||||
$("#UpRecurrencia").hide();
|
||||
}
|
||||
|
||||
//LLAMA EL INDEXCHANGED DEL RADIOBUTTONLIST DE LOS TIPOS DE RECURRENCIA
|
||||
$("#BtnActualizaAdd").click();
|
||||
|
||||
//Muestra nombre de la empresa si esta tarea sea asigno desde EmpresaCRM
|
||||
if (event.EmpresaCRM != "") {
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "")
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").text(event.EmpresaCRM);
|
||||
} else {
|
||||
$("#<%=LblEmpresaCRM.ClientID%>").css("display", "none")
|
||||
}--%>
|
||||
|
||||
|
||||
}
|
||||
function RadionButtonSelectedValueSet(name, SelectdValue) {
|
||||
|
||||
@@ -347,7 +347,7 @@
|
||||
<div class="portlet light smmallpadding bordered">
|
||||
<div class="portlet-title">
|
||||
<div class="caption">
|
||||
<i class="icon-user"></i><span class="caption-subject bold uppercase" style="font-size: 18px;">Personal (<span id="contaper"></span>)</span>
|
||||
<i class="icon-user"></i><span class="caption-subject bold uppercase" style="font-size: 18px;">Personal (<asp:Literal ID="ltlContador" runat="server"></asp:Literal>)</span>
|
||||
</div>
|
||||
<div class="tools">
|
||||
<div style="display: inline-block">
|
||||
@@ -1353,7 +1353,8 @@
|
||||
|
||||
|
||||
Sys.Application.add_load(function (s, e) {
|
||||
<%= String.Format("FiltrarTablaClass('TxtBusqueda','{0}','contaper');", GvDatos.ClientID) %>
|
||||
|
||||
<%= String.Format("setTimeout(function(){{ FiltrarTablaClass('TxtBusqueda','{0}','contaper');}}, 1000)", GvDatos.ClientID) %>
|
||||
});
|
||||
function OrdenarGV() {
|
||||
|
||||
|
||||
@@ -89,6 +89,7 @@ Partial Class RH_CatPersonal
|
||||
|
||||
|
||||
End If
|
||||
ltlContador.Text = String.Format("<span id='contaper' {0}>...</span>{1}", If(GvDatos.Rows.Count > 0, "", " class='hidden' "), If(GvDatos.Rows.Count > 0, "", "0"))
|
||||
End Sub
|
||||
|
||||
Public Sub CargaDatos()
|
||||
|
||||
@@ -3,8 +3,16 @@
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content2" ContentPlaceHolderID="Css" runat="Server">
|
||||
<style>
|
||||
.dashboard-stat .visual > i {
|
||||
<style>
|
||||
|
||||
.colSAT {
|
||||
color:White;background-color:#C46B06;
|
||||
}
|
||||
.colSIG {
|
||||
color:White;background-color:#3598dc;
|
||||
}
|
||||
|
||||
/* .dashboard-stat .visual > i {
|
||||
font-size: 90px;
|
||||
}
|
||||
|
||||
@@ -33,187 +41,8 @@
|
||||
color: #333333;
|
||||
background-color: #DDD;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(2)
|
||||
/*,.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2) */ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(3),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(4),
|
||||
.reporte1 .GVSolicitudTimbreNominaGral tr th:nth-child(5) /*,
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3),
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(4),
|
||||
.reporte1 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(5)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte2 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(7)) /*,
|
||||
.reporte2 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(7))*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(4),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(8),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(9),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+13):not(:nth-child(n+19)),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(24),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr td:nth-child(n+28):not(:nth-child(n+33)) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(2),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+20) /*,
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2),
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+20)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(1),
|
||||
.reporte3 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+20)) /*,
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(1),
|
||||
.reporte3 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3):not(:nth-child(n+20))*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr td:nth-child(n+2),
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+2) {
|
||||
text-align: right !important;
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte4 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) /*,
|
||||
.reporte4 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(n+3)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(2) /*,
|
||||
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(2)*/ {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte5 .GVSolicitudTimbreNominaGral tr th:nth-child(3) /*,
|
||||
.reporte5 .ADScroller-body .GVSolicitudTimbreNominaGral tr:nth-child(2) td:nth-child(3)*/ {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr td:nth-child(n+4),
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+4):not(:nth-child(n+7)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte6 .GVSolicitudTimbreNominaGral tr th:nth-child(n+7):not(:nth-child(n+10)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr td:nth-child(n+3),
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+3):not(:nth-child(n+6)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte7 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr td:nth-child(n+6),
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+6):not(:nth-child(n+9)) {
|
||||
background-color: #900;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
.reporte8 .GVSolicitudTimbreNominaGral tr th:nth-child(n+9):not(:nth-child(n+12)) {
|
||||
background-color: #3598dc;
|
||||
color: #FFF;
|
||||
}
|
||||
|
||||
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(1),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(4) {
|
||||
white-space: nowrap;
|
||||
}
|
||||
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(2),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(3),
|
||||
.reporte9 .GVSolicitudTimbreNominaGral tr td:nth-child(n+40) {
|
||||
text-align: right !important;
|
||||
}
|
||||
|
||||
|
||||
/* .ajax_tab_xp .ajax_tab_body {
|
||||
font-size: 9px !important;
|
||||
}
|
||||
*/
|
||||
.ajax__tab_xp .ajax__tab_body {
|
||||
font-size: 12px !important;
|
||||
}
|
||||
}*/
|
||||
|
||||
</style>
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content3" ContentPlaceHolderID="E" runat="Server">
|
||||
@@ -327,57 +156,72 @@
|
||||
<asp:Label ID="LblMes" runat="server" Text='<%# Eval("Mes")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VSubTotal", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VDescuento", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right" Visible="false" HeaderStyle-CssClass="colSIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VIEPS", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right" Visible="false" HeaderStyle-CssClass="colSIG" >
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VRetIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right" Visible="false" HeaderStyle-CssClass="colSIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("VRetISR", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL SIG" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="TOTAL SIG" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSIG">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblVTotal" runat="server" Text='<%# Eval("VTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="SubTotal" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTSubTotal", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Descuento" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTDescuento", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IVA" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="IEPS" ItemStyle-HorizontalAlign="Right" Visible="false" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTIEPS", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Ret IVA" ItemStyle-HorizontalAlign="Right" Visible="false" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTRetIVA", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="Ret ISR" ItemStyle-HorizontalAlign="Right" Visible="false" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label runat="server" Text='<%# Eval("CBTRetISR", "{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
</asp:TemplateField>
|
||||
<asp:TemplateField HeaderText="TOTAL SAT" ItemStyle-HorizontalAlign="Right">
|
||||
<asp:TemplateField HeaderText="TOTAL SAT" ItemStyle-HorizontalAlign="Right" HeaderStyle-CssClass="colSAT">
|
||||
<ItemTemplate>
|
||||
<asp:Label ID="LblCBTTotal" runat="server" Text='<%# Eval("CBTTotal","{0:N2}")%>'></asp:Label>
|
||||
</ItemTemplate>
|
||||
|
||||
@@ -7,7 +7,6 @@ using System.Net.Http.Headers;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using Extensiones;
|
||||
@@ -119,7 +118,12 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
GvResumen.DataSource = ObjNom.DtResultados;
|
||||
TipoDescarga = ObjNom.DtResultados.Rows.Count > 0 ? 1 : 0;
|
||||
LnkDownloadExcel.Visible = true;
|
||||
LnkDownloadExcel.Visible = true;
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) == "1")
|
||||
{
|
||||
GvResumen.Columns[4].Visible = false;
|
||||
GvResumen.Columns[11].Visible = false;
|
||||
}
|
||||
}
|
||||
else if (DdlReporte.SelectedValue.ToEntero() == 2)
|
||||
{
|
||||
@@ -400,57 +404,7 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
{
|
||||
if (e.Row.DataKey("Fecha") == "")
|
||||
e.Row.Attributes.Add("class", "Totales");
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[2].Visible = false;
|
||||
}
|
||||
|
||||
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[7].Visible = false;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
if (e.Row.RowType == DataControlRowType.Header)
|
||||
{
|
||||
e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
e.Row.Cells[3].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[2].Visible = false;
|
||||
}
|
||||
|
||||
e.Row.Cells[4].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
e.Row.Cells[5].BackColor = System.Drawing.Color.FromName("#3598dc");
|
||||
|
||||
e.Row.Cells[6].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
e.Row.Cells[7].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
e.Row.Cells[8].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
if (UsuarioActual.Empresa.Funcionalidad(713) != "1")
|
||||
{
|
||||
e.Row.Cells[7].Visible = false;
|
||||
}
|
||||
|
||||
e.Row.Cells[9].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
e.Row.Cells[10].BackColor = System.Drawing.Color.FromName("#C46B06");
|
||||
|
||||
|
||||
e.Row.Cells[1].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[2].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[3].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[4].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[5].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[6].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[7].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[8].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[9].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[10].ForeColor = System.Drawing.Color.FromName("white");
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected void GvDatos_RowDataBound(object sender, GridViewRowEventArgs e)
|
||||
@@ -534,17 +488,17 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
if (e.Row.RowType == DataControlRowType.Header)
|
||||
{
|
||||
|
||||
e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[1].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[2].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
|
||||
e.Row.Cells[3].BackColor = System.Drawing.Color.FromName("#3598dc"); //Rojo
|
||||
e.Row.Cells[4].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[5].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[6].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[7].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[8].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[9].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
e.Row.Cells[10].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[3].BackColor = System.Drawing.Color.FromName("#3598dc"); //Rojo
|
||||
//e.Row.Cells[4].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[5].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[6].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[7].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[8].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[9].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
//e.Row.Cells[10].BackColor = System.Drawing.Color.FromName("#3598dc"); //Azul
|
||||
|
||||
|
||||
|
||||
@@ -556,33 +510,33 @@ public partial class SAT_SolicitudesIngresoSat : ClsPaginas
|
||||
//e.Row.Cells[16].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
//e.Row.Cells[17].BackColor = System.Drawing.Color.FromName("#900"); //Rojo
|
||||
|
||||
e.Row.Cells[11].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[12].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[13].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[14].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[15].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[16].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
e.Row.Cells[17].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[11].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[12].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[13].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[14].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[15].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[16].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
//e.Row.Cells[17].BackColor = System.Drawing.Color.FromName("#C46B06"); //Rojo
|
||||
|
||||
|
||||
e.Row.Cells[1].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[2].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[1].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[2].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
e.Row.Cells[3].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[4].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[5].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[6].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[7].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[8].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[9].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[10].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[11].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[12].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[13].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[14].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[15].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[16].ForeColor = System.Drawing.Color.FromName("white");
|
||||
e.Row.Cells[17].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[3].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[4].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[5].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[6].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[7].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[8].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[9].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[10].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[11].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[12].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[13].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[14].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[15].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[16].ForeColor = System.Drawing.Color.FromName("white");
|
||||
//e.Row.Cells[17].ForeColor = System.Drawing.Color.FromName("white");
|
||||
|
||||
}
|
||||
|
||||
|
||||
@@ -85,7 +85,7 @@ function FiltrarTabla(idtxt, idtable, idcontador) {
|
||||
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible:not(.ADtr)').length);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -97,7 +97,7 @@ function FiltrarTablaStr(str, idtable, idcontador) {
|
||||
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible:not(.hidetrad):not(.ADtr)').length);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -115,7 +115,7 @@ function FiltrarTablaStrMulti(idtable, idcontador /*, str1, str2, str3...*/ ) {
|
||||
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
if (idcontador) {
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible').length);
|
||||
$('#' + idcontador).html($('#' + idtable + ' tr:visible:not(.hidetrad):not(.ADtr)').length);
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -130,7 +130,7 @@ function FiltrarTablaClass(idtxt, idtable, idcontador, resta) {
|
||||
$('div.ADScroller .ADScroller-header table#' + idtable + ' tr:not(.ADtr)').removeClass('hidetrad');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
let numconta = $('#' + idtable + ' tr:not(.hidetrad):not(.ADtr)').length;
|
||||
let numconta = $('#' + idtable + ' tr:visible:not(.hidetrad):not(.ADtr)').length;
|
||||
if (numconta > 0) { numconta - resta}
|
||||
$('#' + idcontador).html(numconta );
|
||||
}
|
||||
@@ -144,7 +144,7 @@ function FiltrarTablaV2(idtxt, idtable, idcontador) {
|
||||
$('div.ADScroller .ADScroller-header ' + idtable + ' tr:not(.ADtr)').css('display', '');
|
||||
}
|
||||
if ($('#' + idcontador).length > 0) {
|
||||
$('#' + idcontador).html($(idtable + ' tr:visible').length);
|
||||
$('#' + idcontador).html($(idtable + ' tr:visible:not(.hidetrad):not(.ADtr)').length);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -861,7 +861,7 @@ Partial Class Sistemas_UsuarioDetalle
|
||||
End If
|
||||
|
||||
For Each Row As DataRow In DtAsignacionesMultiEmpresa.FiltraParametros("CveEmpresa > 0").Rows
|
||||
If Not ObjUsuarios.AddUsuarioAsignar(Row("CvePersonal").ToString.ToEntero, Row("CveVendedor").ToString.ToEntero, Row("CveAlmacen").ToString.ToEntero, Row("CveSucursal").ToString.ToEntero, Row("CveTipoDocumento").ToString, Row("CveEmpresa").ToString.ToEntero, CveUsuario) Then
|
||||
If Not ObjUsuarios.AddUsuarioAsignar(Row("CvePersonal").ToString.ToEntero, Row("CveVendedor").ToString.ToEntero, Row("CveSucursal").ToString.ToEntero, Row("CveAlmacen").ToString.ToEntero, Row("CveTipoDocumento").ToString, Row("CveEmpresa").ToString.ToEntero, CveUsuario) Then
|
||||
TieneError = True
|
||||
End If
|
||||
Next
|
||||
|
||||
197
UserControl/AddMedico.ascx
Normal file
197
UserControl/AddMedico.ascx
Normal file
@@ -0,0 +1,197 @@
|
||||
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddMedico.ascx.vb" Inherits="UserControl_AddMedico" %>
|
||||
|
||||
<div id="DVAgregarMedico" style="margin-top:-30px!important">
|
||||
<div class="modal-dialog" style="min-width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Médico</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtMedico" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RfvTxtMedico" runat="server" ControlToValidate="TxtMedico" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Medico''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtMedico.ClientID.ToString()%>">Médico:</label>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCedulaProfecional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<%--<asp:RequiredFieldValidator ID="RfvTxtCedulaProfecional" runat="server" ControlToValidate="TxtCedulaProfecional" CssClass="help-block errorimput"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Cédula Profecional''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarRegistro"></asp:RequiredFieldValidator>--%>
|
||||
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright date date-picker date date-picker" style="min-width: 135px; margin-top: -10px !important;">
|
||||
<label for="<%= TxtFechaNacimiento.ClientID.ToString()%>" style="color: #888888;">Fecha de Nacimiento: </label>
|
||||
|
||||
<div class="input-group input-sm input-small date date-picker " data-date-format="dd/mm/yyyy" style="width: 120px !important; padding: 0px; margin-top: -5px !important;">
|
||||
<asp:TextBox ID="TxtFechaNacimiento" CssClass="form-control" MaxLength="20" runat="server" Width="100px" Height="28px"></asp:TextBox>
|
||||
<span class="input-group-btn ">
|
||||
<asp:LinkButton ID="LnkFechaNacimiento" class="btn default" Text="<i class='fa fa-calendar'></i>" runat="server"></asp:LinkButton>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<ajax:MaskedEditExtender ID="MEEFechaNacimiento" runat="server" TargetControlID="TxtFechaNacimiento" Mask="99/99/9999" MaskType="Date" DisplayMoney="Left" AcceptNegative="Left"></ajax:MaskedEditExtender>
|
||||
<ajax:CalendarExtender runat="server" ID="CalendarExtender1" TargetControlID="TxtFechaNacimiento" PopupButtonID="LnkFechaNacimiento" PopupPosition="BottomRight" Enabled="True"></ajax:CalendarExtender>
|
||||
<asp:RequiredFieldValidator ID="rfvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> es requerido por la aplicación, por favor ingrese una fecha." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||
<asp:CompareValidator ID="cvFechaNacimiento" runat="server" ControlToValidate="TxtFechaNacimiento" Display="None" ErrorMessage="El campo <b>''Fecha de Nacimiento''</b> no tienes el formato correcto, por favor intente de nuevo con el siguiente formato: (dd/mm/yyyy)." Operator="DataTypeCheck" Type="Date" ValidationGroup="GrpGuardarMedico"></asp:CompareValidator>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender3" runat="server" HighlightCssClass="vco" TargetControlID="rfvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<ajax:ValidatorCalloutExtender ID="ValidatorCalloutExtender4" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaNacimiento" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br />
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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>
|
||||
<div class="col-md-6">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtCelular" CssClass="form-control " runat="server" MaxLength="10" CausesValidation="true"></asp:TextBox>
|
||||
<ajax:MaskedEditExtender ID="MaskedEditExtender1" runat="server" TargetControlID="TxtCelular" ClearMaskOnLostFocus="false" MaskType="Number" Mask="(999) 999-9999" MessageValidatorTip="true" InputDirection="LeftToRight" ErrorTooltipEnabled="True"></ajax:MaskedEditExtender>
|
||||
<label for="<%= TxtCelular.ClientID.ToString()%>">Celular:</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<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="GrpGuardarMedico"></asp:RegularExpressionValidator>
|
||||
<label for="<%= TxtMail.ClientID.ToString()%>">Correo:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlEspecialidad" CssClass="form-control select2me" runat="server" DataTextField="Especialidad" Width="100%" DataValueField="CveMedicoEspecialidad" AutoPostBack="true" OnSelectedIndexChanged="DdlEspecialidad_SelectedIndexChanged"></asp:DropDownList>
|
||||
<label for="<%= DdlEspecialidad.ClientID.ToString()%>">Especialidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:DropDownList ID="DdlSubEspecialidad" CssClass="form-control select2me" runat="server" DataTextField="SubEspecialidad" Width="100%" DataValueField="CveMedicoSubEspecialidad"></asp:DropDownList>
|
||||
<label for="<%= DdlEspecialidad.ClientID.ToString()%>">Sub Especialidad:</label>
|
||||
</div>
|
||||
</div>
|
||||
</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>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtDiasAtencion" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtDiasAtencion.ClientID.ToString()%>">Días de Atención:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtHorario" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtHorario.ClientID.ToString()%>">Horario:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtLugar" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtLugar.ClientID.ToString()%>">Hospital:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtConsultorio" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtConsultorio.ClientID.ToString()%>">Consultorio:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-3">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtTorre" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||
<label for="<%= TxtTorre.ClientID.ToString()%>">Torre:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
<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 class="row" runat="server" id="DVUsuarioFechaIng" visible ="false">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtUsuario" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtUsuario.ClientID.ToString()%>">Usuario:</label>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="form-group form-md-line-input input-iconright" >
|
||||
<asp:TextBox ID="TxtFechaIng" CssClass="form-control " runat="server" MaxLength="250" CausesValidation="true" Enabled="false"></asp:TextBox>
|
||||
<label for="<%= TxtFechaIng.ClientID.ToString()%>">Fecha Ing.:</label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarMedico" />
|
||||
<button id="BtnCancelarMedico" runat="server" type="button" class="btn default" data-dismiss="modal" ClientIDMode="Static" >Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
187
UserControl/AddMedico.ascx.vb
Normal file
187
UserControl/AddMedico.ascx.vb
Normal file
@@ -0,0 +1,187 @@
|
||||
Imports Extensiones
|
||||
|
||||
Partial Class UserControl_AddMedico
|
||||
Inherits System.Web.UI.UserControl
|
||||
|
||||
Public ReadOnly Property UsuarioActual As Usuario
|
||||
Get
|
||||
If Context.Session("UsuarioSIG") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return DirectCast(Context.Session("UsuarioSIG"), Usuario)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property CveMedico As Integer
|
||||
Get
|
||||
If ViewState("CveMedico") Is Nothing Then
|
||||
ViewState("CveMedico") = -1
|
||||
End If
|
||||
Return ViewState("CveMedico").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveMedico") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Private Sub UserControl_AddMedico_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
CargaEspecialidad()
|
||||
CargaSubEspecialidad(-1)
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Sub CargaEspecialidad()
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
DdlEspecialidad.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
DdlEspecialidad.DataBind()
|
||||
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
Sub CargaSubEspecialidad(CveMedicoEspecialidad As Integer)
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosSubEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
If CveMedicoEspecialidad > 0 Then
|
||||
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados.FiltraParametros($"CveMedicoEspecialidad = {CveMedicoEspecialidad}")
|
||||
Else
|
||||
DdlSubEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
DdlSubEspecialidad.DataBind()
|
||||
DdlSubEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
UpModal.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub DdlEspecialidad_SelectedIndexChanged(sender As Object, e As EventArgs)
|
||||
CargaSubEspecialidad(DdlEspecialidad.SelectedValue.ToEntero)
|
||||
End Sub
|
||||
|
||||
|
||||
Public Sub LimpiarControles()
|
||||
LbAgregar.Text = "Agregar"
|
||||
LtlTituloModal.Text = "Agregar Médico"
|
||||
|
||||
TxtMedico.Text = ""
|
||||
TxtCedulaProfecional.Text = ""
|
||||
TxtFechaNacimiento.Text = ""
|
||||
TxtNotas.Text = ""
|
||||
TxtDiasAtencion.Text = ""
|
||||
TxtHorario.Text = ""
|
||||
TxtLugar.Text = ""
|
||||
TxtConsultorio.Text = ""
|
||||
TxtMail.Text = ""
|
||||
TxtTelefono.Text = ""
|
||||
TxtCelular.Text = ""
|
||||
DdlEspecialidad.SelectedValueExist(-1)
|
||||
DdlSubEspecialidad.SelectedValueExist(-1)
|
||||
TxtTorre.Text = ""
|
||||
DVUsuarioFechaIng.Visible = False
|
||||
TxtFechaIng.Text = ""
|
||||
TxtUsuario.Text = ""
|
||||
|
||||
|
||||
DVEstatus.Visible = False
|
||||
ChkEstatus.Checked = True
|
||||
|
||||
UpModal.Update()
|
||||
CveMedico = -1
|
||||
End Sub
|
||||
|
||||
Public Sub PreparaEdicion(CveMedicoEditar As Integer, Medico As String, CedulaProfecional As String, FechaNacimiento As Date, Notas As String, DiasAtencion As String, Horario As String, Lugar As String, Consultorio As String, Estatus As Boolean,
|
||||
Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, Torre As String, FechaIng As DateTime, Usuario As String)
|
||||
|
||||
|
||||
|
||||
CveMedico = CveMedicoEditar
|
||||
|
||||
TxtMedico.Text = Medico
|
||||
TxtCedulaProfecional.Text = CedulaProfecional
|
||||
TxtFechaNacimiento.Text = FechaNacimiento.ToString("dd/MM/yyyy")
|
||||
TxtNotas.Text = Notas
|
||||
TxtDiasAtencion.Text = DiasAtencion
|
||||
TxtHorario.Text = Horario
|
||||
TxtLugar.Text = Lugar
|
||||
TxtConsultorio.Text = Consultorio
|
||||
ChkEstatus.Checked = Estatus
|
||||
TxtMail.Text = Mail
|
||||
TxtTelefono.Text = Telefono
|
||||
TxtCelular.Text = Celular
|
||||
DdlEspecialidad.SelectedValueExist(CveMedicoEspecialidad)
|
||||
CargaSubEspecialidad(CveMedicoEspecialidad)
|
||||
DdlSubEspecialidad.SelectedValueExist(CveMedicoSubEspecialidad)
|
||||
TxtTorre.Text = Torre
|
||||
|
||||
DVUsuarioFechaIng.Visible = True
|
||||
TxtFechaIng.Text = FechaIng.ToString("dd/MM/yyyy hh:mm:ss tt")
|
||||
TxtUsuario.Text = Usuario
|
||||
|
||||
DVEstatus.Visible = True
|
||||
LbAgregar.Text = "Actualizar"
|
||||
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
|
||||
|
||||
UpModal.Update()
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim CveMedicoNuevo As Integer = -1
|
||||
|
||||
|
||||
Dim Telefono As String = If(TxtTelefono.Text = "(___) ___-____", "", TxtTelefono.Text)
|
||||
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.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, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
|
||||
CveMedicoNuevo = 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, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim)
|
||||
|
||||
If CveMedicoNuevo > 0 Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
ClsPaginas.Alert($"Medico {If(CveMedico > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
Dim AppNombre As String = $"GlobalDTAgentes-{UsuarioActual.CveEmpresa}"
|
||||
Application(AppNombre) = Nothing
|
||||
RegistraScript($"fncRegargaMedicos({CveMedicoNuevo});")
|
||||
RegistraScript("$('#BtnCancelarMedico').click();")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
42
UserControl/AddProcedimiento.ascx
Normal file
42
UserControl/AddProcedimiento.ascx
Normal file
@@ -0,0 +1,42 @@
|
||||
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddProcedimiento.ascx.vb" Inherits="UserControl_AddProcedimiento" %>
|
||||
|
||||
<div id="DVAgregarProcedimiento" style="margin-top:-30px!important">
|
||||
<div class="modal-dialog" style="min-width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
<button type="button" class="close" data-dismiss="modal">×</button>
|
||||
<h4 class="modal-title">
|
||||
<asp:Literal ID="LtlTituloModal" runat="server">Agregar Procedimiento</asp:Literal></h4>
|
||||
</div>
|
||||
<div class="modal-body">
|
||||
|
||||
<div class="form-group form-md-line-input input-iconright">
|
||||
<asp:TextBox ID="TxtProcedimiento" CssClass="form-control" runat="server" MaxLength="150"></asp:TextBox>
|
||||
<asp:RequiredFieldValidator ID="RFVRol" runat="server" ControlToValidate="TxtProcedimiento" Display="None"
|
||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>'Nombre del Procedimiento''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarProcedimiento"></asp:RequiredFieldValidator>
|
||||
<label for="<%= TxtProcedimiento.ClientID.ToString()%>">Nombre Procedimiento:</label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="Div1" runat="server">
|
||||
<label for="<%= ChkEstatus.ClientID.ToString()%>">Activo:</label>
|
||||
<asp:CheckBox ID="ChkEstatus" runat="server" CssClass="form-control make-switchsd" data-size="small"></asp:CheckBox>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="LblFechaAlta" runat="server" visible="false">
|
||||
<label for="<%= LblFecha.ClientID.ToString()%>">Fecha:</label>
|
||||
<asp:Label ID="LblFecha" runat="server"></asp:Label>
|
||||
</div>
|
||||
<div class="form-group form-md-line-input input-iconright" id="LblUsuarioAlta" runat="server" visible="false" >
|
||||
<label for="<%= LblUsuario.ClientID.ToString()%>">Usuario:</label>
|
||||
<asp:Label ID="LblUsuario" runat="server"></asp:Label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<asp:Button ID="LbAgregar" runat="server" class="btn btn-success" Text="Agregar" ValidationGroup="GrpGuardarProcedimiento" />
|
||||
<button id="BtnCancelarProcedimiento" runat="server" type="button" class="btn default" data-dismiss="modal" ClientIDMode="Static" >Cancelar</button>
|
||||
</div>
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
</div>
|
||||
81
UserControl/AddProcedimiento.ascx.vb
Normal file
81
UserControl/AddProcedimiento.ascx.vb
Normal file
@@ -0,0 +1,81 @@
|
||||
Imports Extensiones
|
||||
Partial Class UserControl_AddProcedimiento
|
||||
Inherits System.Web.UI.UserControl
|
||||
|
||||
Public ReadOnly Property UsuarioActual As Usuario
|
||||
Get
|
||||
If Context.Session("UsuarioSIG") Is Nothing Then
|
||||
Return Nothing
|
||||
Else
|
||||
Return DirectCast(Context.Session("UsuarioSIG"), Usuario)
|
||||
End If
|
||||
End Get
|
||||
End Property
|
||||
|
||||
Public Property CveProcedimiento As Integer
|
||||
Get
|
||||
If ViewState("CveProcedimiento") Is Nothing Then
|
||||
ViewState("CveProcedimiento") = -1
|
||||
End If
|
||||
Return ViewState("CveProcedimiento").ToString.ToEntero
|
||||
End Get
|
||||
Set(value As Integer)
|
||||
ViewState("CveProcedimiento") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
|
||||
|
||||
Private Sub UserControl_AddProcedimiento_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
Dim CveProcedimientoNuevo As Integer = -1
|
||||
|
||||
If CveProcedimiento > 0 Then
|
||||
If ObjVentas.UpdateProcedimiento(CveProcedimiento, TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||
'Alert($"Procedimiento Actualizado Correctamente.")
|
||||
ProcesoOK = True
|
||||
End If
|
||||
Else
|
||||
|
||||
CveProcedimientoNuevo = ObjVentas.AddProcedimiento(TxtProcedimiento.Text.Trim, ChkEstatus.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||
If CveProcedimientoNuevo > 0 Then
|
||||
ProcesoOK = True
|
||||
'TabProductos.Visible = True
|
||||
'TabVentas.Visible = True
|
||||
'LnkAgregarProducto.Visible = True
|
||||
'UpDatos.Update()
|
||||
'Alert($"Procedimiento Guardado Correctamente.")
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
If ProcesoOK Then
|
||||
ClsPaginas.Alert($"Procedimiento {If(CveProcedimiento > 0, "Actualizado", "Guardado")} Correctamente.")
|
||||
Dim AppNombre As String = $"GlobalDTProcedimientos-{UsuarioActual.CveEmpresa}"
|
||||
Application(AppNombre) = Nothing
|
||||
RegistraScript($"fncRegargaProcedimientos({CveProcedimientoNuevo});")
|
||||
RegistraScript("$('#BtnCancelarProcedimiento').click();")
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Public Sub LimpiarControles()
|
||||
TxtProcedimiento.Text = ""
|
||||
ChkEstatus.Checked = True
|
||||
UpModal.Update()
|
||||
End Sub
|
||||
|
||||
End Class
|
||||
@@ -312,7 +312,7 @@
|
||||
</ajax:TabPanel>
|
||||
|
||||
|
||||
<ajax:TabPanel ID="TabEspeciliadad" runat="server" HeaderText="Especialidades" ClientIDMode="Static" Visible="false">
|
||||
<%-- <ajax:TabPanel ID="TabEspeciliadad" runat="server" HeaderText="Especialidades" ClientIDMode="Static" Visible="false">
|
||||
<ContentTemplate>
|
||||
|
||||
<asp:UpdatePanel ID="UpEspecialidad" runat="server" UpdateMode="Conditional">
|
||||
@@ -372,7 +372,7 @@
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</ContentTemplate>
|
||||
</ajax:TabPanel>
|
||||
</ajax:TabPanel>--%>
|
||||
|
||||
</ajax:TabContainer>
|
||||
</ContentTemplate>
|
||||
@@ -383,7 +383,7 @@
|
||||
|
||||
|
||||
<div id="DVAgregarMedico" class="modal ADS fade" role="dialog">
|
||||
<div class="modal-dialog" style="width: 450px;">
|
||||
<div class="modal-dialog" style="min-width: 450px;">
|
||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpModal" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-header ">
|
||||
|
||||
@@ -35,16 +35,40 @@ Partial Class Ventas_CatMedicos
|
||||
|
||||
|
||||
|
||||
|
||||
Public Property EsFrame As Boolean
|
||||
Get
|
||||
If ViewState("EsFrame") Is Nothing Then
|
||||
ViewState("EsFrame") = False
|
||||
End If
|
||||
Return Boolean.Parse(ViewState("EsFrame").ToString)
|
||||
End Get
|
||||
Set(value As Boolean)
|
||||
ViewState("EsFrame") = value
|
||||
End Set
|
||||
End Property
|
||||
|
||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||
|
||||
If Not Page.IsPostBack Then
|
||||
|
||||
If Request("EsFrame") IsNot Nothing AndAlso Request("EsFrame").ToEntero = 1 Then
|
||||
EsFrame = True
|
||||
End If
|
||||
|
||||
CargaCombos()
|
||||
CargaDatos()
|
||||
CargaEspecialidad()
|
||||
CargaSubEspecialidad(-1)
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
|
||||
If EsFrame Then
|
||||
LnkAgregarMedico_Click(Nothing, Nothing)
|
||||
Else
|
||||
CargaDatos()
|
||||
BtnConsultar_Click(Nothing, Nothing)
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -72,6 +96,7 @@ Partial Class Ventas_CatMedicos
|
||||
End Sub
|
||||
|
||||
Protected Sub LbAgregar_Click(sender As Object, e As System.EventArgs) Handles LbAgregar.Click
|
||||
|
||||
Dim ProcesoOK = False
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
@@ -86,7 +111,7 @@ Partial Class Ventas_CatMedicos
|
||||
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, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) Then
|
||||
UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, TxtConsultorio.Text.Trim, DdlSubEspecialidad.SelectedValue.ToEntero, TxtTorre.Text.Trim) > 0 Then
|
||||
ProcesoOK = True
|
||||
End If
|
||||
End If
|
||||
@@ -102,6 +127,8 @@ Partial Class Ventas_CatMedicos
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
#Region "G V D A T O S"
|
||||
@@ -284,12 +311,12 @@ Partial Class Ventas_CatMedicos
|
||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
GvDatos.Columns(10).Visible = True
|
||||
ElseIf Tabs.ActiveTabIndex = 2 Then
|
||||
GvEspecialidad.Columns(4).Visible = False
|
||||
Dim SbFiltros As New StringBuilder()
|
||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
GvEspecialidad.ExportToExcelGembox("CatEspecialidades", UsuarioActual, "Catálogo de Especialidades", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
GvEspecialidad.Columns(4).Visible = True
|
||||
'ElseIf Tabs.ActiveTabIndex = 2 Then
|
||||
' GvEspecialidad.Columns(4).Visible = False
|
||||
' Dim SbFiltros As New StringBuilder()
|
||||
' SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||
' GvEspecialidad.ExportToExcelGembox("CatEspecialidades", UsuarioActual, "Catálogo de Especialidades", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||
'GvEspecialidad.Columns(4).Visible = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -392,21 +419,21 @@ Partial Class Ventas_CatMedicos
|
||||
Dim ObjVentas As New ClsVentas
|
||||
|
||||
If ObjVentas.GetMedicosEspecialidades(-1, UsuarioActual.CveEmpresa, -1) Then
|
||||
GvEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
'GvEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
DdlEspecialidad.DataSource = ObjVentas.DtResultados
|
||||
Else
|
||||
GvEspecialidad.DataSource = Nothing
|
||||
'GvEspecialidad.DataSource = Nothing
|
||||
End If
|
||||
|
||||
ObjVentas.Dispose()
|
||||
|
||||
GvEspecialidad.DataBind()
|
||||
'GvEspecialidad.DataBind()
|
||||
|
||||
DdlEspecialidad.DataBind()
|
||||
DdlEspecialidad.Items.Insert(0, New ListItem("Seleccione uno", "-1"))
|
||||
|
||||
UpModal.Update()
|
||||
UpEspecialidad.Update()
|
||||
'UpEspecialidad.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
|
||||
@@ -294,7 +294,7 @@
|
||||
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||
DataKeyNames="CveVenta,TipoDocto,Saldo,DescripcionVenta">
|
||||
<Columns>
|
||||
<asp:BoundField HeaderText="Descripcion" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Descripción" DataField="DescripcionVenta" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" ItemStyle-HorizontalAlign="Center" />
|
||||
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||
|
||||
@@ -322,7 +322,8 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
ClsContabilidad ObjConta = new ClsContabilidad();
|
||||
ObjConta.IniciaTransacSQL();
|
||||
int CvePrePoliza = 0, CveVenta = -1, CveIE = -1;
|
||||
decimal Saldo = 0;
|
||||
decimal Saldo = 0;
|
||||
decimal SaldoAdmin = 0;
|
||||
decimal ImporteTotalGasto = 0;
|
||||
string MsgError = "";
|
||||
|
||||
@@ -349,16 +350,18 @@ public partial class Ventas_RepAnticipo_NC_IXCDetalle : ClsPaginas
|
||||
{
|
||||
CveVenta = Gv.DataKey("CveVenta").ToEntero();
|
||||
Saldo = -Gv.DataKey("Saldo").ToDecimal();
|
||||
SaldoAdmin = Saldo;
|
||||
}
|
||||
else if (Tipo == 3)
|
||||
{
|
||||
ConPreP.CveConcepto = 92;
|
||||
CveIE = Gv.DataKey("CveIE").ToEntero();
|
||||
Saldo = Gv.DataKey("Saldo").ToDecimal();
|
||||
Saldo = -Gv.DataKey("Saldo").ToDecimal();
|
||||
SaldoAdmin = -Saldo;
|
||||
}
|
||||
|
||||
ImporteTotalGasto += Saldo;
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, Saldo, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE: CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero()))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, tMovto, SaldoAdmin, Saldo, ConPreP.CveConcepto, Gv.DataKey("SerieFolio").ToString(), TxtConcepto.Text, CveIE: CveIE, CveVenta, CveCliente: Gv.DataKey("CveCliente").ToEntero()))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
break;
|
||||
|
||||
@@ -54,12 +54,9 @@ public partial class Ventas_RepComisionesJAM : ClsPaginas
|
||||
DdlVendedor.Items.Insert(0, new ListItem("Todos", "-1"));
|
||||
DdlVendedor.DataBind();
|
||||
|
||||
if( UsuarioActual.CveVendedor > 0 && !UsuarioActual.TienePermisoProceso(263))
|
||||
{
|
||||
|
||||
if( UsuarioActual.CveVendedor > 0 && !UsuarioActual.TienePermisoProceso(263))
|
||||
{
|
||||
|
||||
DdlVendedor.Enabled = false;
|
||||
DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString());
|
||||
DdlVendedor.Attributes.Add("disabled", "disabled");
|
||||
DdlVendedor.Enabled = false;
|
||||
|
||||
@@ -207,7 +207,7 @@ public partial class Ventas_RepNCxAplicar : ClsPaginas
|
||||
}
|
||||
}
|
||||
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Saldo").ToDecimal() * Gv.DataKey("TipoCambioValuacion").ToDecimal(), 78, Gv.DataKey("Folio").ToString(), TxtConcepto.Text, CveVenta: Gv.DataKey("CveVenta").ToEntero() ))
|
||||
if (!ObjConta.AddPrePolizasDetalle(CvePrePoliza, true, Gv.DataKey("Saldo").ToDecimal(), Gv.DataKey("Saldo").ToDecimal() * Gv.DataKey("TipoCambioValuacion").ToDecimal(), 78, Gv.DataKey("Folio").ToString(), TxtConcepto.Text, CveVenta: Gv.DataKey("CveVenta").ToEntero() ))
|
||||
{
|
||||
MsgError = "Ocurrio un error al saldar el movimiento";
|
||||
}
|
||||
|
||||
@@ -222,8 +222,8 @@
|
||||
CssClass="table table-striped table-advance table-hover Widthall ScrollAD"
|
||||
data-sort="true" GridLines="None">
|
||||
<Columns>
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="100px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:HyperLinkField HeaderText="Folio" ItemStyle-Width="100px" DataTextField ="Folio" DataNavigateUrlFormatString="/Ventas/RepRemisionesDetalle.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" Target="_blank" />
|
||||
<asp:HyperLinkField HeaderText="Fecha" ItemStyle-Width="100px" DataTextField ="Fecha" DataTextFormatString="{0:d}" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataNavigateUrlFields="CveVenta" />
|
||||
<asp:BoundField HeaderText="Vencimiento" DataField="FechaVencimiento" DataFormatString="{0:d}" />
|
||||
<asp:BoundField HeaderText="Cliente" DataField="Cliente" />
|
||||
<asp:BoundField HeaderText="Contrato" DataField="TieneContrato" Visible="false" />
|
||||
|
||||
@@ -1,6 +1,10 @@
|
||||
<%@ Page Title="Ventas - Facturación" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="Ventas.aspx.vb" Inherits="Ventas" EnableEventValidation="false" %>
|
||||
|
||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="cc1" %>
|
||||
<%@ Register Src="~/UserControl/AddMedico.ascx" TagPrefix="UserControl" TagName="AddMedico" %>
|
||||
<%@ Register Src="~/UserControl/AddProcedimiento.ascx" TagPrefix="UserControl" TagName="AddProcedimiento" %>
|
||||
|
||||
|
||||
<%--Necesario para el modal que no se cierra--%>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="CP" runat="Server">
|
||||
@@ -603,6 +607,20 @@
|
||||
<asp:TextBox ID="TxtFechaOS" type="datetime-local" runat="server" CssClass="make-switchsd" CausesValidation="true" Style="width: 130px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr runat="server" id="TrVentasMedicas3" visible="false">
|
||||
<td runat="server" id="Td6" visible="true">
|
||||
<b>Paciente:</b>
|
||||
</td>
|
||||
<td runat="server">
|
||||
<asp:TextBox ID="TxtPaciente" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="50"></asp:TextBox>
|
||||
</td>
|
||||
<td runat="server" id="Td9" visible="true">
|
||||
<b>Episodio:</b>
|
||||
</td>
|
||||
<td runat="server">
|
||||
<asp:TextBox ID="TxtEpisodio" runat="server" CssClass="make-switchsd" Style="width: 130px" MaxLength="20"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
@@ -2402,7 +2420,7 @@
|
||||
</div>
|
||||
|
||||
<div class="tools">
|
||||
Emitir:
|
||||
Emitir
|
||||
<asp:CheckBox ID="ChkEmitirCartaPorte" runat="server" CssClass="chksino" Text=" " OnCheckedChanged="ChkEmitirCartaPorte_CheckedChanged" AutoPostBack="true" />
|
||||
<a href="javascript:;" class="collapse"></a>
|
||||
</div>
|
||||
@@ -2665,7 +2683,7 @@
|
||||
Convertir a unidad Aduana
|
||||
<asp:TextBox ID="TxtComExtConvertir" runat="server" Width="60px"></asp:TextBox><asp:Button ID="BtnComExtConvertirUnidad" runat="server" Text="Convertir" />
|
||||
<asp:GridView ID="GvComercioExterior" runat="server" GridLines="None" CssClass="table table-hover table-striped ScrollAD mysmallbtn" Width="100%" data-sort="true" AutoGenerateColumns="False"
|
||||
EmptyDataText="No hay datos disponibles" DataKeyNames="Cantidad,Codigo,ClaveSATFraccionArancelaria,ClaveSATUnidadAduana" OnRowDataBound="GvComercioExterior_RowDataBound">
|
||||
EmptyDataText="No hay datos disponibles" DataKeyNames="Consec,CvePS,Cantidad,Codigo,ClaveSATFraccionArancelaria,ClaveSATUnidadAduana" OnRowDataBound="GvComercioExterior_RowDataBound">
|
||||
<Columns>
|
||||
<asp:TemplateField HeaderText="Cantidad">
|
||||
<ItemTemplate>
|
||||
@@ -8427,36 +8445,14 @@
|
||||
</div>
|
||||
|
||||
|
||||
<%--Cliente--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalTipoVentaPasoClienteEliminar">
|
||||
<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">Hospital:</asp:Label>
|
||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientesWS" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;" Onselectedindexchange="DdlClientesWS_selectedindexchange"></ADS:Dropdownlost>
|
||||
</div>
|
||||
</div>
|
||||
</div>--%>
|
||||
|
||||
|
||||
<%--Sucursales--%>
|
||||
<%-- <div runat="server" visible="False" id="DvModalClientesucursal">
|
||||
<div class="row">
|
||||
|
||||
<div class="form-group col-md-12 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlSucursalClienteModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="SucursalCliente" DataValueField="CveClienteSucursal">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
</asp:DropDownList>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlSucursalClienteModal">Sucursal:</asp:Label>
|
||||
</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 ">
|
||||
<div class="form-group col-md-5 form-md-line-input input-iconright ">
|
||||
<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>
|
||||
@@ -8465,7 +8461,10 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlMedicoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlMedicoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlMedicoModal">Médico:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group col-md-6 form-md-line-input input-iconright ">
|
||||
<div class="form-group col-md-1 form-md-line-input input-iconright ">
|
||||
<asp:LinkButton runat="server" ID="LnkAddMedicoModal" OnClick="LnkAddMedicoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" style="margin-top:8px!important" ></asp:LinkButton>
|
||||
</div>
|
||||
<div class="form-group col-md-5 form-md-line-input input-iconright ">
|
||||
<asp:DropDownList ID="DdlProcedimientoModal" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento"
|
||||
OnSelectedIndexChanged="DdlProcedimientoModal_SelectedIndexChanged" AutoPostBack="true">
|
||||
<asp:ListItem Value="-1">Seleccione uno</asp:ListItem>
|
||||
@@ -8476,6 +8475,9 @@
|
||||
<ajax:ValidatorCalloutExtender ID="VCRfvDdlProcedimientoModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlProcedimientoModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||
<asp:Label runat="server" Style="width: 90%; color: #888888;" AssociatedControlID="DdlProcedimientoModal">Procedimiento:</asp:Label>
|
||||
</div>
|
||||
<div class="form-group col-md-1 form-md-line-input input-iconright ">
|
||||
<asp:LinkButton runat="server" ID="LnkAddProcedimientoModal" OnClick="LnkAddProcedimientoModal_Click" CssClass="btn btn-default btn-circle btn-sm" Text="<i class='fa fa-plus' style='color:green'></i>" style="margin-top:8px!important"></asp:LinkButton>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
@@ -8531,8 +8533,44 @@
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
<div id="DvModalAddMedico" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
|
||||
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
|
||||
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
|
||||
</div>
|
||||
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
|
||||
<asp:HiddenField ID="HdnCveMedicoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
<div id="DvModalAddProcedimiento" class="modal ADS fade" role="dialog">
|
||||
|
||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddProcedimiento" UpdateMode="Conditional">
|
||||
<ContentTemplate>
|
||||
<div class="modal-content" style="max-width:600px!important;max-height:505px!important">
|
||||
<UserControl:AddProcedimiento runat="server" ID="AddProcedimientoControl" />
|
||||
</div>
|
||||
<asp:Button ID="BtnRecargaProcedimientos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaProcedimientos_Click" />
|
||||
<asp:HiddenField ID="HdnCveProcedimientoNuevo" runat="server" ClientIDMode="Static" Value="-1" />
|
||||
|
||||
</ContentTemplate>
|
||||
</asp:UpdatePanel>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
</asp:Content>
|
||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||
<script src="/Metronic/assets/global/scripts/jquery-sortable.js"></script>
|
||||
@@ -8641,6 +8679,14 @@
|
||||
TotalUSD.innerText = FormatoNumero(ToDouble(ValorUnitario.value) * ToDouble(TxtCantidad.value), 2);
|
||||
}
|
||||
|
||||
function CalculaPU_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
||||
TxtValorUnitario.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtCantidad.value), 6);
|
||||
}
|
||||
|
||||
function CalculaCantidad_USD(TxtValorUnitario, TotalUSD, TxtCantidad) {
|
||||
TxtCantidad.value = FormatoNumero(ToDouble(TotalUSD) / ToDouble(TxtValorUnitario.value), 6);
|
||||
}
|
||||
|
||||
function LimitaCantidadAplicaDev(Cantidad, TxtCantidadAplicaDevolucion) {
|
||||
if (ToDouble(TxtCantidadAplicaDevolucion.value) > Cantidad) {
|
||||
TxtCantidadAplicaDevolucion.value = FormatoNumero(Cantidad, 2)
|
||||
@@ -10445,7 +10491,17 @@
|
||||
}
|
||||
|
||||
|
||||
|
||||
function fncRegargaMedicos(CveNuevoMedico) {
|
||||
|
||||
$("#HdnCveMedicoNuevo").val(CveNuevoMedico)
|
||||
$('#BtnRecargaMedicos').click();
|
||||
}
|
||||
|
||||
function fncRegargaProcedimientos(CveProcedimientoNuevo) {
|
||||
|
||||
$("#HdnCveProcedimientoNuevo").val(CveProcedimientoNuevo)
|
||||
$('#BtnRecargaProcedimientos').click();
|
||||
}
|
||||
|
||||
|
||||
</script>
|
||||
|
||||
@@ -2722,7 +2722,7 @@ Partial Class Ventas
|
||||
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
||||
Using ObjCGame As New ClsCGame()
|
||||
|
||||
If ObjCGame.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") Then
|
||||
If ObjCGame.ManifiestoGet(Request("CveManifiesto").ToEntero(), -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveEmpresa, "-1", "-1") AndAlso ObjCGame.DtResultados.Rows.Count > 0 Then
|
||||
DdlSubProyectoDatos.SelectedValueExist(ObjCGame.DtResultados.Rows(0)("CveSubProyecto").ToString())
|
||||
End If
|
||||
|
||||
@@ -2733,6 +2733,10 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
End Using
|
||||
|
||||
If AplicaComercioExterior Then
|
||||
CargaGvComercioExterior()
|
||||
End If
|
||||
End If
|
||||
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
@@ -5872,13 +5876,21 @@ Partial Class Ventas
|
||||
|
||||
CveTipoVenta = If(DbRowVenta("CveTipoVenta").ToString.ToEntero > 0, DbRowVenta("CveTipoVenta").ToString.ToEntero, -1)
|
||||
|
||||
TrVentasMedicas3.Visible = True
|
||||
|
||||
If DbRowVenta("CveMedico").ToString.ToEntero > 0 AndAlso CveTipoVenta.Contiene(1, 2, 3, 5) Then
|
||||
TrVentasMedicas1.Visible = True
|
||||
|
||||
DdlMedico.SelectedValueExist(DbRowVenta("CveMedico").ToString)
|
||||
DdlProcedimiento.SelectedValueExist(DbRowVenta("CveProcedimiento").ToString)
|
||||
TxtPaciente.Text = DbRowVenta("Paciente").ToString
|
||||
TxtEpisodio.Text = DbRowVenta("Episodio").ToString
|
||||
|
||||
DdlMedico.Enabled = False
|
||||
DdlProcedimiento.Enabled = False
|
||||
TxtPaciente.Enabled = False
|
||||
TxtEpisodio.Enabled = False
|
||||
|
||||
|
||||
If DbRowVenta("FechaParaSurtir").ToString().ToDate() > DateTime.MinValue Then
|
||||
TrVentasMedicas2.Visible = True
|
||||
@@ -8294,6 +8306,7 @@ Partial Class Ventas
|
||||
End Sub
|
||||
Protected Sub GvPS_RowUpdating(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.GridViewUpdateEventArgs) Handles GvPS.RowUpdating
|
||||
'Dim TipoDescuento As Integer
|
||||
|
||||
Dim Cantidad, PU, CantidadInventario As Decimal
|
||||
Dim ObjDescuento As New Modelos.VentaDescuentos
|
||||
Dim CuentaPredial As String
|
||||
@@ -8326,6 +8339,7 @@ Partial Class Ventas
|
||||
End If
|
||||
|
||||
Dim CantidadOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Cantidad").ToDecimal()
|
||||
Dim TotalOriginal As Decimal = GvPS.Rows(e.RowIndex).DataKey("Total").ToDecimal()
|
||||
|
||||
Dim DatarowPS As DataRow = Nothing
|
||||
DatarowPS = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=TmpDT.Rows(e.RowIndex)("CvePS").ToString().ToEntero()).FiltroPrimero("") ' Estado = -1
|
||||
@@ -8631,6 +8645,30 @@ Partial Class Ventas
|
||||
ObjDescuento.Consec = TmpDT.Rows(e.RowIndex)("Consec").ToString().ToEntero()
|
||||
End If
|
||||
|
||||
'RECALCULA LA CANTIDAD DE CONVERSION
|
||||
If CantidadOriginal <> Cantidad Then
|
||||
Dim CantidadConversion As Decimal = TmpDT.Rows(e.RowIndex)("CantidadConversion").ToString().ToDecimal()
|
||||
If AplicaComercioExterior Then
|
||||
'SI NO VIENE DE MANIFIESTO UTILIZA EL PESO DEL PRODUCTO
|
||||
If Request("CveManifiesto") Is Nothing Then
|
||||
If DrPS("PesoKg").ToString().ToDecimal() > 0 Then
|
||||
CantidadConversion = Cantidad * DrPS("PesoKg").ToString().ToDecimal()
|
||||
Else
|
||||
CantidadConversion = Cantidad
|
||||
End If
|
||||
Else
|
||||
Dim TotalNuevo As Decimal = TmpDT.Rows(e.RowIndex)("Total").ToString().ToDecimal()
|
||||
Dim PorcentajeConversion As Decimal = CantidadConversion / TotalOriginal
|
||||
|
||||
CantidadConversion = TotalNuevo * PorcentajeConversion
|
||||
End If
|
||||
Else
|
||||
CantidadConversion = Cantidad
|
||||
End If
|
||||
|
||||
TmpDT.Rows(e.RowIndex)("CantidadConversion") = CantidadConversion
|
||||
End If
|
||||
|
||||
|
||||
DrPS = Nothing
|
||||
|
||||
@@ -10131,17 +10169,17 @@ Partial Class Ventas
|
||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||
|
||||
If Request("CveEmbarqueManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveEmbarqueManifiesto")) AndAlso Request("CveEmbarqueManifiesto").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
|
||||
If Not ObjVentas.Embarque_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveEmbarqueManifiesto").ToEntero()) Then
|
||||
ErrorList.Add("Error al actualizar el manifiesto.")
|
||||
End If
|
||||
End If
|
||||
|
||||
If Request("CveManifiesto") IsNot Nothing AndAlso IsNumeric(Request("CveManifiesto")) AndAlso Request("CveManifiesto").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then
|
||||
|
||||
If Not ObjVentas.CGame_ManifiestoUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveManifiesto").ToEntero()) Then
|
||||
ErrorList.Add("Error al actualizar el manifiesto.")
|
||||
End If
|
||||
End If
|
||||
|
||||
Catch ex As Exception
|
||||
OnError("Ocurrió un error al actualizar el embarque", ex)
|
||||
ErrorList.Add("Ocurrió un error al actualizar el embarque")
|
||||
@@ -10151,9 +10189,8 @@ Partial Class Ventas
|
||||
ViewState("CveVenta") = ObjFactura.CveVenta
|
||||
|
||||
If Request("CveOrdenProduccion") IsNot Nothing AndAlso IsNumeric(Request("CveOrdenProduccion")) AndAlso Request("CveOrdenProduccion").ToEntero() > 0 Then
|
||||
|
||||
If ObjVentas.AgroOrdenProduccionUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveOrdenProduccion").ToEntero()) Then
|
||||
|
||||
If Not ObjVentas.AgroOrdenProduccionUpvta(ObjFactura.CveVenta, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Request("CveOrdenProduccion").ToEntero()) Then
|
||||
ErrorList.Add("Error al actualizar el manifiesto.")
|
||||
End If
|
||||
End If
|
||||
Catch ex As Exception
|
||||
@@ -13306,7 +13343,8 @@ Partial Class Ventas
|
||||
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,
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir) Then
|
||||
CveMedico:=CveMedico, CveProcedimiento:=CveProcedimiento, CveTipoVenta:=CveTipoVentaGuardar, RequiereOS:=ChkRequiereTecnico.Checked, FechaParaSurtir:=factura.FechaParaSurtir,
|
||||
Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text) 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
|
||||
@@ -13408,6 +13446,17 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
'ACTUALIZA EL CAMPO CANTIDAD CONVERSION CON BASE A LO ESTABLECIDO EN LA TABLA
|
||||
If AplicaComercioExterior Then
|
||||
For Each gvr As GridViewRow In GvComercioExterior.Rows
|
||||
For Each Row As DataRow In TmpDTDetalle.Rows
|
||||
If gvr.DataKey("Consec") = Row("Consec").ToString() AndAlso gvr.DataKey("CvePS") = Row("CvePS").ToString() Then
|
||||
Row("CantidadConversion") = gvr.FCTextBox("TxtCantidad").Text.ToDecimal()
|
||||
End If
|
||||
Next
|
||||
Next
|
||||
End If
|
||||
|
||||
|
||||
If factura.TipoDocto = "Egs" AndAlso NuevaFactura = 1 Then
|
||||
If DtVentasNC Is Nothing Then
|
||||
@@ -15334,7 +15383,7 @@ Partial Class Ventas
|
||||
If Not OcurrioError AndAlso DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
ErrorList.Add("Ocurrió un error al aplicar el inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
End If
|
||||
|
||||
@@ -16823,6 +16872,10 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
AgregarPS()
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
ElseIf CvePSParametro = -2 Then
|
||||
@@ -16836,11 +16889,6 @@ Partial Class Ventas
|
||||
UPPPS.Update()
|
||||
UpPS.Update()
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||
AgregarPS()
|
||||
End If
|
||||
|
||||
|
||||
End Sub
|
||||
|
||||
Private Function CalculaPrecioSugerido(CvePSParametro As Integer, CveClasificacion As Integer, Optional CvePrecioListaSugerido As Integer = -1) As Modelos.MPrecioSugerido
|
||||
@@ -17557,7 +17605,7 @@ Partial Class Ventas
|
||||
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
|
||||
AgregarPS()
|
||||
End Sub
|
||||
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer) As Boolean 'NO TOCAR - IPP
|
||||
Private Function ValidaAgregarPS(CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "") As Boolean 'NO TOCAR - IPP
|
||||
|
||||
'VALIDA PARAMETROS
|
||||
If CvePS <= 0 Or CveUM <= 0 Then
|
||||
@@ -17565,6 +17613,10 @@ Partial Class Ventas
|
||||
Return False
|
||||
End If
|
||||
|
||||
If PSValidarModal.Trim.Length > 0 Then
|
||||
HdnPS.Value = PSValidarModal
|
||||
End If
|
||||
|
||||
If HdnPS.Value = "" Or HdnPS.Value = "-1" Then
|
||||
Alert("Es necesario seleccionar el Producto o Servicio a facturar.", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
@@ -17645,11 +17697,11 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Then
|
||||
If DdlTipoComprobante.SelectedValue <> "Cot" And ChkSinExistencia.Checked = False Or UsuarioActual.Empresa.Funcionalidad(578).ToEntero = 1 Then
|
||||
'VALIDA EXISTENCIA
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140}) Then
|
||||
If UsuarioActual.CveEmpresa.Contiene({72, 80, 119, 153, 140, 186}) Then
|
||||
If CveVenta <= 0 OrElse Me.EsCreaApartirDe Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||
If Existencia - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} AND (EntregaDirecta IS NULL OR EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -17664,7 +17716,7 @@ Partial Class Ventas
|
||||
|
||||
'SUMA LO YA RESTADO EN PENDIENTE POR SURTIR QUE PERTENESCA A LA VENTA.
|
||||
'PARA QUE NO RESTE LA EXISTENCIA 2 VECES Y PUEDAS COMPARAR LO REAL
|
||||
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < TxtCantidad.Text.ToDouble Then
|
||||
If (Existencia + CantidadVenta) - TmpDT.SUM("Cantidad", $"CvePS = {CvePS} And (EntregaDirecta Is NULL Or EntregaDirecta < 1)") < (If(CantidadModal > 0, CantidadModal, TxtCantidad.Text.ToDouble)) Then
|
||||
Alert("No cuenta con la cantidad suficiente en inventario. Cuenta con " + Existencia.FormatoNumero(2) + ".", TipoMensaje.MsgAdvertencia)
|
||||
Return False
|
||||
End If
|
||||
@@ -18466,7 +18518,7 @@ Partial Class Ventas
|
||||
'SI NO SE UTILIZA LA CONVERSION, UTILIZA LA CANTIDAD
|
||||
If CantidadConversion = 0 Then
|
||||
If DrPS("PesoKg").ToString().ToDecimal() > 0 Then
|
||||
CantidadConversion = DrPS("PesoKg").ToString().ToDecimal()
|
||||
CantidadConversion = Cantidad * DrPS("PesoKg").ToString().ToDecimal()
|
||||
Else
|
||||
CantidadConversion = Cantidad
|
||||
End If
|
||||
@@ -21631,6 +21683,8 @@ Partial Class Ventas
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
TxtPaciente.Enabled = True
|
||||
TxtEpisodio.Enabled = True
|
||||
End If
|
||||
|
||||
|
||||
@@ -21805,7 +21859,8 @@ Partial Class Ventas
|
||||
PedidoContrato:=TxtPedidoContrato.Text, AtencionA:=TxtAtencionA.Text.Trim, CveMetodoPago33:=DdlMetodoPago33.SelectedValue.ToEntero(),
|
||||
CveFormaPago33:=DdlFormaPago33.SelectedValue.ToEntero(), TipoDocto:=DdlTipoComprobante.SelectedValue, CveCliente:=CveCliente, CveClienteSucursal:=CveClienteSucursal,
|
||||
OrdenCompra:=TxtOrdenCompra.Text, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, Kilometraje:=TxtKilometraje.Text.ToDecimal, CveUsoCFDi:=DdlUsoCFDI.SelectedValue.ToEntero(),
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir) Then
|
||||
CveVendedor:=DdlVendedor.SelectedValue.ToEntero(), ServicioDomicilio:=TrServicioDomicilio.Visible, CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero,
|
||||
FechaParaSurtir:=FechaParaSurtir, Paciente:=TxtPaciente.Text, Episodio:=TxtEpisodio.Text) Then
|
||||
OcurrioError = True
|
||||
End If
|
||||
|
||||
@@ -29688,9 +29743,9 @@ Partial Class Ventas
|
||||
|
||||
Protected Sub GvComercioExterior_RowDataBound(sender As Object, e As GridViewRowEventArgs)
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim CantidadConversion = CDbl(e.Row.DBCampo("CantidadConversion"))
|
||||
Dim CantidadBase = CDbl(e.Row.DBCampo("Cantidad"))
|
||||
Dim PUBase = CDbl(e.Row.DBCampo("PU"))
|
||||
Dim CantidadConversion = e.Row.DBCampo("CantidadConversion").ToDecimal()
|
||||
Dim CantidadBase = e.Row.DBCampo("Cantidad").ToDecimal()
|
||||
Dim PUBase = e.Row.DBCampo("PU").ToDecimal()
|
||||
|
||||
Dim TotalUSD = (CantidadBase * PUBase)
|
||||
|
||||
@@ -29704,9 +29759,12 @@ Partial Class Ventas
|
||||
End If
|
||||
Else
|
||||
e.Row.FCTextBox("TxtValorUnitario").Text = PUBase.ToString("N2")
|
||||
'e.Row.FCTextBox("TxtValorUnitario").Attributes.Add("onkeyup", $"CalculaTotalUSD({e.Row.FCLabel("LblTotalUSD").ClientID}, this,{e.Row.FCTextBox("TxtCantidad").ClientID});")
|
||||
End If
|
||||
|
||||
e.Row.FCTextBox("TxtValorUnitario").Attributes.Add("onkeyup", $"CalculaTotalUSD({e.Row.FCLabel("LblTotalUSD").ClientID}, this,{e.Row.FCTextBox("TxtCantidad").ClientID});")
|
||||
e.Row.FCTextBox("TxtCantidad").Attributes.Add("onkeyup", $"CalculaPU_USD({e.Row.FCTextBox("TxtValorUnitario").ClientID}, {e.Row.FCLabel("LblTotalUSD").Text.ToDecimal()},this);")
|
||||
e.Row.FCTextBox("TxtValorUnitario").Attributes.Add("onkeyup", $"CalculaCantidad_USD(this,{e.Row.FCLabel("LblTotalUSD").Text.ToDecimal()},{e.Row.FCTextBox("TxtCantidad").ClientID});")
|
||||
|
||||
End If
|
||||
End Sub
|
||||
|
||||
@@ -33637,6 +33695,8 @@ Partial Class Ventas
|
||||
TrVentasMedicas1.Visible = True
|
||||
DdlMedico.Enabled = True
|
||||
DdlProcedimiento.Enabled = True
|
||||
TxtPaciente.Enabled = True
|
||||
TxtEpisodio.Enabled = True
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(289) Then
|
||||
@@ -33693,7 +33753,8 @@ Partial Class Ventas
|
||||
|
||||
If Not ObjVentas.UpdateObservacionesVenta(Me.CveVenta, UsuarioActual.CveEmpresa, DdlVendedor.SelectedValue.ToEntero(), TxtObsFact.Text, RblPaqueteria.SelectedValue.ToEntero(), TxtCorreoNotificaciones.Text,
|
||||
TxtObsAlmacen.Text, TxtPedidoContrato.Text, TxtOrdenCompra.Text, TxtFechaPago.Text, DdlUsoCFDI.SelectedValue.ToEntero, DescripcionVenta:=TxtDescripcionVenta.Text.Trim,
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir) Then
|
||||
CveMedico:=DdlMedico.SelectedValue.ToEntero, CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, FechaParaSurtir:=FechaParaSurtir, Paciente:=TxtPaciente.Text,
|
||||
Episodio:=TxtEpisodio.Text) Then
|
||||
TieneError = True
|
||||
End If
|
||||
|
||||
@@ -36050,6 +36111,7 @@ Partial Class Ventas
|
||||
|
||||
TrVentasMedicas1.Visible = True
|
||||
TrVentasMedicas2.Visible = True
|
||||
TrVentasMedicas3.Visible = True
|
||||
|
||||
For Each item As ListItem In RBLTipoVenta.Items
|
||||
item.Text = $"  {item.Text}"
|
||||
@@ -36058,7 +36120,7 @@ Partial Class Ventas
|
||||
RegistraScript("$('#DvModalTipoVenta').modal({ backdrop: 'static', keyboard: false });")
|
||||
End Sub
|
||||
|
||||
Private Sub CargaProcedimientos()
|
||||
Private Sub CargaProcedimientos(Optional CveProcedimientSeleccion As Integer = -1)
|
||||
DdlProcedimiento.DataSource = GlobalDTProcedimientos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlProcedimiento.DataBind()
|
||||
|
||||
@@ -36066,17 +36128,35 @@ Partial Class Ventas
|
||||
DdlProcedimientoModal.DataBind()
|
||||
|
||||
|
||||
If CveProcedimientSeleccion > 0 Then
|
||||
DdlProcedimientoModal.SelectedValueExist(CveProcedimientSeleccion)
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub CargaMedicos()
|
||||
Private Sub CargaMedicos(Optional CveMedicoSeleccion As Integer = -1)
|
||||
|
||||
DdlMedico.ClearSelection()
|
||||
DdlMedico.SelectedValue = Nothing
|
||||
|
||||
DdlMedicoModal.ClearSelection()
|
||||
DdlMedicoModal.SelectedValue = Nothing
|
||||
|
||||
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedico.DataBind()
|
||||
|
||||
DdlMedicoModal.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||
DdlMedicoModal.DataBind()
|
||||
|
||||
If CveMedicoSeleccion > 0 Then
|
||||
DdlMedicoModal.SelectedValueExist(CveMedicoSeleccion)
|
||||
End If
|
||||
|
||||
UpDvModalTipoVenta.Update()
|
||||
UpCliente.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
@@ -36130,7 +36210,7 @@ Partial Class Ventas
|
||||
|
||||
|
||||
TdFechaOS1.Visible = ChkRequiereTecnico.Checked
|
||||
TdFechaOS2.Visible = ChkRequiereTecnico.Checked
|
||||
|
||||
|
||||
UpCliente.Update()
|
||||
End Sub
|
||||
@@ -36297,6 +36377,27 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
For Each GvRow As GridViewRow In GvProductosProcedimiento.Rows
|
||||
Dim Cantidad As Decimal = GvRow.FCTextBox("TxtCantidad").Text.ToDecimal
|
||||
Dim CveUnidadMedida As Integer = GvRow.DataKey("CveUnidadMedida").ToEntero
|
||||
Dim Abreviatura As String = GvRow.DataKey("Abreviatura").ToString
|
||||
Dim PU As Decimal = GvRow.DataKey("Precio").ToDecimal
|
||||
Dim CveClasificacion As Integer = GvRow.DataKey("CveClasificacion").ToEntero
|
||||
Dim Clasificacion As String = GvRow.DataKey("Clasificacion").ToString
|
||||
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||
Dim CodigoPS As String = GvRow.DataKey("CodigoPS")
|
||||
|
||||
If Cantidad > 0 Then
|
||||
If Not ValidaAgregarPS(CvePS, CveUnidadMedida, PU, 2, Cantidad, CodigoPS) Then
|
||||
Alert("No hay existencia.", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
Next
|
||||
|
||||
ChkRequiereTecnico.Checked = ChkRequiereTecnicoModal.Checked
|
||||
TxtFechaOS.Text = TxtFechaModal.Text
|
||||
|
||||
@@ -36383,6 +36484,7 @@ Partial Class Ventas
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
|
||||
If CountPsAgregados > 0 Then
|
||||
CalculaTotalesVenta()
|
||||
End If
|
||||
@@ -36450,7 +36552,8 @@ Partial Class Ventas
|
||||
If ObjOrdenServicio.AddOrdenesServicios(CveCliente, DdlSubProyectoDatos.SelectedValue.ToEntero, UsuarioActual.Nombre, TxtFechaOS.Text.Replace(",", "").ToDateTime, $"Venta: {LblSerie.Text}-{TxtFolio.Text}", UsuarioActual.CveUsuario, EstatusOrdenServicio,
|
||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, CveVentaOS, -1, -1, CveOSTipo, CveClienteSucursal:=DdlSucursalCliente.SelectedValue.ToEntero,
|
||||
Direccion:="", Telefono:="", CveModeloAuto:=-1, Año:="", CveMedico:=DdlMedico.SelectedValue.ToEntero,
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime) Then
|
||||
CveProcedimiento:=DdlProcedimiento.SelectedValue.ToEntero, CveTipoVenta:=RBLTipoVenta.SelectedValue.ToEntero, FechaCita:=TxtFechaOS.Text.Replace(",", "").ToDateTime,
|
||||
Paciente:=TxtPaciente.Text, IdentificadorCliente:=TxtEpisodio.Text) Then
|
||||
CveOSVentaMedica = ObjOrdenServicio.CveOS
|
||||
Else
|
||||
errorList.Add("Se presento un error al guardar la orden de servicio.")
|
||||
@@ -36491,6 +36594,36 @@ Partial Class Ventas
|
||||
|
||||
End Function
|
||||
|
||||
|
||||
Protected Sub LnkAddMedicoModal_Click(sender As Object, e As EventArgs)
|
||||
'iFrameAddMedicoProcedimiento.Attributes.Add("src", "/Ventas/CatMedicos.aspx?EsFrame=1")
|
||||
AddMedicoControl.CveMedico = -1
|
||||
AddMedicoControl.LimpiarControles()
|
||||
UpModalAddMedico.Update()
|
||||
|
||||
RegistraScript("$('#DvModalAddMedico').modal();")
|
||||
End Sub
|
||||
|
||||
Protected Sub LnkAddProcedimientoModal_Click(sender As Object, e As EventArgs)
|
||||
'iFrameAddMedicoProcedimiento.Attributes.Add("src", "/Ventas/CatProcedimientoDetalle.aspx?CveProcedimiento=-1")
|
||||
|
||||
AddProcedimientoControl.CveProcedimiento = -1
|
||||
AddProcedimientoControl.LimpiarControles()
|
||||
UpModalAddProcedimiento.Update()
|
||||
RegistraScript("$('#DvModalAddProcedimiento').modal();")
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRecargaMedicos_Click(sender As Object, e As EventArgs)
|
||||
|
||||
CargaMedicos(HdnCveMedicoNuevo.Value.ToEntero)
|
||||
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnRecargaProcedimientos_Click(sender As Object, e As EventArgs)
|
||||
CargaProcedimientos(HdnCveProcedimientoNuevo.Value.ToEntero)
|
||||
End Sub
|
||||
|
||||
#End Region
|
||||
|
||||
'Protected Sub LnkCancelarSoloCFDI_Click(sender As Object, e As EventArgs)
|
||||
@@ -36570,5 +36703,10 @@ Partial Class Ventas
|
||||
Protected Sub TxtFechaAnticipoCliente_TextChanged(sender As Object, e As EventArgs)
|
||||
CargaAnticipos(CveCliente)
|
||||
End Sub
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
End Class
|
||||
|
||||
|
||||
Reference in New Issue
Block a user