下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡(jiǎn)介
報(bào)表呈現(xiàn),查詢范圍:只考慮已審批且未完成全部收貨的生產(chǎn)訂單按款號(hào)匯總生產(chǎn)所需原材料匯總,出結(jié)果后可直接賦值至采購(gòu)訂單進(jìn)行采購(gòu),如涉及到多個(gè)供應(yīng)商,需進(jìn)行刪減。復(fù)制到采購(gòu)訂單后自動(dòng)加載物料編碼、數(shù)量、單價(jià)代碼呈現(xiàn):(有自定義字段:t7.u_ClothType,刪除后可運(yùn)行)selectt2.Itemcode,isnull(t0.Project,'未輸入')項(xiàng)目,t8.CardName,isnull(t7.u_ClothType,'未輸入')款號(hào),t2.ItemName,t2.ItemCode,t2.ItemType,sum(t0.PlannedQty)生產(chǎn)數(shù)量,t2.InvntryUom物料單位,--isnull(t3.Quantity,0)物料計(jì)劃單位用量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0))物料計(jì)劃總用量,isnull(t4.onhand,0)庫存量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)-t1.IssuedQty)需采購(gòu)量合計(jì),t5.ItmsGrpNam,sum(isnull(case whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=50thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.09 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>50andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.06 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.04 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.03 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.01end,0))增購(gòu)的損耗備用量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)-t1.IssuedQty+isnull((case whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=50thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.09 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>50andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.06 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.04 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.03 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.01end),0))數(shù)量,isnull(t6.CardCode,'未采購(gòu)過')供應(yīng)商編碼,isnull(t6.CardName,'未采購(gòu)過')供應(yīng)商名稱,isnull(cast(t6.Priceasvarchar),'未采購(gòu)過')采購(gòu)單價(jià),sum(isnull(t6.Price*(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)+isnull((case whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=50thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.09 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>50andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.06 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.04 whent2.ItmsGrpCod='102'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=200thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.03 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>200andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)<=500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.02 whent2.ItmsGrpCod='103'andisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)>500thenisnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)*0.01end),0)),0))采購(gòu)金額fromOWORt0innerjoinWOR1t1ont0.DocEntry=t1.DocEntryinnerjoinOITMt7ont0.ItemCode=t7.ItemCodeinnerjoinOITMt2ont1.ItemCode=t2.ItemCodeinnerjoin(selectz0.Codefather,z1.Code,z1.QuantityfromOITTz0 innerjoinITT1z1onz0.Code=z1.Father)t3ont3.father=t0.ItemCodeandt3.Code=t1.ItemCodeleftjoin(selectItemCode,sum(onhand)onhandfromOITWx0 wherex0.WhsCodenotin('104','105')groupbyItemCode)t4ont1.ItemCode=t4.ItemCodeinnerjoinOITBt5ont2.ItmsGrpCod=t5.ItmsGrpCodleftjoin(selectc0.CardCode,c0.CardName,c1.Price,c1.ItemCodefromOPORc0 innerjoinPOR1c1onc0.DocEntry=c1.DocEntry innerjoin( selectc0.CardCode,c0.CardName,c1.ItemCode,MAX(c0.DocEntry)DocEntryfromOPORc0 innerjoinPOR1c1onc0.DocEntry=c1.DocEntry --wherec1.ItemCode='Z000815' groupbyc0.CardCode,c0.CardName,c1.ItemCode )cc0oncc0.DocEntry=c0.DocEntryandcc0.CardCode=c0.CardCodeandcc0.CardName=c0.CardNameandcc0.ItemCode=c1.ItemCode )t6ont6.ItemCode=t1.ItemCodeleftjoinOQUTt8ont0.U_SCXQ=t8.DocEntrywheret0.PlannedQty>t0.CmpltQtyandt0.Status='R'and(t0.DocEntry=[%0]or[%0]='')and(t0.ItemCode='[%1]'or'[%1]'='')and(t2.ItemNamelike'%[%2]%'or'[%2]'='')and(t0.postDate>='[%3]'or'[%3]'='')and(t0.postDate<='[%4]'or'[%4]'='')and(t0.Project='[%5]'or'[%5]'='')and(t8.CardNa
溫馨提示
- 1. 本站所有資源如無特殊說明,都需要本地電腦安裝OFFICE2007和PDF閱讀器。圖紙軟件為CAD,CAXA,PROE,UG,SolidWorks等.壓縮文件請(qǐng)下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請(qǐng)聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會(huì)有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲(chǔ)空間,僅對(duì)用戶上傳內(nèi)容的表現(xiàn)方式做保護(hù)處理,對(duì)用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對(duì)任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請(qǐng)與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時(shí)也不承擔(dān)用戶因使用這些下載資源對(duì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 企業(yè)信息管理與數(shù)據(jù)安全工具集
- 輕奢品牌質(zhì)量承諾書9篇范文
- 企業(yè)年度計(jì)劃預(yù)算制定與管理工具
- 2026浙江寧波市象山縣高層次緊缺人才選聘40人重點(diǎn)基礎(chǔ)提升(共500題)附帶答案詳解
- 2026浙江嘉興海鹽縣供銷合作總社招聘下屬單位人員1人易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 2026浙江臺(tái)州市黃巖站場(chǎng)管理服務(wù)限公司招聘5人易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 2026浙江云和縣國(guó)企業(yè)招聘19人易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 2026濟(jì)南市環(huán)保局事業(yè)單位公開招聘擬聘用人員易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 2026河南許昌市資產(chǎn)管理限公司招聘50人易考易錯(cuò)模擬試題(共500題)試卷后附參考答案
- 2026河南洛陽汝陽縣委巡察辦數(shù)據(jù)信息中心選聘重點(diǎn)基礎(chǔ)提升(共500題)附帶答案詳解
- 部編人教版 語文 六年級(jí)下冊(cè) 電子書
- DL-T-5728-2016水電水利工程控制性灌漿施工規(guī)范
- 鋼管支架貝雷梁拆除施工方案
- JJG 365-2008電化學(xué)氧測(cè)定儀
- 2024年新安全生產(chǎn)法培訓(xùn)課件
- 卷閘門合同書
- 煤礦運(yùn)輸知識(shí)課件
- 人口信息查詢申請(qǐng)表(表格)
- 一年級(jí)上冊(cè)數(shù)學(xué)期末質(zhì)量分析報(bào)告
- 公共視頻監(jiān)控系統(tǒng)運(yùn)營(yíng)維護(hù)要求
- 教育科學(xué)規(guī)劃課題中期報(bào)告 (雙減背景下家校共育策略研究)
評(píng)論
0/150
提交評(píng)論