Mejoras en mensaje de facturacion de acarreos

This commit is contained in:
2023-08-03 15:28:17 -07:00
parent a70f75d81d
commit fb9d889491
2 changed files with 15 additions and 9 deletions

View File

@@ -5850,7 +5850,7 @@ Public Class ClsVentas
.Add("@CamionRemolque2", SqlDbType.VarChar).Value = CamionRemolque2 .Add("@CamionRemolque2", SqlDbType.VarChar).Value = CamionRemolque2
.Add("@Distancia", SqlDbType.Decimal).Value = Distancia .Add("@Distancia", SqlDbType.Decimal).Value = Distancia
.Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa .Add("@CveEmpresa", SqlDbType.Int).Value = CveEmpresa
.Add("@ErrorMSG", SqlDbType.VarChar, 300).Direction = ParameterDirection.Output .Add("@ErrorMSG", SqlDbType.VarChar, 5000).Direction = ParameterDirection.Output
End With End With
Try Try

View File

@@ -126,7 +126,7 @@ Partial Class Ventas_FacturacionAcarreos
RowsCargados += 1 RowsCargados += 1
Else Else
TieneError = True TieneError = True
MsgFacturacionAcarreos.AppendFormat("Ocurrió un error en la fila: {0}<br/>{1}", dt.Rows.IndexOf(row) + 2, msg) MsgFacturacionAcarreos.AppendFormat("Ocurrió un error al procesar la fila: {0}<br/>{1}", row("NoExcel"), msg)
RowsNoCargados += 1 RowsNoCargados += 1
Exit For Exit For
End If End If
@@ -188,15 +188,21 @@ Partial Class Ventas_FacturacionAcarreos
End If End If
Next Next
dataTable.Columns.Add("NoExcel", GetType(String))
While curRow < worksheet.Rows.Count While curRow < worksheet.Rows.Count
columns = New String(cols - 1) {} columns = New String(cols) {}
For curCol = 0 To cols - 1 For curCol = 0 To cols
If worksheet.Rows(curRow).Cells(curCol).Value Is Nothing Then If curCol = cols Then
columns(curCol) = "" columns(curCol) = worksheet.Rows(curRow).Name
Else Else
columns(curCol) = worksheet.Rows(curRow).Cells(curCol).Value.ToString() 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 End If
Next Next