Advertisement
GLASHATAY_007

Untitled

Apr 5th, 2024
1,044
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Select  
  2.     cc.id contract,
  3.     cc.lot_id,
  4.     pf.amount,
  5.     pf.date::date pay_date,
  6.     pf.number number_,
  7.     substring(pf.payment_description,0,100)payment_description,
  8.     pf.sub_type_code,
  9.     vbc.description,
  10.     pf.kosgu_rs kosgu,
  11.     pf.e_code cvr,
  12.     pf.article_code targetexpenseitemcode,
  13.     pf.section_code,
  14.     pf.pay_doc_name,
  15.     pf.fund_code,
  16.     pf.req_code,
  17.     pf.year,
  18.     pf.aip_code,
  19.     c.inn,
  20.     l_aip.name aip_name
  21.     ,pf.receiver_inn
  22. From cm_contracts cc
  23. Inner Join lots l On (l.id = cc.lot_id And l.actual = true)
  24. Inner Join cm_contract_payments pf On (pf.cm_contract_id = cc.id)
  25. Left join po_vocab_budget_types vbc on (vbc.code=pf.sub_type_code)
  26. Left Join gpo_list_aip l_aip On (l_aip.aip_code= pf.aip_code and l_aip.year=pf.year)
  27. Left Join contragents c On (c.id = cc.contract_customer)
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement