-mejoras
This commit is contained in:
@@ -1511,7 +1511,7 @@ Partial Class General_SaldosIniciales
|
|||||||
If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
|
If Not CveProveedor > 0 Then Alert(String.Format("No se encontró el Proveedor con el RFC: {0}", {RFC}), TipoMensaje.MsgError) : ErrorCompras = True : Exit For
|
||||||
If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
|
If Not CveProveedorSucursal > 0 Then CveProveedorSucursal = -1
|
||||||
|
|
||||||
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING"), "Fac", "NC").ToString
|
TipoDocto = IIf(TipoDocto.ToUpper.Contiene("INGRESOS", "INGRESO", "ING", "FACTURA"), "Fac", "NC").ToString
|
||||||
|
|
||||||
|
|
||||||
'Temporalmente SE BORRARA
|
'Temporalmente SE BORRARA
|
||||||
@@ -1851,10 +1851,10 @@ Partial Class General_SaldosIniciales
|
|||||||
For Each Row As DataRow In dt.Rows
|
For Each Row As DataRow In dt.Rows
|
||||||
Dim Codigo As String = Row("Código").ToString
|
Dim Codigo As String = Row("Código").ToString
|
||||||
Dim Descripcion As String = Row("Descripción").ToString
|
Dim Descripcion As String = Row("Descripción").ToString
|
||||||
Dim TipoAF As String = Row("Tipo").ToString
|
Dim TipoAF As String = Row("Tipo").ToString.Trim
|
||||||
Dim SubTipo As String = Row("SubTipo").ToString
|
Dim SubTipo As String = Row("SubTipo").ToString.Trim
|
||||||
Dim Valor As Decimal = Row("Valor").ToString.ToDecimal
|
Dim Valor As Decimal = Row("Valor de compra").ToString.ToDecimal
|
||||||
Dim FechaAF As Date = Row("Fecha").ToString.ToDate
|
Dim FechaAF As Date = Row("Fecha de compra").ToString.ToDate
|
||||||
Dim NumeroSerie As String = Row("No. Serie").ToString
|
Dim NumeroSerie As String = Row("No. Serie").ToString
|
||||||
Dim Año As Integer = Row("Año").ToString.ToEntero
|
Dim Año As Integer = Row("Año").ToString.ToEntero
|
||||||
Dim CuentaContable As String = Row("Cuenta Contable").ToString
|
Dim CuentaContable As String = Row("Cuenta Contable").ToString
|
||||||
@@ -3943,58 +3943,5 @@ Partial Class General_SaldosIniciales
|
|||||||
|
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
Private Function ReadExcelFile(ByVal flatFilePath As String, ByVal firstRowHasHeaders As Boolean) As DataTable
|
|
||||||
SpreadsheetInfo.SetLicense(ModExtensiones.SerialGemBoxSpreadsheet)
|
|
||||||
Dim excelFile As ExcelFile = ExcelFile.Load(flatFilePath)
|
|
||||||
|
|
||||||
Dim unnamed As Integer = 0
|
|
||||||
Dim cols As Integer
|
|
||||||
Dim columns As String()
|
|
||||||
Dim curRow As Integer = 0
|
|
||||||
Dim curCol As Integer = 0
|
|
||||||
Dim dataTable As DataTable = New DataTable()
|
|
||||||
Dim worksheet As ExcelWorksheet = excelFile.Worksheets(0)
|
|
||||||
|
|
||||||
For cols = 0 To worksheet.Rows(0).AllocatedCells.Count - 1
|
|
||||||
|
|
||||||
If firstRowHasHeaders Then
|
|
||||||
|
|
||||||
If worksheet.Rows(0).Cells(cols).Value IsNot Nothing Then
|
|
||||||
dataTable.Columns.Add(worksheet.Rows(0).Cells(cols).Value.ToString().Trim)
|
|
||||||
Else
|
|
||||||
dataTable.Columns.Add("Unnamed Column " & (System.Threading.Interlocked.Increment(unnamed)))
|
|
||||||
End If
|
|
||||||
|
|
||||||
curRow = 1
|
|
||||||
Else
|
|
||||||
dataTable.Columns.Add("Column " & (cols + 1))
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
While curRow < worksheet.Rows.Count
|
|
||||||
|
|
||||||
columns = New String(cols - 1) {}
|
|
||||||
|
|
||||||
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()
|
|
||||||
End If
|
|
||||||
|
|
||||||
Next
|
|
||||||
|
|
||||||
dataTable.Rows.Add(columns)
|
|
||||||
curRow += 1
|
|
||||||
|
|
||||||
End While
|
|
||||||
|
|
||||||
Return dataTable
|
|
||||||
|
|
||||||
End Function
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
End Class
|
End Class
|
||||||
|
|||||||
Reference in New Issue
Block a user