Advertisement
Guest User

MT440AT.prw

a guest
Oct 8th, 2019
139
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 1.03 KB | None | 0 0
  1. > Exemplo da Rotina:
  2. User Function MT440AT()
  3.     //...
  4. Return lRet
  5.  
  6.  
  7. Exemplo 1 - Impedir a Liberação do Pedido de Vendas para Vendedor Desativado
  8.  
  9. ////////////////////////////////////////////////////////////////////////////////////
  10. ////////////////////////////////////////////////////////////////////////////////////
  11.  
  12. #include "protheus.ch"
  13. #INCLUDE "RWMAKE.CH"
  14. #INCLUDE "TOPCONN.CH"
  15.  
  16. //=================================================================================
  17. /*/{Protheus.doc} MT440AT
  18. Regra para Impedir a Liberação do Pedido para Vendedor Desativado
  19.  
  20. @type       function
  21. @author     Thiago.Andrrade
  22. @since      07/10/2019
  23. @version    1.0
  24. /*/
  25. //=================================================================================
  26.  
  27. User Function MT440AT()
  28.  
  29. Local _lRet := .T.
  30.  
  31. cTipo := Posicione("SA3",1,FwxFilial("SA3")+ALLTRIM(M->C5_VEND1),"A3_TIPO")
  32.  
  33. If cEmpAnt == "01"
  34.     If cTipo == "D"
  35.         MsgStop("Vendedor "+M->C5_VEND1+" Desativado! Ajuste o cadastro antes de prosseguir!")
  36.         _lRet   := .F.
  37.     Endif
  38. Endif
  39.  
  40. Return _lRet
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement