en compras se agregó una validación para evitar OC con oc detalle con código del sat 01010101
This commit is contained in:
@@ -15365,15 +15365,27 @@ Partial Class Compras_Compras
|
||||
Dim SubTotalCompra As Decimal = Amortizacion
|
||||
Dim DiferenciaPermitida = 1
|
||||
Dim Cont = 0
|
||||
Dim ProductosCodigoSATNoPermitidos As New StringBuilder("")
|
||||
For Each gvr As GridViewRow In GvOC1.Rows
|
||||
SubTotalGV += gvr.FCTextBox("TxtTotalOC1").Text.ToDecimal
|
||||
If Cont = 0 Then DdlProveedorSucursal.SelectedValueExist(gvr.DataKey("CveProveedorSucursal").ToEntero())
|
||||
Cont = 1
|
||||
If GvOC1.Columns(6).Visible Then
|
||||
Dim SatPS As String = gvr.FCDropDownLost("DdlSATPS").SelectedText()
|
||||
Alert(SatPS)
|
||||
Dim NombreProducto As String = gvr.FCLabel("LbProductoServicio").Text
|
||||
If SatPS.Contains("01010101") Then
|
||||
ProductosCodigoSATNoPermitidos.AppendFormat("{0}</br>", NombreProducto)
|
||||
'Dim mensajeAdvertencia As String = String.Format("Al vincular una Orden de Compra no se permiten productos con Producto/Servicio SAT igual a '{0}', revise el producto '{1}' en Orden(es) de Compra Vinculada(s)", SatPS, NombreProducto)
|
||||
'Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
|
||||
End If
|
||||
End If
|
||||
Next
|
||||
If ProductosCodigoSATNoPermitidos.ToString.Length > 0 Then
|
||||
Dim mensajeAdvertencia As String = String.Format("No se permite vinculación de productos con código SAT '01010101', revise los productos:</br></br>{0}", ProductosCodigoSATNoPermitidos.ToString)
|
||||
Alert(mensajeAdvertencia, TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
If Math.Abs(SubTotalGV - SubTotalCompra) < DiferenciaPermitida Then
|
||||
LbSubTotalDif.Visible = False
|
||||
@@ -18508,6 +18520,14 @@ Partial Class Compras_Compras
|
||||
UPPSolDev.Update()
|
||||
|
||||
End Sub
|
||||
|
||||
Private Sub GvSolDev_RowDataBound(sender As Object, e As GridViewRowEventArgs) Handles GvSolDev.RowDataBound
|
||||
If e.Row.RowType = DataControlRowType.DataRow Then
|
||||
Dim ExistenciasAux As Decimal = e.Row.DataKey("Cantidad").ToDecimal
|
||||
e.Row.FCRangeValidator("RVR").MaximumValue = ExistenciasAux.ToString
|
||||
End If
|
||||
End Sub
|
||||
|
||||
Protected Sub BtnDevolucion_Click(sender As Object, e As EventArgs)
|
||||
Dim ObjCompras As New ClsCompras
|
||||
Dim TieneError As Boolean = False
|
||||
|
||||
Reference in New Issue
Block a user