Documento Importación terminado
This commit is contained in:
@@ -1198,10 +1198,32 @@ public partial class Export_ExpDetalle : ClsPaginas
|
|||||||
row["ValorUnitarioMN"] = Convert.ToDecimal(row["ValorTotalMXP"]) / cantidad;
|
row["ValorUnitarioMN"] = Convert.ToDecimal(row["ValorTotalMXP"]) / cantidad;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ReportDataSource RDSPartidas = new ReportDataSource();
|
ReportDataSource RDSPartidas = new ReportDataSource();
|
||||||
RDSPartidas.Name = "DsPartidas";
|
RDSPartidas.Name = "DsPartidas";
|
||||||
RDSPartidas.Value = DTPartidas;
|
RDSPartidas.Value = DTPartidas;
|
||||||
lrds.Add(RDSPartidas);
|
lrds.Add(RDSPartidas);
|
||||||
|
|
||||||
|
var EmpaquesAgrupado = from row in DTPartidas.AsEnumerable()
|
||||||
|
where !string.IsNullOrWhiteSpace(row.Field<string>("TipoEmpaque"))
|
||||||
|
group row by row.Field<string>("TipoEmpaque") into g
|
||||||
|
select new
|
||||||
|
{
|
||||||
|
TipoEmpaque = g.Key,
|
||||||
|
Cantidad = g.Sum(r => r.Field<decimal>("Cantidad"))
|
||||||
|
};
|
||||||
|
DataTable DTBultos = new DataTable();
|
||||||
|
DTBultos.Columns.Add("TipoEmpaque", typeof(string));
|
||||||
|
DTBultos.Columns.Add("Cantidad", typeof(decimal));
|
||||||
|
|
||||||
|
foreach (var item in EmpaquesAgrupado)
|
||||||
|
{
|
||||||
|
DTBultos.Rows.Add(item.TipoEmpaque, item.Cantidad);
|
||||||
|
}
|
||||||
|
ReportDataSource RDSBultos = new ReportDataSource();
|
||||||
|
RDSBultos.Name = "DsBultos";
|
||||||
|
RDSBultos.Value = DTBultos;
|
||||||
|
lrds.Add(RDSBultos);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1212,7 +1234,7 @@ public partial class Export_ExpDetalle : ClsPaginas
|
|||||||
NombreArchivo = NumFactura;
|
NombreArchivo = NumFactura;
|
||||||
}
|
}
|
||||||
|
|
||||||
string Formato = "FormatoExportacion.mrt";
|
string Formato = "FormatoImportacion.mrt";
|
||||||
para.Add(new ReportParameter("Formato", "PDF"));
|
para.Add(new ReportParameter("Formato", "PDF"));
|
||||||
string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}";
|
string Ruta = ModExtensiones.DirectorioBaseEmpresas + $@"Empresas\{UsuarioActual.CveEmpresa}\Formatos\{Formato}";
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user