--FIX validacion de monedas
This commit is contained in:
@@ -9252,7 +9252,7 @@ Partial Class Ventas
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSubProyectoDatos.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal) Then
|
||||
If Not ValidaAgregarPS(Cantidad, CvePSNuevo, DdlUM.SelectedValue.ToEntero(), PU, DrProducto("CveTipoPS").ToString().ToEntero(), DdlCla.SelectedValue.ToEntero(), DdlSubProyectoDatos.SelectedValue.ToEntero(), ObjDescuento, CantidadOriginal:=CantidadOriginal, EsEdicion:=True) Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
@@ -19529,7 +19529,7 @@ Partial Class Ventas
|
||||
Protected Sub LbAgregar_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles LbAgregar.Click
|
||||
AgregarPS()
|
||||
End Sub
|
||||
Private Function ValidaAgregarPS(Cantidad As Decimal, CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, CveClasificacion As Integer, CveSubProyecto As Integer, ObjDescuento As Modelos.VentaDescuentos, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "", Optional CantidadOriginal As Decimal = 0D) As Boolean 'NO TOCAR - IPP
|
||||
Private Function ValidaAgregarPS(Cantidad As Decimal, CvePS As Integer, CveUM As Integer, PU As Double, CveTipoPS As Integer, CveClasificacion As Integer, CveSubProyecto As Integer, ObjDescuento As Modelos.VentaDescuentos, Optional CantidadModal As Decimal = 0D, Optional PSValidarModal As String = "", Optional CantidadOriginal As Decimal = 0D, Optional EsEdicion As Boolean = False) As Boolean 'NO TOCAR - IPP
|
||||
|
||||
'VALIDA PARAMETROS
|
||||
If CvePS <= 0 Or CveUM <= 0 Then
|
||||
@@ -19616,17 +19616,34 @@ Partial Class Ventas
|
||||
' Return False
|
||||
'End If
|
||||
|
||||
Dim ValidarMonedas As Boolean = False
|
||||
|
||||
'SI NO TIENE LA FUNCIONALIDAD VALIDARA LAS MONEDAS
|
||||
If UsuarioActual.Empresa.Funcionalidad(524) <> "" Then
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count >= 1 Then
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(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
|
||||
ValidarMonedas = True
|
||||
|
||||
'MODALIDAD EDICION
|
||||
If EsEdicion Then
|
||||
ValidarMonedas = False
|
||||
End If
|
||||
|
||||
'REFACTURACION
|
||||
If NuevaFactura = 1 Then
|
||||
ValidarMonedas = False
|
||||
End If
|
||||
|
||||
If ValidarMonedas Then
|
||||
If TmpDT IsNot Nothing AndAlso TmpDT.Rows.Count >= 1 Then
|
||||
Dim DrPS As DataRow = GlobalDTPSSimplificado(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
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
' NO VALIDA EXISTENCIAS NI COSTO - PERMISO PARA NO VALIDAR
|
||||
|
||||
Reference in New Issue
Block a user