Po price is NOT equal to RCV price and MMT price

來源:互聯網
上載者:User
The issue occurs twice again, the problem should be a bug[ patch 5256307 ].  Solution:----------------------------------------------------------------------------- Step1>update po's unit price to the price that it has been used by receiving; udate po_lines_all
set unit_price = 766.99
where po_line_id = 413817;

update po_line_locations_all
set price_override = 766.99
where po_line_id = 413817; Step2>return po line; Step3>update po's unit price to right price; It has been corrected on Purchase Order Form or updated by sql; update po_lines_all
set unit_price = 655.4615
where po_line_id = 413817;update po_line_locations_all
set price_override = 655.4615
where po_line_id = 413817; Step4>re-receive; ----------------------------------------------------------------------------   The following sql will be used to check this issue;============================================================================select ph.org_id,
       ph.segment1 po_number,
       pl.line_num,
       msi.segment1 item_number,
       rt.PRIMARY_QUANTITY quantity_received,
       pd.recovery_rate,
       pl.unit_price po_unit_price,
       rt.po_unit_price RCV_po_unit_price,
       ph.currency_code PO_currency_code,
       rt.currency_code RCV_currency_code,
       (select pla1.unit_price
          from po.po_lines_archive_all pla1
         where pl.po_line_id = pla1.po_line_id
           and pla1.latest_external_flag <> 'Y'
           and pla1.last_update_date in
               (select max(pla.last_update_date) last_update_date_max
                  from po.po_lines_archive_all pla
                 where pla1.po_line_id = pla.po_line_id
                   and pla.latest_external_flag <> 'Y')) PO_last_original_unit_price,
       (select pla1.unit_price
          from po.po_lines_archive_all pla1
         where pl.po_line_id = pla1.po_line_id
           and pla1.latest_external_flag = 'Y') po_now_unit_price,
       pv.vendor_name,
       pv.segment1 vendor_number
  from po.po_headers_all        ph,
       po.po_lines_all          pl,
       po.rcv_transactions      rt,
       po.po_line_locations_all pll,
       po.po_distributions_all  pd,
       inv.mtl_system_items_b   msi,
       po.po_vendors            pv
 where ph.org_id = 211
   and ph.po_header_id = pl.po_header_id
   and ph.po_header_id = rt.po_header_id
   and rt.po_line_id = pl.po_line_id
   and pl.po_line_id = pll.po_line_id
   and pll.line_location_id = pd.line_location_id
   and rt.source_document_code = 'PO'
   and rt.destination_type_code = 'RECEIVING'   and rt.organization_id = msi.organization_id
   and pl.item_id = msi.inventory_item_id
   and pv.vendor_id = ph.vendor_id
   and rt.po_unit_price <> pl.unit_price
   and rt.transaction_date >= sysdate - 30
   and not exists
 (select 'T'
          from po.rcv_transactions rt1
         where rt1.po_header_id = rt.po_header_id
           and rt1.destination_type_code = rt.destination_type_code
           and rt.transaction_id = rt1.parent_transaction_id)
   and not exists
 (select 'T'
          from po.rcv_transactions rt1
         where rt1.transaction_id = rt.parent_transaction_id
           and rt1.po_header_id = rt.po_header_id
           and rt1.destination_type_code = rt.destination_type_code)
 order by rt.transaction_date

聯繫我們

該頁面正文內容均來源於網絡整理,並不代表阿里雲官方的觀點,該頁面所提到的產品和服務也與阿里云無關,如果該頁面內容對您造成了困擾,歡迎寫郵件給我們,收到郵件我們將在5個工作日內處理。

如果您發現本社區中有涉嫌抄襲的內容,歡迎發送郵件至: info-contact@alibabacloud.com 進行舉報並提供相關證據,工作人員會在 5 個工作天內聯絡您,一經查實,本站將立刻刪除涉嫌侵權內容。

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.