diff --git a/AF/CatSubTipos.aspx b/AF/CatSubTipos.aspx index 1c87568c5..1c97e6a3e 100644 --- a/AF/CatSubTipos.aspx +++ b/AF/CatSubTipos.aspx @@ -52,8 +52,8 @@ - - + + diff --git a/AF/CatSubTipos.aspx.vb b/AF/CatSubTipos.aspx.vb index cc023e732..d35a95f54 100644 --- a/AF/CatSubTipos.aspx.vb +++ b/AF/CatSubTipos.aspx.vb @@ -18,8 +18,10 @@ Partial Class AF_CatSubTipos End Sub Private Sub CargaTipos() + DdlTipos.Items.Clear() DdlTipos.DataSource = GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) '.FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) DdlTipos.DataBind() + DdlTipos.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub Private Sub CargaGlobal() @@ -46,7 +48,6 @@ Partial Class AF_CatSubTipos Else CargaGrid("") End If - CargaGlobal() End Sub #Region "G V D A T O S" @@ -92,7 +93,8 @@ Partial Class AF_CatSubTipos CargaGrid("") End If - If Not TieneError Then + If Not TieneError Then + CargaGlobal() CargaDatos() End If End Sub @@ -133,7 +135,8 @@ Partial Class AF_CatSubTipos CargaGrid("") End If - If Not TieneError Then + If Not TieneError Then + CargaGlobal() CargaDatos() End If End Sub @@ -199,7 +202,9 @@ Partial Class AF_CatSubTipos End If ObjAF.Dispose() - If Not TieneError Then + If Not TieneError Then + CargaGlobal() + CargaDatos() End If diff --git a/AF/CatTipos.aspx.vb b/AF/CatTipos.aspx.vb index 310644925..d7dd84cf6 100644 --- a/AF/CatTipos.aspx.vb +++ b/AF/CatTipos.aspx.vb @@ -104,11 +104,7 @@ Partial Class AF_CatTipos UpDatos.Update() End Sub Private Sub CargaGlobal() - Dim ObjTipo As New ClsAF - If ObjTipo.GetTiposActivosFijos(-1) Then - GlobalDTTipoActivoFijo(-1) = ObjTipo.DtResultados - End If - ObjTipo.Dispose() + GlobalDTTipoActivoFijo(UsuarioActual.CveEmpresa) = Nothing End Sub #Region " G V - D A T O S" diff --git a/App_Code/CFDITimbre.vb b/App_Code/CFDITimbre.vb index b0e2013b4..baa5ff738 100644 --- a/App_Code/CFDITimbre.vb +++ b/App_Code/CFDITimbre.vb @@ -327,12 +327,14 @@ Public Class CFDIConceptos Public Property ClaveProdServ As String = "" Public Property ClaveUnidad As String = "" Public Property Impuestos As List(Of CFDIConceptosImpuestos) + Public Property ACuentaTerceros As CFDIConceptosACuentaTerceros Public Property Descuento As Decimal = 0.00D Public Property ObjetoImpuesto As String = "02" Public Property ImporteGravaIVAAdicional As Decimal = 0.00D 'caso IEPS Sub New() Impuestos = New List(Of CFDIConceptosImpuestos) + ACuentaTerceros = New CFDIConceptosACuentaTerceros End Sub End Class @@ -349,6 +351,16 @@ Public Class CFDIConceptosImpuestos Public Property ImporteMN As Decimal = 0.000000D +End Class + + +Public Class CFDIConceptosACuentaTerceros + Public Property RfcACuentaTerceros As String = "" + Public Property NombreACuentaTerceros As String = "" + Public Property RegimenFiscalACuentaTerceros As String = "" + Public Property DomicilioFiscalACuentaTerceros As String = "" + + End Class @@ -442,8 +454,27 @@ End Class Public Class CFDIComplementoPagos20 Public Property TotalTrasladosBaseExento As Decimal = 0 - Public Property TotalRetencionesIVA As Decimal = 0 - Public Property TotalRetencionesISR As Decimal = 0 + + Public ReadOnly Property TotalRetencionesIVA As Decimal + Get + Dim Ret As Decimal = 0 + For Each cfd As CFDIComplementoPago In ComplementoPagos + Ret = Ret + ((From c In cfd.Retenciones Where c.Impuesto = "002" Select c.Importe).Sum() * cfd.TipoCambioP) + Next + Return Ret.RoundSQL() + End Get + End Property + + Public ReadOnly Property TotalRetencionesISR As Decimal + Get + Dim Ret As Decimal = 0 + For Each cfd As CFDIComplementoPago In ComplementoPagos + Ret = Ret + ((From c In cfd.Retenciones Where c.Impuesto = "001" Select c.Importe).Sum() * cfd.TipoCambioP) + Next + Return Ret.RoundSQL() + End Get + End Property + Public Property ComplementoPagos As List(Of CFDIComplementoPago) Public ReadOnly Property MontoTotalPagos As Decimal diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index 7c010deb9..8b1f062b8 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1113,7 +1113,8 @@ Public Class ClsBancos Timbre = Timbrado.PreparaTimbrePago40(RFCEmpresa, UsuarioActual.Empresa.Empresa, UsuarioActual.Empresa.CodigoRegimenFiscal, RFCCliente, dr("NombreCliente").ToString, dr("ClienteCP").ToString, dr("CodigoRegimenFiscal").ToString, Serie, Folio.ToString, FechaTimbrado, Cuentapago, dr("FechaDocumento").ToString.ToDate, dr("ClaveFormaPagoSAT").ToString, dr("AbreviaturaSAT").ToString, dr("VentasTotalPagado").ToString.ToDecimal, - UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado) + UsuarioActual.Empresa.CP.ToString, CuentaBeneficiario, dr("TipoCambioPago").ToString.ToDecimal, dttpagos, dttpagosimpuestos, CFDIRelacionado:=CFDIRelacionado, + RfcACuentaTerceros:=dr("RfcACuentaTerceros").ToString, NombreACuentaTerceros:=dr("NombreACuentaTerceros").ToString, RegimenFiscalACuentaTerceros:=dr("RegimenFiscalACuentaTerceros").ToString, DomicilioFiscalACuentaTerceros:=dr("DomicilioFiscalACuentaTerceros").ToString) Else CFDIVersion = "3.3" diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index a10b756f0..51106972c 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1325,7 +1325,7 @@ Public Class ClsContabilidad Try - If GetEncabezadoPrePoliza(CvePrePoliza, Empresa.CveEmpresa) Then + If GetEncabezadoPrePoliza(CvePrePoliza, Empresa.CveEmpresa) AndAlso DtResultados.Rows.Count > 0 Then CveTipoPoliza = Data.Rows(0)("CveTipoPoliza").ToString.ToEntero Cargos = Data.Rows(0)("Cargos").ToString.ToDecimal Abonos = Data.Rows(0)("Abonos").ToString.ToDecimal @@ -3803,7 +3803,7 @@ Public Class ClsContabilidad End Function - Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String) As Boolean + Public Function GetMovimientosAuxiliaresCatalogo(IdCuenta As Integer, FechaI As Date, FechaF As Date, CveMoneda As Integer, CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, TipoReporte As String, OpcionCuentas As Integer) As Boolean Dim Retorno = False DataAdapter("PA_Conta_MovimientosAuxiliaresCatalogoGet") @@ -3816,6 +3816,7 @@ Public Class ClsContabilidad .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Tipo", SqlDbType.Int).Value = TipoReporte + .Add("@OpcionCuentas", SqlDbType.Int).Value = OpcionCuentas End With SqlAdapter.SelectCommand.CommandTimeout = 0 Try diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index d1ba33607..eb20408ad 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -7788,7 +7788,7 @@ Public Class ClsPaginas 'concepto pago Concepto = String.Format("{0} NC:{1}", CompraActual.ProveedorNombre, Pago.Referencia) If Pago.TipoPago = "Egsc" AndAlso Not ErrorMovtos Then ' A N T I C I P O / E G R E S O S X C O M P R O B A R - Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor) + Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(11, Pago.CveMonedaPago, True, CompraActual.CveTipoConceptoProveedor) If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableAnticipoProv, CveCompra:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True @@ -7800,7 +7800,7 @@ Public Class ClsPaginas End If End If If Pago.TipoPago.Contiene("NC", "DEV") AndAlso Not ErrorMovtos Then ' N O T A D E C R E D I T O - Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor) + Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(15, Pago.CveMonedaPago, True, CompraActual.CveTipoConceptoProveedor) If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=CompraActual.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto) Then ErrorMovtos = True @@ -7812,7 +7812,7 @@ Public Class ClsPaginas End If End If If Pago.TipoPago = "DD" AndAlso Not ErrorMovtos Then ' D E U D O R D I V E R S O - Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(17, CompraActual.CveMoneda, True, CompraActual.CveTipoConceptoProveedor) + Dim ConPrepAplicacion As ConceptosTipoSaldo = ObtenerCveConceptoPrePoliza(17, Pago.CveMonedaPago, True, CompraActual.CveTipoConceptoProveedor) If Pago.CveMonedaPago > 1 Then 'Agregamos la Extranjera If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, Pago.ImportePago, ConPrepAplicacion.CveConcepto, Pago.Referencia, Concepto, CompraActual.IdCtaContableProv, CveCompra:=Pago.CveCompraAmortizacion, CveCompraAmortizacion:=CompraActual.CveCompra, CveProveedor:=Pago.CveProveedor, CveIE:=Pago.CveIE, ImporteME:=Pago.ImportePago, TipoCambio:=TCValuacionPago, CveSubProyecto:=CompraActual.CveSubProyecto, CvePersonal:=Pago.CvePersonal) Then ErrorMovtos = True @@ -9387,6 +9387,9 @@ Public Class ClsPaginas PaginaDict.Add("/RH/CatRegistroPatronal.aspx".ToUpper(), 1324) PaginaDict.Add("/SAT/SolicitudesNominaSat.aspx".ToUpper(), 545) PaginaDict.Add("/SAT/SolicitudesIngresoSat.aspx".ToUpper(), 1329) + + PaginaDict.Add("/RH/RepAsistencias.aspx".ToUpper(), 1336) + #End Region #Region "Sistema" '--------------------- Páginas que deben tener restricción --------------------- diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 466f25b58..ee95fedd3 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -2616,8 +2616,9 @@ Public Class ClsRH End Try Return Retorno - 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, FechaI As Date, FechaF As Date, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2641,6 +2642,33 @@ Public Class ClsRH OnError("Ocurrió un error al consultar las Asistencias del Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try + Return Retorno + 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 + Dim Retorno As Boolean = False + + SqlDataAdapter("PA_RH_RepPersonalAsistenciasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@Grupo", SqlDbType.Int).Value = Grupo + .Add("@FechaI", SqlDbType.Date).Value = FechaI + .Add("@FechaF", SqlDbType.Date).Value = FechaF + .Add("@CveClienteAsignado", SqlDbType.Int).Value = CveClienteAsignado + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveTurno", SqlDbType.Int).Value = CveTurno + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CvePersonalPadre", SqlDbType.Int).Value = CvePersonalPadre + .Add("@CveEstatusPersonal", SqlDbType.Int).Value = CveEstatusPersonal + + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error al consultar las Asistencias del Personal.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno End Function @@ -7283,7 +7311,7 @@ Public Class ClsRH #End Region -#Region "Checador" +#Region "Checador" Public Function GetChecadores(CveChecador As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_RH_ChecadorGet") @@ -7356,6 +7384,45 @@ Public Class ClsRH End Try Return Retorno 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 #Region " A C T I V I D A D E S" diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index ed304f1ff..499b625e0 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -10,6 +10,8 @@ Imports System.Xml Imports System.Xml.Serialization Imports Extensiones Imports Newtonsoft.Json.Linq +Imports Profact.TimbraCFDI33.Complementos.CartaPorte10 +Imports Profact.TimbraCFDI33.Complementos.CartaPorte20 Imports ProfactCartaPorte = Profact.TimbraCFDI33.Complementos.CartaPorte20 @@ -1042,7 +1044,11 @@ Public Class Timbrado Serie As String, Folio As String, FechaTimbrado As DateTime, CuentaPago As String, FechaPago As DateTime, FormaPago As String, MonedaPago As String, Monto As Decimal, LugarExpedicion As String, CuentaBeneficiario As String, TipoCambioP As Decimal, dttpagos As Data.DataTable, dttpagosimpuestos As DataTable, - Optional UsoCFDI As String = "CP01", Optional CFDIRelacionado As String = "") As CFDITimbre + Optional UsoCFDI As String = "CP01", Optional CFDIRelacionado As String = "", + Optional RfcACuentaTerceros As String = "", + Optional NombreACuentaTerceros As String = "", + Optional RegimenFiscalACuentaTerceros As String = "", + Optional DomicilioFiscalACuentaTerceros As String = "") As CFDITimbre Dim Timbre As New CFDITimbre @@ -1087,6 +1093,14 @@ Public Class Timbrado .ClaveProdServ = "84111506", .Noidentificacion = "", .ObjetoImpuesto = "01"} + + 'Pago ACuentaTerceros + If RfcACuentaTerceros <> "" Then + concepto.ACuentaTerceros.RfcACuentaTerceros = RfcACuentaTerceros + concepto.ACuentaTerceros.NombreACuentaTerceros = NombreACuentaTerceros + concepto.ACuentaTerceros.DomicilioFiscalACuentaTerceros = DomicilioFiscalACuentaTerceros + concepto.ACuentaTerceros.RegimenFiscalACuentaTerceros = RegimenFiscalACuentaTerceros + End If Timbre.Conceptos.Add(concepto) Select Case FormaPago @@ -1137,6 +1151,7 @@ Public Class Timbrado ObjetoImpuesto = dr("ObjetoImpuesto").ToString VentaImportePagoMN = dr("VentasTotalPagado").ToString.ToDecimal + '' si la moneda es igual, se omite el tipo de cambio de la venta If MonedaPago = VentaAbreviaturaSAT Then VentaTipoCambio = 1 @@ -3628,10 +3643,10 @@ Public Class Timbrado If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then AmbienteProductivo = False Clave = "12345678a" - EmisorRFC = "IIA040805DZ4" - EmisorNombre = "INDISTRIA ILUMINADORA DE ALMACENES SA DE CV" - ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\publicKey.key" - ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\publicCer.cer" + EmisorRFC = "EKU9003173C9" + UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE" + ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key" + ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer" UsuarioActual.Empresa.CodigoRegimenFiscal = "601" End If @@ -3792,6 +3807,11 @@ Public Class Timbrado comprobante.Conceptos(i).InformacionAduanera = New Profact.TimbraCFDI40.ComprobanteConceptoInformacionAduanera(1) {} 'solo un codigo por el momento comprobante.Conceptos(i).InformacionAduanera(0) = New Profact.TimbraCFDI40.ComprobanteConceptoInformacionAduanera() With {.NumeroPedimento = concep.NumeroPedimento} End If + If concep.ACuentaTerceros IsNot Nothing AndAlso concep.ACuentaTerceros.RfcACuentaTerceros <> "" Then + comprobante.Conceptos(i).ACuentaTerceros = New Profact.TimbraCFDI40.ComprobanteConceptoACuentaTerceros() With { + .RfcACuentaTerceros = concep.ACuentaTerceros.RfcACuentaTerceros, .NombreACuentaTerceros = concep.ACuentaTerceros.NombreACuentaTerceros, + .RegimenFiscalACuentaTerceros = concep.ACuentaTerceros.RegimenFiscalACuentaTerceros, .DomicilioFiscalACuentaTerceros = concep.ACuentaTerceros.DomicilioFiscalACuentaTerceros} + End If j = 0 k = 0 @@ -4246,7 +4266,9 @@ Public Class Timbrado ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).ImpuestoP = Tra.Impuesto ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).TipoFactorP = Tra.TipoFactor ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).TasaOCuotaP = Tra.TasaOCuota.RoundSQL(6) + ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).TasaOCuotaPSpecified = True ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).ImporteP = Tra.ImporteMN.RoundSQL(6) + ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).ImportePSpecified = True ComPag.Pago(ii).ImpuestosP(0).TrasladosP(x).BaseP = Tra.BaseMN.RoundSQL(2) x += 1 Next @@ -4333,7 +4355,7 @@ Public Class Timbrado ComCartaPorte.Mercancias.Mercancia(i) = New ProfactCartaPorte.CartaPorteMercanciasMercancia If concep.BienesTransp <> "" Then - ComCartaPorte.Mercancias.Mercancia(i).BienesTransp = CType([Enum].Parse(GetType(ProfactCartaPorte.c_ClaveProdServCP), "Item" & concep.BienesTransp), ProfactCartaPorte.c_ClaveProdServCP) + ComCartaPorte.Mercancias.Mercancia(i).BienesTransp = concep.BienesTransp End If ComCartaPorte.Mercancias.Mercancia(i).Descripcion = concep.Descripción @@ -4345,7 +4367,7 @@ Public Class Timbrado ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligrosoSpecified = True 'si lleva material pelgroso, debe llevar embalaje ComCartaPorte.Mercancias.Mercancia(i).EmbalajeSpecified = True - ComCartaPorte.Mercancias.Mercancia(i).Embalaje = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoEmbalaje), "Item" & concep.Embalaje), ProfactCartaPorte.c_TipoEmbalaje) + ComCartaPorte.Mercancias.Mercancia(i).Embalaje = concep.Embalaje ComCartaPorte.Mercancias.Mercancia(i).DescripEmbalaje = concep.DescripEmbalaje End If @@ -4760,22 +4782,17 @@ Public Class Timbrado If Retorno = "[]" Then Retorno = resultadoTimbre.Descripcion + MensajeErrorCFDI = resultadoTimbre.Descripcion End If - If MensajeErrorCFDI = "[]" Then - Retorno = resultadoTimbre.Descripcion - End If - End If resultadoTimbre.GuardaXml(RutaArchivo, NombreArchivoXML) Catch ex As Exception Retorno = ex.ToString() End Try - Else Retorno = resultadoTimbre.Detalle MensajeErrorCFDI = resultadoTimbre.Detalle End If - End If GuardaLogTimbrado(swTiempo.ToString, UsuarioActual.Empresa.CvePAC) @@ -4851,6 +4868,11 @@ Public Class Timbrado Next If concep.CuentaPredial <> "" Then cfdi.CuentaPredial(concep.CuentaPredial) If concep.NumeroPedimento <> "" Then cfdi.InformacionAduanera(concep.NumeroPedimento) + + If concep.ACuentaTerceros IsNot Nothing AndAlso concep.ACuentaTerceros.RfcACuentaTerceros <> "" Then + cfdi.ACuentaTerceros(concep.ACuentaTerceros.RfcACuentaTerceros, concep.ACuentaTerceros.NombreACuentaTerceros, + concep.ACuentaTerceros.RegimenFiscalACuentaTerceros, concep.ACuentaTerceros.DomicilioFiscalACuentaTerceros) + End If Next End If @@ -5121,7 +5143,6 @@ Public Class Timbrado docp.CadPago, docp.SelloPago) - If docp.DocumentosRelacionados.Count > 0 Then For Each doc As CFDIComplementoPagosDocsRelacionados In docp.DocumentosRelacionados @@ -5555,7 +5576,7 @@ Public Class Timbrado If Not UsuarioActual.Empresa.FacturaProduccion OrElse UsuarioActual.CveEmpresa = 1 Then EmisorRFC = "EKU9003173C9" - UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE SA DE CV" + UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE" ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key" ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer" @@ -6522,7 +6543,7 @@ Public Class Timbrado ComCartaPorte.Mercancias.Mercancia(i) = New ProfactCartaPorte.CartaPorteMercanciasMercancia If concep.BienesTransp <> "" Then - ComCartaPorte.Mercancias.Mercancia(i).BienesTransp = CType([Enum].Parse(GetType(ProfactCartaPorte.c_ClaveProdServCP), "Item" & concep.BienesTransp), ProfactCartaPorte.c_ClaveProdServCP) + ComCartaPorte.Mercancias.Mercancia(i).BienesTransp = concep.BienesTransp End If ComCartaPorte.Mercancias.Mercancia(i).Descripcion = concep.Descripción @@ -6534,7 +6555,7 @@ Public Class Timbrado ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligrosoSpecified = True 'si lleva material pelgroso, debe llevar embalaje ComCartaPorte.Mercancias.Mercancia(i).EmbalajeSpecified = True - ComCartaPorte.Mercancias.Mercancia(i).Embalaje = CType([Enum].Parse(GetType(ProfactCartaPorte.c_TipoEmbalaje), "Item" & concep.Embalaje), ProfactCartaPorte.c_TipoEmbalaje) + ComCartaPorte.Mercancias.Mercancia(i).Embalaje = concep.Embalaje End If diff --git a/Bancos/IE.aspx b/Bancos/IE.aspx index 74dcf3c93..a707d96a5 100644 --- a/Bancos/IE.aspx +++ b/Bancos/IE.aspx @@ -1421,7 +1421,7 @@ diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index c28aae75d..28d3c6bbc 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -5702,10 +5702,11 @@ Partial Class Bancos_IE If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 0 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then DVGenerarComplementoModal.Visible = True End If - If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count = 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then + If ObjBancos.DtResultados.FiltraParametros(" Estatus IN (1,3) ").Rows.Count >= 1 And Tipo.ToUpper = "CARGO" And CveCliente > 0 And CveEstatusIE <> 2 Then DivCancelarComplemento.Visible = True GvComplementoPagos.Columns(7).Visible = True - If UsuarioActual.TienePermisoProceso(85) Then GvComplementoPagos.Columns(8).Visible = True + ' si tiene el permiso para eliminar IE o editar IE + If UsuarioActual.TienePermisoProceso(85) OrElse UsuarioActual.TienePermisoProceso(99) Then GvComplementoPagos.Columns(8).Visible = True End If GvComplementoPagos.DataSource = ObjBancos.DtResultados.FiltraParametros("", DistinctColumns:={"CveComplementoPago", "FolioFiscal", "Folio", "SerieFolio", "FechaComplemento", "Importe", "RFCReceptor", "StrEstatus", "FechaCancelacion", "Tipo", "Estatus", "CveIE", "CvePAC", "MotivoCancelacion"}) @@ -5745,9 +5746,6 @@ Partial Class Bancos_IE End If Else - e.Row.FCLinkButton("LnkCancelarComplemetno").Visible = False - e.Row.FCDropDownList("DdlMotivoCancelacion").Visible = False - If e.Row.DataKey("Estatus").ToEntero = 2 Then e.Row.FCLiteral("LtlMotivoCancelacion").Visible = True End If diff --git a/Bin/GoCfdi.dll b/Bin/GoCfdi.dll index 7dbd0787b..21ce57ca2 100644 Binary files a/Bin/GoCfdi.dll and b/Bin/GoCfdi.dll differ diff --git a/Bin/Profact.TimbraCFDI.dll b/Bin/Profact.TimbraCFDI.dll index b1c756dcf..9754ce481 100644 Binary files a/Bin/Profact.TimbraCFDI.dll and b/Bin/Profact.TimbraCFDI.dll differ diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index c20eb252e..30294692a 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -13940,7 +13940,7 @@ Partial Class Compras_Compras Protected Sub BtnRefacturacionVer_Click(sender As Object, e As EventArgs) Handles BtnRefacturacionVer.Click Dim Opcion As Integer = 1 - If UsuarioActual.CveEmpresa.Contiene(119, 1, 140) Then Opcion = 2 + If UsuarioActual.CveEmpresa.Contiene(119, 1, 140, 172, 173, 174) Then Opcion = 2 Dim ObjCompras As New ClsCompras diff --git a/Compras/Proveedores.aspx b/Compras/Proveedores.aspx index 715520321..4165a41c9 100644 --- a/Compras/Proveedores.aspx +++ b/Compras/Proveedores.aspx @@ -346,10 +346,11 @@
- - - - + + + + + diff --git a/Compras/ReembolsosComprobaciones.aspx.vb b/Compras/ReembolsosComprobaciones.aspx.vb index b28b694c0..b578e2ee8 100644 --- a/Compras/ReembolsosComprobaciones.aspx.vb +++ b/Compras/ReembolsosComprobaciones.aspx.vb @@ -280,18 +280,18 @@ Partial Class Compras_ReembolsosComprobaciones dt = dt.FiltraParametros(String.Format("CveMoneda = {0}", 1)) - If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then - dt = dt.FiltraParametros("CveTipoCuenta = 7") - End If - - 'cuando es layout - If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then - dt = dt.FiltraParametros("UsaLayout = 1") + If DdlTipoTransaccion.SelectedValue.ToEntero = 3 Then + dt = dt.FiltraParametros("CveTipoCuenta = 7") + End If + + 'cuando es layout + If DdlTipoTransaccion.SelectedValue.ToEntero = 9 Then + dt = dt.FiltraParametros("UsaLayout = 1") End If - If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then - dt = dt.FiltraParametros("UsaLayoutGrupos = 1") + If DdlTipoTransaccion.SelectedValue.ToEntero = 17 Then + dt = dt.FiltraParametros("UsaLayoutGrupos = 1") End If DdlCuenta.DataSource = dt @@ -774,6 +774,11 @@ Partial Class Compras_ReembolsosComprobaciones End If If MsgError = "" Then + + If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then + MsgError = "Detalle" + End If + If Not ChkReembolsarSinBancos.Checked AndAlso (Not HdnCheque.Value.ToEntero > 0 Or Not UsuarioActual.CveEmpresa.Contiene(119, 158)) Then 'Si es caja chica metemos el concepto 30, si es funcionario metemos 29 ImporteMovto += Pago.OtroGastoIngreso ' si ajuste, sedebe de aplicar en su contraparte @@ -781,10 +786,6 @@ Partial Class Compras_ReembolsosComprobaciones MsgError = "Detalle" End If End If - - If AplicaPrePolizaPagoCompra(CompraActual, Pago, CvePrePolizaPago, ObjMov) Then - MsgError = "Detalle" - End If End If Dim SaldoExcedente As Decimal = gvr.FCTextBox("TxtSaldoExcedente").Text.ToDecimal diff --git a/Compras/RepNotasCredito.aspx b/Compras/RepNotasCredito.aspx index 6bd25e703..95cfef677 100644 --- a/Compras/RepNotasCredito.aspx +++ b/Compras/RepNotasCredito.aspx @@ -39,25 +39,32 @@ -
-
-
-
    -
  • Proveedor: - +
    +
    +
    +
    +
    Proveedor:
    +
    + + <%-- - -
  • -
  • Estatus: + --%> +
+
Estatus: +
+
- -
  • Fecha I.
  • -
  • -
    +
    +
    + Fecha I: +
    +
    + +
    @@ -69,10 +76,13 @@ <%----%> <%----%> -
  • -
  • Fecha F.
  • -
  • -
    +
    +
    + Fecha Fin: + +
    +
    +
    @@ -84,8 +94,8 @@ <%----%> <%----%> -
  • - +
    +
    @@ -97,10 +107,10 @@ + CssClass="table table-striped table-advance table-hover Widthall ScrollAD" data-sort="true" GridLines="None" + DataKeyNames="CveCompra,Saldo,CveIE,CveProveedor,CvePersonal,CveMoneda,CveTipoConcepto,IdCtaContProveedores,IdCtaContExtranjera,IdCtaContComplementaria,TipoCambio,CveSubProyecto"> - + diff --git a/Compras/RepNotasCredito.aspx.vb b/Compras/RepNotasCredito.aspx.vb index e406e456b..b06371f16 100644 --- a/Compras/RepNotasCredito.aspx.vb +++ b/Compras/RepNotasCredito.aspx.vb @@ -20,8 +20,11 @@ Partial Class Compras_RepNotasCredito #End Region Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - DdlProveedores.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedores.DataBind() + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Todos" + DdlProveedores.SelectedValue = "-1" + TxtFechaSaldar.Text = Now.ToShortDateString CargaDatos() End If @@ -68,7 +71,7 @@ Partial Class Compras_RepNotasCredito Dim StrFiltro As New StringBuilder 'StrFiltro.AppendFormat(String.Format("Proveedor: {0}, Estatus: {1}", DdlProveedores.SelectedItem.Text, DdlOpcion.SelectedItem.Text)) ' If DdlTipoComprobante.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Tipo Documento: {0}", DdlTipoComprobante.SelectedItem.Text) - If DdlProveedores.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Proveedor: {0}", DdlProveedores.SelectedItem.Text) + If DdlProveedores.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Proveedor: {0}", DdlProveedores.SelectedText) If DdlOpcion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Estatus: {0}", DdlOpcion.SelectedItem.Text) If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio : {0}", txtFechaI.Text.ToDate.ToShortDateString) @@ -140,6 +143,7 @@ Partial Class Compras_RepNotasCredito ImporteMN = gr.DataKey("Saldo").ToDecimal.RoundSQL TCCompra = gr.DataKey("TipoCambio").ToDecimal CveMoneda = gr.DataKey("CveMoneda").ToEntero + Dim CveTipoConcepto = gr.DataKey("CveTipoConcepto").ToEntero If CveMoneda > 1 Then IdCtaContable = gr.DataKey("IdCtaContExtranjera").ToEntero @@ -148,6 +152,10 @@ Partial Class Compras_RepNotasCredito IdCtaContable = gr.DataKey("IdCtaContProveedores").ToEntero End If + Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, CveMoneda, False, CveTipoConcepto) + 'Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False) + + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, -Importe, "", 18, Concepto, TxtFechaSaldar.Text.ToDate, IdCtaContable, -1, gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, ImporteMX:=-If(CveMoneda > 1 AndAlso UsaComplementaria, Importe, ImporteMN), ImporteME:=-If(CveMoneda > 1, Importe, 0), CveCompra:=gr.DataKey("CveCompra").ToEntero, CveCompraAmortizacion:=gr.DataKey("CveCompra").ToEntero, TipoCambio:=TCCompra) Then MsgError = "Ocurrio un Error al saldar el movimiento" End If @@ -181,7 +189,7 @@ Partial Class Compras_RepNotasCredito End If Dim ImporteFluctuacion As Decimal = Math.Abs((Importe * difFluctuacion).RoundSQL) - If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, "", CveConceptoFluctua, Concepto, Now, IdCtaContableFluctua, -1, CveCompra:=gr.DataKey("CveCompra").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, TipoCambio:=TCCompra, TipoCambioPago:=TC, CveSubProyecto:=gr.DataKey("CveSubProyecto").ToEntero) Then MsgError = "Ocurrio un Error al saldar el movimiento" End If End If diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index df2ba8be4..55e1b78b0 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -181,7 +181,7 @@
    - + diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 24448b317..49bfae125 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -1042,7 +1042,7 @@ Partial Class ContabilidadC_RegPrePolizaS If tFolio.ToEntero = 0 Then tFolio = SiguienteFolioBancos(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero) - Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero).FiltroPrimeroValor("CveMoneda").ToEntero + Dim tCveMoneda As Integer = GlobalDTBancosCuentas(UsuarioActual.CveUsuario, CveCuenta:=DdlCuenta.SelectedValue.ToEntero, CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveMoneda").ToEntero CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, tFolio, @@ -1210,35 +1210,66 @@ Partial Class ContabilidadC_RegPrePolizaS ObjContabilidad.IniciaTransacSQL() Try - ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) - If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then - OcurrioError = True - End If - If DtMovimientosEliminar IsNot Nothing AndAlso DtMovimientosEliminar.Rows.Count > 0 Then - For Each RowEliminar As DataRow In DtMovimientosEliminar.Rows - If Not ObjContabilidad.RemovePrePolizasDetalle(Me.CvePrePoliza, RowEliminar("CvePrePolizaDetalle").ToString().ToEntero()) Then - OcurrioError = True - Exit For - End If - Next - End If + Dim Retorno As Boolean = ObjContabilidad.UpdatePrePoliza(MinFecha, -1, DdlTipoPoliza.SelectedValue.ToEntero, -1, CvePrePoliza, UsuarioActual.CveEmpresa, Concepto:=TxtConcepto.Text, FechaPoliza:=TxtFechaDocumento.Text.ToDate, CveUsuarioModifico:=UsuarioActual.CveUsuario) - If Not OcurrioError Then - Dim CveIEAgregado As Integer = -1 - For Each row As GridViewRow In GvPrePoliza.Rows - If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then - If row.FCCheckBox("chkModificado").Checked Then + If Retorno Then + If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then + OcurrioError = True + End If + + If DtMovimientosEliminar IsNot Nothing AndAlso DtMovimientosEliminar.Rows.Count > 0 Then + For Each RowEliminar As DataRow In DtMovimientosEliminar.Rows + If Not ObjContabilidad.RemovePrePolizasDetalle(Me.CvePrePoliza, RowEliminar("CvePrePolizaDetalle").ToString().ToEntero()) Then + OcurrioError = True + Exit For + End If + Next + End If + + If Not OcurrioError Then + Dim CveIEAgregado As Integer = -1 + For Each row As GridViewRow In GvPrePoliza.Rows + If row.DataKey("CvePrePolizaDetalle").ToEntero > 0 Then + If row.FCCheckBox("chkModificado").Checked Then + contador = contador + 1 + + Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal) + + If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then + Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL) + CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"), + row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", + False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CveIEAgregado < 0 Then + 'MsgError = "No se pudo registrar movimiento bancario" + OcurrioError = True + Exit For + End If + End If + + If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero, + row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, + row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), + CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, + CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, + CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then + OcurrioError = True + Exit For + End If + End If + Else contador = contador + 1 + Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal) If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL) CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"), - row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", - False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", + False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) If CveIEAgregado < 0 Then 'MsgError = "No se pudo registrar movimiento bancario" OcurrioError = True @@ -1246,50 +1277,26 @@ Partial Class ContabilidadC_RegPrePolizaS End If End If - If Not ObjContabilidad.UpdatePrePolizasDetalle(row.DataKey("CvePrePolizaDetalle").ToEntero, row.FCLiteral("TxtConcepto").Text, row.DataKey("CveSubProyecto").ToEntero, - row.DataKey("IdCtaContable").ToEntero, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, - row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), - CveConceptoContable:=row.DataKey("CveConceptoContable").ToEntero, CveProveedor:=row.DataKey("CveProveedor").ToEntero, CveCompra:=row.DataKey("CveCompra").ToEntero, - CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, - CvePersonal:=row.DataKey("CvePersonal").ToEntero, Referencia:=row.FCLiteral("TxtRef").Text, CveCuenta:=row.DataKey("CveCuenta").ToEntero, CveUsuarioModifico:=UsuarioActual.CveUsuario, CveIE:=CveIEAgregado) Then - OcurrioError = True - Exit For - End If - End If - Else - contador = contador + 1 - - - Dim ImporteIE As Decimal = If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal) - - If row.DataKey("CveConceptoContable").ToEntero = 30 AndAlso ImporteIE > 0 AndAlso row.DataKey("CveIE").ToDecimal <= 0 Then - Dim ObjIE As New ClsBancos(ObjContabilidad.IniciaTransacSQL) - CveIEAgregado = ObjIE.AddBancos_IE(row.DataKey("ContadoCuenta").ToEntero, row.DataKey("ContadoTipoTransaccion").ToEntero, TxtFechaDocumento.Text, row.DataKey("ContadoNumeroFolio"), - row.DataKey("ContadoBeneficiario"), ImporteIE, CveMoneda, 0, row.DataKey("ContadoObservaciones"), "", - False, False, 0, row.DataKey("CvePrePoliza").ToEntero, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CveIEAgregado < 0 Then - 'MsgError = "No se pudo registrar movimiento bancario" + If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, + row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString, + row.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now, + row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero, + CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), + ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, + row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero, + CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, + CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal, CveIE:=CveIEAgregado) Then OcurrioError = True Exit For End If End If - If Not ObjContabilidad.AddPrePolizasDetalle(CvePrePoliza, If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, False, True), If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, - row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), row.DataKey("Referencia").ToString, - row.DataKey("CveConceptoContable").ToEntero, row.FCLiteral("TxtConcepto").Text, Now, - row.DataKey("IdCtaContable").ToEntero, 0, CveSubProyecto:=row.DataKey("CveSubProyecto").ToEntero, - CveTipoGasto:=If(DdlTipoGasto.Visible, row.DataKey("CveTipoGasto").ToEntero, row.DataKey("CveTipoGasto").ToEntero), - ImporteMX:=If(row.FCLiteral("TxtCargo").Text.ToDecimal <> 0, - row.FCLiteral("TxtCargo").Text.ToDecimal, row.FCLiteral("TxtAbono").Text.ToDecimal), CveProveedor:=row.DataKey("CveProveedor").ToEntero, - CveCompra:=row.DataKey("CveCompra").ToEntero, CveCliente:=row.DataKey("CveCliente").ToEntero, CveVenta:=row.DataKey("CveVenta").ToEntero, - CvePersonal:=row.DataKey("CvePersonal").ToEntero, CveCuenta:=row.DataKey("CveCuenta").ToEntero, PorcentajeImpuesto:=row.DataKey("PorcentajeImpuesto").ToDecimal, CveIE:=CveIEAgregado) Then - OcurrioError = True - Exit For - End If - End If - - Next + Next + End If + Else + OcurrioError = True End If + Catch ex As Exception OcurrioError = True OnError("Ocurrío un error al actualizar la PrePoliza", ex) diff --git a/Contabilidad2/RepAnexoCatalogo.aspx b/Contabilidad2/RepAnexoCatalogo.aspx index 5710390e5..0b8a4c964 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx +++ b/Contabilidad2/RepAnexoCatalogo.aspx @@ -101,17 +101,17 @@
    -
    +
    Tipo
    -
    +
    -
    +
    Proyecto:
    @@ -123,10 +123,7 @@
    -
    - - -
    +
    diff --git a/Contabilidad2/RepAnexoCatalogo.aspx.vb b/Contabilidad2/RepAnexoCatalogo.aspx.vb index 616d9d695..8d064fb20 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogo.aspx.vb @@ -109,10 +109,6 @@ Partial Class AC2_RepAnexoCatalogo 'FechaInicio = Request("FI").ToDate FechaFin = Request("FF").ToDate DdlCuentas.SelectedValueExist(IdCuenta) - If DdlCuentas.SelectedValue.ToEntero <> -1 Then - 'RegistraScript("Enable();") - DdlTipoCuentas.SelectedValueExist(-2) - End If If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then FechaInicio = Request("FI").ToDate @@ -189,19 +185,13 @@ Partial Class AC2_RepAnexoCatalogo Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')") If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString 'DTCuentas = ObjTipoCuenta.DtResultados '.FiltraParametros("Afectable = 1") - DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')") DdlCuentas.DataSource = ObjTipoCuenta.DtResultados End If ObjTipoCuenta.Dispose() - DdlTipoCuentas.DataBind() - 'If strGlobal.Length > 0 Then DdlTipoCuentas.Items.Insert(0, New ListItem("Todas", strGlobal)) - DdlTipoCuentas.Items.Insert(0, New ListItem("Todas las Cuentas", "-1")) - DdlTipoCuentas.Items.Add(New ListItem("Algun específico", "-2")) - DdlTipoCuentas.SelectedValue = "-2" DdlCuentas.DataBind() - CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) + CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=divProyecto) End Sub @@ -323,25 +313,17 @@ Partial Class AC2_RepAnexoCatalogo End Sub Public Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - If DdlTipoCuentas.SelectedValue.ToEntero = -2 AndAlso DdlCuentas.SelectedValue.ToEntero = -1 Then + If DdlCuentas.SelectedValue.ToEntero = -1 Then Alert("El campo Cuenta es obligatorio.", TipoMensaje.MsgError) Else FechaInicio = If(txtFechaI.Text = "" Or txtFechaI.Text = "__/__/____", Date.Now, txtFechaI.Text.ToDate) FechaFin = If(txtFechaF.Text = "" Or txtFechaF.Text = "__/__/____", Date.Now, txtFechaF.Text.ToDate) - IdCuenta = If(DdlTipoCuentas.SelectedValue.ToEntero = -2, DdlCuentas.SelectedValue.ToEntero, DdlTipoCuentas.SelectedValue.ToEntero) - + IdCuenta = DdlCuentas.SelectedValue.ToEntero CargaDatos() End If 'RegistraScript("Enable();") End Sub - Protected Sub DdlTipoCuentas_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlTipoCuentas.SelectedIndexChanged - If DdlTipoCuentas.SelectedValue.ToEntero = -2 Then - DdlCuentas.Enabled = True - Else - DdlCuentas.Enabled = False - DdlCuentas.SelectedValueExist(-1) - End If - End Sub + Public Overrides Sub VerifyRenderingInServerForm(control As Control) diff --git a/Contabilidad2/RepBalanceGeneralHorizontal.aspx b/Contabilidad2/RepBalanceGeneralHorizontal.aspx index 54d5f2b59..07b44d2d0 100644 --- a/Contabilidad2/RepBalanceGeneralHorizontal.aspx +++ b/Contabilidad2/RepBalanceGeneralHorizontal.aspx @@ -113,7 +113,7 @@
    -
    +
    diff --git a/Contabilidad2/RepEstadoActividades.aspx b/Contabilidad2/RepEstadoActividades.aspx index ed4a8de04..24eae304f 100644 --- a/Contabilidad2/RepEstadoActividades.aspx +++ b/Contabilidad2/RepEstadoActividades.aspx @@ -52,11 +52,9 @@
    - -
    - Proyecto: -
    -
    + + Proyecto: +
    diff --git a/Contabilidad2/RepEstadoActividades.aspx.vb b/Contabilidad2/RepEstadoActividades.aspx.vb index e14be48d4..6d7b33fa3 100644 --- a/Contabilidad2/RepEstadoActividades.aspx.vb +++ b/Contabilidad2/RepEstadoActividades.aspx.vb @@ -117,7 +117,7 @@ Partial Class AC_RepEstadoActividades End If DdlPeriodo.SelectedValue = Now.Month.ToString - CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto) + CargarCentrosDeCosto(DdlProyecto, DdlSubproyecto, LblProyecto, LblSubProyecto, divProyecto:=DivProyecto) End Sub diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx index 78feef96d..2fc415eb8 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx @@ -44,11 +44,22 @@
    - - + + "><%--class="expand"--%> +
    +
    + Cuenta: +
    +
    + + + + + +
    Fecha Inicio:
    @@ -87,29 +98,35 @@ -
    - Cuenta: -
    -
    - - - - - -
    +
    - -
    -
    -
      -
    + +
    > +
    +
    + + + + + + + @@ -93,7 +131,7 @@
    - + N° @@ -107,6 +145,15 @@ + + + Cliente + + + + + + Asistencia diff --git a/RH/Asistencias.aspx.vb b/RH/Asistencias.aspx.vb index 62bdc408a..38a03b877 100644 --- a/RH/Asistencias.aspx.vb +++ b/RH/Asistencias.aspx.vb @@ -9,7 +9,7 @@ Partial Class RH_Asistencias If Not IsPostBack Then 'CargaClientes() - DdlCliente.Attributes.Add("onclick", "CargaClientes();") + 'DdlCliente.Attributes.Add("onclick", "CargaClientes();") CargaSuperioresOrganigrama() CargaProyecto() CargaTurnos() @@ -44,30 +44,31 @@ Partial Class RH_Asistencias End Sub #End Region - Private Sub CargaClientes() - Dim ObjClientes As New ClsClientes - If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then - DdlCliente.DataSource = ObjClientes.DtResultados - Else - DdlCliente.DataSource = Nothing - End If - ObjClientes.Dispose() - 'Application("GlobalDTResponsable") + 'Private Sub CargaClientes() + ' Dim ObjClientes As New ClsClientes + ' If ObjClientes.GetClientes(-1, "-1", "-1", "-1", "-1", "-1", "-1", -1, UsuarioActual.CveEmpresa, -1) Then + ' DdlCliente.DataSource = ObjClientes.DtResultados + ' Else + ' DdlCliente.DataSource = Nothing + ' End If + ' ObjClientes.Dispose() + ' 'Application("GlobalDTResponsable") - DdlCliente.DataBind() - End Sub + ' 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 + 'Protected Sub BtnCargarClientes_Click(sender As Object, e As System.EventArgs) Handles BtnCargarClientes.Click + ' 'CargaClientes() + ' 'DdlCliente.Attributes.Remove("onclick") + 'End Sub Private Sub CargaProyecto() 'DdlProyecto.DataSource = GlobalDTProyectos(UsuarioActual.Empresa.CveEmpresa).FiltraParametros("", DistinctColumns:={"CveProyecto", "Proyecto"}) 'DdlProyecto.DataBind() CargarCentrosDeCosto(DdlProyecto, DdlProyecto, LblProyectoAsignado, LblSubProyectoAsignado) - DivProyectosAsignado.Visible = LblProyectoAsignado.Visible + DivProyectosAsignado1.Visible = LblProyectoAsignado.Visible + DivProyectosAsignado2.Visible = LblProyectoAsignado.Visible DdlSubProyecto.DataSource = If(Not UsuarioActual.TienePermisoProceso(110), GlobalDTSubProyectosUsuarios(UsuarioActual.CveUsuario, -1, UsuarioActual.CveEmpresa, -1, 1), GlobalDTSubProyectos(-1, -1, UsuarioActual.CveEmpresa, 1)) @@ -220,7 +221,9 @@ Partial Class RH_Asistencias Dim OcurrioError As Boolean = False For Each Row As GridViewRow In GV.Rows - If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero, DdlCliente.SelectedValue.ToEntero, DdlSubProyecto.SelectedValue.ToEntero, TxtFechaAsistencia.Text.Trim.ToDate, + Dim CveCliente As Integer = Row.DataKey("CveCliente").ToEntero + + If Not ObjPersonal.AddAsistencia(Row.DataKey("CvePersonal").ToEntero, CveCliente, DdlSubProyecto.SelectedValue.ToEntero, txtFechaAsistencia.Text.Trim.ToDate, Row.FCDropDownList("DdlTipoAsistencias").SelectedValue.ToEntero, Row.FCTextBox("TxtPorPago").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasDobles").Text.Trim.ToDouble, Row.FCTextBox("TxtHorasTriples").Text.Trim.ToDouble, Row.FCDropDownList("DdlMotivoHoraExtra").SelectedValue.ToEntero, Row.FCTextBox("TxtObservaciones").Text.Trim, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then @@ -291,3 +294,4 @@ Partial Class RH_Asistencias End Sub End Class + diff --git a/RH/CatChecadores.aspx b/RH/CatChecadores.aspx index eda1ec2e2..b31922afe 100644 --- a/RH/CatChecadores.aspx +++ b/RH/CatChecadores.aspx @@ -96,6 +96,33 @@ + +
    +
    +
    +
    +
    + + + + + + + + + + + + + + +
    +
    + +
    +
    -
    -
    - -    -
    -
    +
    +
    +
    + +    +