Merge branch 'master' of http://jperez@192.168.10.111:8383/SIG.git
This commit is contained in:
@@ -2117,6 +2117,26 @@ Public Class ClsCompras
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function CancelarCompraOC(CveCompra As Integer, CveEmpresa As Integer) As Boolean
|
||||||
|
|
||||||
|
Dim Retorno As Boolean = False
|
||||||
|
DataAdapter("PA_Comp_CancelarCompraOC")
|
||||||
|
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CveCompra", SqlDbType.Int).Value = CveCompra
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al desvincular la oc de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|||||||
@@ -3,7 +3,6 @@ Option Strict On
|
|||||||
|
|
||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports System.Data.SqlClient
|
Imports System.Data.SqlClient
|
||||||
Imports System.Web
|
|
||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
|
|
||||||
Public Class ClsContabilidad
|
Public Class ClsContabilidad
|
||||||
@@ -6416,6 +6415,47 @@ Public Class ClsContabilidad
|
|||||||
|
|
||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
Public Function ValidacionesPrePoliza(CvePrePoliza As Integer, Opcion As Integer, ByRef UsuarioActual As Usuario, Optional CveVenta As Integer = -1, Optional AutoConta As Boolean = True) As Boolean
|
||||||
|
Dim Retorno = False
|
||||||
|
|
||||||
|
DataAdapter("PA_Conta_PrePolizasValidacion")
|
||||||
|
With SqlAdapter.SelectCommand.Parameters
|
||||||
|
.Add("@CvePrePoliza", SqlDbType.Int).Value = CvePrePoliza
|
||||||
|
.Add("@Opcion", SqlDbType.Int).Value = Opcion
|
||||||
|
.Add("@CveEmpresa", SqlDbType.Int).Value = UsuarioActual.CveEmpresa
|
||||||
|
.Add("@CveVenta", SqlDbType.Int).Value = CveVenta
|
||||||
|
.Add("@AutoConta", SqlDbType.Int).Value = If(AutoConta, 1, 0)
|
||||||
|
.Add("@Valor", SqlDbType.Int).Direction = ParameterDirection.Output
|
||||||
|
.Add("@MsgSalida", SqlDbType.VarChar, 100).Direction = ParameterDirection.Output
|
||||||
|
.Add("@MsgPrePolizaSalida", SqlDbType.VarChar, 8000).Direction = ParameterDirection.Output
|
||||||
|
.Add("@Diferencia", SqlDbType.Float).Direction = ParameterDirection.Output
|
||||||
|
End With
|
||||||
|
|
||||||
|
Try
|
||||||
|
SqlAdapter.Fill(Data)
|
||||||
|
Retorno = True
|
||||||
|
ValorPolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@Valor").Value.ToString.ToEntero
|
||||||
|
MensajePolizaDescuadre = SqlAdapter.SelectCommand.Parameters("@MsgSalida").Value.ToString
|
||||||
|
ValorDiferencia = SqlAdapter.SelectCommand.Parameters("@Diferencia").Value.ToString
|
||||||
|
Dim MsgPrePoliza As String = SqlAdapter.SelectCommand.Parameters("@MsgPrePolizaSalida").Value.ToString
|
||||||
|
If MsgPrePoliza <> "" Then MsgPrePoliza.GuardaLogAD("LogPrePoliza")
|
||||||
|
|
||||||
|
If MensajePolizaDescuadre = "" AndAlso AutoConta Then
|
||||||
|
If UsuarioActual.Empresa.TipoContabilidad = 2 Then ' eltipocontabilidad deberá activarse en el PA
|
||||||
|
If Not ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveUsuario, UsuarioActual.Empresa) Then
|
||||||
|
MensajePolizaDescuadre = Mensaje.ToString ' regresa el mensaje de contabilización
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
Catch ex As Exception
|
||||||
|
OnError("Ocurrió un error al validar la PrePoliza.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo)
|
||||||
|
End Try
|
||||||
|
|
||||||
|
Return Retorno
|
||||||
|
End Function
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
|
|
||||||
#Region "AUXILIAR PREPOLIZAS"
|
#Region "AUXILIAR PREPOLIZAS"
|
||||||
|
|||||||
@@ -4311,6 +4311,11 @@ Public Class ClsPaginas
|
|||||||
' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
|
' Response.Redirect("/Sistemas/PopUpSeleccionarEmpresa.aspx")
|
||||||
' 'Alert(Request.ServerVariables("URL"))
|
' 'Alert(Request.ServerVariables("URL"))
|
||||||
'End If
|
'End If
|
||||||
|
''codigo temporal
|
||||||
|
If EsProduccion Then
|
||||||
|
If UsuarioActual.CveEmpresa.Contiene(141, 152, 159, 160, 161, 162, 166) Then System.Threading.Thread.Sleep(750)
|
||||||
|
End If
|
||||||
|
|
||||||
Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL"))
|
Dim i As Integer = Obt_ClavePagina(Request.ServerVariables("URL"))
|
||||||
Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}"
|
Dim FailURL As String = $"{FormsAuthentication.DefaultUrl}?ADCod={Encripta($"CveModulo={i}")}"
|
||||||
'si es <0 la página es sin restricciones
|
'si es <0 la página es sin restricciones
|
||||||
@@ -7651,6 +7656,14 @@ Public Class ClsPaginas
|
|||||||
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 292, 294) '1.Venta.2.NC
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 292, 294) '1.Venta.2.NC
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 207, 203) '1.Venta.2.NC
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 207, 203) '1.Venta.2.NC
|
||||||
End Select
|
End Select
|
||||||
|
Case 18 ' ingresos por comprobar
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = 92 '1.Venta.2.NC
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = 92 'falta nuevo concepto
|
||||||
|
Retorno.CveConceptoComplementario = 332
|
||||||
|
End Select
|
||||||
End Select
|
End Select
|
||||||
Else 'cuando es la provisión
|
Else 'cuando es la provisión
|
||||||
Select Case CveTipoSaldo
|
Select Case CveTipoSaldo
|
||||||
@@ -7694,7 +7707,14 @@ Public Class ClsPaginas
|
|||||||
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 291, 293) '1.Venta.2.NC
|
Retorno.CveConcepto = If(CveTipoProveedorTipoDocto = 1, 291, 293) '1.Venta.2.NC
|
||||||
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 203, 203) '1.Venta.2.NC
|
Retorno.CveConceptoComplementario = If(CveTipoProveedorTipoDocto = 1, 203, 203) '1.Venta.2.NC
|
||||||
End Select
|
End Select
|
||||||
|
Case 18 ' ingresos por comprobar
|
||||||
|
Select Case CveMoneda
|
||||||
|
Case 1 'pesos
|
||||||
|
Retorno.CveConcepto = 66 '1.Venta.2.NC
|
||||||
|
Case 2 'dólares
|
||||||
|
Retorno.CveConcepto = 66 'falta nuevo concepto
|
||||||
|
Retorno.CveConceptoComplementario = 332
|
||||||
|
End Select
|
||||||
End Select
|
End Select
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -7731,10 +7751,7 @@ Public Class ClsPaginas
|
|||||||
Dim CveConceptoContableComplementaria As Integer = 207
|
Dim CveConceptoContableComplementaria As Integer = 207
|
||||||
Dim Contabilizable As Boolean = True
|
Dim Contabilizable As Boolean = True
|
||||||
If PorcentajePago > 1 Then PorcentajePago = 1
|
If PorcentajePago > 1 Then PorcentajePago = 1
|
||||||
Pago.CveConceptoPago = If(Pago.CveConceptoPago = -1, 2, Pago.CveConceptoPago) 'si viene en parametro lo toma com primera opcion, sino el 2
|
|
||||||
If VentaActual.CveMoneda <> 1 Then
|
|
||||||
If Pago.TipoPago = "NC" Then Pago.CveConceptoPago = 301 Else Pago.CveConceptoPago = 292
|
|
||||||
End If
|
|
||||||
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
|
Dim Concepto As String = String.Format("{0} F:{1}", VentaActual.ClienteNombre, VentaActual.SerieFolio)
|
||||||
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(VentaActual.UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
Dim FuncionalidadFluctuacionImpuestos As Boolean = If(VentaActual.UsuarioActual.Empresa.Funcionalidad(159) = "1", True, False)
|
||||||
Dim tFecha As Date = Pago.Fecha
|
Dim tFecha As Date = Pago.Fecha
|
||||||
@@ -7781,11 +7798,14 @@ Public Class ClsPaginas
|
|||||||
If Not ErrorMovtos AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=Pago.CveIE, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
If Not ErrorMovtos AndAlso Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 95, VentaActual.SerieFolio, VentaActual.SerieFolio, IdCtaContable, CveIE:=Pago.CveIE, CveVenta:=VentaActual.CveVenta, CveSubProyecto:=VentaActual.CveSubProyecto, CveCliente:=VentaActual.CveCliente, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, PorcentajeImpuesto:=VentaActual.PorcentajeIVA, Contabilizable:=False) Then
|
||||||
ErrorMovtos = True
|
ErrorMovtos = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
|
||||||
|
'cuando es pago por NC, tiene sus propios pagos
|
||||||
|
If Pago.TipoPago = "NC" Then ConPreP.CveConcepto = If(VentaActual.CveMoneda <> 1, 301, 251)
|
||||||
|
|
||||||
'movimiento de pago cliente
|
'movimiento de pago cliente
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, Pago.CveConceptoPago, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada, Contabilizable:=Contabilizable) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, Pago.ImportePagoVenta, ConPreP.CveConcepto, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada, Contabilizable:=Contabilizable) Then ErrorMovtos = True
|
||||||
'movimiento de pago cliente Complementaria
|
'movimiento de pago cliente Complementaria
|
||||||
If Not ErrorMovtos AndAlso VentaActual.CveMoneda > 1 Then
|
If Not ErrorMovtos AndAlso VentaActual.CveMoneda > 1 Then
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada, Contabilizable:=Contabilizable) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePagoVenta, (ImporteME * TCValuacionVenta - ImporteME).RoundSQL, CveConceptoContableComplementaria, VentaActual.SerieFolio, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, CvePersonal:=Pago.CvePersonal, CveVentaAmortizacion:=Pago.CveVentaAmortizacion, TipoCambio:=TCValuacionVenta, TipoCambioPago:=Pago.TCPago, ImporteME:=ImporteME, CveSubProyecto:=VentaActual.CveSubProyecto, CveCompra:=Pago.CveCompraRelacionada, Contabilizable:=Contabilizable) Then ErrorMovtos = True
|
||||||
@@ -7843,6 +7863,7 @@ Public Class ClsPaginas
|
|||||||
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
Concepto = String.Format("{0} NC:{1}", VentaActual.ClienteNombre, Pago.Referencia)
|
||||||
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O
|
If Pago.TipoPago = "A" AndAlso Not ErrorMovtos Then ' A N T I C I P O
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
|
'Dim ConPreP As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 1)
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 296, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 296, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteAnticipoExtranjera, CveVenta:=Pago.CveVentaAmortizacion, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
@@ -7855,14 +7876,15 @@ Public Class ClsPaginas
|
|||||||
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 Then ' N O T A D E C R E D I T O
|
||||||
Dim Ret As New ConceptosRetenciones
|
Dim Ret As New ConceptosRetenciones
|
||||||
|
Dim ConPrePNC As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(6, VentaActual.CveMoneda, True, 2)
|
||||||
If Pago.CveMonedaPago > 1 Then
|
If Pago.CveMonedaPago > 1 Then
|
||||||
'Agregamos la Extranjera
|
'Agregamos la Extranjera
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 294, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, ConPrePNC.CveConcepto, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
ImporteMN = (Pago.ImportePago * TCValuacionPago - Pago.ImportePago).RoundSQL
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, 207, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, ImporteMN, ConPrePNC.CveConceptoComplementario, Pago.Referencia, Concepto, VentaActual.IdCtaContableClienteComplementaria, CveVenta:=Pago.CveVentaAmortizacion, CveVentaAmortizacion:=VentaActual.CveVenta, CveCliente:=VentaActual.CveCliente, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=VentaActual.CveSubProyecto) Then ErrorMovtos = True
|
||||||
Else
|
Else
|
||||||
'Agregamos Nacional
|
'Agregamos Nacional
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, Pago.ImportePago, Pago.ImportePago, 91, Pago.Referencia, Concepto, VentaActual.IdCtaContableCliente, 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, VentaActual.IdCtaContableCliente, 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 Then ' I N G R E S O S X C O M P R O B A R
|
||||||
@@ -7952,7 +7974,7 @@ Public Class ClsPaginas
|
|||||||
Public Property TCPago As Decimal = 1
|
Public Property TCPago As Decimal = 1
|
||||||
Public Property CveVentaAmortizacion As Integer = 0
|
Public Property CveVentaAmortizacion As Integer = 0
|
||||||
Public Property OtroGastoIngreso As Decimal = 0
|
Public Property OtroGastoIngreso As Decimal = 0
|
||||||
Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
'Public Property CveConceptoPago As Integer = -1 'no definido de inicio
|
||||||
Public Property CveCreditoDetalle As Integer = -1
|
Public Property CveCreditoDetalle As Integer = -1
|
||||||
Public Property CveCompraRelacionada As Integer = -1
|
Public Property CveCompraRelacionada As Integer = -1
|
||||||
Public Property AplicaTraslado As Boolean = True
|
Public Property AplicaTraslado As Boolean = True
|
||||||
|
|||||||
@@ -2621,7 +2621,7 @@ Public Class ClsRH
|
|||||||
End Function
|
End Function
|
||||||
|
|
||||||
|
|
||||||
Public Function GetAsistencias(CvePersonal As Integer, CveClienteAsignado As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, CveTipoPeriodo As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean
|
Public Function GetAsistencias(CvePersonal As Integer, CveClienteAsignado As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, CveTipoPeriodo As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, Optional CvePuesto As Integer = -1) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
SqlDataAdapter("PA_RH_PersonalAsistenciasGet")
|
SqlDataAdapter("PA_RH_PersonalAsistenciasGet")
|
||||||
@@ -2633,6 +2633,7 @@ Public Class ClsRH
|
|||||||
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
.Add("@CveTurno", SqlDbType.Int).Value = CveTurno
|
||||||
.Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
.Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
||||||
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
|
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
|
||||||
|
.Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
|
||||||
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
.Add("@FechaI", SqlDbType.Date).Value = FechaI
|
||||||
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
.Add("@FechaF", SqlDbType.Date).Value = FechaF
|
||||||
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
|
||||||
@@ -2648,7 +2649,7 @@ Public Class ClsRH
|
|||||||
Return Retorno
|
Return Retorno
|
||||||
End Function
|
End Function
|
||||||
|
|
||||||
Public Function RepGetAsistencias(Grupo As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CvePersonalPadre As Integer) As Boolean
|
Public Function RepGetAsistencias(Grupo As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CveTurno As Integer, CveEstatusPersonal As Integer, FechaI As Date, FechaF As Date, CveEmpresa As Integer, CvePersonalPadre As Integer, CveTipoPeriodo As Integer, CvePuesto As Integer) As Boolean
|
||||||
Dim Retorno As Boolean = False
|
Dim Retorno As Boolean = False
|
||||||
|
|
||||||
SqlDataAdapter("PA_RH_RepPersonalAsistenciasGet")
|
SqlDataAdapter("PA_RH_RepPersonalAsistenciasGet")
|
||||||
@@ -2662,7 +2663,8 @@ Public Class ClsRH
|
|||||||
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
.Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto
|
||||||
.Add("@CvePersonalPadre", SqlDbType.Int).Value = CvePersonalPadre
|
.Add("@CvePersonalPadre", SqlDbType.Int).Value = CvePersonalPadre
|
||||||
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
|
.Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal
|
||||||
|
.Add("@CveTipoPeriodo", SqlDbType.Int).Value = CveTipoPeriodo
|
||||||
|
.Add("@CvePuesto", SqlDbType.Int).Value = CvePuesto
|
||||||
End With
|
End With
|
||||||
|
|
||||||
Try
|
Try
|
||||||
|
|||||||
@@ -2827,7 +2827,6 @@ Namespace Modelos
|
|||||||
Pago.CveVentaAmortizacion = ObjFactura.CveVenta 'Dr("CveVenta").ToString().ToEntero()
|
Pago.CveVentaAmortizacion = ObjFactura.CveVenta 'Dr("CveVenta").ToString().ToEntero()
|
||||||
Pago.AplicaTraslado = False
|
Pago.AplicaTraslado = False
|
||||||
Pago.Referencia = Concepto
|
Pago.Referencia = Concepto
|
||||||
Pago.CveConceptoPago = 251
|
|
||||||
|
|
||||||
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
||||||
|
|
||||||
@@ -3114,7 +3113,6 @@ Namespace Modelos
|
|||||||
Pago.CveVentaAmortizacion = ObjFactura.CveVenta 'Dr("CveVenta").ToString().ToEntero()
|
Pago.CveVentaAmortizacion = ObjFactura.CveVenta 'Dr("CveVenta").ToString().ToEntero()
|
||||||
Pago.AplicaTraslado = False
|
Pago.AplicaTraslado = False
|
||||||
Pago.Referencia = Concepto
|
Pago.Referencia = Concepto
|
||||||
Pago.CveConceptoPago = 251
|
|
||||||
Pago.ValorMultiplicador = -1D
|
Pago.ValorMultiplicador = -1D
|
||||||
|
|
||||||
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
ErrorPrepoliza = ClsPaginas.AplicaPrePolizaPagoVenta(ventaRef, Pago, ObjFactura.CvePrePoliza, ObjConta)
|
||||||
|
|||||||
@@ -1398,10 +1398,9 @@ Partial Class Bancos_PopIECompras
|
|||||||
Dim Pago As New CompraPago
|
Dim Pago As New CompraPago
|
||||||
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
Pago.Fecha = TxtFechaDocumento.Text.ToDate
|
||||||
Pago.CveMonedaPago = CveMoneda
|
Pago.CveMonedaPago = CveMoneda
|
||||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
ImportePagado = TxtImporte.Text.Trim.ToDecimal.RoundSQL
|
||||||
'Tipos de cambio
|
'Tipos de cambio
|
||||||
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
If Pago.CveMonedaPago = 1 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en Pesos
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
|
||||||
Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
Pago.TCCambioMoneda = 1 / TxtTipoCambio.Text.ToDecimal
|
||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 2 Then 'Si la venta viene en Dolares y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
||||||
@@ -1433,7 +1432,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83)
|
Dim UsaComplementariaBancos As Boolean = Not UsuarioActual.CveEmpresa.Contiene(7, 11, 122, 145, 13, 83)
|
||||||
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
|
Dim ConceptoMovimiento As String = $"{TxtPagueseA.Text.Trim} - {TxtObservaciones.Text} {If(Pago.TCPago > 1, $" TC:{Pago.TCPago}", "")}"
|
||||||
Dim Referencia As String = TxtFolio.Text.Trim
|
Dim Referencia As String = TxtFolio.Text.Trim
|
||||||
Dim tImporteMN As Decimal = TxtImporte.Text.ToDecimal
|
Dim tImporteMN As Decimal = ImportePagado
|
||||||
Pago.ImportePago = tImporteMN
|
Pago.ImportePago = tImporteMN
|
||||||
|
|
||||||
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
If DivTarjeta.Visible AndAlso DdlTarjeta.SelectedValue.ToEntero > 0 Then
|
||||||
@@ -1480,7 +1479,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
Dim saldo As Decimal = DtCheques.Rows(DDlCheques.SelectedIndex)("Saldo").ToString.ToDecimal
|
Dim saldo As Decimal = DtCheques.Rows(DDlCheques.SelectedIndex)("Saldo").ToString.ToDecimal
|
||||||
|
|
||||||
If TxtImporte.Text.ToDecimal > saldo Then
|
If ImportePagado > saldo Then
|
||||||
Alert("El importe no debe de superar el saldo del cheque seleccionado.", TipoMensaje.MsgAdvertencia)
|
Alert("El importe no debe de superar el saldo del cheque seleccionado.", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
@@ -1498,7 +1497,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
End If
|
End If
|
||||||
|
|
||||||
Case "3" 'Ingresos X Comprobar
|
Case "3" 'Ingresos X Comprobar
|
||||||
ImportePagado = TxtImporte.Text.Trim.ToDecimal
|
|
||||||
Pago.ImportePago = ImportePagado
|
Pago.ImportePago = ImportePagado
|
||||||
For Each rw As GridViewRow In GvIngresos.Rows
|
For Each rw As GridViewRow In GvIngresos.Rows
|
||||||
If rw.FCCheckBox("Chk").Checked Then
|
If rw.FCCheckBox("Chk").Checked Then
|
||||||
@@ -1556,7 +1555,7 @@ Partial Class Bancos_PopIECompras
|
|||||||
Pago.CveIE = rw.DataKey("CveIE").ToEntero
|
Pago.CveIE = rw.DataKey("CveIE").ToEntero
|
||||||
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
Pago.CveMonedaPago = rw.DataKey("CveMoneda").ToEntero
|
||||||
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
Pago.ImportePago = rw.FCTextBox("TxtSaldoDeudor").Text.ToDecimal
|
||||||
Pago.TCPago = TxtTipoCambio.Text.ToDecimal
|
Pago.TCPago = If(Pago.CveMonedaPago <> 1, TxtTipoCambio.Text.ToDecimal, 1)
|
||||||
Pago.CveProveedor = DdlAcreedor.SelectedValue.ToEntero
|
Pago.CveProveedor = DdlAcreedor.SelectedValue.ToEntero
|
||||||
Pago.TipoPago = "Egsc"
|
Pago.TipoPago = "Egsc"
|
||||||
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePoliza, ObjMov) Then
|
||||||
@@ -1854,8 +1853,6 @@ Partial Class Bancos_PopIECompras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
@@ -857,6 +857,8 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
ElseIf Pago.CveMonedaPago = 2 AndAlso CompraActual.CveMoneda = 1 Then 'Si la venta viene en pesos y se va a pagar en DOLARES
|
||||||
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
Pago.TCPago = TxtTCDolares.Text.ToDecimal
|
||||||
End If
|
End If
|
||||||
|
If ChkPagarPesos.Checked Then Pago.TCCambioMoneda = 1 / TxtTC.Text.ToDecimal
|
||||||
|
If ChkPagarDolares.Checked Then Pago.TCCambioMoneda = TxtTCDolares.Text.ToDecimal
|
||||||
|
|
||||||
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
If gvr.FCTextBox("TxtComision").Text.ToDecimal <> 0 Then
|
||||||
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
Pago.OtroGastoIngreso = gvr.FCTextBox("TxtComision").Text.ToDecimal
|
||||||
@@ -1097,13 +1099,14 @@ Partial Class Bancos_ProveedoresAbonar
|
|||||||
Anexo.Text = "[]"
|
Anexo.Text = "[]"
|
||||||
|
|
||||||
Dim Msg As New StringBuilder
|
Dim Msg As New StringBuilder
|
||||||
|
Msg.AppendFormat(" Folio: <a class=""Texto"" target='_blank' href=""/Bancos/IE.aspx?CveIE={0}"">{1}</a><br/> <br/> ", CveIE, TxtFolio.Text)
|
||||||
|
|
||||||
Msg.AppendFormat("<li> <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a></li> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)))
|
Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Imprimir movimiento</a><br/> ", Encripta(String.Format("OP=IECHEQUE&CVEIE={0}", CveIE)))
|
||||||
'End If
|
'End If
|
||||||
Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Listado</a></li>", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIE)))
|
Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Compras/PopUpVerFactura.aspx?P={0}"">Listado</a><br/> ", Encripta(String.Format("OP=ImprimeMov&CveIE={0}", CveIE)))
|
||||||
If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat("<li><a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a></li>", IDPoliza)
|
If IDPoliza > 0 AndAlso UsuarioActual.Empresa.TipoContabilidad = 2 Then Msg.AppendFormat(" <a class=""Texto"" target='_blank' href=""/Contabilidad/RegPoliza.aspx?IdPoliza={0}"">Póliza</a><br/> ", IDPoliza)
|
||||||
|
|
||||||
Dim Mensaje As String = String.Format("<br />El Documento se generó correctamente.<br /><br /><br />Descargas:<ul>{0}</ul>", Msg.ToString)
|
Dim Mensaje As String = String.Format("El Documento se generó correctamente.<br /><br /> {0} ", Msg.ToString)
|
||||||
|
|
||||||
'LIMPIA
|
'LIMPIA
|
||||||
TxtFolio.Text = ""
|
TxtFolio.Text = ""
|
||||||
|
|||||||
@@ -3598,25 +3598,24 @@
|
|||||||
<div class="col-md-2" style="text-align: left;">
|
<div class="col-md-2" style="text-align: left;">
|
||||||
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Visible="false" />
|
<asp:CheckBox ID="ChkIEPS" runat="server" Text="IEPS" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" style="text-align: center; margin-top: 5px">
|
<div class="col-md-2" style="text-align: center; margin-top: 5px">
|
||||||
<asp:Label runat="server" ID="LbImporte" />
|
<asp:Label runat="server" ID="LbImporte" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-7">
|
||||||
<asp:DropDownList ID="DdlConceptoIEPS" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="PS" DataValueField="CvePS" Width="100px" ValidationGroup="GrpAgregar" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlConceptoIEPS" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="PS" DataValueField="CvePS" Width="100px" ValidationGroup="GrpAgregar" Visible="false"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVConceptoIEPS" runat="server" ControlToValidate="DdlConceptoIEPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es necesario <b>seleccionar un concepto, </b>por favor ingréselo." InitialValue="-1" ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVConceptoIEPS" runat="server" ControlToValidate="DdlConceptoIEPS" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es necesario <b>seleccionar un concepto, </b>por favor ingréselo." InitialValue="-1" ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEConceptoIEPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVConceptoIEPS" Width="300px" BehaviorID="VCEConceptoIEPS"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEConceptoIEPS" runat="server" HighlightCssClass="vco" TargetControlID="RFVConceptoIEPS" Width="300px" BehaviorID="VCEConceptoIEPS"></ajax:ValidatorCalloutExtender>
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-5"></div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-1"></div>
|
<div class="col-md-1"></div>
|
||||||
<div class="col-md-2" style="text-align: left; width: 140px">
|
<div class="col-md-2" style="text-align: left; width: 140px">
|
||||||
<asp:CheckBox ID="ChkOtrosI" runat="server" Text="Otros Impuestos" Visible="false" />
|
<asp:CheckBox ID="ChkOtrosI" runat="server" Text="Otros Impuestos" Visible="false" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-3" style="text-align: center; margin-top: 5px">
|
<div class="col-md-2" style="text-align: center; margin-top: 5px">
|
||||||
<asp:Label runat="server" ID="LbImporte2" />
|
<asp:Label runat="server" ID="LbImporte2" />
|
||||||
</div>
|
</div>
|
||||||
<div class="col-md-4">
|
<div class="col-md-7">
|
||||||
<asp:DropDownList ID="DdlConceptoOI" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="PS" DataValueField="CvePS" Width="100px" ValidationGroup="GrpAgregar" Visible="false"></asp:DropDownList>
|
<asp:DropDownList ID="DdlConceptoOI" runat="server" CssClass="form-control input-sm select2me" AppendDataBoundItems="true" DataTextField="PS" DataValueField="CvePS" Width="100px" ValidationGroup="GrpAgregar" Visible="false"></asp:DropDownList>
|
||||||
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="DdlConceptoOI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es necesario <b>seleccionar un concepto, </b>por favor ingréselo." InitialValue="-1" ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RFVConcepto" runat="server" ControlToValidate="DdlConceptoOI" Display="None" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />Es necesario <b>seleccionar un concepto, </b>por favor ingréselo." InitialValue="-1" ValidationGroup="GrpAgregar"></asp:RequiredFieldValidator>
|
||||||
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="300px" BehaviorID="VCEConcepto"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCEConcepto" runat="server" HighlightCssClass="vco" TargetControlID="RFVConcepto" Width="300px" BehaviorID="VCEConcepto"></ajax:ValidatorCalloutExtender>
|
||||||
@@ -3629,7 +3628,7 @@
|
|||||||
<asp:UpdatePanel runat="server">
|
<asp:UpdatePanel runat="server">
|
||||||
<ContentTemplate>
|
<ContentTemplate>
|
||||||
<asp:Button ID="BtnAgregarIEPS" OnClick="BtnAgregarIEPS_Click" runat="server" ClientIDMode="Static" Text="Agregar" ValidationGroup="GrpAgregar" CssClass="btn btn-primary" />
|
<asp:Button ID="BtnAgregarIEPS" OnClick="BtnAgregarIEPS_Click" runat="server" ClientIDMode="Static" Text="Agregar" ValidationGroup="GrpAgregar" CssClass="btn btn-primary" />
|
||||||
<button type="button" class="btn btn-danger" data-dismiss="modal" runat="server" id="BtnCancelarotrosImpuestos" visible="false">Cancelar</button>
|
<%--<button type="button" class="btn btn-danger" data-dismiss="modal" runat="server" id="BtnCancelarotrosImpuestos" visible="false">Cancelar</button>--%>
|
||||||
</ContentTemplate>
|
</ContentTemplate>
|
||||||
</asp:UpdatePanel>
|
</asp:UpdatePanel>
|
||||||
</div>
|
</div>
|
||||||
@@ -6631,15 +6630,13 @@
|
|||||||
TotalCompra = parseFloat($('#<%= TxtTotal.ClientID %>').val().replace(/,/g, '')).toFixed(2);
|
TotalCompra = parseFloat($('#<%= TxtTotal.ClientID %>').val().replace(/,/g, '')).toFixed(2);
|
||||||
ImporteAmortizado = $(`.CsSelAmbos${CveCreditoDetalle}`).val().replace(/,/g, '').length == 0 ? 0 : parseFloat($(`.CsSelAmbos${CveCreditoDetalle}`).val().replace(/,/g, ''));
|
ImporteAmortizado = $(`.CsSelAmbos${CveCreditoDetalle}`).val().replace(/,/g, '').length == 0 ? 0 : parseFloat($(`.CsSelAmbos${CveCreditoDetalle}`).val().replace(/,/g, ''));
|
||||||
ImporteComision = $(`.CsSelComision${CveCreditoDetalle}`).val().replace(/,/g, '').length == 0 ? 0 : parseFloat($(`.CsSelComision${CveCreditoDetalle}`).val().replace(/,/g, ''));
|
ImporteComision = $(`.CsSelComision${CveCreditoDetalle}`).val().replace(/,/g, '').length == 0 ? 0 : parseFloat($(`.CsSelComision${CveCreditoDetalle}`).val().replace(/,/g, ''));
|
||||||
|
ImporteComision = isNaN(ImporteComision) ? 0 : ImporteComision;
|
||||||
ImporteDocPorPagar = (ImporteIE - ImporteAmortizado - ImporteComision).toFixed(2);
|
ImporteDocPorPagar = (ImporteIE - ImporteAmortizado - ImporteComision).toFixed(2);
|
||||||
|
|
||||||
$(`.CsSelAmbos${CveCreditoDetalle}`).each(function () {
|
$(`.CsSelAmbos${CveCreditoDetalle}`).each(function () {
|
||||||
FormatoMoneda3($(this));
|
FormatoMoneda3($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
$(`.CsSelComision${CveCreditoDetalle}`).each(function () {
|
|
||||||
FormatoMoneda3($(this));
|
|
||||||
});
|
|
||||||
|
|
||||||
$(`.CsCreGlobal`).each(function () {
|
$(`.CsCreGlobal`).each(function () {
|
||||||
let stringTemp = $(this).val().replace(/,/g, '');
|
let stringTemp = $(this).val().replace(/,/g, '');
|
||||||
@@ -6660,15 +6657,18 @@
|
|||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
if (((TotalAmortizaciones + TotalComisiones) > TotalCompra) || ((ImporteAmortizado + ImporteComision) > ImporteIE)) {
|
if ((TotalAmortizaciones > TotalCompra) || ((ImporteAmortizado + ImporteComision) > ImporteIE)) {
|
||||||
|
|
||||||
TotalAmortizaciones = 0;
|
TotalAmortizaciones = 0;
|
||||||
TotalComisiones = 0;
|
//TotalComisiones = 0;
|
||||||
|
|
||||||
if (Tipo == 1) {
|
if (Tipo == 1) {
|
||||||
$(`.CsSelAmbos${CveCreditoDetalle}`).val(``);
|
$(`.CsSelAmbos${CveCreditoDetalle}`).val(``);
|
||||||
|
|
||||||
} else if (Tipo == 2) {
|
} else if (Tipo == 2) {
|
||||||
$(`.CsSelComision${CveCreditoDetalle}`).val(``);
|
if (!isNaN(ImporteComision) && ImporteComision != 0) {
|
||||||
|
$(`.CsSelComision${CveCreditoDetalle}`).val(``);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -6681,9 +6681,6 @@
|
|||||||
FormatoMoneda3($(this));
|
FormatoMoneda3($(this));
|
||||||
});
|
});
|
||||||
|
|
||||||
$(`.CsSelComision${CveCreditoDetalle}`).each(function () {
|
|
||||||
FormatoMoneda3($(this));
|
|
||||||
});
|
|
||||||
|
|
||||||
$(`.CsCreGlobal`).each(function () {
|
$(`.CsCreGlobal`).each(function () {
|
||||||
|
|
||||||
|
|||||||
@@ -853,6 +853,18 @@ Partial Class Compras_Compras
|
|||||||
ViewState("TipoCambio") = value
|
ViewState("TipoCambio") = value
|
||||||
End Set
|
End Set
|
||||||
End Property
|
End Property
|
||||||
|
|
||||||
|
|
||||||
|
Private Property TipoCambioOriginal As Decimal
|
||||||
|
Get
|
||||||
|
Return ViewState("TipoCambioOriginal").ToString.ToDecimal
|
||||||
|
End Get
|
||||||
|
Set(value As Decimal)
|
||||||
|
ViewState("TipoCambioOriginal") = value
|
||||||
|
End Set
|
||||||
|
End Property
|
||||||
|
|
||||||
|
|
||||||
'Private Property TipoCambio As Double = 0
|
'Private Property TipoCambio As Double = 0
|
||||||
Private Property OtrosImpuestos As Decimal = 0
|
Private Property OtrosImpuestos As Decimal = 0
|
||||||
Private Property OtrosImpuestosRetenciones As Decimal = 0
|
Private Property OtrosImpuestosRetenciones As Decimal = 0
|
||||||
@@ -1724,8 +1736,12 @@ Partial Class Compras_Compras
|
|||||||
Dim ObjeFacturas As New ClsCompras
|
Dim ObjeFacturas As New ClsCompras
|
||||||
Dim RFC As String = ""
|
Dim RFC As String = ""
|
||||||
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-4), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
If ObjeFacturas.GetFacturas(CveFactura, "-1", Now.AddYears(-4), Now, "-1", "-1", -1, -1, -1, -1, "-1", UsuarioActual.CveEmpresa) AndAlso ObjeFacturas.DtResultados.Rows.Count > 0 Then
|
||||||
|
|
||||||
|
|
||||||
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
Dim dr As DataRow = ObjeFacturas.DtResultados.Rows(0) ' no toma la cero, porque es el totalizador
|
||||||
|
|
||||||
|
ViewState("CveTipoProveedor") = dr("CveTipoProveedor").ToString.ToEntero
|
||||||
|
|
||||||
Dim XMLDoc As New XmlDocument
|
Dim XMLDoc As New XmlDocument
|
||||||
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, dr("RFCDe"), dr("XML"))
|
Dim Archivo As String = String.Format("{0}Compras\{1}\{2}", UsuarioActual.Empresa.Ruta, dr("RFCDe"), dr("XML"))
|
||||||
If IO.File.Exists(Archivo) Then
|
If IO.File.Exists(Archivo) Then
|
||||||
@@ -2374,12 +2390,22 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
If TrasladoIEPS > 0 Or OtrosImpuestos > 0 Then
|
If TrasladoIEPS > 0 Or OtrosImpuestos > 0 Then
|
||||||
|
|
||||||
|
If OtrosImpuestos > 0 Or TrasladoIEPS > 0 Then
|
||||||
|
|
||||||
If OtrosImpuestos > 0 Then
|
If UsuarioActual.Empresa.Funcionalidad(713).ToEntero = 1 Then
|
||||||
RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
|
'Si tiene funcionalidad y es Acreedor se muestra modal
|
||||||
Else
|
If CveTipoProveedor.Contiene(2, 3) Then ' Acreedor
|
||||||
RegistraScript("$('#ModalIEPS').modal('show');")
|
RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
|
||||||
BtnCancelarotrosImpuestos.Visible = True
|
End If
|
||||||
|
Else
|
||||||
|
'Si no tiene funcionalidad y es proveedor se muestra
|
||||||
|
RegistraScript("$('#ModalIEPS').modal({ backdrop: 'static', keyboard: false },'show');")
|
||||||
|
|
||||||
|
End If
|
||||||
|
|
||||||
|
'Else
|
||||||
|
' RegistraScript("$('#ModalIEPS').modal('show');")
|
||||||
|
'BtnCancelarotrosImpuestos.Visible = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
@@ -2642,7 +2668,8 @@ Partial Class Compras_Compras
|
|||||||
HfTotalCompra.Value = TxtTotal.Text
|
HfTotalCompra.Value = TxtTotal.Text
|
||||||
|
|
||||||
TipoCambio = dr("TipoCambio").ToString.ToDecimal
|
TipoCambio = dr("TipoCambio").ToString.ToDecimal
|
||||||
Dim TipoCambioOriginal = dr("TipoCambioOriginal").ToString.ToDouble
|
|
||||||
|
TipoCambioOriginal = dr("TipoCambioOriginal").ToString.ToDecimal
|
||||||
If TipoCambio > 1 Then LblTC.Text = String.Format("TC: {0}", TipoCambio.ToString("N4"))
|
If TipoCambio > 1 Then LblTC.Text = String.Format("TC: {0}", TipoCambio.ToString("N4"))
|
||||||
If TipoCambio <> TipoCambioOriginal Then LblTCO.Text = String.Format("<br/>TC Original: {0}", TipoCambioOriginal.ToString("N4"))
|
If TipoCambio <> TipoCambioOriginal Then LblTCO.Text = String.Format("<br/>TC Original: {0}", TipoCambioOriginal.ToString("N4"))
|
||||||
|
|
||||||
@@ -6058,6 +6085,7 @@ Partial Class Compras_Compras
|
|||||||
Dim OtrosGastosIngresosCredito As Decimal = gvRowCredito.FCTextBox("TxtComision").Text.ToDecimal
|
Dim OtrosGastosIngresosCredito As Decimal = gvRowCredito.FCTextBox("TxtComision").Text.ToDecimal
|
||||||
Dim CveIECredito As Integer = gvRowCredito.DataKey("CveIE").ToEntero
|
Dim CveIECredito As Integer = gvRowCredito.DataKey("CveIE").ToEntero
|
||||||
Dim CveCreditoDetalleTemp As Integer = gvRowCredito.DataKey("CveCreditoDetalle").ToEntero
|
Dim CveCreditoDetalleTemp As Integer = gvRowCredito.DataKey("CveCreditoDetalle").ToEntero
|
||||||
|
Dim CveCreditoTemp As Integer = gvRowCredito.DataKey("CveCredito").ToEntero
|
||||||
|
|
||||||
If ImportePagoCredito > 0 Then
|
If ImportePagoCredito > 0 Then
|
||||||
Dim Pago As New CompraPago
|
Dim Pago As New CompraPago
|
||||||
@@ -6079,14 +6107,14 @@ Partial Class Compras_Compras
|
|||||||
Exit For
|
Exit For
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Dim ImporteDifCredito As Decimal = ImporteIEAnticipo - ImportePagoCredito ' CompraActual.Total
|
Dim ImporteDifCredito As Decimal = (ImporteIEAnticipo + OtrosGastosIngresosCredito) - ImportePagoCredito ' CompraActual.Total
|
||||||
|
|
||||||
If ImporteDifCredito > 0 Then
|
If ImporteDifCredito > 0 Then
|
||||||
|
|
||||||
' Dim ImportePagoCreditoMN As Decimal = ImportePagoCredito * tipoCambioActual
|
' Dim ImportePagoCreditoMN As Decimal = ImportePagoCredito * tipoCambioActual
|
||||||
Dim ImporteDifCreditoMN As Decimal = ImporteDifCredito * tipoCambioActual
|
Dim ImporteDifCreditoMN As Decimal = ImporteDifCredito * tipoCambioActual
|
||||||
|
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDifCredito, ImporteDifCreditoMN, 59, Referencia, Concepto, IdCtaContable, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIECredito, CveCreditoDetalle:=CveCreditoDetalleTemp, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, ImporteDifCredito), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, ImporteDifCredito, ImporteDifCreditoMN, 50, Referencia, Concepto, IdCtaContable, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIECredito, CveCredito:=CveCreditoTemp, CveCreditoDetalle:=CveCreditoDetalleTemp, CveClasificacion:=CveClasificacionDT, CveSubProyecto:=CveSubProyectoDT, ImporteME:=If(tipoCambioActual = 1, 0, ImporteDifCredito), CveTipoGasto:=CveTipoGastoDT, TipoCambio:=tipoCambioActual, Contabilizable:=SeContabiliza) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
|
|
||||||
@@ -9203,10 +9231,17 @@ Partial Class Compras_Compras
|
|||||||
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
Dim FechaMovimiento As Date = TxtFecha.Text.ToDate
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
|
If DdlMoneda.SelectedValue.ToString.ToEntero = 2 Then
|
||||||
tipoCambioActual = GlobalTipoCambio(FechaMovimiento).ToString.ToDecimal
|
tipoCambioActual = GlobalTipoCambio(FechaMovimiento).ToString.ToDecimal
|
||||||
tipoCambioActual = If(DivTC.Visible Or TipoCambio > 0, TipoCambio, tipoCambioActual)
|
tipoCambioActual = If(DivTC.Visible Or TipoCambio > 0, TipoCambio, tipoCambioActual)
|
||||||
tipoCambioPago = GlobalTipoCambio(TxtFechaPago.Text.ToDate).ToString.ToDecimal
|
tipoCambioPago = GlobalTipoCambio(TxtFechaPago.Text.ToDate).ToString.ToDecimal
|
||||||
|
|
||||||
|
If TipoCambioOriginal > 0 Then
|
||||||
|
tipoCambioActual = TipoCambioOriginal
|
||||||
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
tipoCambioActual = 1
|
tipoCambioActual = 1
|
||||||
tipoCambioPago = 1
|
tipoCambioPago = 1
|
||||||
@@ -9473,7 +9508,7 @@ Partial Class Compras_Compras
|
|||||||
'AGREGA MOVIMIENTO
|
'AGREGA MOVIMIENTO
|
||||||
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
If importeMovimiento <> 0 AndAlso Not DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV", "Ant") Then
|
||||||
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
Concepto = $"{NombreProveedor} {TxtSerie.Text} - {TxtFolio.Text}"
|
||||||
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 6, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CveIE:=CveIE, CveCreditoDetalle:=CveCreditoDetalle, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMN, ImporteME:=If(tipoCambioActual = 1, 0, importeMovimiento), TipoCambio:=tipoCambioActual, CveTipoGasto:=Row2("CveTipoGasto").ToString.ToEntero) Then
|
||||||
ErrorPrepoliza = True
|
ErrorPrepoliza = True
|
||||||
End If
|
End If
|
||||||
End If
|
End If
|
||||||
@@ -13949,6 +13984,12 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If Not ErrorCancelar Then
|
||||||
|
If Not ObjCompras.CancelarCompraOC(CveCompra, UsuarioActual.CveEmpresa) Then
|
||||||
|
ErrorCancelar = True
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
'CANCELA COMPRA
|
'CANCELA COMPRA
|
||||||
If Not ErrorCancelar Then
|
If Not ErrorCancelar Then
|
||||||
@@ -16720,10 +16761,19 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
|
|
||||||
'TxtIVAModal.Text = FormatoNumero(GvRow.DataKey("IVAPorcentaje").ToDouble * 100, 0)
|
'TxtIVAModal.Text = FormatoNumero(GvRow.DataKey("IVAPorcentaje").ToDouble * 100, 0)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 0)
|
TxtRetIVAModal.Text = FormatoNumero(GvRow.DataKey("RetIVAPorcentaje").ToDouble * 100, 0)
|
||||||
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 0)
|
TxtRetISRModal.Text = FormatoNumero(GvRow.DataKey("RetISRPorcentaje").ToDouble * 100, 0)
|
||||||
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 0)
|
TxtIEPSModal.Text = FormatoNumero(GvRow.DataKey("IEPSPSPorcentaje").ToDouble * 100, 0)
|
||||||
|
|
||||||
|
ViewState("RetIVA") = GvRow.DataKey("RetIVAPorcentaje").ToDouble
|
||||||
|
ViewState("RetISR") = GvRow.DataKey("RetISRPorcentaje").ToDouble
|
||||||
|
|
||||||
|
'TxtRetIVAModal.Text = FormatoNumero(ViewState("RetIVA").ToString().ToDouble * 100, 0)
|
||||||
|
'TxtRetISRModal.Text = FormatoNumero(ViewState("RetISR").ToString().ToDouble * 100, 0)
|
||||||
|
|
||||||
TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
|
TxtPrecio.Text = GvRow.DataKey("PU").FormatoNumero(6)
|
||||||
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
|
TxtDescuentoModal.Text = GvRow.DataKey("Descuento").FormatoNumero(6)
|
||||||
TxtOtrosGastos.Text = GvRow.DataKey("OtrosGastos").FormatoNumero
|
TxtOtrosGastos.Text = GvRow.DataKey("OtrosGastos").FormatoNumero
|
||||||
@@ -16899,8 +16949,11 @@ Partial Class Compras_Compras
|
|||||||
' DdlIVA.Enabled = False
|
' DdlIVA.Enabled = False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
ViewState("RetIVA") = If(PS("RetIVA").ToString = "-1", ViewState("RetIVA"), PS("RetIVA").ToString).ToString
|
If Not CveFactura > 0 Then
|
||||||
ViewState("RetISR") = If(PS("RetISR").ToString = "-1", ViewState("RetISR"), PS("RetISR").ToString).ToString
|
ViewState("RetIVA") = If(PS("RetIVA").ToString = "-1", ViewState("RetIVA"), PS("RetIVA").ToString).ToString
|
||||||
|
ViewState("RetISR") = If(PS("RetISR").ToString = "-1", ViewState("RetISR"), PS("RetISR").ToString).ToString
|
||||||
|
End If
|
||||||
|
|
||||||
If TxtIEPSModal.Text = "" Then
|
If TxtIEPSModal.Text = "" Then
|
||||||
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 0)
|
TxtIEPSModal.Text = FormatoNumero(PS("IEPSPorcentaje").ToString.ToDecimal * 100, 0)
|
||||||
End If
|
End If
|
||||||
@@ -18854,7 +18907,7 @@ Partial Class Compras_Compras
|
|||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
|
|
||||||
If ObjBancos.GetCreditosDetalleCompras(UsuarioActual.CveEmpresa, CveProveedor, -1, -1, -1) Then
|
If ObjBancos.GetCreditosDetalleCompras(UsuarioActual.CveEmpresa, CveProveedor, -1, -1, -1) Then
|
||||||
GvCreditos.DataSource = ObjBancos.DtResultados
|
GvCreditos.DataSource = ObjBancos.DtResultados.FiltraParametros(" ImporteIE > 0")
|
||||||
Else
|
Else
|
||||||
GvCreditos.DataSource = Nothing
|
GvCreditos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -18921,7 +18974,7 @@ Partial Class Compras_Compras
|
|||||||
Dim ObjBancos As New ClsBancos
|
Dim ObjBancos As New ClsBancos
|
||||||
If ObjBancos.GetCreditosDetalleCompras(UsuarioActual.CveEmpresa, CveProveedor, -1, -1, -1) Then
|
If ObjBancos.GetCreditosDetalleCompras(UsuarioActual.CveEmpresa, CveProveedor, -1, -1, -1) Then
|
||||||
|
|
||||||
GvCreditos.DataSource = ObjBancos.DtResultados
|
GvCreditos.DataSource = ObjBancos.DtResultados.FiltraParametros(" ImporteIE > 0")
|
||||||
Else
|
Else
|
||||||
GvCreditos.DataSource = Nothing
|
GvCreditos.DataSource = Nothing
|
||||||
End If
|
End If
|
||||||
@@ -18995,7 +19048,7 @@ Partial Class Compras_Compras
|
|||||||
If Not ObjInventario.AddFletesCompras(CveFlete, CveCompra) Then
|
If Not ObjInventario.AddFletesCompras(CveFlete, CveCompra) Then
|
||||||
ErrorTrans = True
|
ErrorTrans = True
|
||||||
End If
|
End If
|
||||||
'''actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
''actualiza la compra para que no se surta en almacen. sino por el flete o importación
|
||||||
''If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2) Then
|
''If Not ObjCompras.UpdateEstatusAlmacen(CveCompra, 2) Then
|
||||||
'' ErrorTrans = True
|
'' ErrorTrans = True
|
||||||
''End If
|
''End If
|
||||||
|
|||||||
@@ -269,8 +269,6 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Index += 1
|
Index += 1
|
||||||
Next
|
Next
|
||||||
|
|
||||||
@@ -280,8 +278,6 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
|
|
||||||
For Each DRow As DataRow In DTHeaders.Rows
|
For Each DRow As DataRow In DTHeaders.Rows
|
||||||
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
||||||
'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
|
|
||||||
|
|
||||||
|
|
||||||
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
If e.Row.Cells(Index).Text.Replace("%", "").ToDecimal = 0 Then
|
||||||
e.Row.Cells(Index).Text = "-"
|
e.Row.Cells(Index).Text = "-"
|
||||||
@@ -289,61 +285,13 @@ Partial Class Contabilidad2_RepAnexoCatalogoCC
|
|||||||
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
e.Row.Cells(Index).ForeColor = Drawing.Color.Red
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
If Importe <> 0 Then
|
If Importe <> 0 Then
|
||||||
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={ If(DRow("CveSubProyecto").ToString.ToEntero > 0, DRow("CveSubProyecto").ToString, "-1")}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
||||||
End If
|
End If
|
||||||
|
|
||||||
'If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
|
|
||||||
' e.Row.Cells(Index + 1).Text = "-"
|
|
||||||
'ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
|
|
||||||
' e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
|
|
||||||
|
|
||||||
'End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Index += 1
|
Index += 1
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
'Index = 4
|
|
||||||
|
|
||||||
'For Each DRow As DataRow In DTHeaders.Rows
|
|
||||||
|
|
||||||
' Dim Importe As Decimal = e.Row.DBCampo($"SubProyecto{DRow("SubProyecto")}").ToDecimal
|
|
||||||
' 'Dim Anio As Integer = DRow("SubProyecto").ToString.ToEntero
|
|
||||||
|
|
||||||
' If Importe > 0 Then
|
|
||||||
' e.Row.Cells(Index).Text = $"<a { If(Importe < 0, "style='color:Red;'", "style='color:#337ab7;'") } target='_blank' href='./RepAnexoCatalogo.aspx?CveCuenta={CveCunetaRow}&FF=31/12/{DdlEjercicio.SelectedValue}&FI=01/01/{DdlEjercicio.SelectedValue}&ER=1&CveSubProyecto={DdlSubProyecto.SelectedValue.ToEntero}' >{ If(DdlDivisor.SelectedValue.ToEntero > 1, Importe.ToString("###,###,##0"), Importe.ToString("###,###,###.00")) }</a>"
|
|
||||||
' Else
|
|
||||||
' e.Row.Cells(Index).Text = "-"
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If e.Row.Cells(Index + 1).Text.ToDecimal = 0 Then
|
|
||||||
|
|
||||||
' e.Row.Cells(Index + 1).Text = "-"
|
|
||||||
|
|
||||||
' ElseIf e.Row.Cells(Index + 1).Text.ToDecimal < 0 Then
|
|
||||||
' e.Row.Cells(Index + 1).ForeColor = Drawing.Color.Red
|
|
||||||
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' If e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal = 0 Then
|
|
||||||
' e.Row.Cells(Index + 2).Text = "-"
|
|
||||||
' ElseIf e.Row.Cells(Index + 2).Text.Replace("%", "").ToDecimal < 0 Then
|
|
||||||
' e.Row.Cells(Index + 2).ForeColor = Drawing.Color.Red
|
|
||||||
' End If
|
|
||||||
|
|
||||||
' Index += 1
|
|
||||||
|
|
||||||
'Next
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
' e.Row.Cells(1).Style.Add("text-indent", $"{e.Row.DBCampo("Level").ToString.ToEntero * 2}em")
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|||||||
@@ -643,7 +643,7 @@
|
|||||||
</asp:GridView>
|
</asp:GridView>
|
||||||
<br />
|
<br />
|
||||||
<br />
|
<br />
|
||||||
<asp:GridView ID="GvTotalesMesH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre,PorcentajeAcumulado" OnRowDataBound="GvTotalesMesH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
<asp:GridView ID="GvTotalesMesH" runat="server" AutoGenerateColumns="False" DataKeyNames="CveCuenta,Enero,Febrero,Marzo,Abril,Mayo,Junio,Julio,Agosto,Septiembre,Octubre,Noviembre,Diciembre,PorcentajeAcumulado,ImporteAcumulado" OnRowDataBound="GvTotalesMesH_RowDataBound" ShowHeaderWhenEmpty="true" CssClass="table table-striped table-hover Widthall" Style="margin-top: -10px; text-align: center;" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
|
|
||||||
<asp:TemplateField>
|
<asp:TemplateField>
|
||||||
|
|||||||
@@ -1518,6 +1518,8 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
e.Row.FCHyperLink("HLOctubre").ForeColor = If(e.Row.DataKey("Octubre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLOctubre").ForeColor)
|
e.Row.FCHyperLink("HLOctubre").ForeColor = If(e.Row.DataKey("Octubre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLOctubre").ForeColor)
|
||||||
e.Row.FCHyperLink("HLNoviembre").ForeColor = If(e.Row.DataKey("Noviembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLNoviembre").ForeColor)
|
e.Row.FCHyperLink("HLNoviembre").ForeColor = If(e.Row.DataKey("Noviembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLNoviembre").ForeColor)
|
||||||
e.Row.FCHyperLink("HLDiciembre").ForeColor = If(e.Row.DataKey("Diciembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLDiciembre").ForeColor)
|
e.Row.FCHyperLink("HLDiciembre").ForeColor = If(e.Row.DataKey("Diciembre").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLDiciembre").ForeColor)
|
||||||
|
e.Row.FCHyperLink("HLAnterior").ForeColor = If(e.Row.DataKey("ImporteAcumulado").ToDecimal < 0, Drawing.Color.Red, e.Row.FCHyperLink("HLAnterior").ForeColor)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
@@ -1929,6 +1931,9 @@ Partial Class Contabilidad_RepEstadoResultadosHorizontal
|
|||||||
e.Row.Attributes.Add("style", "Font-weight: bold")
|
e.Row.Attributes.Add("style", "Font-weight: bold")
|
||||||
|
|
||||||
|
|
||||||
|
If e.Row.DBCampo("ImporteAcumulado").ToString.ToDouble < 0 Then
|
||||||
|
e.Row.FCHyperLink("HLAnterior").ForeColor = Drawing.Color.Red
|
||||||
|
End If
|
||||||
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|||||||
@@ -92,8 +92,15 @@
|
|||||||
<asp:Label runat="server" class="col-md-1 truncate">Tipo Periodo: </asp:Label>
|
<asp:Label runat="server" class="col-md-1 truncate">Tipo Periodo: </asp:Label>
|
||||||
<div class="col-md-1">
|
<div class="col-md-1">
|
||||||
|
|
||||||
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" AutoPostBack="true" OnSelectedIndexChanged="DdlTipoPeriodo_SelectedIndexChanged" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="form-control select2me input-sm" Style="width: 100% !important;">
|
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="form-control select2me input-sm" Style="width: 100% !important;">
|
||||||
<asp:ListItem Selected="True" Text="Seleccione" Value="-1"></asp:ListItem>
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<asp:Label runat="server" class="col-md-1 truncate">Puesto: </asp:Label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlPuesto" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="form-control select2me input-sm" Style="width: 100% !important;">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
@@ -130,6 +137,12 @@
|
|||||||
<asp:Label ID="LtlCliente" CssClass="truncate" Width="100px" runat="server" Text='<%# Eval("Cliente") %>'></asp:Label>
|
<asp:Label ID="LtlCliente" CssClass="truncate" Width="100px" runat="server" Text='<%# Eval("Cliente") %>'></asp:Label>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderStyle-Width="100px" Visible="false" >
|
||||||
|
<HeaderTemplate>Puesto</HeaderTemplate>
|
||||||
|
<ItemTemplate>
|
||||||
|
<asp:Label ID="LtlPuesto" CssClass="truncate" Width="100px" runat="server" Text='<%# Eval("Puesto") %>'></asp:Label>
|
||||||
|
</ItemTemplate>
|
||||||
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderStyle-Width="110px">
|
<asp:TemplateField HeaderStyle-Width="110px">
|
||||||
<HeaderTemplate>Asistencia</HeaderTemplate>
|
<HeaderTemplate>Asistencia</HeaderTemplate>
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
|
|||||||
@@ -17,12 +17,13 @@ Partial Class RH_Asistencias
|
|||||||
divCliente.Visible = False
|
divCliente.Visible = False
|
||||||
LblCliente.Visible = False
|
LblCliente.Visible = False
|
||||||
GV.Columns(2).Visible = False
|
GV.Columns(2).Visible = False
|
||||||
|
GV.Columns(3).Visible = True
|
||||||
End If
|
End If
|
||||||
txtFechaAsistencia.Text = Now.ToShortDateString
|
txtFechaAsistencia.Text = Now.ToShortDateString
|
||||||
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2343 Then
|
If UsuarioActual.CveRol = 1 OrElse UsuarioActual.CveUsuario = 2343 Then
|
||||||
PnlMasivo.Visible = True
|
PnlMasivo.Visible = True
|
||||||
CargaTiposPeriodo()
|
|
||||||
End If
|
End If
|
||||||
|
CargaTiposPeriodo()
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -57,6 +58,8 @@ Partial Class RH_Asistencias
|
|||||||
Private Sub CargaTurnos()
|
Private Sub CargaTurnos()
|
||||||
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
||||||
DdlTurno.DataBind()
|
DdlTurno.DataBind()
|
||||||
|
DdlPuesto.DataSource = GlobalDTRHPuestos(UsuarioActual.CveEmpresa)
|
||||||
|
DdlPuesto.databind
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -68,7 +71,7 @@ Partial Class RH_Asistencias
|
|||||||
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
Protected Sub BtnConsultar_Click(sender As Object, e As System.EventArgs) Handles BtnConsultar.Click
|
||||||
If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then
|
If TxtFechaAsistencia.Text.Trim.ToDate.Year.Contiene(Now.Year - 1, Now.Year, Now.Year + 1) Then
|
||||||
Dim objpersonal As New ClsRH
|
Dim objpersonal As New ClsRH
|
||||||
If objpersonal.GetAsistencias(-1, DdlCliente.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, DdlTipoPeriodo.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, txtFechaAsistencia.Text.Trim.ToDate, UsuarioActual.CveEmpresa) Then
|
If objpersonal.GetAsistencias(-1, DdlCliente.SelectedValue.ToEntero, DdlProyecto.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, DdlTipoPeriodo.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, txtFechaAsistencia.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlPuesto.SelectedValue.ToEntero) Then
|
||||||
Dim dt As DataTable = objpersonal.DtResultados
|
Dim dt As DataTable = objpersonal.DtResultados
|
||||||
If DdlSupervisorOrganigrama.SelectedValue.ToEntero() > 0 Then
|
If DdlSupervisorOrganigrama.SelectedValue.ToEntero() > 0 Then
|
||||||
dt = dt.FiltraParametros(String.Format("CvePersonalPadre = {0}", DdlSupervisorOrganigrama.SelectedValue.ToEntero()))
|
dt = dt.FiltraParametros(String.Format("CvePersonalPadre = {0}", DdlSupervisorOrganigrama.SelectedValue.ToEntero()))
|
||||||
|
|||||||
@@ -31,11 +31,11 @@
|
|||||||
<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="CveAsistenciasInasistencias,Tipo,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,AplicaPago,AplicaPagoDoble,AplicaPrimaVac,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall" GridLines="None">
|
<asp:GridView ID="GvDatos" runat="server" AutoGenerateColumns="False" DataKeyNames="CveAsistenciasInasistencias,Tipo,TipoCorto,AplicaAsistencia,AplicaFalta,AplicaVacacion,AplicaIncapacidad,AplicaRetardo,AplicaAguinaldo,AplicaUtilidades,AplicaPago,AplicaPagoDoble,AplicaPrimaVac,Estatus" EmptyDataText="No se encontraron AsistenciasInasistenciass Registrados" ToolTip="Listado de AsistenciasInasistenciass" CssClass="table table-striped table-hover Widthall mysmallbtn" GridLines="None">
|
||||||
<Columns>
|
<Columns>
|
||||||
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
<asp:TemplateField HeaderText="Tipo" ItemStyle-Width="25%" ItemStyle-HorizontalAlign="Left">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("Tipo", " {0}") %>'></asp:Literal>
|
<asp:Literal ID="LtlTipo" runat="server" Text='<%# Eval("Tipo", "{0}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
<EditItemTemplate>
|
<EditItemTemplate>
|
||||||
<asp:TextBox ID="TxtTipo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Tipo") %>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
<asp:TextBox ID="TxtTipo" runat="server" CausesValidation="true" MaxLength="50" Text='<%# Eval("Tipo") %>' ValidationGroup="GrpGV" Width="240px"></asp:TextBox>
|
||||||
@@ -43,7 +43,8 @@
|
|||||||
<ajax:ValidatorCalloutExtender ID="VCTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
|
<ajax:ValidatorCalloutExtender ID="VCTipo" runat="server" HighlightCssClass="vco" TargetControlID="RFVTipo" Width="300px"></ajax:ValidatorCalloutExtender>
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Falta" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:BoundField DataField="TipoCorto" HeaderText="Tipo Corto" />
|
||||||
|
<asp:TemplateField HeaderText="Aplica Falta" ItemStyle-Width="10%" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaFalta" runat="server" Text='<%# Eval("AplicaFalta") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaFalta" runat="server" Text='<%# Eval("AplicaFalta") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -51,7 +52,7 @@
|
|||||||
<asp:CheckBox ID="ChkAplicaFalta" runat="server" Checked='<%# If (Eval("AplicaFalta").ToString = "Aplica", True, False) %>' />
|
<asp:CheckBox ID="ChkAplicaFalta" runat="server" Checked='<%# If (Eval("AplicaFalta").ToString = "Aplica", True, False) %>' />
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Asistencia" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Asistencia" ItemStyle-Width="10%" >
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaAsistencia" runat="server" Text='<%# Eval("AplicaAsistencia") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -59,46 +60,42 @@
|
|||||||
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString() = "Aplica", True, False) %>' />
|
<asp:CheckBox ID="ChkAplicaAsistencia" runat="server" Checked='<%# If (Eval("AplicaAsistencia").ToString() = "Aplica", True, False) %>' />
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Aplica Vacaciones" ItemStyle-Width="10%">
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Aplica Vacaciones" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaVacacion" runat="server" Text='<%# Eval("AplicaVacacion") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaVacacion" runat="server" Text='<%# Eval("AplicaVacacion") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Incapacidad" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Incapacidad" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplica" runat="server" Text='<%# Eval("AplicaIncapacidad") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplica" runat="server" Text='<%# Eval("AplicaIncapacidad") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Retardo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Retardo" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaRetardo" runat="server" Text='<%# Eval("AplicaRetardo") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaRetardo" runat="server" Text='<%# Eval("AplicaRetardo") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Aguinaldo" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Aguinaldo" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaAguinaldo" runat="server" Text='<%# Eval("AplicaAguinaldo") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaAguinaldo" runat="server" Text='<%# Eval("AplicaAguinaldo") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Utilidades" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Utilidades" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicaUtilidades" runat="server" Text='<%# Eval("AplicaUtilidades") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Pago" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Pago" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicapago" runat="server" Text='<%# Eval("AplicaPago") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicapago" runat="server" Text='<%# Eval("AplicaPago") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Aplica Pago Doble" ItemStyle-Width="15%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Aplica Pago Doble" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlAplicapagoDoble" runat="server" Text='<%# Eval("AplicaPagoDoble") %>'></asp:Literal>
|
<asp:Literal ID="LtlAplicapagoDoble" runat="server" Text='<%# Eval("AplicaPagoDoble") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
|
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%">
|
||||||
|
|
||||||
<asp:TemplateField HeaderText="Estatus" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
|
<asp:Literal ID="LtlEstatus" runat="server" Text='<%# Eval("Estatus") %>'>a</asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
@@ -106,17 +103,17 @@
|
|||||||
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
<asp:CheckBox ID="ChkEstatus" runat="server" Checked='<%# If (Eval("Estatus").ToString = "Activo", True, False) %>' />
|
||||||
</EditItemTemplate>
|
</EditItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Fecha" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
<asp:Literal ID="LtlFechaIng" runat="server" Text='<%# Eval("FechaIng", "{0:d}") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>
|
||||||
<asp:TemplateField HeaderText="Usuario" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
<%-- <asp:TemplateField HeaderText="Usuario" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
<asp:Literal ID="LtlUsuario" runat="server" Text='<%# Eval("Usuario") %>'></asp:Literal>
|
||||||
</ItemTemplate>
|
</ItemTemplate>
|
||||||
</asp:TemplateField>
|
</asp:TemplateField>--%>
|
||||||
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10%" ItemStyle-HorizontalAlign="Center">
|
<asp:TemplateField HeaderText="Editar" ItemStyle-Width="10%">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
<asp:LinkButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" CssClass="btn btn-circle btn-sm green" Text="<i class='fa fa-pencil'></i>" />
|
||||||
<%--<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />--%>
|
<%--<asp:ImageButton ID="imgE" runat="server" AlternateText="Editar" CausesValidation="False" CommandName="Edit" ImageUrl="/Imagenes/Btn_Edit.png" />--%>
|
||||||
@@ -159,6 +156,11 @@
|
|||||||
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
<asp:RequiredFieldValidator ID="RfvTxtTiposD" runat="server" ControlToValidate="TipoTxt" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
<label for="TipoTxt">Tipo:</label>
|
<label for="TipoTxt">Tipo:</label>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="form-group form-md-line-input input-iconright">
|
||||||
|
<asp:TextBox ID="TxtTipoCorto" CssClass="form-control " runat="server" MaxLength="70" CausesValidation="true"></asp:TextBox>
|
||||||
|
<asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TxtTipoCorto" CssClass="help-block errorimput" ErrorMessage="<b><span style='text-decoration: underline'>ERROR:</span></b><br />El campo <b>''Tipo Corto''</b> es necesario, por favor ingréselo." ValidationGroup="GrpTiposD"></asp:RequiredFieldValidator>
|
||||||
|
<label for="TipoTxt">TipoCorto:</label>
|
||||||
|
</div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4">
|
<div class="col-md-4">
|
||||||
<div id="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
<div id="AplicaNoAplicaSection" runat="server" class="form-group form-md-line-input input-iconright">
|
||||||
|
|||||||
@@ -120,6 +120,7 @@ chkAplicaVacacion, chkAplicaIncapacidad, chkAplicaRetardo, chkAplicaAguinaldo, c
|
|||||||
CheckActiveSection.Visible = True
|
CheckActiveSection.Visible = True
|
||||||
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) 'obtenemos el renglon que acabamos de seleccionar
|
||||||
TipoTxt.Text = GvRow.DataKey("Tipo")
|
TipoTxt.Text = GvRow.DataKey("Tipo")
|
||||||
|
TxtTipoCorto.Text = GvRow.DataKey("TipoCorto")
|
||||||
AplicaNoAplica.Checked = If(GvRow.DataKey("AplicaAsistencia") = "Aplica", True, False)
|
AplicaNoAplica.Checked = If(GvRow.DataKey("AplicaAsistencia") = "Aplica", True, False)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -47,14 +47,8 @@
|
|||||||
<div class="titlefiltros caption ">
|
<div class="titlefiltros caption ">
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
<asp:Label ID="LblCliente" runat="server" class="col-md-1 truncate">Cliente:</asp:Label>
|
||||||
|
<div class="col-md-2" id="divCliente" runat="server">
|
||||||
|
|
||||||
<div class="col-md-1" style="text-align:right">
|
|
||||||
Cliente:
|
|
||||||
</div>
|
|
||||||
<div class="col-md-1">
|
|
||||||
<asp:Button ID="BtnCargarClientes" runat="server" ClientIDMode="Static" Text="CargarClientes" Style="display: none;" />
|
|
||||||
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
|
<ADS:Dropdownlost CssClassDdl="select2me" ID="DdlCliente" Width="100%" data-metodo="getcliente" UsaWebService="true" runat="server" DataTextField="NombreComercial" DataValueField="CveCliente" CssStyle="width: 100%"></ADS:Dropdownlost>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -145,7 +139,20 @@
|
|||||||
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
|
<asp:ListItem Text="Sin Asignar" Value="-2"></asp:ListItem>
|
||||||
</asp:DropDownList>
|
</asp:DropDownList>
|
||||||
</div>
|
</div>
|
||||||
|
<asp:Label runat="server" class="col-md-1 truncate">Tipo Periodo: </asp:Label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlTipoPeriodo" runat="server" AppendDataBoundItems="true" DataTextField="TipoPeriodo" DataValueField="CveTipoPeriodo" Class="form-control select2me input-sm" Style="width: 100% !important;">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
<asp:Label runat="server" class="col-md-1 truncate">Puesto: </asp:Label>
|
||||||
|
<div class="col-md-1">
|
||||||
|
|
||||||
|
<asp:DropDownList ID="DdlPuesto" runat="server" AppendDataBoundItems="true" DataTextField="Puesto" DataValueField="CvePuesto" Class="form-control select2me input-sm" Style="width: 100% !important;">
|
||||||
|
<asp:ListItem Selected="True" Text="Todos" Value="-1"></asp:ListItem>
|
||||||
|
</asp:DropDownList>
|
||||||
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -14,10 +14,16 @@ Partial Class RH_RepAsistencias
|
|||||||
CargaClientes()
|
CargaClientes()
|
||||||
CargaProyecto()
|
CargaProyecto()
|
||||||
CargaTurnos()
|
CargaTurnos()
|
||||||
|
CargaTiposPeriodo()
|
||||||
|
|
||||||
TxtFechaAsistenciaFin.Text = Now.ToShortDateString
|
TxtFechaAsistenciaFin.Text = Now.ToShortDateString
|
||||||
TxtFechaAsistencia.Text = $"01/{Now.ToString("MM")}/{Now.Year}"
|
TxtFechaAsistencia.Text = $"01/{Now.ToString("MM")}/{Now.Year}"
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(267) = "1" Then ' emp citricola
|
||||||
|
divCliente.Visible = False
|
||||||
|
LblCliente.Visible = False
|
||||||
|
GV.Columns(2).Visible = False
|
||||||
|
GV.Columns(3).Visible = True
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
@@ -45,21 +51,16 @@ Partial Class RH_RepAsistencias
|
|||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaClientes()
|
Private Sub CargaClientes()
|
||||||
Dim ObjClientes As New ClsClientes
|
'Dim ObjClientes As New ClsClientes
|
||||||
If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
|
'If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then
|
||||||
DdlCliente.DataSource = ObjClientes.DtResultados
|
' DdlCliente.DataSource = ObjClientes.DtResultados
|
||||||
Else
|
'Else
|
||||||
DdlCliente.DataSource = Nothing
|
' DdlCliente.DataSource = Nothing
|
||||||
End If
|
'End If
|
||||||
ObjClientes.Dispose()
|
'ObjClientes.Dispose()
|
||||||
|
|
||||||
|
|
||||||
DdlCliente.DataBind()
|
'DdlCliente.DataBind()
|
||||||
End Sub
|
|
||||||
|
|
||||||
Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click
|
|
||||||
CargaClientes()
|
|
||||||
'DdlCliente.Attributes.Remove("onclick")
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Sub CargaProyecto()
|
Private Sub CargaProyecto()
|
||||||
@@ -85,6 +86,13 @@ Partial Class RH_RepAsistencias
|
|||||||
Private Sub CargaTurnos()
|
Private Sub CargaTurnos()
|
||||||
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
DdlTurno.DataSource = GlobalDTTurno(UsuarioActual.CveEmpresa)
|
||||||
DdlTurno.DataBind()
|
DdlTurno.DataBind()
|
||||||
|
DdlPuesto.DataSource = GlobalDTRHPuestos(UsuarioActual.CveEmpresa)
|
||||||
|
DdlPuesto.databind
|
||||||
|
End Sub
|
||||||
|
Private Sub CargaTiposPeriodo()
|
||||||
|
|
||||||
|
DdlTipoPeriodo.DataSource = GlobalDTTipoPeriodo
|
||||||
|
DdlTipoPeriodo.DataBind()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
#End Region
|
#End Region
|
||||||
@@ -105,7 +113,7 @@ Partial Class RH_RepAsistencias
|
|||||||
Dim CveClienteAsignado As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
|
Dim CveClienteAsignado As Integer = If(DdlCliente.SelectedValue.ToEntero > 0, DdlCliente.SelectedValue.ToEntero, -1)
|
||||||
|
|
||||||
If objpersonal.RepGetAsistencias(DdlGrupo.SelectedValue.ToEntero, CveClienteAsignado, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, TxtFechaAsistencia.Text.Trim.ToDate,
|
If objpersonal.RepGetAsistencias(DdlGrupo.SelectedValue.ToEntero, CveClienteAsignado, DdlSubProyecto.SelectedValue.ToEntero, DdlTurno.SelectedValue.ToEntero, 1, TxtFechaAsistencia.Text.Trim.ToDate,
|
||||||
TxtFechaAsistenciaFin.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlSupervisorOrganigrama.SelectedValue.ToEntero()) Then
|
TxtFechaAsistenciaFin.Text.Trim.ToDate, UsuarioActual.CveEmpresa, DdlSupervisorOrganigrama.SelectedValue.ToEntero(), DdlTipoPeriodo.SelectedValue.ToEntero, DdlPuesto.SelectedValue.ToEntero) Then
|
||||||
dtTemp = objpersonal.DtResultados
|
dtTemp = objpersonal.DtResultados
|
||||||
|
|
||||||
GvMostrarColumnas(dtTemp)
|
GvMostrarColumnas(dtTemp)
|
||||||
@@ -143,7 +151,6 @@ Partial Class RH_RepAsistencias
|
|||||||
Private Sub GvMostrarColumnas(dt As DataTable)
|
Private Sub GvMostrarColumnas(dt As DataTable)
|
||||||
Dim index = 1
|
Dim index = 1
|
||||||
|
|
||||||
|
|
||||||
For index = 1 To dt.Columns.Count - 5
|
For index = 1 To dt.Columns.Count - 5
|
||||||
CType(GV.Columns(index + 4), BoundField).DataField = dt.Columns(index + 4).ColumnName
|
CType(GV.Columns(index + 4), BoundField).DataField = dt.Columns(index + 4).ColumnName
|
||||||
GV.Columns(index + 4).Visible = True
|
GV.Columns(index + 4).Visible = True
|
||||||
@@ -153,13 +160,7 @@ Partial Class RH_RepAsistencias
|
|||||||
Else
|
Else
|
||||||
CType(GV.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
|
CType(GV.Columns(index + 4), BoundField).HeaderText = dt.Columns(index + 4).ColumnName
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Next
|
Next
|
||||||
|
|
||||||
|
|
||||||
UpDatos.Update()
|
UpDatos.Update()
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
@@ -167,17 +168,10 @@ Partial Class RH_RepAsistencias
|
|||||||
|
|
||||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||||
|
|
||||||
If e.Row.DataKey("Ordenador").ToEntero = 0 Then
|
If e.Row.DataKey("Ordenador") = "0" Then
|
||||||
e.Row.CssClass = "SubTotales"
|
e.Row.CssClass = "SubTotales"
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
' e.Row.Attributes.Add("style", "max-height: 22px;")
|
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
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
|
||||||
|
|||||||
@@ -406,7 +406,7 @@ Partial Class CatPS
|
|||||||
Dim CodigoPSAdicional As String = dr("CodigoProductoAdicional").ToString.Trim
|
Dim CodigoPSAdicional As String = dr("CodigoProductoAdicional").ToString.Trim
|
||||||
Dim Cantidad As Integer = dr("CantidadFija").ToString.ToEntero
|
Dim Cantidad As Integer = dr("CantidadFija").ToString.ToEntero
|
||||||
msgg = GuardarProductosEquivalenteEnFranquicia(ObjPS, CodigoPS, CodigoPSAdicional, Cantidad, 1)
|
msgg = GuardarProductosEquivalenteEnFranquicia(ObjPS, CodigoPS, CodigoPSAdicional, Cantidad, 1)
|
||||||
If GuardarProductosEquivalenteEnFranquicia(ObjPS, CodigoPS, CodigoPSAdicional, Cantidad, 1) <> "" Then
|
If msgg <> "" Then
|
||||||
ErrorExcel = True
|
ErrorExcel = True
|
||||||
strNoCargados.AppendFormat(" {0} <br/>", msgg)
|
strNoCargados.AppendFormat(" {0} <br/>", msgg)
|
||||||
Exit For
|
Exit For
|
||||||
|
|||||||
Reference in New Issue
Block a user