Correccion en carga de precios por excel
This commit is contained in:
@@ -400,28 +400,37 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
Alert("Debe Seleccionar la lista de precios a cargar. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("Debe Seleccionar la lista de precios a cargar. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
'LA PRIMERA COLUMNA SIEMRPE ES CODIGO
|
||||||
If Not dt.Columns(0).ColumnName = "Código" Then
|
If Not dt.Columns(0).ColumnName = "Código" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'Codigo'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
Dim IndiceActualColExcel As Integer = 1
|
||||||
|
Dim StrColPos As String() = {"primera", "segunda", "tecera", "cuarta"}
|
||||||
|
|
||||||
|
'SI ES EMPRESA DE ACUMULADORES SE AGREGA LA COLUMNA "Código CPK"
|
||||||
|
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
|
||||||
|
If Not dt.Columns(IndiceActualColExcel).ColumnName = "Código CPK" Then
|
||||||
|
Alert("El nombre de la segunda columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
IndiceActualColExcel += 1
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not dt.Columns(IndiceActualColExcel).ColumnName = "Producto / Servicio" Then
|
||||||
|
Alert($"El nombre de la {StrColPos(IndiceActualColExcel)} columna debe ser 'Producto / Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
|
End If
|
||||||
|
|
||||||
|
IndiceActualColExcel += 1
|
||||||
|
|
||||||
|
If Not dt.Columns(IndiceActualColExcel).ColumnName = "Precio" Then
|
||||||
|
Alert($"El nombre de la {StrColPos(IndiceActualColExcel)} columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
If Not dt.Columns(1).ColumnName = "Producto / Servicio" Then
|
|
||||||
Alert("El nombre de la segunda columna debe ser 'Producto / Servicio'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
|
|
||||||
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then 'Empresa Acumuladores
|
|
||||||
If Not dt.Columns(3).ColumnName = "Precio" Then
|
|
||||||
Alert("El nombre de la cuarta columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
Else
|
|
||||||
If Not dt.Columns(2).ColumnName = "Precio" Then
|
|
||||||
Alert("El nombre de la tercera columna debe ser 'Precio'. Favor de corregirlo", TipoMensaje.MsgError)
|
|
||||||
Exit Sub
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
dt.TableName = "Datos"
|
dt.TableName = "Datos"
|
||||||
@@ -483,11 +492,7 @@ Partial Class Ventas_ActualizarPrecios
|
|||||||
ObjPS.Dispose()
|
ObjPS.Dispose()
|
||||||
End Try
|
End Try
|
||||||
|
|
||||||
'If RowNoEncontrados.Length > 0 Then
|
|
||||||
' Alert("Los siguientes Productos o Servicios no se encontraron en la Base de Datos.<\BR>" & RowNoEncontrados, TipoMensaje.MsgAdvertencia)
|
|
||||||
'Else
|
|
||||||
' Alert("Se Cargaron " & NumRow & " Productos o Servicios correctamente.")
|
|
||||||
'End If
|
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user