PO SQL


select  poh.segment1 po单据号,
       
       poh.creation_date,
       
       pov.vendor_name 供应商,
       
       
-- hl_po_utl_pkg.get_location_code(poh.ship_to_location_id) 收货方,
       
       
-- hl_po_utl_pkg.get_location_code(poh.bill_to_location_id) 收单方,
       
       poh.currency_code 币种,
       
       hr_general.decode_person_name(poh.agent_id) 采购员,
       
       po_headers_sv3.get_po_status(poh.po_header_id) 状态,
       
       hl_po_utl_pkg.get_po_amount(poh.po_header_id, poh.currency_code) 合计,
       
       poh.comments 摘要,
       
       pol.line_num 编号,
       
       po_line_types_sv.get_line_type(pol.line_type_id) 类型,
       
       
-- hl_po_utl_pkg.get_item_desc(pol.item_id, pll.ship_to_organization_id) 料号,
       
       pol.item_description 摘要,
       
       cat.concatenated_segments 类别,
       
       pol.unit_meas_lookup_code 单位,
       
       pol.quantity 数量,
       
       pol.unit_price 价格,
       
       
-- hl_po_utl_pkg.format_precision(pol.quantity * unit_price,poh.currency_code) 金额,
       
       gcc.concatenated_segments 借记账户,
       
       pod.gl_encumbered_date gl_日期

  
from  po_headers_all poh,
       
       po_lines_all pol,
       
       po_line_locations_all pll,
       
       hr_locations_all hl,
       
       po_distributions_all pod,
       
       po_vendors pov,
       
       mtl_system_items_vl mst,
       
       mtl_categories_b_kfv cat,
       
       gl_code_combinations_kfv gcc

 
where  poh.po_header_id  =  pol.po_header_id
      
   
and  pol.po_line_id  =  pll.po_line_id
      
   
and  hl.location_id( + =  pll.ship_to_location_id
      
   
and  pod.line_location_id  =  pll.line_location_id
      
   
and  poh.vendor_id  =  pov.vendor_id( + )
      
   
and  pol.item_id  =  mst.inventory_item_id( + )
      
   
and  pol.org_id  =  mst.organization_id( + )
      
   
and  pol.category_id  =  cat.category_id( + )
      
   
and  gcc.code_combination_id( + =  pod.code_combination_id


  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值