EBS收单方/收货方


select rt.name, hcas.org_id
from ar.hz_cust_acct_sites_all hcas,
ar.hz_cust_site_uses_all hcsu,
ra_terms_vl rt
where 1 = 1
and hcas.status = 'A'
and hcsu.status = 'A'
and hcsu.cust_acct_site_id = hcas.cust_acct_site_id
and hcsu.site_use_code = 'BILL_TO' --ShIP_TO
and rt.term_id = hcsu.payment_term_id
and rt.name is not null
and hcas.cust_account_id = 13434343 -- hca.cust_account_id--cusomter_id

select hl.address1 || ', ' || hl.address2 地址,
hou.name 业务实体,
decode(hcsua2.site_use_code,
'BILL_TO',
'收单方',
'DRAWEE',
'付款人',
'SHIP_TO',
'收货方') 相关人
from hz_cust_acct_sites_all cas,
apps.hz_cust_site_uses_all hcsua2,
hz_party_sites hps,
hz_locations hl,
hr_operating_units hou
where cas.party_site_id = hps.party_site_id
and hps.location_id = hl.location_id
and cas.org_id = hou.organization_id
and hcsua2.cust_acct_site_id = cas.cust_acct_site_id
and hcsua2.primary_flag = 'Y'
and cas.cust_account_id = 134343 --CUSTOMER_ID


来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/31558081/viewspace-2216399/,如需转载,请注明出处,否则将追究法律责任。

转载于:http://blog.itpub.net/31558081/viewspace-2216399/

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

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值