Desactivar Boton Facturar si se surtio y recibio mercancia

This commit is contained in:
janeth arvizu
2019-11-19 14:17:35 -07:00
parent f3635e98e0
commit 82ab863b24
2 changed files with 18 additions and 1 deletions

File diff suppressed because one or more lines are too long

View File

@@ -3434,6 +3434,13 @@ Partial Class Ventas
Dim CveCliente As Integer = DbRowVenta("CveCliente").ToString.ToEntero
HdnCveVenta.Value = CveVenta.ToString
Dim ObjUsados As New ClsVentas
Dim DtUsados As DataTable = Nothing
If ObjUsados.GetVentasUsados(CveVenta, DdlSubProyectoDatos.SelectedValue.ToEntero(), TxtFecha.Text.ToDateTime(), UsuarioActual.CveEmpresa) Then
DtUsados = ObjVentas.DtResultados
End If
ObjUsados.Dispose()
Me.CveEstatusFacturaPadre = DbRowVenta("CveEstatusFacturaPadre").ToString.ToEntero
'CargaEncabezado
If Not (CveRemision > 0 Or CveCotizacion > 0) Then
@@ -4217,6 +4224,16 @@ Partial Class Ventas
End If
End If
'Si es Empresa de Acumuladores
If UsuarioActual.Empresa.Funcionalidad(531) = "1" Then
'Si ya se surtió y recibió
If DbRowVenta("SaldoAlmacen").ToString.ToDecimal > 0 And (DtUsados Is Nothing Or DtUsados.Rows.Count = 0) Then
BtnsFacturar.Visible = True
Else
BtnsFacturar.Visible = False
End If
End If
End If