[Home] [Help]
4911:
4912: l_progress:='000';
4913: PO_DEBUG.debug_begin(l_log_head);
4914:
4915: /*pon_award allocations allocated_funds amount will have total funds_remaining from req lines for that bid line.
4916: So each distribution will have this funded amount divided in the ratio of distribution
4917: i.e if the req line has 2 dist with funds_remaining as d1 and d2 and allocated_funds is f1 then funded value for this distribution
4918: is f1*(d1/(d1+d2))
4919: Also
4923: TFU*(di/d1+d2)*/
4924:
4925: BEGIN
4926: SELECT PLI.auction_header_id INTO l_auction_header_id
4927: FROM po_lines_interface pli,pon_award_allocations paa
4928: WHERE PLI.interface_header_id = PO_AUTOCREATE_PARAMS.x_interface_header_id
4929: AND pli.auction_header_id = paa.auction_header_id
4930: AND paa.is_linked_pr_line_yn = 'Y'
4931: AND ROWNUM <2;
5040: Decode(plb.matching_basis, 'AMOUNT',(paa.allocated_funds * (prd.funds_remaining/ req_dist_amt.tot_funds_remaining)),
5041: NULL ) --amount_funded
5042: FROM po_lines_interface pli,
5043: po_headers_interface phi,
5044: pon_award_allocations paa,
5045: po_clmreq_dist_details_v prd,
5046: (SELECT requisition_line_id, Sum(prd.funds_remaining) AS tot_funds_remaining
5047: FROM po_clmreq_dist_details_v prd
5048: GROUP BY prd.requisition_line_id) req_dist_amt,