Merge branch 'bugfix/fix_reporte_semanal_newell' into feature/solicitar_eliminacion_de_referenica_20240219

feature/solicitar_eliminacion_de_referenica_20240219
Felix Morales 7 months ago
commit 5197a2c581
  1. 6
      Services/Reportes/Newell/Semanal/ReporteSemanalService.cs

@ -36,8 +36,8 @@ namespace CORRESPONSALBackend.Services.Reportes.Newell.Semanal{
var start = worksheet.Dimension.Start; var start = worksheet.Dimension.Start;
var end = worksheet.Dimension.End; var end = worksheet.Dimension.End;
int initialRow = start.Row+1; int initialRow = start.Row+1;
var aduana = worksheet.Cells[$"A2"].Value.ToString(); /* var aduana = worksheet.Cells[$"A2"].Value.ToString();
var patente = worksheet.Cells[$"B2"].Value.ToString(); var patente = worksheet.Cells[$"B2"].Value.ToString(); */
worksheet.Cells[$"S1"].Value = "Referencia"; worksheet.Cells[$"S1"].Value = "Referencia";
worksheet.Cells[$"T1"].Value = "Contenedor"; worksheet.Cells[$"T1"].Value = "Contenedor";
worksheet.Cells[$"U1"].Value = "Cuenta de Gastos"; worksheet.Cells[$"U1"].Value = "Cuenta de Gastos";
@ -46,6 +46,8 @@ namespace CORRESPONSALBackend.Services.Reportes.Newell.Semanal{
for (int currentRow = initialRow; currentRow <= end.Row; currentRow++)// Recorrer renglon por renglon for (int currentRow = initialRow; currentRow <= end.Row; currentRow++)// Recorrer renglon por renglon
{ {
if(!string.IsNullOrWhiteSpace(worksheet.Cells[$"C{currentRow}"].Value?.ToString()) && !string.IsNullOrEmpty(worksheet.Cells[$"C{currentRow}"].Value?.ToString())){ if(!string.IsNullOrWhiteSpace(worksheet.Cells[$"C{currentRow}"].Value?.ToString()) && !string.IsNullOrEmpty(worksheet.Cells[$"C{currentRow}"].Value?.ToString())){
var aduana = worksheet.Cells[$"A{currentRow}"].Value.ToString();
var patente = worksheet.Cells[$"B{currentRow}"].Value.ToString();
var pedimento = worksheet.Cells[$"C{currentRow}"].Value.ToString(); var pedimento = worksheet.Cells[$"C{currentRow}"].Value.ToString();
var dto = await _traficosRepository.GetByPedimento(int.Parse(pedimento), int.Parse(aduana), int.Parse(patente)); var dto = await _traficosRepository.GetByPedimento(int.Parse(pedimento), int.Parse(aduana), int.Parse(patente));
worksheet.Cells[$"S{currentRow}"].Value = dto.GC; worksheet.Cells[$"S{currentRow}"].Value = dto.GC;

Loading…
Cancel
Save