diff --git a/AF/AF.aspx b/AF/AF.aspx index eba0ec925..f239e34fc 100644 --- a/AF/AF.aspx +++ b/AF/AF.aspx @@ -54,7 +54,9 @@ - + + +
@@ -201,7 +203,7 @@
- + @@ -211,7 +213,15 @@
-
+
+
+
+
MN
+
+
+
+
+
@@ -311,17 +321,23 @@
- -
+ +
+ + + + + + + + + + + + - - - - - - - -
+
+
@@ -628,6 +644,44 @@
+ + + + @@ -1011,6 +1065,7 @@
+
@@ -1409,7 +1464,7 @@ - + diff --git a/AF/AF.aspx.vb b/AF/AF.aspx.vb index 5db814ec3..257f9a37d 100644 --- a/AF/AF.aspx.vb +++ b/AF/AF.aspx.vb @@ -932,8 +932,8 @@ Partial Class AF_AF TxtCodigo.Text = ObjActivoFijo.Codigo TxtValorCompra.Text = ObjActivoFijo.ValorCompra.ToString.FormatoNumero TxtFechaCompra.Text = ObjActivoFijo.FechaCompra.ToShortDateString - - + TxtValorCompraMN.Text = ObjActivoFijo.ValorCompraMN.ToString.FormatoNumero + If ObjActivoFijo.ValorCompra <> ObjActivoFijo.ValorCompraMN Then DivValorCompraMN.visible = True TxtFechaBaja.Text = If(ObjActivoFijo.FechaBaja = New Date(1900, 1, 1), "", ObjActivoFijo.FechaBaja.ToString("dd/MM/yyyy")) @@ -3152,13 +3152,15 @@ Partial Class AF_AF Private Sub CargaCuentasConceptos() Dim ObjConta As New ClsContabilidad If ObjConta.GetCuentasConceptos(10, UsuarioActual.CveEmpresa, CveAF:=CveActivoFijo) Then + BtnVincularCuenta.Visible = ObjConta.DtResultados.Rows.Count = 0 GvCta.DataSource = ObjConta.DtResultados divCuentas.Visible = True End If ObjConta.Dispose() GvCta.DataBind() - End Sub + End Sub + Private Sub ActivarRegistroCuentaAF() If DdlCtaContable.SelectedValue.ToEntero <= 0 And UsuarioActual.Empresa.Funcionalidad(221).ToEntero > 0 Then BtnCtaContable.Visible = True @@ -4878,15 +4880,10 @@ Partial Class AF_AF DT_PlgaEfermedad.AcceptChanges() - - End If ErrorProceso = False End If - - - If Not ErrorProceso Then RegistraScript("$('#DVModalPlagaEnfermedad').modal('hide');") Alert("Plaga Enfermedad guardada Correctamente.") @@ -4895,9 +4892,51 @@ Partial Class AF_AF End Sub + Private Sub BtnVincularCuenta_Click(sender As Object, e As EventArgs) Handles BtnVincularCuenta.Click + RegistraScript("$('#ModalContaCuenta').modal('show');") + DdlContaCuenta.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa, Afectable:=1) + DdlContaCuenta.DataBind() + End Sub + #End Region + Protected Sub BtnCuentaAsociar_Click(sender As Object, e As EventArgs) + Dim ObjConta As New ClsContabilidad + ObjConta.IniciaTransacSQL() + Dim ErrorString As String = "" + If HdnCveCuentaAsignacion.Value.ToEntero <= 0 Then + If Not ObjConta.AddCuentasAsignaciones(49, UsuarioActual.CveEmpresa, DdlContaCuenta.SelectedValue.ToEntero, CveActivoFijo:=CveActivoFijo) Then + ErrorString = "Error al agregar" + End If + ElseIf HdnCveCuentaAsignacion.Value.ToEntero > 0 Then + If Not ObjConta.UpdateCuentasAsignaciones(HdnCveCuentaAsignacion.Value.ToEntero, 49, DdlContaCuenta.SelectedValue.ToEntero, CveActivoFijo:=CveActivoFijo) Then + ErrorString = "Error al actualizar" + End If + End If + If ErrorString.Length > 0 Then + ObjConta.RollBack() + Alert(ErrorString) + Else + ObjConta.Commit() + CargaCuentasConceptos() + UPG.Update() + RegistraScript("$('#ModalContaCuenta').modal('hide');") + Alert("Agregado correctamente") + End If + ObjConta.Dispose() + End Sub + Protected Sub ActualizaContaCuenta(sender As Object, e As EventArgs) + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + Dim CveConceptoContable As Integer = GvRow.DataKey("CveConceptoContable").ToString.ToEntero + HdnCveCuentaAsignacion.Value = GvRow.DataKey("CveCuentaAsignacion").ToString + DdlContaCuenta.DataSource = GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa, Afectable:=1) + DdlContaCuenta.DataBind() + DdlContaCuenta.SelectedValue = GvRow.DataKey("CveCuenta").ToString + + RegistraScript("$('#ModalContaCuenta').modal('show');") + + End Sub End Class \ No newline at end of file diff --git a/AF/CatAF.aspx b/AF/CatAF.aspx index c7a483fa0..34ad4ee76 100644 --- a/AF/CatAF.aspx +++ b/AF/CatAF.aspx @@ -207,26 +207,25 @@ - - + - + - + - + @@ -244,7 +243,7 @@ - + @@ -260,14 +259,7 @@ - - - - - - - - + diff --git a/App_Code/ClsAF.vb b/App_Code/ClsAF.vb index 3f163880d..ba5876989 100644 --- a/App_Code/ClsAF.vb +++ b/App_Code/ClsAF.vb @@ -44,6 +44,7 @@ Public Class ClsAF Public Property Descripcion As String Public Property CveCompra As Integer Public Property ValorCompra As Double + Public Property ValorCompraMN As Double Public Property FechaCompra As Date Public Property FechaBaja As Date Public Property CuentaInicial As Integer @@ -573,7 +574,7 @@ Public Class ClsAF Return Retorno End Function - Public Function UpdateActivosFijosCompra(CveActivoFijo As Integer, CveCompraDetalle As Integer, TipoAF As Integer, ValorCompra As Double, FechaCompra As Date, Optional Opcion As Integer = 1) As Boolean + Public Function UpdateActivosFijosCompra(CveActivoFijo As Integer, CveCompraDetalle As Integer, TipoAF As Integer, ValorCompra As Double, ValorCompraMN As Double, FechaCompra As Date, Optional Opcion As Integer = 1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_AF_ActivosFijosCompraUpdate") @@ -582,7 +583,8 @@ Public Class ClsAF .Add("@CveActivoFijo", SqlDbType.Int).Value = CveActivoFijo .Add("@CveCompraDetalle", SqlDbType.Int).Value = CveCompraDetalle .Add("@TipoAF", SqlDbType.Int).Value = TipoAF - .Add("@ValorCompra", SqlDbType.Float).Value = ValorCompra + .Add("@ValorCompra", SqlDbType.Money).Value = ValorCompra + .Add("@ValorCompraMN", SqlDbType.Money).Value = ValorCompraMN .Add("@FechaCompra", SqlDbType.Date).Value = FechaCompra .Add("@Opcion", SqlDbType.Int).Value = Opcion ' Opcion 1 es la actualiacion normal , opcion 2 Desvicula los AF en base a la CveComrpaDetalle(en tabla AF_ActivosFijos pone el campo CveComrpaDetalle en null en base a CveComrpaDetalle ) End With diff --git a/App_Code/ClsBancos.vb b/App_Code/ClsBancos.vb index ba2901f1a..ab3e713ef 100644 --- a/App_Code/ClsBancos.vb +++ b/App_Code/ClsBancos.vb @@ -1944,7 +1944,7 @@ Public Class ClsBancos Return Retorno End Function - Public Function GetIngresoEgresosDelDia(Fecha As Date, Tipo As String, CveEmpresa As Integer) As Boolean + Public Function GetIngresoEgresosDelDia(Fecha As Date, Tipo As String, Opcion As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Banc_IngresoEgresosDiariosGet") @@ -1952,7 +1952,7 @@ Public Class ClsBancos .Add("@Fecha", SqlDbType.Date).Value = Fecha .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@Tipo", SqlDbType.VarChar).Value = Tipo 'Ing Ingresp Egs Egreso - '.Add("@Opcion", SqlDbType.VarChar).Value = Opcion ' 1 Bancos 2 caja chica + .Add("@Opcion", SqlDbType.VarChar).Value = Opcion End With Try diff --git a/App_Code/ClsFinanzas.vb b/App_Code/ClsFinanzas.vb index 362342b40..b5cb2e91a 100644 --- a/App_Code/ClsFinanzas.vb +++ b/App_Code/ClsFinanzas.vb @@ -363,6 +363,30 @@ Public Class ClsFinanzas Return Retorno End Function + Public Function GetEstadoFlujoEfectivoRep(CveProyecto As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, CveUsuario As Integer, Tipo As Integer, Periodo As Integer, Fechas As String, Opcion As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Finan_RF_EstadoFlujoEfectivoRepGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveProyecto", SqlDbType.Int).Value = CveProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Periodo", SqlDbType.Int).Value = Periodo + .Add("@Fechas", SqlDbType.VarChar).Value = Fechas + .Add("@Opcion", SqlDbType.Int).Value = Opcion + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al consultar el Reporte de Estado de Flujo de Efectivo.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + #Region "RazonesFinancierasCuentas" Public Function AddRazonesFinancierasCuentas(CveRazonFinancieraConcepto As Integer, CveCuenta As Integer, CveEmpresa As Integer, CveUsuario As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 9292e9dab..8dfcc177b 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6702,11 +6702,17 @@ Public Class ClsPaginas Dim ImgCBB As String Dim RutaFormato As String = String.Format("{0}Formatos\Nomina.rdlc", RutaEmpresa) Dim RutaFormatoDefault As String = String.Format("Empresas\Grales\Formatos\Nomina.rdlc") + Dim CFDIVersion As String = "" + Dim UsoCFDI As String = "" + + + 'SI ESTA TIMBRADA - CON XML If System.IO.File.Exists(PathXML) Then Dim XmlDoc As New System.Xml.XmlDocument 'XmlDoc.Load(Ruta & "XML\\Nomina\NOM A-3845.xml") XmlDoc.Load(PathXML) + If ValorNodoXML(XmlDoc.DocumentElement, "version").Contiene("3.3", "4.0") Then FechaEmision = XmlDoc.DocumentElement.Attributes("Fecha").InnerText.ToDate NoSerieCertificadoContribuyente = XmlDoc.DocumentElement.Attributes("NoCertificado").InnerText @@ -6733,6 +6739,27 @@ Public Class ClsPaginas Next End If + + + Try + CFDIVersion = ValorNodoXML(XmlDoc.DocumentElement, "version") + + + Dim nsManager As New XmlNamespaceManager(XmlDoc.NameTable) + nsManager.AddNamespace("cfdi", If(CFDIVersion = "4.0", "http://www.sat.gob.mx/cfd/4", "http://www.sat.gob.mx/cfd/3")) + + Dim receptorNode As XmlNode = XmlDoc.SelectSingleNode("/cfdi:comprobante/cfdi:emisor/cfdi:receptor", nsManager) + + If receptorNode IsNot Nothing Then + UsoCFDI = ValorNodoXML(receptorNode, "usocfdi") + UsoCFDI = GlobalDTSATUsosCFDI(-1, "-1").FiltroPrimeroValor("UsoCFDIDescripcion", $" UsoCFDI = '{UsoCFDI}' ") + End If + + + Catch ex As Exception + + End Try + 'SIN TIMBRAR - SIN XML Else FolioFiscal = "Sin Timbrar" @@ -6860,6 +6887,9 @@ Public Class ClsPaginas RptParametro.Add(New ReportParameter("CadenaOriginal", CadenaOriginalCFD)) RptParametro.Add(New ReportParameter("QR", ImgCBB.ToString)) + RptParametro.Add(New ReportParameter("CFDIVersion", CFDIVersion)) + RptParametro.Add(New ReportParameter("UsoCFDI", UsoCFDI)) + Dim LSRds As New List(Of ReportDataSource) Dim rds2 = New ReportDataSource() diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 64289248f..45b574d7b 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -3908,7 +3908,8 @@ Namespace Modelos Dim CvePS = RowGarantia("CvePS").ToString().ToEntero() Dim CveTamaño As Integer = RowGarantia("CveTamaño").ToString().ToEntero() Dim CveUM As Integer = RowGarantia("CveUnidadMedida").ToString().ToEntero() - Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble() + Dim PU As Decimal = 0 ' el valor de garántía debe de ser cero, tema contable + ' Dim PU As Decimal = RowGarantia("Importe").ToString().ToDecimal() ' / RowGarantia("Cantidad").ToString().ToDouble() Dim Serie As String = RowGarantia("Comprobante").ToString If Not ObjInventario.AddMovimientoDetalle(CveMovimientoGarantia, RowGarantia("Cantidad").ToString().ToDouble(), CveUM, CvePS, PU, Serie:=Serie, CveVentaDetalle:=IIf(RowGarantia("MismoCvePS").ToString = "1", RowGarantia("CveVentaDetalle"), -1).ToString.ToEntero) Then diff --git a/App_Code/Timbrado.vb b/App_Code/Timbrado.vb index d6d8c9bc3..aa758b05f 100644 --- a/App_Code/Timbrado.vb +++ b/App_Code/Timbrado.vb @@ -10,6 +10,7 @@ Imports System.Xml Imports System.Xml.Serialization Imports Extensiones Imports Newtonsoft.Json.Linq +Imports Profact.TimbraCFDI33.Complementos Imports ProfactCartaPorte = Profact.TimbraCFDI33.Complementos.CartaPorte20 @@ -222,6 +223,11 @@ Public Class Timbrado ValidaFactura = False End If + 'TEMPORAL. PARCHE PARA CANCELAR DOCUMENTOS EMITIDOS CON EL PAC 5 + If CvePACCancelacion = 5 Then + CvePACCancelacion = 4 + End If + If Not (Empresa.Funcionalidad(529) = "1") Then If ValidaFactura Then Dim Vigencia = VerificarVigenciaSAT(FolioFiscal, RFCEmisor, RFCReceptor, Total.ToString(), True) @@ -551,8 +557,8 @@ Public Class Timbrado resp = conector.ObtieneCFDI(RFCEmisor, FolioFiscal) MsgCancelacion.AppendFormat("-3.3") - 'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE - If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError = "202" Then + 'VERIFICA SI SE CANCELO O FUE CANCELADO PREVIAMENTE (CODIGO DE ERROR "330279") + If resultadoCancelacion.Exitoso OrElse resultadoCancelacion.NumeroError.Contiene("202", "330279") Then MsgCancelacion.AppendFormat("-3.4") CancelacionMensaje = resultadoCancelacion.Descripcion Dim xmlDoc As New System.Xml.XmlDocument() @@ -1254,13 +1260,13 @@ Public Class Timbrado Case 4 Dim Ret As String = TimbrarFacturaGoCFDIv40(Ventas, UsuarioActual, CvePACEspecial) - If Ret <> "" Then MensajeErrorCFDI = Ret + If Ret <> "" Then MensajeErrorCFDI = Ret Retorno = If(Ret = "", True, False) Case 5 Dim Ret As String = TimbrarFacturaPADEv40(Ventas, UsuarioActual, CvePACEspecial) - If Ret <> "" Then MensajeErrorCFDI = Ret + If Ret <> "" Then MensajeErrorCFDI = Ret Retorno = If(Ret = "", True, False) @@ -1323,7 +1329,7 @@ Public Class Timbrado AmbienteProductivo = False Clave = "12345678a" EmisorRFC = "EKU9003173C9" - UsuarioActual.Empresa.Empresa = "ESCUELA KEMPER URGATE" + EmisorNombre = "ESCUELA KEMPER URGATE" ArchivoLLave = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.key" ArchivoCertificado = $"{UsuarioActual.Empresa.Ruta}Certificados\EKU9003173C9.cer" UsuarioActual.Empresa.CodigoRegimenFiscal = "601" @@ -1400,11 +1406,9 @@ Public Class Timbrado If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") Then comprobante.CondicionesDePago = ObjCFDITimbre.Comprobante.CondicionesdePago comprobante.SubTotal = ObjCFDITimbre.Comprobante.SubTotal.RoundSQL(NumDecimalesImporte) - If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") Then - If ObjCFDITimbre.Comprobante.Descuentos > 0 Then - comprobante.DescuentoSpecified = True - comprobante.Descuento = ObjCFDITimbre.Comprobante.Descuentos.RoundSQL(NumDecimalesImporte) - End If + If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") AndAlso ObjCFDITimbre.Comprobante.Descuentos > 0 Then + comprobante.DescuentoSpecified = True + comprobante.Descuento = ObjCFDITimbre.Comprobante.Descuentos.RoundSQL(NumDecimalesImporte) End If comprobante.Moneda = ObjCFDITimbre.Comprobante.Moneda comprobante.TipoCambio = ObjCFDITimbre.Comprobante.TipoCambio.ToDecimal @@ -1463,21 +1467,19 @@ Public Class Timbrado Dim k As Integer = 0 For Each concep As CFDIConceptos In ObjCFDITimbre.Conceptos comprobante.Conceptos(i) = New Profact.TimbraCFDI40.ComprobanteConcepto() - comprobante.Conceptos(i).Cantidad = concep.Cantidad + comprobante.Conceptos(i).Cantidad = concep.Cantidad.RoundSQL(6) If concep.Unidad <> "" Then comprobante.Conceptos(i).Unidad = concep.Unidad comprobante.Conceptos(i).ClaveUnidad = concep.ClaveUnidad comprobante.Conceptos(i).Descripcion = concep.Descripcion - comprobante.Conceptos(i).ValorUnitario = concep.ValorUnitario.RoundSQL(6) - comprobante.Conceptos(i).Importe = concep.Importe.RoundSQL(NumDecimalesImporte) + comprobante.Conceptos(i).ValorUnitario = Decimal.Parse(concep.ValorUnitario.ToString("0.00####")) ' formateo forzoso, ej,2543.1 + comprobante.Conceptos(i).Importe = Decimal.Parse(concep.Importe.RoundSQL(NumDecimalesImporte).ToString("0.00")) ' formateo forzoso, ej,2543.1 comprobante.Conceptos(i).ClaveProdServ = concep.ClaveProdServ comprobante.Conceptos(i).ObjetoImp = concep.ObjetoImpuesto - If ObjCFDITimbre.Comprobante.TipoComprobante <> "P" Then - If concep.Descuento > 0 Then - comprobante.Conceptos(i).Descuento = concep.Descuento - comprobante.Conceptos(i).DescuentoSpecified = True - End If + If ObjCFDITimbre.Comprobante.TipoComprobante.Contiene("I", "E", "N") AndAlso concep.Descuento > 0 Then + comprobante.Conceptos(i).Descuento = concep.Descuento + comprobante.Conceptos(i).DescuentoSpecified = True End If If concep.Noidentificacion <> "" Then comprobante.Conceptos(i).NoIdentificacion = concep.Noidentificacion @@ -1962,7 +1964,7 @@ Public Class Timbrado Dim xmlComp As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(ComPag, GetType(Profact.TimbraCFDI40.Complementos.Pagos20.Pagos), nsComp) Dim docComp As New XmlDocument() docComp.LoadXml(xmlComp) - 'comprobante.PagosSpecified = True + comprobante.Pagos20Specified = True LXmlComplementos.Add(docComp.DocumentElement) TieneComplemento = True End If @@ -1981,7 +1983,8 @@ Public Class Timbrado ComCartaPorte.TranspInternac = CType([Enum].Parse(GetType(ProfactCartaPorte.CartaPorteTranspInternac), Carta.TranspInternac), ProfactCartaPorte.CartaPorteTranspInternac) ComCartaPorte.EntradaSalidaMercSpecified = False ComCartaPorte.ViaEntradaSalidaSpecified = False - ComCartaPorte.TotalDistRecSpecified = False + ComCartaPorte.TotalDistRecSpecified = True + ComCartaPorte.TotalDistRec = Carta.TotalDistanciaRecorrida 'UBICACIONES If Carta.Ubicaciones IsNot Nothing AndAlso Carta.Ubicaciones.Count > 0 Then @@ -2003,10 +2006,11 @@ Public Class Timbrado 'ComCartaPorte.Ubicaciones(i).NavegacionTrafico = ubica.NavegacionTrafico ComCartaPorte.Ubicaciones(i).FechaHoraSalidaLlegada = ubica.FechaHoraSalidaLlegada.ToDate ComCartaPorte.Ubicaciones(i).DistanciaRecorrida = ubica.DistanciaRecorrida + ComCartaPorte.Ubicaciones(i).DistanciaRecorridaSpecified = ubica.DistanciaRecorrida > 0 ComCartaPorte.Ubicaciones(i).Domicilio = New ProfactCartaPorte.CartaPorteUbicacionDomicilio With {.Calle = ubica.Domicilio.Calle, .Colonia = ubica.Domicilio.Colonia, - .Localidad = ubica.Domicilio.Localidad, + .Localidad = If(ubica.Domicilio.Localidad <> "", ubica.Domicilio.Localidad, Nothing), .Municipio = ubica.Domicilio.Municipio, .Estado = ubica.Domicilio.Estado, .CodigoPostal = ubica.Domicilio.CP, @@ -2027,7 +2031,7 @@ Public Class Timbrado ComCartaPorte.Mercancias.PesoNetoTotal = Carta.Mercancias.PesoNetoTotal.ToDecimal ComCartaPorte.Mercancias.NumTotalMercancias = Carta.Mercancias.NumTotalMercancias ComCartaPorte.Mercancias.CargoPorTasacion = Carta.Mercancias.CargoporTasacion.ToDecimal - ' ComCartaPorte.Mercancias.UnidadPeso = Carta.Mercancias.UnidadPeso + ComCartaPorte.Mercancias.UnidadPeso = ProfactCartaPorte.c_ClaveUnidadPeso.KGM If Carta.Mercancias IsNot Nothing AndAlso Carta.Mercancias.Mercancias.Count > 0 Then Dim i As Integer = 0 @@ -2042,9 +2046,12 @@ Public Class Timbrado ComCartaPorte.Mercancias.Mercancia(i).Descripcion = concep.Descripción ComCartaPorte.Mercancias.Mercancia(i).Cantidad = concep.Cantidad ComCartaPorte.Mercancias.Mercancia(i).Unidad = concep.Unidad + ComCartaPorte.Mercancias.Mercancia(i).ClaveUnidad = concep.ClaveUnidad If concep.Dimensiones <> "" Then ComCartaPorte.Mercancias.Mercancia(i).Dimensiones = concep.Dimensiones If concep.ClaveMaterialPeligroso <> "" Then + ComCartaPorte.Mercancias.Mercancia(i).MaterialPeligroso = ProfactCartaPorte.CartaPorteMercanciasMercanciaMaterialPeligroso.Sí ComCartaPorte.Mercancias.Mercancia(i).MaterialPeligrosoSpecified = True + ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligroso = concep.ClaveMaterialPeligroso ComCartaPorte.Mercancias.Mercancia(i).CveMaterialPeligrosoSpecified = True 'si lleva material pelgroso, debe llevar embalaje ComCartaPorte.Mercancias.Mercancia(i).EmbalajeSpecified = True @@ -2130,18 +2137,23 @@ Public Class Timbrado ComCartaPorte.FiguraTransporte(i).RFCFigura = concep.RFCFigura ComCartaPorte.FiguraTransporte(i).NumLicencia = concep.NumLicencia ComCartaPorte.FiguraTransporte(i).NombreFigura = concep.NombreFigura + ComCartaPorte.FiguraTransporte(i).TipoFigura = concep.TipoFigura If concep.NumRegidTribFigura <> "" Then ComCartaPorte.FiguraTransporte(i).NumRegIdTribFigura = concep.NumRegidTribFigura 'OComCartaPorte.FiguraTransporte.Operadores(i)(0) = concep.ResidenciaFiscalOperador 'falta - ComCartaPorte.FiguraTransporte(i).Domicilio = New ProfactCartaPorte.CartaPorteTiposFiguraDomicilio() - ComCartaPorte.FiguraTransporte(i).Domicilio.Calle = concep.Domicilio.Calle - ComCartaPorte.FiguraTransporte(i).Domicilio.CodigoPostal = concep.Domicilio.CP - ComCartaPorte.FiguraTransporte(i).Domicilio.Colonia = concep.Domicilio.Colonia - ComCartaPorte.FiguraTransporte(i).Domicilio.Estado = concep.Domicilio.Estado - If concep.Domicilio.Localidad <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.Localidad = concep.Domicilio.Localidad - ComCartaPorte.FiguraTransporte(i).Domicilio.Municipio = concep.Domicilio.Municipio - If concep.Domicilio.NumeroExterior <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.NumeroExterior = concep.Domicilio.NumeroExterior - ComCartaPorte.FiguraTransporte(i).Domicilio.Pais = ProfactCartaPorte.c_Pais.MEX + If concep.TipoFigura.Contiene("02", "03") Then ' “02”- Propietario o “03” -Arrendador + ComCartaPorte.FiguraTransporte(i).Domicilio = New ProfactCartaPorte.CartaPorteTiposFiguraDomicilio() + ComCartaPorte.FiguraTransporte(i).Domicilio.Calle = concep.Domicilio.Calle + If concep.Domicilio.NumeroInterior <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.NumeroInterior = concep.Domicilio.NumeroInterior + ComCartaPorte.FiguraTransporte(i).Domicilio.CodigoPostal = concep.Domicilio.CP + If concep.Domicilio.Colonia <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.Colonia = concep.Domicilio.Colonia + ComCartaPorte.FiguraTransporte(i).Domicilio.Estado = concep.Domicilio.Estado + If concep.Domicilio.Localidad <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.Localidad = concep.Domicilio.Localidad + ComCartaPorte.FiguraTransporte(i).Domicilio.Municipio = concep.Domicilio.Municipio + If concep.Domicilio.NumeroExterior <> "" Then ComCartaPorte.FiguraTransporte(i).Domicilio.NumeroExterior = concep.Domicilio.NumeroExterior + ComCartaPorte.FiguraTransporte(i).Domicilio.Pais = ProfactCartaPorte.c_Pais.MEX + + End If i += 1 Next @@ -2150,11 +2162,11 @@ Public Class Timbrado End If Dim nsComp As New System.Xml.Serialization.XmlSerializerNamespaces() - nsComp.Add("CartaPorte", "http://www.sat.gob.mx/CartaPorte") + nsComp.Add("cartaporte20", "http://www.sat.gob.mx/CartaPorte20") Dim xmlComp As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(ComCartaPorte, GetType(ProfactCartaPorte.CartaPorte), nsComp) Dim docComp As New XmlDocument() docComp.LoadXml(xmlComp) - 'comprobante.CartaPorteSpecified = True + comprobante.CartaPorte20Specified = True LXmlComplementos.Add(docComp.DocumentElement) TieneComplemento = True @@ -2318,6 +2330,7 @@ Public Class Timbrado Dim xmlNom As String = Profact.TimbraCFDI.XMLUtilerias.SerializaObjeto(Nom, GetType(Profact.TimbraCFDI33.Complementos.Nomina12.Nomina), nsNom) Dim docNom As New XmlDocument() docNom.LoadXml(xmlNom) + comprobante.Nomina12Specified = True LXmlComplementos.Add(docNom.DocumentElement) TieneComplemento = True @@ -2327,8 +2340,6 @@ Public Class Timbrado #End Region - - If TieneComplemento Then comprobante.Complemento = New Profact.TimbraCFDI40.ComprobanteComplemento comprobante.Complemento.Any = LXmlComplementos.ToArray() @@ -2340,12 +2351,7 @@ Public Class Timbrado sw.Start() #Region "Genera XML" - ' Try - ' cfdi.GenerarXMLBase64(llaveBase64, Clave) - ' cfdi.EscribirXML(cfdi.Xml, RutaArchivo, NombreArchivoXML) - ' Catch ex As Exception - ' End Try '//Timbramos el CFDI por medio del conector y guardamos resultado Dim resultadoTimbre As Profact.TimbraCFDI.ResultadoTimbre = Nothing @@ -2356,6 +2362,15 @@ Public Class Timbrado swmili = sw.ElapsedMilliseconds sw.Start() + Dim xmlPrevio As String + Using sww As New System.IO.StringWriter() + Dim xs As XmlSerializer + xs = New System.Xml.Serialization.XmlSerializer(GetType(Profact.TimbraCFDI40.Comprobante)) + xs.Serialize(sww, comprobante) + xmlPrevio = sww.ToString() + End Using + + #Region "Timbra" resultadoTimbre = cfdi.TimbraCFDI(comprobante) #End Region @@ -2418,13 +2433,22 @@ Public Class Timbrado End If If ObjCFDITimbre.Comprobante.TipoComprobante = "T" Then - Dim ObjInv As New ClsInventarios() - If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then + Dim objGrales As New ClsGenerales + If objGrales.UpdateTimbreTimbrado(Ventas.CveTimbre, FolioFiscal, ObjCFDITimbre.Comprobante.Fecha, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, UsuarioActual.Empresa.CvePAC, "4.0") Then Retorno = "" Else Retorno = "Error" End If - ObjInv.Dispose() + objGrales.Dispose() + + Using ObjInv As New ClsInventarios() + If ObjInv.UpdateMovimientoTimbrado(Ventas.Inv_CveMovimiento, 1, FolioFiscal, MinFecha) Then + Retorno = "" + Else + Retorno = "Error" + End If + End Using + End If 'Pendiente. Ruta guardar archivos @@ -2437,8 +2461,6 @@ Public Class Timbrado Else Retorno = "No se pudo timbrar ante el SAT. UUID no generado." End If - - Else If Not String.IsNullOrEmpty(resultadoTimbre.Detalle) Then @@ -2447,13 +2469,18 @@ Public Class Timbrado If Resultados.Count > 0 Then If resultadoTimbre.Descripcion.Contains("RFC del receptor no existe") Then - Retorno = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente" - MensajeErrorCFDI = $"El RFC { Resultados(0)("Value").ToString() } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente" + Retorno = $"El RFC { Resultados(0)("Value") } no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente" + MensajeErrorCFDI = $"El RFC { Resultados(0)("Value")} no existe en las bases de datos publicadas por el SAT, corrobore este dato con su cliente" Else Dim sbMsg As New StringBuilder + Dim sbMsgLog As New StringBuilder + sbMsgLog.Append(xmlPrevio) + sbMsgLog.Append("------------") For Each msg In Resultados sbMsg.AppendFormat("{0}.
", msg("Value")) + sbMsgLog.AppendFormat("{0}-{1}
", msg("Key"), msg("Value")) Next + sbMsgLog.ToString.GuardaLog() Retorno = sbMsg.ToString() MensajeErrorCFDI = Retorno End If diff --git a/Bancos/Creditos.aspx.vb b/Bancos/Creditos.aspx.vb index 2881e1602..0daef0a88 100644 --- a/Bancos/Creditos.aspx.vb +++ b/Bancos/Creditos.aspx.vb @@ -1,6 +1,7 @@ Option Strict On Option Explicit On +Imports System.Activities.Expressions Imports System.Data Imports System.Windows.Forms.VisualStyles.VisualStyleElement Imports Extensiones @@ -361,7 +362,7 @@ Partial Class Bancos_Creditos End Sub Private Sub CargaCreditoComplejo() Dim ObjCreditos As New ClsBancos - Dim ObjPrepoliza As New ClsContabilidad + 'Dim ObjPrepoliza As New ClsContabilidad If ObjCreditos.GetCreditos(CveCredito, -1, -1, -1, -1, UsuarioActual.CveEmpresa) Then If ObjCreditos.DtResultados.Rows.Count > 0 Then @@ -424,9 +425,9 @@ Partial Class Bancos_Creditos HLSaldoPrePoliza.NavigateUrl = $"/Contabilidad/RegPrePoliza.aspx?CvePrePoliza={ObjCreditos.CvePrePoliza}" LbSaldo.Text = $"Saldo Acreedor " - If ObjPrepoliza.GetPrePolizasDetalle(ObjCreditos.CvePrePoliza, UsuarioActual.CveEmpresa) AndAlso ObjPrepoliza.DtResultados.Rows.Count > 0 Then - LbSaldoAcreedor.Text = ObjPrepoliza.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 42").FormatoNumero - LbSaldoDocxPagar.Text = ObjPrepoliza.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 50").FormatoNumero + If ObjCreditos.GetBancosIEMovimientos(dr("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) AndAlso ObjCreditos.DtResultados.Rows.Count > 0 Then + LbSaldoAcreedor.Text = ObjCreditos.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 42").FormatoNumero + LbSaldoDocxPagar.Text = ObjCreditos.DtResultados.FiltroPrimeroValor("Importe", "CveConceptoContable = 50").FormatoNumero End If Else @@ -471,12 +472,12 @@ Partial Class Bancos_Creditos End If 'CARGA ANTICIPOS - If dr("CveIE").ToString.ToEntero > 0 AndAlso ObjPrepoliza.GetPrePolizasDetalle(-1, UsuarioActual.CveEmpresa, CveIE:=dr("CveIE").ToString.ToEntero) Then - If ObjPrepoliza.DtResultados.Rows.Count > 0 Then - TxtVehiculoAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 53").Rows(0)("Importe").ToString.FormatoNumero - TxtComisionAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 54").Rows(0)("Importe").ToString.FormatoNumero - TxtSeguroAnticipo.Text = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 55").Rows(0)("Importe").ToString.FormatoNumero - Dim dtt As DataTable = ObjPrepoliza.DtResultados.FiltraParametros("CveConceptoContable = 58") + If dr("CveIE").ToString.ToEntero > 0 AndAlso ObjCreditos.GetBancosIEMovimientos(dr("CveIE").ToString.ToEntero, UsuarioActual.CveEmpresa) Then + If ObjCreditos.DtResultados.Rows.Count > 0 Then + TxtVehiculoAnticipo.Text = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 53").Rows(0)("Importe").ToString.FormatoNumero + TxtComisionAnticipo.Text = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 54").Rows(0)("Importe").ToString.FormatoNumero + TxtSeguroAnticipo.Text = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 55").Rows(0)("Importe").ToString.FormatoNumero + Dim dtt As DataTable = ObjCreditos.DtResultados.FiltraParametros("CveConceptoContable = 58") If dtt.Rows.Count > 0 Then TxtFondoGarantia.Text = dtt.Rows(0)("Importe").ToString.FormatoNumero End If @@ -516,7 +517,6 @@ Partial Class Bancos_Creditos End If ObjCreditos.Dispose() - ObjPrepoliza.Dispose() End Sub #End Region @@ -1577,21 +1577,21 @@ Partial Class Bancos_Creditos Dim importeMovimiento = 0.0D - Dim ConceptoContable = 0 - Dim TipoMovimiento = False - Dim IdCtaContable = 0 - Dim Concepto = "" - Dim Referencia = $"Crédito: {TxtReferencia.Text}" - Dim FechaMovimiento = Now.ToDate - Dim MsgError As String = "" + Dim ConceptoContable = 0 + Dim TipoMovimiento = False + Dim IdCtaContable = 0 + Dim Concepto = "" + Dim Referencia = $"Crédito: {TxtReferencia.Text}" + Dim FechaMovimiento = Now.ToDate + Dim MsgError As String = "" - CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - Dim ImporteDocXPagar = TxtTotalCredito.Text.ToDecimal - Dim CveProveedor = -1 + CvePrePoliza = ObjContabilidad.AddPrePolizas("Creditos/RegistrodeRegistro", 69, TxtCSTotalCredito.Text.ToDouble, TxtCSTotalCredito.Text.ToDouble, DdlCSTipoMoneda.SelectedValue.ToEntero, FechaMovimiento, $"Crédito: {TxtReferencia.Text}", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + Dim ImporteDocXPagar = TxtTotalCredito.Text.ToDecimal + Dim CveProveedor = -1 Dim CveCreditoPrePoliza = -1 If CvePrePoliza > 0 Then - importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.todecimal 'importe financiado + importeMovimiento = TxtVehiculoValor.Text.ToDecimal - TxtVehiculoAnticipo.Text.ToDecimal 'importe financiado Concepto = $"Crédito: {TxtReferencia.Text}" Dim Pago As New CompraPago Pago.Fecha = Now diff --git a/Bancos/FluctuacionCambiaria.aspx.vb b/Bancos/FluctuacionCambiaria.aspx.vb index 6792fb427..51d5fa74e 100644 --- a/Bancos/FluctuacionCambiaria.aspx.vb +++ b/Bancos/FluctuacionCambiaria.aspx.vb @@ -810,7 +810,7 @@ Partial Class Bancos_FluctuacionCambiaria IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero() 'movimiento de complementaria - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero, CveProveedor:=gvr.DataKey("CveProveedor").ToEntero) Then + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, True, Total, gvr.DataKey("SerieFolio"), 307, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero, CveProveedor:=gvr.DataKey("CveProveedor").ToEntero) Then ErrorRegistrar = True Exit For End If @@ -831,7 +831,7 @@ Partial Class Bancos_FluctuacionCambiaria If Not ErrorRegistrar Then Conta.Commit() BtnGeneraAcreedores.Visible = False - Alert(String.Format("La Fluctuación se ha generado
Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion) + Alert(String.Format("La Fluctuación se ha generado
Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion) Else Conta.RollBack() Alert("Error al generar la fluctuación", TipoMensaje.MsgError) @@ -888,7 +888,7 @@ Partial Class Bancos_FluctuacionCambiaria IdCtaComplementaria = gvr.DataKey("IdCtaContComplementaria").ToString().ToEntero() 'movimiento de complementaria - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 202, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, False, Total, gvr.DataKey("SerieFolio"), 347, gvr.DataKey("SerieFolio"), Now, IdCtaComplementaria, 0, CveCompra:=gvr.DataKey("CveCompra").ToEntero, CveProveedor:=gvr.DataKey("CveProveedor").ToEntero, TipoCambio:=TC, TipoCambioPago:=gvr.DataKey("TipoCambio").ToDecimal, ImporteMX:=Total, ImporteME:=Total, CveIE:=gvr.DataKey("CveIE").ToEntero) Then ErrorRegistrar = True Exit For End If @@ -909,7 +909,7 @@ Partial Class Bancos_FluctuacionCambiaria If Not ErrorRegistrar Then Conta.Commit() BtnGeneraAcreedoresAnt.Visible = False - Alert(String.Format("La Fluctuación se ha generado
Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion) + Alert(String.Format("La Fluctuación se ha generado
Ver Póliza", CvePrePoliza), TipoMensaje.MsgInformacion) Else Conta.RollBack() Alert("Error al generar la fluctuación", TipoMensaje.MsgError) @@ -1136,7 +1136,7 @@ Partial Class Bancos_FluctuacionCambiaria End If 'movimiento de complementaria - If Not Conta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Math.Abs(Total), ConceptoFluctuacion, 202, ConceptoFluctuacion & gvr.DataKey("RazonSocial"), Now, IdCtaComplementaria, 0, TipoCambio:=TC, ImporteMX:=Math.Abs(Total), ImporteME:=Math.Abs(Total), CveCuenta:=CveCuentaComplementaria) Then + If Not Conta.AddPrePolizasDetalle(CvePrePoliza, Not TipoMovto, Math.Abs(Total), ConceptoFluctuacion, 345, ConceptoFluctuacion & gvr.DataKey("RazonSocial"), Now, IdCtaComplementaria, 0, TipoCambio:=TC, ImporteMX:=Math.Abs(Total), ImporteME:=Math.Abs(Total), CveCuenta:=CveCuentaComplementaria) Then ErrorRegistrar = True Exit For End If diff --git a/Bancos/FlujoDiario.aspx b/Bancos/FlujoDiario.aspx index bbe317b6a..f7c74ee6f 100644 --- a/Bancos/FlujoDiario.aspx +++ b/Bancos/FlujoDiario.aspx @@ -41,6 +41,14 @@ +
Opción:
+
+ + + + + +
diff --git a/Bancos/FlujoDiario.aspx.vb b/Bancos/FlujoDiario.aspx.vb index 370ea72b3..0b80f2f92 100644 --- a/Bancos/FlujoDiario.aspx.vb +++ b/Bancos/FlujoDiario.aspx.vb @@ -64,28 +64,26 @@ Partial Class Bancos_FlujoDiario params.Add(New ReportParameter("LogoPath", "")) End If - - - + Dim OpcionSaldo As Integer = DdlOpcion.SelectedValue.ToEntero 'SE LLENA TmpDTSaldosIniciales Dim Ban As New ClsBancos - If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text.ToDate.AddDays(-1).ToShortDateString, 0, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text.ToDate.AddDays(-1).ToShortDateString, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TmpDTSaldosIniciales = Ban.DtResultados End If 'Se Llena TmpDTIngresosDelDia - If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Ing", UsuarioActual.CveEmpresa) Then - TmpDTIngresosDelDia = Ban.DtResultados'.FiltraParametros("CveTipoTransaccion <> 8") + If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Ing", OpcionSaldo, UsuarioActual.CveEmpresa) Then + TmpDTIngresosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 8") End If 'Se Llena TmpDTGastosDelDia - If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Egs", UsuarioActual.CveEmpresa) Then - TmpDTGastosDelDia = Ban.DtResultados'.FiltraParametros("CveTipoTransaccion <> 2") + If Ban.GetIngresoEgresosDelDia(TxtFecha.Text.ToDate, "Egs", OpcionSaldo, UsuarioActual.CveEmpresa) Then + TmpDTGastosDelDia = Ban.DtResultados '.FiltraParametros("CveTipoTransaccion <> 2") End If 'Se Llena TmpDTSaldosActuales - If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text, 0, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then + If Ban.GetBancosSaldos(-1, -1, -1, MinFecha.ToString, TxtFecha.Text, OpcionSaldo, "-1", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Then TmpDTSaldosActuales = Ban.DtResultados End If diff --git a/Bancos/PopIECompras.aspx.vb b/Bancos/PopIECompras.aspx.vb index 9749730e3..05f646e66 100644 --- a/Bancos/PopIECompras.aspx.vb +++ b/Bancos/PopIECompras.aspx.vb @@ -1472,7 +1472,7 @@ Partial Class Bancos_PopIECompras tImporteMN = (tImporteMN * Pago.TCPago).RoundSQL End If - If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then + If MsgError = "" AndAlso Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, Pago.ImportePago.RoundSQL, tImporteMN, 30, Referencia, ConceptoMovimiento, IdCuenta, CveIE:=CveIE, CveProveedor:=CveProveedor, TipoCambio:=Pago.TCPago, CveSubProyecto:=CveSubProyecto, ImporteME:=ImporteME) Then MsgError = "No se pudo insertar la póliza" End If diff --git a/Bancos/RepEgresosSinComprobante.aspx b/Bancos/RepEgresosSinComprobante.aspx index 54ffdee63..da80a37b8 100644 --- a/Bancos/RepEgresosSinComprobante.aspx +++ b/Bancos/RepEgresosSinComprobante.aspx @@ -145,6 +145,22 @@
+
+ Fecha: + +
+
+
+ + + + +
+ + + + +
Concepto:
@@ -185,7 +201,7 @@ - + diff --git a/Bancos/RepEgresosSinComprobante.aspx.vb b/Bancos/RepEgresosSinComprobante.aspx.vb index 31edbfabc..33cc76af8 100644 --- a/Bancos/RepEgresosSinComprobante.aspx.vb +++ b/Bancos/RepEgresosSinComprobante.aspx.vb @@ -94,21 +94,9 @@ Partial Class Bancos_RepEgresosSinComprobante e.Row.FCHyperLink("Hpl").NavigateUrl = "" e.Row.FCHyperLink("Hpl").Font.Bold = True e.Row.Cells(1).HorizontalAlign = HorizontalAlign.Center - End If - - - If e.Row.RowIndex = 1 Then - e.Row.Cells(1).Width = Unit.Pixel(520) - e.Row.Cells(2).Width = Unit.Pixel(50) - e.Row.Cells(3).Width = Unit.Pixel(100) - e.Row.Cells(4).Width = Unit.Pixel(150) - e.Row.Cells(6).Width = Unit.Pixel(100) - End If - - 'Sustituido 3-5 lineas mas abajo - 'If e.Row.DBCampo("FechaDocumento") = "" Then e.Row.BackColor = Drawing.Color.LightGray - - 'CUANDO ES SUBTITULO + End If + + 'CUANDO ES SUBTITULO If e.Row.DBCampo("CveIE") = "" Then If e.Row.DBCampo("CveMoneda") = "" Then @@ -118,7 +106,6 @@ Partial Class Bancos_RepEgresosSinComprobante e.Row.FCLiteral("LtMoneda").Visible = True e.Row.FCHyperLink("Hpl").Visible = False End If - End If 'LINK A IE @@ -126,9 +113,8 @@ Partial Class Bancos_RepEgresosSinComprobante e.Row.FCHyperLink("HLFolio").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) End If - If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red - ' e.Row.FCHyperLink("ImgAbonar").NavigateUrl = String.Format("/Bancos/ProveedoresAbonar.aspx?CveProveedor={0}&FechaI={1}&FechaF={2}&CveUsuarioProgramo={3}&CveMoneda={4}&Serie={5}", e.Row.DBCampo("CveProveedor"), If(txtFechaI.Text <> "", txtFechaI.Text, "-1"), If(txtFechaF.Text <> "", txtFechaF.Text, "-1"), DdlUsuarioProgramo.SelectedValue, e.Row.DBCampo("CveMoneda"), e.Row.DBCampo("Serie")) - + If e.Row.DBCampo("Saldo").ToDouble < 0 Then e.Row.Cells(1).ForeColor = Drawing.Color.Red + End If End Sub @@ -181,7 +167,8 @@ Partial Class Bancos_RepEgresosSinComprobante End If Next - TxtConcepto.Text = "Saldo de Egresos por comprobar" + TxtConcepto.Text = "Saldado de Egresos por comprobar" + TxtFechaSaldar.Text = Now.ToShortDateString DVSaldar.Visible = True UpSaldar.Update() @@ -200,7 +187,6 @@ Partial Class Bancos_RepEgresosSinComprobante Protected Sub LnkSaldar_Click(sender As Object, e As EventArgs) - Dim Contador As Integer = 0 For Each gr As GridViewRow In GvESC.Rows If gr.FCCheckBox("Chk").Checked Then @@ -213,7 +199,6 @@ Partial Class Bancos_RepEgresosSinComprobante Exit Sub End If - Dim ObjConta As New ClsContabilidad Dim ObjProveedor As New ClsCompProveedores(ObjConta.IniciaTransacSQL()) @@ -223,9 +208,9 @@ Partial Class Bancos_RepEgresosSinComprobante Dim MsgError As String = "" Try - If Contador > 0 Then - CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, 0, 0, 1, Now, + Dim tFecha As Date = TxtFechaSaldar.Text.ToDate + CvePrePoliza = ObjConta.AddPrePolizas("Bancos/RepEgresosSinComprobante", 6, 0, 0, 1, tFecha, TxtConcepto.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) Dim ImporteSaldoGral As Decimal = 0 Dim TipoMovtoConcepto As Boolean = True @@ -243,9 +228,22 @@ Partial Class Bancos_RepEgresosSinComprobante End If If gr.DataKey("CveMoneda").ToEntero > 1 Then - Dim ImporteMN As Decimal = (ImporteSaldo * gr.DataKey("TipoCambio").ToDecimal - ImporteSaldo).RoundSQL + Dim TCValuacion As Decimal = gr.DataKey("TipoCambio").ToDecimal + If UsuarioActual.Empresa.Funcionalidad(703) = "1" Then + Dim tFechaUltimaFluctuacion As Date + Dim UltimaFluctuacion As MTipoCambioFluctuacion = GlobalTipoCambioUltimaFluctuacion(tFecha) + If UltimaFluctuacion IsNot Nothing Then + If UltimaFluctuacion.FechaFluctuacion < tFecha Then + tFechaUltimaFluctuacion = UltimaFluctuacion.FechaFluctuacion + TCValuacion = UltimaFluctuacion.TCFluctuacion + End If + If gr.DataKey("FechaDocumento").ToDate < tFechaUltimaFluctuacion Then TCValuacion = TCValuacion + End If + End If + + Dim ImporteMN As Decimal = (ImporteSaldo * TCValuacion - ImporteSaldo).RoundSQL If Not ObjConta.AddPrePolizasDetalle(CvePrePoliza, TipoMovtoConcepto, ImporteMN, ImporteMN, ConPrepAplicacion.CveConceptoComplementario, gr.DataKey("Folio"), TxtConcepto.Text, -1, - CveIE:=gr.DataKey("CveIE").ToEntero, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, + CveIE:=gr.DataKey("CveIE").ToEntero, TipoCambio:=TCValuacion, CveProveedor:=gr.DataKey("CveProveedor").ToEntero, CvePersonal:=gr.DataKey("CvePersonal").ToEntero, ImporteME:=gr.DataKey("Saldo").ToDecimal, CveSubProyecto:=DdlSubProyecto.SelectedValue.ToEntero, Contabilizable:=EsContabilizable) Then MsgError = "Ocurrio un error al saldar el movimiento" Exit For diff --git a/Bin/Profact.TimbraCFDI.dll b/Bin/Profact.TimbraCFDI.dll index 9754ce481..aebf0ab01 100644 Binary files a/Bin/Profact.TimbraCFDI.dll and b/Bin/Profact.TimbraCFDI.dll differ diff --git a/Compras/CatTipoGasto.aspx b/Compras/CatTipoGasto.aspx index ac328153b..4c4520349 100644 --- a/Compras/CatTipoGasto.aspx +++ b/Compras/CatTipoGasto.aspx @@ -23,7 +23,7 @@ - + diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 6997b2f53..00ef0610e 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -5280,7 +5280,9 @@ Partial Class Compras_Compras 'AGREGA AF COMPRA - Cuando es Compra se guarda CveCompraDetalle en AF If Row("TipoAF").ToString.ToEntero = 2 Then - If Not ObjAF.UpdateActivosFijosCompra(Row("CveActivoFijo").ToString.ToEntero, ObjCompras.CveCompraDetalle, Row("TipoAF").ToString.ToEntero, Row("Total").ToString.ToDouble, TxtFecha.Text.Trim.ToDate) Then + Dim Valor As Decimal = Row("Total").ToString.ToDecimal + Dim ValorMN As Decimal = (Valor * TxtTC.Text.ToDecimal).RoundSQL + If Not ObjAF.UpdateActivosFijosCompra(Row("CveActivoFijo").ToString.ToEntero, ObjCompras.CveCompraDetalle, Row("TipoAF").ToString.ToEntero, Valor, ValorMN, TxtFecha.Text.Trim.ToDate) Then ErrorDetalles = True Exit For End If @@ -6987,7 +6989,7 @@ Partial Class Compras_Compras Dim ConPreP As ConceptosTipoSaldo = ClsPaginas.ObtenerCveConceptoPrePoliza(15, DdlMoneda.SelectedValue.ToEntero, False, CveTipoConcepto) 'Dim CveCon As Integer = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, False) - If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConPreP.CveConcepto, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza) Then + If ObjConta.AddPrePolizasDetalle(CvePrePoliza, False, importeMovimiento, Referencia, ConPreP.CveConcepto, Concepto, FechaMovimiento, IdCtaContable, -1, CveCompra:=CveCompra, CveProveedor:=CveProveedorConcepto, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, ImporteMX:=importeMovimiento, ImporteME:=importeMovimiento, Contabilizable:=SeContabiliza, TipoCambio:=tipoCambioActual) Then IdCtaContable = CtaProveedorComplementaria 'CveCon = ObtConceptoContableProvisionCompra(CveTipoConcepto, DdlTipoComprobante.SelectedValue, DdlMoneda.SelectedValue.ToEntero, True) @@ -8717,7 +8719,9 @@ Partial Class Compras_Compras For Each drowAF As DataRow In TmpDT.Rows If drowAF("DesvicularAF").ToString <> "" AndAlso Boolean.Parse(drowAF("DesvicularAF").ToString) Then - If Not ObjAF.UpdateActivosFijosCompra(-1, drowAF("CveCompraDetalle").ToString.ToEntero, -1, 0, Now, Opcion:=2) Then + Dim Valor As Decimal = drowAF("Total").ToString.ToDecimal + Dim ValorMN As Decimal = (Valor * TxtTC.Text.ToDecimal).RoundSQL + If Not ObjAF.UpdateActivosFijosCompra(-1, drowAF("CveCompraDetalle").ToString.ToEntero, -1, Valor, ValorMN, TxtFecha.Text.ToDate, Opcion:=2) Then Retorno = False End If End If @@ -9087,7 +9091,9 @@ Partial Class Compras_Compras If Retorno Then 'AGREGA AF COMPRA - Cuando es Compra se guarda CveCompraDetalle en AF If Row("TipoAF").ToString.ToEntero = 2 Then - If Not ObjAF.UpdateActivosFijosCompra(Row("CveActivoFijo").ToString.ToEntero, Row("CveCompraDetalle").ToString.ToEntero, Row("TipoAF").ToString.ToEntero, Row("Total").ToString.ToDouble, TxtFecha.Text.Trim.ToDate) Then + Dim Valor As Decimal = Row("Total").ToString.ToDecimal + Dim ValorMN As Decimal = (Valor * TxtTC.Text.ToDecimal).RoundSQL + If Not ObjAF.UpdateActivosFijosCompra(Row("CveActivoFijo").ToString.ToEntero, Row("CveCompraDetalle").ToString.ToEntero, Row("TipoAF").ToString.ToEntero, Valor, ValorMN, TxtFecha.Text.Trim.ToDate) Then Retorno = False Exit For End If diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 01a91c951..be81921ca 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -5782,17 +5782,16 @@ Partial Class PopUpVerFactura Dim EstadoCancelacion = drv("EstadoCancelacion").ToString() Dim FechaCancelacion = drv("FechaCancelacion").ToString.ToDateTime - Dim MotivoCancelacion As String = "" ' drv("MotivoCancelacion").ToString() - Dim FolioSustitucion As String = "" ' drv("FolioFiscalPadre").ToString() + Dim MotivoCancelacion As String = "" + Dim FolioSustitucion As String = "" - Dim DirectorioArchivo As String = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacion.mrt", ModExtensiones.DirectorioBaseEmpresas) + Dim DirectorioArchivo As String = "Empresas/Grales/Formatos/AcuseCancelacion.mrt" Dim RFCEmisor = UsuarioActual.Empresa.RFC Dim Titulo As String = "Acuse de cancelación de CFDI" Dim EstadoCFDI As String = "Cancelado" - 'SI NO TIENE EL SELLO BUSCA OBTNERLO DE NUEVO If String.IsNullOrEmpty(SelloCancelacion) Then Dim ObjCancelacion As New Timbrado @@ -5807,7 +5806,7 @@ Partial Class PopUpVerFactura If CveEstatusFactura = 20 Then - DirectorioArchivo = String.Format("{0}Empresas\Grales\Formatos\AcuseCancelacionSolicitud.mrt", ModExtensiones.DirectorioBaseEmpresas) + DirectorioArchivo = "Empresas/Grales/Formatos/AcuseCancelacionSolicitud.mrt" Titulo = "Acuse de solicitud de cancelación de CFDI" EstadoCFDI = "Vigente" @@ -5851,8 +5850,6 @@ Partial Class PopUpVerFactura End If End If - Dim Archivo As New System.IO.FileInfo(DirectorioArchivo) - Dim params As New List(Of ReportParameter) params.Add(New ReportParameter("Titulo", Titulo)) params.Add(New ReportParameter("FolioFiscal", FolioFiscal)) @@ -5864,16 +5861,13 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("MsgError", "")) params.Add(New ReportParameter("FechaCancelacion", FechaCancelacion.ToString("dd/MM/yyyy HH:mm:ss"))) - 'ImprimirPDF(Archivo.FullName, DtDetalle, params, "AcuseCancelacion" & CveVenta) - - Dim DtAcuse As DataTable = Nothing + Dim DtAcuse = New DataTable("DtAcuse") + DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String))) + DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String))) + DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String))) + DtAcuse.Columns.Add(New DataColumn("FolioSustitucion", GetType(String))) If CveEstatusFactura = 20 Then - DtAcuse = New DataTable("DtAcuse") - DtAcuse.Columns.Add(New DataColumn("FolioFiscal", GetType(String))) - DtAcuse.Columns.Add(New DataColumn("Estatus", GetType(String))) - DtAcuse.Columns.Add(New DataColumn("MotivoCancelacion", GetType(String))) - DtAcuse.Columns.Add(New DataColumn("FolioSustitucion", GetType(String))) Dim RowCFDI = DtAcuse.NewRow() @@ -5886,7 +5880,7 @@ Partial Class PopUpVerFactura End If - ImprimirPDFStimulsoft(Archivo.FullName, DtAcuse, params, "AcuseCancelacion" & CveVenta) + ImprimirPDFStimulsoft(DirectorioArchivo, DtAcuse, params, "AcuseCancelacion" & CveVenta) End If diff --git a/Compras/Proveedores.aspx.vb b/Compras/Proveedores.aspx.vb index 4c98d9164..28fe6b62a 100644 --- a/Compras/Proveedores.aspx.vb +++ b/Compras/Proveedores.aspx.vb @@ -8,6 +8,7 @@ Imports System.Xml Imports Microsoft.Reporting.WebForms Imports System.IO Imports System.Globalization +Imports System.Data.SqlClient 'Imports VBIDE Partial Class Compras_Proveedores @@ -1571,11 +1572,15 @@ Partial Class Compras_Proveedores Dim ErrorContactos As Boolean = False Dim ErrorSucursales As Boolean = False Dim ErrorCuentasContables As Boolean = False + Dim ErrorCuentasContablesSIG As Boolean = False Dim codigo As String = "-1" Dim MsgCuentaContable As String = "" Dim IdCuentaContable As Integer = -1 + Dim IdCuentaAltaCompaq As Integer = -1 + Dim CodigoCuentaAltaCompaq As String = "" + Dim NombreCuentaCuentaAltaCompaq As String = "" Dim IdProveedor As Integer = -1 @@ -1634,6 +1639,7 @@ Partial Class Compras_Proveedores 'End If + Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero If CveProveedor = -1 Then @@ -1644,7 +1650,7 @@ Partial Class Compras_Proveedores ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa) ObjContaAC.IniciaTransacSQL() - Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero + If DdlCveTipoProveedor.SelectedValue = "2" Then 'cuando es acreedor ClaveFuncionalidad = UsuarioActual.Empresa.Funcionalidad(202).ToEntero End If @@ -1654,6 +1660,7 @@ Partial Class Compras_Proveedores IdCuentaContable = UsuarioActual.Empresa.Funcionalidad(322).ToString.Trim.ToEntero Else IdCuentaContable = ObjContaAC.AddSiguienteCuentaHijo(ClaveFuncionalidad, TxtRazonSocial.Text.Trim, "D", 2) + IdCuentaAltaCompaq = IdCuentaContable End If @@ -1667,46 +1674,12 @@ Partial Class Compras_Proveedores If dt.Rows.Count = 1 Then Dim row As DataRow = dt.Rows(0) CtaCodigo = CStr(row("CtaCodigo")) + CodigoCuentaAltaCompaq = CStr(row("Codigo")) + NombreCuentaCuentaAltaCompaq = TxtRazonSocial.Text.Trim DdlCtaContProveedores.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : DdlCtaContProveedores.SelectedValueExist(IdCuentaContable.ToString) End If - 'If UsuarioActual.Empresa.Funcionalidad(522).ToString = "1" Then - ' If UsuarioActual.Empresa.UsaContabilidad Then - ' Dim ObjContPaqi As New ClsContPAQi(UsuarioActual.Empresa) - ' If Not errorContPaq Then - ' If ObjContPaqi.GetProveedor(TxtRFC.Text.Trim) Then - ' If ObjContPaqi.DtResultados.Rows.Count > 0 Then - ' IdProveedor = ObjContPaqi.DtResultados.Rows(0)("Id").ToString.ToEntero - ' errorContPaq = False - ' Else - ' IdProveedor = ObjContPaqi.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtNombreComercial.Text.Trim, "", CodigoPersona) - ' If IdProveedor > 0 Then - ' errorContPaq = False - ' Else - ' errorContPaq = True - ' End If - ' End If - ' Else - ' errorContPaq = True - ' End If - - ' End If - - - ' If Not errorContPaq Then - ' ObjContPaqi.Commit() - ' ObjContPaqi.Dispose() - ' Else - ' ObjContPaqi.RollBack() - ' ObjContPaqi.Dispose() - ' Exit Sub - ' End If - ' End If - 'Else - - ' IdProveedor = ObjContaAC.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtRazonSocial.Text.Trim, "") - 'End If IdProveedor = ObjContaAC.AddProveedor(IdCuentaContable, TxtRFC.Text.Trim, TxtRazonSocial.Text.Trim, "") @@ -1802,7 +1775,23 @@ Partial Class Compras_Proveedores Next End If - If ErrorBancos Or ErrorContactos Or ErrorSucursales Or ErrorCuentasContables Then ''se deben validar las 3 juntas???????? + If IdCuentaAltaCompaq > 0 Then + + Dim CveConceptoContable As Integer + If DdlCveTipoProveedor.SelectedValue.ToEntero.Contiene(1, 3) Then + CveConceptoContable = 5 + Else + CveConceptoContable = 305 + End If + + If Not AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, IdCuentaAltaCompaq, CveConceptoContable, ObjProveedores.IniciaTransacSQL, IdCompaqPadre:=ClaveFuncionalidad, CveProveedorCuenta:=NuevoCveProveedor) Then + ErrorCuentasContablesSIG = True + End If + + End If + + + If ErrorBancos Or ErrorContactos Or ErrorSucursales Or ErrorCuentasContables Or ErrorCuentasContablesSIG Then ''se deben validar las 3 juntas???????? ObjProveedores.RollBack() If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack() If ErrorBancos Then @@ -1816,7 +1805,10 @@ Partial Class Compras_Proveedores End If If ErrorCuentasContables Then Alert("Ocurrió un error al asignar las cuentas contables", TipoMensaje.MsgError) + ElseIf ErrorCuentasContablesSIG Then + Alert("Ocurrió un error al asignar las cuentas contables SIG", TipoMensaje.MsgError) End If + End If Else ObjProveedores.Commit() @@ -2073,6 +2065,78 @@ Partial Class Compras_Proveedores CargaEventoBitacora() End Sub + + + + Private Function AltaCuentaContabilidadSIG(CodigoCuentaAltaCompaq As String, NombreCuentaCuentaAltaCompaq As String, IdCuentaAltaCompaq As Integer, CveConceptoContable As Integer, Optional Transaccion As SqlTransaction = Nothing, Optional IdCompaqPadre As Integer = -1, Optional CveProveedorCuenta As Integer = -1) As Boolean + + If Not UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then + Return True + End If + + If Not IdCompaqPadre > 0 Then + Alert("Erroa al agregar la cuenta SIG, IdCompaq sin definir.", TipoMensaje.MsgError) + Return False + End If + + Dim Respuesta As Boolean = False + Dim DisposeClases As Boolean = False + Dim Tipo As String = "B" + + If CveConceptoContable.Contiene(5, 305) Then + Tipo = "D" + ElseIf CveConceptoContable.Contiene(10) Then + Tipo = "A" + End If + + Dim ObjContabilidad As ClsContabilidad + + If Transaccion Is Nothing Then + ObjContabilidad = New ClsContabilidad + DisposeClases = True + Else + ObjContabilidad = New ClsContabilidad(Transaccion) + DisposeClases = False + End If + + If UsuarioActual.CveEmpresa.Contiene(7, 11, 145, 122) Then + If ObjContabilidad.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then + + Dim CvePadre As Integer = ObjContabilidad.DtResultados.FiltroPrimeroValor("CveCuenta", $"IdCompaq={IdCompaqPadre}").ToEntero + + If CvePadre > 0 Then + + Dim CvecuentaNueva As Integer = ObjContabilidad.AddCuenta(CvePadre, CodigoCuentaAltaCompaq, NombreCuentaCuentaAltaCompaq, Tipo, 2, 1, CveProveedor:=CveProveedor, IdCompaq:=IdCuentaAltaCompaq) + + If CvecuentaNueva > 0 Then + If ObjContabilidad.AddCuentasAsignaciones(CveConceptoContable, UsuarioActual.CveEmpresa, CvecuentaNueva, CveProveedor:=CveProveedorCuenta, PorcentajeIVA:=0) Then + Respuesta = True + End If + End If + + End If + End If + Else + Respuesta = True + End If + + If DisposeClases Then + ObjContabilidad.Dispose() + + If Not Respuesta Then + Alert("Se presento un error al agregar y asignar la cuenta (Conta SIG).", TipoMensaje.MsgAdvertencia) + End If + + End If + + + + + Return Respuesta + End Function + + + #End Region #Region "U S U A R I O S" @@ -4113,7 +4177,7 @@ Partial Class Compras_Proveedores Dim ObjContabilidad As New ClsContPAQi(UsuarioActual.Empresa) '' 17/03/2017 FUNCIONALIDADES 249,250,251 - '' Proveedores + '' Dim ClaveFuncionalidad As Integer = UsuarioActual.Empresa.Funcionalidad(201).ToEntero If DdlCveTipoProveedor.SelectedValue = "2" Then ClaveFuncionalidad = UsuarioActual.Empresa.Funcionalidad(202).ToEntero If DdlCtaContProveedores.SelectedValue.ToEntero <= 0 And ClaveFuncionalidad > 0 Then @@ -4282,15 +4346,19 @@ Partial Class Compras_Proveedores End Sub Private Sub AgregarCuentaContable(btn As Button, ddl As DropDownList) + If UsuarioActual.Empresa.TipoContabilidad = 2 AndAlso UsuarioActual.Empresa.UsaContabilidad = True Then Dim IdCuentaContable As Integer = -1 Dim CtaCodigo As String = "" Dim TieneError = False Dim IdCtaContableProveedores As Integer = -1, IdCtaContableAcreedores As Integer = -1, IdCtaContableDocsXPagar As Integer = -1, IdCtaContableAnticipos As Integer = -1, IdCtaContableDeudor As Integer = -1 Dim CtaCodigoProveedores As String = "-1", CtaCodigoAcreedores As String = "-1", CtaCodigoDocsXPagar As String = "-1", CtaCodigoAnticipos As String = "-1", CtaCodigoDeudor As String = "-1" + Dim CveConceptoContable As Integer = -1 + Dim Codigo As String = "" Dim ObjContaAC As New ClsContPAQi(UsuarioActual.Empresa) Dim ObjProveedores As New ClsCompProveedores() + ObjContaAC.IniciaTransacSQL() ObjProveedores.IniciaTransacSQL() @@ -4302,15 +4370,26 @@ Partial Class Compras_Proveedores Select Case btn.CommandArgument.ToString Case "Proveedores" CuentaPadre = If(DdlCveTipoProveedor.SelectedValue = "2", UsuarioActual.Empresa.Funcionalidad(202).ToEntero, UsuarioActual.Empresa.Funcionalidad(201).ToEntero) + + If DdlCveTipoProveedor.SelectedValue.ToEntero.Contiene(1, 3) Then + CveConceptoContable = 5 + Else + CveConceptoContable = 305 + End If + Case "Acreedores" CuentaPadre = UsuarioActual.Empresa.Funcionalidad(202).ToEntero + CveConceptoContable = 305 Case "DocsXPagar" CuentaPadre = UsuarioActual.Empresa.Funcionalidad(203).ToEntero + CveConceptoContable = 50 Case "Anticipos" CuentaPadre = UsuarioActual.Empresa.Funcionalidad(204).ToEntero TipoCuenta = "A" + CveConceptoContable = 10 Case "Deudores" CuentaPadre = UsuarioActual.Empresa.Funcionalidad(205).ToEntero + CveConceptoContable = 10 End Select @@ -4327,6 +4406,7 @@ Partial Class Compras_Proveedores Dim row As DataRow = dt.Rows(0) CtaCodigo = CStr(row("CtaCodigo")) + Codigo = CStr(row("Codigo")) Select Case btn.CommandArgument.ToString Case "Proveedores" @@ -4359,6 +4439,12 @@ Partial Class Compras_Proveedores TieneError = True End If + + If Not AltaCuentaContabilidadSIG(Codigo, NombreCuenta, IdCuentaContable, CveConceptoContable, ObjProveedores.IniciaTransacSQL, IdCompaqPadre:=CuentaPadre, CveProveedorCuenta:=CveProveedor) Then + TieneError = True + End If + + If Not TieneError Then Alert(String.Format("Se registo la Cuenta Contable: {0}", CtaCodigo, TipoMensaje.MsgInformacion)) ddl.Items.Add(New ListItem(CtaCodigo, IdCuentaContable.ToString)) : ddl.SelectedValueExist(IdCuentaContable.ToString) diff --git a/Compras/eFacturas.aspx b/Compras/eFacturas.aspx index e53333212..d5ac164f8 100644 --- a/Compras/eFacturas.aspx +++ b/Compras/eFacturas.aspx @@ -203,7 +203,45 @@ - +
+ + + + +
+
+
+ + + + + +
+
+ +
+
+ + +
+
+ +
+ +
+
+
+ +
+
+ +
+
+ @@ -316,6 +354,12 @@ +
+
+ + + +
diff --git a/Contabilidad/CatCuentas.aspx.vb b/Contabilidad/CatCuentas.aspx.vb index 04346da23..1f8142139 100644 --- a/Contabilidad/CatCuentas.aspx.vb +++ b/Contabilidad/CatCuentas.aspx.vb @@ -28,7 +28,7 @@ Partial Class Contabilidad_CatCuentas Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load If Not Page.IsPostBack Then - If Not UsuarioActual.CveEmpresa.Contiene(13, 83) Then + If Not UsuarioActual.CveEmpresa.Contiene(13, 83) AndAlso EsProduccion Then Response.Redirect("/Contabilidad2/CatCuentas.aspx") Exit Sub End If diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 8a26ae06e..c803fc70b 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -570,9 +570,8 @@ Partial Class ContabilidadC_RegPrePolizaS If CveConceptoContable.Contiene(1, 2, 12, 91, 13, 38, 207, 203, 39, 61, 62, 63, 4, 278, 291, 292, 293, 294, 272, 150, 251, 301) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Ventas/Ventas.aspx?CveVenta={0}", e.Row.DataKey("CveVenta")) If CveConceptoContable.Contiene(5, 6, 17, 18, 14, 19, 25, 26, 60, 205, 225, 234, 235, 240, 305, 306, 307, 308, 309, 310, 311, 312, 201, 206, 341, 342, 343, 344, 304, 272, 259) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Compras/Compras.aspx?CveCompra={0}", e.Row.DataKey("CveCompra")) If CveConceptoContable.Contiene(68) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Inventarios/EntradasSalidas.aspx?CveMovimiento={0}", e.Row.DBCampo("CveMovimientoAlmacen")) - If CveConceptoContable.Contiene(30, 204, 66, 92, 202) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) + If CveConceptoContable.Contiene(30, 204, 66, 92, 202, 10, 21, 48, 56, 338, 339, 340, 345, 346, 347) Then e.Row.FCHyperLink("HlReferencia").NavigateUrl = String.Format("/Bancos/IE.aspx?CveIE={0}", e.Row.DBCampo("CveIE")) - 'e.Row.FCHyperLink("HlReferencia").NavigateUrl = CveConceptoContable If e.Row.DBCampo("Modificado") Then e.Row.FCCheckBox("chkModificado").Checked = True End If diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index e9ffef96a..f4b8529e5 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -261,7 +261,7 @@ Partial Class Contabilidad2_CatCuentas Tnombre.Text = dr("Nombre").ToString() DTcuenta.SelectedValue = dr("Tipo").ToString() DcuentaMayor.SelectedValue = dr("CtaMayor").ToString - DdlMoneda.SelectedValue = dr("CveMoneda").ToString + DdlMoneda.SelectedValue = If(dr("CveMoneda").ToString = "", "1", dr("CveMoneda").ToString) Using objconta As New ClsContabilidad objconta.GetConta_CuentasDataContabilidad(IDSelected, UsuarioActual.CveEmpresa) If objconta.DtResultados.Rows.Count > 0 Then @@ -362,36 +362,36 @@ Partial Class Contabilidad2_CatCuentas CveProveedor:=CveProveedor, CveCliente:=CveCliente, CveClasificacion:=CveClasificacion, PorcentajeImpuesto:=PorcentajeImpuesto, CveBancoCuenta:=CveBancoCuenta, CveAlmacen:=CveAlmacen, Codigo:=TxtCuenta.Text.Replace("-", ""), CvePadre:=DdlCuentaContable.SelectedValue.ToEntero) Then - If UsuarioActual.Empresa.TipoContabilidad = 2 Then - Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa) - If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, - DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then - ObjContaEmpresa.Dispose() - ObjConta.Dispose() - Exit Sub - End If - End If + 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then + ' Dim ObjContaEmpresa As New ClsContPAQi(UsuarioActual.Empresa) + ' If Not ObjContaEmpresa.UpdateCuenta(IDSelected.ToEntero, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, + ' DdlMoneda.SelectedValue.ToEntero, DdlAgrupadorSAT.SelectedValue.ToEntero, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then + ' ObjContaEmpresa.Dispose() + ' ObjConta.Dispose() + ' Exit Sub + ' End If + 'End If - Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") + 'Dim codigo As String = DtDatos.FiltroPrimeroValor("Codigo", $"CveCuenta={IDSelected}") - If UsuarioActual.Empresa.TipoContabilidad = 2 Then + 'If UsuarioActual.Empresa.TipoContabilidad = 2 Then - Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) + ' Using ObjConta2 As New ClsContPAQi(UsuarioActual.Empresa) - If ObjConta2.GetCuentas(-1, "-1", -1) Then - Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero - Dim IdAgrupador As Integer + ' If ObjConta2.GetCuentas(-1, "-1", -1) Then + ' Dim Id As Integer = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"Codigo='{codigo}'").ToEntero + ' Dim IdAgrupador As Integer - If ObjConta2.GetAgrupadoresSAT() Then - IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero - End If - If Id > 0 Then - If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then - End If - End If - End If - End Using - End If + ' If ObjConta2.GetAgrupadoresSAT() Then + ' IdAgrupador = ObjConta2.DtResultados.FiltroPrimeroValor("Id", $"CodigoNombre='{DdlAgrupadorSAT.SelectedItem.Text}'").ToEntero + ' End If + ' If Id > 0 Then + ' If ObjConta2.UpdateCuenta(Id, Tnombre.Text, DTcuenta.SelectedValue.ToString, DcuentaMayor.SelectedValue.ToString.ToEntero, DdlMoneda.SelectedValue.ToEntero, IdAgrupador, SubCuentaDe:=Tsubcuenta.Text.Trim) > 0 Then + ' End If + ' End If + ' End If + ' End Using + 'End If Dim customerRow As Data.DataRow customerRow = DtDatos.Select(String.Format("CveCuenta = {0}", IDSelected))(0) @@ -408,7 +408,7 @@ Partial Class Contabilidad2_CatCuentas LimpiarCampos() 'RegistraScript("$get('BtnCambiaAgrupadorSAT').click();") updatos.Update() - + GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing Alert("La cuenta se guardo correctamente") End If @@ -596,7 +596,7 @@ Partial Class Contabilidad2_CatCuentas If Not TieneError Then ObjConta.Commit() - + GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing CargaDatos() LimpiarCampos() updatos.Update() @@ -669,6 +669,7 @@ Partial Class Contabilidad2_CatCuentas ObjConta2.Dispose() End If + GlobalDTContaCuentasContables(UsuarioActual.CveEmpresa) = Nothing Else Alert("La Cuenta no pudo ser eliminada", TipoMensaje.MsgError) diff --git a/Contabilidad2/RepAnexoCatalogo.aspx.vb b/Contabilidad2/RepAnexoCatalogo.aspx.vb index b22362481..3267b6c7d 100644 --- a/Contabilidad2/RepAnexoCatalogo.aspx.vb +++ b/Contabilidad2/RepAnexoCatalogo.aspx.vb @@ -182,10 +182,9 @@ Partial Class AC2_RepAnexoCatalogo Dim strGlobal As String = "" If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then - 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") - DdlCuentas.DataSource = ObjTipoCuenta.DtResultados + + DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')") + ' DdlCuentas.DataSource = ObjTipoCuenta.DtResultados End If ObjTipoCuenta.Dispose() diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx index c17f5d1e9..db716dc83 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx @@ -93,12 +93,7 @@ - - - + @@ -137,8 +132,8 @@
-
- + + diff --git a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb index f5a336676..7ca8a902a 100644 --- a/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb +++ b/Contabilidad2/RepMovimientosAuxiliaresCatalogo.aspx.vb @@ -44,22 +44,7 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo ViewState("FechaFin") = value End Set End Property - 'Private Property CveSubProyecto As String - ' Get - ' CveSubProyecto = ViewState("CveSubProyecto").ToString - ' End Get - ' Set(value As String) - ' ViewState("CveSubProyecto") = value - ' End Set - 'End Property - Private Property IdCuenta As Integer - Get - IdCuenta = ViewState("IdCuenta").ToString.ToEntero - End Get - Set(value As Integer) - ViewState("IdCuenta") = value - End Set - End Property + Private Property TotalPadre As Boolean Get TotalPadre = CBool(ViewState("TotalPadre")) @@ -113,17 +98,11 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo If Request("CveCuenta") IsNot Nothing AndAlso IsNumeric(Request("CveCuenta")) AndAlso Request("CveCuenta").ToEntero > 0 Then If Request("FF") IsNot Nothing AndAlso Request("FF").ToString.Length = 10 AndAlso Request("FF").ToDate > "01/01/1000".ToDate Then - IdCuenta = Request("CveCuenta").ToEntero - 'HdnCveCuenta.Value = IdCuenta.ToString - FechaFin = Request("FF").ToDate txtFechaF.Text = FechaFin.ToShortDateString - DdlCuentas.SelectedValueExist(IdCuenta) - If DdlCuentas.SelectedValue.ToEntero <> -1 Then - 'RegistraScript("Enable();") - DdlTipoCuentas.SelectedValueExist(-2) - End If + DdlCuentas.SelectedValueExist(Request("CveCuenta").ToEntero) + If Request("FI") IsNot Nothing AndAlso Request("FI").ToString.Length = 10 AndAlso Request("FI").ToDate > "01/01/1000".ToDate Then FechaInicio = Request("FI").ToDate @@ -176,12 +155,11 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo End Sub Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) - 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) CargaDatos() End If @@ -203,25 +181,14 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo Return Str.ToString End Function Private Sub CargaTipoCuentas() - ' Dim ObjTipoCuenta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObjTipoCuenta As New ClsContabilidad '(UsuarioActual.Empresa) - Dim strGlobal As String = "" - If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa, 1, -1) Then - Dim dr As DataRow = ObjTipoCuenta.DtResultados.FiltroPrimero("Codigo IN ('_GLOBAL')") - If dr IsNot Nothing Then strGlobal = dr.Item(0).ToString - DTCuentas = ObjTipoCuenta.DtResultados - DdlTipoCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo IN ('_ACTIVO', '_BPASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')") - End If - 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.SelectedIndex = 1 + Dim ObjTipoCuenta As New ClsContabilidad DdlCuentas.Enabled = True If ObjTipoCuenta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then - DdlCuentas.DataSource = ObjTipoCuenta.DtResultados + DTCuentas = ObjTipoCuenta.DtResultados + DdlCuentas.DataSource = ObjTipoCuenta.DtResultados.FiltraParametros("Codigo NOT IN ('_ACTIVO', '_PASIVO', '_CAPITAL', '_CUADRE', '_ESTADISTICAS', '_ORDEN', '_RACREEDOR', '_RDEUDOR', '_UTILIDAD')") + End If ObjTipoCuenta.Dispose() DdlCuentas.DataBind() @@ -234,7 +201,6 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo CargarSubProyecto(DdlSubproyecto, DdlProyecto.SelectedValue, "Todos") End Sub Private Sub CargaDatos() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) Dim CveProyecto As Integer = DdlProyecto.SelectedValue.ToEntero Dim CveSubProyecto As Integer = DdlSubproyecto.SelectedValue.ToEntero @@ -243,14 +209,13 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo Alert("No ha seleccionado cuenta, Favor de especificar una", TipoMensaje.MsgAdvertencia) Exit Sub End If - IdCuenta = DdlCuentas.SelectedValue.ToEntero + Cuenta = DdlCuentas.SelectedItem.ToString Dim ObjConta As New ClsContabilidad - If ObjConta.GetMovimientosAuxiliaresCatalogo(IdCuenta, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then + If ObjConta.GetMovimientosAuxiliaresCatalogo(DdlCuentas.SelectedValue.ToEntero, FechaInicio, FechaFin, -1, CveProyecto, CveSubProyecto, UsuarioActual.CveEmpresa, TipoReporte, DdlOpcionCuentas.SelectedValue.ToEntero) Then DtDatos = ObjConta.DtResultados DtTotales = DtDatos.Clone - 'InsertaTotales() CargaGrid() Else DtDatos = Nothing @@ -414,17 +379,12 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo #End Region Protected Sub Imprimir_click(sender As Object, e As EventArgs) Handles Imprimir.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) - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - - 'If ObjConta.GetAnexoCatalogo(IdCuenta, FechaInicio, FechaFin) Then - 'DtDatos = ObjConta.DtResultados DtDatos = DtDatos ImprimirReporte() End If @@ -488,21 +448,9 @@ Partial Class Conta_RepMovimientosAuxiliaresCatalogo ImprimirPDF("Empresas/Grales/Formatos/RepMovimientosAuxiliaresCatalogo.rdlc", DtDatos, params, "MovimientosAuxiliares", Formato) 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) End Sub - - End Class diff --git a/Empresas/119/Formatos/Nomina.rdlc b/Empresas/119/Formatos/Nomina.rdlc index 871861e56..fda0e1d71 100644 --- a/Empresas/119/Formatos/Nomina.rdlc +++ b/Empresas/119/Formatos/Nomina.rdlc @@ -2858,7 +2858,15 @@ Lugar de expedición: 83220 Hermosillo - Versión del comprobante: 4.0 + Versión del comprobante: + + + + =Parameters!CFDIVersion.Value + + + =Parameters!UsoCFDI.Value 2 - true @@ -5629,6 +5644,18 @@ Lugar de expedición: 83220 Hermosillo true ReportParameter1 + + String + true + true + ReportParameter1 + + + String + true + true + ReportParameter1 + diff --git a/Empresas/153/Formatos/Nomina.rdlc b/Empresas/153/Formatos/Nomina.rdlc index 0d8b4fcce..410a17868 100644 --- a/Empresas/153/Formatos/Nomina.rdlc +++ b/Empresas/153/Formatos/Nomina.rdlc @@ -2852,7 +2852,15 @@ - Versión del comprobante: 3.3 + Versión del comprobante: + + + + =Parameters!CFDIVersion.Value + + + =Parameters!UsoCFDI.Value 2 + true @@ -2852,7 +2853,15 @@ - Versión del comprobante: 3.3 + Versión del comprobante: + + + + =Parameters!CFDIVersion.Value + + + =Parameters!UsoCFDI.Value + + + =Parameters!CFDIVersion.Value + + + =Parameters!UsoCFDI.Value + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Parameters!SubProyecto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + 2 + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + 0.49417cm @@ -5279,13 +5525,14 @@ Lugar de expedición: 83220 Hermosillo + DsOC - 2.51578cm + 2.33057cm 0.15979cm - 5.0304cm - 19.84967cm + 5.44519cm + 19.84968cm 9 - 18.41425cm + 18.46717cm + + + =First(Fields!Nombre.Value, "Receptor") @@ -3478,9 +3484,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P - Serie/Folio + Serie/Folio: @@ -3492,7 +3498,7 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P Textbox31 0.00031cm 0.47652cm - 1.72389cm + 1.90028cm 7 @@ -3521,9 +3527,9 @@ First(Fields!MonedaP.Value, "Pago") + " - " + First(Fields!TipoCambioP.Value, "P Textbox32 - 1.75948cm + 1.90059cm 0.47652cm - 3.00812cm + 2.86701cm 8 - 10 + 12 @@ -167,6 +173,8 @@ + + @@ -201,10 +209,11 @@ 2pt - 2 + 3 + @@ -215,7 +224,9 @@ - - 4 + 5 + @@ -278,11 +292,15 @@ - - - Textbox209 @@ -296,40 +314,10 @@ 2pt + 3 - - - - true - true - - - - - - - - - Textbox210 - - - 2pt - 2pt - 2pt - 2pt - - - 2 - - + @@ -345,8 +333,16 @@ - UUID - + + + =Parameters!FolioFiscal.Value + - - - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 6 + 9 true @@ -411,6 +373,9 @@ + + + @@ -421,7 +386,9 @@ - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - + true true @@ -575,209 +508,12 @@ Textbox135 - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Días Trabajados - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasLaborados.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Sueldo Correspondiente - - - - - Black - 1pt 2pt 2pt @@ -785,13 +521,42 @@ 2pt - 2 - - + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + true true @@ -818,213 +583,106 @@ 2pt - 3 - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Faltas - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasFaltados.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - R.F.C. - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - 2 - + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + R.F.C + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + true true @@ -1040,7 +698,7 @@ @@ -1051,21 +709,20 @@ 2pt - 3 + 2 - - + true true - + Afi I.M.S.S. @@ -1074,7 +731,7 @@ @@ -1089,112 +746,25 @@ - + true true - Retardos + =Parameters!NSS.Value - - Textbox170 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasRetardos.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - @@ -1210,8 +780,10 @@ 2pt + 2 + @@ -1219,14 +791,20 @@ - + true true - CURP + Departamento + + + + =Parameters!SubProyecto.Value @@ -1235,7 +813,7 @@ @@ -1251,39 +829,6 @@ 2pt - 2 - - - - - - - true - true - - - - - =Parameters!CURP.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - 3 @@ -1291,23 +836,31 @@ - + true true - + Dias Trab. + + + + =Parameters!DiasLaborados.Value - - Textbox160 + Textbox29 @@ -1318,176 +871,105 @@ 2pt - - - - - - true - true - - - - - Días Vacaciones - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasVacaciones.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Tipo de Pago - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - 2 + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Periodo + + + + + + + Textbox177 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -1517,309 +999,11 @@ 2pt - 3 - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Días Incapacidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!DiasIncapacidad.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - Afi I.M.S.S. - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - =Parameters!NSS.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Periodo de - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - + true true @@ -1844,18 +1028,18 @@ - - Textbox187 + Textbox39 - Black - 1pt 2pt 2pt @@ -1870,544 +1054,6 @@ - - 0.6cm - - - - - true - true - - - - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - 2 - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - 3 - - - - - - - - true - true - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha de Pago - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Parameters!FechaPago.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - Black - - 1pt - - 2pt - 2pt - 2pt - 2pt - - - - - - 0.6cm @@ -2460,13 +1106,15 @@ 2pt - 5 + 7 + + @@ -2533,7 +1181,9 @@ Concepto - - 2 + 3 + @@ -2576,7 +1227,9 @@ - + 2 + @@ -2687,7 +1346,9 @@ Concepto - @@ -2859,17 +1526,17 @@ 1pt - 2pt - 2pt - 2pt - 2pt + 1pt + 1pt + 1pt + 1pt - + true true @@ -2878,28 +1545,29 @@ =Fields!ConceptoP.Value - 2pt - 2pt - 2pt - 2pt + 1pt + 1pt + 1pt + 1pt - 2 + 3 + @@ -2911,7 +1579,7 @@ =IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value >0,"$",Nothing) @@ -2944,7 +1612,7 @@ =IIf(not IsNothing(Fields!ConceptoP.Value) ORELSE Fields!ImporteP.Value >0,Fields!ImporteP.Value,nothing) @@ -2965,8 +1633,10 @@ 2pt + 2 + @@ -2978,7 +1648,7 @@ =Fields!NoConceptoD.Value @@ -3014,7 +1684,7 @@ =Fields!ConceptoD.Value @@ -3047,7 +1717,7 @@ =IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value >0,"$"," ") @@ -3080,7 +1750,7 @@ =IIf(not IsNothing(Fields!ConceptoD.Value) ORELSE Fields!ImporteD.Value >0,Fields!ImporteD.Value,nothing) @@ -3111,7 +1781,409 @@ - 0.49417cm + 0.30896cm + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox215 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox216 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox229 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox220 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox221 + + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm @@ -3124,7 +2196,7 @@ @@ -3159,6 +2231,49 @@ + + + + true + true + + + + + + + + + + + + Textbox102 + + + + Black + + 1pt + + + Black + + 1pt + + 2pt + 2pt + 2pt + 2pt + + + + @@ -3170,7 +2285,7 @@ Total Percepciones @@ -3215,7 +2330,7 @@ $ @@ -3258,7 +2373,7 @@ =Fields!ImporteP.Value @@ -3289,8 +2404,10 @@ 2pt + 2 + @@ -3302,7 +2419,7 @@ @@ -3348,7 +2465,7 @@ Total Deducciones @@ -3393,7 +2510,7 @@ $ @@ -3436,7 +2553,7 @@ =Fields!ImporteD.Value @@ -3477,7 +2594,7 @@ - 0.41479cm + 0.36187cm @@ -3490,7 +2607,7 @@ @@ -3510,6 +2627,37 @@ + + + + true + true + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -3521,7 +2669,7 @@ @@ -3552,7 +2700,7 @@ @@ -3583,7 +2731,7 @@ @@ -3616,7 +2764,7 @@ @@ -3638,6 +2786,39 @@ + + + + true + true + + + + + + + + + + + + Textbox241 + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -3649,7 +2830,7 @@ @@ -3680,7 +2861,7 @@ @@ -3711,7 +2892,7 @@ Neto a pagar @@ -3749,7 +2930,7 @@ $ @@ -3792,7 +2973,7 @@ =Fields!ImporteD.Value @@ -3833,7 +3014,7 @@ - 0.30896cm + 0.52062cm @@ -3844,8 +3025,10 @@ - - - 10 + 12 @@ -3874,10 +3057,12 @@ + + - 0.6cm + 0.54708cm @@ -3888,8 +3073,10 @@ - Recibí de la empresa arriba mencionada, la cantidad neta a que este documento se refiere, estando conforme con las - - 10 + 12 @@ -3918,10 +3105,60 @@ + + - 0.6cm + 0.46771cm + + + + + true + true + + + + + se refiere, estando conforme con las + + + + + + 2pt + 2pt + 2pt + 2pt + + + 12 + + + + + + + + + + + + + + + + + 0.46771cm @@ -3932,8 +3169,10 @@ - Percepciones y deducciones que en el aparecen a la fecha [@Empresa] no me adeuda - - 10 + 12 @@ -3962,10 +3201,12 @@ + + - 0.6cm + 0.52062cm @@ -3976,8 +3217,10 @@ - cantidad alguna por concepto de sueldos, ni ningun otro concepto analogo. - - 10 + 12 @@ -4006,10 +3249,12 @@ + + - 1.2cm + 1.27938cm @@ -4040,6 +3285,35 @@ + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -4162,7 +3436,7 @@ - + true true @@ -4173,6 +3447,39 @@ + + + Textbox243 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + @@ -4477,7 +3821,7 @@ - + true true @@ -4488,6 +3832,39 @@ + + + Textbox244 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + - Textbox298 @@ -4545,7 +3926,9 @@ - @@ -4707,13 +4084,13 @@ - 5.11721in + 4.06545in - - - - - - - - - - - <%----%> -
-
-
- -
-
-
- -
- - -
- <%-- -
- - -
--%> -
-
- -
- - -
-
-
-
-
- -
- - -
-
-
- -
-
- -
- - -
-
-
-
-
- -
- - - - - -
-
-
- -
-
-
-
- <%--
--%> -
- - - - - - -
-
-
- - TaReaS -
-
- - - - -
-
-
-
-
-
-
- - - - - - - diff --git a/OI/GraficaGantt.aspx.vb b/OI/GraficaGantt.aspx.vb deleted file mode 100644 index 6e6d8423d..000000000 --- a/OI/GraficaGantt.aspx.vb +++ /dev/null @@ -1,131 +0,0 @@ -Imports Extensiones -Imports System.Data - -Partial Class OI_GraficaGantt - Inherits ClsPaginas - - Private Property DTDatos As DataTable - Get - Return CType(ViewState("DTDatos"), DataTable) - End Get - Set(value As DataTable) - ViewState("DTDatos") = value - End Set - End Property - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - - DdlSegundoNivel.DataBind() - DdlSegundoNivel.Items.Insert(0, New ListItem("Todos", "-1")) - DdlPrimerNivel.DataBind() - DdlPrimerNivel.Items.Insert(0, New ListItem("Todos", "-1")) - CargaCombos() - CargaEventos() - CargaComboP1() - End If - End Sub - - - Private Sub CargaCombos() - 'usuarios - DdlUsuario.DataSource = GlobalDTUsuarios(CveEmpresa:=UsuarioActual.CveEmpresa) - DdlUsuario.DataBind() - DdlUsuario.Items.Insert(0, New ListItem("Todos", "-1")) - DdlUsuario.SelectedValue = -1 - 'Revision - Dim ObjOI As New ClsOIEventos - - If ObjOI.GetRevisionesEventos(UsuarioActual.CveEmpresa) Then - DdlRevision.DataSource = ObjOI.DtResultados - DdlRevision.DataBind() - End If - ObjOI.Dispose() - DdlRevision.Items.Insert(0, New ListItem("Todos", "-1")) - DdlRevision.SelectedValue = -1 - End Sub - - Protected Sub CargaEventos() - Dim de As Integer = DdlUsuario.SelectedValue - Dim cverevision As Integer = DdlRevision.SelectedValue - Dim objoi As New ClsOIEventos - If objoi.GetEventosProyecto(UsuarioActual.CveEmpresa, de, cverevision, DdlPrimerNivel.SelectedValue, DdlSegundoNivel.SelectedValue) Then - DTDatos = objoi.DtResultados - End If - objoi.Dispose() - End Sub - Private Sub CargaComboP1() - DdlPrimerNivel.Items.Clear() - DdlPrimerNivel.DataSource = DTDatos.FiltraParametros("CveEventoPadre = 0") - DdlPrimerNivel.DataBind() - DdlPrimerNivel.Items.Insert(0, New ListItem("Todos", "-1")) - DdlSegundoNivel.Items.Clear() - DdlSegundoNivel.DataBind() - DdlSegundoNivel.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub - - Private Sub CargaComboP2() - DdlSegundoNivel.Items.Clear() - DdlSegundoNivel.DataSource = DTDatos.FiltraParametros(String.Format("CveEventoPadre = {0} OR {0}=-1", DdlPrimerNivel.SelectedValue)) - DdlSegundoNivel.DataBind() - DdlSegundoNivel.Items.Insert(0, New ListItem("Todos", "-1")) - End Sub - Protected Sub DdlPrimerNivel_SelectedIndexChanged(sender As Object, e As EventArgs) Handles DdlPrimerNivel.SelectedIndexChanged - CargaComboP2() - End Sub - Public Function DTTogant() As String - Dim StrDatos As New StringBuilder - StrDatos.Append("{""data"": [ ") - Dim dttemp As DataTable = GetDatos() - If Not (dttemp Is Nothing) Then - For Each item As DataRow In dttemp.Rows '28-03-2013 - Dim duracion = DateDiff(DateInterval.Day, item("FechaInicio").ToString().ToDate(), item("FechaFin").ToString().ToDate()) - If item("ISFhater").ToString = "1" Then - StrDatos.AppendFormat("{{""id"": {0}, ""text"": ""{1}"", ""start_date"": ""{2}"",""type"":""Project"", ""progress"": {4},""parent"":{5}, ""open"": true,""end_date"": ""{6}"",""users"":""{7}""}},", item("CveEvento").ToString, item("Asunto").ToString, If(item("FechaInicio").ToString <> "", item("FechaInicio").ToString().Substring(0, 10), ""), duracion, item("Avance").ToString.ToEntero / 100, item("CveEventoPadre").ToString().ToEntero, If(item("FechaFin").ToString <> "", item("FechaFin").ToString().Substring(0, 10), ""), item("UsuarioDe").ToString) - Else - StrDatos.AppendFormat("{{""id"": {0}, ""text"": ""{1}"", ""start_date"": ""{2}"", ""duration"": ""{3}"", ""progress"": {4},""parent"":{5}, ""open"": true,""end_date"": ""{6}"",""users"":""{7}""}},", item("CveEvento").ToString, item("Asunto").ToString, If(item("FechaInicio").ToString <> "", item("FechaInicio").ToString().Substring(0, 10), ""), duracion, item("Avance").ToString.ToEntero / 100, item("CveEventoPadre").ToString().ToEntero, If(item("FechaFin").ToString <> "", item("FechaFin").ToString().Substring(0, 10), ""), item("UsuarioDe").ToString) - End If - - Next - End If - - Return StrDatos.ToString.Substring(0, StrDatos.ToString.Length - 1) & "]}" - End Function - - Public Function GetDatos() As DataTable - Dim dt As DataTable = DTDatos.Copy - - 'If Not (DdlPrimerNivel.SelectedValue = -1 And DdlSegundoNivel.SelectedValue = -1) Then - ' dt.Clear() - 'End If - Return dt - End Function - - - Protected Sub NewUser_Click(sender As Object, e As EventArgs) Handles NewUser.Click - Dim FechaI As Date = FechaInicio.Value.ToDate() - Dim Fechaf As Date = FechaI.AddDays(Duracion.Value.ToEntero) - Dim objOI As New ClsOIEventos - If objOI.AddEventoProyecto(Asunto.Value, Asunto.Value, 1, UsuarioActual.CveUsuario, -1, FechaI, Fechaf, - EventoPadre.Value.ToEntero, -1, "", -1, -1, -1, -1, -1, -1, -1, -1, UsuarioActual.CveUsuario,-1, - UsuarioActual.CveEmpresa) Then - Dim newrow As DataRow = DTDatos.NewRow() - newrow("CveEvento") = objOI.CveEvento - newrow("Asunto") = Asunto.Value - newrow("FechaInicio") = FechaInicio.Value - newrow("FechaFin") = Fechaf.ToString("dd/MM/yyyy") - newrow("CveEventoPadre") = EventoPadre.Value - DTDatos.Rows.Add(newrow) - Else - Alert("No se logro agregar la tarea", TipoMensaje.MsgInformacion) - - End If - objOI.Dispose() - - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - CargaEventos() - ' RegistraScript(String.Format("debugger;gantt.parse('{0}');datagant='{0}';", DTTogant())) - End Sub -End Class diff --git a/Ventas/RepABT.aspx b/Ventas/RepABT.aspx deleted file mode 100644 index 168c55b22..000000000 --- a/Ventas/RepABT.aspx +++ /dev/null @@ -1,132 +0,0 @@ -<%@ Page Title="" Language="VB" MasterPageFile="~/Site.master" AutoEventWireup="false" CodeFile="RepABT.aspx.vb" Inherits="Ventas_RepABT" %> - - - - -   -   - - - - - - - - - - - - - <%-- - --%> -
-
-
- - -
-
-
- -
- - - -
- -
- - - - - - - - - - - - - -
-
-
-
-
- <%--
-
--%> - -
-
- - - - - - - - - - - - - - - - - - - -
TipoFolioClienteSucursalFecha VentaMesa# PerFecha CorteTotal
-
- - - - - - - - - - - - - - - - - -
<%# Eval("TipoDocto") %><%# Eval("SerieFolio") %><%# Eval("Cliente")%><%# Eval("Sucursal")%><%# Eval("FechaVenta", "{0:d}")%><%# Eval("Mesa")%><%# Eval("NumeroPersonas")%><%# Eval("FechaCorte", "{0:d}")%><%# Eval("TotalRemision", "{0:F2}")%>
- - - - - - - -
- <%----%> -
-
- <%-- - - - - - - - - - - - - --%> -
- - - -
-
-
-
- diff --git a/Ventas/RepABT.aspx.vb b/Ventas/RepABT.aspx.vb deleted file mode 100644 index 1a64bf119..000000000 --- a/Ventas/RepABT.aspx.vb +++ /dev/null @@ -1,73 +0,0 @@ -Option Explicit On -Option Strict On - -Imports Extensiones -Imports System.Data - -Partial Class Ventas_RepABT - Inherits ClsPaginas - - 'Private ReadOnly Property Ejercicio As Integer - ' Get - ' Return ViewState("Ejercicio") - ' End Get - 'End Property - - 'Private ReadOnly Property Periodo As Integer - ' Get - ' Return ViewState("Periodo") - ' End Get - 'End Property - - Private Property DtDatos As datatable - Get - Return CType(ViewState("DtDatos"), DataTable) - End Get - Set(value As datatable) - ViewState("DtDatos") = value - End Set - End Property - - Protected Sub Page_Load(sender As Object, e As EventArgs) Handles Me.Load - If Not IsPostBack Then - 'If Request("Ejercicio") IsNot Nothing AndAlso IsNumeric(Request("Ejercicio")) Then - ' ViewState("Ejercicio") = Request("Ejercicio") - 'End If - 'If Request("Periodo") IsNot Nothing AndAlso IsNumeric(Request("Periodo")) Then - ' ViewState("Periodo") = Request("Periodo") - 'End If - DdlEjercicio.SelectedValue = Now.Year.ToString - DdlPeriodo.SelectedValue = Now.Month.ToString - CargaDatos() - End If - End Sub - - Private Sub CargaDatos() - Dim ObjVentas As New ClsVentas - If ObjVentas.GetRepABT(DdlEjercicio.SelectedValue.ToEntero, DdlPeriodo.SelectedValue.ToEntero) Then - GvRepABT.DataSource = ObjVentas.DtResultados.FiltraParametros("", DistinctColumns:={"CveVenta", "TipoDocto", "SerieFolio", "Cliente", "SubProyecto", "FechaVenta", "Mesa", "NumeroPersonas", "TotalRemision", "FechaCorte"}) - Else - GvRepABT.DataSource = Nothing - End If - DtDatos = ObjVentas.DtResultados - ObjVentas.Dispose() - GvRepABT.DataBind() - End Sub - - Protected Sub ImgExcel_Click(sender As Object, e As EventArgs) Handles ImgExcel.Click - GvRepABT.ExportToExcel("Reporte ABT") - End Sub - - Protected Sub GvRepABT_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvRepABT.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - - e.Row.FCGridView("GvD").DataSource = DtDatos.FiltraParametros(String.Format("CveVenta = {0}", e.Row.DBCampo("CveVenta"))) - e.Row.FCGridView("GvD").DataBind() - End If - End Sub - - Protected Sub BtnConsultar_Click(sender As Object, e As EventArgs) Handles BtnConsultar.Click - CargaDatos() - UpDatos.Update() - End Sub -End Class diff --git a/Ventas/Ventas.aspx.vb b/Ventas/Ventas.aspx.vb index edcca241e..61376ad6f 100644 --- a/Ventas/Ventas.aspx.vb +++ b/Ventas/Ventas.aspx.vb @@ -2820,24 +2820,16 @@ Partial Class Ventas CargaRelacionadasPendientes() End If - 'DdlSucursal.Enabled = False DdlSubProyectoDatos.Enabled = False BtnEmitirImprimir.Visible = False BtnCrearApartirDe.Visible = True - If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then - BtnCrearApartirDe.Visible = False - End If - If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue = "Ing" Then BtnEditar.Visible = True + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then BtnCrearApartirDe.Visible = False - If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue = "Egs" AndAlso LblSeTimbro.Text = "No" Then - BtnEditar.Visible = True - End If - 'DdlEstatus.Enabled = True + If UsuarioActual.TienePermisoProceso(302) AndAlso DdlTipoComprobante.SelectedValue.Contiene("Ing", "Ant", "Egs") AndAlso LblSeTimbro.Text = "No" Then BtnEditar.Visible = True DivFechaAnticipoCliente.Visible = True TxtFechaAnticipoCliente.Text = Now.ToShortDateString - ImgAddObs.Visible = True CargaEventoBitacora() @@ -11406,6 +11398,7 @@ Partial Class Ventas dr("CveUM") = drpss("CveUnidadMedida") dr("SATClaveProdServ") = "84111506" dr("SATClaveUM") = "ACT" + dr("CodigoObjetoImpuesto") = drpss("CodigoObjetoImpuesto") dr("Consec") = ii dr("PorcentajeIVA") = Drr("PorcentajeIVA").ToString().ToDecimal @@ -12665,8 +12658,7 @@ Partial Class Ventas End If - - Dim totSubTotal As Decimal = If(UsuarioActual.Empresa.CvePAC = 3, Obj.DtDetalle.SUMD("Total"), Obj.SubTotal) 'Obj.SubTotal + Dim totSubTotal As Decimal = Obj.SubTotal Dim totIVA As Decimal = Obj.IVA Dim totRetIVA As Decimal = Obj.RetIVA Dim totRetISR As Decimal = Obj.RetISR @@ -12700,7 +12692,7 @@ Partial Class Ventas Dim concepto As New CFDIConceptos With {.Cantidad = drr("Cantidad").ToString().ToDecimal, .Descripcion = tPS, .ValorUnitario = drr("PU").ToString().ToDecimal, - .Importe = If(UsuarioActual.Empresa.CvePAC = 3, drr("Total").ToString().ToDecimal.RoundSQL(2), drr("TotalImporte").ToString().ToDecimal), + .Importe = drr("TotalImporte").ToString().ToDecimal, .Descuento = drr("Descuento").ToString().ToDecimal.RoundSQL(2), .Unidad = drr("UM").ToString(), .ClaveUnidad = drr("SATClaveUM").ToString(), @@ -12712,6 +12704,7 @@ Partial Class Ventas 'verifica suma subtotales If i = Obj.DtDetalle.Rows.Count AndAlso totSubTotal.RoundSQL(2) <> concepto.Importe.RoundSQL(2) AndAlso Math.Abs(totSubTotal.RoundSQL(2) - concepto.Importe.RoundSQL(2)) <= 0.01 Then 'proceso de ajusta de decimales concepto.Importe = totSubTotal + 'concepto.ValorUnitario = totSubTotal / concepto.Cantidad End If totSubTotal = totSubTotal - concepto.Importe @@ -12849,25 +12842,12 @@ Partial Class Ventas Timbre.Complementos.ComercioExterior11.Destinatario.Pais = RowDireccion("ClaveSATPais").ToString() Timbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib = RowDireccion("COM_NumRegIdTrib").ToString() - 'Timbre.Complementos.ComercioExterior11.Destinatario.Nombre = "FARMIND CORPORATION" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Calle = "Kandaizumicho Bldg" - 'Timbre.Complementos.ComercioExterior11.Destinatario.NumeroExterior = "7F" - 'Timbre.Complementos.ComercioExterior11.Destinatario.NumeroInterior = "" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Colonia = "" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Localidad = "Chiyoda-ku" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Referencia = "" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Municipio = "Kandaizumicho" - 'Timbre.Complementos.ComercioExterior11.Destinatario.CP = "101-0024" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Estado = "Tokyo" - 'Timbre.Complementos.ComercioExterior11.Destinatario.Pais = "JPN" - 'Timbre.Complementos.ComercioExterior11.Destinatario.NumRegIdTrib = "2010401130418" End If Else Timbre.Complementos.ComercioExterior11.Destinatario = Nothing End If - 'MERCANCIAS For Each Gvr As GridViewRow In GvComercioExterior.Rows Dim mercancia As New CFDIComercioExterior11Mercancias With {.CantidadAduana = Gvr.FCTextBox("TxtCantidad").Text.ToDecimal, @@ -12884,15 +12864,10 @@ Partial Class Ventas i += 1 Next - Else Timbre.Complementos.ComercioExterior11.AplicaComercioExteriorSubProyecto = False End If - - - - Return Timbre End Function