diff --git a/App_Code/ClsVentas.vb b/App_Code/ClsVentas.vb index 0ecf1a268..fd66b4b7e 100644 --- a/App_Code/ClsVentas.vb +++ b/App_Code/ClsVentas.vb @@ -5850,7 +5850,7 @@ Public Class ClsVentas .Add("@CamionRemolque2", SqlDbType.VarChar).Value = CamionRemolque2 .Add("@Distancia", SqlDbType.Decimal).Value = Distancia .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa - .Add("@ErrorMSG", SqlDbType.VarChar, 300).Direction = ParameterDirection.Output + .Add("@ErrorMSG", SqlDbType.VarChar, 5000).Direction = ParameterDirection.Output End With Try diff --git a/Ventas/FacturacionAcarreos.aspx.vb b/Ventas/FacturacionAcarreos.aspx.vb index 25db0c7ba..7af6ff40f 100644 --- a/Ventas/FacturacionAcarreos.aspx.vb +++ b/Ventas/FacturacionAcarreos.aspx.vb @@ -126,7 +126,7 @@ Partial Class Ventas_FacturacionAcarreos RowsCargados += 1 Else TieneError = True - MsgFacturacionAcarreos.AppendFormat("Ocurrió un error en la fila: {0}
{1}", dt.Rows.IndexOf(row) + 2, msg) + MsgFacturacionAcarreos.AppendFormat("Ocurrió un error al procesar la fila: {0}
{1}", row("NoExcel"), msg) RowsNoCargados += 1 Exit For End If @@ -188,15 +188,21 @@ Partial Class Ventas_FacturacionAcarreos End If Next + dataTable.Columns.Add("NoExcel", GetType(String)) + While curRow < worksheet.Rows.Count - columns = New String(cols - 1) {} + columns = New String(cols) {} - For curCol = 0 To cols - 1 - - If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then - columns(curCol) = "" - Else - columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString() + For curCol = 0 To cols + + If curCol = cols Then + columns(curCol) = worksheet.Rows(curRow).Name + Else + If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then + columns(curCol) = "" + Else + columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString() + End If End If Next