Merge branch 'master' of http://192.168.10.111:8383/SIG
This commit is contained in:
@@ -65,6 +65,7 @@ Public Class ClsCompProveedores
|
|||||||
Public Property Situacion As String = ""
|
Public Property Situacion As String = ""
|
||||||
Public Property DIOTNacionalidad As String
|
Public Property DIOTNacionalidad As String
|
||||||
Public Property CveRegimenFiscal As Integer = -1
|
Public Property CveRegimenFiscal As Integer = -1
|
||||||
|
Public Property PorcentajeProntoPago As Decimal = 0D
|
||||||
|
|
||||||
Public ReadOnly Property DtResultados() As DataTable
|
Public ReadOnly Property DtResultados() As DataTable
|
||||||
Get
|
Get
|
||||||
@@ -300,6 +301,7 @@ Public Class ClsCompProveedores
|
|||||||
Me.Situacion = Data.Rows(0)("Situacion").ToString
|
Me.Situacion = Data.Rows(0)("Situacion").ToString
|
||||||
Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString
|
Me.DIOTNacionalidad = Data.Rows(0)("DIOTNacionalidad").ToString
|
||||||
Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero
|
Me.CveRegimenFiscal = Data.Rows(0)("CveRegimenFiscal").ToString.ToEntero
|
||||||
|
Me.PorcentajeProntoPago = Data.Rows(0)("PorcentajeProntoPago").ToString.ToDecimal
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -317,7 +319,7 @@ Public Class ClsCompProveedores
|
|||||||
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveUsuario As Integer, CveEmpresa As Integer,
|
||||||
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "",
|
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "",
|
||||||
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
|
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
|
||||||
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
|
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
@@ -367,6 +369,7 @@ Public Class ClsCompProveedores
|
|||||||
.Add("@CveUsuarioEvaluador", SqlDbType.Int).Value = CveUsuarioEvaluador
|
.Add("@CveUsuarioEvaluador", SqlDbType.Int).Value = CveUsuarioEvaluador
|
||||||
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
|
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
|
||||||
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
|
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
|
||||||
|
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||||
|
|
||||||
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
.Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue
|
||||||
End With
|
End With
|
||||||
@@ -402,7 +405,7 @@ Public Class ClsCompProveedores
|
|||||||
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer,
|
CveProveedorClasificacion As Integer, CveUsuarioResponsable As Integer, Estatus As Boolean, NotificarA As String, CorreoCobranza As String, FolioDuplicado As Boolean, CveProveedor As Integer,
|
||||||
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1,
|
Optional CveTipoProveedor As Integer = 1, Optional CveMonedaPreferente As Integer = 1, Optional UsaLimiteCredito As Boolean = False, Optional DIOTCveTipoTercero As Integer = -1, Optional DIOTCveTipoOperacion As Integer = -1, Optional DIOTNumeroIDFiscal As String = "", Optional CveUsuarioModifico As Integer = -1,
|
||||||
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
|
Optional AplicarEvaluacion As Boolean = False, Optional FechaEvaluacion As String = "-1", Optional CicloEvaluacion As Integer = -1, Optional DIOTCvePais As Integer = -1, Optional CveUsuarioEvaluador As Integer = -1, Optional CP As Integer = 0, Optional DIOTNacionalidad As String = "",
|
||||||
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1) As Boolean
|
Optional CveConfianzaProveedor As Integer = -1, Optional CveRegimenFiscal As Integer = -1, Optional PorcentajeProntoPago As Decimal = 0) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Comp_ProveedorUpdate")
|
DataAdapter("PA_Comp_ProveedorUpdate")
|
||||||
@@ -455,6 +458,7 @@ Public Class ClsCompProveedores
|
|||||||
|
|
||||||
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
|
.Add("@CveConfianzaProveedor", SqlDbType.Int).Value = CveConfianzaProveedor
|
||||||
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
|
.Add("@CveRegimenFiscal", SqlDbType.TinyInt).Value = CveRegimenFiscal
|
||||||
|
.Add("@PorcentajeProntoPago", SqlDbType.Decimal).Value = PorcentajeProntoPago
|
||||||
|
|
||||||
''Proveedores
|
''Proveedores
|
||||||
'.Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores
|
'.Add("@IdCtaContProveedores", SqlDbType.Int).Value = IdCtaContProveedores
|
||||||
|
|||||||
1865
App_Code/ClsCompraManager.vb
Normal file
1865
App_Code/ClsCompraManager.vb
Normal file
File diff suppressed because it is too large
Load Diff
@@ -9279,7 +9279,7 @@ Public Class ClsPaginas
|
|||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "P A G O D E V E N T A S "
|
#Region "P A G O D E V E N T A S "
|
||||||
Public Shared Function AplicaPrePolizaPagoVenta(VentaActual As Venta, Pago As VentaPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad) As Boolean
|
Public Shared Function AplicaPrePolizaPagoVenta(VentaActual As Venta, Pago As VentaPago, CvePrePoliza As Integer, ByRef ObjConta As ClsContabilidad, Optional AplicarConceptoAplicacion As Boolean = True) As Boolean
|
||||||
Dim ErrorMovtos As Boolean = False
|
Dim ErrorMovtos As Boolean = False
|
||||||
Dim PorcentajePago As Decimal = Pago.ImportePagoVenta / VentaActual.Total
|
Dim PorcentajePago As Decimal = Pago.ImportePagoVenta / VentaActual.Total
|
||||||
Dim ImporteMovimiento As Decimal = 0
|
Dim ImporteMovimiento As Decimal = 0
|
||||||
@@ -9401,7 +9401,7 @@ Public Class ClsPaginas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
'concepto pago
|
'concepto pago
|
||||||
If Pago.TipoPago = "B" AndAlso Not ErrorMovtos Then ' B A N C O S
|
If Pago.TipoPago = "B" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' B A N C O S
|
||||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
@@ -9413,7 +9413,7 @@ Public Class ClsPaginas
|
|||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 30, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 30, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O
|
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' A N T I C I P O
|
||||||
Concepto = String.Format("{0} Ant:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} Ant:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
|
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
|
||||||
@@ -9427,7 +9427,7 @@ Public Class ClsPaginas
|
|||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 11, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 11, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, TipoCambioPago:=Pago.TCPago) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O
|
If Pago.TipoPago = "NC" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' N O T A D E C R E D I T O
|
||||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2)
|
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, Pago.CveMonedaPago, True, 2)
|
||||||
@@ -9441,7 +9441,7 @@ Public Class ClsPaginas
|
|||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos Then ' I N G R E S O S X C O M P R O B A R
|
If Pago.TipoPago = "I" AndAlso Not ErrorMovtos AndAlso AplicarConceptoAplicacion Then ' I N G R E S O S X C O M P R O B A R
|
||||||
Concepto = String.Format("{0} IxC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} IxC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
If VentaActual.UsuarioActual.Empresa.TipoContabilidad = 2 Then
|
||||||
@@ -10609,7 +10609,7 @@ Public Class ClsPaginas
|
|||||||
PaginaDict.Add("/RH/RepDocumentacionVencida.aspx".ToUpper(), 412)
|
PaginaDict.Add("/RH/RepDocumentacionVencida.aspx".ToUpper(), 412)
|
||||||
PaginaDict.Add("/RH/CatSubProyectosZonas.aspx".ToUpper(), 421)
|
PaginaDict.Add("/RH/CatSubProyectosZonas.aspx".ToUpper(), 421)
|
||||||
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
|
PaginaDict.Add("/RH/RepVacaciones.aspx".ToUpper(), 422)
|
||||||
PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
|
'PaginaDict.Add("/RH/CatChecadorTipo.aspx".ToUpper(), 427)
|
||||||
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
|
PaginaDict.Add("/RH/CatChecadorHorarios.aspx".ToUpper(), 428)
|
||||||
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
|
PaginaDict.Add("/RH/RepChecadorPreAsistencia.aspx".ToUpper(), 628)
|
||||||
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
|
PaginaDict.Add("/RH/CatCaptaciones.aspx".ToUpper(), 629)
|
||||||
|
|||||||
@@ -347,7 +347,7 @@ Public Class ClsProductosServicios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function GetPSLite(CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveTipoPS As Integer = -1, Optional UsoClasificacion As Integer = -1) As Boolean
|
Public Function GetPSLite(CveClasificacion As Integer, CveEmpresa As Integer, Optional Codigo As String = "-1", Optional CodigoBarras As String = "-1", Optional PS As String = "-1", Optional pAplicaParaVenta As Integer = -1, Optional pEstado As Integer = -1, Optional CveTipoPS As Integer = -1, Optional UsoClasificacion As Integer = -1, Optional CveMarca As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
' @CveClasificacion int, @Codigo varchar(50) = '-1', @PS varchar(300) = '-1', @AplicaParaVenta int = -1, @Estado int = -1, @CodigoBarras varchar(50) = '-1', @CveTipoPS int = -1, @CveEmpresa int
|
' @CveClasificacion int, @Codigo varchar(50) = '-1', @PS varchar(300) = '-1', @AplicaParaVenta int = -1, @Estado int = -1, @CodigoBarras varchar(50) = '-1', @CveTipoPS int = -1, @CveEmpresa int
|
||||||
DataAdapter("PA_ProductosServiciosLiteGet")
|
DataAdapter("PA_ProductosServiciosLiteGet")
|
||||||
@@ -360,6 +360,7 @@ Public Class ClsProductosServicios
|
|||||||
.Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta
|
.Add("@AplicaParaVenta", SqlDbType.Int).Value = pAplicaParaVenta
|
||||||
.Add("@Estado", SqlDbType.Int).Value = pEstado
|
.Add("@Estado", SqlDbType.Int).Value = pEstado
|
||||||
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
|
.Add("@CveTipoPS", SqlDbType.Int).Value = CveTipoPS
|
||||||
|
.Add("@CveMarca", SqlDbType.Int).Value = CveMarca
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
|
.Add("@UsoClasificacion", SqlDbType.Int).Value = UsoClasificacion
|
||||||
End With
|
End With
|
||||||
@@ -647,6 +648,27 @@ Public Class ClsProductosServicios
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function UpdatePSImagen(CvePS As Integer, Imagen As String) As Boolean
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Vta_PSImagenUpdate")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePS", SqlDbType.Int).Value = CvePS
|
||||||
|
.Add("@Imagen", SqlDbType.VarChar).Value = Imagen
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar la imagen del producto.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
Public Function UpdatePS(CveClasificacion As Integer, CveClasificacionCosto As Integer, CveUnidadMedida As Integer, Codigo As String, NumeroParte As String, CodigoBarras As String, PS As String, Precio As Double, IVA As Double, RetIVA As Double, Inventariable As Boolean, CveProveedorCompra As Integer,
|
||||||
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
AplicaParaConcepto As Boolean, AplicaParaVenta As Boolean, Estado As Boolean, CveUsuario As Integer, CvePS As Integer, CveMetodoInventario As Integer, EsPaquete As Integer, CveSATPS As Integer, CveEmpresa As Integer, Optional CveTipoPS As Integer = -1, Optional TipoServicio As Integer = -1,
|
||||||
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
Optional CveClasificacion2 As Integer = -1, Optional CveMarca As Integer = -1, Optional AlmacenSeccion As String = "", Optional AplicaIEPS As Boolean = False, Optional IEPSPorcentaje As Decimal = -1,
|
||||||
|
|||||||
@@ -7442,44 +7442,6 @@ Public Class ClsRH
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function AddRemoveChecadoresSubProyectos(CveChecador As Integer, CveSubProyecto As Integer, CveUsuario As Integer, Agreagar As Boolean) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_RH_ChecadorSubProyectosAddRemove")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
|
|
||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
|
||||||
.Add("@Agreagar", SqlDbType.Bit).Value = Agreagar
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al agregar el sub proyecto", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
Public Function GetChecadoresSubProyectos(CveChecador As Integer, CveEmpresa As Integer) As Boolean
|
|
||||||
Dim Retorno As Boolean = False
|
|
||||||
DataAdapter("PA_RH_ChecadorSubProyectosGet")
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
|
||||||
.Add("@CveChecador", SqlDbType.Int).Value = CveChecador
|
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
|
||||||
End With
|
|
||||||
Try
|
|
||||||
SqlAdapter.Fill(Data)
|
|
||||||
Retorno = True
|
|
||||||
Catch ex As Exception
|
|
||||||
OnError("Ocurrió un error al obteger los sub proyecto", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo())
|
|
||||||
End Try
|
|
||||||
Return Retorno
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " A C T I V I D A D E S"
|
#Region " A C T I V I D A D E S"
|
||||||
|
|||||||
@@ -189,7 +189,7 @@ Public Class ClsSisUsuarios
|
|||||||
End Try
|
End Try
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Public Function ValidaUsuario(Usuario As String, Password As String, tIMEI As String, Optional CveEmpresa As Integer = -1, Optional CvePlataforma As Integer = -1) As Usuario
|
Public Function ValidaUsuario(Usuario As String, Password As String, tIMEI As String, Optional CveEmpresa As Integer = -1, Optional GrupoEmpresa As String = "", Optional CvePlataforma As Integer = -1) As Usuario
|
||||||
Dim Retorno As Usuario = Nothing
|
Dim Retorno As Usuario = Nothing
|
||||||
DataAdapter("PA_Sis_UsuariosGet")
|
DataAdapter("PA_Sis_UsuariosGet")
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
@@ -199,11 +199,12 @@ Public Class ClsSisUsuarios
|
|||||||
.Add("@Contraseña", SqlDbType.VarChar).Value = Password
|
.Add("@Contraseña", SqlDbType.VarChar).Value = Password
|
||||||
.Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma
|
.Add("@CvePlataforma", SqlDbType.Int).Value = CvePlataforma
|
||||||
.Add("@EsLogIn", SqlDbType.Bit).Value = 1
|
.Add("@EsLogIn", SqlDbType.Bit).Value = 1
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
.Add("@GrupoEmpresa", SqlDbType.VarChar).Value = GrupoEmpresa
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
|
|
||||||
|
|
||||||
If Data.Rows.Count > 0 Then
|
If Data.Rows.Count > 0 Then
|
||||||
Retorno = New Usuario
|
Retorno = New Usuario
|
||||||
|
|
||||||
@@ -215,7 +216,6 @@ Public Class ClsSisUsuarios
|
|||||||
Retorno.CveRol = Data.Rows(0)("CveRol").ToString().ToEntero()
|
Retorno.CveRol = Data.Rows(0)("CveRol").ToString().ToEntero()
|
||||||
Retorno.Rol = Data.Rows(0)("Rol").ToString()
|
Retorno.Rol = Data.Rows(0)("Rol").ToString()
|
||||||
|
|
||||||
'Retorno.NombreEmpresa = Data.Rows(0)("Empresa").ToString
|
|
||||||
Retorno.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString().ToEntero()
|
Retorno.CveEmpresa = Data.Rows(0)("CveEmpresa").ToString().ToEntero()
|
||||||
Retorno.CvePlataforma = Data.Rows(0)("CvePlataforma").ToString().ToEntero()
|
Retorno.CvePlataforma = Data.Rows(0)("CvePlataforma").ToString().ToEntero()
|
||||||
|
|
||||||
|
|||||||
@@ -6117,7 +6117,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function AddMedico(Nombre As String, APaterno As String, AMaterno As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer,
|
Public Function AddMedico(Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer,
|
||||||
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Integer
|
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Integer
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -6126,16 +6126,10 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
||||||
.Add("@APaterno", SqlDbType.VarChar).Value = APaterno
|
.Add("@Apellidos", SqlDbType.VarChar).Value = Apellidos
|
||||||
.Add("@AMaterno", SqlDbType.VarChar).Value = AMaterno
|
|
||||||
'.Add("@Medico", SqlDbType.VarChar).Value = Medico
|
|
||||||
.Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
|
.Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
|
||||||
'.Add("@Medico", SqlDbType.VarChar).Value = Medico
|
|
||||||
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
||||||
.Add("@Notas", SqlDbType.VarChar).Value = Notas
|
.Add("@Notas", SqlDbType.VarChar).Value = Notas
|
||||||
'.Add("@DiasAtencion", SqlDbType.VarChar).Value = DiasAtencion
|
|
||||||
'.Add("@Horario", SqlDbType.VarChar).Value = Horario
|
|
||||||
'.Add("@Lugar", SqlDbType.VarChar).Value = Lugar
|
|
||||||
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
.Add("@Estatus", SqlDbType.Bit).Value = Estatus
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
@@ -6143,14 +6137,10 @@ Public Class ClsVentas
|
|||||||
.Add("@Mail", SqlDbType.VarChar).Value = Mail
|
.Add("@Mail", SqlDbType.VarChar).Value = Mail
|
||||||
.Add("@CveMedicoEspecialidad", SqlDbType.Int).Value = CveMedicoEspecialidad
|
.Add("@CveMedicoEspecialidad", SqlDbType.Int).Value = CveMedicoEspecialidad
|
||||||
.Add("@Celular", SqlDbType.VarChar).Value = Celular
|
.Add("@Celular", SqlDbType.VarChar).Value = Celular
|
||||||
'.Add("@Consultorio", SqlDbType.VarChar).Value = Consultorio
|
|
||||||
.Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad
|
.Add("@CveMedicoSubEspecialidad", SqlDbType.Int).Value = CveMedicoSubEspecialidad
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
'.Add("@Torre", SqlDbType.VarChar).Value = Torre
|
|
||||||
.Add("@CveMedicoNuevo", SqlDbType.Int).Direction = ParameterDirection.Output
|
.Add("@CveMedicoNuevo", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End With
|
End With
|
||||||
Try
|
Try
|
||||||
SqlAdapter.Fill(Data)
|
SqlAdapter.Fill(Data)
|
||||||
@@ -6164,7 +6154,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function UpdateMedico(CveMedico As Integer, Nombre As String, APaterno As String, AMaterno As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer,
|
Public Function UpdateMedico(CveMedico As Integer, Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean, CveUsuario As Integer,
|
||||||
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Boolean
|
CveEmpresa As Integer, Telefono As String, Mail As String, CveMedicoEspecialidad As Integer, Celular As String, Optional CveMedicoSubEspecialidad As Integer = -1, Optional CveVendedor As Integer = -1) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
@@ -6172,8 +6162,7 @@ Public Class ClsVentas
|
|||||||
With SqlAdapter.SelectCommand.Parameters
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
.Add("@CveMedico", SqlDbType.Int).Value = CveMedico
|
||||||
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
.Add("@Nombre", SqlDbType.VarChar).Value = Nombre
|
||||||
.Add("@APaterno", SqlDbType.VarChar).Value = APaterno
|
.Add("@Apellidos", SqlDbType.VarChar).Value = Apellidos
|
||||||
.Add("@AMaterno", SqlDbType.VarChar).Value = AMaterno
|
|
||||||
'.Add("@Medico", SqlDbType.VarChar).Value = Medico
|
'.Add("@Medico", SqlDbType.VarChar).Value = Medico
|
||||||
.Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
|
.Add("@CedulaProfesional", SqlDbType.VarChar).Value = CedulaProfesional
|
||||||
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
.Add("@FechaNacimiento", SqlDbType.Date).Value = FechaNacimiento
|
||||||
@@ -6783,7 +6772,7 @@ Public Class ClsVentas
|
|||||||
|
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer) As Boolean
|
Public Function GetComisionesMedicasRep(FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, CveSubProyecto As Integer, CveProcedimiento As Integer, CveMedico As Integer, CveVendedor As Integer, CveUsuario As Integer, CveTipoVenta As Integer) As Boolean
|
||||||
|
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
DataAdapter("PA_Vta_ComisionesMedicasRepGet")
|
||||||
@@ -6797,6 +6786,8 @@ Public Class ClsVentas
|
|||||||
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
.Add("@CveProcedimiento", SqlDbType.Int).Value = CveProcedimiento
|
||||||
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
.Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor
|
||||||
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
.Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario
|
||||||
|
.Add("@CveTipoVenta", SqlDbType.Int).Value = CveTipoVenta
|
||||||
|
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -4097,6 +4097,49 @@ Namespace Modelos
|
|||||||
ErrorList.Add("No se pueden facturar las remisiones, con ese tipo de comprobante seleccionado")
|
ErrorList.Add("No se pueden facturar las remisiones, con ese tipo de comprobante seleccionado")
|
||||||
Else
|
Else
|
||||||
If ObjFactura.RemisionesLista.Count > 0 Then
|
If ObjFactura.RemisionesLista.Count > 0 Then
|
||||||
|
|
||||||
|
'CANCELACION DE PAGOS DE REMISIONES
|
||||||
|
If ObjFactura.DtPagosFacturaGlobal IsNot Nothing Then
|
||||||
|
For Each DrPago As DataRow In ObjFactura.DtPagosFacturaGlobal.Rows
|
||||||
|
|
||||||
|
Dim ventaRef As ClsPaginas.Venta = Nothing
|
||||||
|
|
||||||
|
Using ObjFacturaRef As New Modelos.Factura(UsuarioActual, DrPago("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, CargaDTDetalle:=False, VerificaAlmacen:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
|
||||||
|
ventaRef = New ClsPaginas.Venta(ObjFacturaRef, UsuarioActual)
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If ventaRef IsNot Nothing Then
|
||||||
|
Dim Importe As Decimal = DrPago("Importe").ToString().ToDecimal() * -1
|
||||||
|
|
||||||
|
Dim Pago As New ClsPaginas.VentaPago
|
||||||
|
Pago.Fecha = Now
|
||||||
|
Pago.FechaDocumentoRelacionado = DrPago("FechaDocumento").ToString().ToDate
|
||||||
|
Pago.ImportePagoVenta = Importe
|
||||||
|
Pago.ImportePago = Importe
|
||||||
|
Pago.CveIE = DrPago("CveIE").ToString().ToEntero()
|
||||||
|
Pago.CveMonedaPago = DrPago("CveMoneda").ToString().ToEntero()
|
||||||
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
|
Pago.AplicaTraslado = False
|
||||||
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
|
Pago.CveVentaAmortizacion = -1
|
||||||
|
|
||||||
|
If DrPago("TipoPago").ToString() = "NC" Then
|
||||||
|
Pago.TipoPago = "NC"
|
||||||
|
Else
|
||||||
|
Pago.TipoPago = "B"
|
||||||
|
End If
|
||||||
|
|
||||||
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=False)
|
||||||
|
Else
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ErrorPrepoliza Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
For Each CveRemision As Integer In RemisionesLista
|
For Each CveRemision As Integer In RemisionesLista
|
||||||
If Not ObjConta.TraspasarSaldosRemision(CveRemision, ObjFactura.CvePrePoliza, ObjFactura.CveVenta) Then
|
If Not ObjConta.TraspasarSaldosRemision(CveRemision, ObjFactura.CvePrePoliza, ObjFactura.CveVenta) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
@@ -4115,6 +4158,42 @@ Namespace Modelos
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'TRASPASO DE PAGOS DE REMISIONES A FACTURA GLOBAL
|
||||||
|
If ObjFactura.DtPagosFacturaGlobal IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim VentaActual As New ClsPaginas.Venta(ObjFactura, UsuarioActual)
|
||||||
|
|
||||||
|
For Each DrPago As DataRow In ObjFactura.DtPagosFacturaGlobal.Rows
|
||||||
|
Dim Importe As Decimal = DrPago("Importe").ToString().ToDecimal()
|
||||||
|
|
||||||
|
Dim Pago As New ClsPaginas.VentaPago
|
||||||
|
Pago.Fecha = Now
|
||||||
|
Pago.FechaDocumentoRelacionado = DrPago("FechaDocumento").ToString().ToDate
|
||||||
|
Pago.ImportePagoVenta = Importe
|
||||||
|
Pago.ImportePago = Importe
|
||||||
|
Pago.CveIE = DrPago("CveIE").ToString().ToEntero()
|
||||||
|
Pago.CveMonedaPago = DrPago("CveMoneda").ToString().ToEntero()
|
||||||
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
|
Pago.AplicaTraslado = False
|
||||||
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
|
Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero()
|
||||||
|
|
||||||
|
If DrPago("TipoPago").ToString() = "NC" Then
|
||||||
|
Pago.TipoPago = "NC"
|
||||||
|
Else
|
||||||
|
Pago.TipoPago = "B"
|
||||||
|
End If
|
||||||
|
|
||||||
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaActual, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=False)
|
||||||
|
|
||||||
|
If ErrorPrepoliza Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -4125,6 +4204,7 @@ Namespace Modelos
|
|||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
'REGRESA SALDO A LAS REMISIONES QUE SE FACTURARON EN EL INGRESO QUE SE ESTA CANCELANDO
|
'REGRESA SALDO A LAS REMISIONES QUE SE FACTURARON EN EL INGRESO QUE SE ESTA CANCELANDO
|
||||||
'SE DEBE DE EXCLUIR CUANDO ES REFACTURACIÓN
|
'SE DEBE DE EXCLUIR CUANDO ES REFACTURACIÓN
|
||||||
If ObjFactura.TipoDocto = "Ing" And ValorMultiplicador = -1 AndAlso CveEstatusRefacturacion = 0 AndAlso Not SeCancelaRemisionProceso AndAlso DtRemisionesRelacionadas IsNot Nothing Then ' se debe de excluir cuando es refacturación
|
If ObjFactura.TipoDocto = "Ing" And ValorMultiplicador = -1 AndAlso CveEstatusRefacturacion = 0 AndAlso Not SeCancelaRemisionProceso AndAlso DtRemisionesRelacionadas IsNot Nothing Then ' se debe de excluir cuando es refacturación
|
||||||
@@ -7396,6 +7476,7 @@ Namespace Modelos
|
|||||||
Public Property DtPromociones As Data.DataTable
|
Public Property DtPromociones As Data.DataTable
|
||||||
Public Property DtImpuestosLocales As Data.DataTable
|
Public Property DtImpuestosLocales As Data.DataTable
|
||||||
Public Property DtPagos As Data.DataTable
|
Public Property DtPagos As Data.DataTable
|
||||||
|
Public Property DtPagosFacturaGlobal As Data.DataTable
|
||||||
Public Property DtRemisionesPS As Data.DataTable
|
Public Property DtRemisionesPS As Data.DataTable
|
||||||
Public Property DtRemisiones As Data.DataTable
|
Public Property DtRemisiones As Data.DataTable
|
||||||
Public Property DtPedidos2 As Data.DataTable
|
Public Property DtPedidos2 As Data.DataTable
|
||||||
|
|||||||
@@ -1202,7 +1202,8 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpInv" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros." ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
<asp:GridView ID="GvInv" runat="server" DataKeyNames="Total,PU,Cantidad,CvePS" AutoGenerateColumns="false" GridLines="None" EmptyDataText="Aun no hay registros."
|
||||||
|
ShowHeaderWhenEmpty="True" CssClass="table table-striped table-hover Widthall mysmallbtn" Visible="false">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField ItemStyle-Width="5%" ItemStyle-HorizontalAlign="Center">
|
||||||
<HeaderTemplate>
|
<HeaderTemplate>
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -344,8 +344,8 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-6">
|
||||||
<div class="form-group form-md-line-input">
|
<div class="form-group form-md-line-input" style="width:206px!important">
|
||||||
<asp:DropDownList ID="DdlCveTipoProveedor" runat="server" CssClass="form-control select2me " Width="206px" AutoPostBack="True" OnSelectedIndexChanged="DdlCveTipoProveedor_SelectedIndexChanged">
|
<asp:DropDownList ID="DdlCveTipoProveedor" runat="server" CssClass="form-control select2me " Width="206px" AutoPostBack="True" OnSelectedIndexChanged="DdlCveTipoProveedor_SelectedIndexChanged">
|
||||||
<asp:ListItem Selected="True" Text="-" Value="0"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="-" Value="0"></asp:ListItem>
|
||||||
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Proveedor" Value="1"></asp:ListItem>
|
||||||
@@ -356,6 +356,13 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCECveTipoProveedor" runat="server" HighlightCssClass="vco posicionvalidation" TargetControlID="RFVCveTipoProveedor" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCECveTipoProveedor" runat="server" HighlightCssClass="vco posicionvalidation" TargetControlID="RFVCveTipoProveedor" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<label for="<%= DdlCveTipoProveedor.ClientID%>">Tipo de Proveedor:</label>
|
<label for="<%= DdlCveTipoProveedor.ClientID%>">Tipo de Proveedor:</label>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-6" runat="server" visible="false" id="DVPorcentajeProntoPago">
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:TextBox ID="TxtPorcentajeProntoPago" CssClass="form-control " runat="server" MaxLength="50" Width="206px"></asp:TextBox>
|
||||||
|
<label for="<%= TxtPorcentajeProntoPago.ClientID%>">% Pronto Pago:</label>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -640,9 +640,9 @@ Partial Class Compras_Proveedores
|
|||||||
GvA.Columns(5).Visible = True
|
GvA.Columns(5).Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(574).ToEntero = 1 Then
|
||||||
|
DVPorcentajeProntoPago.Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -920,7 +920,7 @@ Partial Class Compras_Proveedores
|
|||||||
ChkEstado.Checked = ObjProveedor.Estatus = "Activo"
|
ChkEstado.Checked = ObjProveedor.Estatus = "Activo"
|
||||||
LblFechaCaptura.Text = ObjProveedor.FechaIng.ToShortDateString
|
LblFechaCaptura.Text = ObjProveedor.FechaIng.ToShortDateString
|
||||||
LblUsuarioCapturo.Text = ObjProveedor.Usuario
|
LblUsuarioCapturo.Text = ObjProveedor.Usuario
|
||||||
TxtObservaciones.Text = ObjProveedor.Observaciones
|
TxtObservaciones.Text = ObjProveedor.Observaciones.ToString
|
||||||
|
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
|
|
||||||
@@ -950,6 +950,8 @@ Partial Class Compras_Proveedores
|
|||||||
|
|
||||||
Retorno = True
|
Retorno = True
|
||||||
|
|
||||||
|
TxtPorcentajeProntoPago.Text = (100 * ObjProveedor.PorcentajeProntoPago).ToString("###.00")
|
||||||
|
|
||||||
' enviaractivacion()
|
' enviaractivacion()
|
||||||
CargaEventoBitacora()
|
CargaEventoBitacora()
|
||||||
|
|
||||||
@@ -1403,6 +1405,11 @@ Partial Class Compras_Proveedores
|
|||||||
Dim CicloEvaluacion As Integer = If(AplicarEvaluacion, DdlCicloEvaluacion.SelectedValue.ToEntero(), -1)
|
Dim CicloEvaluacion As Integer = If(AplicarEvaluacion, DdlCicloEvaluacion.SelectedValue.ToEntero(), -1)
|
||||||
|
|
||||||
|
|
||||||
|
Dim PorcentajeProntoPago As Decimal = 0
|
||||||
|
If TxtPorcentajeProntoPago.Text.ToDecimal > 0 Then
|
||||||
|
PorcentajeProntoPago = TxtPorcentajeProntoPago.Text.ToDecimal / 100
|
||||||
|
End If
|
||||||
|
|
||||||
If CveProveedor = -1 Then
|
If CveProveedor = -1 Then
|
||||||
|
|
||||||
Dim ObjProveedores As New ClsCompProveedores()
|
Dim ObjProveedores As New ClsCompProveedores()
|
||||||
@@ -1414,7 +1421,7 @@ Partial Class Compras_Proveedores
|
|||||||
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa,
|
||||||
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text,
|
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text,
|
||||||
AplicarEvaluacion:=AplicarEvaluacion, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
|
AplicarEvaluacion:=AplicarEvaluacion, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
|
||||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
|
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||||
|
|
||||||
Dim NuevoCveProveedor As Integer = ObjProveedores.CveProveedor
|
Dim NuevoCveProveedor As Integer = ObjProveedores.CveProveedor
|
||||||
|
|
||||||
@@ -1525,7 +1532,7 @@ Partial Class Compras_Proveedores
|
|||||||
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor,
|
DdlCveClasificacionProveedor.SelectedValue.ToEntero, DdlCveUsuarioResponsable.SelectedValue.ToEntero, ChkEstado.Checked, TxtNotificarA.Text.Trim, TxtCorreoCobranza.Text.Trim, ChkFolioDuplicado.Checked, CveProveedor,
|
||||||
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
DdlCveTipoProveedor.SelectedValue.ToEntero, DdlMonedaPrefente.SelectedValue.ToEntero, UsaLimiteCredito:=ChkUsaLimiteCredito.Checked, DIOTCveTipoTercero:=DDlDIOTTipoTercero.SelectedValue.ToEntero, DIOTCveTipoOperacion:=DdlDIOTTipoOperacion.SelectedValue.ToEntero, DIOTNumeroIDFiscal:=TxtDIOTNumIDFiscal.Text, CveUsuarioModifico:=UsuarioActual.CveUsuario,
|
||||||
DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
|
DIOTCvePais:=DdlDIOTPais.SelectedValue.ToEntero, AplicarEvaluacion:=ChkAplicarEvaluacion.Checked, FechaEvaluacion:=FechaEvaluacion, CicloEvaluacion:=CicloEvaluacion, CveUsuarioEvaluador:=DdlUsuarioEvaluador.SelectedValue.ToEntero(), CP:=TxtCP.Text.ToEntero, DIOTNacionalidad:=TxtDIOTNacionalidad.Text,
|
||||||
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero) Then
|
CveConfianzaProveedor:=DdlConfianzaProveedor.SelectedValue.ToEntero(), CveRegimenFiscal:=DdlRegimenFiscal.SelectedValue.ToEntero, PorcentajeProntoPago:=PorcentajeProntoPago) Then
|
||||||
|
|
||||||
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTCompProveedores(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
|
||||||
|
|||||||
@@ -58,29 +58,34 @@
|
|||||||
Reporte de Compras
|
Reporte de Compras
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
<li>
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UppAcciones">
|
||||||
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
<ContentTemplate>
|
||||||
</li>
|
<li>
|
||||||
<li>
|
<asp:LinkButton ID="LnkPdf" runat="server"><i class="fa fa-file-pdf-o" style="font-weight:bold;"></i> PDF</asp:LinkButton>
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
</li>
|
||||||
</li>
|
<li>
|
||||||
<asp:UpdatePanel runat="server">
|
<asp:LinkButton ID="LnkExportar" runat="server"><i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel</asp:LinkButton>
|
||||||
<ContentTemplate>
|
</li>
|
||||||
<li>
|
<li>
|
||||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
<li>
|
||||||
</asp:UpdatePanel>
|
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Personalizado</asp:LinkButton>
|
||||||
<li>
|
</li>
|
||||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
<li>
|
||||||
</li>
|
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
</li>
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal" ></i> Ver Grafica</asp:LinkButton>
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server"><i class="fa fa-signal" ></i> Ver Grafica</asp:LinkButton>
|
||||||
</li>
|
</li>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||||
|
</Triggers>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UPFiltros" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -8,7 +8,15 @@ Imports Microsoft.Reporting.WebForms
|
|||||||
Partial Class Compras_RepCompras
|
Partial Class Compras_RepCompras
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
#Region "PROPIEDADES"
|
#Region "PROPIEDADES"
|
||||||
|
Private Property Personalizo As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("Personalizo").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("Personalizo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property TCEspecifico As Double
|
Private Property TCEspecifico As Double
|
||||||
Get
|
Get
|
||||||
If ViewState("TCEspecifico") Is Nothing Then
|
If ViewState("TCEspecifico") Is Nothing Then
|
||||||
@@ -43,6 +51,7 @@ Partial Class Compras_RepCompras
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
Personalizo = 0
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -291,6 +300,14 @@ Partial Class Compras_RepCompras
|
|||||||
GvDatos.Columns(15).Visible = False
|
GvDatos.Columns(15).Visible = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
Personalizo = 1
|
||||||
|
If Personalizo = 1 Then
|
||||||
|
ImgExcelPersonalizado.Visible = True
|
||||||
|
Else
|
||||||
|
ImgExcelPersonalizado.Visible = False
|
||||||
|
End If
|
||||||
|
UppAcciones.Update()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -402,5 +419,10 @@ Partial Class Compras_RepCompras
|
|||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
|
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||||
|
|
||||||
|
GvDatos.ExportToExcel("Compras_" & NowADS().ToShortDateString)
|
||||||
|
'GvDatos.ExportToExcelG("DetalleCompras_" & NowADS().ToShortDateString & ".xlsx")
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -3,37 +3,46 @@
|
|||||||
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit" TagPrefix="asp" %>
|
||||||
|
|
||||||
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content1" ContentPlaceHolderID="H" runat="Server">
|
||||||
<%--<asp:ImageButton ID="ImgExcel" runat="server" ImageUrl="/Imagenes/IconoExcel.gif" Width="17px" Height="17px" />--%>
|
<asp:UpdatePanel runat="server" UpdateMode="Conditional" ID="UppAcciones">
|
||||||
<li>
|
<ContentTemplate>
|
||||||
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
|
||||||
</li>
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkPdf" OnClick="LnkPdf_Click" runat="server"> <i class="fa fa-ad-pdf"></i> Generar PDF</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkExportar" runat="server">
|
||||||
|
<i class="fa fa-ad-excel"></i> Exportar Excel
|
||||||
|
</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="ImgExcelPersonalizado" runat="server" Visible="false"> <i class="fa fa-file-excel-o" style="font-weight:bold;"></i> Excel Personalizado</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
<li runat="server" id="LiImprimir" visible="false">
|
||||||
|
<asp:LinkButton ID="Lnkimprimir" runat="server">
|
||||||
|
<i class="fa fa-print"></i> Imprimir Remesa
|
||||||
|
</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
||||||
|
</li>
|
||||||
|
|
||||||
|
<li>
|
||||||
|
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
||||||
|
</li>
|
||||||
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LnkExportar" runat="server">
|
|
||||||
<i class="fa fa-ad-excel"></i> Exportar Excel
|
|
||||||
</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<li runat="server" id="LiImprimir" visible="false">
|
|
||||||
<asp:LinkButton ID="Lnkimprimir" runat="server">
|
|
||||||
<i class="fa fa-print"></i> Imprimir Remesa
|
|
||||||
</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
<asp:UpdatePanel runat="server">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:HyperLink NavigateUrl="#" data-toggle="modal" data-target="#DivPersonalizar" ID="ImgPersonalizar" runat="server"> <i class="fa fa-pencil"></i> Personalizar</asp:HyperLink>
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
|
||||||
</asp:UpdatePanel>
|
|
||||||
<li>
|
|
||||||
<asp:HyperLink NavigateUrl="javascript:;" data-toggle="modal" data-target="#DivTipoCambio" ID="ImgTipoCambio" runat="server"> <i class="fa fa-money"></i> Ver Dlls en pesos</asp:HyperLink>
|
|
||||||
</li>
|
|
||||||
<asp:UpdatePanel ID="UpAcciones" runat="server" UpdateMode="Conditional">
|
|
||||||
<ContentTemplate>
|
|
||||||
<li>
|
|
||||||
<asp:LinkButton ID="LnkVerGrafica" OnClick="LnkVerGrafica_Click" runat="server">Ver Grafica</asp:LinkButton>
|
|
||||||
</li>
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
<Triggers>
|
||||||
|
<asp:PostBackTrigger ControlID="LnkPdf" />
|
||||||
|
<asp:PostBackTrigger ControlID="LnkExportar" />
|
||||||
|
<asp:PostBackTrigger ControlID="ImgExcelPersonalizado" />
|
||||||
|
<asp:PostBackTrigger ControlID="Lnkimprimir" />
|
||||||
|
</Triggers>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
<asp:Content ID="Content2" ContentPlaceHolderID="E" runat="Server">
|
||||||
|
|||||||
@@ -28,6 +28,15 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Private Property Personalizo As Integer
|
||||||
|
Get
|
||||||
|
Return ViewState("Personalizo").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("Personalizo") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Private Property TCEspecifico As Double
|
Private Property TCEspecifico As Double
|
||||||
Get
|
Get
|
||||||
If ViewState("TCEspecifico") Is Nothing Then
|
If ViewState("TCEspecifico") Is Nothing Then
|
||||||
@@ -62,6 +71,7 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
|
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
If Not IsPostBack Then
|
If Not IsPostBack Then
|
||||||
|
Personalizo = 0
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaParametrosInicio()
|
CargaParametrosInicio()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
@@ -460,10 +470,22 @@ Partial Class Compras_RepComprasDetalle
|
|||||||
GvDatos.Columns(14).Visible = ChkFecha.Checked
|
GvDatos.Columns(14).Visible = ChkFecha.Checked
|
||||||
GvDatos.Columns(15).Visible = ChkObs.Checked
|
GvDatos.Columns(15).Visible = ChkObs.Checked
|
||||||
GvDatos.Columns(16).Visible = ChkDescripcion.Checked
|
GvDatos.Columns(16).Visible = ChkDescripcion.Checked
|
||||||
|
|
||||||
|
Personalizo = 1
|
||||||
|
If Personalizo = 1 Then
|
||||||
|
ImgExcelPersonalizado.Visible = True
|
||||||
|
Else
|
||||||
|
ImgExcelPersonalizado.Visible = False
|
||||||
|
End If
|
||||||
|
UppAcciones.Update()
|
||||||
UPDatos.Update()
|
UPDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImgExcelPersonalizado_Click(sender As Object, e As EventArgs) Handles ImgExcelPersonalizado.Click
|
||||||
|
|
||||||
|
GvDatos.ExportToExcel("DetalleCompras_" & NowADS().ToShortDateString)
|
||||||
|
'GvDatos.ExportToExcelG("DetalleCompras_" & NowADS().ToShortDateString & ".xlsx")
|
||||||
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
|
|||||||
@@ -98,7 +98,7 @@ Partial Class Compras_RepCxP
|
|||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
SePersonalizo = 0
|
SePersonalizo = 0
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
CargaGvPersonalizarRaqngoColumnas()
|
CargaGvPersonalizarRangoColumnas()
|
||||||
ProcesaRequest()
|
ProcesaRequest()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
|
|
||||||
@@ -1556,7 +1556,7 @@ Partial Class Compras_RepCxP
|
|||||||
UpBodyPersonalizar.Update()
|
UpBodyPersonalizar.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaGvPersonalizarRaqngoColumnas()
|
Private Sub CargaGvPersonalizarRangoColumnas()
|
||||||
Dim ObjComp As New ClsCompras
|
Dim ObjComp As New ClsCompras
|
||||||
If ObjComp.GetRepCxPColumnas(UsuarioActual.CveEmpresa) Then
|
If ObjComp.GetRepCxPColumnas(UsuarioActual.CveEmpresa) Then
|
||||||
GvPersonalizarRango.DataSource = ObjComp.DtResultados
|
GvPersonalizarRango.DataSource = ObjComp.DtResultados
|
||||||
|
|||||||
@@ -5205,13 +5205,13 @@ Partial Class Compras_eFacturas
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CompraActual As New Compra2(CFDIXmlPath, Compra2.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual)
|
Dim CompraActual As New ClsCompraManager(CFDIXmlPath, ClsCompraManager.EnumCargaCompra.DesdeArchivo, GlobalDTTiposGastos(UsuarioActual.CveEmpresa), UsuarioActual)
|
||||||
|
|
||||||
CompraActual.CveFactura = GvRow.DataKey("CveFactura").ToEntero
|
CompraActual.CveFactura = GvRow.DataKey("CveFactura").ToEntero
|
||||||
CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
|
CompraActual.CveProveedor = GvRow.DataKey("CveProveedor").ToEntero
|
||||||
CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
CompraActual.CveTipoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
||||||
CompraActual.CveTipoConceptoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
CompraActual.CveTipoConceptoProveedor = GvRow.DataKey("CveTipoProveedor").ToEntero
|
||||||
CompraActual.TipoCompra = Compra2.EnumTipoCompra.Sin_definir
|
CompraActual.TipoCompra = ClsCompraManager.EnumTipoCompra.Sin_definir
|
||||||
CompraActual.IEPSGasto = True
|
CompraActual.IEPSGasto = True
|
||||||
CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim
|
CompraActual.Descripcion = TxtDescripcionCompra.Text.Trim
|
||||||
CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor")
|
CompraActual.NombreProveedor = GvRow.DataKey("NombreProveedor")
|
||||||
@@ -5250,7 +5250,9 @@ Partial Class Compras_eFacturas
|
|||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|
||||||
Public Class Compra2
|
|
||||||
|
|
||||||
|
Public Class ClsCompraManager
|
||||||
|
|
||||||
Enum EnumCargaCompra
|
Enum EnumCargaCompra
|
||||||
DesdeXML
|
DesdeXML
|
||||||
@@ -6941,7 +6943,7 @@ Public Class Compra2
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If respuesta Then
|
If respuesta Then
|
||||||
If Not AddPrepolizaDetalles(ObjConta) Then respuesta = False
|
If Not AddPrePolizaDetalles(ObjConta) Then respuesta = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If respuesta AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 4) Then
|
If respuesta AndAlso ObjConta.ValidacionesPrePoliza(CvePrePoliza, UsuarioActual, 4) Then
|
||||||
@@ -7064,7 +7066,6 @@ End Class
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Public Class GeneralesAPIeFacturas
|
Public Class GeneralesAPIeFacturas
|
||||||
|
|
||||||
Inherits ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.BaseSIGAPIeFacturas
|
Inherits ADSNetLibraryzdE.HelpersE.ConexionesE.SIGAPIE.BaseSIGAPIeFacturas
|
||||||
|
|||||||
21
Fraude/P1.aspx
Normal file
21
Fraude/P1.aspx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="P1.aspx.cs" Inherits="Fraude_P1" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Prevención y Detección de Fraudes
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<a href="P2.aspx"> <img src="P1.png" /></a>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
14
Fraude/P1.aspx.cs
Normal file
14
Fraude/P1.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class Fraude_P1 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Fraude/P1.png
Normal file
BIN
Fraude/P1.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 29 KiB |
21
Fraude/P2.aspx
Normal file
21
Fraude/P2.aspx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="P2.aspx.cs" Inherits="Fraude_P2" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Prevención y Detección de Fraudes
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<a href="P3.aspx"> <img src="P2.png" /></a>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
14
Fraude/P2.aspx.cs
Normal file
14
Fraude/P2.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class Fraude_P2 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Fraude/P2.png
Normal file
BIN
Fraude/P2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 26 KiB |
21
Fraude/P3.aspx
Normal file
21
Fraude/P3.aspx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="P3.aspx.cs" Inherits="Fraude_P3" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Prevención y Detección de Fraudes - Tablero
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<a href="P4.aspx"> <img src="P3.png" /></a>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
14
Fraude/P3.aspx.cs
Normal file
14
Fraude/P3.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class Fraude_P3 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Fraude/P3.png
Normal file
BIN
Fraude/P3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 34 KiB |
21
Fraude/P4.aspx
Normal file
21
Fraude/P4.aspx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="P4.aspx.cs" Inherits="Fraude_P4" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Prevención y Detección de Fraudes - Tablero - Compras - Mayo 2021
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<a href="P5.aspx"> <img src="P4.png" /></a>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
14
Fraude/P4.aspx.cs
Normal file
14
Fraude/P4.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class Fraude_P4 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Fraude/P4.png
Normal file
BIN
Fraude/P4.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 31 KiB |
21
Fraude/P5.aspx
Normal file
21
Fraude/P5.aspx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="P5.aspx.cs" Inherits="Fraude_P5" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Prevención y Detección de Fraudes - Tablero - Compras - Mayo 2021 – José Pérez Córdova
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<a href="P6.aspx"> <img src="P5.png" /></a>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
14
Fraude/P5.aspx.cs
Normal file
14
Fraude/P5.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class Fraude_P5 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Fraude/P5.png
Normal file
BIN
Fraude/P5.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
21
Fraude/P6.aspx
Normal file
21
Fraude/P6.aspx
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true" CodeFile="P6.aspx.cs" Inherits="Fraude_P6" %>
|
||||||
|
|
||||||
|
<asp:Content ID="Content1" ContentPlaceHolderID="CP" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content2" ContentPlaceHolderID="Css" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content3" ContentPlaceHolderID="E" Runat="Server">
|
||||||
|
Prevención y Detección de Fraudes - Matriz de Grado de Riesgo - Mayo 2021
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content4" ContentPlaceHolderID="HB" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content6" ContentPlaceHolderID="HA" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content7" ContentPlaceHolderID="C" Runat="Server">
|
||||||
|
<a href="P1.aspx"> <img src="P6.png" /></a>
|
||||||
|
</asp:Content>
|
||||||
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" Runat="Server">
|
||||||
|
</asp:Content>
|
||||||
|
|
||||||
14
Fraude/P6.aspx.cs
Normal file
14
Fraude/P6.aspx.cs
Normal file
@@ -0,0 +1,14 @@
|
|||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Linq;
|
||||||
|
using System.Web;
|
||||||
|
using System.Web.UI;
|
||||||
|
using System.Web.UI.WebControls;
|
||||||
|
|
||||||
|
public partial class Fraude_P6 : System.Web.UI.Page
|
||||||
|
{
|
||||||
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
BIN
Fraude/P6.png
Normal file
BIN
Fraude/P6.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 66 KiB |
@@ -3189,13 +3189,13 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not ErrorProceso Then
|
If Not ErrorProceso Then
|
||||||
DTAnticipoCliente.AcceptChanges()
|
DTAnticipoCliente.AcceptChanges()
|
||||||
End If
|
End If
|
||||||
End If
|
|
||||||
|
|
||||||
|
If Not AsignacionCuenta(ObjConta, 66, CveCuentaContable, -1, -1, CveCliente, -1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
|
ErrorProceso = True
|
||||||
|
Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
|
||||||
If Not AsignacionCuenta(ObjConta, 66, CveCuentaContable, -1, -1, CveCliente, -1, UsuarioActual.CveEmpresa, -1) Then
|
|
||||||
ErrorProceso = True
|
|
||||||
Alert("Se presento un error al guardar en asignaciones", TipoMensaje.MsgAdvertencia)
|
|
||||||
Exit For
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Anticipo/Cliente/SaldoInicial", 24, Importe, Importe, CveMoneda, Fecha, FolioStr, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
Dim CvePrePoliza As Integer = ObjConta.AddPrePolizas("Anticipo/Cliente/SaldoInicial", 24, Importe, Importe, CveMoneda, Fecha, FolioStr, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa)
|
||||||
|
|||||||
@@ -3372,6 +3372,12 @@ Partial Class Inventarios_RecepcionUsados
|
|||||||
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
Alert("Ya existe un consecutivo vigente en este folio", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TxtPUFactura.Text.ToDecimal() <= 0 Then
|
||||||
|
Alert("El P.U. debe ser mayor a 0", TipoMensaje.MsgAdvertencia)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
Dim IdConsecutivo As Integer = -1
|
Dim IdConsecutivo As Integer = -1
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.IdentityModel.Tokens.Jwt
|
Imports System.IdentityModel.Tokens.Jwt
|
||||||
Imports System.Security.Claims
|
Imports System.Security.Claims
|
||||||
|
Imports ADSNetLibrary.Application.Conexiones.Api
|
||||||
Imports ADSSession
|
Imports ADSSession
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.IdentityModel.Tokens
|
Imports Microsoft.IdentityModel.Tokens
|
||||||
@@ -206,12 +207,30 @@ Partial Class LogIn
|
|||||||
End If
|
End If
|
||||||
If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
If BtnLogIn_Clickenter = 0 Then 'esta variable se recicla con cada postaback
|
||||||
BtnLogIn_Clickenter = 1
|
BtnLogIn_Clickenter = 1
|
||||||
|
Dim tcveEmpresa As Integer = -1
|
||||||
|
Dim tGrupoEmpresa As String = ""
|
||||||
|
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tcveEmpresa = 13 : tGrupoEmpresa = "EMD"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tcveEmpresa = 140 : tGrupoEmpresa = "BDH"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tcveEmpresa = 141 : tGrupoEmpresa = "ECONOLLANTAS"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tcveEmpresa = 119 : tGrupoEmpresa = "JAM"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tcveEmpresa = 172 : tGrupoEmpresa = "CITRUS"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tcveEmpresa = 173 : tGrupoEmpresa = "KINO"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tcveEmpresa = 7 : tGrupoEmpresa = "VSH"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tcveEmpresa = 158 : tGrupoEmpresa = "AJAM"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tcveEmpresa = 183 : tGrupoEmpresa = "ALATEL"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tcveEmpresa = 153 : tGrupoEmpresa = "SERVEC"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tcveEmpresa = 186 : tGrupoEmpresa = "SMS"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tcveEmpresa = 188 : tGrupoEmpresa = "VYA"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tcveEmpresa = 189 : tGrupoEmpresa = "GRUPODIAZ"
|
||||||
|
'If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tcveEmpresa = 190 : tGrupoEmpresa = "FERRETERA"
|
||||||
|
|
||||||
Dim ObjUsuario As New ClsSisUsuarios
|
Dim ObjUsuario As New ClsSisUsuarios
|
||||||
Dim Usuario As Usuario = Nothing
|
Dim Usuario As Usuario = Nothing
|
||||||
'Dim UsuarioAsignaciones As Usuario = Nothing
|
'Dim UsuarioAsignaciones As Usuario = Nothing
|
||||||
|
|
||||||
Dim isgps As Boolean = Request.Url.Host.ToUpper().Contains("SIGNALSGPS".ToUpper())
|
Dim isgps As Boolean = Request.Url.Host.ToUpper().Contains("SIGNALSGPS".ToUpper())
|
||||||
Usuario = ObjUsuario.ValidaUsuario(txtUsuario.Text, Encripta(TxtContraseña.Text.Trim), IMEI, CvePlataforma:=If(isgps, 3, -1))
|
Usuario = ObjUsuario.ValidaUsuario(txtUsuario.Text, Encripta(TxtContraseña.Text.Trim), IMEI, GrupoEmpresa:=tGrupoEmpresa, CvePlataforma:=If(isgps, 3, -1))
|
||||||
'UsuarioAsignaciones = ObjUsuario.ValidaUsuarioAsignacion(Usuario.CveUsuario, Usuario.CveEmpresa)
|
'UsuarioAsignaciones = ObjUsuario.ValidaUsuarioAsignacion(Usuario.CveUsuario, Usuario.CveEmpresa)
|
||||||
If Not isgps AndAlso Usuario IsNot Nothing AndAlso Usuario.CvePlataforma = 3 Then ' SI ES de la plataforma 3(GPS), no debe de entar por liga normal
|
If Not isgps AndAlso Usuario IsNot Nothing AndAlso Usuario.CvePlataforma = 3 Then ' SI ES de la plataforma 3(GPS), no debe de entar por liga normal
|
||||||
Usuario = Nothing
|
Usuario = Nothing
|
||||||
@@ -224,21 +243,26 @@ Partial Class LogIn
|
|||||||
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
|
If Not Usuario.AutorizadoxIP OrElse (HddAdsCodex.Text.Length > 0 AndAlso Usuario.CodigoAutorizado = HddAdsCodex.Text) Then
|
||||||
|
|
||||||
If Usuario.CveRol = 1 Then
|
If Usuario.CveRol = 1 Then
|
||||||
Dim tcveEmpresa As Integer = Usuario.CveEmpresa
|
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tcveEmpresa = 13 : tGrupoEmpresa = "EMD"
|
||||||
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tcveEmpresa = 140
|
If Request.Url.Host.ToUpper().Contains("BDH".ToUpper()) Then tcveEmpresa = 140 : tGrupoEmpresa = "BDH"
|
||||||
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tcveEmpresa = 141
|
If Request.Url.Host.ToUpper().Contains("ECONOLLANTAS".ToUpper()) Then tcveEmpresa = 141 : tGrupoEmpresa = "ECONOLLANTAS"
|
||||||
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tcveEmpresa = 119
|
If Request.Url.Host.ToUpper().Contains("JAM".ToUpper()) Then tcveEmpresa = 119 : tGrupoEmpresa = "JAM"
|
||||||
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tcveEmpresa = 172
|
If Request.Url.Host.ToUpper().Contains("CITRUS".ToUpper()) Then tcveEmpresa = 172 : tGrupoEmpresa = "CITRUS"
|
||||||
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tcveEmpresa = 173
|
If Request.Url.Host.ToUpper().Contains("KINO".ToUpper()) Then tcveEmpresa = 173 : tGrupoEmpresa = "KINO"
|
||||||
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tcveEmpresa = 7
|
If Request.Url.Host.ToUpper().Contains("VSH".ToUpper()) Then tcveEmpresa = 7 : tGrupoEmpresa = "VSH"
|
||||||
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tcveEmpresa = 158
|
If Request.Url.Host.ToUpper().Contains("AJAM".ToUpper()) Then tcveEmpresa = 158 : tGrupoEmpresa = "AJAM"
|
||||||
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tcveEmpresa = 183
|
If Request.Url.Host.ToUpper().Contains("ALATEL".ToUpper()) Then tcveEmpresa = 183 : tGrupoEmpresa = "ALATEL"
|
||||||
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tcveEmpresa = 153
|
If Request.Url.Host.ToUpper().Contains("SERVEC".ToUpper()) Then tcveEmpresa = 153 : tGrupoEmpresa = "SERVEC"
|
||||||
If Request.Url.Host.ToUpper().Contains("EMD".ToUpper()) Then tcveEmpresa = 13
|
If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tcveEmpresa = 186 : tGrupoEmpresa = "SMS"
|
||||||
If Request.Url.Host.ToUpper().Contains("SMS".ToUpper()) Then tcveEmpresa = 186
|
If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tcveEmpresa = 188 : tGrupoEmpresa = "VYA"
|
||||||
If Request.Url.Host.ToUpper().Contains("VYA".ToUpper()) Then tcveEmpresa = 188
|
If Request.Url.Host.ToUpper().Contains("GRUPODIAZ".ToUpper()) Then tcveEmpresa = 189 : tGrupoEmpresa = "GRUPODIAZ"
|
||||||
|
If Request.Url.Host.ToUpper().Contains("FERRETERA".ToUpper()) Then tcveEmpresa = 190 : tGrupoEmpresa = "FERRETERA"
|
||||||
|
End If
|
||||||
|
|
||||||
|
If tcveEmpresa > 0 Then
|
||||||
Usuario.CveEmpresa = tcveEmpresa
|
Usuario.CveEmpresa = tcveEmpresa
|
||||||
End If
|
End If
|
||||||
|
|
||||||
CreaObjetoEmpresa(Usuario)
|
CreaObjetoEmpresa(Usuario)
|
||||||
ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
ADSSessionConfig.sessionUser.MultipleEmpresa = True
|
||||||
|
|
||||||
|
|||||||
@@ -232,7 +232,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-4">
|
||||||
<div class="form-group form-md-line-input">
|
<div class="form-group form-md-line-input">
|
||||||
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
@@ -242,6 +242,9 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCERFVDdlTema" runat="server" TargetControlID="RFVDdlTema" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCERFVDdlTema" runat="server" TargetControlID="RFVDdlTema" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
@@ -258,11 +261,40 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
|
|
||||||
<%--<script src="/Metronic/assets/global/plugins/GantJS/jsgantt.js" type="text/javascript"></script>--%>
|
|
||||||
|
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpModalTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" onclick="closeModal()" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
||||||
|
<h4 class="modal-title" style="text-align: left">
|
||||||
|
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
|
||||||
|
<button id="BtnCerrarModalTema" onclick="closeModal()" class="btn btn-default">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
|
||||||
|
<script src="/Metronic/assets/global/plugins/dhtmlxgantt/dhtmlxgantt.js"></script>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
let RCveEvento =<%= RCveEvento %>;
|
let RCveEvento =<%= RCveEvento %>;
|
||||||
@@ -576,5 +608,12 @@
|
|||||||
CargaPickers();
|
CargaPickers();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
|
<script type="text/javascript">
|
||||||
|
function closeModal() {
|
||||||
|
$('#divModalAgregartema').modal('hide');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -21,6 +21,7 @@ public partial class OI_Proyecto : ClsPaginas
|
|||||||
|
|
||||||
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
|
public List<int> LCveUsuarioCCP { get { if (ViewState["LCveUsuarioCCP"] == null) { ViewState["LCveUsuarioCCP"] = new List<int>(); } return (List<int>)ViewState["LCveUsuarioCCP"]; } set { ViewState["LCveUsuarioCCP"] = value; } }
|
||||||
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
|
public List<int> LcveuserVisto { get { if (ViewState["LcveuserVisto"] == null) { ViewState["LcveuserVisto"] = new List<int>(); } return (List<int>)ViewState["LcveuserVisto"]; } set { ViewState["LcveuserVisto"] = value; } }
|
||||||
|
public const string iddivAgregarTema = "divModalAgregartema";
|
||||||
|
|
||||||
#endregion
|
#endregion
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
@@ -355,4 +356,48 @@ public partial class OI_Proyecto : ClsPaginas
|
|||||||
UpModalProyecto.Update();
|
UpModalProyecto.Update();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region TEMAS
|
||||||
|
|
||||||
|
protected void LnkAddTtemaB_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BtnAgregarTema_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (ClsOIEventos objoi = new ClsOIEventos())
|
||||||
|
{
|
||||||
|
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
Alert(string.Format("El Tema \"{0}\" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
|
RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
|
||||||
|
TxtTema.Text = "";
|
||||||
|
set_GlobalDTOIRevision(UsuarioActual.CveEmpresa, objoi.DtResultados);
|
||||||
|
CargaTemas();
|
||||||
|
|
||||||
|
UpModalTema.Update();
|
||||||
|
UpModalProyecto.Update();
|
||||||
|
|
||||||
|
}
|
||||||
|
else { Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError); }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CargaTemas()
|
||||||
|
{
|
||||||
|
DdlTema.ClearSelection();
|
||||||
|
DdlTema.SelectedValue = null;
|
||||||
|
DdlTema.Items.Clear();
|
||||||
|
|
||||||
|
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
|
||||||
|
DdlTema.DataBind();
|
||||||
|
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
}
|
}
|
||||||
@@ -178,7 +178,7 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCOPrio" runat="server" TargetControlID="RFVPrioridad" HighlightCssClass="vco" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-sm-6">
|
<div class="col-sm-4">
|
||||||
<div class="form-group form-md-line-input">
|
<div class="form-group form-md-line-input">
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
<asp:DropDownList ID="DdlTema" runat="server" CssClass="form-control select2me input-sm" DataValueField="CveRevision" DataTextField="Revision" Width="100%">
|
||||||
@@ -193,6 +193,9 @@
|
|||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-sm-2">
|
||||||
|
<asp:LinkButton ID="LnkAddTtemaB" OnClick="LnkAddTtemaB_Click" runat="server" CssClass="btn btn-default" Style="margin-top: 15px;"><i class="fa fa-plus"></i></asp:LinkButton>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</asp:Panel>
|
</asp:Panel>
|
||||||
@@ -208,6 +211,32 @@
|
|||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpModalTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" onclick="closeModal()" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
||||||
|
<h4 class="modal-title" style="text-align: left">
|
||||||
|
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
|
||||||
|
<button id="BtnCerrarModalTema" onclick="closeModal()" class="btn btn-default">Cerrar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content8" ContentPlaceHolderID="JS" runat="Server">
|
||||||
<script>
|
<script>
|
||||||
@@ -256,5 +285,10 @@
|
|||||||
CargaPickers();
|
CargaPickers();
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
|
<script type="text/javascript">
|
||||||
|
function closeModal() {
|
||||||
|
$('#divModalAgregartema').modal('hide');
|
||||||
|
}
|
||||||
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|
||||||
|
|||||||
@@ -10,6 +10,7 @@ public partial class OI_RepProyectos : ClsPaginas
|
|||||||
{
|
{
|
||||||
#region Propiedades
|
#region Propiedades
|
||||||
public const string iddivAgregarProyecto = "iddivAgregarProyecto";
|
public const string iddivAgregarProyecto = "iddivAgregarProyecto";
|
||||||
|
public const string iddivAgregarTema = "divModalAgregartema";
|
||||||
#endregion
|
#endregion
|
||||||
protected void Page_Load(object sender, EventArgs e)
|
protected void Page_Load(object sender, EventArgs e)
|
||||||
{
|
{
|
||||||
@@ -21,9 +22,11 @@ public partial class OI_RepProyectos : ClsPaginas
|
|||||||
|
|
||||||
DdlPara.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
DdlPara.Items.Insert(0, new ListItem("Seleccione uno", "-1"));
|
||||||
|
|
||||||
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
|
|
||||||
DdlTema.DataBind();
|
CargaTemas();
|
||||||
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
//DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
|
||||||
|
//DdlTema.DataBind();
|
||||||
|
//DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
cargar();
|
cargar();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -196,4 +199,50 @@ public partial class OI_RepProyectos : ClsPaginas
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#region TEMAS
|
||||||
|
|
||||||
|
protected void LnkAddTtemaB_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
RegistraScript(string.Format("$('#{0}').modal()", iddivAgregarTema));
|
||||||
|
}
|
||||||
|
|
||||||
|
protected void BtnAgregarTema_Click(object sender, EventArgs e)
|
||||||
|
{
|
||||||
|
|
||||||
|
using (ClsOIEventos objoi = new ClsOIEventos())
|
||||||
|
{
|
||||||
|
if (objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa))
|
||||||
|
{
|
||||||
|
Alert(string.Format("El Tema \"{0}\" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion);
|
||||||
|
RegistraScript(string.Format("$('#{0}').modal('hide')", iddivAgregarTema));
|
||||||
|
TxtTema.Text = "";
|
||||||
|
set_GlobalDTOIRevision(UsuarioActual.CveEmpresa, objoi.DtResultados);
|
||||||
|
CargaTemas();
|
||||||
|
|
||||||
|
UpModalTema.Update();
|
||||||
|
UpModalProyecto.Update();
|
||||||
|
|
||||||
|
}
|
||||||
|
else { Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError); }
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
private void CargaTemas()
|
||||||
|
{
|
||||||
|
DdlTema.ClearSelection();
|
||||||
|
DdlTema.SelectedValue = null;
|
||||||
|
DdlTema.Items.Clear();
|
||||||
|
|
||||||
|
DdlTema.DataSource = get_GlobalDTOIRevision(UsuarioActual.CveEmpresa).FiltraParametros(string.Format("CveUsuario = {0}", UsuarioActual.CveUsuario));
|
||||||
|
DdlTema.DataBind();
|
||||||
|
DdlTema.Items.Insert(0, new ListItem("Seleccione", "-1"));
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@@ -655,6 +655,7 @@
|
|||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
|
<div id='<%= iddivAgregarTema %>' class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog">
|
<div class="modal-dialog">
|
||||||
<asp:UpdatePanel ID="UpdatePanel1" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpdatePanel1" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
|||||||
@@ -23,7 +23,8 @@
|
|||||||
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
<asp:Content ID="Content6" ContentPlaceHolderID="C" runat="Server">
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveChecador,Checador,CveModelo,CveSubProyecto,SubProyecto,CveUsuario,Estatus,FechaIng,IPLocal,Puerto" EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveChecador,Checador,CveModelo,CveSubProyecto,SubProyecto,CveUsuario,Estatus,FechaIng,IPLocal,Puerto"
|
||||||
|
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Checador" DataField="Checador" />
|
<asp:BoundField HeaderText="Checador" DataField="Checador" />
|
||||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
|
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
|
||||||
@@ -53,28 +54,34 @@
|
|||||||
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Checadores</asp:Literal></h4>
|
<asp:Literal ID="LtlTituloModalTiposD" runat="server">Checadores</asp:Literal></h4>
|
||||||
</div>
|
</div>
|
||||||
<div class="modal-body">
|
<div class="modal-body">
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtChecador" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtChecador" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtChecador" runat="server" ControlToValidate="TxtChecador" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Checador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtChecador" runat="server" ControlToValidate="TxtChecador" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Checador''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<label for="TxtChecador">Checador:</label>
|
<label for="TxtChecador">Checador:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<label for="DdlSubProyecto">Subproyecto:</label>
|
|
||||||
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="select2me">
|
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlSubProyecto" Width="100%" runat="server" AppendDataBoundItems="true" DataValueField="CveSubProyecto" DataTextField="SubProyecto" ValidationGroup="GrpGuardar" CssClass="form-control select2me">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVDdlSubProyecto" runat="server" ControlToValidate="DdlSubProyecto" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Sub Proyecto''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCODdlSubProyecto" runat="server" HighlightCssClass="vco" TargetControlID="RFVDdlSubProyecto" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="DdlSubProyecto"><asp:label runat="server" ID="LblSubProyecto" for="DdlSubProyecto">Subproyecto:</asp:label>:</label>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<label for="DdlModelo">Modelo:</label>
|
<asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="form-control select2me">
|
||||||
<asp:DropDownList ID="DdlModelo" Width="100%" runat="server" AppendDataBoundItems="true" ValidationGroup="GrpGuardar" CssClass="select2me">
|
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
||||||
<asp:ListItem Text="zkteco" Value="1"></asp:ListItem>
|
<asp:ListItem Text="zkteco" Value="1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RfvDdlModelo" runat="server" ControlToValidate="DdlModelo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvDdlModelo" runat="server" ControlToValidate="DdlModelo" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Modelo''</b> es necesario, por favor ingréselo." InitialValue="-1" ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VceDdlModelo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VceDdlModelo" runat="server" HighlightCssClass="vco" TargetControlID="RfvDdlModelo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
|
<label for="DdlModelo">Modelo:</label>
|
||||||
<i></i>
|
<i></i>
|
||||||
</div>
|
</div>
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
@@ -97,32 +104,8 @@
|
|||||||
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Text=" " />
|
<asp:CheckBox runat="server" ID="ChkEstatus" CssClass="make-switchsd" data-size="small" Text=" " />
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</br>
|
|
||||||
</br>
|
|
||||||
<div class="row">
|
|
||||||
<div class="row">
|
|
||||||
<div class="col-md-12">
|
|
||||||
<asp:GridView ID="GvChecadorSubProyectos" runat="server" AutoGenerateColumns="False" OnRowDataBound="GvChecadorSubProyectos_RowDataBound" Width="90%"
|
|
||||||
DataKeyNames="CveSubProyecto,CveChecador"
|
|
||||||
EmptyDataText="No se encontraron Tipo Gasto" ToolTip="Listado de Tipo Gasto " CssClass="table table-striped table-advance table-hover" Style="margin-top: -10px; width: 100%" GridLines="None">
|
|
||||||
<Columns>
|
|
||||||
<asp:BoundField HeaderText="SubProyecto" DataField="SubProyecto" />
|
|
||||||
<asp:BoundField HeaderText="Usuario" DataField="Usuario" />
|
|
||||||
<asp:BoundField HeaderText="Fecha" DataField="FechaIng" DataFormatString="{0:d}" />
|
|
||||||
<asp:TemplateField>
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:CheckBox ID="Chk" runat="server" />
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
</Columns>
|
|
||||||
</asp:GridView>
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</br>
|
</br>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
|
|||||||
@@ -26,8 +26,9 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
{
|
{
|
||||||
if (!IsPostBack)
|
if (!IsPostBack)
|
||||||
{
|
{
|
||||||
CargaDatos();
|
|
||||||
CargaSubProyectos();
|
CargaSubProyectos();
|
||||||
|
CargaDatos();
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,14 +39,19 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
{
|
{
|
||||||
GvDatos.DataSource = ObjRH.DtResultados;
|
GvDatos.DataSource = ObjRH.DtResultados;
|
||||||
}
|
}
|
||||||
|
|
||||||
ObjRH.Dispose();
|
ObjRH.Dispose();
|
||||||
GvDatos.DataBind();
|
GvDatos.DataBind();
|
||||||
|
GvDatos.HeaderRow.Cells[1].Text = LblSubProyecto.Text;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void CargaSubProyectos()
|
private void CargaSubProyectos()
|
||||||
{
|
{
|
||||||
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
DdlSubProyecto.DataSource = get_GlobalDTSubProyectos(-1, CveEmpresa: UsuarioActual.CveEmpresa);
|
||||||
DdlSubProyecto.DataBind();
|
DdlSubProyecto.DataBind();
|
||||||
|
|
||||||
|
CargarCentrosDeCosto(null, DdlSubProyecto,null, LblSubProyecto);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void BtnAgregarChecador_Click(object sender, EventArgs e)
|
protected void BtnAgregarChecador_Click(object sender, EventArgs e)
|
||||||
@@ -58,10 +64,6 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
BtnChecadorAgregar.Text = "Agregar";
|
BtnChecadorAgregar.Text = "Agregar";
|
||||||
divChkEstatus.Visible = false;
|
divChkEstatus.Visible = false;
|
||||||
|
|
||||||
GvChecadorSubProyectos.DataSource = null;
|
|
||||||
GvChecadorSubProyectos.DataBind();
|
|
||||||
GvChecadorSubProyectos.Visible = false;
|
|
||||||
|
|
||||||
UpModalTiposD.Update();
|
UpModalTiposD.Update();
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||||
}
|
}
|
||||||
@@ -79,38 +81,11 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// bool errorProceso = false;
|
|
||||||
//ObjRH.IniciaTransacSQL();
|
|
||||||
|
|
||||||
if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked, CveModelo: DdlModelo.SelectedValue.ToEntero()))
|
if (ObjRH.UpdateChecadores(CveChecador,TxtChecador.Text,DdlSubProyecto.SelectedValue.ToEntero(),TxtIPLocal.Text,TxtPuerto.Text,Estatus: ChkEstatus.Checked, CveModelo: DdlModelo.SelectedValue.ToEntero()))
|
||||||
{
|
{
|
||||||
Alert("Checador actualizado correctamente");
|
Alert("Checador actualizado correctamente");
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach(GridViewRow GvRow in GvChecadorSubProyectos.Rows)
|
|
||||||
{
|
|
||||||
if(GvRow.RowType == DataControlRowType.DataRow)
|
|
||||||
{
|
|
||||||
CheckBox Chk = GvRow.FCCheckBox("Chk");
|
|
||||||
if (!ObjRH.AddRemoveChecadoresSubProyectos(CveChecador, GvRow.DataKey("CveSubProyecto").ToEntero(), UsuarioActual.CveUsuario, Chk.Checked))
|
|
||||||
{
|
|
||||||
//errorProceso = true;
|
|
||||||
Alert("Ocurrió un error.",ModExtensiones.TipoMensaje.MsgError);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
//if (errorProceso)
|
|
||||||
//{
|
|
||||||
// ObjRH.RollBack();
|
|
||||||
//}
|
|
||||||
//else
|
|
||||||
//{
|
|
||||||
// ObjRH.Commit();
|
|
||||||
//}
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
ObjRH.Dispose();
|
ObjRH.Dispose();
|
||||||
CargaDatos();
|
CargaDatos();
|
||||||
@@ -133,21 +108,6 @@ public partial class RH_CatChecadores : ClsPaginas
|
|||||||
ChkEstatus.Checked = GvRow.DataKey("Estatus") == "Activo";
|
ChkEstatus.Checked = GvRow.DataKey("Estatus") == "Activo";
|
||||||
divChkEstatus.Visible = true;
|
divChkEstatus.Visible = true;
|
||||||
|
|
||||||
GvChecadorSubProyectos.Visible = true;
|
|
||||||
|
|
||||||
ClsRH objRH = new ClsRH();
|
|
||||||
|
|
||||||
if (objRH.GetChecadoresSubProyectos(CveChecador, UsuarioActual.CveEmpresa))
|
|
||||||
{
|
|
||||||
GvChecadorSubProyectos.DataSource = objRH.DtResultados;
|
|
||||||
}
|
|
||||||
|
|
||||||
GvChecadorSubProyectos.DataBind();
|
|
||||||
objRH.Dispose();
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
UpModalTiposD.Update();
|
UpModalTiposD.Update();
|
||||||
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
RegistraScript(String.Format("$('#{0}').modal();", "DivAgregarTiposD"));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -102,7 +102,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="UpDatos" runat="server" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros"
|
<asp:GridView ID="GVRegDatos" runat="server" AutoGenerateColumns="false" EmptyDataText="No se encontraron registros" DataKeyNames="CvePersonal,NombreCompleto"
|
||||||
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
CssClass="ADSCROLLER2 table table-striped table-advance table-hover Widthall" data-rows="1" data-cols="3" data-heightmenos="100" data-heightfijo="600" Style="text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
<asp:TemplateField HeaderText="Codigo" ItemStyle-HorizontalAlign="Left" >
|
||||||
@@ -309,7 +309,7 @@
|
|||||||
<tr>
|
<tr>
|
||||||
<td></td>
|
<td></td>
|
||||||
<td>
|
<td>
|
||||||
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias"></asp:DropDownList></td>
|
<asp:DropDownList ID="DdlAsistenciaInacistencia" Width="150" runat="server" CssClass="select2me" DataTextField="Tipo" DataValueField="CveAsistenciasInasistencias" ></asp:DropDownList></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
@@ -330,6 +330,8 @@
|
|||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
@@ -337,8 +339,8 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="modal-footer">
|
<div class="modal-footer">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<asp:Button ID="BtnGuardar" Visible="true" runat="server" Text="Guardar" class="btn btn-primary" OnClick="BtnGuardar_Click" />
|
||||||
<asp:Button ID="BtnEstusAsistenciaModal" runat="server" class="btn btn-success" Text="Aceptar" ValidationGroup="GrpAsistencia" />
|
<asp:Button ID="BtnEstusAsistenciaModal" Visible="false" runat="server" class="btn btn-success" Text="Aceptar" />
|
||||||
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
<button id="Button4" runat="server" type="button" class="btn default" data-dismiss="modal">Cerrar</button>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -383,10 +385,7 @@
|
|||||||
|
|
||||||
<ajax:ValidatorCalloutExtender ID="RfvcRfvTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="RfvcRfvTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="RfvTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
<ajax:ValidatorCalloutExtender ID="CVCCVTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="CVCCVTxtFechaModal" runat="server" HighlightCssClass="vco" TargetControlID="CVTxtFechaModal" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
|
</td></tr>
|
||||||
|
|
||||||
</td></tr>
|
|
||||||
|
|
||||||
</table>
|
</table>
|
||||||
|
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
|
|||||||
@@ -126,6 +126,33 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Private Property CvePersonalSeleccionado As Integer
|
||||||
|
Get
|
||||||
|
If ViewState("CvePersonalSeleccionado") Is Nothing Then
|
||||||
|
ViewState("CvePersonalSeleccionado") = -1
|
||||||
|
End If
|
||||||
|
Return ViewState("CvePersonalSeleccionado").ToString.ToEntero
|
||||||
|
End Get
|
||||||
|
Set(value As Integer)
|
||||||
|
ViewState("CvePersonalSeleccionado") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
Public Property FechaSeleccionada As Date
|
||||||
|
Get
|
||||||
|
If ViewState("FechaSeleccionada") Is Nothing Then
|
||||||
|
ViewState("FechaSeleccionada") = MinFecha
|
||||||
|
End If
|
||||||
|
Return ViewState("FechaSeleccionada").ToString.ToDate
|
||||||
|
End Get
|
||||||
|
Set(value As Date)
|
||||||
|
ViewState("FechaSeleccionada") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
Private Sub RH_RepChecadorIncidencias_Load(sender As Object, e As EventArgs) Handles Me.Load
|
||||||
@@ -408,20 +435,20 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
DTAsistenciasInasistencias = objRH.DtResultados
|
DTAsistenciasInasistencias = objRH.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
'If objRH.ChecadorPreAsistenciaRegistrosAsistenciasGet(CveTipoPeriodo, FechaInicioPeriodo, FechaFinPeriodo, UsuarioActual.Empresa.CveEmpresa) Then
|
||||||
DTAsistenciasInasistenciasReg = objRH.DtResultados
|
' DTAsistenciasInasistenciasReg = objRH.DtResultados
|
||||||
|
|
||||||
If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
' If DTAsistenciasInasistenciasReg.Rows.Count > 0 Then
|
||||||
BtnAgregar.Visible = False
|
' BtnAgregar.Visible = False
|
||||||
BtnEstusAsistenciaModal.Visible = False
|
' BtnEstusAsistenciaModal.Visible = False
|
||||||
DdlAsistenciaInacistencia.Enabled = False
|
' 'DdlAsistenciaInacistencia.Enabled = False
|
||||||
Else
|
' Else
|
||||||
BtnAgregar.Visible = True
|
' BtnAgregar.Visible = True
|
||||||
BtnEstusAsistenciaModal.Visible = True
|
' BtnEstusAsistenciaModal.Visible = True
|
||||||
DdlAsistenciaInacistencia.Enabled = True
|
' 'DdlAsistenciaInacistencia.Enabled = True
|
||||||
End If
|
' End If
|
||||||
UpAgregar.Update()
|
' UpAgregar.Update()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
objRH.Dispose()
|
objRH.Dispose()
|
||||||
|
|
||||||
@@ -1499,7 +1526,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = ""
|
If arrayComands.Length > 1 Then Filtro = arrayComands(1) Else Filtro = ""
|
||||||
|
|
||||||
lnkLink.CommandArgument = lnkLink.Text
|
lnkLink.CommandArgument = $"{lnkLink.Text}|{e.Row.DataKey("CvePersonal")}|{e.Row.DataKey("NombreCompleto")}"
|
||||||
|
|
||||||
If Instruccion = "-" Then
|
If Instruccion = "-" Then
|
||||||
lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>"
|
lnkLink.Text = "<i class='fa fa-check-square' aria-hidden='true'></i>"
|
||||||
@@ -1620,6 +1647,8 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
Public Sub DetalleDia_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
|
CvePersonalSeleccionado = -1
|
||||||
|
|
||||||
Dim lnkLinkSender As LinkButton = DirectCast(sender, LinkButton)
|
Dim lnkLinkSender As LinkButton = DirectCast(sender, LinkButton)
|
||||||
Dim DTDatos As New DataTable
|
Dim DTDatos As New DataTable
|
||||||
Dim DTTipoAsistenciaInasistencia As DataTable
|
Dim DTTipoAsistenciaInasistencia As DataTable
|
||||||
@@ -1640,6 +1669,10 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
objRH.Dispose()
|
objRH.Dispose()
|
||||||
|
|
||||||
Instruccion = arrayComands(0)
|
Instruccion = arrayComands(0)
|
||||||
|
CvePersonalSeleccionado = arrayComands(2).ToEntero
|
||||||
|
|
||||||
|
LtlAsistenciaHorariosModal.Text = arrayComands(3)
|
||||||
|
|
||||||
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
|
DTTipoAsistenciaInasistencia = GlobalDTAsistenciasInasistencias(UsuarioActual.CveEmpresa).FiltraParametros(" TipoCorto = '" & Instruccion & "' ")
|
||||||
|
|
||||||
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
If DTTipoAsistenciaInasistencia.Rows.Count > 0 Then
|
||||||
@@ -1662,6 +1695,7 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
|
|
||||||
DTDatos = DtResultados.FiltraParametros(Filtro)
|
DTDatos = DtResultados.FiltraParametros(Filtro)
|
||||||
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
|
lblModalFecha.Text = DTDatos(0)("Fecha").ToString().ToDate.ToString("dd/MM/yyyy")
|
||||||
|
FechaSeleccionada = DTDatos(0)("Fecha").ToString().ToDate
|
||||||
|
|
||||||
lnkModalImg.Text = ""
|
lnkModalImg.Text = ""
|
||||||
|
|
||||||
@@ -1949,4 +1983,18 @@ Partial Class RH_RepChecadorPreAsistencia
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnGuardar_Click(sender As Object, e As EventArgs)
|
||||||
|
If DdlAsistenciaInacistencia.SelectedValue.ToEntero > 0 Then
|
||||||
|
Dim ObjPersonal As New ClsRH
|
||||||
|
If ObjPersonal.AddAsistencia(CvePersonalSeleccionado, -1, DdlSubProyecto.SelectedValue.ToEntero, FechaSeleccionada,
|
||||||
|
DdlAsistenciaInacistencia.SelectedValue.ToEntero, 100, 0, 0, -1, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, "C") Then
|
||||||
|
Alert("Registro Actualziado Correctamente.")
|
||||||
|
|
||||||
|
End If
|
||||||
|
ObjPersonal.Dispose()
|
||||||
|
End If
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
@@ -66,6 +66,7 @@
|
|||||||
<asp:ListItem Text="GlobalDTVendedoresOld" Value="GlobalDTVendedoresOld"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTVendedoresOld" Value="GlobalDTVendedoresOld"></asp:ListItem>
|
||||||
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTAC" Value="GlobalDTAC"></asp:ListItem>
|
||||||
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
|
<asp:ListItem Text="GlobalDTSATUsosCFDI" Value="GlobalDTSATUsosCFDI"></asp:ListItem>
|
||||||
|
<asp:ListItem Text="GlobalDTVtaCondicionesEntrega" Value="GlobalDTVtaCondicionesEntrega"></asp:ListItem>
|
||||||
|
|
||||||
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
|
|||||||
@@ -109,7 +109,8 @@ Partial Class Sistemas_CatSesiones
|
|||||||
cargaAC()
|
cargaAC()
|
||||||
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSATUsosCFDI" Then
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTSATUsosCFDI" Then
|
||||||
CargaUsosCFDI()
|
CargaUsosCFDI()
|
||||||
|
ElseIf DdlVariable.SelectedItem.Value = "GlobalDTVtaCondicionesEntrega" Then
|
||||||
|
CargaCondicionesEntrega()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -289,7 +290,9 @@ Partial Class Sistemas_CatSesiones
|
|||||||
|
|
||||||
'Fin Carga Usuarios
|
'Fin Carga Usuarios
|
||||||
End Sub
|
End Sub
|
||||||
|
Private Sub CargaCondicionesEntrega()
|
||||||
|
GlobalDTVtaCondicionesEntrega(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaProductosServiciosSimplificado()
|
Private Sub CargaProductosServiciosSimplificado()
|
||||||
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
GlobalDTPSSimplificado(UsuarioActual.CveEmpresa) = Nothing
|
||||||
|
|||||||
@@ -34,18 +34,10 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
<asp:TextBox ID="TxtAPaterno" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
<asp:TextBox ID="TxtAPellidos" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtAPaterno" runat="server" ControlToValidate="TxtAPaterno" CssClass="help-block errorimput"
|
<asp:RequiredFieldValidator ID="RfvTxtAPellidos" runat="server" ControlToValidate="TxtAPellidos" CssClass="help-block errorimput"
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Paterno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Paterno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtAPaterno.ClientID.ToString()%>">Apellido Paterno:</label>
|
<label for="<%= TxtAPellidos.ClientID.ToString()%>">Apellidos:</label>
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
|
||||||
<asp:TextBox ID="TxtAMaterno" CssClass="form-control " runat="server" MaxLength="100" CausesValidation="true"></asp:TextBox>
|
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtAMaterno" runat="server" ControlToValidate="TxtAMaterno" CssClass="help-block errorimput"
|
|
||||||
ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Apellido Materno''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
|
||||||
<label for="<%= TxtAMaterno.ClientID.ToString()%>">Apellido Materno:</label>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
@@ -56,10 +48,10 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div class="form-group form-md-line-input input-iconright">
|
<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:TextBox ID="TxtCedulaProfesional" CssClass="form-control " runat="server" MaxLength="50" CausesValidation="true"></asp:TextBox>
|
||||||
<asp:RequiredFieldValidator ID="RfvTxtCedulaProfecional" runat="server" ControlToValidate="TxtCedulaProfecional" CssClass="help-block errorimput"
|
<asp:RequiredFieldValidator ID="RfvTxtCedulaProfesional" runat="server" ControlToValidate="TxtCedulaProfesional" 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="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
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="GrpGuardarMedico"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= TxtCedulaProfecional.ClientID.ToString()%>">Cédula Profesional:</label>
|
<label for="<%= TxtCedulaProfesional.ClientID.ToString()%>">Cédula Profesional:</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
|
|||||||
@@ -161,9 +161,8 @@ Partial Class UserControl_AddMedico
|
|||||||
LtlTituloModal.Text = "Agregar Médico"
|
LtlTituloModal.Text = "Agregar Médico"
|
||||||
|
|
||||||
TxtNombre.Text = ""
|
TxtNombre.Text = ""
|
||||||
TxtAPaterno.Text = ""
|
TxtAPellidos.Text = ""
|
||||||
TxtAMaterno.Text = ""
|
TxtCedulaProfesional.Text = ""
|
||||||
TxtCedulaProfecional.Text = ""
|
|
||||||
TxtFechaNacimiento.Text = ""
|
TxtFechaNacimiento.Text = ""
|
||||||
TxtNotas.Text = ""
|
TxtNotas.Text = ""
|
||||||
TxtMail.Text = ""
|
TxtMail.Text = ""
|
||||||
@@ -209,7 +208,7 @@ Partial Class UserControl_AddMedico
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub PreparaEdicion(CveMedicoEditar As Integer, Nombre As String, APaterno As String, AMaterno As String, CedulaProfecional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean,
|
Public Sub PreparaEdicion(CveMedicoEditar As Integer, Nombre As String, Apellidos As String, CedulaProfesional As String, FechaNacimiento As Date, Notas As String, Estatus As Boolean,
|
||||||
Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, FechaIng As DateTime, Usuario As String, CveVendedor As Integer)
|
Mail As String, Telefono As String, Celular As String, CveMedicoEspecialidad As Integer, CveMedicoSubEspecialidad As Integer, FechaIng As DateTime, Usuario As String, CveVendedor As Integer)
|
||||||
|
|
||||||
CargaCombos()
|
CargaCombos()
|
||||||
@@ -217,9 +216,8 @@ Partial Class UserControl_AddMedico
|
|||||||
|
|
||||||
CveMedico = CveMedicoEditar
|
CveMedico = CveMedicoEditar
|
||||||
TxtNombre.Text = Nombre
|
TxtNombre.Text = Nombre
|
||||||
TxtAPaterno.Text = APaterno
|
TxtAPellidos.Text = Apellidos
|
||||||
TxtAMaterno.Text = AMaterno
|
TxtCedulaProfesional.Text = CedulaProfesional
|
||||||
TxtCedulaProfecional.Text = CedulaProfecional
|
|
||||||
TxtFechaNacimiento.Text = FechaNacimiento.ToString("dd/MM/yyyy")
|
TxtFechaNacimiento.Text = FechaNacimiento.ToString("dd/MM/yyyy")
|
||||||
TxtNotas.Text = Notas
|
TxtNotas.Text = Notas
|
||||||
ChkEstatus.Checked = Estatus
|
ChkEstatus.Checked = Estatus
|
||||||
@@ -238,7 +236,7 @@ Partial Class UserControl_AddMedico
|
|||||||
|
|
||||||
DVEstatus.Visible = True
|
DVEstatus.Visible = True
|
||||||
LbAgregar.Text = "Actualizar"
|
LbAgregar.Text = "Actualizar"
|
||||||
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfecional.Text}"
|
LtlTituloModal.Text = $"Actualizar Médico {TxtCedulaProfesional.Text}"
|
||||||
|
|
||||||
UpModal.Update()
|
UpModal.Update()
|
||||||
|
|
||||||
@@ -258,13 +256,13 @@ Partial Class UserControl_AddMedico
|
|||||||
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
|
Dim Celular As String = If(TxtCelular.Text = "(___) ___-____", "", TxtCelular.Text)
|
||||||
|
|
||||||
If CveMedico > 0 Then
|
If CveMedico > 0 Then
|
||||||
If ObjVentas.UpdateMedico(CveMedico, TxtNombre.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked,
|
If ObjVentas.UpdateMedico(CveMedico, TxtNombre.Text.Trim, TxtAPellidos.Text.Trim, TxtCedulaProfesional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked,
|
||||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero) Then
|
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero) Then
|
||||||
ProcesoOK = True
|
ProcesoOK = True
|
||||||
End If
|
End If
|
||||||
Else
|
Else
|
||||||
|
|
||||||
CveMedicoNuevo = ObjVentas.AddMedico(TxtNombre.Text.Trim, TxtAPaterno.Text.Trim, TxtAMaterno.Text.Trim, TxtCedulaProfecional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked,
|
CveMedicoNuevo = ObjVentas.AddMedico(TxtNombre.Text.Trim, TxtAPellidos.Text.Trim, TxtCedulaProfesional.Text.Trim, TxtFechaNacimiento.Text.ToDate, TxtNotas.Text.Trim, ChkEstatus.Checked,
|
||||||
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero)
|
UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Telefono, TxtMail.Text, DdlEspecialidad.SelectedValue.ToEntero, Celular, DdlSubEspecialidad.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero)
|
||||||
|
|
||||||
If CveMedicoNuevo > 0 Then
|
If CveMedicoNuevo > 0 Then
|
||||||
|
|||||||
26
UserControl/OI/AddTema.ascx
Normal file
26
UserControl/OI/AddTema.ascx
Normal file
@@ -0,0 +1,26 @@
|
|||||||
|
<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AddTema.ascx.vb" Inherits="UserControl_AddProcedimiento" %>
|
||||||
|
|
||||||
|
<div id="DVAgregarTema" style="margin-top:-30px!important">
|
||||||
|
<div class="modal-dialog">
|
||||||
|
<asp:UpdatePanel ID="UpModalAddTema" class="modal-content " tabindex="-1" runat="server" UpdateMode="Conditional">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="modal-header">
|
||||||
|
<button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">×</span> </button>
|
||||||
|
<h4 class="modal-title" style="text-align: left">
|
||||||
|
<asp:Literal ID="Literal2" runat="server">Agregar Tema</asp:Literal></h4>
|
||||||
|
</div>
|
||||||
|
<div class="modal-body">
|
||||||
|
<div class="form-group form-md-line-input">
|
||||||
|
<asp:TextBox ID="TxtTema" runat="server" CssClass="form-control" CausesValidation="true" TextMode="MultiLine" Rows="1"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RfvTxtTema" runat="server" ControlToValidate="TxtTema" Display="None" ErrorMessage="El campo <b>''Tema''</b> es necesario, por favor seleccione uno." InitialValue="-1" ValidationGroup="VGMAddTemaTN"></asp:RequiredFieldValidator>
|
||||||
|
<asp:Label runat="server" Text="Tema" AssociatedControlID="TxtTema"></asp:Label>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="modal-footer">
|
||||||
|
<asp:LinkButton ID="BtnAgregarTema" OnClick="BtnAgregarTema_Click" CssClass="btn btn-primary" ValidationGroup="VGMAddTemaTN" runat="server">Agregar</asp:LinkButton>
|
||||||
|
<button data-dismiss="modal" class="btn btn-danger">Cancelar</button>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
96
UserControl/OI/AddTema.ascx.vb
Normal file
96
UserControl/OI/AddTema.ascx.vb
Normal file
@@ -0,0 +1,96 @@
|
|||||||
|
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
|
||||||
|
|
||||||
|
|
||||||
|
Protected Sub BtnAgregarTema_Click(sender As Object, e As EventArgs)
|
||||||
|
Using objoi As New ClsOIEventos()
|
||||||
|
If objoi.AddRevisionesEventos(TxtTema.Text.Trim(), UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
|
Alert(String.Format("El Tema ""{0}"" fue agregado con éxito.", TxtTema.Text.Trim()), ModExtensiones.TipoMensaje.MsgInformacion)
|
||||||
|
RegistraScript(String.Format("$('#{0}').modal('hide')", iddivAgregarTema))
|
||||||
|
TxtTema.Text = ""
|
||||||
|
GlobalDTOIRevision(UsuarioActual.CveEmpresa, objoi.DtResultados)
|
||||||
|
CargaTemas()
|
||||||
|
UpContenido.Update()
|
||||||
|
Else
|
||||||
|
Alert("Ocurrió un error al agregar la revisión. Por favor vuelva a intentar.", ModExtensiones.TipoMensaje.MsgError)
|
||||||
|
End If
|
||||||
|
End Using
|
||||||
|
End Sub
|
||||||
|
End Class
|
||||||
@@ -766,7 +766,11 @@
|
|||||||
</div>
|
</div>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
|
}
|
||||||
|
|
||||||
function convertirTabla() {
|
function convertirTabla() {
|
||||||
let json = tableToJson($('#GvMultiple').get(0));
|
let json = tableToJson($('#GvMultiple').get(0));
|
||||||
|
|||||||
@@ -6,6 +6,8 @@ Imports System.Data
|
|||||||
Imports System.IO
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports GemBox.Spreadsheet
|
Imports GemBox.Spreadsheet
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports ZXing
|
||||||
|
|
||||||
Partial Class Ventas_ActualizarPrecios
|
Partial Class Ventas_ActualizarPrecios
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -325,6 +327,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
If Not TieneError Then
|
If Not TieneError Then
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso sbProductos.Length > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso sbProductos.Length > 0 Then
|
||||||
MensajeAlert.AppendFormat("Los precios de lista de los productos/servicios se actualizaron correctamente. <br/> <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Etiquetas</a></b>", Encripta(String.Format("OP=ETIQUETA&CVEPRECIOLISTA={0}&PRODUCTOS={1}", DdlPrecioLista.SelectedValue.ToEntero, sbProductos.ToString())))
|
MensajeAlert.AppendFormat("Los precios de lista de los productos/servicios se actualizaron correctamente. <br/> <b><a target='_blank' class='Texto' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Descargar Etiquetas</a></b>", Encripta(String.Format("OP=ETIQUETA&CVEPRECIOLISTA={0}&PRODUCTOS={1}", DdlPrecioLista.SelectedValue.ToEntero, sbProductos.ToString())))
|
||||||
|
ImprimirEtiquetas(sbProductos.ToString())
|
||||||
Else
|
Else
|
||||||
MensajeAlert.Append("Los precios de lista de los productos/servicios se actualizaron correctamente.")
|
MensajeAlert.Append("Los precios de lista de los productos/servicios se actualizaron correctamente.")
|
||||||
End If
|
End If
|
||||||
@@ -998,4 +1001,134 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
UpEncabezado.Update()
|
UpEncabezado.Update()
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub ImprimirEtiquetas(StrClavesPS As String)
|
||||||
|
Dim CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||||
|
Dim DtPrecios As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsProductosServicios
|
||||||
|
If ObjVentas.GetPSPrecios(CvePrecioListaPredeterminada, StrClavesPS) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If DtPrecios IsNot Nothing Then
|
||||||
|
|
||||||
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
|
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
|
End If
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "Datos"
|
||||||
|
rds.Value = DtPrecios
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim bytesPDF = StreamBytesStimul("Facturas", DirectorioArchivo, lrds, params, NombreArchivo:="Precios", Formato:="PDF")
|
||||||
|
Dim pdf64 = Convert.ToBase64String(bytesPDF)
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
|
'ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||||
|
|
||||||
|
Dim barcodeWriter As New BarcodeWriter
|
||||||
|
Dim opciones As New ZXing.Common.EncodingOptions
|
||||||
|
Dim FormatoBar As New BarcodeFormat
|
||||||
|
'Dim Respuesta As Byte()
|
||||||
|
|
||||||
|
opciones.Height = Alto
|
||||||
|
opciones.Width = Largo
|
||||||
|
opciones.Margin = Margen
|
||||||
|
opciones.PureBarcode = PureBacode
|
||||||
|
barcodeWriter.Options = opciones
|
||||||
|
|
||||||
|
Select Case Formato
|
||||||
|
Case "All_1D"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.All_1D
|
||||||
|
Exit Select
|
||||||
|
Case "AZTEC"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.AZTEC
|
||||||
|
Exit Select
|
||||||
|
Case "CODABAR"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODABAR
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_128"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_128
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_39"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_39
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_93"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_93
|
||||||
|
Exit Select
|
||||||
|
Case "DATA_MATRIX"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.DATA_MATRIX
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_13"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_13
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_8"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_8
|
||||||
|
Exit Select
|
||||||
|
Case "IMB"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.IMB
|
||||||
|
Exit Select
|
||||||
|
Case "ITF"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.ITF
|
||||||
|
Exit Select
|
||||||
|
Case "MAXICODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MAXICODE
|
||||||
|
Exit Select
|
||||||
|
Case "MSI"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MSI
|
||||||
|
Exit Select
|
||||||
|
Case "PDF_417"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PDF_417
|
||||||
|
Exit Select
|
||||||
|
Case "PLESSEY"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PLESSEY
|
||||||
|
Exit Select
|
||||||
|
Case "QR_CODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.QR_CODE
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_14"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_14
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_EXPANDED"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_EXPANDED
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_A"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_A
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_E"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_E
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_EAN_EXTENSION"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_EAN_EXTENSION
|
||||||
|
Exit Select
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim imgCod As Drawing.Bitmap = barcodeWriter.Write(CodigoBarras)
|
||||||
|
Dim memoriStream As New System.IO.MemoryStream
|
||||||
|
imgCod.Save(memoriStream, Drawing.Imaging.ImageFormat.Bmp)
|
||||||
|
|
||||||
|
'Respuesta = Convert.ToBase64String(memoriStream.ToArray())
|
||||||
|
|
||||||
|
Return memoriStream.ToArray()
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -228,7 +228,7 @@
|
|||||||
|
|
||||||
<%--DataKeyNames="CveMedico,Medico,CedulaProfesional,FechaNacimiento,Notas,DiasAtencion,Horario,Lugar,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Consultorio,Torre,Usuario"--%>
|
<%--DataKeyNames="CveMedico,Medico,CedulaProfesional,FechaNacimiento,Notas,DiasAtencion,Horario,Lugar,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Consultorio,Torre,Usuario"--%>
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveMedico,Nombre,APaterno,AMaterno,CedulaProfesional,FechaNacimiento,Notas,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Usuario,CveVendedor"
|
DataKeyNames="CveMedico,Nombre,Apellidos,CedulaProfesional,FechaNacimiento,Notas,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Usuario,CveVendedor"
|
||||||
data-sort="true"
|
data-sort="true"
|
||||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
@@ -237,24 +237,9 @@
|
|||||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Apellido Paterno" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Apellidos" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAPaterno" runat="server" Text='<%# Eval("APaterno") %>'></asp:Literal>
|
<asp:Literal ID="LtlApellidos" runat="server" Text='<%# Eval("Apellidos") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Apellido Materno" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlAMaterno" runat="server" Text='<%# Eval("AMaterno") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Cédula Profesional" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlCedulaProfesional" runat="server" Text='<%# Eval("CedulaProfesional") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
||||||
|
|||||||
@@ -2,7 +2,6 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Extensions.Primitives
|
|
||||||
|
|
||||||
Partial Class Ventas_CatMedicos
|
Partial Class Ventas_CatMedicos
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -179,7 +178,7 @@ Partial Class Ventas_CatMedicos
|
|||||||
|
|
||||||
CveMedico = GvRow.DataKey("CveMedico").ToEntero
|
CveMedico = GvRow.DataKey("CveMedico").ToEntero
|
||||||
|
|
||||||
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Nombre"), GvRow.DataKey("APaterno"), GvRow.DataKey("AMaterno"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"),
|
AddMedicoControl.PreparaEdicion(CveMedico, GvRow.DataKey("Nombre"), GvRow.DataKey("Apellidos"), GvRow.DataKey("CedulaProfesional"), GvRow.DataKey("FechaNacimiento").ToDate(), GvRow.DataKey("Notas"),
|
||||||
Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"), GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero,
|
Boolean.Parse(GvRow.DataKey("Estatus")), GvRow.DataKey("Mail"), GvRow.DataKey("Telefono"), GvRow.DataKey("Celular"), GvRow.DataKey("CveMedicoEspecialidad").ToEntero, GvRow.DataKey("CveMedicoSubEspecialidad").ToEntero,
|
||||||
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"), GvRow.DataKey("CveVendedor").ToEntero)
|
GvRow.DataKey("FechaIng").ToDateTime, GvRow.DataKey("Usuario"), GvRow.DataKey("CveVendedor").ToEntero)
|
||||||
|
|
||||||
|
|||||||
@@ -189,13 +189,18 @@
|
|||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
<label class="col-md-1 truncate">Aplica para Venta:</label>
|
<label class="col-md-1 truncate">Aplica para Venta:</label>
|
||||||
<div class="col-md-2">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList runat="server" ID="DdlAplicaVenta" CssClass="form-control input-sm select2me" Width="90%">
|
<asp:DropDownList runat="server" ID="DdlAplicaVenta" CssClass="form-control input-sm select2me" Width="90%">
|
||||||
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
<asp:ListItem Text="Todos" Value="-1" Selected="True"></asp:ListItem>
|
||||||
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
<asp:ListItem Text="Si" Value="1"></asp:ListItem>
|
||||||
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
<asp:ListItem Text="No" Value="0"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<label class="col-md-1 truncate">Marca:</label>
|
||||||
|
<div class="col-md-2">
|
||||||
|
<asp:DropDownList runat="server" ID="DdlMarcas" DataTextField="Marca" DataValueField="CveMarca" CssClass="form-control input-sm select2me" Width="90%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
@@ -58,6 +58,10 @@ Partial Class CatPS
|
|||||||
Ddlclasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (UsoClasificacion = {0} OR {0} = -1)", DdlTipoClasificacion.SelectedValue))
|
Ddlclasificacion.DataSource = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltraParametros(String.Format(" (UsoClasificacion = {0} OR {0} = -1)", DdlTipoClasificacion.SelectedValue))
|
||||||
Ddlclasificacion.DataBind()
|
Ddlclasificacion.DataBind()
|
||||||
Ddlclasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
Ddlclasificacion.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
DdlMarcas.DataSource = GlobalDTGralMarcas(UsuarioActual.CveEmpresa)
|
||||||
|
DdlMarcas.DataBind()
|
||||||
|
DdlMarcas.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
@@ -70,7 +74,12 @@ Partial Class CatPS
|
|||||||
If TxtNombre.Text.Trim = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper.Trim
|
If TxtNombre.Text.Trim = "" Then Nombre = "-1" Else Nombre = TxtNombre.Text.ToUpper.Trim
|
||||||
|
|
||||||
Dim ObjPS As New ClsProductosServicios
|
Dim ObjPS As New ClsProductosServicios
|
||||||
If ObjPS.GetPSLite(Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, Codigo, CodigoBarras, Nombre, DdlAplicaVenta.SelectedValue.ToEntero, DdlEstado.SelectedValue.ToEntero, DdlCveTipoPS.SelectedValue.ToEntero, DdlTipoClasificacion.SelectedValue.ToEntero) Then
|
If ObjPS.GetPSLite(Ddlclasificacion.SelectedValue.ToEntero, UsuarioActual.Empresa.CveEmpresa, Codigo, CodigoBarras, Nombre,
|
||||||
|
pAplicaParaVenta:=DdlAplicaVenta.SelectedValue.ToEntero,
|
||||||
|
pEstado:=DdlEstado.SelectedValue.ToEntero,
|
||||||
|
CveTipoPS:=DdlCveTipoPS.SelectedValue.ToEntero,
|
||||||
|
UsoClasificacion:=DdlTipoClasificacion.SelectedValue.ToEntero,
|
||||||
|
CveMarca:=DdlMarcas.SelectedValue.ToEntero) Then
|
||||||
DtDatos = ObjPS.DtResultados
|
DtDatos = ObjPS.DtResultados
|
||||||
GvDatos.DataSource = DtDatos
|
GvDatos.DataSource = DtDatos
|
||||||
Else
|
Else
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
SbRemisiones.Remove(SbRemisiones.Length - 1, 1)
|
SbRemisiones.Remove(SbRemisiones.Length - 1, 1)
|
||||||
|
|
||||||
Dim DtRemisionesPS As New DataTable()
|
Dim DtRemisionesPS As New DataTable()
|
||||||
Dim DtPagos As New DataTable()
|
Dim DtPagosFacturaGlobal As New DataTable()
|
||||||
|
|
||||||
Dim ObjClientes As New ClsClientes
|
Dim ObjClientes As New ClsClientes
|
||||||
If ObjClientes.GetVentasRemisionesTotales(CveCliente, SbRemisiones.ToString(), 1) Then
|
If ObjClientes.GetVentasRemisionesTotales(CveCliente, SbRemisiones.ToString(), 1) Then
|
||||||
@@ -179,7 +179,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If ObjClientes.GetVentasRemisionesPagos(CveCliente, SbRemisiones.ToString()) Then
|
If ObjClientes.GetVentasRemisionesPagos(CveCliente, SbRemisiones.ToString()) Then
|
||||||
DtPagos = ObjClientes.DtResultados.Copy()
|
DtPagosFacturaGlobal = ObjClientes.DtResultados.Copy()
|
||||||
End If
|
End If
|
||||||
ObjClientes.Dispose()
|
ObjClientes.Dispose()
|
||||||
|
|
||||||
@@ -188,7 +188,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If DtPagos Is Nothing OrElse DtPagos.Rows.Count = 0 Then
|
If DtPagosFacturaGlobal Is Nothing OrElse DtPagosFacturaGlobal.Rows.Count = 0 Then
|
||||||
Alert("No se pudieron cargar los pagos", TipoMensaje.MsgError)
|
Alert("No se pudieron cargar los pagos", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -211,7 +211,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
ObjFactura.RemisionesLista = RemisionesLista
|
ObjFactura.RemisionesLista = RemisionesLista
|
||||||
ObjFactura.DtRemisionesPS = DtRemisionesPS
|
ObjFactura.DtRemisionesPS = DtRemisionesPS
|
||||||
ObjFactura.DtRemisiones = DtRemisiones.FiltraParametros($"CveVenta IN ({SbRemisiones.ToString()})")
|
ObjFactura.DtRemisiones = DtRemisiones.FiltraParametros($"CveVenta IN ({SbRemisiones.ToString()})")
|
||||||
ObjFactura.DtPagos = DtPagos
|
ObjFactura.DtPagosFacturaGlobal = DtPagosFacturaGlobal
|
||||||
|
|
||||||
For Each Dr As DataRow In DtRemisionesPS.Rows
|
For Each Dr As DataRow In DtRemisionesPS.Rows
|
||||||
ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(),
|
ObjFactura.AgregarPS(Dr("CvePS").ToString().ToEntero(), Dr("Cantidad").ToString().ToDecimal(), Dr("PU").ToString().ToDecimal(), Dr("Descuento").ToString().ToDecimal, Dr("Obs").ToString(), CveUM:=Dr("CveUM").ToString().ToEntero(),
|
||||||
@@ -221,7 +221,7 @@ Partial Class Ventas_FacturacionGlobal
|
|||||||
ObjFactura.CalculaTotales()
|
ObjFactura.CalculaTotales()
|
||||||
ObjFactura.PreparaTimbre()
|
ObjFactura.PreparaTimbre()
|
||||||
|
|
||||||
If ObjFactura.Total <> DtPagos.SUMD("Importe") Then
|
If ObjFactura.Total <> DtPagosFacturaGlobal.SUMD("Importe") Then
|
||||||
Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError)
|
Alert("Los pagos no coinciden con el total de la factura", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -292,14 +292,18 @@
|
|||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" Width="100%"
|
||||||
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
EmptyDataText="No se encontraron Ventas con los filtros especificados" data-sort="true" ToolTip="Listado de Ventas"
|
||||||
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
CssClass="ScrollAD table table-striped table-hover Widthall" data-heighterror="320" data-freezecols="0" data-freezerows="0" GridLines="None"
|
||||||
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA">
|
DataKeyNames="CveVenta,TipoDocto,Saldo,AtencionA,CveFormaPago33,SerieFolio">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField HeaderText="Atención" DataField="AtencionA" />
|
<asp:BoundField HeaderText="Atención" DataField="AtencionA" />
|
||||||
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
<asp:HyperLinkField HeaderText="Folio" DataNavigateUrlFields="CveVenta" DataNavigateUrlFormatString="/Ventas/Ventas.aspx?CveVenta={0}" DataTextField="SerieFolio" ItemStyle-HorizontalAlign="Center" />
|
||||||
<asp:BoundField HeaderText="Fecha/Hora" DataField="Fecha" 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" />
|
<asp:BoundField HeaderText="Importe" DataField="Saldo" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
<asp:TemplateField HeaderText="" ItemStyle-HorizontalAlign="Right">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkImprimir" runat="server" AlternateText="Imprimir ticket"
|
||||||
|
CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir"
|
||||||
|
OnClick="LnkImprimir_Click" Visible="false" />
|
||||||
|
|
||||||
<asp:LinkButton ID="BtnPagar" runat="server" CssClass="btn btn-xs btn-success" Text="Cobrar" CommandName="Cobrar" CommandArgument='<%# Eval("CveVenta") %>' />
|
<asp:LinkButton ID="BtnPagar" runat="server" CssClass="btn btn-xs btn-success" Text="Cobrar" CommandName="Cobrar" CommandArgument='<%# Eval("CveVenta") %>' />
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
@@ -312,12 +316,14 @@
|
|||||||
<div class="note note-success">
|
<div class="note note-success">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1"><b>Nombre:</b></div>
|
<div class="col-md-1"><b>Nombre:</b></div>
|
||||||
<div class="col-md-3"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
<div class="col-md-4"> <label><asp:Literal ID="LtlNombre" runat="server"></asp:Literal></label> </div>
|
||||||
|
|
||||||
|
<div class="col-md-1"><b>Folio:</b></div>
|
||||||
|
<div class="col-md-2"> <label><asp:Literal ID="LtlFolio" runat="server"></asp:Literal></label> </div>
|
||||||
|
|
||||||
<div class="col-md-1"><b><asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
|
<div class="col-md-1"><b><asp:Literal ID="LtLTipoSaldo" runat="server" Text="Total:"></asp:Literal></b></div>
|
||||||
<div class="col-md-1"><b><asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox> </b></div>
|
<div class="col-md-1"><b><asp:TextBox ID="LtlSaldo" runat="server" Enabled="true" CssClass="TextBoxAsLabel" BorderStyle="None" BackColor="Transparent" ForeColor="#3c763d" Style="text-align: left"></asp:TextBox> </b></div>
|
||||||
<div class="col-md-3" style="text-align:right;"><asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" /></div>
|
<div class="col-md-1" style="text-align:right;"><asp:LinkButton ID="LnkLiberar" runat="server" CssClass="btn btn-xs btn-success" Text="Liberar" OnClick="LnkLiberar_Click" /></div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
@@ -813,6 +819,11 @@
|
|||||||
function impresionDirecta(urlPDF) {
|
function impresionDirecta(urlPDF) {
|
||||||
printJS({ printable: urlPDF, type: 'pdf', showModal: true });
|
printJS({ printable: urlPDF, type: 'pdf', showModal: true });
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
|
}
|
||||||
|
|
||||||
function CalculaTotalPagoContado() {
|
function CalculaTotalPagoContado() {
|
||||||
debugger;
|
debugger;
|
||||||
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
var totalEfectivo = ToDouble($get("TxtImporteEfectivo").value);
|
||||||
|
|||||||
@@ -2,6 +2,7 @@
|
|||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
|
Imports System.IO
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Partial Class Ventas_PVCobranza
|
Partial Class Ventas_PVCobranza
|
||||||
@@ -222,6 +223,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
e.Row.BackColor = Drawing.ColorTranslator.FromHtml("#3598dc")
|
||||||
'e.Row.CssClass = "blue-madison"
|
'e.Row.CssClass = "blue-madison"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If e.Row.DBCampo("CveCondicionEntrega").ToEntero() = 9 Then
|
||||||
|
e.Row.FCLinkButton("LnkImprimir").Visible = True
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkImprimir"))
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -240,11 +246,29 @@ Partial Class Ventas_PVCobranza
|
|||||||
TieneError = True
|
TieneError = True
|
||||||
End If
|
End If
|
||||||
HdnCveVenta.Value = CveVenta.ToString
|
HdnCveVenta.Value = CveVenta.ToString
|
||||||
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo").FormatoNumero
|
|
||||||
|
'según la forma de pago va a establecer el valor para pago.
|
||||||
|
Select Case GvRow.DataKey("CveFormaPago33")
|
||||||
|
Case "1"
|
||||||
|
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
|
Case "2"
|
||||||
|
TxtImporteCheque.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
|
Case "3"
|
||||||
|
TxtImporteTransferencia.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
|
Case "4"
|
||||||
|
TxtImporteCredito.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
|
Case "18"
|
||||||
|
TxtImporteDebito.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
|
Case Else
|
||||||
|
TxtImporteEfectivo.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
|
End Select
|
||||||
|
|
||||||
|
|
||||||
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
|
TxtImporteContado.Text = GvRow.DataKey("Saldo").FormatoNumero
|
||||||
HdnTotal.Value = GvRow.DataKey("Saldo")
|
HdnTotal.Value = GvRow.DataKey("Saldo")
|
||||||
TxtImporteEfectivo.Focus()
|
TxtImporteEfectivo.Focus()
|
||||||
LtlNombre.Text = GvRow.DataKey("AtencionA")
|
LtlNombre.Text = GvRow.DataKey("AtencionA")
|
||||||
|
LtlFolio.Text = GvRow.DataKey("SerieFolio")
|
||||||
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
LtlSaldo.Text = GvRow.DataKey("Saldo").ToDecimal.FormatoNumero
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
TieneError = True
|
TieneError = True
|
||||||
@@ -270,7 +294,7 @@ Partial Class Ventas_PVCobranza
|
|||||||
'registrar pago
|
'registrar pago
|
||||||
|
|
||||||
'validaciones
|
'validaciones
|
||||||
If TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal = 0 Then
|
If TxtImporteEfectivo.Text.ToDecimal + TxtImporteCredito.Text.ToDecimal + TxtImporteDebito.Text.ToDecimal + TxtImporteCheque.Text.ToDecimal + TxtImporteTransferencia.Text.ToDecimal = 0 Then
|
||||||
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
Alert("Favor de especificar importe", TipoMensaje.ToastAdventencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -340,6 +364,11 @@ Partial Class Ventas_PVCobranza
|
|||||||
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If SaldoPendiente > 0 AndAlso TxtImporteTransferencia.Text.ToDecimal > 0 Then
|
||||||
|
MsgError = RegistraIE(8, DdlCuentaTransferencia.SelectedValue.ToEntero, TxtImporteTransferencia.Text.ToDecimal, Fecha, CvePrePoliza, VentaActual, ObjIE, ObjConta, ObjVentas2)
|
||||||
|
PagoEfectivo = TxtImporteCheque.Text.ToDecimal
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then
|
If Not ObjVentas2.UpdateVentaCorte(CveVenta, UsuarioActual.CveEmpresa, CveCorte) Then
|
||||||
MsgError = "Error al aplicar el corte"
|
MsgError = "Error al aplicar el corte"
|
||||||
End If
|
End If
|
||||||
@@ -543,13 +572,13 @@ Partial Class Ventas_PVCobranza
|
|||||||
Dim ExistePDF As Boolean = False
|
Dim ExistePDF As Boolean = False
|
||||||
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
Dim ArchivoPDF As String = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjFactura.TipoDocto, ObjFactura.SerieFolio)
|
||||||
|
|
||||||
If ObjFactura.TipoDocto = "Rem" AndAlso System.IO.File.Exists(ArchivoPDF) Then
|
If File.Exists(ArchivoPDF) AndAlso ObjFactura.TipoDocto = "Rem" Then
|
||||||
ExistePDF = True
|
ExistePDF = True
|
||||||
Else
|
Else
|
||||||
'REGENERAR EL PDF
|
'REGENERAR EL PDF
|
||||||
Try
|
Try
|
||||||
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False, EsTicket:=True)
|
GenerarPDFVenta(CveVenta, AplicaPagare:="1", GuardarPDF:=True, RegenerarPDF:=True, DescargarArchivo:=False, EsTicket:=True)
|
||||||
If System.IO.File.Exists(ArchivoPDF) Then
|
If File.Exists(ArchivoPDF) Then
|
||||||
ExistePDF = True
|
ExistePDF = True
|
||||||
End If
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -558,8 +587,24 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If ExistePDF Then
|
If ExistePDF Then
|
||||||
Dim urlPDF As String = $"/Ashx/SIGDesc.ashx?metodo=descargarPDFVenta&CveVenta={CveVenta}"
|
Dim pdf64 As String = ""
|
||||||
RegistraScript($"impresionDirecta('{urlPDF}');", "Imprimir")
|
'DUPLICA EL PDF
|
||||||
|
Using ms As New MemoryStream
|
||||||
|
Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms))
|
||||||
|
pdfdoc.InitializeOutlines()
|
||||||
|
Dim reporteByte As New MemoryStream(System.IO.File.ReadAllBytes(ArchivoPDF))
|
||||||
|
|
||||||
|
Dim docPDF As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||||
|
docPDF.CopyPagesTo(1, docPDF.GetNumberOfPages(), pdfdoc)
|
||||||
|
docPDF.CopyPagesTo(1, docPDF.GetNumberOfPages(), pdfdoc)
|
||||||
|
docPDF.Close()
|
||||||
|
|
||||||
|
pdfdoc.Close()
|
||||||
|
End Using
|
||||||
|
pdf64 = Convert.ToBase64String(ms.ToArray())
|
||||||
|
End Using
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
Else
|
Else
|
||||||
Alert("No se pudo imprimir el pdf directamente. favor de descargar manualmente el pdf.", TipoMensaje.MsgAdvertencia)
|
Alert("No se pudo imprimir el pdf directamente. favor de descargar manualmente el pdf.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -576,4 +621,14 @@ Partial Class Ventas_PVCobranza
|
|||||||
End If
|
End If
|
||||||
ObjVentas.Dispose()
|
ObjVentas.Dispose()
|
||||||
End Sub
|
End Sub
|
||||||
|
Protected Sub LnkImprimir_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim CveVenta As Integer = GvRow.DataKey("CveVenta").ToEntero()
|
||||||
|
|
||||||
|
If CveVenta > 0 Then
|
||||||
|
ImpresionDirectaPDF(CveVenta)
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
@@ -94,14 +94,19 @@
|
|||||||
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 240px; margin-top: 5px">
|
<div id="DivFacturas" style="overflow-y: auto; width: 760px; max-height: 240px; margin-top: 5px">
|
||||||
<asp:GridView ID="GvDatos" DataKeyNames="CvePs" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados" ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
<asp:GridView ID="GvDatos" DataKeyNames="CvePs" runat="server" ClientIDMode="Static" AutoGenerateColumns="False" EmptyDataText="No se encontraron Productos o Servicios registrados" ToolTip="Listado de Productos o Servicios" CssClass="table table-striped table-hover Widthall" UseAccessibleHeader="true" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Clasificacion" HeaderText="Clasificación" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" />
|
<asp:BoundField DataField="Codigo" HeaderText="Código" ItemStyle-HorizontalAlign="Left" ItemStyle-Width="10%" />
|
||||||
<asp:TemplateField HeaderText="Producto o Servicio" ItemStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Producto o Servicio" ItemStyle-CssClass="Texto" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="lnkPs" runat="server"></asp:Literal>
|
<asp:Literal ID="lnkPs" runat="server"></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" />
|
<asp:BoundField DataField="TipoPS" HeaderText="Tipo" ItemStyle-HorizontalAlign="Center" ItemStyle-Width="5%" />
|
||||||
|
<asp:TemplateField HeaderText="Etiqueta" ItemStyle-HorizontalAlign="Center" Visible="false" ItemStyle-Width="5%">
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:LinkButton ID="LnkGenerarEtiqueta" runat="server" CssClass="btn btn-circle btn-sm blue" Text="<i class='fa fa-print'></i>" ToolTip="Imprimir" OnClick="LnkGenerarEtiqueta_Click"></asp:LinkButton>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
</Columns>
|
</Columns>
|
||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
</div>
|
</div>
|
||||||
@@ -112,8 +117,13 @@
|
|||||||
|
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
<asp:Content ID="Content7" ContentPlaceHolderID="JS" runat="Server">
|
||||||
|
<script src="/Scripts/PrintJS/print.min.js"></script>
|
||||||
<script>
|
<script>
|
||||||
|
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({ printable: pdfBase64, type: 'pdf', showModal: true, base64: true });
|
||||||
|
}
|
||||||
|
|
||||||
function Ir(v) {
|
function Ir(v) {
|
||||||
gotourl('/Ventas/ProductosServicios.aspx?CvePS=' + v);
|
gotourl('/Ventas/ProductosServicios.aspx?CvePS=' + v);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3,6 +3,8 @@ Option Strict On
|
|||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports ZXing
|
||||||
|
|
||||||
Partial Class PopUpBuscarPs
|
Partial Class PopUpBuscarPs
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -79,6 +81,10 @@ Partial Class PopUpBuscarPs
|
|||||||
|
|
||||||
GvDatos.DataBind()
|
GvDatos.DataBind()
|
||||||
GvDatos.UseAccessibleHeader = True
|
GvDatos.UseAccessibleHeader = True
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
GvDatos.Columns(4).Visible = True
|
||||||
|
End If
|
||||||
Else
|
Else
|
||||||
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
Alert("Asigne un valor a cualquiera de los filtros", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -89,7 +95,13 @@ Partial Class PopUpBuscarPs
|
|||||||
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
Protected Sub GvDatos_RowDataBound(sender As Object, e As System.Web.UI.WebControls.GridViewRowEventArgs) Handles GvDatos.RowDataBound
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
Try
|
Try
|
||||||
e.Row.FCLiteral("LnkPs").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CvePs") & """);'>", e.Row.DBCampo("Ps"))
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
e.Row.FCLiteral("LnkPs").Text = String.Format("<div style='width:100%;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CvePs") & """);'>", e.Row.DBCampo("Ps"))
|
||||||
|
ScriptManager.GetCurrent(Me).RegisterPostBackControl(e.Row.FCLinkButton("LnkGenerarEtiqueta"))
|
||||||
|
Else
|
||||||
|
e.Row.FCLiteral("LnkPs").Text = String.Format("<div class='truncate' style='width:200px;'>{0}{1}</a></div>", "<a href='javascript:Ir(""" & e.Row.DBCampo("CvePs") & """);'>", e.Row.DBCampo("Ps"))
|
||||||
|
End If
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Dim exexex As String = ex.Message
|
Dim exexex As String = ex.Message
|
||||||
End Try
|
End Try
|
||||||
@@ -111,5 +123,134 @@ Partial Class PopUpBuscarPs
|
|||||||
Return False
|
Return False
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Protected Sub LnkGenerarEtiqueta_Click(sender As Object, e As EventArgs)
|
||||||
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow)
|
||||||
|
|
||||||
|
Dim CvePrecioListaPredeterminada = GlobalDTPrecioListas(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CvePrecioLista", "Predeterminada = True").ToEntero()
|
||||||
|
Dim DtPrecios As DataTable = Nothing
|
||||||
|
|
||||||
|
Dim ObjVentas As New ClsProductosServicios
|
||||||
|
If ObjVentas.GetPSPrecios(CvePrecioListaPredeterminada, GvRow.DataKey("CvePs").ToString()) AndAlso ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
DtPrecios = ObjVentas.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
If DtPrecios IsNot Nothing Then
|
||||||
|
|
||||||
|
DtPrecios.Columns.Add(New DataColumn("CBBase64", GetType(String)))
|
||||||
|
|
||||||
|
For Each Row As DataRow In DtPrecios.Rows
|
||||||
|
Row("CBBase64") = Convert.ToBase64String(GeneraCodigoQR(Row("CodigoBarras").ToString(), 40, 150, 0, "CODE_39", True))
|
||||||
|
Next
|
||||||
|
|
||||||
|
Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/Etiqueta.mrt"
|
||||||
|
If System.IO.File.Exists(UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt") Then
|
||||||
|
DirectorioArchivo = UsuarioActual.Empresa.Ruta + "Formatos/Etiqueta.mrt"
|
||||||
|
End If
|
||||||
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "Datos"
|
||||||
|
rds.Value = DtPrecios
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim bytesPDF = StreamBytesStimul("Facturas", DirectorioArchivo, lrds, params, NombreArchivo:="Precios", Formato:="PDF")
|
||||||
|
Dim pdf64 = Convert.ToBase64String(bytesPDF)
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Function GeneraCodigoQR(CodigoBarras As String, Alto As Integer, Largo As Integer, Margen As Integer, Formato As String, Optional PureBacode As Boolean = False) As Byte()
|
||||||
|
|
||||||
|
Dim barcodeWriter As New BarcodeWriter
|
||||||
|
Dim opciones As New ZXing.Common.EncodingOptions
|
||||||
|
Dim FormatoBar As New BarcodeFormat
|
||||||
|
'Dim Respuesta As Byte()
|
||||||
|
|
||||||
|
opciones.Height = Alto
|
||||||
|
opciones.Width = Largo
|
||||||
|
opciones.Margin = Margen
|
||||||
|
opciones.PureBarcode = PureBacode
|
||||||
|
barcodeWriter.Options = opciones
|
||||||
|
|
||||||
|
Select Case Formato
|
||||||
|
Case "All_1D"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.All_1D
|
||||||
|
Exit Select
|
||||||
|
Case "AZTEC"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.AZTEC
|
||||||
|
Exit Select
|
||||||
|
Case "CODABAR"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODABAR
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_128"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_128
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_39"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_39
|
||||||
|
Exit Select
|
||||||
|
Case "CODE_93"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.CODE_93
|
||||||
|
Exit Select
|
||||||
|
Case "DATA_MATRIX"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.DATA_MATRIX
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_13"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_13
|
||||||
|
Exit Select
|
||||||
|
Case "EAN_8"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.EAN_8
|
||||||
|
Exit Select
|
||||||
|
Case "IMB"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.IMB
|
||||||
|
Exit Select
|
||||||
|
Case "ITF"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.ITF
|
||||||
|
Exit Select
|
||||||
|
Case "MAXICODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MAXICODE
|
||||||
|
Exit Select
|
||||||
|
Case "MSI"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.MSI
|
||||||
|
Exit Select
|
||||||
|
Case "PDF_417"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PDF_417
|
||||||
|
Exit Select
|
||||||
|
Case "PLESSEY"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.PLESSEY
|
||||||
|
Exit Select
|
||||||
|
Case "QR_CODE"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.QR_CODE
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_14"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_14
|
||||||
|
Exit Select
|
||||||
|
Case "RSS_EXPANDED"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.RSS_EXPANDED
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_A"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_A
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_E"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_E
|
||||||
|
Exit Select
|
||||||
|
Case "UPC_EAN_EXTENSION"
|
||||||
|
barcodeWriter.Format = BarcodeFormat.UPC_EAN_EXTENSION
|
||||||
|
Exit Select
|
||||||
|
|
||||||
|
End Select
|
||||||
|
|
||||||
|
Dim imgCod As Drawing.Bitmap = barcodeWriter.Write(CodigoBarras)
|
||||||
|
Dim memoriStream As New System.IO.MemoryStream
|
||||||
|
imgCod.Save(memoriStream, Drawing.Imaging.ImageFormat.Bmp)
|
||||||
|
|
||||||
|
'Respuesta = Convert.ToBase64String(memoriStream.ToArray())
|
||||||
|
|
||||||
|
Return memoriStream.ToArray()
|
||||||
|
|
||||||
|
End Function
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
@@ -132,6 +132,15 @@ Partial Class ProductosyServicios
|
|||||||
ViewState("GeneraServicioAF") = value
|
ViewState("GeneraServicioAF") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
Public Property Imagen As String
|
||||||
|
Get
|
||||||
|
Return IfNull(ViewState("Imagen"), "", ViewState("Imagen")).ToString()
|
||||||
|
End Get
|
||||||
|
Set(value As String)
|
||||||
|
ViewState("Imagen") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
Private ReadOnly Property PermiteClasificacion2 As Boolean
|
||||||
@@ -952,6 +961,17 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
DdlTipoFactor.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoFactor").ToString)
|
DdlTipoFactor.SelectedValueExist(ObjProductosServicios.DtResultados.Rows(0)("CveTipoFactor").ToString)
|
||||||
|
|
||||||
|
Me.Imagen = ObjProductosServicios.DtResultados.Rows(0)("Imagen").ToString
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(Me.Imagen) Then
|
||||||
|
imgImagen.Attributes.Add("src", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||||
|
hplImagen.Attributes.Add("href", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||||
|
End If
|
||||||
|
|
||||||
|
DivImagen.Visible = True
|
||||||
|
upGaleria.Update()
|
||||||
|
RegistraScript("clickgaleria();", "CG")
|
||||||
|
|
||||||
If ObjProductosServicios.DtResultados.Rows(0)("CveTipoFactor").ToString.Contiene("1", "2") Then
|
If ObjProductosServicios.DtResultados.Rows(0)("CveTipoFactor").ToString.Contiene("1", "2") Then
|
||||||
LIva.Visible = True
|
LIva.Visible = True
|
||||||
DdlIVA.Visible = True
|
DdlIVA.Visible = True
|
||||||
@@ -2482,83 +2502,83 @@ Partial Class ProductosyServicios
|
|||||||
|
|
||||||
#Region " ECOMMERCE "
|
#Region " ECOMMERCE "
|
||||||
Private Sub InicializaEcommerce()
|
Private Sub InicializaEcommerce()
|
||||||
AplicaEcommerce = False
|
'AplicaEcommerce = False
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(700).ToEntero = 1 And CvePS > 0 Then
|
'If UsuarioActual.Empresa.Funcionalidad(700).ToEntero = 1 And CvePS > 0 Then
|
||||||
|
|
||||||
TabEcommerce.Visible = True
|
' TabEcommerce.Visible = True
|
||||||
LBBitacoraEcommerce.Visible = True
|
' LBBitacoraEcommerce.Visible = True
|
||||||
|
|
||||||
'INICIALIZA PRODUCTOS ECOMMERCE
|
' 'INICIALIZA PRODUCTOS ECOMMERCE
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
' Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.InsigniasGet(-1, "", UsuarioActual.CveEmpresa) Then
|
' If ObjEcommerce.InsigniasGet(-1, "", UsuarioActual.CveEmpresa) Then
|
||||||
DdlEcommerceInsignia.DataSource = ObjEcommerce.DtResultados
|
' DdlEcommerceInsignia.DataSource = ObjEcommerce.DtResultados
|
||||||
End If
|
' End If
|
||||||
ObjEcommerce.Dispose()
|
' ObjEcommerce.Dispose()
|
||||||
DdlEcommerceInsignia.DataBind()
|
' DdlEcommerceInsignia.DataBind()
|
||||||
CargaEcommerce()
|
' CargaEcommerce()
|
||||||
|
|
||||||
'INICIALIZA PRODUCTOS INSIGNIAS
|
' 'INICIALIZA PRODUCTOS INSIGNIAS
|
||||||
CargaPSInsigniasEcommerce()
|
' CargaPSInsigniasEcommerce()
|
||||||
|
|
||||||
'INICIALIZA PRODUCTOS IMAGENES
|
' 'INICIALIZA PRODUCTOS IMAGENES
|
||||||
CargarGaleriaImagenesEcommerce()
|
' CargarGaleriaImagenesEcommerce()
|
||||||
|
|
||||||
'INICIALIZA PRODUCTOS RELACIONADOS
|
' 'INICIALIZA PRODUCTOS RELACIONADOS
|
||||||
DdlEcommercePSRelacionado.setEsWebService(True)
|
' DdlEcommercePSRelacionado.setEsWebService(True)
|
||||||
CargaPSRelacionadosEcommerce()
|
' CargaPSRelacionadosEcommerce()
|
||||||
|
|
||||||
UpEcommerce.Update()
|
' UpEcommerce.Update()
|
||||||
|
|
||||||
End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#Region " PRODUCTOS ECOMMERCE "
|
#Region " PRODUCTOS ECOMMERCE "
|
||||||
Private Sub CargaEcommerce()
|
Private Sub CargaEcommerce()
|
||||||
Dim DrEcommerce As DataRow = Nothing
|
'Dim DrEcommerce As DataRow = Nothing
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosGet(CvePS, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
'If ObjEcommerce.ProductosGet(CvePS, -1, -1, -1, UsuarioActual.CveEmpresa) Then
|
||||||
DrEcommerce = ObjEcommerce.DtResultados.FiltroPrimero("")
|
' DrEcommerce = ObjEcommerce.DtResultados.FiltroPrimero("")
|
||||||
End If
|
'End If
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
If DrEcommerce IsNot Nothing Then
|
'If DrEcommerce IsNot Nothing Then
|
||||||
AplicaEcommerce = True
|
' AplicaEcommerce = True
|
||||||
|
|
||||||
TxtEcommerceDescripcion.Text = DrEcommerce("Descripcion").ToString
|
' TxtEcommerceDescripcion.Text = DrEcommerce("Descripcion").ToString
|
||||||
TxtEcommercePrecioBase.Text = DrEcommerce("PrecioBase").ToString.FormatoNumero
|
' TxtEcommercePrecioBase.Text = DrEcommerce("PrecioBase").ToString.FormatoNumero
|
||||||
TxtEcommercePrecioPromocion.Text = DrEcommerce("PrecioPromocion").ToString.FormatoNumero
|
' TxtEcommercePrecioPromocion.Text = DrEcommerce("PrecioPromocion").ToString.FormatoNumero
|
||||||
ChkEcommerceDisponible.Checked = CBool(DrEcommerce("Disponible").ToString)
|
' ChkEcommerceDisponible.Checked = CBool(DrEcommerce("Disponible").ToString)
|
||||||
End If
|
'End If
|
||||||
GvEcommercePSRealacionados.DataBind()
|
'GvEcommercePSRealacionados.DataBind()
|
||||||
UpEcommercePSRelacionados.Update()
|
'UpEcommercePSRelacionados.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Private Function GuardaEcommerce() As Boolean
|
Private Function GuardaEcommerce() As Boolean
|
||||||
Dim TieneError As Boolean = False
|
Dim TieneError As Boolean = False
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(700) = "1" Then
|
||||||
|
|
||||||
'SI NO SE HA GUARDADO EN ECOMMERCE Y NO TIENE NINGUN VALOR OMITE
|
''SI NO SE HA GUARDADO EN ECOMMERCE Y NO TIENE NINGUN VALOR OMITE
|
||||||
If Not AplicaEcommerce And Not ChkEcommerceDisponible.Checked And TxtEcommerceDescripcion.Text.Length = 0 And TxtEcommercePrecioBase.Text.Length = 0 And TxtEcommercePrecioPromocion.Text.Length = 0 Then
|
'If Not AplicaEcommerce And Not ChkEcommerceDisponible.Checked And TxtEcommerceDescripcion.Text.Length = 0 And TxtEcommercePrecioBase.Text.Length = 0 And TxtEcommercePrecioPromocion.Text.Length = 0 Then
|
||||||
Return False
|
' Return False
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
If ChkEcommerceDisponible.Checked Then
|
'If ChkEcommerceDisponible.Checked Then
|
||||||
If Not ValidaGuardarEcommerce() Then
|
' If Not ValidaGuardarEcommerce() Then
|
||||||
Return True
|
' Return True
|
||||||
End If
|
' End If
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
'Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||||
Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
'Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||||
Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
'Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||||
Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
|
'Dim Disponible As Boolean = ChkEcommerceDisponible.Checked
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
'If Not ObjEcommerce.ProductosAddUpdate(CvePS, Descripcion, PrecioBase, PrecioPromocion, Disponible, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
TieneError = True
|
' TieneError = True
|
||||||
End If
|
'End If
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -2569,28 +2589,28 @@ Partial Class ProductosyServicios
|
|||||||
Dim Mensaje As New StringBuilder
|
Dim Mensaje As New StringBuilder
|
||||||
|
|
||||||
'DESCRIPCION
|
'DESCRIPCION
|
||||||
Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
'Dim Descripcion As String = TxtEcommerceDescripcion.Text.Trim
|
||||||
If Descripcion.Length = 0 Then
|
'If Descripcion.Length = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Descripción</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
If Descripcion.Length > 255 Then
|
'If Descripcion.Length > 255 Then
|
||||||
Mensaje.Append("- El campo <b>Descripción</b> admite maximo 255 caracteres. Por favor verifique y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Descripción</b> admite maximo 255 caracteres. Por favor verifique y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'PRECIO BASE
|
''PRECIO BASE
|
||||||
Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
'Dim PrecioBase As Double = TxtEcommercePrecioBase.Text.Trim.ToDouble
|
||||||
If PrecioBase = 0 Then
|
'If PrecioBase = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Precio</b> es obligatorio. Por favor verifique y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
If PrecioBase < 0 Then
|
'If PrecioBase < 0 Then
|
||||||
Mensaje.Append("- El campo <b>Precio</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Precio</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
'PRECIO FINAL
|
''PRECIO FINAL
|
||||||
Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
'Dim PrecioPromocion As Double = TxtEcommercePrecioPromocion.Text.Trim.ToDouble
|
||||||
If PrecioPromocion < 0 Then
|
'If PrecioPromocion < 0 Then
|
||||||
Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Precio Final</b> no puede ser negativo. Por favor verifique y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
|
|
||||||
'VALIDACION
|
'VALIDACION
|
||||||
@@ -2606,225 +2626,225 @@ Partial Class ProductosyServicios
|
|||||||
#Region " PRODUCTOS INSIGNIAS "
|
#Region " PRODUCTOS INSIGNIAS "
|
||||||
|
|
||||||
Private Sub CargaPSInsigniasEcommerce()
|
Private Sub CargaPSInsigniasEcommerce()
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosInsigniasGet(CvePS, -1, UsuarioActual.CveEmpresa) Then
|
'If ObjEcommerce.ProductosInsigniasGet(CvePS, -1, UsuarioActual.CveEmpresa) Then
|
||||||
GvEcommercePSInsignias.DataSource = ObjEcommerce.DtResultados
|
' GvEcommercePSInsignias.DataSource = ObjEcommerce.DtResultados
|
||||||
Else
|
'Else
|
||||||
GvEcommercePSInsignias.DataSource = Nothing
|
' GvEcommercePSInsignias.DataSource = Nothing
|
||||||
End If
|
'End If
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
GvEcommercePSInsignias.DataBind()
|
'GvEcommercePSInsignias.DataBind()
|
||||||
UpEcommerceInsignias.Update()
|
'UpEcommerceInsignias.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnEcommerceInsignias_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEcommerceInsignias_Click(sender As Object, e As EventArgs)
|
||||||
If Not ValidaAgregarProductosInsigniasEcommerce() Then
|
'If Not ValidaAgregarProductosInsigniasEcommerce() Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim TieneError As Boolean = False
|
'Dim TieneError As Boolean = False
|
||||||
Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
'Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||||
|
|
||||||
'AGREGAR
|
''AGREGAR
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosInsigniasAdd(Me.CvePS, CveInsignia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
'If ObjEcommerce.ProductosInsigniasAdd(Me.CvePS, CveInsignia, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("La Insignia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
' Alert("La Insignia se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
'Else
|
||||||
TieneError = True
|
' TieneError = True
|
||||||
End If
|
'End If
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
If Not TieneError Then
|
'If Not TieneError Then
|
||||||
DdlEcommerceInsignia.SelectedValueExist(-1)
|
' DdlEcommerceInsignia.SelectedValueExist(-1)
|
||||||
CargaPSInsigniasEcommerce()
|
' CargaPSInsigniasEcommerce()
|
||||||
End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
|
Private Function ValidaAgregarProductosInsigniasEcommerce() As Boolean
|
||||||
Dim Retorno As Boolean = True
|
Dim Retorno As Boolean = True
|
||||||
Dim Mensaje As New StringBuilder
|
'Dim Mensaje As New StringBuilder
|
||||||
|
|
||||||
'INSIGNIA
|
''INSIGNIA
|
||||||
Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
'Dim CveInsignia As Integer = DdlEcommerceInsignia.SelectedValue.ToEntero
|
||||||
If CveInsignia = 0 Then
|
'If CveInsignia = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Insignia</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
For Each GvRow As GridViewRow In GvEcommercePSInsignias.Rows
|
'For Each GvRow As GridViewRow In GvEcommercePSInsignias.Rows
|
||||||
If GvRow.DataKey("CveInsignia").ToString.ToEntero = CveInsignia Then
|
' If GvRow.DataKey("CveInsignia").ToString.ToEntero = CveInsignia Then
|
||||||
Mensaje.Append($"- La Insignia <b>{DdlEcommerceInsignia.SelectedItem.Text}</b> ya es parte del producto y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
' Mensaje.Append($"- La Insignia <b>{DdlEcommerceInsignia.SelectedItem.Text}</b> ya es parte del producto y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
'Next
|
||||||
|
|
||||||
'VALIDACION
|
''VALIDACION
|
||||||
If Mensaje.ToString.Length > 0 Then
|
'If Mensaje.ToString.Length > 0 Then
|
||||||
Retorno = False
|
' Retorno = False
|
||||||
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
' Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
|
'Protected Sub GvEcommercePSInsignias_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSInsignias.RowDeleting
|
||||||
Dim TieneError As Boolean = False
|
' Dim TieneError As Boolean = False
|
||||||
Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
|
' Dim GvRow As GridViewRow = GvEcommercePSInsignias.Rows(e.RowIndex)
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
' Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
' If ObjEcommerce.ProductosInsigniasRemove(GvRow.DataKey("CvePS").ToString.ToEntero, GvRow.DataKey("CveInsignia").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("La Insignia se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
' Alert("La Insignia se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
' Else
|
||||||
TieneError = True
|
' TieneError = True
|
||||||
End If
|
' End If
|
||||||
ObjEcommerce.Dispose()
|
' ObjEcommerce.Dispose()
|
||||||
|
|
||||||
If Not TieneError Then
|
' If Not TieneError Then
|
||||||
CargaPSInsigniasEcommerce()
|
' CargaPSInsigniasEcommerce()
|
||||||
End If
|
' End If
|
||||||
End Sub
|
'End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PRODUCTOS IMAGENES "
|
#Region " PRODUCTOS IMAGENES "
|
||||||
Private Sub CargarGaleriaImagenesEcommerce()
|
'Private Sub CargarGaleriaImagenesEcommerce()
|
||||||
Dim TmpDT As DataTable = Nothing
|
' Dim TmpDT As DataTable = Nothing
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
' Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosImagenesGet(CvePS, UsuarioActual.CveEmpresa) Then
|
' If ObjEcommerce.ProductosImagenesGet(CvePS, UsuarioActual.CveEmpresa) Then
|
||||||
TmpDT = ObjEcommerce.DtResultados
|
' TmpDT = ObjEcommerce.DtResultados
|
||||||
Else
|
' Else
|
||||||
TmpDT = Nothing
|
' TmpDT = Nothing
|
||||||
End If
|
' End If
|
||||||
ObjEcommerce.Dispose()
|
' ObjEcommerce.Dispose()
|
||||||
|
|
||||||
RptFotos.DataSource = TmpDT
|
' RptFotos.DataSource = TmpDT
|
||||||
RptFotos.DataBind()
|
' RptFotos.DataBind()
|
||||||
UpEcommerceGaleriaImagenes.Update()
|
' UpEcommerceGaleriaImagenes.Update()
|
||||||
End Sub
|
'End Sub
|
||||||
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEcommerceImagenes_Click(sender As Object, e As EventArgs)
|
||||||
|
|
||||||
Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
|
'Dim FilesGral As List(Of Archivo) = TxtEcommerceImagenes.getfiles().Archivos
|
||||||
Dim FileMove As String = ""
|
'Dim FileMove As String = ""
|
||||||
Dim Archivo As String = ""
|
'Dim Archivo As String = ""
|
||||||
Dim DirectorioTemporal As String = ""
|
'Dim DirectorioTemporal As String = ""
|
||||||
|
|
||||||
Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
|
'Dim DirectorioDestino As String = $"{UsuarioActual.Empresa.Ruta}\Ecommerce\Productos\Imagenes\"
|
||||||
If Not Directory.Exists(DirectorioDestino) Then
|
'If Not Directory.Exists(DirectorioDestino) Then
|
||||||
Directory.CreateDirectory(DirectorioDestino)
|
' Directory.CreateDirectory(DirectorioDestino)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
For Each FileItem As Archivo In FilesGral
|
'For Each FileItem As Archivo In FilesGral
|
||||||
Archivo = NowADS().Ticks.ToString
|
' Archivo = NowADS().Ticks.ToString
|
||||||
Try
|
' Try
|
||||||
FileMove = FileItem.filename
|
' FileMove = FileItem.filename
|
||||||
DirectorioTemporal = $"{AppDomain.CurrentDomain.BaseDirectory}Temp\{FileMove}"
|
' DirectorioTemporal = $"{AppDomain.CurrentDomain.BaseDirectory}Temp\{FileMove}"
|
||||||
|
|
||||||
Archivo = $"{Archivo}{IO.Path.GetExtension(DirectorioTemporal)}"
|
' Archivo = $"{Archivo}{IO.Path.GetExtension(DirectorioTemporal)}"
|
||||||
DirectorioDestino += Archivo
|
' DirectorioDestino += Archivo
|
||||||
If ObjEcommerce.ProductosImagenesAdd(CvePS, $"Ecommerce\Productos\Imagenes\{Archivo}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
' If ObjEcommerce.ProductosImagenesAdd(CvePS, $"Ecommerce\Productos\Imagenes\{Archivo}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
CargarGaleriaImagenesEcommerce()
|
' CargarGaleriaImagenesEcommerce()
|
||||||
My.Computer.FileSystem.MoveFile(DirectorioTemporal, DirectorioDestino)
|
' My.Computer.FileSystem.MoveFile(DirectorioTemporal, DirectorioDestino)
|
||||||
End If
|
' End If
|
||||||
Catch ex As Exception
|
' Catch ex As Exception
|
||||||
End Try
|
' End Try
|
||||||
Next
|
'Next
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
RegistraScript("$(""#Modalupfotos"").modal(""hide"");initcarusel();")
|
'RegistraScript("$(""#Modalupfotos"").modal(""hide"");initcarusel();")
|
||||||
TxtEcommerceImagenes.Text = "[]"
|
'TxtEcommerceImagenes.Text = "[]"
|
||||||
UpUpFotos.Update()
|
'UpUpFotos.Update()
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnEcommerceEliminarImagenes_Click(sender As Object, e As System.EventArgs)
|
Protected Sub BtnEcommerceEliminarImagenes_Click(sender As Object, e As System.EventArgs)
|
||||||
Dim CveImagenActivoFijo As Integer = 0
|
'Dim CveImagenActivoFijo As Integer = 0
|
||||||
CveImagenActivoFijo = Integer.Parse(DirectCast(sender, Button).CommandArgument)
|
'CveImagenActivoFijo = Integer.Parse(DirectCast(sender, Button).CommandArgument)
|
||||||
|
|
||||||
If (CveImagenActivoFijo > 0) Then
|
'If (CveImagenActivoFijo > 0) Then
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
' Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosImagenesRemove(CveImagenActivoFijo, UsuarioActual.CveEmpresa) Then
|
' If ObjEcommerce.ProductosImagenesRemove(CveImagenActivoFijo, UsuarioActual.CveEmpresa) Then
|
||||||
File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjEcommerce.DtResultados.Rows(0)("URL")))
|
' File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, ObjEcommerce.DtResultados.Rows(0)("URL")))
|
||||||
CargarGaleriaImagenesEcommerce()
|
' CargarGaleriaImagenesEcommerce()
|
||||||
RegistraScript("initcarusel();")
|
' RegistraScript("initcarusel();")
|
||||||
End If
|
' End If
|
||||||
ObjEcommerce.Dispose()
|
' ObjEcommerce.Dispose()
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region " PRODUCTOS RELACIONADOS "
|
#Region " PRODUCTOS RELACIONADOS "
|
||||||
Private Sub CargaPSRelacionadosEcommerce()
|
Private Sub CargaPSRelacionadosEcommerce()
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosRelacionadosGet(CvePS, UsuarioActual.CveEmpresa) Then
|
'If ObjEcommerce.ProductosRelacionadosGet(CvePS, UsuarioActual.CveEmpresa) Then
|
||||||
GvEcommercePSRealacionados.DataSource = ObjEcommerce.DtResultados
|
' GvEcommercePSRealacionados.DataSource = ObjEcommerce.DtResultados
|
||||||
Else
|
'Else
|
||||||
GvEcommercePSRealacionados.DataSource = Nothing
|
' GvEcommercePSRealacionados.DataSource = Nothing
|
||||||
End If
|
'End If
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
GvEcommercePSRealacionados.DataBind()
|
'GvEcommercePSRealacionados.DataBind()
|
||||||
UpEcommercePSRelacionados.Update()
|
'UpEcommercePSRelacionados.Update()
|
||||||
End Sub
|
End Sub
|
||||||
Protected Sub BtnEcommercePSRelacionados_Click(sender As Object, e As EventArgs)
|
Protected Sub BtnEcommercePSRelacionados_Click(sender As Object, e As EventArgs)
|
||||||
If Not ValidaAgregarProductosRelacionadosEcommerce() Then
|
'If Not ValidaAgregarProductosRelacionadosEcommerce() Then
|
||||||
Exit Sub
|
' Exit Sub
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Dim TieneError As Boolean = False
|
'Dim TieneError As Boolean = False
|
||||||
Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
'Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||||
|
|
||||||
'AGREGAR
|
''AGREGAR
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
'Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosRelacionadosAdd(Me.CvePS, CvePS, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
'If ObjEcommerce.ProductosRelacionadosAdd(Me.CvePS, CvePS, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("La relación se agregó correctamente.", TipoMensaje.MsgInformacion)
|
' Alert("La relación se agregó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
'Else
|
||||||
TieneError = True
|
' TieneError = True
|
||||||
End If
|
'End If
|
||||||
ObjEcommerce.Dispose()
|
'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
If Not TieneError Then
|
'If Not TieneError Then
|
||||||
DdlEcommercePSRelacionado.SelectedValue = "-1"
|
' DdlEcommercePSRelacionado.SelectedValue = "-1"
|
||||||
DdlEcommercePSRelacionado.SelectedText = ""
|
' DdlEcommercePSRelacionado.SelectedText = ""
|
||||||
CargaPSRelacionadosEcommerce()
|
' CargaPSRelacionadosEcommerce()
|
||||||
End If
|
'End If
|
||||||
End Sub
|
End Sub
|
||||||
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
|
Private Function ValidaAgregarProductosRelacionadosEcommerce() As Boolean
|
||||||
Dim Retorno As Boolean = True
|
'Dim Retorno As Boolean = True
|
||||||
Dim Mensaje As New StringBuilder
|
'Dim Mensaje As New StringBuilder
|
||||||
|
|
||||||
'PS
|
''PS
|
||||||
Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
'Dim CvePS As Integer = DdlEcommercePSRelacionado.SelectedValue.ToEntero
|
||||||
If CvePS = 0 Then
|
'If CvePS = 0 Then
|
||||||
Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
' Mensaje.Append("- El campo <b>Producto</b> es obligatorio. Por favor introduzcalo y vuelva a intentar. <br>")
|
||||||
End If
|
'End If
|
||||||
For Each GvRow As GridViewRow In GvEcommercePSRealacionados.Rows
|
'For Each GvRow As GridViewRow In GvEcommercePSRealacionados.Rows
|
||||||
If GvRow.DataKey("CvePS").ToString.ToEntero = CvePS Then
|
' If GvRow.DataKey("CvePS").ToString.ToEntero = CvePS Then
|
||||||
Mensaje.Append($"- El producto <b>{DdlEcommercePSRelacionado.SelectedText}</b> ya esta relacionado y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
' Mensaje.Append($"- El producto <b>{DdlEcommercePSRelacionado.SelectedText}</b> ya esta relacionado y no se puede duplicar. Por favor verifique y vuelva a intentar. <br>")
|
||||||
Exit For
|
' Exit For
|
||||||
End If
|
' End If
|
||||||
Next
|
'Next
|
||||||
|
|
||||||
'VALIDACION
|
''VALIDACION
|
||||||
If Mensaje.ToString.Length > 0 Then
|
'If Mensaje.ToString.Length > 0 Then
|
||||||
Retorno = False
|
' Retorno = False
|
||||||
Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
' Alert(Mensaje.ToString, TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
'End If
|
||||||
|
|
||||||
Return Retorno
|
'Return Retorno
|
||||||
End Function
|
End Function
|
||||||
Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
|
'Protected Sub GvEcommercePSRealacionados_RowDeleting(sender As Object, e As System.Web.UI.WebControls.GridViewDeleteEventArgs) Handles GvEcommercePSRealacionados.RowDeleting
|
||||||
Dim TieneError As Boolean = False
|
' 'Dim TieneError As Boolean = False
|
||||||
Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
|
' 'Dim GvRow As GridViewRow = GvEcommercePSRealacionados.Rows(e.RowIndex)
|
||||||
|
|
||||||
Dim ObjEcommerce As New ClsECommerce
|
' 'Dim ObjEcommerce As New ClsECommerce
|
||||||
If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
' 'If ObjEcommerce.ProductosRelacionadosRemove(GvRow.DataKey("CvePS1").ToString.ToEntero, GvRow.DataKey("CvePS2").ToString.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then
|
||||||
Alert("La relación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
' ' Alert("La relación se eliminó correctamente.", TipoMensaje.MsgInformacion)
|
||||||
Else
|
' 'Else
|
||||||
TieneError = True
|
' ' TieneError = True
|
||||||
End If
|
' 'End If
|
||||||
ObjEcommerce.Dispose()
|
' 'ObjEcommerce.Dispose()
|
||||||
|
|
||||||
If Not TieneError Then
|
' 'If Not TieneError Then
|
||||||
CargaPSRelacionadosEcommerce()
|
' ' CargaPSRelacionadosEcommerce()
|
||||||
End If
|
' 'End If
|
||||||
End Sub
|
'End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
@@ -3595,7 +3615,77 @@ Partial Class ProductosyServicios
|
|||||||
End If
|
End If
|
||||||
Dim params As New List(Of ReportParameter)
|
Dim params As New List(Of ReportParameter)
|
||||||
|
|
||||||
ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
Dim lrds As New List(Of ReportDataSource)
|
||||||
|
Dim rds As New ReportDataSource
|
||||||
|
rds.Name = "Datos"
|
||||||
|
rds.Value = DtPrecios
|
||||||
|
lrds.Add(rds)
|
||||||
|
|
||||||
|
Dim bytesPDF = StreamBytesStimul("Facturas", DirectorioArchivo, lrds, params, NombreArchivo:="Precios", Formato:="PDF")
|
||||||
|
Dim pdf64 = Convert.ToBase64String(bytesPDF)
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
|
'ImprimirPDFStimul(DirectorioArchivo, DtPrecios, params, "Precios")
|
||||||
|
End If
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Private Sub BtnUpFotos_Click(sender As Object, e As EventArgs) Handles BtnUpFotos.Click
|
||||||
|
|
||||||
|
Dim FilesGral As List(Of Archivo) = TxtUpFotos.getfiles().Archivos
|
||||||
|
Dim FileMove As String = ""
|
||||||
|
Dim NewName As String
|
||||||
|
For Each FileItem As Archivo In FilesGral
|
||||||
|
|
||||||
|
NewName = NowADS().Ticks.ToString
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
Try
|
||||||
|
FileMove = FileItem.filename
|
||||||
|
Dim DirectorioOld As New StringBuilder
|
||||||
|
Dim DirectorioNew As New StringBuilder
|
||||||
|
DirectorioOld.AppendFormat("{0}Temp\{1}", AppDomain.CurrentDomain.BaseDirectory, FileMove)
|
||||||
|
DirectorioNew.AppendFormat("{0}PS\", UsuarioActual.Empresa.Ruta)
|
||||||
|
If Not Directory.Exists(DirectorioNew.ToString) Then
|
||||||
|
Directory.CreateDirectory(DirectorioNew.ToString)
|
||||||
|
End If
|
||||||
|
NewName = String.Format("{0}{1}", NewName, IO.Path.GetExtension(DirectorioOld.ToString()))
|
||||||
|
DirectorioNew.Append(NewName)
|
||||||
|
|
||||||
|
Me.Imagen = String.Format("PS/{0}", NewName)
|
||||||
|
If ObjPS.UpdatePSImagen(Me.CvePS, Me.Imagen) Then
|
||||||
|
My.Computer.FileSystem.MoveFile(DirectorioOld.ToString, DirectorioNew.ToString)
|
||||||
|
End If
|
||||||
|
|
||||||
|
imgImagen.Attributes.Add("src", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||||
|
hplImagen.Attributes.Add("href", String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Me.Imagen)))
|
||||||
|
upGaleria.Update()
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al guardar la imagen", ex)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
ObjPS.Dispose()
|
||||||
|
RegistraScript("$(""#Modalupfotos"").modal(""hide"");initcarusel();")
|
||||||
|
TxtUpFotos.Text = "[]"
|
||||||
|
UpUpFotos.Update()
|
||||||
|
Next
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
|
Protected Sub BtnEliminarFoto_Click(sender As Object, e As System.EventArgs)
|
||||||
|
|
||||||
|
If (Me.CvePS > 0) Then
|
||||||
|
Dim ObjPS As New ClsProductosServicios
|
||||||
|
If ObjPS.UpdatePSImagen(Me.CvePS, "") Then
|
||||||
|
File.Delete(String.Format("{0}{1}", UsuarioActual.Empresa.Ruta, Me.Imagen))
|
||||||
|
Me.Imagen = ""
|
||||||
|
imgImagen.Attributes.Add("src", "")
|
||||||
|
hplImagen.Attributes.Add("href", "")
|
||||||
|
RegistraScript("initcarusel();")
|
||||||
|
End If
|
||||||
|
ObjPS.Dispose()
|
||||||
|
|
||||||
|
upGaleria.Update()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -15,7 +15,7 @@
|
|||||||
</asp:Content>
|
</asp:Content>
|
||||||
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
<asp:Content ID="Content5" ContentPlaceHolderID="H" runat="Server">
|
||||||
|
|
||||||
<asp:UpdatePanel runat="server" ID="UpAgregar" UpdateMode="Always">
|
<asp:UpdatePanel runat="server" ID="UpAcciones" UpdateMode="Always">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<li>
|
<li>
|
||||||
<asp:LinkButton runat="server" ID="LnkComisiones" OnClick="LnkComisiones_Click" data-toggle="tooltip" data-placement="left" title="Comisiones" Text="<i class='fa fa-money'></i> Comisiones"></asp:LinkButton>
|
<asp:LinkButton runat="server" ID="LnkComisiones" OnClick="LnkComisiones_Click" data-toggle="tooltip" data-placement="left" title="Comisiones" Text="<i class='fa fa-money'></i> Comisiones"></asp:LinkButton>
|
||||||
@@ -81,21 +81,25 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="vcoCvFF" runat="server" HighlightCssClass="vco" TargetControlID="cvFechaF" Width="350px"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Médico:</label>
|
||||||
<%-- <label class="col-md-1 ">Cliente:</label>
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlClientes" Width="100%" data-metodo="getcliente" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%;"></ADS:Dropdownlost>
|
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Vendedor:</label>
|
||||||
<label class="col-md-1 ">Grupo:</label>
|
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
<asp:DropDownList ID="DdlGrupo" CssClass="form-control input-sm select2me" runat="server" Width="100%">
|
<asp:DropDownList ID="DdlVendedor" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Vendedor" DataValueField="CveVendedor" Width="100%">
|
||||||
<asp:ListItem Value="1" Selected="True">Médico</asp:ListItem>
|
|
||||||
<asp:ListItem Value="2" >Procedimiento</asp:ListItem>
|
|
||||||
<asp:ListItem Value="3" >Clientes</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>--%>
|
</div>
|
||||||
|
|
||||||
|
<label class="col-md-1 ">Técnico:</label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
<asp:DropDownList ID="DdlUsuarioAtendio" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" DataTextField="Nombre" DataValueField="CveUsuario" Width="100%">
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -103,19 +107,6 @@
|
|||||||
<div class="portlet-body" style="display: none">
|
<div class="portlet-body" style="display: none">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<%-- <label class="col-md-1 ">Médico:</label>
|
|
||||||
<div class="col-md-1">
|
|
||||||
<asp:DropDownList ID="DdlMedico" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Medico" DataValueField="CveMedico" Width="100%">
|
|
||||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<label class="col-md-1 ">Procedimiento:</label>
|
|
||||||
<div class="col-md-1">
|
|
||||||
<asp:DropDownList ID="DdlProcedimiento" CssClass="form-control input-sm select2me" runat="server" AppendDataBoundItems="true" CausesValidation="true" DataTextField="Procedimiento" DataValueField="CveProcedimiento" Width="100%">
|
|
||||||
<asp:ListItem Value="-1">Todos</asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
|
||||||
</div> --%>
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -132,80 +123,30 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False"
|
||||||
DataKeyNames="CveMedico,Nombre,APaterno,AMaterno,CedulaProfesional,FechaNacimiento,Notas,Estatus,CveUsuario,FechaIng,CveEmpresa,Telefono,Mail,CveMedicoEspecialidad,CveMedicoSubEspecialidad,Celular,Usuario,CveVendedor"
|
DataKeyNames="CveVenta,SerieFolio,Hospital,Medico,Especialidad,FechaCirugia,Procedimiento,Codigo,PU,Cantidad,Total,CveVendedor,Vendedor,Nombre,ComisionMedico,ComisionVendedor,ComisionTecnico"
|
||||||
data-sort="true"
|
data-sort="true"
|
||||||
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
EmptyDataText="No se encontraron Medicos Registrados" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Nombre" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
<asp:BoundField HeaderText="Folio" DataField="SerieFolio" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:Literal ID="LtlNombre" runat="server" Text='<%# Eval("Nombre") %>'></asp:Literal>
|
<asp:BoundField HeaderText="Nombre Hospital" DataField="Hospital" ItemStyle-HorizontalAlign="Left" />
|
||||||
</ItemTemplate>
|
<asp:BoundField HeaderText="Especialidad" DataField="Especialidad" ItemStyle-HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
<asp:BoundField HeaderText="Médico" DataField="Medico" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:TemplateField HeaderText="Apellido Paterno" ItemStyle-HorizontalAlign="Left">
|
<asp:BoundField HeaderText="Fecha Hora Cirugia" DataField="FechaCirugia" ItemStyle-HorizontalAlign="Left" DataFormatString="{0:dd/MM/yyyy hh:mm}" />
|
||||||
<ItemTemplate>
|
<asp:BoundField HeaderText="Procedimiento" DataField="Procedimiento" ItemStyle-HorizontalAlign="Left" />
|
||||||
<asp:Literal ID="LtlAPaterno" runat="server" Text='<%# Eval("APaterno") %>'></asp:Literal>
|
<asp:BoundField HeaderText="Código Producto" DataField="Codigo" ItemStyle-HorizontalAlign="Left" />
|
||||||
</ItemTemplate>
|
<asp:BoundField HeaderText="Nombre Del Producto" DataField="PS" ItemStyle-HorizontalAlign="Left" />
|
||||||
</asp:TemplateField>
|
<asp:BoundField HeaderText="Precio Unitario" DataField="PU" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:TemplateField HeaderText="Apellido Materno" ItemStyle-HorizontalAlign="Left">
|
<asp:BoundField HeaderText="Cantidad Utilizada" DataField="Cantidad" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<ItemTemplate>
|
<asp:BoundField HeaderText="Monto Venta Total" DataField="Total" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:Literal ID="LtlAMaterno" runat="server" Text='<%# Eval("AMaterno") %>'></asp:Literal>
|
<asp:BoundField HeaderText="Vendedor" DataField="Vendedor" ItemStyle-HorizontalAlign="Left" />
|
||||||
</ItemTemplate>
|
<asp:BoundField HeaderText="Comisión Vendedor" DataField="ComisionVendedor" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Cédula Profesional" ItemStyle-HorizontalAlign="Left">
|
<asp:BoundField HeaderText="Técnico" DataField="Nombre" ItemStyle-HorizontalAlign="Left" />
|
||||||
<ItemTemplate>
|
<asp:BoundField HeaderText="Comisión Técnico" DataField="ComisionTecnico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<asp:Literal ID="LtlCedulaProfesional" runat="server" Text='<%# Eval("CedulaProfesional") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
<asp:BoundField HeaderText="Educación Médica" DataField="ComisionMedico" DataFormatString="{0:###,###,###,###.##}" ItemStyle-HorizontalAlign="Right" />
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Fecha Nacimiento" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaNacimiento" runat="server" Text='<%# Eval("FechaNacimiento", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Teléfono" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlTelefono" runat="server" Text='<%# Eval("Telefono") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Correo" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlCorreo" runat="server" Text='<%# Eval("Mail") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Hospital" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlHospital" runat="server" Text='<%# Eval("Hospital") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Consultorio" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlConsultorio" runat="server" Text='<%# Eval("Consultorio") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Especialidad" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEspecialidad" runat="server" Text='<%# Eval("Especialidad") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Vendedor" ItemStyle-HorizontalAlign="Left">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlVendedor" runat="server" Text='<%# Eval("Vendedor") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("EstatusStr") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Fecha Ing." ItemStyle-HorizontalAlign="Center" Visible="false">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-HorizontalAlign="Center" Visible="false">
|
|
||||||
<ItemTemplate>
|
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
|
||||||
</ItemTemplate>
|
|
||||||
</asp:TemplateField>
|
|
||||||
|
|
||||||
|
|
||||||
</Columns>
|
</Columns>
|
||||||
@@ -223,7 +164,7 @@
|
|||||||
|
|
||||||
|
|
||||||
<div id="DvModalComisiones" class="modal ADS fade" role="dialog">
|
<div id="DvModalComisiones" class="modal ADS fade" role="dialog">
|
||||||
<div class="modal-dialog" style="width: 650px;">
|
<div class="modal-dialog" style="width: 800px;">
|
||||||
<asp:UpdatePanel runat="server" class="modal-content" ID="UpDvModalComisiones" UpdateMode="Conditional">
|
<asp:UpdatePanel runat="server" class="modal-content" ID="UpDvModalComisiones" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-header ">
|
<div class="modal-header ">
|
||||||
@@ -247,13 +188,13 @@
|
|||||||
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
EmptyDataText="No se encontraron Comisiones" ToolTip="Listado de Medicos" CssClass="table table-striped table-advance table-hover Widthall ScrollAD mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Codigo/Producto" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Código/Producto" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlCodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
<asp:Literal ID="LtlCodigoPS" runat="server" Text='<%# Eval("CodigoPS") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Medico" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Médico" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtComisionMedico" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionMedico")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
<asp:TextBox ID="TxtComisionMedico" Width="75px" runat="server" Text='<%# String.Format("{0:#.00}", Eval("ComisionMedico")) %>' Style="text-align: right;" onkeyup="FormatoMoneda(this)" AutoComplete="off"></asp:TextBox>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
|
|||||||
@@ -1,40 +1,86 @@
|
|||||||
Option Explicit On
|
Option Explicit On
|
||||||
Option Strict On
|
Option Strict On
|
||||||
|
|
||||||
|
Imports System.Data
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports Microsoft.Extensions.Primitives
|
|
||||||
|
|
||||||
Partial Class Ventas_RepComisionesSMS
|
Partial Class Ventas_RepComisionesSMS
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
|
Property DTDatos As DataTable
|
||||||
|
Get
|
||||||
|
If ViewState("DTDatos") Is Nothing Then
|
||||||
|
ViewState("DTDatos") = New DataTable
|
||||||
|
End If
|
||||||
|
Return DirectCast(ViewState("DTDatos"), DataTable)
|
||||||
|
End Get
|
||||||
|
Set(value As DataTable)
|
||||||
|
ViewState("DTDatos") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load
|
||||||
|
|
||||||
If Not Page.IsPostBack Then
|
If Not Page.IsPostBack Then
|
||||||
|
|
||||||
|
Dim FechaInicial As Date = New Date(10)
|
||||||
|
|
||||||
|
txtFechaI.Text = Now.FirstDayOfMonth.ToString("dd/MM/yyyy")
|
||||||
|
txtFechaF.Text = Now.ToString("dd/MM/yyyy")
|
||||||
|
CargaCombos()
|
||||||
CargaDatos()
|
CargaDatos()
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
Private Sub CargaCombos()
|
||||||
|
|
||||||
|
|
||||||
|
'If UsuarioActual.Empresa.Funcionalidad(302) = "1" AndAlso DdlSubProyectoDatos.SelectedValue.ToEntero() > 0 Then
|
||||||
|
' DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa, VendedorTipo:=-1).FiltraParametros(String.Format("VendedorTipo IN (1,4) AND (CveSubProyecto IS NULL OR CveSubProyecto = {0})", DdlSubProyectoDatos.SelectedValue))
|
||||||
|
'Else
|
||||||
|
DdlVendedor.DataSource = GlobalDTVendedores(UsuarioActual.CveEmpresa).FiltraParametros("VendedorTipo = 1")
|
||||||
|
'End If
|
||||||
|
DdlVendedor.DataBind()
|
||||||
|
DdlVendedor.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
|
||||||
|
DdlMedico.DataSource = GlobalDTMedicos(UsuarioActual.CveEmpresa).FiltraParametros("Estatus = 'True' ")
|
||||||
|
DdlMedico.DataBind()
|
||||||
|
DdlMedico.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
DdlUsuarioAtendio.DataSource = GlobalDTUsuarios(-1, UsuarioActual.CveEmpresa)
|
||||||
|
DdlUsuarioAtendio.DataBind()
|
||||||
|
DdlUsuarioAtendio.Items.Insert(0, New ListItem("Todos", "-1"))
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
End Sub
|
||||||
|
|
||||||
Public Sub CargaDatos()
|
Public Sub CargaDatos()
|
||||||
|
|
||||||
|
|
||||||
'Dim ObjVentas As New ClsVentas
|
|
||||||
|
|
||||||
'If ObjVentas.GetMedicos(-1, UsuarioActual.CveEmpresa, -1) Then
|
LnkExportar.Visible = False
|
||||||
' GvDatos.DataSource = ObjVentas.DtResultados
|
|
||||||
'Else
|
|
||||||
' GvDatos.DataSource = Nothing
|
|
||||||
'End If
|
|
||||||
|
|
||||||
'ObjVentas.Dispose()
|
Dim ObjVentas As New ClsVentas
|
||||||
|
|
||||||
'GvDatos.DataBind()
|
If ObjVentas.GetComisionesMedicasRep(txtFechaI.Text.ToDate, txtFechaF.Text.ToDate, UsuarioActual.CveEmpresa, -1, -1, DdlMedico.SelectedValue.ToEntero, DdlVendedor.SelectedValue.ToEntero, DdlUsuarioAtendio.SelectedValue.ToEntero, -1) Then
|
||||||
|
GvDatos.DataSource = ObjVentas.DtResultados
|
||||||
|
|
||||||
|
If ObjVentas.DtResultados IsNot Nothing AndAlso ObjVentas.DtResultados.Rows.Count > 0 Then
|
||||||
|
LnkExportar.Visible = True
|
||||||
|
End If
|
||||||
|
Else
|
||||||
|
GvDatos.DataSource = Nothing
|
||||||
|
End If
|
||||||
|
|
||||||
|
ObjVentas.Dispose()
|
||||||
|
|
||||||
|
GvDatos.DataBind()
|
||||||
|
|
||||||
|
UpDatos.Update()
|
||||||
|
|
||||||
'UpDatos.Update()
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -49,10 +95,10 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
Private Sub LnkExportar_Click(sender As Object, e As EventArgs) Handles LnkExportar.Click
|
||||||
|
|
||||||
GvDatos.Columns(10).Visible = False
|
GvDatos.Columns(10).Visible = False
|
||||||
Dim SbFiltros As New StringBuilder()
|
Dim SbFiltros As New StringBuilder()
|
||||||
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
SbFiltros.AppendFormat($"Fecha Inicio: {txtFechaI.Text} Fecha Fin: {txtFechaF.Text}|")
|
||||||
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
GvDatos.ExportToExcelGembox("CatMedicos", UsuarioActual, "Catálogo de Médicos", DatoTituloExtra:=$"", DatosFiltros:=SbFiltros.ToString())
|
||||||
GvDatos.Columns(10).Visible = True
|
GvDatos.Columns(10).Visible = True
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -70,13 +116,14 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaComisiones()
|
Private Sub CargaComisiones()
|
||||||
|
DTDatos = New DataTable
|
||||||
GvComisiones.DataSource = Nothing
|
GvComisiones.DataSource = Nothing
|
||||||
|
|
||||||
Dim objVentas As New ClsVentas
|
Dim objVentas As New ClsVentas
|
||||||
|
|
||||||
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
|
If objVentas.GetComisionesMedicas(UsuarioActual.CveEmpresa) Then
|
||||||
GvComisiones.DataSource = objVentas.DtResultados
|
GvComisiones.DataSource = objVentas.DtResultados
|
||||||
|
DTDatos = objVentas.DtResultados
|
||||||
End If
|
End If
|
||||||
|
|
||||||
objVentas.Dispose()
|
objVentas.Dispose()
|
||||||
@@ -98,8 +145,19 @@ Partial Class Ventas_RepComisionesSMS
|
|||||||
|
|
||||||
For Each GvRow As GridViewRow In GvComisiones.Rows
|
For Each GvRow As GridViewRow In GvComisiones.Rows
|
||||||
|
|
||||||
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, GvRow.FCTextBox("TxtComisionMedico").Text.ToDecimal, GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal, GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal) Then
|
Dim CvePS As Integer = GvRow.DataKey("CvePS").ToEntero
|
||||||
TieneError = True
|
Dim ComisionMedicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionMedico", $"CvePS = {CvePS} ").ToDecimal
|
||||||
|
Dim ComisionVendedorDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionVendedor", $"CvePS = {CvePS} ").ToDecimal
|
||||||
|
Dim ComisionTecnicoDT As Decimal = DTDatos.FiltroPrimeroValor("ComisionTecnico", $"CvePS = {CvePS} ").ToDecimal
|
||||||
|
|
||||||
|
Dim ComisionMedicoGV As Decimal = GvRow.FCTextBox("TxtComisionMedico").Text.ToDecimal
|
||||||
|
Dim ComisionVendedorGV As Decimal = GvRow.FCTextBox("TxtComisionVendedor").Text.ToDecimal
|
||||||
|
Dim ComisionTecnicoGV As Decimal = GvRow.FCTextBox("TxtComisionTecnico").Text.ToDecimal
|
||||||
|
|
||||||
|
If ComisionMedicoDT <> ComisionMedicoGV Or ComisionVendedorDT <> ComisionVendedorGV Or ComisionTecnicoDT <> ComisionTecnicoGV Then
|
||||||
|
If Not objVentas.AddUpdateComisionesMedicas(GvRow.DataKey("CvePS").ToEntero, UsuarioActual.CveEmpresa, ComisionMedicoGV, ComisionVendedorGV, ComisionTecnicoGV) Then
|
||||||
|
TieneError = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|||||||
@@ -979,6 +979,41 @@
|
|||||||
</div>
|
</div>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
|
|
||||||
|
<asp:UpdatePanel ID="UpImagen" runat="server" UpdateMode="Conditional" class="portlet light xspadding bordered whitoutcol" style="margin-left: auto" Visible="false">
|
||||||
|
<ContentTemplate>
|
||||||
|
<div class="portlet-title">
|
||||||
|
<div class="caption font-green">
|
||||||
|
<i class="icon-pin font-green"></i>
|
||||||
|
<span class="caption-subject bold uppercase">Imagen del producto</span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
<div class="actions">
|
||||||
|
<div class="btn-group">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="tools">
|
||||||
|
<a href="javascript:;" class="collapse"></a>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<div class="portlet-body form-horizontal form-row-sepe formnombottom" style="padding-top: 0px; margin-top: -5px;">
|
||||||
|
<div class="portfolio-content portfolio-1">
|
||||||
|
<div id="js-filters-juicy-projects" class="cbp-l-filters-button">
|
||||||
|
</div>
|
||||||
|
<div id="js-grid-juicy-projects" class="cbp">
|
||||||
|
<div class="cbp-item graphic">
|
||||||
|
<div class="cbp-caption">
|
||||||
|
<div class="cbp-caption-defaultWrap">
|
||||||
|
<img runat="server" id="imgImagen" style="max-height:250px !important; max-width:250px !important;">
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</ContentTemplate>
|
||||||
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
<asp:UpdatePanel ID="Updatetabs" runat="server" UpdateMode="Conditional">
|
||||||
@@ -7617,7 +7652,7 @@
|
|||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
<asp:BoundField HeaderText="PU" DataField="PU" DataFormatString="{0:N2}" ItemStyle-HorizontalAlign="Right" />
|
||||||
<%-- <asp:TemplateField HeaderText="PU Editado" Visible="false">
|
<%-- <asp:TemplateField HeaderText="PU Editado" Visible="false">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:TextBox ID="TxtPrecioEditado" runat="server" Text='<%#Eval("PU").ToString%>' MaxLength="12" Width="50%" Height="24px" CssClass="ImporteDevolucion"></asp:TextBox>
|
<asp:TextBox ID="TxtPrecioEditado" runat="server" Text='<%#Eval("PU").ToString%>' MaxLength="12" Width="50%" Height="24px" CssClass="ImporteDevolucion"></asp:TextBox>
|
||||||
<ajax:FilteredTextBoxExtender ID="SoloNumeros1Editado" runat="server" TargetControlID="TxtPrecioEditado" FilterType="Custom, Numbers" ValidChars=".," />
|
<ajax:FilteredTextBoxExtender ID="SoloNumeros1Editado" runat="server" TargetControlID="TxtPrecioEditado" FilterType="Custom, Numbers" ValidChars=".," />
|
||||||
@@ -8035,8 +8070,7 @@
|
|||||||
</div>
|
</div>
|
||||||
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
<div id="DivFormaCliente" runat="server" visible="false" class="row" style="padding-left: 16px;">
|
||||||
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
<div class="form-group form-md-line-input input-iconright col-xs-6">
|
||||||
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AutoPostBack="true" AppendDataBoundItems="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="100%">
|
<asp:DropDownList ID="DdlMetodoCliente" runat="server" CssClass=" form-control input-sm select2me" AutoPostBack="true" CausesValidation="true" DataTextField="MetodoPagoSAT" DataValueField="CveMetodoPago" Width="100%">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator6" runat="server" ControlToValidate="DdlMetodoCliente" InitialValue="-1" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Método Pago''</b> es necesario, por favor ingréselo." ValidationGroup="GrpGuardarCliente"></asp:RequiredFieldValidator>
|
||||||
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
|
<label for="<%= DdlMetodoCliente.ClientID.ToString()%>">Método Pago:</label>
|
||||||
@@ -8806,7 +8840,7 @@
|
|||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddMedico" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
|
|
||||||
<div class="modal-content" style="background-color: rgba(255, 255, 255, 0.0);width: 100vw!important;height: 100vh;" >
|
<div class="modal-content" style="background-color: rgba(255, 255, 255, 0.0); width: 100vw!important; height: 100vh;">
|
||||||
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
|
<UserControl:AddMedico runat="server" ID="AddMedicoControl" />
|
||||||
</div>
|
</div>
|
||||||
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
|
<asp:Button ID="BtnRecargaMedicos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaMedicos_Click" />
|
||||||
@@ -8820,7 +8854,7 @@
|
|||||||
|
|
||||||
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddProcedimiento" UpdateMode="Conditional">
|
<asp:UpdatePanel class="modal-dialog" runat="server" ID="UpModalAddProcedimiento" UpdateMode="Conditional">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<div class="modal-content" style="background-color: rgba(255, 255, 255, 0.0);width: 100vw!important;height: 100vh;" >
|
<div class="modal-content" style="background-color: rgba(255, 255, 255, 0.0); width: 100vw!important; height: 100vh;">
|
||||||
<UserControl:AddProcedimiento runat="server" ID="AddProcedimientoControl" />
|
<UserControl:AddProcedimiento runat="server" ID="AddProcedimientoControl" />
|
||||||
</div>
|
</div>
|
||||||
<asp:Button ID="BtnRecargaProcedimientos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaProcedimientos_Click" />
|
<asp:Button ID="BtnRecargaProcedimientos" Style="display: none;" ClientIDMode="Static" runat="server" OnClick="BtnRecargaProcedimientos_Click" />
|
||||||
@@ -8843,6 +8877,10 @@
|
|||||||
printJS({printable:urlPDF, type:'pdf', showModal:true});
|
printJS({printable:urlPDF, type:'pdf', showModal:true});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function impresionBase64(pdfBase64) {
|
||||||
|
printJS({printable:pdfBase64, type:'pdf', showModal:true, base64: true});
|
||||||
|
}
|
||||||
|
|
||||||
function abrirDdlPS(){
|
function abrirDdlPS(){
|
||||||
$(document).ready(function() {
|
$(document).ready(function() {
|
||||||
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
$('#C_Tab_TabGenerales_DdlPS > select').select2('open').next().find(':input.select2-search__field').focus();
|
||||||
@@ -10825,6 +10863,78 @@
|
|||||||
$('#BtnRecargaProcedimientos').click();
|
$('#BtnRecargaProcedimientos').click();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function clickgaleria() {
|
||||||
|
initcarusel();
|
||||||
|
initcarusel2 = function () { };
|
||||||
|
}
|
||||||
|
var initcarusel = function () {
|
||||||
|
'use strict';
|
||||||
|
if ($('#js-grid-juicy-projects').data('hascube') != '1') {
|
||||||
|
$('#js-grid-juicy-projects').cubeportfolio({
|
||||||
|
filters: '#js-filters-juicy-projects',
|
||||||
|
loadMore: '#js-loadMore-juicy-projects',
|
||||||
|
loadMoreAction: 'click',
|
||||||
|
layoutMode: 'grid',
|
||||||
|
defaultFilter: '*',
|
||||||
|
animationType: 'quicksand',
|
||||||
|
gapHorizontal: 35,
|
||||||
|
gapVertical: 30,
|
||||||
|
gridAdjustment: 'responsive',
|
||||||
|
mediaQueries: [{
|
||||||
|
width: 1500,
|
||||||
|
cols: 5
|
||||||
|
}, {
|
||||||
|
width: 1100,
|
||||||
|
cols: 4
|
||||||
|
}, {
|
||||||
|
width: 800,
|
||||||
|
cols: 3
|
||||||
|
}, {
|
||||||
|
width: 480,
|
||||||
|
cols: 2
|
||||||
|
}, {
|
||||||
|
width: 320,
|
||||||
|
cols: 1
|
||||||
|
}],
|
||||||
|
caption: 'overlayBottomReveal',
|
||||||
|
displayType: 'sequentially',
|
||||||
|
displayTypeSpeed: 80,
|
||||||
|
|
||||||
|
// lightbox
|
||||||
|
lightboxDelegate: '.cbp-lightbox',
|
||||||
|
lightboxGallery: true,
|
||||||
|
lightboxTitleSrc: 'data-title',
|
||||||
|
lightboxCounter: '<div class="cbp-popup-lightbox-counter">{{current}} of {{total}}</div>',
|
||||||
|
|
||||||
|
// singlePage popup
|
||||||
|
singlePageDelegate: '.cbp-singlePage',
|
||||||
|
singlePageDeeplinking: true,
|
||||||
|
singlePageStickyNavigation: true,
|
||||||
|
singlePageCounter: '<div class="cbp-popup-singlePage-counter">{{current}} of {{total}}</div>',
|
||||||
|
singlePageCallback: function (url, element) {
|
||||||
|
// to update singlePage content use the following method: this.updateSinglePage(yourContent)
|
||||||
|
var t = this;
|
||||||
|
|
||||||
|
$.ajax({
|
||||||
|
url: url,
|
||||||
|
type: 'GET',
|
||||||
|
dataType: 'html',
|
||||||
|
timeout: 10000
|
||||||
|
})
|
||||||
|
.done(function (result) {
|
||||||
|
t.updateSinglePage(result);
|
||||||
|
})
|
||||||
|
.fail(function () {
|
||||||
|
t.updateSinglePage('AJAX Error! Please refresh the page!');
|
||||||
|
});
|
||||||
|
},
|
||||||
|
});
|
||||||
|
$('#js-grid-juicy-projects').data('hascube', '1')
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
var initcarusel2 = initcarusel;
|
||||||
|
|
||||||
|
|
||||||
</script>
|
</script>
|
||||||
</asp:Content>
|
</asp:Content>
|
||||||
|
|||||||
@@ -2644,7 +2644,10 @@ Partial Class Ventas
|
|||||||
CargaMonedas()
|
CargaMonedas()
|
||||||
CargaVendedores()
|
CargaVendedores()
|
||||||
CargarAlmacenes()
|
CargarAlmacenes()
|
||||||
'CargaFormaEntrega()
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
CargaFormaEntrega()
|
||||||
|
End If
|
||||||
|
|
||||||
CargaCuentasTerminal()
|
CargaCuentasTerminal()
|
||||||
'CargaDdlNCPS()
|
'CargaDdlNCPS()
|
||||||
'CargarCamiones()
|
'CargarCamiones()
|
||||||
@@ -3171,6 +3174,11 @@ Partial Class Ventas
|
|||||||
DivNumTurnos.Visible = True
|
DivNumTurnos.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If CveVenta <= 0 AndAlso UsuarioActual.Empresa.Funcionalidad(716) = "1" Then
|
||||||
|
UpImagen.Visible = True
|
||||||
|
UpImagen.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
'SELECCIONA VENDEDOR DEL USUARIO CUANDO SEA VENTA NUEVA Y SIN CLIENTE
|
||||||
'If UsuarioActual.CveVendedor > 0 Then
|
'If UsuarioActual.CveVendedor > 0 Then
|
||||||
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
' If CveVenta = -1 AndAlso Not DdlVendedor.SelectedValue.ToEntero() > 0 Then DdlVendedor.SelectedValueExist(UsuarioActual.CveVendedor.ToString())
|
||||||
@@ -4967,6 +4975,11 @@ Partial Class Ventas
|
|||||||
|
|
||||||
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
ViewState("CveSubProyectoVenta") = DbRowVenta("CveSubProyecto").ToString().ToEntero()
|
||||||
|
|
||||||
|
If DbRowVenta("CveCondicionEntrega").ToString().ToEntero() > 0 Then
|
||||||
|
DdlFormaEntrega.SelectedValueExist(DbRowVenta("CveCondicionEntrega").ToString())
|
||||||
|
DdlFormaEntrega.Enabled = False
|
||||||
|
End If
|
||||||
|
|
||||||
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString().ToEntero()
|
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString().ToEntero()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(705) = "1" Then
|
||||||
@@ -6405,6 +6418,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
DdlMetodoCliente.DataSource = GlobalDTVtaMetodoPago
|
DdlMetodoCliente.DataSource = GlobalDTVtaMetodoPago
|
||||||
DdlMetodoCliente.DataBind()
|
DdlMetodoCliente.DataBind()
|
||||||
|
DdlMetodoCliente.Items.Insert(0, New ListItem("Seleccione", "-1"))
|
||||||
|
|
||||||
If UsuarioActual.CveRol = 1 AndAlso CveMetodoPago = 1 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso TbDescuentosAdicionales.Visible Then
|
If UsuarioActual.CveRol = 1 AndAlso CveMetodoPago = 1 AndAlso DdlTipoComprobante.SelectedValue = "Cot" AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso TbDescuentosAdicionales.Visible Then
|
||||||
If TmpDT.SUMD("Descuento") > 0 Then
|
If TmpDT.SUMD("Descuento") > 0 Then
|
||||||
@@ -6827,6 +6841,10 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
RegimenFiscalCliente = "616"
|
RegimenFiscalCliente = "616"
|
||||||
ClienteCodigoRegimenFiscal = "616"
|
ClienteCodigoRegimenFiscal = "616"
|
||||||
|
Else
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
DdlUsoCFDI.Enabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -7911,6 +7929,10 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
RegimenFiscalCliente = "616"
|
RegimenFiscalCliente = "616"
|
||||||
ClienteCodigoRegimenFiscal = "616"
|
ClienteCodigoRegimenFiscal = "616"
|
||||||
|
Else
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
DdlUsoCFDI.Enabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -7953,6 +7975,10 @@ Partial Class Ventas
|
|||||||
DdlUsoCFDI.Enabled = False
|
DdlUsoCFDI.Enabled = False
|
||||||
RegimenFiscalCliente = "616"
|
RegimenFiscalCliente = "616"
|
||||||
ClienteCodigoRegimenFiscal = "616"
|
ClienteCodigoRegimenFiscal = "616"
|
||||||
|
Else
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
DdlUsoCFDI.Enabled = True
|
||||||
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -10896,6 +10922,12 @@ Partial Class Ventas
|
|||||||
MensajeAlert.Clear()
|
MensajeAlert.Clear()
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
If ObjFactura.TipoDocto.Contiene("Ing", "Cot") AndAlso ObjFactura.CondicionesPago = 1 Then
|
||||||
|
ImpresionDirectaPDF()
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'LIMPIA CONDICIONES DE PAGO - CONTADO
|
'LIMPIA CONDICIONES DE PAGO - CONTADO
|
||||||
RBLPago.SelectedValue = "1"
|
RBLPago.SelectedValue = "1"
|
||||||
LimpiaEscondeContado()
|
LimpiaEscondeContado()
|
||||||
@@ -10905,10 +10937,6 @@ Partial Class Ventas
|
|||||||
OnError("Ocurrió un error al limpiar los datos", ex)
|
OnError("Ocurrió un error al limpiar los datos", ex)
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
|
||||||
' ImpresionDirectaPDF()
|
|
||||||
'End If
|
|
||||||
|
|
||||||
Else
|
Else
|
||||||
ObjVentas.RollBack()
|
ObjVentas.RollBack()
|
||||||
|
|
||||||
@@ -12440,6 +12468,36 @@ Partial Class Ventas
|
|||||||
ObjFactura.DtMercancias = DtMercancias
|
ObjFactura.DtMercancias = DtMercancias
|
||||||
|
|
||||||
ObjFactura.DtImpuestosLocales = TmpDTImpuestos
|
ObjFactura.DtImpuestosLocales = TmpDTImpuestos
|
||||||
|
|
||||||
|
'TRASPASAR PAGOS DE REMISIONES A LA FACTURA NUEVA
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" AndAlso ObjFactura.TipoDocto = "Ing" Then
|
||||||
|
Dim DtRemisionesPagos As DataTable = Nothing
|
||||||
|
|
||||||
|
If Me.CveVenta > 0 AndAlso TipoDoctoViejo = "Rem" Then
|
||||||
|
Dim ObjClientes As New ClsClientes
|
||||||
|
If ObjClientes.GetVentasRemisionesPagos(CveCliente, Me.CveVenta.ToString()) Then
|
||||||
|
DtRemisionesPagos = ObjClientes.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjClientes.Dispose()
|
||||||
|
ElseIf Me.RemisionesLista IsNot Nothing AndAlso Me.RemisionesLista.Count > 0 Then
|
||||||
|
Dim sb As New StringBuilder
|
||||||
|
For Each CveRemision As Integer In RemisionesLista
|
||||||
|
sb.Append($"{CveRemision},")
|
||||||
|
Next
|
||||||
|
sb.Remove(sb.Length - 1, 1)
|
||||||
|
|
||||||
|
Dim ObjClientes As New ClsClientes
|
||||||
|
If ObjClientes.GetVentasRemisionesPagos(CveCliente, sb.ToString()) Then
|
||||||
|
DtRemisionesPagos = ObjClientes.DtResultados.Copy()
|
||||||
|
End If
|
||||||
|
ObjClientes.Dispose()
|
||||||
|
End If
|
||||||
|
|
||||||
|
If DtRemisionesPagos IsNot Nothing Then
|
||||||
|
ObjFactura.DtPagosFacturaGlobal = DtRemisionesPagos
|
||||||
|
End If
|
||||||
|
|
||||||
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CreaObjetosVentaDevolucion()
|
Private Sub CreaObjetosVentaDevolucion()
|
||||||
@@ -15433,6 +15491,49 @@ Partial Class Ventas
|
|||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
ErrorList.Add("No se pueden facturar las remisiones, con ese tipo de comprobante seleccionado")
|
ErrorList.Add("No se pueden facturar las remisiones, con ese tipo de comprobante seleccionado")
|
||||||
Else
|
Else
|
||||||
|
|
||||||
|
'CANCELACION DE PAGOS DE REMISIONES
|
||||||
|
If ObjFactura.DtPagosFacturaGlobal IsNot Nothing Then
|
||||||
|
For Each DrPago As DataRow In ObjFactura.DtPagosFacturaGlobal.Rows
|
||||||
|
|
||||||
|
Dim ventaRef As ClsPaginas.Venta = Nothing
|
||||||
|
|
||||||
|
Using ObjFacturaRef As New Modelos.Factura(UsuarioActual, DrPago("CveVenta").ToString().ToEntero(), UsuarioActual.CveEmpresa, CargaDTDetalle:=False, VerificaAlmacen:=False, CargaDatosCliente:=False, CargaDatosRelacionados:=False)
|
||||||
|
ventaRef = New ClsPaginas.Venta(ObjFacturaRef, UsuarioActual)
|
||||||
|
End Using
|
||||||
|
|
||||||
|
If ventaRef IsNot Nothing Then
|
||||||
|
Dim Importe As Decimal = DrPago("Importe").ToString().ToDecimal() * -1
|
||||||
|
|
||||||
|
Dim Pago As New ClsPaginas.VentaPago
|
||||||
|
Pago.Fecha = Now
|
||||||
|
Pago.FechaDocumentoRelacionado = DrPago("FechaDocumento").ToString().ToDate
|
||||||
|
Pago.ImportePagoVenta = Importe
|
||||||
|
Pago.ImportePago = Importe
|
||||||
|
Pago.CveIE = DrPago("CveIE").ToString().ToEntero()
|
||||||
|
Pago.CveMonedaPago = DrPago("CveMoneda").ToString().ToEntero()
|
||||||
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
|
Pago.AplicaTraslado = False
|
||||||
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
|
Pago.CveVentaAmortizacion = -1
|
||||||
|
|
||||||
|
If DrPago("TipoPago").ToString() = "NC" Then
|
||||||
|
Pago.TipoPago = "NC"
|
||||||
|
Else
|
||||||
|
Pago.TipoPago = "B"
|
||||||
|
End If
|
||||||
|
|
||||||
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=False)
|
||||||
|
Else
|
||||||
|
ErrorPrepoliza = True
|
||||||
|
End If
|
||||||
|
|
||||||
|
If ErrorPrepoliza Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
For Each CveRemision As Integer In RemisionesLista
|
For Each CveRemision As Integer In RemisionesLista
|
||||||
|
|
||||||
If Not ObjConta.TraspasarSaldosRemision(CveRemision, ObjFactura.CvePrePoliza, ObjFactura.CveVenta) Then
|
If Not ObjConta.TraspasarSaldosRemision(CveRemision, ObjFactura.CvePrePoliza, ObjFactura.CveVenta) Then
|
||||||
@@ -15458,6 +15559,41 @@ Partial Class Ventas
|
|||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
'TRASPASO DE PAGOS DE REMISIONES A FACTURA GLOBAL
|
||||||
|
If ObjFactura.DtPagosFacturaGlobal IsNot Nothing Then
|
||||||
|
|
||||||
|
Dim VentaActual As New ClsPaginas.Venta(ObjFactura, UsuarioActual)
|
||||||
|
|
||||||
|
For Each DrPago As DataRow In ObjFactura.DtPagosFacturaGlobal.Rows
|
||||||
|
Dim Importe As Decimal = DrPago("Importe").ToString().ToDecimal()
|
||||||
|
|
||||||
|
Dim Pago As New ClsPaginas.VentaPago
|
||||||
|
Pago.Fecha = Now
|
||||||
|
Pago.FechaDocumentoRelacionado = DrPago("FechaDocumento").ToString().ToDate
|
||||||
|
Pago.ImportePagoVenta = Importe
|
||||||
|
Pago.ImportePago = Importe
|
||||||
|
Pago.CveIE = DrPago("CveIE").ToString().ToEntero()
|
||||||
|
Pago.CveMonedaPago = DrPago("CveMoneda").ToString().ToEntero()
|
||||||
|
Pago.TCPago = DrPago("TipoCambio").ToString().ToDecimal()
|
||||||
|
Pago.AplicaTraslado = False
|
||||||
|
Pago.Referencia = DrPago("Folio").ToString()
|
||||||
|
Pago.CveVentaAmortizacion = DrPago("CveVenta").ToString().ToEntero()
|
||||||
|
|
||||||
|
If DrPago("TipoPago").ToString() = "NC" Then
|
||||||
|
Pago.TipoPago = "NC"
|
||||||
|
Else
|
||||||
|
Pago.TipoPago = "B"
|
||||||
|
End If
|
||||||
|
|
||||||
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(VentaActual, Pago, ObjFactura.CvePrePoliza, ObjConta, AplicarConceptoAplicacion:=False)
|
||||||
|
|
||||||
|
If ErrorPrepoliza Then
|
||||||
|
Exit For
|
||||||
|
End If
|
||||||
|
Next
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -17347,6 +17483,29 @@ Partial Class Ventas
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(716) = "1" Then
|
||||||
|
Dim Imagen = drPS("Imagen").ToString
|
||||||
|
|
||||||
|
Dim URLImagen As String = ""
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(Imagen) Then
|
||||||
|
URLImagen = String.Format("/ashx/SIGWeb.ashx?Metodo=GetImg&r={0}", Extensiones.Encripta(Imagen))
|
||||||
|
End If
|
||||||
|
|
||||||
|
If imgImagen.Attributes.Item("src") Is Nothing Then
|
||||||
|
imgImagen.Attributes.Add("src", URLImagen)
|
||||||
|
Else
|
||||||
|
imgImagen.Attributes.Item("src") = URLImagen
|
||||||
|
End If
|
||||||
|
|
||||||
|
UpImagen.Update()
|
||||||
|
|
||||||
|
If Not String.IsNullOrEmpty(Imagen) Then
|
||||||
|
RegistraScript("initcarusel();", "I1")
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
AgregarPS()
|
AgregarPS()
|
||||||
End If
|
End If
|
||||||
@@ -29067,9 +29226,8 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
If TxtAtencionA.Text.Trim.Length = 0 Then
|
TxtAtencionA.Enabled = True
|
||||||
TxtAtencionA.Enabled = True
|
UpCliente.Update()
|
||||||
End If
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
@@ -30132,12 +30290,6 @@ Partial Class Ventas
|
|||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
|
||||||
If TxtAtencionA.Text.Trim.Length = 0 Then
|
|
||||||
TxtAtencionA.Enabled = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
AplicaDevolucion = True
|
AplicaDevolucion = True
|
||||||
SaldoVentaDevolucion = HplSaldoAuxiliar.Text.ToDecimal
|
SaldoVentaDevolucion = HplSaldoAuxiliar.Text.ToDecimal
|
||||||
CveVentaDevolucion = CveVenta
|
CveVentaDevolucion = CveVenta
|
||||||
@@ -30210,6 +30362,11 @@ Partial Class Ventas
|
|||||||
CargaNC(CveVenta)
|
CargaNC(CveVenta)
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
TxtAtencionA.Enabled = True
|
||||||
|
UpCliente.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
RegistraScript("$('#DivAplicaDevolucion').modal('hide')")
|
RegistraScript("$('#DivAplicaDevolucion').modal('hide')")
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
@@ -30806,7 +30963,7 @@ Partial Class Ventas
|
|||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
If DdlTipoComprobante.SelectedValue.Contiene("Ing", "Rem") AndAlso DdlTipoAmortizacionAnticipo.SelectedValue = "4" Then
|
||||||
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC') ", "")}")
|
Dim DtMovtos As DataTable = Me.TmpDTAnticiposNCIxCCliente.FiltraParametros($"Saldo > 0 And SaldoSubtotal > 0 {If(CveVenta < 0, $"AND Tipo IN('NC','RNC','IxC') ", "")}")
|
||||||
divAmortizacionTipoRelacion.Visible = False
|
divAmortizacionTipoRelacion.Visible = False
|
||||||
GVAnticipos.DataSource = DtMovtos
|
GVAnticipos.DataSource = DtMovtos
|
||||||
GVAnticipos.DataBind()
|
GVAnticipos.DataBind()
|
||||||
@@ -35096,6 +35253,7 @@ Partial Class Ventas
|
|||||||
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
TmpDT.Columns.Add("NumTurnos", GetType(Decimal))
|
||||||
TmpDT.Columns("NumTurnos").DefaultValue = 0D
|
TmpDT.Columns("NumTurnos").DefaultValue = 0D
|
||||||
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
TmpDT.Columns.Add("NumeroPedimento", GetType(String))
|
||||||
|
TmpDT.Columns.Add("TotalConImpuestos", GetType(Decimal))
|
||||||
|
|
||||||
Return TmpDT
|
Return TmpDT
|
||||||
End Function
|
End Function
|
||||||
@@ -37506,8 +37664,24 @@ Partial Class Ventas
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
If ExistePDF Then
|
If ExistePDF Then
|
||||||
Dim urlPDF As String = $"/Ashx/SIGDesc.ashx?metodo=descargarPDFVenta&CveVenta={CveVenta}"
|
Dim pdf64 As String = ""
|
||||||
RegistraScript($"impresionDirecta('{urlPDF}');", "Imprimir")
|
'DUPLICA EL PDF
|
||||||
|
Using ms As New MemoryStream
|
||||||
|
Using pdfdoc As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfWriter(ms))
|
||||||
|
pdfdoc.InitializeOutlines()
|
||||||
|
Dim reporteByte As New MemoryStream(System.IO.File.ReadAllBytes(ArchivoPDF))
|
||||||
|
|
||||||
|
Dim docPDF As New iText.Kernel.Pdf.PdfDocument(New iText.Kernel.Pdf.PdfReader(reporteByte))
|
||||||
|
docPDF.CopyPagesTo(1, docPDF.GetNumberOfPages(), pdfdoc)
|
||||||
|
docPDF.CopyPagesTo(1, docPDF.GetNumberOfPages(), pdfdoc)
|
||||||
|
docPDF.Close()
|
||||||
|
|
||||||
|
pdfdoc.Close()
|
||||||
|
End Using
|
||||||
|
pdf64 = Convert.ToBase64String(ms.ToArray())
|
||||||
|
End Using
|
||||||
|
|
||||||
|
RegistraScript($"impresionBase64('{pdf64}');", "Imprimir")
|
||||||
Else
|
Else
|
||||||
Alert("No se pudo imprimir el pdf directamente. favor de descargar manualmente el pdf.", TipoMensaje.MsgAdvertencia)
|
Alert("No se pudo imprimir el pdf directamente. favor de descargar manualmente el pdf.", TipoMensaje.MsgAdvertencia)
|
||||||
End If
|
End If
|
||||||
@@ -37604,7 +37778,7 @@ Partial Class Ventas
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub RecalculaPrecios()
|
Private Sub RecalculaPrecios()
|
||||||
If TmpDT IsNot Nothing Then
|
If TmpDT IsNot Nothing AndAlso (CveVenta <= 0 OrElse EsCreaApartirDe OrElse ModalidadEdicion) Then
|
||||||
For Each Row As DataRow In TmpDT.Rows
|
For Each Row As DataRow In TmpDT.Rows
|
||||||
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
Dim Cantidad As Decimal = Row("Cantidad").ToString().ToDecimal()
|
||||||
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
Dim CveClasificacion As Integer = Row("CveClasificacion").ToString().ToEntero
|
||||||
@@ -37706,14 +37880,13 @@ Partial Class Ventas
|
|||||||
LimpiaDocumentoDEV()
|
LimpiaDocumentoDEV()
|
||||||
CambiaTipoDocto()
|
CambiaTipoDocto()
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
|
||||||
If TxtAtencionA.Text.Trim.Length = 0 Then
|
|
||||||
TxtAtencionA.Enabled = True
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
CalculaTotalesVenta()
|
CalculaTotalesVenta()
|
||||||
|
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(109) = "1" Then
|
||||||
|
TxtAtencionA.Enabled = True
|
||||||
|
UpCliente.Update()
|
||||||
|
End If
|
||||||
|
|
||||||
UpParametros.Update()
|
UpParametros.Update()
|
||||||
|
|
||||||
AplicaDevolucion = True
|
AplicaDevolucion = True
|
||||||
|
|||||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user