117: Old tax select:
118: SELECT nvl(sum(nonrecoverable_tax), 0)
119: INTO l_tax_amt
120: FROM po_lines pol,
121: po_distributions pod
122: WHERE pol.po_header_id = l_document_id
123: AND pod.po_line_id = pol.po_line_id;
124: */
125:
140: ) * X_min_acct_unit
141: )
142: INTO l_tax_amt
143: FROM po_lines pol,
144: po_distributions pod
145: WHERE pol.po_header_id = l_document_id
146: AND pod.po_line_id = pol.po_line_id;
147: ELSE
148: SELECT sum( round (POD.nonrecoverable_tax *
155: )
156: )
157: INTO l_tax_amt
158: FROM po_lines pol,
159: po_distributions pod
160: WHERE pol.po_header_id = l_document_id
161: AND pod.po_line_id = pol.po_line_id;
162: END IF;
163: