|
我们这边用的是R11 ,我们被Cancel 或 Final close 的PO,是可以被修改回来的,
OK的话回复我一下啊!
Question : 已收料,财务已立帐, PO被Cancel
Answer :
PO每一筆收料,都會自動新增一筆暫估應付帳款會計科目的記錄,如財務Match PO後,自動會進行反沖,借:應付帳款 貸: 暫估應付帳款,沖銷。如有PO退料,系統也會自動立帳沖銷對應的暫估應付帳款,因PO被Cancel 前,PO沒退料處理,暫款應會帳款裡會有關於此PO的一筆,不能消除。
重啟被Cancel PO,退還供應商相應收料數量,再Cancel PO
sselect
*
from po.po_headers_all pha
where pha.SEGMENT1='3307060102'
or pha.SEGMENT1='3307060103'
--ÁÙ ìPo_HEADERS_ALL Table ¤¤¦³ÃöPO Header ª¬ºA«H®§
-- update po.po_headers_all pha
set pha.CLOSED_DATE=null,
-- Cancel ¨S¦³Ãö³¬®É¶¡ ??
pha.CANCEL_FLAG=null,
pha.CLOSED_CODE='OPEN'
-- Cancel PO «áPOª¬ºA¬°OPen ??
where pha.PO_HEADER_ID=214133
commit
select
*
from po.po_lines_all pla
where pla.PO_HEADER_ID='214133'
or pla.PO_HEADER_ID='214208'
--¥Ñ©ó³¡¤À¦¬®Æ«á³QCancel ªÌ¨äLine ¤§Qty ·|´î¤Ö¡A»Ý nÁ٠즨 ìPOªº¼Æ¶q
update po.po_lines_all pla
set pla.QUANTITY=2,
pla.CANCEL_FLAG=null,
pla.CANCELLED_BY=null,
pla.CANCEL_DATE=null,
pla.CANCEL_REASON=null
where
pla.PO_LINE_ID=272972
commit
select
*
from po.po_line_locations_all plla
where
plla.PO_LINE_ID='272972'
--plla.PO_HEADER_ID='214133' and
--±NShiipment ¤¤°O¿ýªºCancel ªº¼Æ¶qÁ٠즨0
update
po.po_line_locations_all
plla
set plla.QUANTITY_CANCELLED=0,
plla.CANCELLED_BY=null,
plla.CANCEL_DATE=null,
plla.CANCEL_FLAG=null,
plla.CANCEL_REASON=null,
plla.CLOSED_BY=null,
plla.CLOSED_CODE='OPEN'
where plla.LINE_LOCATION_ID=268399
--plla.PO_HEADER_ID='214133' and plla.PO_LINE_ID='272972'
select
*
from po.po_distributions_all pda
where
pda.LINE_LOCATION_ID='268399'
--pda.PO_HEADER_ID='214133' and pda.PO_LINE_ID='272972' and
--±NDistribution ¤¤°O¿ýCancel ªº¼Æ¶qÁ٠즨0
update po.po_distributions_all pda
set pda.QUANTITY_CANCELLED=0,
pda.GL_CANCELLED_DATE=null
where
pda.LINE_LOCATION_ID='268399'
commit
--pda.PO_HEADER_ID='214133' and pda.PO_LINE_ID='272972' and
select
*
from po.po_action_history pah
where
pah.OBJECT_ID='214133'
and pah.OBJECT_TYPE_CODE='PO'
and pah.ACTION_CODE='CANCEL'
--§R°£PO Cancel History
delete po.po_action_history pah
where
pah.OBJECT_ID='214133'
and pah.OBJECT_TYPE_CODE='PO'
and pah.ACTION_CODE='CANCEL' |
|