Cambios en el documento de exportación

This commit is contained in:
SLopez
2025-07-02 15:15:31 -07:00
parent 7f629642d4
commit baae66fdf6

View File

@@ -976,6 +976,7 @@ public partial class Export_ExpDetalle : ClsPaginas
string Patente = DTExportaciones.FiltroPrimeroValor("Patente"); string Patente = DTExportaciones.FiltroPrimeroValor("Patente");
string AgenteExt = DTExportaciones.FiltroPrimeroValor("AgenteExt"); string AgenteExt = DTExportaciones.FiltroPrimeroValor("AgenteExt");
string TaxId = DTExportaciones.FiltroPrimeroValor("TaxId"); string TaxId = DTExportaciones.FiltroPrimeroValor("TaxId");
string Notas = DTExportaciones.FiltroPrimeroValor("Notas");
List <ReportParameter> para = new List<ReportParameter>(); List <ReportParameter> para = new List<ReportParameter>();
para.Add(new ReportParameter("CveExportacion", CveExportacion.ToString())); para.Add(new ReportParameter("CveExportacion", CveExportacion.ToString()));
@@ -1040,6 +1041,7 @@ public partial class Export_ExpDetalle : ClsPaginas
para.Add(new ReportParameter("Patente", Patente)); para.Add(new ReportParameter("Patente", Patente));
para.Add(new ReportParameter("AgenteExt", AgenteExt)); para.Add(new ReportParameter("AgenteExt", AgenteExt));
para.Add(new ReportParameter("TaxId", TaxId)); para.Add(new ReportParameter("TaxId", TaxId));
para.Add(new ReportParameter("Notas", Notas));
List <ReportDataSource> lrds = new List<ReportDataSource>(); List <ReportDataSource> lrds = new List<ReportDataSource>();
ReportDataSource RDSExportaciones = new ReportDataSource(); ReportDataSource RDSExportaciones = new ReportDataSource();
@@ -1058,12 +1060,14 @@ public partial class Export_ExpDetalle : ClsPaginas
DTPartidas.Columns.Add("ValorUnitarioMN", typeof(decimal)); DTPartidas.Columns.Add("ValorUnitarioMN", typeof(decimal));
DTPartidas.Columns["ValorUnitarioUSD"].DefaultValue = 0.0m; DTPartidas.Columns["ValorUnitarioUSD"].DefaultValue = 0.0m;
DTPartidas.Columns["ValorUnitarioMN"].DefaultValue = 0.0m; DTPartidas.Columns["ValorUnitarioMN"].DefaultValue = 0.0m;
DataRow RowPartida = DTPartidas.Rows[0]; foreach (DataRow row in DTPartidas.Rows)
decimal cantidad = Convert.ToDecimal(RowPartida["Cantidad"]);
if (cantidad > 0)
{ {
RowPartida["ValorUnitarioUSD"] = Convert.ToDecimal(RowPartida["Precio"]) / cantidad; decimal cantidad = Convert.ToDecimal(row["Cantidad"]);
RowPartida["ValorUnitarioMN"] = Convert.ToDecimal(RowPartida["ValorTotalMXP"]) / cantidad; if (cantidad > 0)
{
row["ValorUnitarioUSD"] = Convert.ToDecimal(row["Precio"]) / cantidad;
row["ValorUnitarioMN"] = Convert.ToDecimal(row["ValorTotalMXP"]) / cantidad;
}
} }
ReportDataSource RDSPartidas = new ReportDataSource(); ReportDataSource RDSPartidas = new ReportDataSource();
RDSPartidas.Name = "DsPartidas"; RDSPartidas.Name = "DsPartidas";