diff --git a/App_Code/ClsAcumuladores.vb b/App_Code/ClsAcumuladores.vb index 2d74b5f69..e451e5b44 100644 --- a/App_Code/ClsAcumuladores.vb +++ b/App_Code/ClsAcumuladores.vb @@ -797,6 +797,21 @@ Public Class ClsAcumuladores Return Retorno End Function + Public Function EliminarGarantiasDetalle(CveVenta As Integer) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_Acum_GarantiasDetallePolizaRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un error a eliminar de garantia.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function + #End Region @@ -863,6 +878,21 @@ Public Class ClsAcumuladores End Try Return Retorno End Function + + Public Function EliminarPolizaVirtual(CveVenta As Integer) As Boolean + Dim Retorno As Boolean = False + SqlDataAdapter("PA_Vta_PolizaVirtualRemove") + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + End With + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As SqlException + OnError("Ocurrió un al eliminar poliza virtual. ", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + Return Retorno + End Function #End Region Public Function DistribuidorMovtosAdd(CveCliente As Integer, Cantidad As Integer, CveTamaño As Integer, CveConcepto As Integer, CveVenta As Integer, CveUsuario As Integer, diff --git a/App_Code/ClsPaginas.vb b/App_Code/ClsPaginas.vb index 9cd34a38f..8a6e569be 100644 --- a/App_Code/ClsPaginas.vb +++ b/App_Code/ClsPaginas.vb @@ -6785,7 +6785,7 @@ Public Class ClsPaginas Dim rds5 As New ReportDataSource With {.Name = "DataSet5", .Value = If(Vta.DtNCVinculadas IsNot Nothing, Vta.DtNCVinculadas, New DataTable)} ' sino esta creado el objeto, lo creamos, para que no truene el reporte lrds.Add(rds5) - If UsuarioActual.CveEmpresa = 141 AndAlso RutaFormato.Contains("Factura") Then + If UsuarioActual.CveEmpresa = 141 AndAlso (RutaFormato.Contains("Factura") Or RutaFormato.Contains("Cotizacion")) Then params.Add(New ReportParameter("Kilometraje", Vta.Kilometraje.ToString)) End If 'Imprime los parametros diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index a9e28e571..5d07b8c90 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -4496,6 +4496,25 @@ Public Class ClsVentas Return Retorno End Function + + Public Function EliminarUsados(CveVenta As Integer) As Boolean + Dim Retorno As Boolean = False + + DataAdapter("PA_Vta_VentasUsadosRemove", CommandType.StoredProcedure) + + With SqlAdapter.SelectCommand.Parameters + .Add("@CveVenta", SqlDbType.Int).Value = CveVenta + End With + + Try + SqlAdapter.Fill(Data) + Retorno = True + Catch ex As Exception + OnError("Ocurrió un error al eliminar los usados.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) + End Try + + Return Retorno + End Function Public Function GetVentasUsados(CveVenta As Integer, CveSubProyecto As Integer, Fecha As DateTime, CveEmpresa As Integer) As Boolean Dim Retorno As Boolean = False diff --git a/CRM/CatEtapasProceso.aspx b/CRM/CatEtapasProceso.aspx index fe53d4a71..8dc6acbfb 100644 --- a/CRM/CatEtapasProceso.aspx +++ b/CRM/CatEtapasProceso.aspx @@ -23,8 +23,8 @@ - - + + @@ -130,8 +130,10 @@ -
+
diff --git a/CRM/CatEtapasProceso.aspx.cs b/CRM/CatEtapasProceso.aspx.cs index 21f956a3a..088df61d5 100644 --- a/CRM/CatEtapasProceso.aspx.cs +++ b/CRM/CatEtapasProceso.aspx.cs @@ -418,4 +418,47 @@ public partial class CRM_CatEtapasProceso : ClsPaginas ImprimirPDF("Empresas/Grales/Formatos/RepCatEtapasProceso.rdlc", TmpDT, param, "Report Cat Etapas Proceso", formato); } + + protected void DdlTipoProceso_Change(Object sender,EventArgs e) + { + DataTable EtapasIterable = DTEtapas.Copy(); + DataTable EtapasAux = DTEtapas.Copy(); + int indice = 0; + + foreach (DataRow EtapaRow in EtapasIterable.Rows) + { + int CveTipoEtapa = EtapaRow["CveTipoEtapa"].ToEntero(); + if (CveTipoEtapa != 2) + { + int CantidadEtapas = TmpDT.FiltraParametros(String.Format("CveTipoProceso = {0} AND CveTipoEtapa = {1}",DdlTipoProceso.SelectedValue,EtapaRow["CveTipoEtapa"])).Rows.Count; + if(CantidadEtapas > 0) + { + EtapasAux.Rows.RemoveAt(indice); + } + }else + { + indice++; + } + + } + + //for (int i = 1; i < CveTipoEtapa; i++) + //{ + // DataRow TipoEtapaRow = EtapasAux.Rows[indice]; + // int CveTipoEtapaAux = TipoEtapaRow["CveTipoEtapa"].ToEntero(); + // if (CveTipoEtapaAux == 2) + // { + // indice++; + // } + // else + // { + // EtapasAux.Rows.Remove(TipoEtapaRow); + // } + //} + EtapasAux.AcceptChanges(); + + DdlTipoEtapa.DataSource = EtapasAux; + DdlTipoEtapa.DataBind(); + UPModal.Update(); + } } \ No newline at end of file diff --git a/CRM/CatMediosCaptacion.aspx b/CRM/CatMediosCaptacion.aspx index 753505485..5e733e2eb 100644 --- a/CRM/CatMediosCaptacion.aspx +++ b/CRM/CatMediosCaptacion.aspx @@ -95,6 +95,8 @@

+ +