diff --git a/App_Code/ClsCompras.vb b/App_Code/ClsCompras.vb index e9431b099..8768624dd 100644 --- a/App_Code/ClsCompras.vb +++ b/App_Code/ClsCompras.vb @@ -2684,7 +2684,7 @@ Public Class ClsCompras Return Retorno End Function - Public Function AddRepCxCColumnas(CveEmpresa As Integer, RangoInicial As Double, RangoFinal As Double, Tipo As Integer) As Boolean + Public Function AddRepCxCColumnas(CveEmpresa As Integer, RangoInicial As Double, RangoFinal As Double, Tipo As Integer, Objetivo As Decimal) As Boolean Dim Retorno As Boolean = False DataAdapter("PA_Comp_RepCxCColumnasAdd") With SqlAdapter.SelectCommand.Parameters @@ -2692,6 +2692,7 @@ Public Class ClsCompras .Add("@RangoInicial", SqlDbType.Float).Value = RangoInicial .Add("@RangoFinal", SqlDbType.Float).Value = RangoFinal .Add("@Tipo", SqlDbType.Int).Value = Tipo + .Add("@Objetivo", SqlDbType.Money).Value = Objetivo End With Try SqlAdapter.Fill(Data) diff --git a/App_Code/ClsMovimientos.vb b/App_Code/ClsMovimientos.vb index 71422d3bb..7553f2d76 100644 --- a/App_Code/ClsMovimientos.vb +++ b/App_Code/ClsMovimientos.vb @@ -16,7 +16,8 @@ Public Class ClsMovimientos Private SqlAdapter As SqlDataAdapter Private SqlTransacc As SqlTransaction Private SqlCommand As SqlCommand - Private Data As DataTable + Private Data As DataTable + Private DS As DataSet 'Atributos de la clase Private disposedValue As Boolean = False ' Para detectar llamadas redundantes @@ -30,6 +31,12 @@ Public Class ClsMovimientos Get DtResultados = Data End Get + End Property + + Public ReadOnly Property DSResultados() As DataSet + Get + DSResultados = DS + End Get End Property Public Property AlertaMensaje As New StringBuilder @@ -329,6 +336,7 @@ Public Class ClsMovimientos Optional TipoCliente As Integer = -1, Optional CveMoneda As Integer = -1, Optional EstatusCliente As Integer = -1, Optional AplicaAnticiposPagados As Integer = 1) As Boolean Dim Retorno As Boolean = False + DS = New DataSet 'Data = New DataTable 'SqlAdapter = New SqlDataAdapter("PA_RepCxCDetalle", SqlConexion) 'SqlAdapter.SelectCommand.CommandType = CommandType.StoredProcedure @@ -371,7 +379,7 @@ Public Class ClsMovimientos End With Try - SqlAdapter.Fill(Data) + SqlAdapter.Fill(DS) Retorno = True Catch ex As Exception OnError("Ocurrió un error al obtener el Reporte de CxC Detalle.", ex, SqlAdapter.SelectCommand.Parameters.ParametrosInfo) diff --git a/CxC/RepCxC.aspx b/CxC/RepCxC.aspx index da8b8d323..3e639b089 100644 --- a/CxC/RepCxC.aspx +++ b/CxC/RepCxC.aspx @@ -572,11 +572,12 @@ + OnRowDataBound="GvPersonalizarRango_RowDataBound" GridLines="None" AllowPaging="False" DataKeyNames="Tipo,RangoInicial,RangoFinal,Objetivo"> + @@ -649,6 +650,20 @@ + + +
+
+
+ + + + + +
+
+
+ diff --git a/CxC/RepCxC.aspx.vb b/CxC/RepCxC.aspx.vb index fcbbe1977..da08d924d 100644 --- a/CxC/RepCxC.aspx.vb +++ b/CxC/RepCxC.aspx.vb @@ -811,6 +811,7 @@ Partial Class RepCxC DdlTipo.SelectedValueExist(gvRow.DataKey("Tipo")) TxtRI.Text = gvRow.DataKey("RangoInicial") TxtRF.Text = gvRow.DataKey("RangoFinal") + TxtRObjetivo.Text = gvRow.DataKey("Objetivo").ToString.ToDecimal.ToString("###.00") If Not TxtRF.Text.ToDouble > 0 Then ChkMayor.Checked = True TxtRF.Enabled = False @@ -825,6 +826,7 @@ Partial Class RepCxC DdlTipo.SelectedIndex = 0 TxtRI.Text = "" TxtRF.Text = "" + TxtRObjetivo.Text = "" ChkMayor.Checked = False SoloNumeros2.Enabled = True TxtRF.Enabled = True @@ -864,12 +866,14 @@ Partial Class RepCxC Dt("RangoFinal") = TxtRF.Text.ToDouble Dt("Tipo") = DdlTipo.SelectedValue Dt("TipoEscrito") = DdlTipo.SelectedItem.Text + Dt("Objetivo") = TxtRObjetivo.Text.ToDecimal DtPersonalizarRango.Rows.InsertAt(Dt, DtPersonalizarRango.Rows.Count) ElseIf Modalidad = "U" Then DtPersonalizarRango.Rows(Index)("RangoInicial") = TxtRI.Text.ToDouble DtPersonalizarRango.Rows(Index)("RangoFinal") = TxtRF.Text.ToDouble DtPersonalizarRango.Rows(Index)("Tipo") = DdlTipo.SelectedValue DtPersonalizarRango.Rows(Index)("TipoEscrito") = DdlTipo.SelectedItem.Text + DtPersonalizarRango.Rows(Index)("Objetivo") = TxtRObjetivo.Text.ToDecimal DtPersonalizarRango.AcceptChanges() End If DtPersonalizarRango = DtPersonalizarRango.FiltraParametros("", "Tipo,RangoInicial,RangoFinal") @@ -914,7 +918,7 @@ Partial Class RepCxC ErrorTrans = True End If For Each Dr As DataRow In DtPersonalizarRango.Rows - If Not ObjComp.AddRepCxCColumnas(UsuarioActual.CveEmpresa, Dr("RangoInicial").ToString.ToDouble, Dr("RangoFinal").ToString.ToDouble, Dr("Tipo").ToString.ToEntero) Then + If Not ObjComp.AddRepCxCColumnas(UsuarioActual.CveEmpresa, Dr("RangoInicial").ToString.ToDouble, Dr("RangoFinal").ToString.ToDouble, Dr("Tipo").ToString.ToEntero, Dr("Objetivo").ToString.ToDecimal) Then ErrorTrans = True End If Next diff --git a/CxC/RepCxCDetalle.aspx b/CxC/RepCxCDetalle.aspx index cc3e6ad6f..b91380685 100644 --- a/CxC/RepCxCDetalle.aspx +++ b/CxC/RepCxCDetalle.aspx @@ -325,6 +325,26 @@ + + + +
+
+ + + + + + + + + +
+
+ +
+
+
diff --git a/CxC/RepCxCDetalle.aspx.vb b/CxC/RepCxCDetalle.aspx.vb index dc9a65081..cf8087e86 100644 --- a/CxC/RepCxCDetalle.aspx.vb +++ b/CxC/RepCxCDetalle.aspx.vb @@ -234,7 +234,12 @@ Partial Class RepCxCDetalle ChkCuentaContableReferencia.Visible = True End If CargaAsignarCobranza() - TxtFechaCobranza.Text = Now.ToShortDateString + TxtFechaCobranza.Text = Now.ToShortDateString + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + DVCartera.Visible = True + End If + End If End Sub @@ -447,15 +452,28 @@ Partial Class RepCxCDetalle CveClienteClasificacion:=DdlClienteClasificacion.SelectedValue.ToEntero, LimiteCredito:=LimiteCredito, TipoCliente:=DdlTipoCliente.SelectedValue.ToEntero, CveMoneda:=CveMoneda, EstatusCliente:=DdlEstatusCliente.SelectedValue.ToEntero, AplicaAnticiposPagados:=If(ChkAnticipos.Checked, 1, 0)) Then - GvDatos.DataSource = ObjMovtos.DtResultados - dt = ObjMovtos.DtResultados + GvDatos.DataSource = ObjMovtos.DSResultados.Tables(0) + dt = ObjMovtos.DSResultados.Tables(0) + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + GvCartera.DataSource = ObjMovtos.DSResultados.Tables(1) + End If + + Else GvDatos.DataSource = Nothing End If ObjMovtos.Dispose() - GvDatos.DataBind() + GvDatos.DataBind() + + + If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then + GvCartera.DataBind() + End If + + UPDatos.Update() + UpCartera.Update() Return dt diff --git a/Inventarios/EntregaAlmacenRuta.aspx.cs b/Inventarios/EntregaAlmacenRuta.aspx.cs index 33d7a6cb2..b294170b0 100644 --- a/Inventarios/EntregaAlmacenRuta.aspx.cs +++ b/Inventarios/EntregaAlmacenRuta.aspx.cs @@ -213,8 +213,18 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas if (ObjTimbres.Timbrar()) { - MensajeAlert.AppendFormat("XML    ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); - MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre))); + MensajeAlert.AppendFormat("XML    ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); + + if (ChkEmitirCartaPorte.Checked) + { + MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre))); + } + else + { + MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", cvetimbre))); + } + + MensajeAlert.Append("
"); DdlChofer.SelectedValueExist("-1"); @@ -358,8 +368,19 @@ public partial class Inventarios_EntregaAlmacenRuta : ClsPaginas //if (System.IO.File.Exists(ArchivoXML)) // MensajeAlert.AppendFormat("", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); MensajeAlert.AppendFormat("Folio: {0}  ", ObjTimbres.ObjFactura.SerieFolio); - MensajeAlert.AppendFormat("XML    ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); - MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre))); + + MensajeAlert.AppendFormat("XML    ", ModExtensiones.Encripta(String.Format("OP=DesXmlTra&CveTimbre={0}&EXT={1}&FOLIO={2}&TIPODOCTO={3}", cvetimbre, "XML", ObjTimbres.ObjFactura.SerieFolio, ObjTimbres.ObjFactura.TipoDocto))); + + if (ChkEmitirPorteRec.Checked) { + MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPOTIMBRE&CVETIMBRE={0}", cvetimbre))); + }else{ + MensajeAlert.AppendFormat("PDF   ", ModExtensiones.Encripta(String.Format("OP=CARPO&CVETIMBRE={0}", cvetimbre))); + } + + + + + MensajeAlert.Append("
"); ////PDF //string ArchivoPDF = String.Format("{0}/PDF/{1}/{2}.pdf", UsuarioActual.Empresa.Ruta, ObjTimbres.ObjFactura.TipoDocto, ObjTimbres.ObjFactura.SerieFolio);