OC rdl 189
This commit is contained in:
@@ -4462,11 +4462,14 @@ Partial Class Compras_Compras
|
||||
End If
|
||||
|
||||
If UsuarioActual.TienePermisoProceso(121) And Not (CveImportacion > 0 Or CveFlete > 0) Then 'valida que de salida, pero sino es importación o costoindirecto
|
||||
|
||||
If DdlTipoComprobante.SelectedValue.Contiene("NC", "DEV") Then
|
||||
|
||||
If Not NCDevolucion And Not ChkNCInvNC.Checked Then
|
||||
Alert("Favor de seleccionar un producto en la pestaña de almacen", TipoMensaje.MsgAdvertencia)
|
||||
Exit Sub
|
||||
End If
|
||||
ValidaFechaDeAlamacen()
|
||||
Else
|
||||
Dim x As Integer = 0
|
||||
For Each Dr As GridViewRow In GvInv.Rows
|
||||
@@ -4480,11 +4483,13 @@ Partial Class Compras_Compras
|
||||
Exit Sub
|
||||
End If
|
||||
End If
|
||||
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If Not ValidaFechaDeAlamacen() Then
|
||||
Exit Sub
|
||||
End If
|
||||
|
||||
|
||||
End If
|
||||
|
||||
If UsuarioActual.Empresa.Funcionalidad(538) = "1" Then
|
||||
@@ -7820,13 +7825,37 @@ Partial Class Compras_Compras
|
||||
'FechaCompra
|
||||
Dim FechaMinima As DateTime = TxtFecha.Text.ToDate
|
||||
|
||||
|
||||
Dim CveAlmacenMov As Integer = ddlAlmacenAdd.SelectedValue.ToEntero
|
||||
Dim DTAlamcen As New DataTable
|
||||
|
||||
|
||||
If DDLDevolucion.SelectedValue.ToEntero > 0 Then
|
||||
Dim objcompras As New ClsCompras()
|
||||
If objcompras.GetCompraDetalleAlmacen(UsuarioActual.CveEmpresa, DDLDevolucion.SelectedValue.ToEntero) Then
|
||||
GVDevolucion.DataSource = objcompras.DtResultados
|
||||
End If
|
||||
objcompras.Dispose()
|
||||
GVDevolucion.DataBind()
|
||||
|
||||
For Each GvRow As GridViewRow In GVDevolucion.Rows
|
||||
If GvRow.RowType = DataControlRowType.DataRow Then
|
||||
CveAlmacenMov = GvRow.DataKey("CveAlmacen").ToString.ToEntero
|
||||
End If
|
||||
Next
|
||||
|
||||
End If
|
||||
|
||||
|
||||
|
||||
|
||||
If DtInv IsNot Nothing Then
|
||||
For Each Dr As DataRow In TmpDT.Rows
|
||||
|
||||
Dim CveTipoPS As Integer = Dr("CveTipoPS").ToString.ToEntero
|
||||
|
||||
If CveTipoPS = 2 Then
|
||||
If objInventario.GetValidaFechaAlmacen(CveEmpresa:=UsuarioActual.CveEmpresa, CveAlmacen:=ddlAlmacenAdd.SelectedValue.ToEntero, CvePS:=Dr("CvePS").ToString.ToEntero) Then
|
||||
If objInventario.GetValidaFechaAlmacen(CveEmpresa:=UsuarioActual.CveEmpresa, CveAlmacen:=CveAlmacenMov, CvePS:=Dr("CvePS").ToString.ToEntero) Then
|
||||
|
||||
If objInventario.DtResultados IsNot Nothing AndAlso objInventario.DtResultados.Rows.Count > 0 Then
|
||||
Dim FechamoMovimiento As DateTime = objInventario.DtResultados(0)("FechaMovto").ToString.ToDate
|
||||
@@ -7845,8 +7874,9 @@ Partial Class Compras_Compras
|
||||
objInventario.Dispose()
|
||||
|
||||
If FechaMinima > TxtFecha.Text.ToDate Then
|
||||
Alert($"Los productos tienen movientos, la fecha minima que se puede aplicar es {FechaMinima.ToString("dd/MM/yyyy HH:mm")}", TipoMensaje.MsgAdvertencia)
|
||||
respuesta = False
|
||||
Alert($"Los productos tienen movientos, la fecha minima que se cambio la fecha de compra as {FechaMinima.ToString("dd/MM/yyyy HH:mm")}", TipoMensaje.MsgAdvertencia)
|
||||
'respuesta = False
|
||||
TxtFecha.Text = FechaMinima.ToString("dd/MM/yyyy")
|
||||
Else
|
||||
respuesta = True
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user