diff --git a/Acarreos/CatChoferes.aspx.vb b/Acarreos/CatChoferes.aspx.vb index 3c0f31d6f..b19289490 100644 --- a/Acarreos/CatChoferes.aspx.vb +++ b/Acarreos/CatChoferes.aspx.vb @@ -1,24 +1,24 @@ -Imports Extensiones -Imports System.Data - -Partial Class Acarreos_CatChoferes - +Imports Extensiones +Imports System.Data + +Partial Class Acarreos_CatChoferes + Inherits ClsPaginas -#Region " PROPIEDADES" +#Region " PROPIEDADES" -#End Region +#End Region - Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load - If Not Page.IsPostBack Then - CargaDatos() + Protected Sub Page_Load(sender As Object, e As System.EventArgs) Handles Me.Load + If Not Page.IsPostBack Then + CargaDatos() CargaDdlTransportista() Dim DT As DataTable = GlobalDTColonia(-1) CargaDdls() - End If + End If End Sub @@ -36,30 +36,30 @@ Partial Class Acarreos_CatChoferes DdlColonia.Items.Insert(0, New ListItem("Seleccione Una", "-1")) - End Sub - - Private Sub CargaDatos() - Dim ObjAcar As New ClsAcarreos() - If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1,-1) Then - GvChofer.DataSource = ObjAcar.DtResultados - GvChofer.DataBind() - End If - ObjAcar.Dispose() - UpDatos.Update() - End Sub - - - Private Sub CargaDdlTransportista() - Dim ObjAcar As New ClsAcarreos() - If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then - DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1")) - DdlTransportista.DataSource = ObjAcar.DtResultados - DdlTransportista.DataBind() - End If - ObjAcar.Dispose() - UpAddChofer.Update() - End Sub - + End Sub + + Private Sub CargaDatos() + Dim ObjAcar As New ClsAcarreos() + If ObjAcar.GetChofer(-1, UsuarioActual.CveEmpresa, -1, -1) Then + GvChofer.DataSource = ObjAcar.DtResultados + GvChofer.DataBind() + End If + ObjAcar.Dispose() + UpDatos.Update() + End Sub + + + Private Sub CargaDdlTransportista() + Dim ObjAcar As New ClsAcarreos() + If ObjAcar.GetTransportista(-1, UsuarioActual.CveEmpresa, 1) Then + DdlTransportista.Items.Insert(0, New ListItem("Seleccione", "-1")) + DdlTransportista.DataSource = ObjAcar.DtResultados + DdlTransportista.DataBind() + End If + ObjAcar.Dispose() + UpAddChofer.Update() + End Sub + Private Sub BtnAgregarChofer_Click(sender As Object, e As EventArgs) Handles BtnAgregarChofer.Click @@ -70,66 +70,66 @@ Partial Class Acarreos_CatChoferes End If - If DdlTransportista.SelectedValue = "-1" Then - Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia) - Else - - Dim ObjAcar As New ClsAcarreos - Dim Estatus = 0 + If DdlTransportista.SelectedValue = "-1" Then + Alert("Tiene que seleccionar un transportista.", TipoMensaje.MsgAdvertencia) + Else + + Dim ObjAcar As New ClsAcarreos + Dim Estatus = 0 If ChkEstatus.Checked Then Estatus = 1 - If HdnModalidad.Value = "A" Then - If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then - CargaDatos() - Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) - End If - ElseIf HdnModalidad.Value = "U" Then - If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then - CargaDatos() - Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) - End If - End If - - RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer")) - ObjAcar.Dispose() - UpDatos.Update() - End If - End Sub - + If HdnModalidad.Value = "A" Then + If ObjAcar.AddChofer(TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then + CargaDatos() + Alert("Agregado Correctamente.", TipoMensaje.MsgInformacion) + End If + ElseIf HdnModalidad.Value = "U" Then + If ObjAcar.UpdateChofer(HdnID.Value.ToEntero(), TxtChofer.Text, UsuarioActual.CveUsuario, UsuarioActual.CveEmpresa, Estatus, DdlTransportista.SelectedValue, TxtIdentificacion.Text.Trim, TxtTelefono.Text.Trim, Licencia:=TxtLicencia.Text, RFC:=TxtRFC.Text.Trim, Domicilio:=TxtDomicilio.Text.Trim, NumeroExterior:=TxtNumExt.Text.Trim, NumeroInterior:=TxtNumInt.Text.Trim, Colonia:="", Ciudad:="", Estado:="", CP:=TxtCP.Text.Trim, NumRegidTribOperador:=TxtNumRegidTribOperador.Text.Trim, ResidenciaFiscalOperador:=DdlResidenciaFiscalOperador.SelectedValue, CveEstado:=DdlEstado.SelectedValue.ToEntero, CveMunicipio:=DdlMunicipio.SelectedValue.ToEntero, CveLocalidad:=DdlLocalidad.SelectedValue.ToEntero, CveColonia:=DdlColonia.SelectedValue.ToEntero) Then + CargaDatos() + Alert("Actualizado Correctamente.", TipoMensaje.MsgInformacion) + End If + End If + + RegistraScript(String.Format("$('#{0}').modal('hide');", "divAddChofer")) + ObjAcar.Dispose() + UpDatos.Update() + End If + End Sub + Public Sub Edit_Click(sender As Object, e As EventArgs) - Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - HdnModalidad.Value = "U" - HdnID.Value = GvRow.DataKey("CveChofer") - UpDatos.Update() - BtnAgregarChofer.Text = "Actualizar" - myModalLabel.InnerText = "Actualizar Chofer" - - TxtChofer.Text = GvRow.DataKey("Chofer") + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + HdnModalidad.Value = "U" + HdnID.Value = GvRow.DataKey("CveChofer") + UpDatos.Update() + BtnAgregarChofer.Text = "Actualizar" + myModalLabel.InnerText = "Actualizar Chofer" + + TxtChofer.Text = GvRow.DataKey("Chofer") TxtIdentificacion.Text = GvRow.DataKey("Identificacion") - TxtTelefono.Text = GvRow.DataKey("Telefono") - TxtRFC.Text = GvRow.DataKey("RFC") - + TxtTelefono.Text = GvRow.DataKey("Telefono") + TxtRFC.Text = GvRow.DataKey("RFC") + TxtDomicilio.Text = GvRow.DataKey("Domicilio") TxtNumInt.Text = GvRow.DataKey("NumeroInterior") TxtNumExt.Text = GvRow.DataKey("NumeroExterior") 'TxtColonia.Text = GvRow.DataKey("Colonia") - 'TxtCiudad.Text = GvRow.DataKey("Ciudad") - 'TxtEstado.Text = GvRow.DataKey("Estado") - TxtCP.Text = GvRow.DataKey("CP") + 'TxtCiudad.Text = GvRow.DataKey("Ciudad") + 'TxtEstado.Text = GvRow.DataKey("Estado") + TxtCP.Text = GvRow.DataKey("CP") TxtLicencia.Text = GvRow.DataKey("Licencia") TxtNumRegidTribOperador.Text = GvRow.DataKey("NumRegidTribOperador") DdlResidenciaFiscalOperador.SelectedValueExist("-1") - DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador")) - + DdlResidenciaFiscalOperador.SelectedValueExist(GvRow.DataKey("ResidenciaFiscalOperador")) + DdlTransportista.SelectedValueExist(GvRow.DataKey("CveTransportista")) - divEstatus.Visible = True - ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus")) - - + divEstatus.Visible = True + ChkEstatus.Checked = CBool(GvRow.DataKey("Estatus")) + + DdlEstado.SelectedValueExist(GvRow.DataKey("CveEstado")) @@ -168,34 +168,34 @@ Partial Class Acarreos_CatChoferes - UpAddChofer.Update() - + UpAddChofer.Update() + RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer")) - End Sub - - Public Sub Agregar() - HdnModalidad.Value = "A" - UpDatos.Update() - BtnAgregarChofer.Text = "Agregar" - myModalLabel.InnerText = "Agregar Chofer" - TxtChofer.Text = "" - TxtIdentificacion.Text = "" - TxtDomicilio.Text = "" - TxtTelefono.Text = "" - 'TxtCiudad.Text = "" - TxtLicencia.Text = "" - - - DdlTransportista.SelectedValueExist(-1) - TxtRFC.Text = "" - TxtNumInt.Text = "" - TxtNumExt.Text = "" - 'TxtEstado.Text = "" - TxtCP.Text = "" - 'TxtColonia.Text = "" - - TxtNumRegidTribOperador.Text = "" + End Sub + + Public Sub Agregar() + HdnModalidad.Value = "A" + UpDatos.Update() + BtnAgregarChofer.Text = "Agregar" + myModalLabel.InnerText = "Agregar Chofer" + TxtChofer.Text = "" + TxtIdentificacion.Text = "" + TxtDomicilio.Text = "" + TxtTelefono.Text = "" + 'TxtCiudad.Text = "" + TxtLicencia.Text = "" + + + DdlTransportista.SelectedValueExist(-1) + TxtRFC.Text = "" + TxtNumInt.Text = "" + TxtNumExt.Text = "" + 'TxtEstado.Text = "" + TxtCP.Text = "" + 'TxtColonia.Text = "" + + TxtNumRegidTribOperador.Text = "" DdlResidenciaFiscalOperador.SelectedValueExist("-1") @@ -206,40 +206,40 @@ Partial Class Acarreos_CatChoferes DdlColonia.SelectedValueExist(-1) - ChkEstatus.Checked = True - divEstatus.Visible = False - UpAddChofer.Update() - RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer")) - End Sub - - Public Sub Delete_Click(sender As Object, e As EventArgs) - Dim ObjAcar As New ClsAcarreos() - Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) - HdnID.Value = GvRow.DataKey("CveChofer") - UpDatos.Update() - If ObjAcar.RemoveChofer(HdnID.Value) Then - CargaDatos() - Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) - End If - ObjAcar.Dispose() - UpDatos.Update() - End Sub - - Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound - If e.Row.RowType = DataControlRowType.DataRow Then - If e.Row.DBCampo("Estatus") = True Then - e.Row.FCLabel("LblEstatus").Text = "Activo" - e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green - - Else - e.Row.FCLabel("LblEstatus").Text = "Inactivo" - e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red - End If - End If - End Sub - - Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click - Agregar() + ChkEstatus.Checked = True + divEstatus.Visible = False + UpAddChofer.Update() + RegistraScript(String.Format("$('#{0}').modal('show');", "divAddChofer")) + End Sub + + Public Sub Delete_Click(sender As Object, e As EventArgs) + Dim ObjAcar As New ClsAcarreos() + Dim GvRow As GridViewRow = DirectCast(DirectCast(sender, LinkButton).NamingContainer, GridViewRow) + HdnID.Value = GvRow.DataKey("CveChofer") + UpDatos.Update() + If ObjAcar.RemoveChofer(HdnID.Value) Then + CargaDatos() + Alert("Eliminado Correctamente.", TipoMensaje.MsgInformacion) + End If + ObjAcar.Dispose() + UpDatos.Update() + End Sub + + Private Sub GvChofer_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvChofer.RowDataBound + If e.Row.RowType = DataControlRowType.DataRow Then + If e.Row.DBCampo("Estatus") = True Then + e.Row.FCLabel("LblEstatus").Text = "Activo" + e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Green + + Else + e.Row.FCLabel("LblEstatus").Text = "Inactivo" + e.Row.FCLabel("LblEstatus").ForeColor = Drawing.Color.Red + End If + End If + End Sub + + Private Sub LnkChofer_Click(sender As Object, e As EventArgs) Handles LnkChofer.Click + Agregar() End Sub Protected Sub LnkValidar_Click(sender As Object, e As EventArgs) @@ -331,4 +331,4 @@ Partial Class Acarreos_CatChoferes Protected Sub DdlColonia_SelectedIndexChanged(sender As Object, e As EventArgs) validaCodigoPostal() End Sub -End Class +End Class diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 9a9ab5e36..7ff070146 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -3868,6 +3868,32 @@ Public Class ClsPaginas End Property #End Region + + + + Property GlobalDTClientesVendedoresSubProyectos(CveEmpresa As Integer, Optional CveCliente As Integer = -1, Optional CveSubProyecto As Integer = -1) As DataTable + Get + Dim AppNombre As String = String.Format("GlobalDTClientesVendedoresSubProyectos-{0}", CveEmpresa) + + If Application(AppNombre) Is Nothing Then + Dim ObjInv As New ClsVentas + If ObjInv.GetClientesVendedoresSubProyectos(-1, -1, -1, CveEmpresa) Then Application(AppNombre) = ObjInv.DtResultados + ObjInv.Dispose() + End If + Dim Str As StringBuilder = New StringBuilder() + Str.Append("1 = 1 ") + If CveCliente <> -1 Then Str.AppendFormat(" AND CveCliente = {0} ", CveCliente) + If CveSubProyecto <> -1 Then Str.AppendFormat(" AND CveSubProyecto = {0} ", CveSubProyecto) + + Dim Dv As New DataView(DirectCast(Application(AppNombre), DataTable), Str.ToString, "", DataViewRowState.CurrentRows) + GlobalDTClientesVendedoresSubProyectos = Dv.ToTable + End Get + Set(value As DataTable) + Dim AppNombre As String = String.Format("GlobalDTClientesVendedoresSubProyectos-{0}", CveEmpresa) + Application(AppNombre) = value + End Set + End Property + #End Region diff --git a/App_Code/ClsRH.vb b/App_Code/ClsRH.vb index 1b7a976c9..cce1984f6 100644 --- a/App_Code/ClsRH.vb +++ b/App_Code/ClsRH.vb @@ -1968,6 +1968,8 @@ chkAplicaVacacion As Boolean, chkAplicaIncapacidad As Boolean, chkAplicaRetardo Catch Ex1 As SqlException If Ex1.Message.Contains("Número: 2627;") Then Alert("El Nuevo Personal no se guardo debido a que actualmente se encuentra registrado", TipoMensaje.MsgAdvertencia) + ElseIf Ex1.Message.Contains("Chk_RH_PersonalSalarioIMSS") Then + Alert("El Nuevo Personal no se guardo debido a que se presento un problema al calcular el salario", TipoMensaje.MsgAdvertencia) Else Me.OnError("Ocurrió un error al guardar el nuevo Personal.", Ex1, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) End If diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 454cb25eb..44bd17ea6 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5249,6 +5249,66 @@ Public Class ClsVentas Return Retorno End Function + +#Region "C L I E N T E S V E N D E D O R E S S U B P R O Y E C T O S" + + Public Function GetClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ClientesVendedoresSubProyectosGet") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al obtener los vendedores.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + + + Public Function AddClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveUsuario As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ClientesVendedoresSubProyectosAdd") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveUsuario", SqlDbType.Int).Value = CveUsuario + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al agregar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + + Public Function RemoveClientesVendedoresSubProyectos(CveCliente As Integer, CveVendedor As Integer, CveSubProyecto As Integer, CveEmpresa As Integer) As Boolean + Dim Retorno As Boolean = False + DataAdapter("PA_Vta_ClientesVendedoresSubProyectosRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveCliente", SqlDbType.Int).Value = CveCliente + .Add("@CveVendedor", SqlDbType.Int).Value = CveVendedor + .Add("@CveSubProyecto", SqlDbType.Int).Value = CveSubProyecto + .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar el vendedor.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo()) + End Try + Return Retorno + End Function + +#End Region + #Region "IDisposable Support" diff --git a/Bancos/IE.aspx.vb b/Bancos/IE.aspx.vb index 5d88ea8c2..fa4a59b34 100644 --- a/Bancos/IE.aspx.vb +++ b/Bancos/IE.aspx.vb @@ -1085,7 +1085,7 @@ Partial Class Bancos_IE If DdlTipoTransaccion.SelectedValue = "9" Then Dim Dep As New ClsGenerales If Dep.GetCuentasDepositos(CveProveedor:=ObjIE.CveProveedor) Then - DdlCuentaDeposito.DataSource = Dep.DtResultados + DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ") If Dep.DtResultados.Rows.Count > 0 Then trCuentaDeposito.Visible = True DdlCuentaDeposito.Items.Insert(0, New ListItem("Seleccione una cuenta", "-1")) @@ -2769,8 +2769,9 @@ Partial Class Bancos_IE ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), Ref, 66, Conc, Now, IDCtaContable, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-(TxtImporte.Text.ToDecimal - TxtIvaIxC.Text.ToDecimal), ImporteME:=tImporteMonedaExtranjera) If TxtIvaIxC.Text.ToDouble > 0 Then + Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2) 'Iva - ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) + ObjMov.AddPrePolizasDetalle(CvePrePoliza, True, -TxtIvaIxC.Text.ToDecimal, Ref, 61, Conc, Now, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE, CveIEDevolucion:=DdlIEDevolucion.SelectedValue.ToEntero, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=-TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=If(PorcentajeIVA.ToString().Contiene("0.08", "0.16"), PorcentajeIVA, 0)) End If 'Bancos @@ -2862,7 +2863,8 @@ Partial Class Bancos_IE If DivIvaIxC.Visible AndAlso TxtIvaIxC.Text.ToDecimal <> 0 Then Dim CveConIVA As Integer = 61 If UsuarioActual.CveEmpresa = 70 Then CveConIVA = 299 - If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera) Then + Dim PorcentajeIVA = (TxtIvaIxC.Text.ToDecimal() / (TxtImporte.Text.ToDecimal() - TxtIvaIxC.Text.ToDecimal())).RoundSQL(2) + If Not ObjMov.AddPrePolizasDetalle(CvePrePoliza, TipoMovimiento, TxtIvaIxC.Text.ToDecimal, Concepto, CveConIVA, Concepto, FechaMovimiento, UsuarioActual.Empresa.IdCuentaIVAxTrasladar, -1, CveIE:=CveIE, CveCompra:=CveCompra, CveProveedor:=CveProveedor, CvePersonal:=CvePersonal, CveCreditoDetalle:=CveCreditoDetalle, CveCliente:=CveCliente, ImporteMX:=TxtIvaIxC.Text.ToDecimal, ImporteME:=tImporteMonedaExtranjera, PorcentajeImpuesto:=PorcentajeIVA) Then MsgError = "Ocurrió un error al registrar el asiento del ingreso." End If End If @@ -4690,7 +4692,7 @@ Partial Class Bancos_IE 'genera nuevo IE contrario If Not ErrorCancelar Then - If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2) <= 0 Then + If Banc.CancelarBancos_IE(UsuarioActual.CveUsuario, CveIE, True, IdPolizaNueva, FolioPolizaNueva, TxtFechaDevuelto.Text.ToDate, 2, 16) <= 0 Then ErrorCancelar = True End If End If @@ -5250,7 +5252,7 @@ Partial Class Bancos_IE If Dep.DtResultados.Rows.Count > 0 Then - DdlCuentaDeposito.DataSource = Dep.DtResultados + DdlCuentaDeposito.DataSource = Dep.DtResultados.FiltraParametros(" Estatus = 'True' ") trCuentaDeposito.Visible = True BtnGuardar.ToolTip = "" diff --git a/Bancos/PagoElectronicoGrupos.aspx b/Bancos/PagoElectronicoGrupos.aspx index 89aae1006..7d3a69972 100644 --- a/Bancos/PagoElectronicoGrupos.aspx +++ b/Bancos/PagoElectronicoGrupos.aspx @@ -574,7 +574,7 @@ Prefijo Folio:
- +
@@ -606,7 +606,7 @@ - + @@ -928,6 +928,17 @@ } + function validaLongitudFolio(v) { + var TamanioS = String(v.value); + var Tamanio = TamanioS.lenght; + alert(Tamanio); + + if (Tamanio >= 14) { + alert("El folio especificado es demaciado grande"); + } + + } + diff --git a/Bancos/PolizaCheque.aspx b/Bancos/PolizaCheque.aspx index c0413c33d..88b3514dc 100644 --- a/Bancos/PolizaCheque.aspx +++ b/Bancos/PolizaCheque.aspx @@ -43,6 +43,8 @@
+ +
diff --git a/Bancos/PolizaCheque.aspx.vb b/Bancos/PolizaCheque.aspx.vb index 84d9822fa..cbfc816d9 100644 --- a/Bancos/PolizaCheque.aspx.vb +++ b/Bancos/PolizaCheque.aspx.vb @@ -159,7 +159,8 @@ Partial Class Bancos_PolizaCheque .Add("Proyecto", Type.GetType("System.String")) .Add("Personal", Type.GetType("System.String")) .Add("CvePersonal", Type.GetType("System.Int32")) - .Add("CveSubProyecto", Type.GetType("System.Int32")) + .Add("CveSubProyecto", Type.GetType("System.Int32")) + End With GvMov.DataBind() @@ -469,10 +470,10 @@ Partial Class Bancos_PolizaCheque dr("CveSubProyecto") = drt("CveSubProyecto") dr("Proyecto") = drt("Proyecto") dr("Personal") = drt("Personal") - dr("CvePersonal") = drt("CvePersonal") - 'dr("Cargo") = TxtCargoImporte.Text.ToDouble - 'dr("Abono") = TxtAbonoImporte.Text.ToDouble - + dr("CvePersonal") = drt("CvePersonal") + 'dr("CveConcepto") = drt("CveConcepto") + + DtMovimientos.Rows.Add(dr) Next @@ -816,7 +817,9 @@ Partial Class Bancos_PolizaCheque Protected Sub BtnIEGuardar_Click(sender As Object, e As EventArgs) Handles BtnIEGuardar.Click Dim TotalCargos, TotalAbonos, ImporteDocumento As Decimal - Dim CvePrePoliza As Integer + Dim CvePrePoliza As Integer + + Dim ValidaConcepto30 As Boolean = False If DdlCuenta.SelectedValue.ToEntero <= 0 Then If UsuarioActual.CveEmpresa <> 126 Then @@ -831,7 +834,24 @@ Partial Class Bancos_PolizaCheque TotalCargos += Gvr.FCTextBox("TxtCargo").Text.ToDecimal TotalAbonos += Gvr.FCTextBox("TxtAbono").Text.ToDecimal - Next + Next + + For Each Gvr As GridViewRow In GvMov.Rows + + If Gvr.DataKey("CveConcepto").ToEntero = 30 Then + If Gvr.FCTextBox("TxtAbono").Text.ToDecimal = TxtImporte.Text.ToDecimal Or Gvr.FCTextBox("TxtCargo").Text.ToDecimal = TxtImporte.Text.ToDecimal Then + ValidaConcepto30 = True + End If + + End If + + Next + + If Not ValidaConcepto30 Then + Alert("El importe no coincide con el concepto de bancos.", TipoMensaje.MsgAdvertencia) + Exit Sub + End If + Dim filesgral As List(Of Archivo) = Anexo.getfiles().Archivos Dim filemove As String = "" diff --git a/Compras/PopUpVerFactura.aspx.vb b/Compras/PopUpVerFactura.aspx.vb index 435be40ab..2bb063817 100644 --- a/Compras/PopUpVerFactura.aspx.vb +++ b/Compras/PopUpVerFactura.aspx.vb @@ -933,6 +933,13 @@ Partial Class PopUpVerFactura Dim NumPermiso As String = "" Dim Aseguradora As String = "" Dim NumPolizaSeguro As String = "" + Dim NombreAseguradoraMedioAmbiente As String = "" + Dim NumPolizaSeguroMedioAmbiente As String = "" + Dim NombreAseguradoraCarga As String = "" + Dim NumPolizaSeguroCarga As String = "" + + + Dim PlacaVM As String = "" Dim AnioModeloVM As String = "" 'TIMBRADO @@ -951,7 +958,7 @@ Partial Class PopUpVerFactura Dim Dr As DataRow = ObjInv.DtResultados.Rows(0) If Dr IsNot Nothing Then SerieFolio = Dr("SerieFolio").ToString - Telefono = Dr("ChrTelefono").ToString + Telefono = Dr("Telefono").ToString End If End If End If @@ -1064,6 +1071,14 @@ Partial Class PopUpVerFactura NumPermiso = ValorXML(nodeAutotransporteFederal, "NumPermisoSCT", "") Aseguradora = ValorXML(nodeAutotransporteFederal, "NombreAseg", "") NumPolizaSeguro = ValorXML(nodeAutotransporteFederal, "NumPolizaSeguro", "") + + 'Por Definir de donde sale + 'NombreAseguradoraMedioAmbiente = ValorXML(nodeAutotransporteFederal, "", "") + 'NumPolizaSeguroMedioAmbiente = ValorXML(nodeAutotransporteFederal, "", "") + 'NombreAseguradoraCarga = ValorXML(nodeAutotransporteFederal, "", "") + 'NumPolizaSeguroCarga = ValorXML(nodeAutotransporteFederal, "", "") + + End If Dim nodeIdentificacionVehicular As XmlNode = nodeComp.SelectSingleNode(String.Format("//{0}:IdentificacionVehicular", "cartaporte"), namespaces) @@ -1181,8 +1196,16 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("TransporteInternacional", TransporteInternacional)) params.Add(New ReportParameter("PermisoSTCC", PermisoSTCC)) params.Add(New ReportParameter("NumPermiso", NumPermiso)) + params.Add(New ReportParameter("Aseguradora", Aseguradora)) params.Add(New ReportParameter("NumPoliza", NumPolizaSeguro)) + + params.Add(New ReportParameter("NombreAseguradoraMedioAmbiente", NombreAseguradoraMedioAmbiente)) + params.Add(New ReportParameter("NumPolizaSeguroMedioAmbiente", NumPolizaSeguroMedioAmbiente)) + + params.Add(New ReportParameter("NombreAseguradoraCarga", NombreAseguradoraCarga)) + params.Add(New ReportParameter("NumPolizaSeguroCarga", NumPolizaSeguroCarga)) + params.Add(New ReportParameter("PlacaVM", PlacaVM)) params.Add(New ReportParameter("AnioVM", AnioModeloVM)) 'TIMBRADO @@ -2110,9 +2133,11 @@ Partial Class PopUpVerFactura If Archivo.Exists Then ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Inicial.rdlc", DtMovimientos, params, String.Format("Inventario Inicial - {0}", Folio), RDSName:="DsInventarios") Else - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2144,9 +2169,11 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FacturadoA", If(CveCompra > 0, dr("RazonSocial").ToString, ""))) End If If UsuarioActual.CveEmpresa = 119 Then - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) @@ -2209,9 +2236,11 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Entradas.rdlc", DtMovimientos, params, String.Format("Entrada de Almacen - {0}", Folio), RDSName:="DsInventarios") ElseIf UsuarioActual.CveEmpresa = 140 Then - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2269,11 +2298,13 @@ Partial Class PopUpVerFactura End If - Else - - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + Else + + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2448,9 +2479,11 @@ Partial Class PopUpVerFactura ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/Salidas.rdlc", DtMovimientos, params, String.Format("Salida de Almacen - {0}", Folio.ToString), RDSName:="DsInventarios") ElseIf UsuarioActual.CveEmpresa = 140 Then - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2488,9 +2521,11 @@ Partial Class PopUpVerFactura Else Dim A As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalida.rdlc", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2568,9 +2603,11 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2597,9 +2634,11 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2667,9 +2706,11 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/PrestamoProductos.rdlc" End If - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2752,9 +2793,11 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/PrestamoProductos.rdlc" End If - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2901,10 +2944,12 @@ Partial Class PopUpVerFactura Dim Archivo As New System.IO.FileInfo(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta)) If Archivo.Exists Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -2953,10 +2998,13 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format(RutaFormato, UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Aviso de Traslado - {0}", Folio), RDSName:="DsInventarios") Else Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + If Imagen.Exists Then + ' params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) + Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3000,11 +3048,13 @@ Partial Class PopUpVerFactura ElseIf UsuarioActual.CveEmpresa = 140 Then params.Add(New ReportParameter("CantidadProductos", "500")) params.Add(New ReportParameter("CantidadUsados", "500")) - Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3018,10 +3068,12 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("FolioRelacionado", FolioRelacionado)) ElseIf UsuarioActual.CveEmpresa = 153 Then Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3037,10 +3089,12 @@ Partial Class PopUpVerFactura ImprimirPDF(String.Format("{0}Formatos\Traslado.rdlc", UsuarioActual.Empresa.Ruta), DtMovimientos, params, String.Format("Recepción de Traslado - {0}", Folio), RDSName:="DsInventarios") Else Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3152,7 +3206,7 @@ Partial Class PopUpVerFactura Case 13 'D E V O L U C I O N D E P R O V E E D O R Dim params As New List(Of ReportParameter) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/DevolucionProveedor.rdlc", UsuarioActual.Empresa.Ruta)) params.Add(New ReportParameter("Folio", Folio)) @@ -3199,8 +3253,10 @@ Partial Class PopUpVerFactura If Not Archivo.Exists Then - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3347,10 +3403,12 @@ Partial Class PopUpVerFactura End If ImprimirPDF(UsuarioActual.Empresa.Ruta & "Formatos/DevolucionCliente.rdlc", DtMovimientos, params, String.Format("Devolucion del Cliente - {0}", Folio.ToString), RDSName:="DsInventarios") 'End If - Else - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + Else + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3384,9 +3442,11 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3411,11 +3471,13 @@ Partial Class PopUpVerFactura Case 20 'DESARMADO DE PAQUETE Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim params As New List(Of ReportParameter) - - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + Dim params As New List(Of ReportParameter) + + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3447,9 +3509,11 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/EntradaSalida.rdlc" End If - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3519,11 +3583,13 @@ Partial Class PopUpVerFactura If Not ArchivoRuta.Exists Then Archivo = "Empresas/Grales/Formatos/EntradaSalidaUniforme.rdlc" - End If - - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + End If + + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3568,9 +3634,11 @@ Partial Class PopUpVerFactura Archivo = "Empresas/Grales/Formatos/PrestamoProductos.rdlc" End If - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3611,9 +3679,11 @@ Partial Class PopUpVerFactura Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) Dim params As New List(Of ReportParameter) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3635,7 +3705,7 @@ Partial Class PopUpVerFactura Dim Archivo As New System.IO.FileInfo(String.Format("{0}Formatos/Salidas.rdlc", UsuarioActual.Empresa.Ruta)) Dim Archivo2 As New System.IO.FileInfo(String.Format("{0}Formatos/ConsumoInterno.rdlc", UsuarioActual.Empresa.Ruta)) Dim Imagen As New System.IO.FileInfo(String.Format("{0}/Logo.png", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + 'Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) Dim params As New List(Of ReportParameter) 'If UsuarioActual.CveEmpresa.Contiene(72, 80) Then @@ -3671,8 +3741,10 @@ Partial Class PopUpVerFactura params.Add(New ReportParameter("NombreEntrego", Capturo)) params.Add(New ReportParameter("NombreRecibio", Recibio)) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If @@ -3855,10 +3927,12 @@ Partial Class PopUpVerFactura End If Else - Dim A As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalida.rdlc", UsuarioActual.Empresa.Ruta)) - Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) - If Imagen.Exists Then - params.Add(New ReportParameter("LogoPath", logouri)) + Dim A As New System.IO.FileInfo(String.Format("{0}Formatos/EntradaSalida.rdlc", UsuarioActual.Empresa.Ruta)) + ' Dim logouri = String.Format("{0}://{1}:{2}/Empresas/{3}/Logo.png", Request.Url.Scheme, Request.Url.Host, Request.Url.Port, UsuarioActual.CveEmpresa) + If Imagen.Exists Then + 'params.Add(New ReportParameter("LogoPath", logouri)) + Dim LogoRuta As String = String.Format("file://{0}", Imagen.FullName) + params.Add(New ReportParameter("LogoPath", LogoRuta)) Else params.Add(New ReportParameter("LogoPath", "")) End If diff --git a/Empresas/152/Formatos/Cotizacion.rdlc b/Empresas/152/Formatos/Cotizacion.rdlc index 111f45925..aa90bd02f 100644 --- a/Empresas/152/Formatos/Cotizacion.rdlc +++ b/Empresas/152/Formatos/Cotizacion.rdlc @@ -1,5 +1,5 @@ - + 0 @@ -1853,7 +1853,7 @@ 17.71415cm 13 - =IIF((Sum(IIF(Fields!CveClasificacion.Value = 20345,1,0), "DsOC") > 0),false,true) + =IIF((Sum(IIF(Fields!CveClasificacion.Value = 20775,1,0), "DsOC") > 0),false,true) + + true + true + true + + + + + ** SI LAS LLANTAS NO SON INSTALADAS EN ECONOLLANTAS PIERDE SU GARANTÍA DE FABRICA ** + + + + + + + + + 2pt + 2pt + 2pt + 2pt + + + + true + true + + + + + PARA UNA OPTIMA DURACIÓN DE SUS LLANTAS, ESTAS DEBEN ALINEARSE, BALANCEARSE Y ROTAR CADA 6 MESES O 1O MIL KILOMETROS. + + + + PARA HACER VÁLIDA UNA RECLAMACIÓN DEBERÁN CUMPLIR CON EL ANTERIOR REQUISITO + + + + + + 2pt + 2pt + 2pt + 2pt + + - 19.04565cm + 20.32094cm @@ -1707,7 +1707,7 @@ =Parameters!Aseguradora.Value @@ -1722,7 +1722,7 @@ Número de Póliza: @@ -1730,7 +1730,99 @@ =Parameters!NumPoliza.Value + + + + + + + + Aseguradora Medio Ambiente: + + + + =Parameters!NombreAseguradoraMedioAmbiente.Value + + + + + + + + + Número de Póliza: + + + + =Parameters!NumPolizaSeguroMedioAmbiente.Value + + + + + + + + + Aseguradora Carga: + + + + =Parameters!NombreAseguradoraCarga.Value + + + + + + + + + Número de Póliza: + + + + =Parameters!NumPolizaSeguroCarga.Value + @@ -1745,7 +1837,7 @@ Placa: @@ -1753,7 +1845,7 @@ =Parameters!PlacaVM.Value @@ -1768,7 +1860,7 @@ Año: @@ -1776,7 +1868,7 @@ =Parameters!AnioVM.Value @@ -1784,7 +1876,7 @@ @@ -1797,7 +1889,7 @@ Textbox2 1.13111in 9.86403cm - 0.76862in + 1.08451in 3.78138in 11 - 7.02116in + 7.34222in