Validacion de aplicacion de anticipos y pagos de contado, no validar movimiento de almacen al refacturar.
This commit is contained in:
@@ -5322,6 +5322,11 @@ Partial Class Ventas
|
||||
BtnsFacturar.Visible = True
|
||||
End If
|
||||
|
||||
'VERIFICA SI YA SE FACTURO COMPLETAMENTE
|
||||
If TmpDT.SUM("CantidadFacturadaRem") = TmpDT.SUM("Cantidad") Then
|
||||
BtnsFacturar.Visible = False
|
||||
End If
|
||||
|
||||
'VERIFICA SI TIENE USADOS O GARANTIAS PENDIENTES
|
||||
If BtnsFacturar.Visible Then
|
||||
If (Not EsGarantia AndAlso (DtUsadosPendientes IsNot Nothing AndAlso DtUsadosPendientes.Rows.Count > 0)) Then
|
||||
@@ -14387,15 +14392,16 @@ Partial Class Ventas
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0
|
||||
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
||||
If DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
'DEBE GENERAR MOVIMIENTO SI SE FACTURAON PRODUCTOS, O NO SE REALIZA UNA REFACTURACION
|
||||
Dim DebeGenerarMovimiento As Boolean = TmpDT.COUNT("CvePS", "CveTipoPS = 2") > 0 AndAlso (NuevaFactura <> 1)
|
||||
'VERIFICA QUE SE REALIZO EL MOVIMIENTO DE ALMACEN
|
||||
If Not OcurrioError AndAlso DebeGenerarMovimiento AndAlso UsuarioActual.Empresa.Funcionalidad(558) = "1" AndAlso UsuarioActual.Empresa.Funcionalidad(567) = "1" AndAlso factura.TipoDocto.Contiene("Ing", "Rem") Then
|
||||
If Not (ObjInventario.GetInv_Mov(factura.CveVenta, UsuarioActual.CveEmpresa) AndAlso ObjInventario.DtResultados.Rows.Count > 0) Then
|
||||
OcurrioError = True
|
||||
ErrorList.Add("Ocurrió un error al verificar inventario.<br />Revise su factura y cualquier detalle comuníquese a Soporte Técnico")
|
||||
End If
|
||||
End If
|
||||
|
||||
End If
|
||||
|
||||
End If
|
||||
@@ -22237,10 +22243,10 @@ Partial Class Ventas
|
||||
Return Retorno
|
||||
End If
|
||||
|
||||
If Not PermiteCredito AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
If (Not PermiteCredito OrElse RBLPago.SelectedValue = "2") AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC
|
||||
|
||||
If TotalPago < TxtTotal.Text.ToDecimal Then
|
||||
If TotalPago <> TxtTotal.Text.ToDecimal Then
|
||||
If MostrarAlertas Then
|
||||
Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
@@ -22315,7 +22321,7 @@ Partial Class Ventas
|
||||
If Not PermiteCredito AndAlso TienePagos AndAlso TxtTotal.Text.ToDecimal > 0 Then
|
||||
Dim TotalPago As Decimal = DtPagos.SUM("Importe").ToDecimal() + AmortizacionNC
|
||||
|
||||
If TotalPago < TxtTotal.Text.ToDecimal Then
|
||||
If TotalPago <> TxtTotal.Text.ToDecimal Then
|
||||
If MostrarAlertas Then
|
||||
Alert("La suma de los pagos debe ser igual al total de la venta.", TipoMensaje.MsgAdvertencia)
|
||||
End If
|
||||
|
||||
Reference in New Issue
Block a user