588: 'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0)),
589: x_precision)
590: INTO p_amount_received,
591: p_amount_billed
592: FROM PO_LINE_LOCATIONS_ALL PLL
593: WHERE PLL.line_location_id = p_po_line_location_id;
594:
595: else
596: select round((DECODE(PLLA.matching_basis,
617: 'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0))
618: / x_min_unit) * x_min_unit)
619: INTO p_amount_received,
620: p_amount_billed
621: FROM PO_LINE_LOCATIONS_ALL PLL
622: WHERE pll.line_location_id = p_po_line_location_id;
623:
624: end if;
625:
702: 'AMOUNT', NVL(PLL.amount_received, 0),
703: 'QUANTITY', NVL(PLL.quantity_received, 0)*NVL(PLL.price_override, 0)),
704: x_precision)),0)
705: INTO x_total_received
706: FROM po_line_locations_all pll
707: WHERE pll.po_header_id = p_po_header_id
708: AND pll.po_release_id is null;
709:
710: elsif (p_po_release_id is not null) then
713: 'AMOUNT', NVL(PLL.amount_received, 0),
714: 'QUANTITY', NVL(PLL.quantity_received, 0)*NVL(PLL.price_override, 0)),
715: x_precision)),0)
716: INTO x_total_received
717: FROM po_line_locations_all pll
718: WHERE pll.po_release_id = p_po_release_id;
719:
720: end if;
721:
726: 'AMOUNT', NVL(PLL.amount_received, 0),
727: 'QUANTITY', NVL(PLL.quantity_received, 0)*NVL(PLL.price_override, 0))
728: / x_min_unit) * x_min_unit),0)
729: INTO x_total_received
730: FROM po_line_locations_all pll
731: WHERE pll.po_header_id = p_po_header_id
732: AND pll.po_release_id is null;
733:
734: elsif (p_po_release_id is not null) then
737: 'AMOUNT', NVL(PLL.amount_received, 0),
738: 'QUANTITY', NVL(PLL.quantity_received, 0)*NVL(PLL.price_override, 0))
739: / x_min_unit) * x_min_unit),0)
740: INTO x_total_received
741: FROM po_line_locations_all pll
742: WHERE pll.po_release_id = p_po_release_id;
743:
744: end if;
745: END IF;
768: if (p_po_header_id is not null and p_po_release_id is null) then
769:
770: select Nvl(SUM(NVL(PLL.quantity_received, 0)),0)
771: INTO x_total_quantity_received
772: FROM po_line_locations_all pll
773: WHERE pll.po_header_id = p_po_header_id
774: AND pll.po_release_id is null;
775:
776: elsif (p_po_release_id is not null) then
776: elsif (p_po_release_id is not null) then
777:
778: select Nvl(SUM(NVL(PLL.quantity_received, 0)),0)
779: INTO x_total_quantity_received
780: FROM po_line_locations_all pll
781: WHERE pll.po_release_id = p_po_release_id;
782:
783: end if;
784:
823: 'AMOUNT', NVL(PLL.amount_billed, 0),
824: 'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0)),
825: x_precision)),0)
826: INTO x_total_invoiced
827: FROM po_line_locations_all pll
828: WHERE pll.po_header_id = p_po_header_id
829: AND pll.po_release_id is null;
830:
831: elsif (p_po_release_id is not null) then
833: 'AMOUNT', NVL(PLL.amount_billed, 0),
834: 'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0)),
835: x_precision)),0)
836: INTO x_total_invoiced
837: FROM po_line_locations_all pll
838: WHERE pll.po_release_id = p_po_release_id;
839:
840: end if;
841:
846: 'AMOUNT', NVL(PLL.amount_billed, 0),
847: 'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0))
848: / x_min_unit) * x_min_unit),0)
849: INTO x_total_invoiced
850: FROM po_line_locations_all pll
851: WHERE pll.po_header_id = p_po_header_id
852: AND pll.po_release_id is null;
853:
854: elsif (p_po_release_id is not null) then
857: 'AMOUNT', NVL(PLL.amount_billed, 0),
858: 'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0))
859: / x_min_unit) * x_min_unit),0)
860: INTO x_total_invoiced
861: FROM po_line_locations_all pll
862: WHERE pll.po_release_id = p_po_release_id;
863:
864: end if;
865: END IF;