From 68144d5373f4d86ec1bd32542dbe64ac801cdf03 Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Tue, 29 Sep 2020 21:47:12 -0700 Subject: [PATCH 01/13] - --- App_Code/ClsCompras.vb | 356 +++++++++++++++++----------------- Compras/Compras.aspx.vb | 4 +- Inventarios/RepFletes.aspx | 3 +- Inventarios/RepFletes.aspx.vb | 14 +- 4 files changed, 192 insertions(+), 185 deletions(-) diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index eea2fc4d8..584994987 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -19,13 +19,13 @@ Public Class ClsCompras Private StrSQL As StringBuilder 'Atributos de la clase - Private disposedValue As Boolean = False ' Para detectar llamadas redundantes - 'REGISTRAR CONEXIONES ABIERTAS - Private CveConexion As Integer = 0 - Private EsTransaccionCompartida As Boolean = False - + Private disposedValue As Boolean = False ' Para detectar llamadas redundantes + 'REGISTRAR CONEXIONES ABIERTAS + Private CveConexion As Integer = 0 + Private EsTransaccionCompartida As Boolean = False + #End Region - + #Region "Propiedades" Public ReadOnly Property DtResultados() As DataTable Get @@ -60,12 +60,12 @@ Public Class ClsCompras SqlConexion.Open() Catch ex As Exception OnError("Ocurrió un error al intentar conectarse a la base de datos.", ex) - End Try + End Try Else SqlConexion = TransaccionCompartida.Connection - SqlTransacc = TransaccionCompartida + SqlTransacc = TransaccionCompartida EsTransaccionCompartida = True - End If + End If SqlAdapter = New SqlDataAdapter("", SqlConexion) ConexionAdd() @@ -80,18 +80,18 @@ Public Class ClsCompras End With Data = New DataTable If SqlTransacc IsNot Nothing Then SqlAdapter.SelectCommand.Transaction = SqlTransacc - End Sub - + End Sub + #Region "Conexiones" - + Private Sub ConexionAdd() If Not EsTransaccionCompartida AndAlso ConfigurationManager.AppSettings("RegistraConexion") IsNot Nothing AndAlso ConfigurationManager.AppSettings("RegistraConexion").ToString() = "1" Then - Try - DataAdapter("PA_Sis_RegistrarConexion") - With SqlAdapter.SelectCommand.Parameters - .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name - .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) - .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output + Try + DataAdapter("PA_Sis_RegistrarConexion") + With SqlAdapter.SelectCommand.Parameters + .Add("@Clase", SqlDbType.VarChar).Value = Me.GetType().Name + .Add("@Modulo", SqlDbType.VarChar).Value = String.Format("{0}?{1}", HttpContext.Current.Request.Url.AbsolutePath.ToString, HttpContext.Current.Request.QueryString.ToString) + .Add("@IDConexion", SqlDbType.Int).Direction = ParameterDirection.Output End With SqlAdapter.Fill(Data) CveConexion = SqlAdapter.SelectCommand.Parameters("@IDConexion").Value.ToString.ToEntero @@ -116,9 +116,9 @@ Public Class ClsCompras CveConexion = 0 End If - End Sub + End Sub #End Region - + Public Function GetCompras(CveCompra As Integer, Serie As String, Folio As String, CveProveedor As Integer, IdPoliza As Integer, CveEmpresa As Integer, Optional ProveedorRFC As String = "-1") As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComprasGet") @@ -143,7 +143,7 @@ Public Class ClsCompras Return Retorno End Function - Public Function GetCompras(CveEmpresa As Integer, TipoDocto As String, Folio As String, FolioFiscal As String, Codigo As String, Proveedor As String, FechaI As String, + Public Function GetCompras(CveEmpresa As Integer, TipoDocto As String, Folio As String, FolioFiscal As String, Codigo As String, Proveedor As String, FechaI As String, FechaF As String, Descripcion As String, Observaciones As String, Optional CveProveedor As Integer = -1, Optional TopSelect As Integer = 10000) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComprasGetBuscar") @@ -199,8 +199,8 @@ Public Class ClsCompras Dim Retorno As Boolean = False - DataAdapter("PA_Comp_CompraAdd") - + DataAdapter("PA_Comp_CompraAdd") + With SqlAdapter.SelectCommand.Parameters .Add("@TipoDocto", SqlDbType.VarChar).Value = TipoDocto .Add("@Descripcion", SqlDbType.VarChar).Value = Descripcion @@ -588,10 +588,10 @@ Public Class ClsCompras End If Catch ex As SqlException If ex.Message.Contains("FK_Inv_MovimientosDetalle_Inv_MovimientosDetalleEntrada") Then - Alert(String.Format("No se puede eliminar la compra, porque tiene movimientos de salida de Almacen relacionados."), TipoMensaje.MsgAdvertencia) - - ElseIf ex.Message.Contains("50015") Then - Alert("No se puede eliminar na compra debido a que el perido esta cerrado.", TipoMensaje.MsgAdvertencia) + Alert(String.Format("No se puede eliminar la compra, porque tiene movimientos de salida de Almacen relacionados."), TipoMensaje.MsgAdvertencia) + + ElseIf ex.Message.Contains("50015") Then + Alert("No se puede eliminar na compra debido a que el perido esta cerrado.", TipoMensaje.MsgAdvertencia) Else Me.OnError("Ocurrió un error al eliminar la Compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If @@ -1765,11 +1765,11 @@ Public Class ClsCompras SqlAdapter.Fill(Data) OnError = True Catch ex As Exception - If ex.Message.Contains("Desbordamiento de SqlDateTime. Debe estar entre 1/1/1753 12:00:00 AM y 12/31/9999 11:59:59 PM.") Then - Alert("Fechas fuera de rango, debe estar entre 1/1/1753 12:00:00 AM y 12/31/9999 11:59:59 PM", TipoMensaje.MsgAdvertencia) - Else + If ex.Message.Contains("Desbordamiento de SqlDateTime. Debe estar entre 1/1/1753 12:00:00 AM y 12/31/9999 11:59:59 PM.") Then + Alert("Fechas fuera de rango, debe estar entre 1/1/1753 12:00:00 AM y 12/31/9999 11:59:59 PM", TipoMensaje.MsgAdvertencia) + Else Me.OnError("Ocurrió un error al obtener la bitácora.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) - End If + End If End Try Return OnError @@ -2218,10 +2218,10 @@ Public Class ClsCompras End Try Return Retorno - End Function - + End Function + #End Region - + #Region " DEVOLUCIONES COMPRAS - IPP FEBRERO 2018 " Public Function ComprasDetalleDevolucionesAdd(CveCompraDetalle As Integer, CveCompraNC As Integer, Cantidad As Double, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -2242,11 +2242,11 @@ Public Class ClsCompras End Try Return Retorno - End Function + End Function #End Region - + #Region "TIPOS DE GASTOS" - + Public Function GetTipoGasto(CveTipoGasto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_TiposGastosGet") @@ -2264,17 +2264,17 @@ Public Class ClsCompras End Try Return Retorno - End Function - + End Function + Public Function AddTipoGasto(TipoGasto As String, Estatus As Boolean, FechaIng As String, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_TiposGastosAdd") With SqlAdapter.SelectCommand.Parameters - .Add("@TipoGasto", SqlDbType.NVarChar).Value = TipoGasto - .Add("@Estatus", SqlDbType.Bit).Value = Estatus - .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@TipoGasto", SqlDbType.NVarChar).Value = TipoGasto + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@FechaIng", SqlDbType.DateTime).Value = FechaIng + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -2286,17 +2286,17 @@ Public Class ClsCompras End Try Return Retorno - End Function - + End Function + Public Function UpdateTipoGasto(CveTipoGasto As Integer, TipoGasto As String, Estatus As Boolean, CveUsuario As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_TiposGastosUpdate") With SqlAdapter.SelectCommand.Parameters - .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto - .Add("@TipoGasto", SqlDbType.NVarChar).Value = TipoGasto - .Add("@Estatus", SqlDbType.Bit).Value = Estatus - .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + .Add("@CveTipoGasto", SqlDbType.Int).Value = CveTipoGasto + .Add("@TipoGasto", SqlDbType.NVarChar).Value = TipoGasto + .Add("@Estatus", SqlDbType.Bit).Value = Estatus + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa End With @@ -2308,8 +2308,8 @@ Public Class ClsCompras End Try Return Retorno - End Function - + End Function + Public Function RemoveTipoGasto(CveTipoGasto As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_TiposGastosRemove") @@ -2326,51 +2326,51 @@ Public Class ClsCompras End Try Return Retorno - End Function - - + End Function + + #End Region - + #Region "VINCULAR PAGO" - 'Public Function GetVincularPago(CveProveedor As Integer, CveCompra As Integer, Tipo As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional CveTipoProveedor As Integer = -1) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_Comp_VincularPagoGet") - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor - ' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra - ' .Add("@Tipo", SqlDbType.Int).Value = Tipo - ' .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio - ' .Add("@FechaFin", SqlDbType.Date).Value = FechaFin - ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - ' .Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor - ' End With - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener los pagos a vincular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - ' Return Retorno - 'End Function - - 'Public Function GetVincularPago(CveProveedor As Integer, Monto As Decimal, XMLPagos As String, CveEmpresa As Integer) As Boolean - ' Dim Retorno As Boolean = False - ' DataAdapter("PA_Comp_VincularComplementoPagoGet") - ' With SqlAdapter.SelectCommand.Parameters - ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor - ' .Add("@Monto", SqlDbType.Float).Value = Monto - ' .Add("@XMLPagos", SqlDbType.Xml).Value = XMLPagos - ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - ' End With - ' Try - ' SqlAdapter.Fill(Data) - ' Retorno = True - ' Catch ex As Exception - ' OnError("Ocurrió un error al obtener la vinculación de complemento de pago.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - ' End Try - ' Return Retorno - 'End Function - + 'Public Function GetVincularPago(CveProveedor As Integer, CveCompra As Integer, Tipo As Integer, FechaInicio As Date, FechaFin As Date, CveEmpresa As Integer, Optional CveTipoProveedor As Integer = -1) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Comp_VincularPagoGet") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + ' .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + ' .Add("@Tipo", SqlDbType.Int).Value = Tipo + ' .Add("@FechaInicio", SqlDbType.Date).Value = FechaInicio + ' .Add("@FechaFin", SqlDbType.Date).Value = FechaFin + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' .Add("@CveTipoProveedor", SqlDbType.Int).Value = CveTipoProveedor + ' End With + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener los pagos a vincular.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + ' Return Retorno + 'End Function + + 'Public Function GetVincularPago(CveProveedor As Integer, Monto As Decimal, XMLPagos As String, CveEmpresa As Integer) As Boolean + ' Dim Retorno As Boolean = False + ' DataAdapter("PA_Comp_VincularComplementoPagoGet") + ' With SqlAdapter.SelectCommand.Parameters + ' .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + ' .Add("@Monto", SqlDbType.Float).Value = Monto + ' .Add("@XMLPagos", SqlDbType.Xml).Value = XMLPagos + ' .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + ' End With + ' Try + ' SqlAdapter.Fill(Data) + ' Retorno = True + ' Catch ex As Exception + ' OnError("Ocurrió un error al obtener la vinculación de complemento de pago.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + ' End Try + ' Return Retorno + 'End Function + Public Function AddComplementoPago(CveIE As Integer, CveCompra As Integer, Importe As Decimal, CvePrePolizaDetalle As Integer, CveFactura As Integer) As Integer Dim Retorno As Integer = 0 DataAdapter("PA_Comp_ComplementoPagoAdd") @@ -3003,8 +3003,8 @@ Public Class ClsCompras OnError("Ocurrió un error al obtener el reporte de anticipos - nc - exc detalle .", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - + End Function + #End Region Public Function GetCxPProgramado(CveCompra As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False @@ -3020,8 +3020,8 @@ Public Class ClsCompras OnError("Ocurrió un error al obtener la información de la compra programada.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - + End Function + Public Function GetCancelarNC(CveCompra As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Conta_CancelarNCGet") @@ -3036,79 +3036,79 @@ Public Class ClsCompras OnError("Ocurrió un error al obtener los datos para cancelar la nc.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function - - Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveCompra", SqlDbType.Int).Value = CveCompra - .Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al actualizar la fecha de vencimiento de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - End Function - - Public Function GetRepEvaluacionesProveedores(CveEmpresa As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, Evaluado As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_RepEvaluacionesProveedoresGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor - .Add("@FechaI", SqlDbType.DateTime).Value = FechaI - .Add("@FechaF", SqlDbType.DateTime).Value = FechaF - .Add("@Evaluado", SqlDbType.Int).Value = Evaluado - End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al querer obtener el reporte de evaluaciones de proveedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - End Function - - Public Function GetFletesCompras(CveFlete As Integer, CveEmpresa As Integer) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_FletesComprasGet") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveFlete", SqlDbType.Int).Value = CveFlete - .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al querer obtener las compras relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - End Function - - Public Function AddFletesCompras(CveFlete As Integer, Optional CveCompra As Integer = -1, Optional CveOC As Integer = -1) As Boolean - Dim Retorno As Boolean = False - DataAdapter("PA_Comp_FletesComprasAdd") - With SqlAdapter.SelectCommand.Parameters - .Add("@CveFlete", SqlDbType.Int).Value = CveFlete - .Add("@CveCompra", SqlDbType.Int).Value = CveCompra - .Add("@CveOC", SqlDbType.Int).Value = CveOC - End With - Try - SqlAdapter.Fill(Data) - Retorno = True - Catch ex As Exception - OnError("Ocurrió un error al querer agregar las compras relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) - End Try - Return Retorno - End Function - + End Function + + Public Function UpdateFechaVencimientoCompra(CveCompra As Integer, FechaVencimiento As Date, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Comp_ComprasFechaVencimientoUpdate") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + .Add("@FechaVencimiento", SqlDbType.Date).Value = FechaVencimiento + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al actualizar la fecha de vencimiento de la compra.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function GetRepEvaluacionesProveedores(CveEmpresa As Integer, CveProveedor As Integer, FechaI As Date, FechaF As Date, Evaluado As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Comp_RepEvaluacionesProveedoresGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + .Add("@CveProveedor", SqlDbType.Int).Value = CveProveedor + .Add("@FechaI", SqlDbType.DateTime).Value = FechaI + .Add("@FechaF", SqlDbType.DateTime).Value = FechaF + .Add("@Evaluado", SqlDbType.Int).Value = Evaluado + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al querer obtener el reporte de evaluaciones de proveedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function GetFletesCompras(CveFlete As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Comp_FletesComprasGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveFlete", SqlDbType.Int).Value = CveFlete + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al querer obtener las compras relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + + Public Function AddFletesCompras(CveFlete As Integer, Optional CveCompra As Integer = -1, Optional CveOC As Integer = -1) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Comp_FletesComprasAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveFlete", SqlDbType.Int).Value = CveFlete + .Add("@CveCompra", SqlDbType.Int).Value = CveCompra + .Add("@CveOC", SqlDbType.Int).Value = CveOC + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al querer agregar las compras relacionadas.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + #Region "REPORTE PUE SIN PAGO" - + Public Function GetPUESinPago(FI As DateTime, FF As DateTime, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer, Optional CveUsuario As Integer = -1) As Boolean Dim retorno As Boolean = False DataAdapter("PA_Comp_PUESinPagoGet", CommandType.StoredProcedure) @@ -3127,10 +3127,10 @@ Public Class ClsCompras OnError("Ocurrió un error al obtener las compras con método de pago PUE.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return retorno - End Function - + End Function + #End Region -#Region "Reporte de REQ-OC-Compra-Inv" +#Region "Reporte de REQ-OC-Compra-Inv" Public Function GetRepReqOCCompraInv(FI As Date, FF As Date, CveProveedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ReqOCCompraInvGet") @@ -3151,9 +3151,9 @@ Public Class ClsCompras End Try Return Retorno - End Function -#End Region -#Region "Reporte de Precios de Compras" + End Function +#End Region +#Region "Reporte de Precios de Compras" Public Function GetRepComprasPrecios(CveProveedor As Integer, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_ComprasPreciosGet") @@ -3170,8 +3170,8 @@ Public Class ClsCompras OnError("Ocurrió un error al obtener el reporte de Precios de Compras.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) End Try Return Retorno - End Function -#End Region + End Function +#End Region End Class diff --git a/Compras/Compras.aspx.vb b/Compras/Compras.aspx.vb index 963b4f3a6..211db915c 100644 --- a/Compras/Compras.aspx.vb +++ b/Compras/Compras.aspx.vb @@ -4489,7 +4489,7 @@ Partial Class Compras_Compras CveConceptoContableAlmacen = 205 End If Else - CveConceptoContableAlmacen = 225 + CveConceptoContableAlmacen = 225 End If 'Condiciones para los casos de facturas que son en 0 pero que se utiliza el almacen @@ -6747,7 +6747,7 @@ Partial Class Compras_Compras End If - If UsuarioActual.CveEmpresa.Contiene(119) Then + If UsuarioActual.CveEmpresa.Contiene(119) Then Dim ContienePSNeteoBonif As Boolean = False For Each Dr As DataRow In TmpDT.Rows If Dr("CveClasificacion").ToString.ToEntero.Contiene(20319) Or DdlTipoCompra.SelectedValue.ToEntero = 11 Then 'clasificación de Bonificación, no se incluirá en el neteo diff --git a/Inventarios/RepFletes.aspx b/Inventarios/RepFletes.aspx index 16f6d5ba8..f3cd9cdf1 100644 --- a/Inventarios/RepFletes.aspx +++ b/Inventarios/RepFletes.aspx @@ -43,7 +43,8 @@
Proveedor:
- + + <%----%>
Fecha Inicio:
diff --git a/Inventarios/RepFletes.aspx.vb b/Inventarios/RepFletes.aspx.vb index 92cbf419b..418cb8a08 100644 --- a/Inventarios/RepFletes.aspx.vb +++ b/Inventarios/RepFletes.aspx.vb @@ -24,12 +24,18 @@ Partial Class Compras_RepFletes End Sub Private Sub InicializaValores() + DdlProveedores.setEsWebService(True) + DdlProveedores.Attributes.Add("data-metodo", "getproveedores") + DdlProveedores.SelectedText = "Seleccione" + DdlProveedores.SelectedValue = "-1" + DdlProveedores.ddl.AutoPostBack = True + TxtFechaI.Text = Date.Now.AddDays(-Now.DayOfYear + 1).ToShortDateString TxtFechaF.Text = Date.Now.ToShortDateString - DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) - DdlProveedor.DataBind() - DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) + 'DdlProveedor.DataSource = GlobalDTCompProveedores(UsuarioActual.CveEmpresa) + 'DdlProveedor.DataBind() + 'DdlProveedor.Items.Insert(0, New ListItem("Todos", "-1")) End Sub @@ -40,7 +46,7 @@ Partial Class Compras_RepFletes Private Sub CargaDatos() Dim ObjInv As New ClsInventarios If TxtFolio.Text <> "" Then TxtFechaI.Text = MinFecha.ToShortDateString : TxtFechaF.Text = MaxFecha.ToShortDateString - If ObjInv.GetFletesRep(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedor.SelectedValue.ToString.ToEntero, -1, -1, + If ObjInv.GetFletesRep(UsuarioActual.CveEmpresa, -1, If(TxtFolio.Text = "", "-1", TxtFolio.Text), DdlProveedores.SelectedValue.ToString.ToEntero, -1, -1, TxtFechaI.Text.ToDate, TxtFechaF.Text.ToDate, TipoGasto:=DdlTipoGasto.SelectedValue.ToEntero()) Then DtFletes = ObjInv.DtResultados End If From bd36e4617f5e83af08b1a884c4ed5c5515912ce5 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Wed, 30 Sep 2020 15:38:43 -0700 Subject: [PATCH 02/13] Carga de DdlSubProyectos --- Ventas/Clientes.aspx.vb | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/Ventas/Clientes.aspx.vb b/Ventas/Clientes.aspx.vb index 1e3cdac65..4601aba6d 100644 --- a/Ventas/Clientes.aspx.vb +++ b/Ventas/Clientes.aspx.vb @@ -1196,15 +1196,14 @@ Partial Class Clientes End Sub - Private Sub CargaSubProyectoss() - DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) - DdlSubProyecto.DataBind() + Private Sub CargaSubProyectoss() + + 'DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1).FiltraParametros("CveEmpresa = " & UsuarioActual.CveEmpresa) + DdlSubProyecto.DataSource = GlobalDTSubProyectos(-1, CveEmpresa:=UsuarioActual.CveEmpresa) - 'If UsuarioActual.CveSucursal = -1 Then - ' DdlSubProyecto.Items.Insert(0, New ListItem("Seleccione", "-1")) - 'Else - ' DdlSubProyecto.SelectedValue = UsuarioActual.CveSucursal.ToString - 'End If + DdlSubProyecto.DataBind() + + End Sub Private Sub CargaMetodosPago() DdlMetodoPago.DataSource = GlobalDTMetodosPago.FiltraParametros("Estatus = 'Activo'", "ClaveSAT") '.FiltraParametros("CveMetodoPago > 0 ") From 338acaf0b341c72d39c9c9c2d5dac8165a1e54ca Mon Sep 17 00:00:00 2001 From: Jonathan Alexis Perez Morales Date: Wed, 30 Sep 2020 19:42:31 -0700 Subject: [PATCH 03/13] SOPORTES, ACTIVOS FIJIS (Interno,externo), generar remision del pescadito --- .../RepPedidosDevolucionesXContrato.aspx | 6 +- .../RepPedidosDevolucionesXContrato.aspx.vb | 6 +- asmx/WSApp.asmx | 121 +++++++++++------- 3 files changed, 80 insertions(+), 53 deletions(-) diff --git a/Contratos/RepPedidosDevolucionesXContrato.aspx b/Contratos/RepPedidosDevolucionesXContrato.aspx index 834e5f7d5..335c87aea 100644 --- a/Contratos/RepPedidosDevolucionesXContrato.aspx +++ b/Contratos/RepPedidosDevolucionesXContrato.aspx @@ -140,7 +140,8 @@ - + +
@@ -180,7 +181,8 @@ - + + diff --git a/Contratos/RepPedidosDevolucionesXContrato.aspx.vb b/Contratos/RepPedidosDevolucionesXContrato.aspx.vb index dcaf3497f..0c7ce6161 100644 --- a/Contratos/RepPedidosDevolucionesXContrato.aspx.vb +++ b/Contratos/RepPedidosDevolucionesXContrato.aspx.vb @@ -111,7 +111,8 @@ Partial Class Ventas_RepPedidosDevolucionesXContrato e.Row.Attributes.Add("style", "background-color:#B9B5B4 !important;") e.Row.Cells(1).Text = "" e.Row.Cells(5).Text = "" - e.Row.Cells(6).Text = "" + e.Row.Cells(6).Text = "" + e.Row.Cells(7).Text = "" Dim Texto = $"Pedido: {e.Row.DBCampo("SerieFolio")} | " Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: {e.Row.DBCampo("Folio")}") @@ -134,7 +135,8 @@ Partial Class Ventas_RepPedidosDevolucionesXContrato e.Row.Attributes.Add("style", "background-color:#B9B5B4 !important;") e.Row.Cells(1).Text = "" e.Row.Cells(5).Text = "" - e.Row.Cells(6).Text = "" + e.Row.Cells(6).Text = "" + e.Row.Cells(7).Text = "" Dim Texto = $"Devolución: {e.Row.DBCampo("SerieFolio")} | " Texto += If(e.Row.DBCampo("CveMovimiento").ToString = "", " SIN MOVIMIENTO DE ALMACÉN", $"Folio Almacén: {e.Row.DBCampo("Folio")}") diff --git a/asmx/WSApp.asmx b/asmx/WSApp.asmx index 7917b12e9..df4519040 100644 --- a/asmx/WSApp.asmx +++ b/asmx/WSApp.asmx @@ -43,6 +43,7 @@ Public Class WSApp ObjPS.Dispose() End Get End Property + Property GlobalDTMonedas() As DataTable Get GlobalDTMonedas = DirectCast(Application("GlobalDTMonedas"), DataTable) @@ -326,33 +327,42 @@ Public Class WSApp Application("GlobalDTCompProveedores") = value End Set End Property - Property GlobalDTProductosServicios(CveEmpresa As Integer, Optional CveClasificacion As Integer = -1, Optional CveClasificacionCosto As Integer = -1, Optional Estatus As Integer = 1, Optional CvePS As Integer = -1, Optional AplicaParaVenta As Integer = -1, Optional CveTipoPS As Integer = -1) As DataTable - Get - If CveEmpresa = -1 Then - GlobalDTProductosServicios = DirectCast(Application("GlobalDTProductosServicios"), EnumerableRowCollection(Of DataRow)).CopyToDataTable - Else - - Dim Cons = DirectCast(Application("GlobalDTProductosServicios"), EnumerableRowCollection(Of DataRow)) - Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) - If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) - If CveClasificacionCosto >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacionCosto) = CveClasificacionCosto)) - If Estatus >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEstado) = Estatus)) - If CvePS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CvePS) = CvePS)) - If AplicaParaVenta >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!AplicaParaVenta) = AplicaParaVenta)) - If CveTipoPS >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveTipoPS) = CveTipoPS)) - - 'Try, generado para cuando el resultado no tiene valores(The source contains no DataRows.), no detenga la ejecucion, no se le puso un count previo, porque el costo se duplica, al preguntar y luego ordenar y convertir a datatable - Try - GlobalDTProductosServicios = Cons.OrderBy(Function(a) a!PS).CopyToDataTable - Catch ex As Exception - GlobalDTProductosServicios = New DataTable - End Try - End If - - End Get - Set(value As DataTable) - Application("GlobalDTProductosServicios") = value - End Set + 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 + 'sino existe, recarga los datos + If Application(AppNombre) Is Nothing Then + Dim ObjPS As New ClsProductosServicios + If ObjPS.GetPSSimplificado(CveEmpresa) Then Application(AppNombre) = ObjPS.DtResultados.AsEnumerable() + ObjPS.Dispose() + + End If + + + Dim Cons = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)) + + Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveEmpresa) = CveEmpresa)) + If CveClasificacion >= 0 Then Cons = Cons.Where((Function(a) Convert.ToInt32(a!CveClasificacion) = CveClasificacion)) + 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 + Catch ex As Exception + GlobalDTPSSimplificado = New DataTable + End Try + + Else + GlobalDTPSSimplificado = DirectCast(Application(AppNombre), EnumerableRowCollection(Of DataRow)).CopyToDataTable + End If + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTPSSimplificado-{0}", CveEmpresa) + Application(AppNombre) = value + End Set End Property Property GlobalDTClasificaciones(Optional CveEmpresa As Integer = -1, Optional CveCategoria As Integer = -1) As DataTable Get @@ -715,26 +725,39 @@ Public Class WSApp End If If ListaPS IsNot Nothing Then Dim Continuar As Boolean = False - Dim ObjPS As New ClsProductosServicios - For Each PS In ListaPS - If ObjPS.GetPSExistencias(PS.CvePS, -1, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then - If ObjPS.DtResultados.Rows.Count > 0 Then - Dim Existencia As Decimal = ObjPS.DtResultados.Rows(0)("Existencia").ToString().ToDecimal() - Dim CveTipoPS As Integer = ObjPS.DtResultados.Rows(0)("CveTipoPS").ToString().ToEntero() - - Continuar = (CveTipoPS = 2 AndAlso Existencia > 0) OrElse (CveTipoPS = 1) - - If Not Continuar Then - Retorno.Mensajes.Add($"El producto/servicio {ObjPS.DtResultados.Rows(0)("PS")} no tiene existencia.") - Exit For - End If - Else - Continuar = False - Retorno.Mensajes.Add("No se pudo comprobar la existencia.") - Exit For - End If - End If - Next + Dim ObjPS As New ClsProductosServicios + Try + For Each PS In ListaPS + Dim CveTipoPS As Integer = GlobalDTPSSimplificado(CveEmpresa, CvePS:=PS.CvePS).FiltroPrimeroValor("CveTipoPS").ToEntero() + If CveTipoPS > 0 Then + If CveTipoPS = 2 Then + If ObjPS.GetPSExistencias(PS.CvePS, -1, -1, CveEmpresa, -1, FechaMovto:=DateTime.Today.AddDays(1).ToString("yyyy/MM/dd HH:mm")) Then + If ObjPS.DtResultados.Rows.Count > 0 Then + Dim Existencia As Decimal = ObjPS.DtResultados.Rows(0)("Existencia").ToString().ToDecimal() + 'Dim CveTipoPS As Integer = ObjPS.DtResultados.Rows(0)("CveTipoPS").ToString().ToEntero() + + Continuar = Existencia > 0 + + If Not Continuar Then + Retorno.Mensajes.Add($"El producto/servicio {ObjPS.DtResultados.Rows(0)("PS")} no tiene existencia.") + Exit For + End If + Else + Continuar = False + Retorno.Mensajes.Add("No se pudo comprobar la existencia.") + Exit For + End If + End If + End If + Else + Continuar = False + Retorno.Mensajes.Add("No se pudo comprobar si es producto o servicio.") + End If + Next + Catch ex As Exception + OnError("Ocurrió un error al consultar la existencia", ex) + Continuar = False + End Try ObjPS.Dispose() If Continuar Then @@ -1374,8 +1397,8 @@ Public Class WSApp Row("Total") = (PS.Cantidad.Value * PS.Precio) Row("TotalImporte") = Math.Round(PS.Cantidad.Value * PS.Precio, 2) - - Row("SATClaveProdServ") = DrPS("SATClavePS") + + Row("SATClaveProdServ") = DrPS("SATClavePS") Row("SATClaveUM") = DrPS("SATClaveUnidadMedida") Row("EntregaDirecta") = EntregaDirecta From 6ef3ae0071f10847cbc856919c4bc76cce8d02f0 Mon Sep 17 00:00:00 2001 From: Rakcsle Supertramp Date: Thu, 1 Oct 2020 13:53:06 -0700 Subject: [PATCH 04/13] Correcion Filtro Estatus Cliente --- Bancos/PolizaCheque.aspx.vb | 100 +++++++++++++++++++----------------- Ventas/CatClientes.aspx | 2 +- 2 files changed, 53 insertions(+), 49 deletions(-) diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 56533019e..f27450da1 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -403,54 +403,58 @@ Partial Class Bancos_PolizaCheque CodigoCuenta = "" NombreCuenta = "" - If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString)) - - - If drr IsNot Nothing Then - IdCuenta = drt("IdCtaContable").ToString.ToEntero - CodigoCuenta = drr("CuentaFormato").ToString() - NombreCuenta = drr("Nombre").ToString() - 'Cuenta = drr("Nombre").ToString() - End If - EsComodin = 0 - - - ElseIf drt("CveConcepto").ToString = "30" Then - 'saco la clave de la cuenta bancaria seleccionada - If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) - If drr IsNot Nothing Then - IdCuenta = drr("Id").ToString.ToEntero - CodigoCuenta = drr("CuentaFormato").ToString() - NombreCuenta = drr("Nombre").ToString() - ' Cuenta = drr("Nombre").ToString() - EsComodin = 1 - Else - - ' Rad.Checked = False - If UsuarioActual.CveEmpresa <> 126 Then - Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia) - GvMov.DataBind() - UPMovs.Update() - Exit Sub - End If - - End If - End If - ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then - - Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia)) - - IdCuenta = IdCtaFondoGarantia - CodigoCuenta = drr("CuentaFormato").ToString() - NombreCuenta = drr("Nombre").ToString() - 'Cuenta = drr("Nombre").ToString() - - EsComodin = 0 - - End If - + If UsuarioActual.Empresa.UsaContabilidad Then + If drt("IdCtaContable").ToString.ToEntero > 0 Then 'DtCuentasContables + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", drt("IdCtaContable").ToString)) + + + If drr IsNot Nothing Then + IdCuenta = drt("IdCtaContable").ToString.ToEntero + CodigoCuenta = drr("CuentaFormato").ToString() + NombreCuenta = drr("Nombre").ToString() + 'Cuenta = drr("Nombre").ToString() + End If + EsComodin = 0 + + + ElseIf drt("CveConcepto").ToString = "30" Then + 'saco la clave de la cuenta bancaria seleccionada + If DdlCuenta.SelectedValue.ToEntero > 0 And drt("CveConcepto").ToString = "30" Then 'DtCuentasContables + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCuentaBancos(DdlCuenta.SelectedValue.ToEntero))) + If drr IsNot Nothing Then + IdCuenta = drr("Id").ToString.ToEntero + CodigoCuenta = drr("CuentaFormato").ToString() + NombreCuenta = drr("Nombre").ToString() + ' Cuenta = drr("Nombre").ToString() + EsComodin = 1 + Else + + ' Rad.Checked = False + If UsuarioActual.CveEmpresa <> 126 Then + Alert("La Cuenta Bancaria no se ha vinculado a la cuenta contable", TipoMensaje.MsgAdvertencia) + GvMov.DataBind() + UPMovs.Update() + Exit Sub + End If + + End If + End If + ElseIf drt("CveConcepto").ToString.ToEntero = 135 And IdCtaFondoGarantia > 0 Then + + Dim drr As DataRow = DtCuentasContables.FiltroPrimero(String.Format("Id={0}", IdCtaFondoGarantia)) + + IdCuenta = IdCtaFondoGarantia + CodigoCuenta = drr("CuentaFormato").ToString() + NombreCuenta = drr("Nombre").ToString() + 'Cuenta = drr("Nombre").ToString() + + EsComodin = 0 + + End If + End If + + + Dim dr As DataRow = DtMovimientos.NewRow dr("IdCuenta") = IdCuenta dr("CodigoCuenta") = CodigoCuenta & "
" & NombreCuenta diff --git a/Ventas/CatClientes.aspx b/Ventas/CatClientes.aspx index 08b7edadf..cb3868201 100644 --- a/Ventas/CatClientes.aspx +++ b/Ventas/CatClientes.aspx @@ -60,7 +60,7 @@ Todos Activo - Inactivo + Inactivo From e1a5d171ba97d88d730ed99a4089d287d45df11e Mon Sep 17 00:00:00 2001 From: Antonio Gonzalez Date: Fri, 2 Oct 2020 12:53:36 -0700 Subject: [PATCH 05/13] - --- Compras/PopUpVerFactura.aspx.vb | 10 +- Empresas/72/Formatos/Factura.rdlc | 44 ++----- Empresas/72/Formatos/NotaCredito.rdlc | 158 +++++++---------------- Empresas/72/Formatos/NotaDevolucion.rdlc | 108 +++------------- Empresas/72/Formatos/Pedido.rdlc | 77 ++--------- Empresas/72/Formatos/Remision.rdlc | 100 ++++---------- General/RepPaqueteriasGuias.aspx.cs | 2 +- Inventarios/RepFletes.aspx | 10 ++ Inventarios/RepFletes.aspx.vb | 51 +++++++- Ventas/CatPS.aspx | 26 +++- Ventas/CatPS.aspx.vb | 12 ++ 11 files changed, 210 insertions(+), 388 deletions(-) diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 409b4be64..482e6026a 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -2703,6 +2703,9 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("LogoPath", "")) End If + Dim DepartamentoRecibe As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Recibio)) + Dim DepartamentoEntrego As String = GlobalDTRHPersonal(UsuarioActual.CveEmpresa).FiltroPrimeroValor("Departamento", String.Format("NombreCompleto = '{0}'", Capturo)) + params.Add(New ReportParameter("Empresa", UsuarioActual.Empresa.Empresa)) params.Add(New ReportParameter("Concepto", "Salida por resguardo")) params.Add(New ReportParameter("Almacen", Almacen)) @@ -2712,12 +2715,17 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("Descuentos", "")) params.Add(New ReportParameter("IVA", "")) params.Add(New ReportParameter("Total", "")) - 'params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) + params.Add(New ReportParameter("NombreEntrego", String.Format("ENTREGÓ{0}{1}", vbCrLf, Capturo))) params.Add(New ReportParameter("NombreRecibio", Recibio)) params.Add(New ReportParameter("PuestoRecibio", PuestoEntrego)) params.Add(New ReportParameter("PuestoEntrego", PuestoRecibio)) + If UsuarioActual.CveEmpresa = 72 Then + params.Add(New ReportParameter("Sucursal", SubProyecto)) + params.Add(New ReportParameter("DepartamenteRecibio", DepartamentoRecibe)) + params.Add(New ReportParameter("DepartamentoEntrego", DepartamentoEntrego)) + End If params.Add(New ReportParameter("FechaMovimiento", FechaMovimiento.ToString("dd/MM/yyyy"))) params.Add(New ReportParameter("UsuarioImprimio", NombreCapturo)) params.Add(New ReportParameter("Observaciones", Observaciones)) diff --git a/Empresas/72/Formatos/Factura.rdlc b/Empresas/72/Formatos/Factura.rdlc index f55ce53db..fef85c978 100644 --- a/Empresas/72/Formatos/Factura.rdlc +++ b/Empresas/72/Formatos/Factura.rdlc @@ -787,7 +787,7 @@ Start true - 9.87049in + 9.18657in 0.06548in 1.67778in 8.23221in @@ -1367,7 +1367,7 @@ true - 7.30179in + 6.61787in 0.05817in 1.3508in 8.23035in @@ -3408,7 +3408,7 @@ Textbox54 - 6.7921in + 6.10818in 0.16632cm 0.36385in 4.94037in @@ -3444,7 +3444,7 @@ Textbox33 - 17.25192cm + 15.51477cm 12.71485cm 0.44794cm 8.33799cm @@ -3474,7 +3474,7 @@ Textbox5 - 18.31722cm + 16.58007cm 0.16632cm 0.0882cm 20.88652cm @@ -3732,7 +3732,7 @@ Textbox5 - 14.71903cm + 12.98188cm 0.14775cm 0.0882cm 20.90509cm @@ -4038,7 +4038,7 @@ DsOC - 15.01537cm + 13.27822cm 3.16661cm 1.61479cm 15.04148cm @@ -4067,7 +4067,7 @@ Textbox5 - 16.9459cm + 15.20875cm 0.22358cm 0.0882cm 20.90509cm @@ -4097,24 +4097,6 @@ - - Embedded - BannerFacturaSIG - Fit - 12.35498cm - 0.14775cm - 2.18766cm - 10.48062cm - 25 - - =iif(len(Parameters!Observaciones.Value) > 100, true,false) - - - - - true true @@ -4140,7 +4122,7 @@ 2.22035in 0.18861in 6.06817in - 26 + 25 @@ -4416,7 +4398,7 @@ 0.06548in 0.34081in 2.08542in - 27 + 26 @@ -4910,11 +4892,11 @@ true - 22.07352cm + 20.33637cm 0.14775cm 2.97096cm 20.69254cm - 28 + 27 =Microsoft.VisualBasic.Interaction.IIF(First(Fields!SerieFolio.Value, "DataSet4") <> "", False, True) @@ -4925,7 +4907,7 @@ - 29.49675cm + 27.72404cm - Culiacán, Sin. + Culiacán, Sin. Tijuana, B.C - + . - - - - - Tijuana, B.C + Aguascalientes, Ags. - . + - + - - - Aguascalientes, Ags. - - - - - - - - - - @@ -1678,21 +1647,13 @@ - + - - - - (664) - 645 1814 + 645 1814 - - - - - - - - (449) - - 1.69533cm - 6.74703cm - 0.38833cm - 0cm - 10 - - - - - - 1.72708cm - 9.41258cm - 0.38833cm - 0cm - 11 - - - - true true @@ -1907,7 +1828,7 @@ 0.48382cm 1.14285cm 4.08234cm - 12 + 10 @@ -2169,7 +2090,7 @@ 5.29091in 1.51932in 2.9844in - 13 + 11 @@ -2748,7 +2669,7 @@ 0.17067in 0.37206in 8.10465in - 14 + 12 @@ -2777,7 +2698,7 @@ 0.4335cm 0.43419cm 20.41027cm - 15 + 13 @@ -2788,21 +2709,6 @@ 2pt - - Embedded - Microsoft - Fit - 8.23074cm - 0.5393cm - 2.37313cm - 11.6363cm - 16 - - - - true true @@ -2822,7 +2728,7 @@ 14.3522cm 0.14316cm 6.66711cm - 17 + 14 @@ -2859,7 +2765,7 @@ 3.58384in 0.18861in 4.69148in - 18 + 15 @@ -2977,15 +2883,39 @@ 14.3787cm 0.48004cm 6.64061cm - 19 + 16 + + 1.53874cm + 6.09322cm + 0.38617cm + 0cm + 17 + + + + + + 1.53874cm + 8.82941cm + 0.38617cm + 0cm + 18 + + + + - 20.24114cm + 19.3151cm - Culiacán, Sin. + Culiacán, Sin. Tijuana, B.C - + . - - - - - Tijuana, B.C + Aguascalientes, Ags. - . + - + - - - Aguascalientes, Ags. - - - - - - - - - - @@ -1178,21 +1147,13 @@ - + - - - - (664) - 645 1814 + 645 1814 - - - - - - - - (449) - - Embedded - Microsoft - Fit - 8.19546cm - 0.116cm - 2.03729cm - 11.6363cm - 17 - - - - true true @@ -2308,7 +2238,7 @@ 14.54911cm 0.14316cm 6.66711cm - 18 + 17 @@ -2345,7 +2275,7 @@ 3.1938in 0.18861in 5.15904in - 19 + 18 @@ -2463,7 +2393,7 @@ 14.57561cm 0.48004cm 6.64061cm - 20 + 19 @@ -2471,7 +2401,7 @@ - 17.08592cm + 15.763cm - Culiacán, Sin. + Culiacán, Sin. Tijuana, B.C - + . - - - - - Tijuana, B.C + Aguascalientes, Ags. - . + - + - - - Aguascalientes, Ags. - - - - - - - - - - @@ -380,21 +349,13 @@ - + - - - - (664) - 645 1814 + 645 1814 - - - - - - - - (449) - =Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "MATRIZ", "(662) 214 2200", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Tijuana", "(664) 645 1814", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Culiacán", "(667) 715 8533", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Aguascalientes", "(449) 913 4418", "")))) + =Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "MATRIZ" or Parameters!Sucursal.Value = "Hermosillo", "(662) 214 2200", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Tijuana", "(664) 645 1814", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Culiacán", "(667) 715 8533", Microsoft.VisualBasic.Interaction.IIF(Parameters!Sucursal.Value = "Aguascalientes", "(449) 913 4418", "")))) - Culiacán, Sin. + Culiacán, Sin. - - - - - + - + - + - + | - + | Textbox10 0.13104cm - 3.45239cm + 3.23917cm 2.14312cm - 9.51761cm + 10.69394cm 4 - - 1.69533cm - 6.87784cm - 0.38833cm - 0cm - 7 - - - - - - 1.72708cm - 9.54339cm - 0.38833cm - 0cm - 8 - - - - true true @@ -1874,7 +1842,7 @@ 9.54339cm 5.00803cm 6.98968cm - 9 + 7 @@ -1986,7 +1954,7 @@ 16.60715cm 4.98157cm 4.44569cm - 10 + 8 @@ -2569,7 +2537,7 @@ 0.06548in 0.37206in 8.22304in - 11 + 9 @@ -2595,7 +2563,7 @@ 0.16632cm 0.14316cm 20.88652cm - 12 + 10 @@ -2607,24 +2575,6 @@ 2pt - - Embedded - BannerFacturaSIG - Fit - 11.12025cm - 0.22358cm - 2.18766cm - 10.48062cm - 13 - - =iif(len(Parameters!Observaciones.Value) > 100, true,false) - - - - - true true @@ -2644,7 +2594,7 @@ 15.11602cm 0.14316cm 5.93682cm - 14 + 11 @@ -2681,7 +2631,7 @@ 1.063in 0.18861in 7.22552in - 15 + 12 @@ -2707,11 +2657,11 @@ Textbox5 - 14.44724cm + 12.31999cm 0.16632cm 0.0882cm 20.66427cm - 16 + 13 @@ -2745,7 +2695,7 @@ 0.19807cm 0.34219cm 14.74156cm - 17 + 14 @@ -2863,7 +2813,7 @@ 15.11602cm 0.48004cm 5.93682cm - 18 + 15 @@ -2895,7 +2845,7 @@ 5.58063cm 0.6cm 5.12357cm - 19 + 16 =iif(Parameters!EstatusFactura.Value<>"",False,True) @@ -2935,7 +2885,7 @@ 5.58063cm 0.6cm 5.12357cm - 20 + 17 =iif(Parameters!EstatusEntrega.Value<>"",False,True) @@ -2951,7 +2901,7 @@ - 18.76339cm + 16.69964cm