diff --git a/App_Code/ClsContabilidad.vb b/App_Code/ClsContabilidad.vb index 39578f6b3..c42ee329b 100644 --- a/App_Code/ClsContabilidad.vb +++ b/App_Code/ClsContabilidad.vb @@ -4609,26 +4609,10 @@ Public Class ClsContabilidad Return Retorno End Function - Public Function GetMonedas() As Boolean + Public Function GetAgrupadoresSAT() As Boolean Dim Retorno As Boolean = False - DataAdapter(" SELECT * FROM Monedas ".ToString, CommandType.Text) - - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al consultar las Monedas.", ex) - End Try - - Return Retorno - End Function - - Public Function GetAgrupadoresSAT(CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - - DataAdapter(" SELECT CveAgrupadorSAT, Codigo + REPLICATE(' ', 10 - len(Codigo)) + ' - ' + Nombre AS CodigoNombre FROM AgrupadoresSAT where CveEmpresa= '" & CveEmpresa & "'", CommandType.Text) - + DataAdapter("PA_Conta_AgrupadoresSATGet") Try SqlAdapter.Fill(Data) Retorno = True diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index dcffa0622..2433210a6 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -1175,7 +1175,7 @@ Public Class ClsPaginas ObjPS.Dispose() End Get End Property - Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1) As DataTable + Public Property GlobalDTPSSimplificado(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional PSCodigo As String = "-1", Optional Estatus As Integer = 1, Optional AplicaParaVenta As Integer = -1, Optional CvePS As Integer = -1) As DataTable Get Dim AppNombre As String = String.Format("GlobalDTPSSimplificado{0}", CveEmpresa) If CveEmpresa <> -1 Then @@ -1195,6 +1195,7 @@ Public Class ClsPaginas If PSCodigo <> "-1" Then Cons = Cons.Where((Function(a) Convert.ToString(a!PSCodigo) = PSCodigo)) If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus)) If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta)) + If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS)) Try GlobalDTPSSimplificado = Cons.OrderBy(Function(a) a!PSCodigo).CopyToDataTable diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index ce6cb92d0..567e32a28 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -529,6 +529,24 @@ Public Class ClsVentas Return Retorno End Function + Public Function GetPagos(CveVenta As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_VentasPagosGet") + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener el Pago de la Venta.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function RemoveVta_VentaPago(CveVenta As Integer, CveMetodoPago As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Vta_VentasPagoRemove") @@ -2786,7 +2804,7 @@ Public Class ClsVentas Try Dim objServicio As Cancelacion.CancelacionSoapClient = New Cancelacion.CancelacionSoapClient() - Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890") + Dim resp As Cancelacion.StructCancel = objServicio.ObtienePendientes(RFC, "UserTest", "1234567890") If resp.Estado = 0 Then Dim XmlPendientes As String = System.Text.Encoding.UTF8.GetString(Convert.FromBase64String(resp.Xml)) Dim theReader As IO.StringReader = New IO.StringReader(XmlPendientes) diff --git a/App_Code/Modelos.vb b/App_Code/Modelos.vb index 045b59ec5..f3f8f4c5e 100644 --- a/App_Code/Modelos.vb +++ b/App_Code/Modelos.vb @@ -4001,7 +4001,7 @@ Namespace Modelos Dim TieneAlmacen As Boolean = False 'VALIDA QUE LA FACTURA NO TENGA PAGOS - If ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then + If Not EsRefacturacion AndAlso ObjFactura.TipoDocto.Contiene("Ing", "Rem") AndAlso ObjFactura.Pagado > 0 Then Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados." Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia @@ -4033,7 +4033,7 @@ Namespace Modelos End If If ObjFactura.TipoDocto = "Ant" AndAlso ObjFactura.SaldoAmortizado > 0 Then - Retorno.Mensaje = "La factura no se puede cancelar debido a que tiene pagos vinculados." + Retorno.Mensaje = "La factura no se puede cancelar debido a que el anticipo ha sido amortizado." Retorno.TipoMensaje = TipoMensaje.MsgAdvertencia Return Retorno diff --git a/Ashx/SIGWeb.ashx b/Ashx/SIGWeb.ashx index 986094a69..890fd766c 100644 --- a/Ashx/SIGWeb.ashx +++ b/Ashx/SIGWeb.ashx @@ -380,7 +380,7 @@ Public Class SIGWeb : Implements IHttpHandler, IRequiresSessionState End If - If usuario.Empresa.Funcionalidad(558) = "1" Then + If usuario.Empresa.Funcionalidad(558) = "1" AndAlso DtPSRetorno IsNot Nothing Then Try Dim NombreFiltroColumna As String = DtPSRetorno.Columns(3).ColumnName DtPSRetorno = DtPSRetorno.FiltraParametros("", String.Format("{0} DESC,PSCodigo", NombreFiltroColumna)) diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index de7d61293..2726036c6 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -16717,7 +16717,7 @@ Partial Class Compras_Compras Dim DiferenciaPermitida = 0.6 If Math.Abs(DifTotales) > DiferenciaPermitida Then - Alert("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.", TipoMensaje.MsgAdvertencia) + Alert(String.Format("Los importes de los conceptos (Productos/Servicios) no cuadran con el total. Por favor verifique y vuelva a intentar.[{0}]", Math.Abs(DifTotales) - DiferenciaPermitida), TipoMensaje.MsgAdvertencia) EsValido = False ElseIf DifTotales <> 0 Then TxtSubTotal2.Text = (TxtSubTotal2.Text.ToDouble + DifTotales).ToString diff --git a/Contabilidad/ContabilizacionCompras.aspx.cs b/Contabilidad/ContabilizacionCompras.aspx.cs index ec8ae0aba..17ffb188a 100644 --- a/Contabilidad/ContabilizacionCompras.aspx.cs +++ b/Contabilidad/ContabilizacionCompras.aspx.cs @@ -53,21 +53,21 @@ public partial class Contabilidad_ContabilizacionCompras : ClsPaginas //DdlProveedores.DataSource = get_GlobalDTCompProveedores(UsuarioActual.CveEmpresa); //DdlProveedores.DataBind(); - - DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa); - DdlPersonal.DataBind(); - - DdlPlantillasPolizas.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa); - DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1")); - DdlPlantillasPolizas.DataBind(); - - txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString(); - txtFechaF.Text = DateTime.Now.ToShortDateString(); - + //CargaDatos(); } + DdlPersonal.DataSource = get_GlobalDTRHPersonal(UsuarioActual.CveEmpresa); + DdlPersonal.DataBind(); + + DdlPlantillasPolizas.DataSource = get_GlobalDTContaPlantillasPolizas(UsuarioActual.CveEmpresa); + DdlPlantillasPolizas.Items.Insert(0, new ListItem("Todos", "-1")); + DdlPlantillasPolizas.DataBind(); + + txtFechaI.Text = DateTime.Now.FirstDayOfMonth().AddMonths(-1).ToShortDateString(); + txtFechaF.Text = DateTime.Now.ToShortDateString(); + if (UsuarioActual.CveRol == 1 || UsuarioActual.CveUsuario == 17 || UsuarioActual.CveUsuario == 171 || UsuarioActual.TienePermisoProceso(221)) { TienePermisoEditar = true; diff --git a/Contabilidad2/CatCuentas.aspx.vb b/Contabilidad2/CatCuentas.aspx.vb index 7dbef8341..7a8cecb4e 100644 --- a/Contabilidad2/CatCuentas.aspx.vb +++ b/Contabilidad2/CatCuentas.aspx.vb @@ -111,19 +111,13 @@ Partial Class Contabilidad2_CatCuentas End Sub Private Sub CargaMonedas() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) - Dim ObJConta As New ClsContabilidad - - If ObJConta.GetMonedas() Then - DdlMoneda.DataSource = ObJConta.DtResultados - End If - ObJConta.Dispose() + DdlMoneda.DataSource = GlobalDTMonedas DdlMoneda.DataBind() End Sub Private Sub CargaAgrupadorSAT() - 'Dim ObjConta As New ClsContPAQi(UsuarioActual.Empresa) + Dim ObjConta As New ClsContabilidad If ObjConta.GetAgrupadoresSAT(UsuarioActual.CveEmpresa) Then diff --git a/Empresas/Grales/Formatos/RepProductosServicios.rdlc b/Empresas/Grales/Formatos/RepProductosServicios.rdlc index e7890ec50..f3e1f32c1 100644 --- a/Empresas/Grales/Formatos/RepProductosServicios.rdlc +++ b/Empresas/Grales/Formatos/RepProductosServicios.rdlc @@ -1,978 +1,1015 @@ - - - - - - - - - - - - true - true - - - - - Grupo - - - - Textbox28 - - - - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - 2.36727cm - - - 2.63186cm - - - 2.55248cm - - - 2.12915cm - - - 2.49956cm - - - - - 0.6cm - - - - - true - true - - - - - =Fields!Cantidad.Value - - - - - - - Cantidad - - - =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!SubTotal.Value - - - - - - - SubTotal - - - =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Descuento.Value - - - - - - - Descuento - - - =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!IVA.Value - - - - - - - IVA - - - =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - true - true - - - - - =Fields!Total.Value - - - - - - - Total - - - =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - 0.6cm - - - true - true - - - - - Cantidad - - - - Textbox40 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Sub Total - - - - Textbox42 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Descuento - - - - Textbox44 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - IVA - - - - Textbox51 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - 0.6cm - - - true - true - - - - - Total - - - - Textbox47 - - - LightGrey - 2pt - 2pt - 2pt - 2pt - - - - - - - - - - - - - =Fields!GPO.Value - - - - 6.79828cm - - - true - true - - - - - =Fields!GPO.Value - - - - - - =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") - 2pt - 2pt - 2pt - 2pt - - - - - - - - DataSet1 - 0.06614cm - 1.2cm - 18.9786cm - - - - - - 0.47244in - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - REPORTE DE PRODUCTOS SERVICIOS - - - - - - - - - - - - - - - - Textbox2 - 1.10271cm - 3.80842cm - 0.52945cm - 9.98771cm - 1 - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Inicio: - - - - - - - - - =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) - - - - - - - - - - - - - - - Fecha Fin: - - - - - - - - - =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) - - - - Textbox13 - 0.0259cm - 15.579cm - 2.18834cm - 3.53188cm - 2 - - - 2pt - 2pt - 2pt - 2pt - - - - External - =Parameters!LogoPath.Value - FitProportional - 0.06614cm - 2.22362cm - 2.33715cm - 3 - - - - - - - - - - - 0.84667cm - true - true - - - true - true - - - - - ="Página " & Globals.PageNumber & " de " & Globals.TotalPages - - - - - - - Textbox3 - 0.08291cm - 16.97887cm - 0.68085cm - 2.06587cm - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Usuario: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!UsuarioImprimio.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - Fecha Impresión: - - - - - - 2pt - 2pt - 2pt - 2pt - - - - true - true - - - - - =Parameters!FechaImpresion.Value - - - - - - 2pt - 2pt - 2pt - 2pt - - - - - - - - 29.7cm - 21cm - 0.5cm - 0.5cm - 1cm - 1cm - 0.13cm - + + + Textbox28 + + + + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + 2.36727cm + + + 2.63186cm + + + 2.55248cm + + + 2.12915cm + + + 2.49956cm + + + + + 0.6cm + + + + + true + true + + + + + =Fields!Cantidad.Value + + + + + + + Cantidad + + + =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!SubTotal.Value + + + + + + + SubTotal + + + =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Descuento.Value + + + + + + + Descuento + + + =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!IVA.Value + + + + + + + IVA + + + =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + true + true + + + + + =Fields!Total.Value + + + + + + + Total + + + =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + 0.6cm + + + true + true + + + + + Cantidad + + + + Textbox40 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + Sub Total + + + + Textbox42 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + Descuento + + + + Textbox44 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + IVA + + + + Textbox51 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + 0.6cm + + + true + true + + + + + Total + + + + Textbox47 + + + LightGrey + 2pt + 2pt + 2pt + 2pt + + + + + + + + + + + + + =Fields!GPO.Value + + + + 6.79828cm + + + true + true + + + + + =Fields!GPO.Value + + + + + + =IIF(Fields!Orden.Value = "","CornflowerBlue","Transparent") + 2pt + 2pt + 2pt + 2pt + + + + + + + + DataSet1 + 0.06614cm + 1.2cm + 18.9786cm + + + + + + 0.47244in + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + REPORTE DE PRODUCTOS SERVICIOS + + + + + + + + + + + + + + + + Textbox2 + 1.10271cm + 3.80842cm + 0.52945cm + 9.98771cm + 1 + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Inicio: + + + + + + + + + =IIF(Parameters!FechaInicio.Value = "-1","",Parameters!FechaInicio.Value) + + + + + + + + + + + + + + + Fecha Fin: + + + + + + + + + =IIF(Parameters!FechaFin.Value = "-1","",Parameters!FechaFin.Value) + + + + Textbox13 + 0.0259cm + 15.579cm + 2.18834cm + 3.53188cm + 2 + + + 2pt + 2pt + 2pt + 2pt + + + + External + =Parameters!LogoPath.Value + FitProportional + 0.06614cm + 2.22362cm + 2.33715cm + 3 + + + + + + true + true + + + + + =Parameters!Filtros.Value + HTML + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + + 0.84667cm + true + true + + + true + true + + + + + ="Página " & Globals.PageNumber & " de " & Globals.TotalPages + + + + + + + Textbox3 + 0.08291cm + 16.97887cm + 0.68085cm + 2.06587cm + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Usuario: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!UsuarioImprimio.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + Fecha Impresión: + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + =Parameters!FechaImpresion.Value + + + + + + 2pt + 2pt + 2pt + 2pt + + + + + + + + 29.7cm + 21cm + 0.5cm + 0.5cm + 1cm + 1cm + 0.13cm +