Advertisement
ILyaCyclone

CabinetContracts - CurrentUserView

May 17th, 2021
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.70 KB | None | 0 0
  1. /* CabinetContracts - CurrentUserView */
  2.  
  3. select :Bind_IdWebUser as ID_WEB_USER
  4. , case
  5. when exists
  6. (
  7. select 'x'
  8. from contract_sources_ cs
  9. , source_financing_ sf
  10. , division_ d
  11. , organizations_ o
  12. , contracts_ c
  13. , employees_ e
  14. , web_user_wp wu
  15. where cs.id_source = sf.id_source
  16. and sf.id_d = d.id_d
  17. and d.id_contractor = o.id_contractor(+)
  18. and (d.id_contractor is null or o.id_organization = p_environment_.get_ve_us_text(555))
  19. and cs.id_contract = c.id_contract
  20. and c.id_with_whom = e.id_contractor
  21. and e.id_e = wu.id_e_kis
  22. and wu.id_web_user = :Bind_IdWebUser
  23. )
  24. then 1
  25. else 0
  26. end as SHOW_WRONG_PAY_WARNING
  27. from dual
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement