Cambiar cargar conciliaciones a gembox.
Soporte en compras para actualizar contabilizados. Cambiar cargar contratos a gem box. Soporte en Ventas que no se pueda ingresar productos de diferente moneda.
This commit is contained in:
@@ -5,6 +5,8 @@ Imports System.Data
|
|||||||
Imports Extensiones
|
Imports Extensiones
|
||||||
Imports System.Xml
|
Imports System.Xml
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Bancos_CargarConciliacionesBancarias
|
Partial Class Bancos_CargarConciliacionesBancarias
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
|
|
||||||
@@ -83,51 +85,99 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
|||||||
End If
|
End If
|
||||||
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())
|
||||||
|
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
|
||||||
|
|
||||||
Private Sub CargaExcel(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargaExcel(Ruta As String, FileName As String, Tipo As String)
|
||||||
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
|
If Not DdlCuenta.SelectedValue.ToEntero > 0 Then
|
||||||
Alert("Tiene que seleccionar una cuenta", TipoMensaje.MsgAdvertencia)
|
Alert("Tiene que seleccionar una cuenta", TipoMensaje.MsgAdvertencia)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
End If
|
End If
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
Dim ErrorExcel = False
|
'Dim ErrorArchivo = False
|
||||||
Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=Excel 8.0;"
|
'Dim ErrorExcel = False
|
||||||
Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
'Dim strConnString As String = "Provider=Microsoft.ACE.OLEDB.12.0; Data Source=" + Ruta + FileName + ";Extended Properties=Excel 8.0;"
|
||||||
Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
'Dim objDbFactory As Common.DbProviderFactory = Common.DbProviderFactories.GetFactory("System.Data.OleDb")
|
||||||
Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
'Dim objDbAdapter As Common.DbDataAdapter = objDbFactory.CreateDataAdapter()
|
||||||
objDbConnection.ConnectionString = strConnString
|
'Dim objDbConnection As Common.DbConnection = objDbFactory.CreateConnection()
|
||||||
objDbConnection.Open()
|
'objDbConnection.ConnectionString = strConnString
|
||||||
Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
'objDbConnection.Open()
|
||||||
Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
'Dim objSheetNames As DataTable = objDbConnection.GetSchema("Tables")
|
||||||
Try
|
'Dim HojaExcel As String = objSheetNames.FiltroPrimeroValor("TABLE_NAME")
|
||||||
Select Case Tipo
|
'Try
|
||||||
Case "CSV"
|
' Select Case Tipo
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
' Case "CSV"
|
||||||
Conexion.Open()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Access Text Driver (*.txt, *.csv)};Dbq=" + Ruta + ";Extensions=asc,csv,tab,txt;")
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion.Open()
|
||||||
cmd.CommandType = CommandType.Text
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
' cmd.CommandType = CommandType.Text
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandText = $"SELECT * FROM [{FileName}]"
|
||||||
DataAdapter.Fill(dt)
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Case "EXCEL"
|
' DataAdapter.Fill(dt)
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
' Case "EXCEL"
|
||||||
Conexion.Open()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion.Open()
|
||||||
cmd.CommandType = CommandType.Text
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
' cmd.CommandType = CommandType.Text
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandText = $"SELECT * FROM [{HojaExcel}]"
|
||||||
DataAdapter.Fill(dt)
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Case Else
|
' DataAdapter.Fill(dt)
|
||||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
' Case Else
|
||||||
Exit Sub
|
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||||
End Select
|
' Exit Sub
|
||||||
Catch ex As Exception
|
' End Select
|
||||||
ErrorArchivo = True
|
'Catch ex As Exception
|
||||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
' ErrorArchivo = True
|
||||||
End Try
|
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
Conexion.Close()
|
'End Try
|
||||||
If Not ErrorArchivo Then
|
'Conexion.Close()
|
||||||
|
If dt IsNot Nothing Then
|
||||||
dt.Columns(0).ColumnName = "FechaDocumento"
|
dt.Columns(0).ColumnName = "FechaDocumento"
|
||||||
dt.Columns(1).ColumnName = "Referencia"
|
dt.Columns(1).ColumnName = "Referencia"
|
||||||
dt.Columns(2).ColumnName = "Importe"
|
dt.Columns(2).ColumnName = "Importe"
|
||||||
@@ -166,6 +216,8 @@ Partial Class Bancos_CargarConciliacionesBancarias
|
|||||||
ObjBancos.RollBack()
|
ObjBancos.RollBack()
|
||||||
End If
|
End If
|
||||||
ObjBancos.Dispose()
|
ObjBancos.Dispose()
|
||||||
|
Else
|
||||||
|
Alert("Hubo un error al intentar leer el archivo.", TipoMensaje.MsgError)
|
||||||
End If
|
End If
|
||||||
End Sub
|
End Sub
|
||||||
|
|
||||||
|
|||||||
@@ -8829,6 +8829,16 @@ Partial Class Compras_Compras
|
|||||||
'Revisamos que los cambios hechos mantengan la interidad de los numeros
|
'Revisamos que los cambios hechos mantengan la interidad de los numeros
|
||||||
If HFDiferenciaCompra.Value = TxtTotal.Text Or CveFactura < 1 Or CveCompra < 1 Then
|
If HFDiferenciaCompra.Value = TxtTotal.Text Or CveFactura < 1 Or CveCompra < 1 Then
|
||||||
|
|
||||||
|
If IdPoliza > 0 Then
|
||||||
|
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, Nothing, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
'PORCENTAJE IVA
|
'PORCENTAJE IVA
|
||||||
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
Dim PorcentajeIVA As Decimal = TmpDT.MAX("IVAPorcentaje").ToDecimal
|
||||||
|
|
||||||
@@ -8846,11 +8856,7 @@ Partial Class Compras_Compras
|
|||||||
' End If
|
' End If
|
||||||
'End If
|
'End If
|
||||||
|
|
||||||
If IdPoliza > 0 Then
|
|
||||||
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, False) Then
|
|
||||||
Retorno = False
|
|
||||||
End If
|
|
||||||
End If
|
|
||||||
|
|
||||||
'If UsuarioActual.Empresa.Funcionalidad(207) = "1" Then
|
'If UsuarioActual.Empresa.Funcionalidad(207) = "1" Then
|
||||||
If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then
|
If Not ActualizarPrePoliza(ObjContabilidad, ObjCompra) Then
|
||||||
@@ -8859,7 +8865,7 @@ Partial Class Compras_Compras
|
|||||||
'End If
|
'End If
|
||||||
|
|
||||||
''EMPIEZA: SI USA AC
|
''EMPIEZA: SI USA AC
|
||||||
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
If UsuarioActual.Empresa.UsaAC AndAlso IdPoliza > 0 Then
|
||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC.IniciaTransacSQL()
|
||||||
|
|
||||||
@@ -9242,9 +9248,11 @@ Partial Class Compras_Compras
|
|||||||
Next
|
Next
|
||||||
|
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
If ViewState("IdPoliza").ToString.ToEntero > 0 Then
|
If (UsuarioActual.Empresa.UsaAC Or UsuarioActual.Empresa.Funcionalidad(200).ToString = "1") AndAlso IdPoliza > 0 Then
|
||||||
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
If ObjContaAC Is Nothing Then
|
||||||
ObjContaAC.IniciaTransacSQL()
|
ObjContaAC = New ClsContPAQi(UsuarioActual.Empresa)
|
||||||
|
ObjContaAC.IniciaTransacSQL()
|
||||||
|
End If
|
||||||
|
|
||||||
If Not ObjContabilidad.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, String.Format("{0}-{1}", Serie, Folio), ObjContaAC, pIDPoliza:=ViewState("IdPoliza").ToString.ToEntero) Then
|
If Not ObjContabilidad.ContabilizarPrePoliza(CvePrePoliza, UsuarioActual.CveEmpresa, UsuarioActual.Empresa, MinFecha, String.Format("{0}-{1}", Serie, Folio), ObjContaAC, pIDPoliza:=ViewState("IdPoliza").ToString.ToEntero) Then
|
||||||
Retorno = False
|
Retorno = False
|
||||||
@@ -9261,6 +9269,18 @@ Partial Class Compras_Compras
|
|||||||
|
|
||||||
'Retorno = True
|
'Retorno = True
|
||||||
'Alert("La Compra se actualizó correctamente.")
|
'Alert("La Compra se actualizó correctamente.")
|
||||||
|
Else
|
||||||
|
|
||||||
|
If IdPoliza > 0 Then
|
||||||
|
If Not ObjContabilidad.UpdatePrePolizasDetalleBloquear(CvePrePoliza, True) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
|
||||||
|
If Not ObjContabilidad.UpdatePrePoliza(MinFecha, -1, -1, IdPoliza, CvePrePoliza, UsuarioActual.CveEmpresa) Then
|
||||||
|
Retorno = False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
End If
|
End If
|
||||||
|
|
||||||
Else
|
Else
|
||||||
@@ -9275,7 +9295,7 @@ Partial Class Compras_Compras
|
|||||||
Catch ex As Exception
|
Catch ex As Exception
|
||||||
Alert("Ocurrió un error al actualizar la compra", TipoMensaje.MsgError)
|
Alert("Ocurrió un error al actualizar la compra", TipoMensaje.MsgError)
|
||||||
ObjCompra.RollBack()
|
ObjCompra.RollBack()
|
||||||
ObjContaAC.RollBack()
|
If ObjContaAC IsNot Nothing Then ObjContaAC.RollBack()
|
||||||
|
|
||||||
Finally
|
Finally
|
||||||
If Retorno Then
|
If Retorno Then
|
||||||
|
|||||||
@@ -6,6 +6,7 @@ Imports System.IO
|
|||||||
Imports System.Data
|
Imports System.Data
|
||||||
Imports Microsoft.Reporting.WebForms
|
Imports Microsoft.Reporting.WebForms
|
||||||
Imports System.Globalization
|
Imports System.Globalization
|
||||||
|
Imports GemBox.Spreadsheet
|
||||||
|
|
||||||
Partial Class Contratos_Default
|
Partial Class Contratos_Default
|
||||||
Inherits ClsPaginas
|
Inherits ClsPaginas
|
||||||
@@ -3185,32 +3186,79 @@ Partial Class Contratos_Default
|
|||||||
Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
Public Sub LbDescargarExcel_Click(sender As Object, e As EventArgs) Handles LbDescargarExcel.Click
|
||||||
DescargarFormato()
|
DescargarFormato()
|
||||||
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())
|
||||||
|
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
|
||||||
|
|
||||||
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
Private Sub CargarArchivo(Ruta As String, FileName As String, Tipo As String)
|
||||||
Dim dt As New DataTable
|
Dim dt As New DataTable
|
||||||
Dim Conexion As Odbc.OdbcConnection = Nothing
|
dt = ReadExcelFile(Ruta + FileName, True)
|
||||||
Dim ErrorArchivo = False
|
Dim ErrorArchivo = False
|
||||||
|
|
||||||
Try
|
'Dim Conexion As Odbc.OdbcConnection = Nothing
|
||||||
Select Case Tipo
|
'Try
|
||||||
Case "EXCEL"
|
' Select Case Tipo
|
||||||
Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
' Case "EXCEL"
|
||||||
Conexion.Open()
|
' Conexion = New Odbc.OdbcConnection("Driver={Microsoft Excel Driver (*.xls, *.xlsx, *.xlsm, *.xlsb)};DBQ=" + Ruta + FileName + ";")
|
||||||
Dim cmd = Conexion.CreateCommand()
|
' Conexion.Open()
|
||||||
cmd.CommandType = CommandType.Text
|
' Dim cmd = Conexion.CreateCommand()
|
||||||
cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
' cmd.CommandType = CommandType.Text
|
||||||
Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
' cmd.CommandText = "SELECT * FROM [Hoja1$]"
|
||||||
DataAdapter.Fill(dt)
|
' Dim DataAdapter = New Odbc.OdbcDataAdapter(cmd)
|
||||||
Case Else
|
' DataAdapter.Fill(dt)
|
||||||
Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
' Case Else
|
||||||
Exit Sub
|
' Alert("El archivo no tiene el formato correcto", TipoMensaje.MsgError)
|
||||||
End Select
|
' Exit Sub
|
||||||
Catch ex As Exception
|
' End Select
|
||||||
ErrorArchivo = True
|
'Catch ex As Exception
|
||||||
OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
' ErrorArchivo = True
|
||||||
End Try
|
' OnError("Ocurrio un error al leer el archivo <br/>" & ex.Message, ex)
|
||||||
Conexion.Close()
|
'End Try
|
||||||
If Not ErrorArchivo Then
|
'Conexion.Close()
|
||||||
|
If Not ErrorArchivo AndAlso dt IsNot Nothing Then
|
||||||
If Not dt.Columns(0).ColumnName = "OC Interna" Then
|
If Not dt.Columns(0).ColumnName = "OC Interna" Then
|
||||||
Alert("El nombre de la primera columna debe ser 'OC Interna'. Favor de corregirlo", TipoMensaje.MsgError)
|
Alert("El nombre de la primera columna debe ser 'OC Interna'. Favor de corregirlo", TipoMensaje.MsgError)
|
||||||
Exit Sub
|
Exit Sub
|
||||||
|
|||||||
@@ -12650,8 +12650,12 @@ Partial Class Ventas
|
|||||||
DdlUnidadMedida.SelectedValue = "-1"
|
DdlUnidadMedida.SelectedValue = "-1"
|
||||||
DdlUnidadMedida.DataBind()
|
DdlUnidadMedida.DataBind()
|
||||||
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
DdlUnidadMedida.SelectedValueExist(drPS("CveUnidadMedida").ToString)
|
||||||
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString)
|
|
||||||
CambiaMoneda()
|
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count = 0 Then
|
||||||
|
DdlMoneda.SelectedValueExist(drPS("CveMoneda").ToString)
|
||||||
|
CambiaMoneda()
|
||||||
|
End If
|
||||||
|
|
||||||
'SUGIERE PRECIO
|
'SUGIERE PRECIO
|
||||||
Dim PrecioSugerido = 0.0
|
Dim PrecioSugerido = 0.0
|
||||||
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
PrecioSugerido = drPS("Precio").ToString.ToDouble
|
||||||
@@ -13239,6 +13243,15 @@ Partial Class Ventas
|
|||||||
Return False
|
Return False
|
||||||
End If
|
End If
|
||||||
|
|
||||||
|
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count >= 1 Then
|
||||||
|
Dim DrPS As DataRow = GlobalDTPS(UsuarioActual.CveEmpresa, CvePS:=CvePS).Rows(0)
|
||||||
|
If DrPS IsNot Nothing Then
|
||||||
|
If DrPS("CveMoneda").ToString.ToEntero <> DdlMoneda.SelectedValue.ToEntero Then
|
||||||
|
Alert("No puede agregar un producto de diferente moneda a la ya seleccionada", TipoMensaje.MsgAdvertencia)
|
||||||
|
Return False
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
End If
|
||||||
|
|
||||||
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
If Not UsuarioActual.TienePermisoProceso(169) Then ' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||||
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
'SOLO VALIDA EXISTENCIAS Y COSTO: SI USA INVENTARIOS, SOLO PRODUCTOS TIPO PRODUCTO, SOLO REMISIONES E INGRESOS
|
||||||
|
|||||||
Reference in New Issue
Block a user