DBA Data[Home] [Help]

APPS.POS_COMPLEX_WORK_PVT SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 32

      select SUM(DECODE(PLL.matching_basis,
               'AMOUNT', NVL(PLL.amount_received, 0),
               'QUANTITY', NVL(PLL.quantity_received, 0)*NVL(PLL.price_override, 0)))
        from PO_LINE_LOCATIONS_ALL PLL
       where PLL.po_header_id = p_po_header_id
         and PLL.payment_type in ('MILESTONE', 'RATE', 'LUMPSUM');
Line: 41

      select SUM(DECODE(PLL.matching_basis,
               'AMOUNT', NVL(PLL.amount_billed, 0),
               'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0)))
        from PO_LINE_LOCATIONS_ALL PLL
       where PLL.po_header_id = p_po_header_id
         and PLL.payment_type <> 'ADVANCE'
         and PLL.shipment_type = 'STANDARD';
Line: 50

      select sum(NVL(PLL.amount_financed, 0))
        from PO_LINE_LOCATIONS_ALL PLL
       where PLL.po_header_id = p_po_header_id
         and PLL.payment_type = 'ADVANCE'
         and PLL.shipment_type = 'PREPAYMENT';
Line: 57

  select SUM(DECODE(PLL.matching_basis,
             'AMOUNT', NVL(PLL.amount_financed,0),
             'QUANTITY', NVL(PLL.quantity_financed, 0)*NVL(PLL.price_override, 0)))
    from PO_LINE_LOCATIONS_ALL PLL
   where PLL.po_header_id = p_po_header_id
     and PLL.payment_type in ('MILESTONE', 'RATE', 'LUMPSUM')
     and PLL.shipment_type = 'PREPAYMENT';
Line: 66

  select SUM(DECODE(PLL.shipment_type,
          'STANDARD', DECODE(PLL.matching_basis,
             'AMOUNT', NVL(PLL.amount_billed, 0),
             'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0)),
          'PREPAYMENT', DECODE(PLL.matching_basis,
             'AMOUNT', NVL(PLL.amount_financed, 0),
             'QUANTITY', NVL(PLL.quantity_financed, 0)*NVL(PLL.price_override, 0))))
    from PO_LINE_LOCATIONS_ALL PLL
   where PLL.po_header_id = p_po_header_id
     and PLL.payment_type in ('MILESTONE', 'RATE', 'LUMPSUM')
     and PLL.shipment_type in('STANDARD', 'PREPAYMENT');   --???
Line: 79

  select SUM(DECODE(PLL.matching_basis,
             'AMOUNT', NVL(PLL.amount_recouped, 0),
             'QUANTITY', NVL(PLL.quantity_recouped, 0)*NVL(PLL.price_override, 0)))
    from PO_LINE_LOCATIONS_ALL PLL
   where PLL.po_header_id = p_po_header_id
     and PLL.shipment_type = 'PREPAYMENT';   -- could be advance or financing pp
Line: 87

  select sum(NVL(PLL.retainage_withheld_amount,0) - NVL(retainage_released_amount,0))
    from PO_LINE_LOCATIONS_ALL PLL
   where PLL.po_header_id = p_po_header_id
     and PLL.payment_type in ('MILESTONE', 'RATE', 'LUMPSUM')
     and PLL.shipment_type = 'STANDARD';
Line: 95

  select sum(NVL(RSL.amount, NVL(RSL.quantity_shipped,0)*NVL(PLL.price_override,0)))
    from RCV_SHIPMENT_LINES RSL,
         PO_LINE_LOCATIONS_ALL PLL
   where PLL.po_header_id = p_po_header_id
     and PLL.shipment_type = 'STANDARD'
     and PLL.payment_type = 'DELIVERY'
     and RSL.PO_line_location_id = PLL.line_location_id;
Line: 224

    select sum(NVL(
                   NVL(RSL.amount,RSL.REQUESTED_AMOUNT),      --5488052
                   NVL(RSL.quantity_shipped,0)*NVL(PLL.price_override,0)
                  )
               )
      from RCV_SHIPMENT_LINES RSL,
           PO_LINE_LOCATIONS_ALL PLL
     where PLL.po_line_id = p_po_line_id
       and PLL.shipment_type = 'STANDARD'
     --5488052  and PLL.payment_type = 'DELIVERY'
       and RSL.PO_line_location_id = PLL.line_location_id
       and RSL.approval_status in ('APPROVED', 'PROCESSED');
Line: 239

    select SUM(DECODE(PLL.matching_basis,
           'AMOUNT', NVL(PLL.amount_billed, 0),
           'QUANTITY', NVL(PLL.quantity_billed, 0)*NVL(PLL.price_override, 0)))
    from PO_LINE_LOCATIONS_ALL PLL
   where PLL.po_line_id = p_po_line_id
  --5488052   and PLL.payment_type = 'DELIVERY'
     and PLL.shipment_type = 'STANDARD';
Line: 249

    select PLL.amount
      from PO_LINE_LOCATIONS_ALL PLL
     where PLL.po_line_id = p_po_line_id
       and PLL.payment_type = 'ADVANCE'
       and PLL.shipment_type = 'PREPAYMENT';
Line: 257

    select PLL.amount_financed
      from PO_LINE_LOCATIONS_ALL PLL
     where PLL.po_line_id = p_po_line_id
       and PLL.payment_type = 'ADVANCE'
       and PLL.shipment_type = 'PREPAYMENT';
Line: 265

    select SUM(DECODE(PLL.matching_basis,
             'AMOUNT', NVL(PLL.amount_recouped, 0),
             'QUANTITY', NVL(PLL.quantity_recouped, 0)*NVL(PLL.price_override, 0)))
      from PO_LINE_LOCATIONS_ALL PLL
     where PLL.po_line_id = p_po_line_id
       and PLL.shipment_type = 'PREPAYMENT'; -- could be advance or financ pp
Line: 356

    select ROUND(DECODE(PLL.matching_basis,
               'AMOUNT', (NVL(PLL.amount, 0)/POL.amount)*100,
               'QUANTITY', (NVL(PLL.price_override, 0)/POL.unit_price)*100))
      from PO_LINE_LOCATIONS_ARCHIVE_ALL PLL,
           PO_LINES_ARCHIVE_ALL POL
     where PLL.po_line_id = POL.po_line_id
       and PLL.line_location_id = p_po_line_location_id
       and PLL.payment_type = 'MILESTONE'
       and PLL.latest_external_flag ='Y'
       and POL.latest_external_flag ='Y';
Line: 368

    select DECODE(PLL.matching_basis,
               'AMOUNT', NVL(PLL.amount_received, 0),
               'QUANTITY', NVL(PLL.quantity_received, 0)*NVL(PLL.price_override, 0))
      from PO_LINE_LOCATIONS_ALL PLL
     where PLL.line_location_id = p_po_line_location_id;