K3 單據,單據體自定義字段顯示及時庫存


--1、解決了顯示可發數量的單據,且已經審核的單據,庫存數據更新后,單據上的可發數量隨庫存變化,現在能實現當時的可發數量和件數保存到單據中
--2、解決了負庫存數據顯示為0的問題
--2011.09.28 by 申憲峰

--更改顯示現庫存和可發件數的單據模板的取數方式 
--領料單
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='B04' and ffieldname='FEntrySelfB0426'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='B04' and ffieldname='FEntrySelfB0427'

--產成品入庫
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='A02' and ffieldname='FEntrySelfA0225'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='A02' and ffieldname='FEntrySelfA0226'

--其他入庫
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='A97' and ffieldname='FEntrySelfA9726'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='A97' and ffieldname='FEntrySelfA9727'

--其他出庫
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='B09' and ffieldname='FEntrySelfB0924'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='B09' and ffieldname='FEntrySelfB0925'

--銷售訂單
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='S01' and ffieldname='FEntrySelfS0133'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='S01' and ffieldname='FEntrySelfS0134'

--發貨通知單
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='S02' and ffieldname='FEntrySelfS0218'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='S02' and ffieldname='FEntrySelfS0221'

--采購申請單
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='P01' and ffieldname='FEntrySelfP0118'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='P01' and ffieldname='FEntrySelfP0119'

--采購訂單
update ictemplateentry set frelationid='fitemid',faction='.,f_104' where fid='P02' and ffieldname='FEntrySelfP0223'
update ictemplateentry set frelationid='fitemid',faction='.,f_105' where fid='P02' and ffieldname='FEntrySelfP0226'

 -采購申請單,上限,下限,到貨周期
select * from ictemplateentry where fid='p01'

update ictemplateentry set frelationid='fitemid',faction='.,FLOWLIMIT' where fid='P01' and ffieldname='FEntrySelfP0116'
update ictemplateentry set frelationid='fitemid',faction='.,FHIGHLIMIT' where fid='P01' and ffieldname='FEntrySelfP0117'
update ictemplateentry set frelationid='fitemid',faction='.,FFIXLEADTIME' where fid='P01' and ffieldname='FEntrySelfP0120'

--采購訂單,上限,下限,計划單價
select * from ictemplateentry where fid='p02'

update ictemplateentry set frelationid='fitemid',faction='.,FLOWLIMIT' where fid='P02' and ffieldname='FEntrySelfP0224'
update ictemplateentry set frelationid='fitemid',faction='.,FHIGHLIMIT' where fid='P02' and ffieldname='FEntrySelfP0225'
update ictemplateentry set frelationid='fitemid',faction='.,FPLANPRICE' where fid='P02' and ffieldname='FEntrySelfP0227'

--購貨發票,計划單價
select * from ictemplateentry where fid='I02'
update ictemplateentry set frelationid='fitemid',faction='.,FPLANPRICE' where fid='I02' and ffieldname='FEntrySelfI0231'


免責聲明!

本站轉載的文章為個人學習借鑒使用,本站對版權不負任何法律責任。如果侵犯了您的隱私權益,請聯系本站郵箱yoyou2525@163.com刪除。



 
粵ICP備18138465號   © 2018-2025 CODEPRJ.COM