@ -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 ;