diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index 83377e9b8..d2a33c406 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -941,7 +941,7 @@ Public Class ClsCompras Public Function GetRepProductosServicios(CveProyecto As Integer, CveSubProyecto As String, CveCategoria As String, CveClasificacion As Integer, CvePS As Integer, FechaI As Date, FechaF As Date, CveProveedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveFamilia As Integer, CveSubFamilia As Integer, CveTipoActivoFijo As String, CveSubTipoActivoFijo As String, CveActivoFijo As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, Optional TipoGasto As String = "-1", - Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean + Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional Deducible As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_GetRepPS") @@ -969,6 +969,7 @@ Public Class ClsCompras .Add("@TipoGasto", SqlDbType.VarChar).Value = TipoGasto .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@Deducible", SqlDbType.Int).Value = Deducible End With Try @@ -984,7 +985,7 @@ Public Class ClsCompras FechaF As Date, CveProveedor As Integer, CveUsuario As Integer, CveEstatus As Integer, CveEmpresa As Integer, Gpo As Integer, CveFamilia As Integer, CveSubFamilia As Integer, CveTipoActivoFijo As String, CveSubTipoActivoFijo As String, CveActivoFijo As Integer, CveMoneda As Integer, TipoCambio As Integer, Optional TCEspecifico As Double = -1, - Optional TipoGasto As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1") As Boolean + Optional TipoGasto As String = "-1", Optional CveUsuarioConsulta As Integer = -1, Optional TipoDocto As String = "-1", Optional Deducible As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_GetRepPSDetalle") @@ -1016,6 +1017,8 @@ Public Class ClsCompras .Add("@CveMoneda", SqlDbType.Int).Value = CveMoneda .Add("@CveUsuarioConsulta", SqlDbType.Int).Value = CveUsuarioConsulta .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto + .Add("@Deducible", SqlDbType.Int).Value = Deducible + End With Try diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 5f44efe8a..d251f6f23 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -1026,7 +1026,7 @@ Public Class ClsContabilidad Concepto = $"{NombreComercial} F:{SerieFolio}" End Select - Case 119 + Case 119, 158 Select Case CveConcepto Case 2, 17 'Pago Proveedores @@ -1038,13 +1038,13 @@ Public Class ClsContabilidad Case 6 'Compra Case 13, 61 'iva ventas - Concepto = SerieFolio + Concepto = String.Format("{0} - {1}", NombreComercial, SerieFolio) Case 14, 19 'iva compras Concepto = SerieFolio Case 38, 39 'ieps ventas - Concepto = SerieFolio + Concepto = String.Format("{0} - {1}", NombreComercial, SerieFolio) Case 25, 26 'eips compras Concepto = SerieFolio @@ -6438,5 +6438,24 @@ Public Class ClsContabilidad Return Retorno End Function + Public Function UpdateProveedorPoliza(CveOrdenCompra As Integer, CveProveedor As Integer, Concepto As String) As Boolean + Dim Retorno = False + DataAdapter("PA_Conta_ActualizarProveedor") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveOrdenCompra", SqlDbType.Int).Value = CveOrdenCompra + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@Proveedor", SqlDbType.VarChar).Value = Concepto + + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + Me.OnError("Ocurrió un error al obtener traspasar las Prepolizas", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + + Return Retorno + End Function End Class \ No newline at end of file diff --git a/App_Code/ClsGenerales.vb b/App_Code/ClsGenerales.vb index f9f915c25..55c6e7eca 100644 --- a/App_Code/ClsGenerales.vb +++ b/App_Code/ClsGenerales.vb @@ -2619,13 +2619,15 @@ Public Class ClsGenerales #End Region #Region "SAT PRODUCTOS SERVICIOS Y UNIDAD DE MEDIDA" - Public Function GetSATProductosServicios(Optional SATClaveProductoServicio As String = "-1", Optional CveSATPS As Integer = -1) As Boolean + Public Function GetSATProductosServicios(Optional CodigoSAT As String = "-1", Optional SATClaveProductoServicio As String = "-1", Optional CveSATPS As Integer = -1) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Gral_SAT_ProductosServiciosGet") With SqlAdapter.SelectCommand.Parameters + .Add("@CodigoSAT", SqlDbType.VarChar).Value = CodigoSAT .Add("@SATClaveProductoServicio", SqlDbType.VarChar).Value = SATClaveProductoServicio .Add("@CveSATPS", SqlDbType.Int).Value = CveSATPS + End With 'SqlTypes.SqlDateTime.Null Try diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 80494b780..502e985bb 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1807,7 +1807,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Calle As String, NumExt As String, NumInt As String, Colonia As String, CP As String, Ciudad As String, CveEstado As Integer, Telefono As String, Celular As String, RFC As String, CURP As String, NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveUsuario As Integer, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, - Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False) As Boolean + Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Boolean = False, Optional CvePais As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -1889,6 +1889,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@ContactoAlterno", SqlDbType.VarChar).Value = ContactoAlterno .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@Sindicalizado", SqlDbType.Bit).Value = Sindicalizado + .Add("@CvePais", SqlDbType.Int).Value = CvePais .Add("@RETURN_VALUE", SqlDbType.Int).Direction = ParameterDirection.ReturnValue @@ -1921,7 +1922,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo NombrePadre As String, NombreMadre As String, CveSATBanco As Integer, CveSATRiesgoPuesto As Integer, CveSATRegimenContratacion As Integer, CveClienteAsignado As Integer, CveSubProyecto As Integer, CvePersonal As Integer, URL As String, CveSupervisor As Integer, CLABE As String, BancoNumCuenta As String, CveJornada As Integer, IdCtaContPersonal As Integer, CtaContPersonal As String, IdCtaContPrestamos As Integer, CtaContPrestamos As String, CveEmpresa As Integer, CveUsuarioNomina As Integer, Optional CveSubProyectoZona As Integer = Nothing, Optional CveUniforme As Integer = -1, Optional TelefonoExtension As String = "-1", Optional CelularPersonal As String = "-1", Optional TelefonoMarcadoRapido As String = "-1", Optional ContactoAlterno As String = "-1", Optional CveUsuarioModifico As Integer = -1, - Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1) As Boolean + Optional FechaActivo As Date = MinFecha, Optional FechaReingreso As Date = MinFecha, Optional CveTipodeSalario As Integer = 1, Optional Sindicalizado As Integer = -1, Optional CvePais As Integer = -1) As Boolean Dim Retorno As Boolean = False @@ -2007,6 +2008,7 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo .Add("@FechaReingreso", SqlDbType.Date).Value = FechaReingreso .Add("@CveTipodeSalario", SqlDbType.Int).Value = CveTipodeSalario .Add("@Sindicalizado", SqlDbType.Int).Value = Sindicalizado + .Add("@CvePais", SqlDbType.Int).Value = CvePais End With @@ -6738,10 +6740,27 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActual}", fechaActual)) ListaTagsDocumentost.Add(New TagsDocumentos("{FechaActualDF}", FechaActualDF)) - ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString)) - ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", "")) - ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString)) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{HoraInicioJornada}", DtResultados(0)("HorarioDe").ToString)) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{HoraFinJornada}", DtResultados(0)("HorarioA").ToString)) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{Salario}", "")) + 'ListaTagsDocumentost.Add(New TagsDocumentos("{MetodoPago}", DtResultados(0)("MetodoPago").ToString)) + + If MinFecha = DtResultados(0)("FechaFinContrato").ToString.ToDate Then + ListaTagsDocumentost.Add(New TagsDocumentos("{FechaFin}", "Sin Fecha Fin")) + Else + ListaTagsDocumentost.Add(New TagsDocumentos("{FechaFin}", DtResultados(0)("FechaFinContrato").ToString.ToDate.ToString("dd/MM/yyyy"))) + End If + + ListaTagsDocumentost.Add(New TagsDocumentos("{Sexo}", DtResultados(0)("Genero").ToString)) + ListaTagsDocumentost.Add(New TagsDocumentos("{NombreEmpresa}", DtResultados(0)("Empresa").ToString)) + + Dim SalarioDiarioTag As String = DtResultados(0)("SalarioDiario").ToString.ToDouble.Texto2Letras() + + ListaTagsDocumentost.Add(New TagsDocumentos("{Sueldo}", DtResultados(0)("SalarioDiario").ToString.ToDouble.ToString("###,###,###.00"))) + ListaTagsDocumentost.Add(New TagsDocumentos("{SueldoLetra}", SalarioDiarioTag)) + ListaTagsDocumentost.Add(New TagsDocumentos("{Nacionalidad}", DtResultados(0)("ClaveSATPaisDescripcion").ToString)) + + End If diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 420e86ef7..a47720df8 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -2267,7 +2267,6 @@ Namespace Modelos Dim importeMovimiento As Decimal Dim FechaMovimiento As Date = ObjFactura.Fecha Dim IdCtaContable As Integer - Dim CveCuenta As Integer Dim IdCtaContableCliente As Integer Dim CveCuentaCliente As Integer Dim Concepto As String = ObjFactura.SerieFolio @@ -2293,9 +2292,7 @@ Namespace Modelos If GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=ObjFactura.DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows.Count > 0 Then IdCtaIVAXTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVAXTrasladar").ToString.ToEntero - CveCuentaIVAxTrasladar = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveCuentaIVAXTrasladar").ToString.ToEntero IdCtaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("IdCtaIVATrasladado").ToString.ToEntero - CveCuentaIVATrasladado = GlobalDTClasificacionPorcentaje(UsuarioActual.CveEmpresa, PorcentajeIVA:=DtDetalle.MAX("PorcentajeIVA").ToDouble).Rows(0)("CveCuentaIVATrasladado").ToString.ToEntero End If Dim UsaComplementariaClientes As Boolean = True @@ -2310,7 +2307,6 @@ Namespace Modelos TipoMovimiento = If(Row("TipoMovto").ToString = "True", True, False) importeMovimiento = 0 IdCtaContable = 0 - CveCuenta = 0 CveSubProyectoContabilizar = 0 Multiplicador = (Row("Multiplicador").ToString.ToEntero) Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, ConceptoContable, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", "") @@ -2332,23 +2328,19 @@ Namespace Modelos If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria - CveCuenta = 0 - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True End If End If IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If IdCtaContableCliente = IdCtaContable - CveCuentaCliente = CveCuenta End If Case 3 'Cliente @@ -2359,7 +2351,6 @@ Namespace Modelos importeMX = importeMovimiento * tipoCambio * Multiplicador FechaMovimiento = ObjFactura.FechaPago IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" End If @@ -2375,16 +2366,13 @@ Namespace Modelos If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If IdCtaContableCliente = IdCtaContable - CveCuentaCliente = CveCuenta - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 190, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 193, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Else @@ -2405,13 +2393,10 @@ Namespace Modelos If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes Else IdCtaContable = ObjFactura.Cliente.IdCtaContMonedaExtranjera - CveCuenta = ObjFactura.Cliente.CveCuentaMonedaExtranjera End If IdCtaContableCliente = IdCtaContable - CveCuentaCliente = CveCuenta Dim CveMovimiento As Integer = -1 Dim CveAlmacen As Integer = -1 @@ -2435,11 +2420,11 @@ Namespace Modelos Dim Importe318 As Decimal = importeMovimiento - Importe68 - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, Importe318, Referencia, 318, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Importe318, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If @@ -2448,8 +2433,8 @@ Namespace Modelos End If Else - If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, 277, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, Not TipoMovimiento, importeMovimiento, Referencia, 278, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), Contabilizable:=False, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Else @@ -2474,15 +2459,13 @@ Namespace Modelos IdCtaContable = 0 If tipoCambio = 1 Then IdCtaContable = ObjFactura.Cliente.IdCtaContClientes - CveCuenta = ObjFactura.Cliente.CveCuentaClientes ElseIf UsaComplementariaClientes Then IdCtaContable = ObjFactura.Cliente.IdCtaContComplementaria - CveCuenta = 0 - If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or CveCuenta > 0 Or UsaComplementariaClientes) Then + If importeMovimiento <> 0 AndAlso (IdCtaContable > 0 Or UsaComplementariaClientes) Then importeMX = importeMovimiento - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, 0, Referencia, 203, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=Math.Round(importeMovimiento * tipoCambio - importeMovimiento, 2, MidpointRounding.AwayFromZero), ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If End If @@ -2497,11 +2480,8 @@ Namespace Modelos CuentasContablesInvalidas.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) idCuentaContabilizacion = 0 End If - 'If CveCuenta <= 0 Then - ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString) - ' CveCuentaContabilizacion = 0 - 'End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True @@ -2594,16 +2574,14 @@ Namespace Modelos CveConceptoFluctua = 65 TipoMovtoFluctua = False IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria Else CveConceptoFluctua = 64 TipoMovtoFluctua = True IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria End If Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL) * ValorMultiplicador - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=Dr("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=TipoCambioNC, TipoCambioPago:=Dr("TCCambioValuacion").ToString.ToDecimal, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=Dr("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=TipoCambioNC, TipoCambioPago:=Dr("TCCambioValuacion").ToString.ToDecimal) Then ErrorPrepoliza = True Exit For End If @@ -2687,16 +2665,14 @@ Namespace Modelos CveConceptoFluctua = 65 TipoMovtoFluctua = False IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria Else CveConceptoFluctua = 64 TipoMovtoFluctua = True IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria End If Dim ImporteFluctuacion As Decimal = Math.Abs((importeMovimientoDev * difFluctuacion).RoundSQL) * ValorMultiplicador - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=CveVentaDevolucion, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=TipoCambioFactura) Then ErrorPrepoliza = True Exit For End If @@ -2760,7 +2736,6 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" CveIEAnticipo = -1 IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta Dim CveVenta As Integer = ObjFactura.CveVenta @@ -2781,7 +2756,7 @@ Namespace Modelos If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=CveVenta, CveVentaAmortizacion:=CveVentaAmortizacion, CveCliente:=ObjFactura.CveCliente, - CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + CveIE:=CveIEAnticipo, ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Exit For @@ -2809,13 +2784,12 @@ Namespace Modelos If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If importeMovimiento <> 0 Then If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIEAnticipo, - ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + ImporteMX:=importeMovimiento * tipoCambio, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Exit For @@ -2835,7 +2809,6 @@ Namespace Modelos For Each Row2 As DataRow In DT.Rows importeMovimiento = Math.Abs(Row2("PU").ToString.ToDecimal) IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" @@ -2844,7 +2817,7 @@ Namespace Modelos ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveVentaAmortizacion:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, ImporteMX:=importeMovimiento * tipoCambio, - ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True Else @@ -2977,16 +2950,14 @@ Namespace Modelos CveConceptoFluctua = 65 TipoMovtoFluctua = False IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaPerdidaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaPerdidaCambiaria Else CveConceptoFluctua = 64 TipoMovtoFluctua = True IdCtaContableFluctua = UsuarioActual.Empresa.IdCuentaGananciaCambiaria - CveCuenta = UsuarioActual.Empresa.CveCuentaGananciaCambiaria End If Dim ImporteFluctuacion As Decimal = Math.Abs((Importe251 * difFluctuacion).RoundSQL) * ValorMultiplicador - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=row2("TCCambioValuacion").ToString.ToDecimal, CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovtoFluctua, ImporteFluctuacion, Referencia, CveConceptoFluctua, Concepto, FechaMovimiento, IdCtaContableFluctua, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=row2("CveVenta").ToString.ToEntero, ImporteMX:=ImporteFluctuacion, ImporteME:=ImporteFluctuacion, CveSubProyecto:=CveSubProyectoContabilizar, TipoCambio:=tipoCambio, TipoCambioPago:=row2("TCCambioValuacion").ToString.ToDecimal) Then ErrorPrepoliza = True Exit For End If @@ -3005,7 +2976,6 @@ Namespace Modelos sumaAmorticaciones += importeMovimiento If tipoCambio > 1 Then Concepto += $" TC:{tipoCambio} ${importeMovimiento.FormatoNumero(2)}" IdCtaContable = ObjFactura.Cliente.IdCtaContAnticipos - CveCuenta = ObjFactura.Cliente.CveCuentaAnticipos CveSubProyectoContabilizar = CveSubProyectoVenta If importeMovimiento <> 0 Then @@ -3014,7 +2984,7 @@ Namespace Modelos ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=row2("CveVenta").ToString.ToEntero, CveCliente:=ObjFactura.CveCliente, CveVentaAmortizacion:=ObjFactura.CveVenta, ImporteMX:=importeMovimiento * tipoCambio, - ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, + ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, Contabilizable:=Contabilizable) Then ErrorPrepoliza = True End If @@ -3092,11 +3062,6 @@ Namespace Modelos idCuentaContabilizacion = 0 End If - 'If CveCuenta <= 0 Then - ' CuentasContablesInvalidasSIG.Append("
" & GlobalDTContaConceptosContables(-1).FiltroPrimero(String.Format("CveConceptoContable = {0}", ConceptoContable))("ConceptoContable").ToString + GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Clasificacion", $"CveClasificacion = {Row2("CveClasificacion").ToString}")) - ' CveCuentaContabilizacion = 0 - 'End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContableAplicar, Concepto, ObjFactura.Fecha, IdCtaContable, -1, CveVenta:=CveVentaAplicar, CveVentaAmortizacion:=CveVentaAmortizacionAplicar, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, CveClasificacion:=Row2("CveClasificacion").ToString.ToEntero, CveSubProyecto:=Row2("CveSubProyecto").ToString.ToEntero, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), TipoCambio:=tipoCambio, PorcentajeImpuesto:=Row2("PorcentajeIVA").ToString().ToDecimal) Then ErrorPrepoliza = True Else @@ -3283,16 +3248,6 @@ Namespace Modelos End If End If - 'Contabilidad SIG - If ObjFactura.Cliente.CveCuentaRetIVA > 0 Then - CveCuenta = ObjFactura.Cliente.CveCuentaRetIVA - Else - If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetIVACirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 313 'Ret Iva Servicios @@ -3346,16 +3301,6 @@ Namespace Modelos End If End If - 'Contabilidad SIG - If ObjFactura.Cliente.CveCuentaRetISR > 0 Then - CveCuenta = ObjFactura.Cliente.CveCuentaRetISR - Else - If ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then - If ObjConta.DtResultados.Rows.Count > 0 Then - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaRetISRCirculacionSIG").ToString.ToEntero - End If - End If - End If End If Case 13 'Iva por Trasladar If Not ObjFactura.TipoDocto.Contiene("Rem", "RNC") Then @@ -3371,10 +3316,8 @@ Namespace Modelos importeMX = importeMX * -1 IdCtaContable = If(IdCtaIVATrasladado > 0, IdCtaIVATrasladado, UsuarioActual.Empresa.IdCuentaIVATrasladado) - CveCuenta = If(CveCuentaIVATrasladado > 0, CveCuentaIVATrasladado, UsuarioActual.Empresa.CveCuentaIVATrasladado) Else IdCtaContable = If(IdCtaIVAXTrasladar > 0, IdCtaIVAXTrasladar, UsuarioActual.Empresa.IdCuentaIVAxTrasladar) - CveCuenta = If(CveCuentaIVAxTrasladar > 0, CveCuentaIVAxTrasladar, UsuarioActual.Empresa.CveCuentaIVAxTrasladar) End If CveSubProyectoContabilizar = CveSubProyectoVenta @@ -3432,14 +3375,12 @@ Namespace Modelos If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladado").ToString().ToEntero() - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSTrasladadoSIG").ToString().ToEntero() End If End If Else If importeMovimiento <> 0 AndAlso ObjConta.GetRetCuenta(ConceptoContable, ObjFactura.CveEmpresa) Then If ObjConta.DtResultados.Rows.Count > 0 Then IdCtaContable = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladar").ToString().ToEntero() - CveCuenta = ObjConta.DtResultados.Rows(0)("IdCuentaIEPSxTrasladarSIG").ToString().ToEntero() End If End If End If @@ -3490,7 +3431,6 @@ Namespace Modelos importeMovimiento = DrPago("Importe").ToString.ToDecimal * ValorMultiplicador importeMX = importeMovimiento * tipoCambio * Multiplicador IdCtaContable = 0 - CveCuenta = 0 CveSubProyectoContabilizar = CveSubProyectoVenta Dim PorcentajeImpuestoPago As Decimal = TmpDTDetalle.MAX("PorcentajeIVA").ToDecimal @@ -3512,7 +3452,7 @@ Namespace Modelos 'BANCOS Concepto = ObjConta.ObtenerConceptoEmpresa(UsuarioActual.CveEmpresa, 30, ObjFactura.Cliente.Nombre, $"{ObjFactura.Serie}-{ObjFactura.Folio}", FolioIE.ToString) - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, Fecha, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=CveCliente, CveIE:=CveIEPago, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento)) Then ErrorPrepoliza = True Exit For End If @@ -3580,7 +3520,7 @@ Namespace Modelos ' CveCuentaContabilizacion = 0 'End If - If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then + If Not ObjConta.AddPrePolizasDetalle(ObjFactura.CvePrePoliza, TipoMovimiento, importeMovimiento, Referencia, ConceptoContable, Concepto, FechaMovimiento, IdCtaContable, -1, CveVenta:=ObjFactura.CveVenta, CveCliente:=ObjFactura.CveCliente, CveIE:=CveIE, ImporteMX:=importeMX, ImporteME:=If(tipoCambio = 1, 0, importeMovimiento), CveSubProyecto:=CveSubProyectoContabilizar, PorcentajeImpuesto:=PorcentajeImpuesto, TipoCambio:=tipoCambio, Contabilizable:=SeContabiliza) Then ErrorPrepoliza = True Else ObjFactura.SeGuardoPrePoliza = True @@ -4035,7 +3975,7 @@ Namespace Modelos CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaGastoSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero Try If ValorInventario <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=Me.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, False, ValorInventario, Me.SerieFolio, 69, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True Exit For End If @@ -4048,7 +3988,7 @@ Namespace Modelos If Not OcurrioError Then IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero ValorInventario = Math.Round(DtCostos.SUM("Total", "").ToDecimal, 2, MidpointRounding.AwayFromZero) - If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveCuenta:=CveCuenta, CveSubProyecto:=Me.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(Me.CvePrePoliza, True, ValorInventario, Me.SerieFolio, 68, Me.SerieFolio, Me.Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=Me.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=ValorInventario, CveSubProyecto:=Me.CveSubProyecto) Then OcurrioError = True End If End If @@ -4210,7 +4150,7 @@ Namespace Modelos IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then OcurrioError = True End If 'End If @@ -4351,7 +4291,7 @@ Namespace Modelos IdCtaContable = GlobalDTAlmacen(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCtaContable", String.Format("CveAlmacen = {0}", CveAlmacen)).ToEntero() 'If TotalCosto <> 0 Then - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveCuenta:=CveCuenta, CveSubProyecto:=factura.CveSubProyecto) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, TipoMovto68, TotalCosto, factura.SerieFolio, 68, factura.SerieFolio, factura.Fecha, IdCtaContable, -1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, CveMovimientoAlmacen:=CveMovimientoInventario, ImporteMX:=TotalCosto, CveSubProyecto:=factura.CveSubProyecto) Then OcurrioError = True End If 'End If @@ -4430,20 +4370,20 @@ Namespace Modelos Select Case RowIL("TipoImpuesto").ToString Case "1" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Case "3" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 116, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 116, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Case "4" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 58, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, False, Importe, Concepto, 58, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If Case "5" - If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveCuenta:=CveCuenta, CveSubProyecto:=CveSubProyectoContabilizar) Then + If Not ObjConta.AddPrePolizasDetalle(factura.CvePrePoliza, True, Importe, Concepto, 27, Concepto, factura.Fecha, IdCtaContable:=IdCtaContable, IdSegmentoNegocio:=-1, CveVenta:=factura.CveVenta, CveCliente:=factura.CveCliente, ImporteMX:=Importe * tipoCambio, CveSubProyecto:=CveSubProyectoContabilizar) Then ErrorPrepoliza = True End If End Select @@ -5198,10 +5138,9 @@ Namespace Modelos End If IdCtaContable = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostos", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero - CveCuenta = GlobalDTClasificaciones(UsuarioActual.CveEmpresa).FiltroPrimeroValor("IdCuentaCostosSIG", $"CveClasificacion = {RowInv("CveClasificacion")}").ToEntero If Not ErrorCancelar Then - If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveCuenta:=CveCuenta, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then + If Not ObjConta.AddPrePolizasDetalle(CvePrePolizaDev, False, Multiplicador * ValorInventario, SerieFolio, 69, SerieFolio, Fecha, IdCtaContable, -1, CveVenta:=CveVenta, CveCliente:=CveCliente, CveMovimientoAlmacen:=CveMovimientoDevolucion, CveSubProyecto:=ObjFactura.CveSubProyecto, ImporteMX:=Multiplicador * ValorInventario, CveClasificacion:=RowInv("CveClasificacion").ToString.ToEntero) Then ErrorCancelar = True End If End If diff --git a/Bancos/DepositosCaja.aspx b/Bancos/DepositosCaja.aspx index 3fd17f4ff..6039ab104 100644 --- a/Bancos/DepositosCaja.aspx +++ b/Bancos/DepositosCaja.aspx @@ -98,13 +98,23 @@
- +
+ + + + MSI + 3M + 6M + 9M + 12M + +
@@ -194,7 +204,7 @@
- diff --git a/Compras/RepProductosServicios.aspx.vb b/Compras/RepProductosServicios.aspx.vb index 7680c1dcc..881d2ad81 100644 --- a/Compras/RepProductosServicios.aspx.vb +++ b/Compras/RepProductosServicios.aspx.vb @@ -253,7 +253,7 @@ Partial Class Compras_RepProductosServicios DdlPS.SelectedValue.ToEntero, FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, TipoAF, SubTipoAF, DdlAF.SelectedValue.ToEntero, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, - TipoDocto:=DdlTipoDocto.SelectedValue) Then + TipoDocto:=DdlTipoDocto.SelectedValue, Deducible:=DdlDeducible.SelectedValue.ToEntero) Then DtDatos = ObjCompras.DtResultados GvDatos.DataSource = DtDatos @@ -331,10 +331,11 @@ Partial Class Compras_RepProductosServicios End If - Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}", + Dim Liga = String.Format("/Compras/RepProductosServiciosDetalle.aspx?GPO={0}&Anio={1}&Mes={2}&AnioMes={3}&Fecha={4}&CveProveedor={5}&CveUsuario={6}&CveEstatusFactura={7}&FechaI={8}&FechaF={9}&CveProyecto={10}&CveSubProyecto={11}&CveCategoria={12}&CveClasificacion={13}&CvePS={14}&CveFamilia={15}&CveSubFamilia={16}&CveTipoAF={17}&CveSubTipoAF={18}&CveAF={19}&CveMoneda={20}&CveTipoGasto={21}&TipoCambio={22}&TCEspecifico={23}&Deducible={24}", DdlGrupo.SelectedValue, e.Row.DBCampo("Anio"), e.Row.DBCampo("Mes"), e.Row.DBCampo("AnioMes"), e.Row.DBCampo("Fecha"), e.Row.DBCampo("CveProveedor"), e.Row.DBCampo("CveUsuario"), e.Row.DBCampo("CveEstatusFactura"), FechaI, FechaF, e.Row.DBCampo("CveProyecto"), e.Row.DBCampo("CveSubProyecto"), e.Row.DBCampo("CveCategoria"), e.Row.DBCampo("CveClasificacion"), - e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"), DdlTipoGasto.GetSelectedValuesM, e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico")) + e.Row.DBCampo("CvePS"), e.Row.DBCampo("CveFamilia"), e.Row.DBCampo("CveSubFamilia"), e.Row.DBCampo("CveTipoAF"), e.Row.DBCampo("CveSubTipoAF"), e.Row.DBCampo("CveAF"), e.Row.DBCampo("CveMoneda"), + DdlTipoGasto.GetSelectedValuesM, e.Row.DBCampo("TipoCambio"), e.Row.DBCampo("TCEspecifico"), DdlDeducible.SelectedValue.ToEntero) If Not e.Row.DBCampo("GpoID") = "1" Then diff --git a/Compras/RepProductosServiciosDetalle.aspx b/Compras/RepProductosServiciosDetalle.aspx index 6210a0dc3..145706cff 100644 --- a/Compras/RepProductosServiciosDetalle.aspx +++ b/Compras/RepProductosServiciosDetalle.aspx @@ -242,6 +242,16 @@ +
+ +
+ + + + + +
+
diff --git a/Compras/RepProductosServiciosDetalle.aspx.vb b/Compras/RepProductosServiciosDetalle.aspx.vb index 419685e86..d60c194a2 100644 --- a/Compras/RepProductosServiciosDetalle.aspx.vb +++ b/Compras/RepProductosServiciosDetalle.aspx.vb @@ -73,7 +73,7 @@ Partial Class Compras_RepProductosServiciosDetalle Private Sub InicializaValores() Dim Grupo, Proyecto, SubProyecto, Categoria, Clasificacion, PS, Proveedor, Estatus, Usuario, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, TipoGasto As String - Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF, TipoDocto As String + Dim Anio, Mes, AnioMes, Fecha, FechaI, FechaF, TipoDocto, Deducible As String Grupo = If(Request("GPO") IsNot Nothing AndAlso Request("GPO").ToEntero() > 0, Request("GPO").ToEntero(), -1).ToString Proyecto = If(Request("CveProyecto") IsNot Nothing AndAlso Request("CveProyecto").ToEntero() > 0, Request("CveProyecto").ToEntero(), -1).ToString @@ -105,6 +105,8 @@ Partial Class Compras_RepProductosServiciosDetalle ActivoFijo = If(Request("CveAF") IsNot Nothing AndAlso Request("CveAF").ToEntero() > 0, Request("CveAF").ToEntero(), -1).ToString CveMoneda = If(Request("CveMoneda") IsNot Nothing AndAlso Request("CveMoneda").ToEntero() > 0, Request("CveMoneda").ToEntero(), -1).ToString.ToEntero TipoDocto = If(Request("TipoDocto") IsNot Nothing, Request("TipoDocto").ToString, "-1").ToString + Deducible = If(Request("Deducible") IsNot Nothing, Request("Deducible").ToString, "-1").ToString + Anio = If(Request("Anio") IsNot Nothing, Request("Anio").ToString, "-1").ToString Mes = If(Request("Mes") IsNot Nothing, Request("Mes").ToString, "-1").ToString AnioMes = If(Request("AnioMes") IsNot Nothing, Request("AnioMes").ToString, "-1").ToString @@ -158,6 +160,7 @@ Partial Class Compras_RepProductosServiciosDetalle DdlProveedor.SelectedText = "Todos" End If DdlTipoDocto.SelectedValueExist(TipoDocto) + DdlDeducible.SelectedValueExist(Deducible) DdlEstatus.SelectedValueExist(Estatus) DdlUsuario.SelectedValueExist(Usuario) 'DdlTipoAF.SelectedValueExist(TipoActivoFijo) @@ -359,7 +362,9 @@ Partial Class Compras_RepProductosServiciosDetalle If ObjCompras.GetRepProductosServiciosDetalle(DdlProyecto.SelectedValue.ToEntero, SubProyectos, Categoria, DdlClasificacion.SelectedValue.ToEntero, DdlPS.SelectedValue.ToEntero, FechaI, FechaF, DdlProveedor.SelectedValue.ToEntero, DdlUsuario.SelectedValue.ToEntero, DdlEstatus.SelectedValue.ToEntero, - UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, TipoAF, SubTipoAF, DdlAF.SelectedValue.ToEntero, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=DdlTipoDocto.SelectedValue) Then + UsuarioActual.CveEmpresa, DdlGrupo.SelectedValue.ToEntero, DdlFamilia.SelectedValue.ToEntero, DdlSubFamilia.SelectedValue.ToEntero, TipoAF, SubTipoAF, + DdlAF.SelectedValue.ToEntero, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, + TipoDocto:=DdlTipoDocto.SelectedValue, Deducible:=DdlDeducible.SelectedValue.ToEntero) Then DtDatos = ObjCompras.DtResultados Else DtDatos = Nothing @@ -378,7 +383,7 @@ Partial Class Compras_RepProductosServiciosDetalle Dim FechaF = If(IsDate(txtFechaF.Text.Trim()), txtFechaF.Text.Trim().ToDate, MaxFecha) If RblTipoCambio.SelectedValue.ToEntero = 3 And TxtEspecifico.Text <> "" Then TCEspecifico = TxtEspecifico.Text.ToDouble Else TCEspecifico = -1 - If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=DdlTipoDocto.SelectedValue) Then + If ObjCompras.GetRepProductosServiciosDetalle(Proyecto, SubProyecto, Categoria, Clasificacion, PS, FechaI, FechaF, Proveedor, Usuario, Estatus, UsuarioActual.CveEmpresa, Grupo, Familia, SubFamilia, TipoActivoFijo, SubTipoActivoFijo, ActivoFijo, CveMoneda, TipoCambio, TCEspecifico:=TCEspecifico, TipoGasto:=TipoGasto, CveUsuarioConsulta:=UsuarioActual.CveUsuario, TipoDocto:=DdlTipoDocto.SelectedValue, Deducible:=DdlDeducible.SelectedValue.ToEntero) Then DtDatos = ObjCompras.DtResultados Else DtDatos = Nothing diff --git a/Contabilidad/PlantillasPolizasDetalle.aspx.vb b/Contabilidad/PlantillasPolizasDetalle.aspx.vb index 0b773fffc..ec1b8e94a 100644 --- a/Contabilidad/PlantillasPolizasDetalle.aspx.vb +++ b/Contabilidad/PlantillasPolizasDetalle.aspx.vb @@ -252,7 +252,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle If HdnModalidad.Value = "I" Then If CvePlantillaPoliza > 0 Then - If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero, + If ObjPlantillaPolizaDetalle.AddConta_PlantillasPolizasDetalles(CvePlantillaPoliza, DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then TxtOrden.Text = "" @@ -290,7 +290,7 @@ Partial Class Contabilidad_PlantillasPolizasDetalle Else If HdnID.Value.ToEntero <> -1 Then If CvePlantillaPoliza > 0 Then - If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedItem.ToEntero, TxtOrden.Text.Trim.ToEntero, + If ObjPlantillaPolizaDetalle.UpdateConta_PlantillasPolizasDetalle(DdlConcepto.SelectedValue.ToEntero, DdlTipoMovimiento.SelectedValue.ToEntero, DdlCtaContable.SelectedValue.ToEntero, TxtOrden.Text.Trim.ToEntero, HdnID.Value.ToEntero, DDLSubProyecto.SelectedValue.ToEntero, DDLProveedor.SelectedValue.ToEntero, DdlPersonal.SelectedValue.ToEntero, DdlPorcentajeImpuesto.SelectedValue.ToDecimal, CveCuenta:=DdlCuentas.SelectedValue.ToEntero) Then Alert("Los cambios se guardaron correctamente.", TipoMensaje.MsgInformacion) @@ -390,7 +390,6 @@ Partial Class Contabilidad_PlantillasPolizasDetalle If Con.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then dtt = Con.DtResultados End If - DdlCtaContable.Visible = False Dim drr As DataRow = dtt.FiltroPrimero(String.Format("CveConceptoAdmin={0}", DdlConcepto.SelectedValue)) If drr IsNot Nothing Then @@ -399,6 +398,12 @@ Partial Class Contabilidad_PlantillasPolizasDetalle LblCuenta.Text = "" End If + DdlCuentas.Items.Clear() + DdlCuentas.DataSource = dtt + DdlCuentas.DataBind() + DdlCuentas.Visible = True + DdlCtaContable.Visible = False + dtt.Dispose() Con.Dispose() End If diff --git a/Contabilidad/RegPrePolizaS.aspx b/Contabilidad/RegPrePolizaS.aspx index fa0bebecb..1868ddeed 100644 --- a/Contabilidad/RegPrePolizaS.aspx +++ b/Contabilidad/RegPrePolizaS.aspx @@ -343,7 +343,8 @@
+ DataKeyNames="IdMov,Cargo,Abono,TipoMovto,CveConcepto,CveProveedor,CvePersonal, CveCompra,CveClasificacion,CveCliente,CveVenta,CveCuenta, ContadoTipoTransaccion, ContadoCuenta, ContadoNumeroFolio, ContadoImporte, ContadoBeneficiario, ContadoObservaciones" + Width="100%" CssClass=" GvMov GvSize table table-striped table-advance table-hover mysmallbtn" GridLines="None"> Cuenta @@ -582,10 +583,23 @@   - + + + + + + - + + + + + + + + + @@ -751,7 +765,7 @@ SubProyecto:
-
+

@@ -769,7 +783,7 @@ Cargo:
-
+
@@ -777,7 +791,7 @@ Abono:
-
+
diff --git a/Contabilidad/RegPrePolizaS.aspx.vb b/Contabilidad/RegPrePolizaS.aspx.vb index 136e3c504..d5978097f 100644 --- a/Contabilidad/RegPrePolizaS.aspx.vb +++ b/Contabilidad/RegPrePolizaS.aspx.vb @@ -188,6 +188,15 @@ Partial Class ContabilidadC_RegPrePolizaS End Set End Property + Public Property IDMovEditar As Integer + Get + Return CType(ViewState("IDMovEditar"), Integer) + End Get + Set(value As Integer) + ViewState("IDMovEditar") = value + End Set + End Property + Public Property TipoPoliza As String Get Return CType(ViewState("TipoPoliza"), String) @@ -317,7 +326,16 @@ Partial Class ContabilidadC_RegPrePolizaS .Add("CveConceptoContable", Type.GetType("System.Int32")) .Add("IdCtaContable", Type.GetType("System.Int32")) .Add("ConceptoContable", Type.GetType("System.String")) - .Add("CveCuenta", Type.GetType("System.Int32")) + .Add("CveCuenta", Type.GetType("System.Int32")) + .Add("ContadoTipoTransaccion", Type.GetType("System.Int32")) + .Add("ContadoCuenta", Type.GetType("System.Int32")) + .Add("ContadoNumeroFolio", Type.GetType("System.String")) + .Add("ContadoImporte", Type.GetType("System.Double")) + .Add("ContadoBeneficiario", Type.GetType("System.String")) + .Add("ContadoObservaciones", Type.GetType("System.String")) + .Add("Modificado", Type.GetType("System.Boolean")) + + End With End Sub @@ -422,7 +440,6 @@ Partial Class ContabilidadC_RegPrePolizaS End If ObjContabilidad.GetContabilizacionDiarioDetalle(CvePrePoliza) - DtMovimientos = ObjContabilidad.DtResultados.FiltraParametros($"CveEmpresa = {UsuarioActual.CveEmpresa}") GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataBind() @@ -521,7 +538,9 @@ Partial Class ContabilidadC_RegPrePolizaS If CveConceptoContable.Contiene(30, 204) 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 End If If e.Row.RowType = DataControlRowType.Header Then @@ -818,10 +837,10 @@ Partial Class ContabilidadC_RegPrePolizaS If e.Row.DataKey("CveConcepto").ToEntero.Contiene(30) Then e.Row.FCLinkButton("ImgBancos").Visible = True - - If CveTipoTransaccion > 0 And CveCuenta > 0 And Folio.Length > 0 And ImporteDocumento > 0 And Beneficiario.Length > 0 Then - e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" - End If + If e.Row.DataKey("ContadoTipoTransaccion").ToEntero > 0 And e.Row.DataKey("ContadoCuenta").ToEntero > 0 And e.Row.DataKey("ContadoNumeroFolio").ToString.Length > 0 And + e.Row.DataKey("ContadoImporte").ToEntero > 0 And e.Row.DataKey("ContadoBeneficiario").ToString.Length > 0 Then + e.Row.FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" + End If End If End If End Sub @@ -870,22 +889,25 @@ Partial Class ContabilidadC_RegPrePolizaS Dim TipoMovto As Boolean = False Dim IdCtaContable As Integer = 0 - 'Registra movimieno bancario - If CveConcepto = 30 Then - CveIE = ObjIE.AddBancos_IE(CveCuenta, CveTipoTransaccion, TxtFecha.Text, Folio, Beneficiario, ImporteDocumento, CveMoneda, 0, Observaciones, "", False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) - If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" - If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then - FolioIE = ObjIE.Folio - End If - End If - - 'inserto las compras que voy a pagarDdlSaldos - For Each gvr As GridViewRow In GvMov.Rows - 'If gvr.DataKey("IDCuenta").ToEntero > 0 Then - ' IdCtaContable = gvr.DataKey("IDCuenta") - 'End If + For Each gvr As GridViewRow In GvMov.Rows + 'If gvr.DataKey("IDCuenta").ToEntero > 0 Then + ' IdCtaContable = gvr.DataKey("IDCuenta") + 'End If + + 'Registra movimieno bancario + If gvr.DataKey("CveConcepto").ToEntero = 30 Then + + CveIE = ObjIE.AddBancos_IE(gvr.DataKey("ContadoCuenta").ToEntero, gvr.DataKey("ContadoTipoTransaccion").ToEntero, TxtFecha.Text, gvr.DataKey("ContadoNumeroFolio").ToString, + gvr.DataKey("ContadoBeneficiario").ToString, gvr.DataKey("ContadoImporte").ToString.ToDecimal, CveMoneda, 0, gvr.DataKey("ContadoObservaciones").ToString, "", + False, False, 0, CvePrePoliza, "", UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa) + If CveIE < 0 Then MsgError = "No se pudo registrar movimiento bancario" + If ObjIE.GetBancosIE(CveIE, -1, -1, "-1", -1, "-1", "-1", -1, -1, -1, -1, -1, MinFecha, MaxFecha, MinFecha, MaxFecha, MinFecha, MaxFecha, -1, -1, UsuarioActual.CveEmpresa) Then + FolioIE = ObjIE.Folio + End If + End If + If gvr.DataKey("TipoMovto").ToDouble > 0 Then Importe = gvr.FCTextBox("TxtAbono").Text.ToDouble @@ -895,9 +917,9 @@ Partial Class ContabilidadC_RegPrePolizaS TipoMovto = False End If - If CveConcepto <> 30 Then + If gvr.DataKey("CveConcepto").ToEntero <> 30 Then - If CveConcepto = 41 Then + If gvr.DataKey("CveConcepto").ToEntero = 41 Then CveIE = gvr.FCDropDownList("DdlSaldos").SelectedValue.ToEntero Else CveIE = -1 @@ -925,7 +947,10 @@ Partial Class ContabilidadC_RegPrePolizaS Else MsgError = "No se pudo insertar el detalle de la póliza2" Exit For - End If + End If + End If + If CveIE > 0 AndAlso gvr.DataKey("CveConcepto").ToEntero = 30 Then + MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) End If Next @@ -965,7 +990,6 @@ Partial Class ContabilidadC_RegPrePolizaS If MsgError = "" Then 'MENSAJE IE If CveIE Then - MensajeAlert.AppendFormat("

Folio Bancario: {1}", CveIE, FolioIE) Alert(MensajeAlert.ToString, ModExtensiones.TipoMensaje.MsgInformacion, "window.location.reload()") Else Alert(If(MensajeAlert.ToString = "", "Se registro con exito.", MensajeAlert.ToString), TipoMensaje.MsgInformacion, "window.location.reload()") @@ -1135,7 +1159,7 @@ Partial Class ContabilidadC_RegPrePolizaS End Sub Private Sub CargaCtaContableE() Dim ObjConta As New ClsContabilidad - If ObjConta.GetCuentas(-1, "-1", -1, UsuarioActual.CveEmpresa) Then + If ObjConta.GetCuentas(-1, "-1", 1, UsuarioActual.CveEmpresa) Then DdlCtaContableE.DataSource = ObjConta.DtResultados End If ObjConta.Dispose() @@ -1242,7 +1266,7 @@ Partial Class ContabilidadC_RegPrePolizaS If DtMovimientos Is Nothing Then CreaDT() If CvePrePoliza > 0 Then Dim dr As DataRow = DtMovimientos.NewRow - dr("IdCtaContable") = -1 'DdlCtaContableE.SelectedValue + dr("IdCtaContable") = DdlCtaContableE.SelectedValue dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("Concepto") = TxtConceptoE.Text @@ -1261,8 +1285,6 @@ Partial Class ContabilidadC_RegPrePolizaS dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, "")) - TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero DtMovimientos.Rows.Add(dr) DtMovimientos.AcceptChanges() @@ -1270,7 +1292,12 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataSource = DtMovimientos GvPrePoliza.DataBind() UpPrePoliza.Update() - End If + End If + + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero + TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero + UpTotalCargo.Update() + UpTotalAbono.Update() Else 'Dim dr As DataRow = DtMovimientos.NewRow 'Dim CodigoCuenta As String = "" @@ -1323,7 +1350,7 @@ Partial Class ContabilidadC_RegPrePolizaS If Rows.Count > 0 Then Dim dr As DataRow = Rows(0) - dr("IdCtaContable") = -1 'DdlCtaContableE.SelectedValue + dr("IdCtaContable") = DdlCtaContableE.SelectedValue dr("ConceptoContable") = DdlConceptosContablesE.SelectedItem.Text dr("CveConceptoContable") = DdlConceptosContablesE.SelectedValue dr("Concepto") = TxtConceptoE.Text @@ -1340,6 +1367,8 @@ Partial Class ContabilidadC_RegPrePolizaS dr("FolioFactura") = If(DdlComprasE.Visible = True, DdlComprasE.SelectedItem.ToString, If(DdlVentasE.Visible = True, DdlVentasE.SelectedItem.ToString, "")) dr("CveCuenta") = DdlCtaContableE.SelectedValue.ToEntero dr("CodigoNombreCuenta") = DdlCtaContableE.SelectedItem.Text + dr("Modificado") = True + 'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnConceptoContable").Value = DdlConceptosContablesE.SelectedValue.ToEntero 'GvPrePoliza.Rows(IndiceGrid).FCHiddenField("HdnProveedor").Value = DdlProveedoresE.SelectedValue.ToEntero @@ -1360,8 +1389,7 @@ Partial Class ContabilidadC_RegPrePolizaS dr("Cargo") = "".ToDouble End If - TxtTotalAbonos.Text = (TxtTotalAbonos.Text.ToDouble + TxtAbonoE.Text.ToDouble).ToString.FormatoNumero - TxtTotalCargos.Text = (TxtTotalCargos.Text.ToDouble + TxtCargoE.Text.ToDouble).ToString.FormatoNumero + DtMovimientos.AcceptChanges() GvPrePoliza.EditIndex = -1 @@ -1370,11 +1398,17 @@ Partial Class ContabilidadC_RegPrePolizaS GvPrePoliza.DataBind() UpPrePoliza.Update() End If - GvPrePoliza.Columns(11).Visible = True + GvPrePoliza.Columns(11).Visible = True + GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True - GvPrePoliza.Rows(IndiceGrid).FCCheckBox("chkModificado").Checked = True + TxtTotalCargos.Text = DtMovimientos.SUMD("Cargo").ToString.FormatoNumero + TxtTotalAbonos.Text = DtMovimientos.SUMD("Abono").ToString.FormatoNumero + UpTotalCargo.Update() + UpTotalAbono.Update() + End If - End If + End If + UpPrePoliza.Update() RegistraScript("$('#DivEditConcepto').modal('hide')", "hidemodal") @@ -1547,8 +1581,20 @@ Partial Class ContabilidadC_RegPrePolizaS CargaTipoTransaccion("Ing") Else CargaTipoTransaccion("Egs") - End If - + End If + + Dim IdMov As Integer = GvRow.DataKey("IdMov").ToString.ToEntero + Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IdMov) + IDMovEditar = IdMov + + If Rows.Count > 0 Then + Dim dr As DataRow = Rows(0) + DdlTipoTransaccion.SelectedValueExist(dr("ContadoTipoTransaccion").ToString.ToEntero) + DdlCuenta.SelectedValueExist(dr("ContadoCuenta").ToString.ToEntero) + TxtDocumentoFolio.Text = dr("ContadoNumeroFolio").ToString + TxtDocumentoObservaciones.Text = dr("ContadoObservaciones").ToString + TxtDocumentoBeneficiario.Text = dr("ContadoBeneficiario").ToString + End If TxtDocumentoImporte.Text = If(GvRow.FCTextBox("TxtAbono").Text = "", GvRow.FCTextBox("TxtCargo").Text.FormatoNumero, GvRow.FCTextBox("TxtAbono").Text.FormatoNumero) UpBancos.Update() @@ -1566,14 +1612,31 @@ Partial Class ContabilidadC_RegPrePolizaS DdlCuenta.DataBind() DdlCuenta.Items.Insert(0, New ListItem("Seleccione", "-1")) End Sub - Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click - CveConcepto = 30 - CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero - CveCuenta = DdlCuenta.SelectedValue.ToEntero - Folio = TxtDocumentoFolio.Text - ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal - Observaciones = TxtDocumentoObservaciones.Text - Beneficiario = TxtDocumentoBeneficiario.Text + Private Sub BtnContado_Click(sender As Object, e As EventArgs) Handles BtnContado.Click + Dim Rows As DataRow() = DtMovimientos.Select("IdMov = " & IDMovEditar) + + If Rows.Count > 0 Then + Dim dr As DataRow = Rows(0) + + + dr("ContadoTipoTransaccion") = DdlTipoTransaccion.SelectedValue.ToEntero + dr("ContadoCuenta") = DdlCuenta.SelectedValue.ToEntero + dr("ContadoNumeroFolio") = TxtDocumentoFolio.Text + dr("ContadoImporte") = TxtDocumentoImporte.Text.ToDecimal + dr("ContadoBeneficiario") = TxtDocumentoBeneficiario.Text + dr("ContadoObservaciones") = TxtDocumentoObservaciones.Text + End If + DtMovimientos.AcceptChanges() + GvMov.DataSource = DtMovimientos + GvMov.DataBind() + 'CveTipoTransaccion = DdlTipoTransaccion.SelectedValue.ToEntero + 'CveCuenta = DdlCuenta.SelectedValue.ToEntero + 'Folio = TxtDocumentoFolio.Text + 'ImporteDocumento = TxtDocumentoImporte.Text.ToDecimal + 'Observaciones = TxtDocumentoObservaciones.Text + 'Beneficiario = TxtDocumentoBeneficiario.Text + + RegistraScript(String.Format("$('#{0}').modal('hide');", "DivContadoModal")) GvMov.Rows(RowIndex).FCLinkButton("ImgBancos").CssClass = "btn btn-circle btn-sm green" UPMovs.Update() @@ -1842,6 +1905,8 @@ Partial Class ContabilidadC_RegPrePolizaS .Referencia = "", .Concepto = "", .SubProyecto = row.Item("SubProyecto"), + .Folio = "", + .TipoTransferencia = "", .CveConceptoContable = row.Item("CveConcepto"), .CveSubProyecto = IIf(row.Item("CveSubProyecto").ToString.ToEntero > 0, row.Item("CveSubProyecto"), -1), .IdCtaContable = IIf(row.Item("IdCtaContable").ToString.ToEntero > 0, row.Item("IdCtaContable"), -1), @@ -1859,10 +1924,10 @@ Partial Class ContabilidadC_RegPrePolizaS For i = 0 To columnCount worksheet.Columns(i).AutoFit(1, worksheet.Rows(0), worksheet.Rows(worksheet.Rows.Count - 1)) Next - worksheet.Columns("I").Hidden = True - worksheet.Columns("J").Hidden = True worksheet.Columns("K").Hidden = True worksheet.Columns("L").Hidden = True + worksheet.Columns("M").Hidden = True + worksheet.Columns("N").Hidden = True NombreArchivo = DdlPlantilla2.SelectedItem.Text.ToString @@ -1926,6 +1991,14 @@ Partial Class ContabilidadC_RegPrePolizaS Alert("El nombre de la octava columna debe ser 'SubProyecto'. Favor de corregirlo", TipoMensaje.MsgError) Exit Sub End If + If Not dt.Columns(8).ColumnName = "Folio" Then + Alert("El nombre de la novena columna debe ser 'Folio'.Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If + If Not dt.Columns(9).ColumnName = "TipoTransferencia" Then + Alert("El nombre de la decima columna debe ser 'TipoTransferencia'. Favor de corregirlo", TipoMensaje.MsgError) + Exit Sub + End If End If If Not ErrorArchivo Then @@ -1948,20 +2021,47 @@ Partial Class ContabilidadC_RegPrePolizaS Dim CveConceptoContable As Integer = GlobalDTContaConceptosContables(-1).FiltroPrimeroValor("CveConceptoContable", String.Format("ConceptoContable ='{0}'", Row("ConceptoAdministrativo"))).ToEntero ' Row("CveConceptoContable").ToString.ToEntero 'Dim IdCtaContable As Integer = Row("IdCtaContable").ToString.ToEntero Dim CveClasificacion As Integer = -1 - Dim CveCuenta As Integer = -1 + Dim CveCuentaExcel As Integer = -1 Dim ObjConta2 As New ClsContabilidad - If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", ""), 1, UsuarioActual.CveEmpresa) Then - CveCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero + Dim FolioExcel As Integer = -1 + Dim TipoMov As Integer = -1 + Dim CveBancoCuenta As Integer = -1 + If ObjConta2.GetCuentas(-1, Row("Cuenta").ToString.Replace("-", "").Trim, 1, UsuarioActual.CveEmpresa) Then + CveCuentaExcel = ObjConta2.DtResultados.FiltroPrimeroValor("CveCuenta", "").ToEntero NombreCuenta = ObjConta2.DtResultados.FiltroPrimeroValor("CtaCodigo", "") End If ObjConta2.Dispose() - If CveCuenta <= 0 AndAlso CveConceptoContable <> 30 Then ' concepto 30-Bancos, tomará la cuetna de las especificaciones que se hagan enel modal + If CveCuentaExcel <= 0 AndAlso CveConceptoContable <> 30 Then ' concepto 30-Bancos, tomará la cuetna de las especificaciones que se hagan enel modal Alert(String.Format("La cuenta {0} no se reconoció, favor de verificar el archivo.", Row("Cuenta").ToString)) DtMovimientos.Clear() Exit For End If + If CveConceptoContable = 30 Then + Dim objconta3 As New ClsContabilidad + objconta3.GetConta_CuentasDataContabilidad(CveCuentaExcel, UsuarioActual.CveEmpresa) + If objconta3.DtResultados.Rows.Count > 0 Then + Dim rowcc As DataRow = objconta3.DtResultados.Rows(0) + CveBancoCuenta = rowcc("CveBancoCuenta").ToString().ToEntero() + DdlCuenta.SelectedValue = CveBancoCuenta + End If + TipoMov = GlobalDTTipoTransacciones.FiltroPrimeroValor("CveTipoTransaccion", String.Format("TipoTransaccion = '{0}' ", Row("TipoTransferencia"))).ToEntero + FolioExcel = Row("Folio").ToString + CveTipoTransaccion = TipoMov + CveCuenta = CveBancoCuenta + Folio = FolioExcel + ImporteDocumento = IIf(Row("Abono").ToString.ToEntero > 0, Row("Abono").ToString, Row("Cargo").ToString) + Observaciones = Row("Referencia").ToString + Beneficiario = Row("Concepto").ToString + If Not TipoMov > 0 Then + Alert(String.Format("El Tipo de Transferencia no fue encontrado:
Tipo Transferencia: {0}
Folio: {1}
Importe: {2} ", Row("TipoTransferencia").ToString(), FolioExcel, ImporteDocumento), TipoMensaje.MsgAdvertencia) + Exit Sub + End If + + End If + + 'sino viene el cveconcepto, busca por le nombre del concepto If CveConceptoContable = 0 Then Alert(String.Format("El concepto {0} no se reconoció, favor de verificar el archivo.", Row("ConceptoAdministrativo"))) @@ -2006,8 +2106,14 @@ Partial Class ContabilidadC_RegPrePolizaS dr("CveClasificacion") = CveClasificacion dr("CveCliente") = -1 dr("CveVenta") = -1 - dr("CveCuenta") = CveCuenta + dr("CveCuenta") = CveCuentaExcel + dr("ContadoTipoTransaccion") = CveTipoTransaccion + dr("ContadoCuenta") = CveCuenta + dr("ContadoNumeroFolio") = Folio + dr("ContadoImporte") = ImporteDocumento + dr("ContadoBeneficiario") = Beneficiario + dr("ContadoObservaciones") = Observaciones DtMovimientos.Rows.Add(dr) DtMovimientos.AcceptChanges() @@ -2025,6 +2131,7 @@ Partial Class ContabilidadC_RegPrePolizaS End Try End If End Sub + #End Region #Region "Paquete Egresos" diff --git a/Contratos/ContratoObra.aspx.vb b/Contratos/ContratoObra.aspx.vb index 9826998e5..484dc6af8 100644 --- a/Contratos/ContratoObra.aspx.vb +++ b/Contratos/ContratoObra.aspx.vb @@ -4501,7 +4501,7 @@ Partial Class Contratos_ContratoObra { .ColumnHeaders = True, .StartRow = 0, - .NumberOfColumns = 5, + .NumberOfColumns = 6, .NumberOfRows = worksheet.Rows.Count, .Resolution = ColumnTypeResolution.AutoPreferStringCurrentCulture }) @@ -4605,8 +4605,6 @@ Partial Class Contratos_ContratoObra If StrArray.Length > 0 Then If CBool(StrArray(0)) = True Then CvePS = StrArray(1).ToEntero - - End If End If @@ -4614,8 +4612,13 @@ Partial Class Contratos_ContratoObra Dim ObjPS As New ClsProductosServicios + Dim CveClasificacion As Integer + If DrowPS.Table.Columns.Contains("Clasificacion") Then + CveClasificacion = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveClasificacion", String.Format("Clasificacion = '{0}'", DrowPS("Clasificacion").ToString.Trim)).ToEntero + Else + CveClasificacion = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero 'toma el primero + End If - Dim CveClasificacion As Integer = GlobalDTClasificaciones(CveEmpresa:=UsuarioActual.CveEmpresa).Rows(0)("CveClasificacion").ToString.ToEntero Dim CveUnidadMedida As Integer = GlobalDTUnidadesMedida(UsuarioActual.CveEmpresa).FiltroPrimeroValor("CveUnidadMedida", $"UnidadMedida = '{ DrowPS("UnidadMedida").ToString}' OR Abreviatura = '{ DrowPS("UnidadMedida").ToString}'").ToString.ToEntero If Not CveUnidadMedida > 0 Then diff --git a/Empresas/141/Formatos/Factura.rdlc b/Empresas/141/Formatos/Factura.rdlc index c50c98442..fcdeda3a6 100644 --- a/Empresas/141/Formatos/Factura.rdlc +++ b/Empresas/141/Formatos/Factura.rdlc @@ -2165,7 +2165,7 @@ - Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Tierra Blanca (667) 716-6997 - Sanalona (667) 713-667 + Sinaloa: Los Mochis (668) 817-0209 - Los Mochis II (668) 176-5802 - Guasave (687) 871-5317 - Calzada (667) 729-2112 - Zapata (667) 992-0876 - Guamuchil (673) 688-0108 - Sanalona (667) 713-667 - - - - - - Textbox15 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - Unidad - - - - - - - Textbox33 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - Descripción - - - - - - - Textbox17 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - P/U - - - - - - - Textbox21 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox23 - - - #4f81bd - Middle - 2pt - 2pt - - - - - - - - 0.25521in - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!UM.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PS.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!PU.Value - - - - - - - PU - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Cantidad.Value*Fields!PU.Value - - - - - - - PU2 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.03125in - - - - - true - true - - - - - - - - - - - - Textbox71 - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox74 - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - - - - - - - - Textbox75 - - - - #1414ff - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - - After - - - - - - Before - - - - DsOC - 2.02937in - 0.11465cm - 0.5in - 7.86284in - - - - - - true - true - - - - - Tipo - - - - - - - Textbox3 - 0.912in - 5.662in - 0.5cm - 2.24597in - 1 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y hora de emisión - - - - - - - - - - - - - - - - Textbox3 - 0.46414in - 5.662in - 0.5cm - 2.24597in - 2 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - - - - Textbox3 - 0.22455in - 5.662in - 0.60856cm - 2.24597in - 3 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - FACTURA - - - - - - - Textbox3 - 0.0412cm - 5.662in - 0.5cm - 2.24597in - 4 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Empresa.Value - - - - - - - - - GralesR.F.C - - - - =Parameters!RFC.Value - - - - - - - Textbox4 - 1.78362in - 0.46414in - 3.96172in - 5 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ) - - - - - - - ImporteLetra - 2.53743in - 1.39103in - 0.23264in - 4.73657in - 6 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloCFDI.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SelloSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CadenaOriginal.Value - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!QR.Value - FitProportional - 4.61035in - 0.03124in - 1.46528in - 1.56699in - 10 - - - - - - External - - FitProportional - 0.2607cm - 0.03093cm - 2.88998cm - 4.56434cm - 11 - - - - - - true - true - - - - - =Parameters!Fecha.Value - - - - - - - Textbox3 - 0.66099in - 5.662in - 0.25114in - 2.24597in - 12 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Tipo.Value - - - - - - - Textbox3 - 1.10885in - 5.662in - 0.20721in - 2.24597in - 13 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Domicilio Fiscal - - - - - - - - - =Parameters!DomicilioExpedicion.Value - - - - - - - Textbox10 - 0.46414in - 1.87861in - 0.69679in - 1.65152in - 14 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Lugar de Expedición - - - - - - - - - =Parameters!DomicilioExpedicion.Value - - - - - - - Textbox10 - 0.46414in - 3.84822in - 0.69679in - 1.786in - 15 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cuidad - - - - - - - #4f81bd - - 1.25pt - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteLugar.Value - - - - RFC: - - - - =Parameters!ClienteRFC.Value - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sub Total 1 - - - - - - - Textbox19 - 2.55788in - 6.15538in - 0.21875in - 0.84815in - 22 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Descuento - - - - - - - Textbox19 - 2.77396in - 6.15538in - 0.21875in - 0.84815in - 23 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Amort. Ant - - - - - - - Textbox19 - 2.99271in - 6.15538in - 0.21875in - 0.84815in - 24 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sub Total 2 - - - - - - - Textbox19 - 3.21146in - 6.15538in - 0.21875in - 0.84815in - 25 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - IVA (16%) - - - - - - - Textbox19 - 3.43021in - 6.15538in - 0.21875in - 0.84815in - 26 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Total - - - - - - - Textbox19 - 3.64584in - 6.15538in - 0.21875in - 0.84815in - 27 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!SubTotal.Value.ToString="","-",Parameters!SubTotal.Value) - - - - - - - Textbox42 - 2.5756in - 7.00353in - 0.19253in - 0.89055in - 28 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!Amortizacion.Value.ToString="","-",Parameters!Amortizacion.Value) - - - - - - - Textbox42 - 2.97299in - 7.00353in - 0.22222in - 0.89054in - 29 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!Descuento.Value.ToString = "", "-",Parameters!Descuento.Value) - - - - - - - Textbox42 - 2.76813in - 7.00353in - 0.20486in - 0.89054in - 30 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =IIF(Parameters!SubTotal2.Value.ToString="","-",Parameters!SubTotal2.Value) - - - - - - - Textbox42 - 3.19521in - 7.00353in - 0.23803in - 0.89054in - 31 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =iif(Parameters!IVA.Value.ToString="","-",Parameters!IVA.Value) - - - - - - - Textbox42 - 3.43324in - 7.00353in - 0.2126in - 0.89054in - 32 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!Total.Value - - - - - - - Textbox42 - 3.64584in - 7.00353in - 0.21875in - 0.89054in - 33 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Importe con letra: - - - - - - - Textbox19 - 2.53316in - 0.03124in - 0.2053in - 1.35979in - 34 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Forma de pago: - - - - - - - Textbox19 - 2.73851in - 0.03124in - 0.22222in - 1.35979in - 35 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello digital del CFDI: - - - - - - - Textbox19 - 2.96073in - 0.03124in - 0.61916in - 1.35979in - 36 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Sello del SAT: - - - - - - - Textbox19 - 3.57989in - 0.03124in - 0.30208in - 1.36417in - 37 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Cadena original del complemento de certificación digital del SAT: - - - - - - - Textbox19 - 3.92015in - 0.03056in - 0.21875in - 7.87741in - 38 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FormaPago.Value - - - - - - - ImporteLetra - 2.73851in - 1.39103in - 0.20833in - 4.73657in - 39 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Folio Fiscal: - - - - - - - Textbox54 - 4.59646in - 1.65378in - 0.18056in - 4.388in - 40 - - - - - - - White - - - - - - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - No. Serie del Certificado del SAT: - - - - - - - Textbox54 - 4.79091in - 1.65378in - 0.18056in - 4.388in - 41 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha y Hora de certificación: - - - - - - - Textbox54 - 5.00196in - 1.65378in - 0.19444in - 4.40189in - 42 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Certificado del Contribuyente: - - - - - - - Textbox54 - 5.20757in - 1.65378in - 0.19445in - 4.40189in - 43 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!SerieCertificadoSAT.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaCertificacion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!CertificadoContribuyente.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: - - - - =Parameters!CondicionPago.Value - - - - ; Método de Pago: - - - - =Parameters!MetodoPago.Value - - - - ; Num. Cta Pago: - - - - =Parameters!NumCta.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Éste documento es una representacion impresa de un CFDi - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - true - true - - - - - P A G A R E con Folio - - - - =Parameters!Serie.Value - - - - - - - - - =Parameters!Folio.Value - - - - Por éste pagare prometo (emos) pagar incondicionalmente a la orden de - - - - =Parameters!Empresa.Value - - - - a su vencimiento el - - - - =Parameters!Vencimiento.Value - - - - , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ - - - - =Parameters!Total.Value - - - - SON: ( - - - - =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) - - - - ). Valor recibido a mi (nuestra) entera satisfaccion. la falta de pago de éste documento a su vencimiento dará derecho a - - - - =Parameters!Empresa.Value - - - - o tenedor, desde el dia siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionén. Lugar y Fecha de Suscripcion: Hermosillo, Sonora a - - - - =Parameters!Fecha.Value - - - - - - - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Nombre: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Dirección: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteNombre.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!ClienteDireccion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Acepto de conformidad - - - - - - 2pt - 2pt - 2pt - 2pt - - - - 0.26711cm - 0.05457cm - 0cm - 0.57653cm - 7 - - - - - - 0.26711cm - 0.69053cm - 0cm - 0.57653cm - 8 - - - - - - 0.26711cm - 1.32627cm - 0cm - 0.57653cm - 9 - - - - - - 0.26711cm - 1.63234cm - 0cm - 0.57653cm - 10 - - - - - - 0.26711cm - 2.2683cm - 0cm - 0.57653cm - 11 - - - - - - 0.26711cm - 2.90404cm - 0cm - 0.57653cm - 12 - - - - - - 0.26711cm - 3.57348cm - 0cm - 0.57653cm - 13 - - - - - - 0.26711cm - 4.20944cm - 0cm - 0.57653cm - 14 - - - - - - 0.26711cm - 4.84518cm - 0cm - 0.57653cm - 15 - - - - - - 0.26711cm - 5.15125cm - 0cm - 0.57653cm - 16 - - - - - - 0.26711cm - 5.78721cm - 0cm - 0.57653cm - 17 - - - - - - 0.26711cm - 6.42295cm - 0cm - 0.57653cm - 18 - - - - - - 0.26711cm - 7.10321cm - 0cm - 0.57653cm - 19 - - - - - - 0.26711cm - 7.73917cm - 0cm - 0.57653cm - 20 - - - - - - 0.26711cm - 8.37491cm - 0cm - 0.57653cm - 21 - - - - - - 0.26711cm - 8.68098cm - 0cm - 0.57653cm - 22 - - - - - - 0.26711cm - 9.31694cm - 0cm - 0.57653cm - 23 - - - - - - 0.26711cm - 9.95268cm - 0cm - 0.57653cm - 24 - - - - - - 0.26711cm - 14.03363cm - 0cm - 0.57653cm - 25 - - - - - - 0.26711cm - 14.66959cm - 0cm - 0.57653cm - 26 - - - - - - 0.26711cm - 15.30533cm - 0cm - 0.57653cm - 27 - - - - - - 0.26711cm - 15.6114cm - 0cm - 0.57653cm - 28 - - - - - - 0.26711cm - 16.24736cm - 0cm - 0.57653cm - 29 - - - - - - 0.26711cm - 16.8831cm - 0cm - 0.57653cm - 30 - - - - - - 0.26711cm - 10.5767cm - 0cm - 0.57653cm - 31 - - - - - - 0.26711cm - 11.21266cm - 0cm - 0.57653cm - 32 - - - - - - 0.26711cm - 11.8484cm - 0cm - 0.57653cm - 33 - - - - - - 0.26711cm - 12.15447cm - 0cm - 0.57653cm - 34 - - - - - - 0.26711cm - 12.79043cm - 0cm - 0.57653cm - 35 - - - - - - 0.26711cm - 13.42617cm - 0cm - 0.57653cm - 36 - - - - - - 0.26711cm - 18.37745cm - 0cm - 0.57653cm - 37 - - - - - - 0.26711cm - 19.01341cm - 0cm - 0.57653cm - 38 - - - - - - 0.26711cm - 17.71435cm - 0cm - 0.57653cm - 39 - - - - - - true - 18.57368cm - 0.09423cm - 4.36819cm - 20.04854cm - 50 - - - - - - - - true - true - - - - - CFDI Relacionados - - - - - - - Textbox5 - 0.11382cm - 0.05336cm - 0.54004cm - 20.00281cm - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Tipo Relación: - - - - - - - Textbox29 - 0.83025cm - 4.33636cm - 0.41981cm - 5.31841cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!TipoRelacionTexto.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - 2.42456cm - - - 2.05585cm - - - 3.03631cm - - - 7.7847cm - - - - - 0.44125cm - - - - - true - true - - - - - Folio - - - - - - - Textbox10 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Fecha - - - - - - - Textbox12 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Importe - - - - - - - Textbox21 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - Folio Fiscal - - - - - - - Textbox11 - - - #4f81bd - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.41479cm - - - - - true - true - - - - - =Fields!SerieFolio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Fecha.Value - - - - - - - Fecha - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Importe.Value - - - - - - - Importe1 - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!FolioFiscal.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - - - - - - - - After - - - - - - - DataSet4 - 1.39643cm - 2.83462cm - 0.85604cm - 15.30142cm - 3 - - - - - - true - true - - - - - VERSION 3.3 - - - - - - - Textbox5 - 2.28775cm - 17.08931cm - 0.6cm - 3.06609cm - 4 - - - 2pt - 2pt - 2pt - 2pt - - - - true - 15.56744cm - 0.07745cm - 2.97096cm - 20.1554cm - 51 - - =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) - - - - - - - 22.94187cm - - - - =Today - - - - - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 27.94cm - 21.59cm - 0.5cm - 0.5cm - 1cm - 0.5cm - 1.27cm - + + + + + + Textbox15 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Unidad + + + + + + + Textbox33 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Descripción + + + + + + + Textbox17 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + P/U + + + + + + + Textbox21 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox23 + + + #4f81bd + Middle + 2pt + 2pt + + + + + + + + 0.25521in + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!UM.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PS.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!PU.Value + + + + + + + PU + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Cantidad.Value*Fields!PU.Value + + + + + + + PU2 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.03125in + + + + + true + true + + + + + + + + + + + + Textbox71 + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox74 + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + + + + + + + + Textbox75 + + + + #1414ff + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + + After + + + + + + Before + + + + DsOC + 2.02937in + 0.11465cm + 0.5in + 7.86284in + + + + + + true + true + + + + + Tipo + + + + + + + Textbox3 + 0.912in + 5.662in + 0.5cm + 2.24597in + 1 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y hora de emisión + + + + + + + + + + + + + + + + Textbox3 + 0.46414in + 5.662in + 0.5cm + 2.24597in + 2 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + + + + Textbox3 + 0.22455in + 5.662in + 0.60856cm + 2.24597in + 3 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + FACTURA + + + + + + + Textbox3 + 0.0412cm + 5.662in + 0.5cm + 2.24597in + 4 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Empresa.Value + + + + + + + + + GralesR.F.C + + + + =Parameters!RFC.Value + + + + + + + Textbox4 + 1.78362in + 0.46414in + 3.96172in + 5 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ) + + + + + + + ImporteLetra + 2.53743in + 1.39103in + 0.23264in + 4.73657in + 6 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloCFDI.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SelloSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CadenaOriginal.Value + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!QR.Value + FitProportional + 4.61035in + 0.03124in + 1.46528in + 1.56699in + 10 + + + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.2607cm + 0.03093cm + 2.88998cm + 4.56434cm + 11 + + + + + + true + true + + + + + =Parameters!Fecha.Value + + + + + + + Textbox3 + 0.66099in + 5.662in + 0.25114in + 2.24597in + 12 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Tipo.Value + + + + + + + Textbox3 + 1.10885in + 5.662in + 0.20721in + 2.24597in + 13 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Domicilio Fiscal + + + + + + + + + =Parameters!DomicilioExpedicion.Value + + + + + + + Textbox10 + 0.46414in + 1.87861in + 0.69679in + 1.65152in + 14 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Lugar de Expedición + + + + + + + + + =Parameters!DomicilioExpedicion.Value + + + + + + + Textbox10 + 0.46414in + 3.84822in + 0.69679in + 1.786in + 15 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cuidad + + + + + + + #4f81bd + + 1.25pt + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteLugar.Value + + + + RFC: + + + + =Parameters!ClienteRFC.Value + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Total 1 + + + + + + + Textbox19 + 2.55788in + 6.15538in + 0.21875in + 0.84815in + 22 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Descuento + + + + + + + Textbox19 + 2.77396in + 6.15538in + 0.21875in + 0.84815in + 23 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Amort. Ant + + + + + + + Textbox19 + 2.99271in + 6.15538in + 0.21875in + 0.84815in + 24 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sub Total 2 + + + + + + + Textbox19 + 3.21146in + 6.15538in + 0.21875in + 0.84815in + 25 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + IVA (16%) + + + + + + + Textbox19 + 3.43021in + 6.15538in + 0.21875in + 0.84815in + 26 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Total + + + + + + + Textbox19 + 3.64584in + 6.15538in + 0.21875in + 0.84815in + 27 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!SubTotal.Value.ToString="","-",Parameters!SubTotal.Value) + + + + + + + Textbox42 + 2.5756in + 7.00353in + 0.19253in + 0.89055in + 28 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!Amortizacion.Value.ToString="","-",Parameters!Amortizacion.Value) + + + + + + + Textbox42 + 2.97299in + 7.00353in + 0.22222in + 0.89054in + 29 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!Descuento.Value.ToString = "", "-",Parameters!Descuento.Value) + + + + + + + Textbox42 + 2.76813in + 7.00353in + 0.20486in + 0.89054in + 30 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =IIF(Parameters!SubTotal2.Value.ToString="","-",Parameters!SubTotal2.Value) + + + + + + + Textbox42 + 3.19521in + 7.00353in + 0.23803in + 0.89054in + 31 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =iif(Parameters!IVA.Value.ToString="","-",Parameters!IVA.Value) + + + + + + + Textbox42 + 3.43324in + 7.00353in + 0.2126in + 0.89054in + 32 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!Total.Value + + + + + + + Textbox42 + 3.64584in + 7.00353in + 0.21875in + 0.89054in + 33 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Importe con letra: + + + + + + + Textbox19 + 2.53316in + 0.03124in + 0.2053in + 1.35979in + 34 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Forma de pago: + + + + + + + Textbox19 + 2.73851in + 0.03124in + 0.22222in + 1.35979in + 35 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello digital del CFDI: + + + + + + + Textbox19 + 2.96073in + 0.03124in + 0.61916in + 1.35979in + 36 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Sello del SAT: + + + + + + + Textbox19 + 3.57989in + 0.03124in + 0.30208in + 1.36417in + 37 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Cadena original del complemento de certificación digital del SAT: + + + + + + + Textbox19 + 3.92015in + 0.03056in + 0.21875in + 7.87741in + 38 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FormaPago.Value + + + + + + + ImporteLetra + 2.73851in + 1.39103in + 0.20833in + 4.73657in + 39 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Folio Fiscal: + + + + + + + Textbox54 + 4.59646in + 1.65378in + 0.18056in + 4.388in + 40 + + + + + + + White + + + + + + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + No. Serie del Certificado del SAT: + + + + + + + Textbox54 + 4.79091in + 1.65378in + 0.18056in + 4.388in + 41 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha y Hora de certificación: + + + + + + + Textbox54 + 5.00196in + 1.65378in + 0.19444in + 4.40189in + 42 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Certificado del Contribuyente: + + + + + + + Textbox54 + 5.20757in + 1.65378in + 0.19445in + 4.40189in + 43 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!SerieCertificadoSAT.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaCertificacion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!CertificadoContribuyente.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Regímen: Regímen General de Ley Personas Morales; Condiciones de pago: + + + + =Parameters!CondicionPago.Value + + + + ; Método de Pago: + + + + =Parameters!MetodoPago.Value + + + + ; Num. Cta Pago: + + + + =Parameters!NumCta.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Éste documento es una representacion impresa de un CFDi + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + true + true + + + + + P A G A R E con Folio + + + + =Parameters!Serie.Value + + + + - + + + + =Parameters!Folio.Value + + + + Por éste pagare prometo (emos) pagar incondicionalmente a la orden de + + + + =Parameters!Empresa.Value + + + + a su vencimiento el + + + + =Parameters!Vencimiento.Value + + + + , en Hermosillo, Sonora o en el domicilio señalado a elección del acreedor o tenedor la cantidad de $ + + + + =Parameters!Total.Value + + + + SON: ( + + + + =Microsoft.VisualBasic.Strings.UCase(Parameters!ImporteLetra.Value) + + + + ). Valor recibido a mi (nuestra) entera satisfaccion. la falta de pago de éste documento a su vencimiento dará derecho a + + + + =Parameters!Empresa.Value + + + + o tenedor, desde el dia siguiente a cobrar el 10% mensual de interes moratorios hasta su total liquidación y los gastos judiciales que se ocasionén. Lugar y Fecha de Suscripcion: Hermosillo, Sonora a + + + + =Parameters!Fecha.Value + + + + + + + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Nombre: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Dirección: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteNombre.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!ClienteDireccion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Acepto de conformidad + + + + + + 2pt + 2pt + 2pt + 2pt + + + + 0.26711cm + 0.05457cm + 0cm + 0.57653cm + 7 + + + + + + 0.26711cm + 0.69053cm + 0cm + 0.57653cm + 8 + + + + + + 0.26711cm + 1.32627cm + 0cm + 0.57653cm + 9 + + + + + + 0.26711cm + 1.63234cm + 0cm + 0.57653cm + 10 + + + + + + 0.26711cm + 2.2683cm + 0cm + 0.57653cm + 11 + + + + + + 0.26711cm + 2.90404cm + 0cm + 0.57653cm + 12 + + + + + + 0.26711cm + 3.57348cm + 0cm + 0.57653cm + 13 + + + + + + 0.26711cm + 4.20944cm + 0cm + 0.57653cm + 14 + + + + + + 0.26711cm + 4.84518cm + 0cm + 0.57653cm + 15 + + + + + + 0.26711cm + 5.15125cm + 0cm + 0.57653cm + 16 + + + + + + 0.26711cm + 5.78721cm + 0cm + 0.57653cm + 17 + + + + + + 0.26711cm + 6.42295cm + 0cm + 0.57653cm + 18 + + + + + + 0.26711cm + 7.10321cm + 0cm + 0.57653cm + 19 + + + + + + 0.26711cm + 7.73917cm + 0cm + 0.57653cm + 20 + + + + + + 0.26711cm + 8.37491cm + 0cm + 0.57653cm + 21 + + + + + + 0.26711cm + 8.68098cm + 0cm + 0.57653cm + 22 + + + + + + 0.26711cm + 9.31694cm + 0cm + 0.57653cm + 23 + + + + + + 0.26711cm + 9.95268cm + 0cm + 0.57653cm + 24 + + + + + + 0.26711cm + 14.03363cm + 0cm + 0.57653cm + 25 + + + + + + 0.26711cm + 14.66959cm + 0cm + 0.57653cm + 26 + + + + + + 0.26711cm + 15.30533cm + 0cm + 0.57653cm + 27 + + + + + + 0.26711cm + 15.6114cm + 0cm + 0.57653cm + 28 + + + + + + 0.26711cm + 16.24736cm + 0cm + 0.57653cm + 29 + + + + + + 0.26711cm + 16.8831cm + 0cm + 0.57653cm + 30 + + + + + + 0.26711cm + 10.5767cm + 0cm + 0.57653cm + 31 + + + + + + 0.26711cm + 11.21266cm + 0cm + 0.57653cm + 32 + + + + + + 0.26711cm + 11.8484cm + 0cm + 0.57653cm + 33 + + + + + + 0.26711cm + 12.15447cm + 0cm + 0.57653cm + 34 + + + + + + 0.26711cm + 12.79043cm + 0cm + 0.57653cm + 35 + + + + + + 0.26711cm + 13.42617cm + 0cm + 0.57653cm + 36 + + + + + + 0.26711cm + 18.37745cm + 0cm + 0.57653cm + 37 + + + + + + 0.26711cm + 19.01341cm + 0cm + 0.57653cm + 38 + + + + + + 0.26711cm + 17.71435cm + 0cm + 0.57653cm + 39 + + + + + + true + 18.57368cm + 0.09423cm + 4.36819cm + 20.04854cm + 50 + + + + + + + + true + true + + + + + CFDI Relacionados + + + + + + + Textbox5 + 0.11382cm + 0.05336cm + 0.54004cm + 20.00281cm + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Tipo Relación: + + + + + + + Textbox29 + 0.83025cm + 4.33636cm + 0.41981cm + 5.31841cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!TipoRelacionTexto.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + 2.42456cm + + + 2.05585cm + + + 3.03631cm + + + 7.7847cm + + + + + 0.44125cm + + + + + true + true + + + + + Folio + + + + + + + Textbox10 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Fecha + + + + + + + Textbox12 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Importe + + + + + + + Textbox21 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + Folio Fiscal + + + + + + + Textbox11 + + + #4f81bd + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.41479cm + + + + + true + true + + + + + =Fields!SerieFolio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Fecha.Value + + + + + + + Fecha + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Importe.Value + + + + + + + Importe1 + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!FolioFiscal.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + + + + + + + + After + + + + + + + DataSet4 + 1.39643cm + 2.83462cm + 0.85604cm + 15.30142cm + 3 + + + + + + true + true + + + + + VERSION 3.3 + + + + + + + Textbox5 + 2.28775cm + 17.08931cm + 0.6cm + 3.06609cm + 4 + + + 2pt + 2pt + 2pt + 2pt + + + + true + 15.56744cm + 0.07745cm + 2.97096cm + 20.1554cm + 51 + + =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) + + + + + + + 22.94187cm + + + + =Today + + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 27.94cm + 21.59cm + 0.5cm + 0.5cm + 1cm + 0.5cm + 1.27cm + @@ -810,6 +811,7 @@ 2pt + true @@ -950,7 +952,6 @@ 2pt - true @@ -1611,49 +1612,7 @@ ReportParameter1 - - - 2 - 4 - - - 0 - 0 - NombreEmpresa - - - 1 - 0 - FechaInicio - - - 0 - 1 - FechaFin - - - 1 - 1 - UsuarioImprimio - - - 0 - 2 - LogoPath - - - 1 - 2 - Filtros - - - 0 - 3 - FechaImprimio - - - - + Cm 40c94aad-a12a-44fb-ab0d-ea36a9656792 \ No newline at end of file diff --git a/OC/OC.aspx.vb b/OC/OC.aspx.vb index 95c8204f9..e6384aa58 100644 --- a/OC/OC.aspx.vb +++ b/OC/OC.aspx.vb @@ -834,8 +834,8 @@ Partial Class OC Ddlcliente.ddlWS.Attributes.Add("data-coltexto", "N") 'Nuevo Proceso que permite modificar detalles - If Not UsuarioActual.TienePermisoProceso(131) Then - If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then + 'If Not UsuarioActual.TienePermisoProceso(131) Then + If GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus)).Rows.Count > 0 Then Dim Dr As DataRow Dr = GlobalDTOCEstatus(UsuarioActual.CveEmpresa).FiltraParametros(String.Format("CveEstatus = {0}", CveEstatus))(0) If UsuarioActual.TienePermisoProceso(203) And Dr("TipoTermino").ToString.ToEntero = 3 And Dr("Tipo").ToString = "OC" Then @@ -857,7 +857,7 @@ Partial Class OC DesHabilitar() End If End If - End If + 'End If 'NO PERMITE REGISTRAR PS If UsuarioActual.TienePermisoProceso(249) Then @@ -2706,17 +2706,22 @@ Partial Class OC 'UPDATE' ElseIf CveOrdenCompra > 0 Then Dim FueModificada As Boolean = False - + Dim Proveedor As String = "" 'siempre se esta guardando el proveedor If Not ChkCotizacion.Checked OrElse (UsuarioActual.Empresa.Funcionalidad(565) = "1" AndAlso CveConfianzaProveedor > 0) Then CveProveedor = DdlProveedores.SelectedValue.ToEntero + Proveedor = DdlProveedores.SelectedText.ToString End If - If Not OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), + If OC.UpdateOrdenCompra(-1, TxtDescrip.Text, TxtJustificacion.Text, DdlPrioridad.SelectedValue.ToEntero, ChkCotizacion.Checked, If(TxtFechaEstimadaEntrega.Text.Trim = "", "-1", TxtFechaEstimadaEntrega.Text.Trim), LugarEntrega, DdlMoneda.SelectedValue.ToEntero, CveProveedor, CveOrdenCompra, UsuarioActual.CveUsuario, Ddlcliente.txtValue.Value.ToEntero, DdlVendedor.SelectedValue.ToEntero, txtobsprioridad.Text, IVA:=IVA, RetIVA:=TxtRetIVA.Text.ToDecimal, RetISR:=TxtRetISR.Text.ToDecimal, FolioAdicional:=TxtFolioAdicional.Text, EntregaDirecta:=If(ChkEntregaDirecta.Checked, 1, -1), CveDireccionEnvio:=If(DdlDireccionEnvio.Visible, DdlDireccionEnvio.SelectedValue.ToEntero, -1), Guia:=TxtGuia.Text.Trim, IEPS:=TxtIEPS.Text.ToDecimal, UsoCFDI:=DdlUsoCFDI.SelectedValue.ToEntero, Promocion:=Promocion, pCveProveedorSucursal:=DdlProveedorSucursal.SelectedValue.ToEntero, CveProveedorContacto:=CveProveedorContacto, PorcentajeIVA:=Math.Round(DdlIVA.SelectedValue.ToDouble - 1, 2)) Then + If Not ObjConta.UpdateProveedorPoliza(CveOrdenCompra, CveProveedor, Proveedor) Then + TieneError = True + End If + Else TieneError = True End If @@ -3811,7 +3816,7 @@ Partial Class OC GvD.EditIndex = e.NewEditIndex CargaDatosDetalles() Dim EditingRow As GridViewRow = GvD.Rows(e.NewEditIndex) - If Not EsCreaApartirDe AndAlso Not UsuarioActual.TienePermisoProceso(131) Then 'si tiene el proce 131, e va a permitir, sino que lo bloquee + If Not EsCreaApartirDe AndAlso Not UsuarioActual.TienePermisoProceso(203) Then 'si tiene el proce 131, e va a permitir, sino que lo bloquee If EditingRow.DataKey("TipoDato").ToEntero = 2 Or EditingRow.DataKey("CantidadNoEditable").ToDecimal > 0 Then EditingRow.FCDropDownList("DdlClasificacion").Enabled = False EditingRow.FCDropDownList("DdlPS").Enabled = False diff --git a/RH/CatDocumentos.aspx b/RH/CatDocumentos.aspx index ba38ef423..ac2263b17 100644 --- a/RH/CatDocumentos.aspx +++ b/RH/CatDocumentos.aspx @@ -424,13 +424,18 @@ {Puesto} {FechaActual} {FechaActualDF} - <%--{TiempoContrato}--%> - {HoraInicioJornada}Hora de inicio de jornada entre semana - {HoraFinJornada}Hora de fin de jornada entre semana - <%--{HoraInicioJornadaSabado}Hora de inicio de jornada en sábado - {HoraFinJornadaSabado}Hora de fin de jornada en sábado--%> - {Salario}Salario del personal - {MetodoPago}Metodo de pago + + + + {FechaFin}Fecha Fin de Contrato + SexoSexo + {NombreEmpresa}Empresa + {Sueldo}Sueldo + {SueldoLetra}Sueldo en letra + {Nacionalidad}Nacionalidad + + + diff --git a/RH/CatPersonal.aspx.vb b/RH/CatPersonal.aspx.vb index 655ca2973..7bbb3db8d 100644 --- a/RH/CatPersonal.aspx.vb +++ b/RH/CatPersonal.aspx.vb @@ -1042,4 +1042,3 @@ Partial Class RH_CatPersonal 'End Using End Sub End Class -S \ No newline at end of file diff --git a/RH/Personal.aspx b/RH/Personal.aspx index 5a9e03487..14d08582e 100644 --- a/RH/Personal.aspx +++ b/RH/Personal.aspx @@ -319,6 +319,12 @@ +
+ + + +
+
@@ -3361,8 +3367,10 @@ + +
diff --git a/RH/Personal.aspx.vb b/RH/Personal.aspx.vb index c76ba4672..a30525de5 100644 --- a/RH/Personal.aspx.vb +++ b/RH/Personal.aspx.vb @@ -843,7 +843,7 @@ Partial Class RH_Personal CargaPermisos() CargaCombosBuzon() CargaPermisosReemplazos() - + CargaPaises() If Request("CvePersonal") IsNot Nothing AndAlso IsNumeric(Request("CvePersonal")) AndAlso Request("CvePersonal").ToEntero > 0 Then ViewState("CvePersonal") = Request("CvePersonal") @@ -1259,7 +1259,23 @@ Partial Class RH_Personal End Sub + Private Sub CargaPaises() + Dim ObjGral As New ClsGenerales + + If ObjGral.GetSATPais() Then + DdlPais.DataSource = ObjGral.DtResultados + Else + DdlPais.DataSource = Nothing + End If + ObjGral.Dispose() + + + DdlPais.DataBind() + + DdlPais.Items.Insert(0, New ListItem("Seleccione una", "-1")) + + End Sub #End Region @@ -1545,6 +1561,10 @@ Partial Class RH_Personal DdlRegimenContratacion.SelectedValue = ObjPersonal.CveSATRegimenContratacion.ToString() DdlBanco.SelectedValue = If(ObjPersonal.CveSATBanco = 0, "-1", ObjPersonal.CveSATBanco.ToString()) DdlRiesgoPuesto.SelectedValue = ObjPersonal.CveSATRiesgoPuesto.ToString() + DdlPais.SelectedValueExist(ObjPersonal.DtResultados.Rows(0)("CvePais").ToString) + + + 'Carga Incidencias BtnConsultarAsistencia_Click(Me, New System.EventArgs) @@ -1719,7 +1739,7 @@ Partial Class RH_Personal DdlClienteAsignado.SelectedValue.ToEntero, DdlSubProyectoAsignado.SelectedValue.ToEntero, URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text, DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero, - TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked) Then + TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=ChkSindicalizado.Checked, CvePais:=DdlPais.SelectedValue.ToEntero) Then If Archivo.Exists Then @@ -1792,7 +1812,7 @@ Partial Class RH_Personal URL, DdlSupervisor.SelectedValue.ToEntero, TxtCLABE.Text.Trim, TxtBancoNumCuenta.Text.Trim, DdlJornada.SelectedValue.ToEntero, DdlViaticos.SelectedValue.ToEntero, DdlViaticos.SelectedItem.Text, DdlPrestamos.SelectedValue.ToEntero, DdlPrestamos.SelectedItem.Text, UsuarioActual.CveEmpresa, DDLUsuarioNomina.SelectedValue.ToEntero, DdlSubproyectoZona.SelectedValue.ToEntero, CveUniforme:=DdlUniforme.SelectedValue.ToEntero, TelefonoExtension:=TxtTelefonoExtension.Text, CelularPersonal:=TxtCelularPersonal.Text, TelefonoMarcadoRapido:=TxtTelefonoMarcadoRapido.Text, ContactoAlterno:="", CveUsuarioModifico:=UsuarioActual.CveUsuario, - FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0)) Then + FechaActivo:=FechaActivo, FechaReingreso:=FechaReingreso, CveTipodeSalario:=DDlTipoSalario.SelectedValue.ToEntero(), Sindicalizado:=If(ChkSindicalizado.Checked, 1, 0), CvePais:=DdlPais.SelectedValue.ToEntero) Then 'Funsion usa RH Familiares If UsuarioActual.Empresa.Funcionalidad(568) = "1" Then @@ -6427,6 +6447,11 @@ Partial Class RH_Personal Dim ListaTagsDocumentost = New List(Of TagsDocumentos) + + Dim ObjRH As New ClsRH + ListaTagsDocumentost = ObjRH.GetDatosTagsDocumentos(CvePersonal, UsuarioActual.CveEmpresa) + ObjRH.Dispose() + For Each GvRow As GridViewRow In GvParametros.Rows If GvRow.FCTextBox("TxtParametro").Text.Trim.Length > 0 Then diff --git a/Ventas/PV.aspx b/Ventas/PV.aspx index 0fb66d53a..931b817de 100644 --- a/Ventas/PV.aspx +++ b/Ventas/PV.aspx @@ -3048,7 +3048,7 @@
- + diff --git a/Ventas/PV.aspx.vb b/Ventas/PV.aspx.vb index fafcab128..3c943a27d 100644 --- a/Ventas/PV.aspx.vb +++ b/Ventas/PV.aspx.vb @@ -688,7 +688,7 @@ Partial Class PV Get Return New Dictionary(Of Integer, Decimal) From { {20516, 0.23D}, 'Descuento para lubricantes LTH - {20515, 0.24D} 'Descuento para filtros LTH + {20515, 0.28D} 'Descuento para filtros LTH } End Get End Property @@ -4020,7 +4020,7 @@ Partial Class PV End Sub Protected Sub DdlTipoDefecto_SelectedIndexChanged(ByVal sender As Object, ByVal e As System.EventArgs) Handles DdlTipoDefecto.SelectedIndexChanged - If DdlTipoDefecto.SelectedValue.ToEntero = 17 Then + If DdlTipoDefecto.SelectedValue.Contiene("17", "18", "20") Then DivCodigoTD.Visible = True DdlTipoDefecto.Width = New Unit(140%) Else diff --git a/Ventas/RepVentas.aspx.vb b/Ventas/RepVentas.aspx.vb index f681e842e..9784b95ac 100644 --- a/Ventas/RepVentas.aspx.vb +++ b/Ventas/RepVentas.aspx.vb @@ -645,7 +645,9 @@ Partial Class Ventas_RepVentas Private Sub GenerarPDF(Optional Formato As String = "PDF") If DtVentas IsNot Nothing Then Dim StrFiltro As New StringBuilder - StrFiltro.AppendFormat(" Agrupado por: {0}", DdlGrupo.SelectedItem.Text) + StrFiltro.AppendFormat(" Agrupado por: {0}", DdlGrupo.SelectedItem.Text) + Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/RepVentas.rdlc", UsuarioActual.Empresa.Ruta)) + Dim ruta As String = "" If DdlTipoComprobante.GetSelectedText <> "" Then StrFiltro.AppendFormat(" Tipo Documento: {0}", DdlTipoComprobante.GetSelectedText) If txtFechaI.Text <> "" Then StrFiltro.AppendFormat(" Fecha Inicio : {0}", txtFechaI.Text.ToDate.ToShortDateString) @@ -653,7 +655,7 @@ Partial Class Ventas_RepVentas If DdlProyecto.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Proyecto: {0}", DdlProyecto.SelectedItem.Text) If DdlSubProyecto.GetSelectedText <> "" Then StrFiltro.AppendFormat(" SubProyecto: {0}", DdlSubProyecto.GetSelectedText) - If DdlClientes.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Cliente: {0}", DdlClientes.SelectedText) + If DdlClientes.SelectedValue <> "" Then StrFiltro.AppendFormat(" Cliente: {0}", DdlClientes.SelectedText) If DdlVendedor.GetSelectedText <> "" Then StrFiltro.AppendFormat(" Vendedor: {0}", DdlVendedor.GetSelectedText) If DdlEstatus.GetSelectedText <> "" Then StrFiltro.AppendFormat(" Estatus: {0}", DdlEstatus.GetSelectedText) If DdlSubProyectoEjecucion.SelectedValue <> "-1" Then StrFiltro.AppendFormat(" Proyecto Ejecución: {0}", DdlSubProyectoEjecucion.SelectedItem.Text) @@ -682,8 +684,15 @@ Partial Class Ventas_RepVentas params.Add(New ReportParameter("LogoPath", logouri)) Else params.Add(New ReportParameter("LogoPath", "")) + End If + + If Archivo.Exists Then + ruta = UsuarioActual.Empresa.Ruta & "Formatos/RepVentas.rdlc" + Else + ruta = "Empresas/Grales/Formatos/RepVentas.rdlc" End If - ImprimirPDF("Empresas/Grales/Formatos/RepVentas.rdlc", dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) + + ImprimirPDF(ruta, dt, params, String.Format("ReporteVentas-{0}", Now.ToDateTime.ToShortDateString), Formato:=Formato) Else Alert("No hay datos consultados", TipoMensaje.MsgAdvertencia) End If