Wednesday, July 18, 2018

How to get TAX PR and PO



   
PR

select sum (nvl(recoverable_tax,0)+nvl(nonrecoverable_tax,0))


from po_req_distributions_all

where requisition_line_id = p_pr;

PO

select sum (nvl(recoverable_tax,0)+nvl(nonrecoverable_tax,0))


from po_distributions_all

where po_header_id = p_po;

 

Amount PR

select sum(unit_price*quantity +  get_tax_pr(requisition_line_id))

from po_requisition_lines_all

where requisition_header_id = p_pr;

 

Amount PO

select (zl.unit_price*zl.tax_rate)/100

from zx_lines zl

where zl.internal_organization_id = p_org

and zl.trx_id = p_po_no

and zl.trx_line_id = (select pll.line_location_id

from po_lines_all pod, po_line_locations_all pll

where pod.po_line_id = pll.po_line_id(+)

            and pod.org_id= pll.org_id(+)

and pod.po_header_id = zl.trx_id

and pod.po_line_id = p_po_line

and rownum = '1');
 

   

No comments:

Post a Comment

How to Create shell script to Start Database and Checking Table Space

 #dr_check_db_ERPGF.sh #!/bin/bash #run ./dr_check_db_ERPGF.sh | tee dr_ERPGF.out echo -e "\n" echo -e "+++++ Start Check Dat...