



下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請進行舉報或認(rèn)領(lǐng)
文檔簡介
報表呈現(xiàn),查詢范圍:只考慮已審批且未完成全部收貨的生產(chǎn)訂單按款號匯總生產(chǎn)所需原材料匯總,出結(jié)果后可直接賦值至采購訂單進行采購,如涉及到多個供應(yīng)商,需進行刪減。復(fù)制到采購訂單后自動加載物料編碼、數(shù)量、單價代碼呈現(xiàn):(有自定義字段:t7.u_ClothType,刪除后可運行)selectt2.Itemcode,isnull(t0.Project,'未輸入')項目,t8.CardName,isnull(t7.u_ClothType,'未輸入')款號,t2.ItemName,t2.ItemCode,t2.ItemType,sum(t0.PlannedQty)生產(chǎn)數(shù)量,t2.InvntryUom物料單位,--isnull(t3.Quantity,0)物料計劃單位用量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0))物料計劃總用量,isnull(t4.onhand,0)庫存量,sum(isnull(t0.PlannedQty,0)*isnull(t3.Quantity,0)-isnull(t4.onhand,0)-t1.IssuedQty)需采購量合計,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))增購的損耗備用量,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,'未采購過')供應(yīng)商編碼,isnull(t6.CardName,'未采購過')供應(yīng)商名稱,isnull(cast(t6.Priceasvarchar),'未采購過')采購單價,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))采購金額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等.壓縮文件請下載最新的WinRAR軟件解壓。
- 2. 本站的文檔不包含任何第三方提供的附件圖紙等,如果需要附件,請聯(lián)系上傳者。文件的所有權(quán)益歸上傳用戶所有。
- 3. 本站RAR壓縮包中若帶圖紙,網(wǎng)頁內(nèi)容里面會有圖紙預(yù)覽,若沒有圖紙預(yù)覽就沒有圖紙。
- 4. 未經(jīng)權(quán)益所有人同意不得將文件中的內(nèi)容挪作商業(yè)或盈利用途。
- 5. 人人文庫網(wǎng)僅提供信息存儲空間,僅對用戶上傳內(nèi)容的表現(xiàn)方式做保護處理,對用戶上傳分享的文檔內(nèi)容本身不做任何修改或編輯,并不能對任何下載內(nèi)容負(fù)責(zé)。
- 6. 下載文件中如有侵權(quán)或不適當(dāng)內(nèi)容,請與我們聯(lián)系,我們立即糾正。
- 7. 本站不保證下載資源的準(zhǔn)確性、安全性和完整性, 同時也不承擔(dān)用戶因使用這些下載資源對自己和他人造成任何形式的傷害或損失。
最新文檔
- 2024-2025學(xué)年高中歷史課時作業(yè)27維新運動的興起新人教版選修1
- 中國蘆薈種植行業(yè)發(fā)展趨勢預(yù)測及投資戰(zhàn)略咨詢報告
- 2024-2025學(xué)年高中歷史第五章歐洲宗教改革章末優(yōu)化提升學(xué)案北師大版選修1
- 2024-2025學(xué)年新教材高中化學(xué)第四章物質(zhì)結(jié)構(gòu)元素周期律16原子結(jié)構(gòu)與元素周期表練習(xí)含解析新人教版必修第一冊
- 2024-2025學(xué)年高中生物課時作業(yè)九生物成分的分離與測定技術(shù)含解析蘇教版選修1
- 2024-2028年廢鋼行業(yè)調(diào)研及發(fā)展前景趨勢預(yù)測報告
- 2024年普通高等學(xué)校招生全國統(tǒng)一考試新課標(biāo)卷物理試題含答案
- 光通信器件項目的可行性分析報告
- 中國聚腺尿苷酸項目投資可行性研究報告
- 2025年中國自行發(fā)債市場深度調(diào)查及發(fā)展前景研究預(yù)測報告
- 領(lǐng)子的分類課件
- 農(nóng)產(chǎn)品的互聯(lián)網(wǎng)營銷課件
- 三年級下冊數(shù)學(xué)課件 兩位數(shù)除兩、三位數(shù) 滬教版 (共15張PPT)
- 《六大茶類》講義
- Unit 2 Listening and speaking 課件-高中英語人教版(2019)選擇性必修第二冊
- X會計師事務(wù)所的J城投公司發(fā)債審計項目研究
- 中國傳媒大學(xué)全媒體新聞編輯:案例教學(xué)-課件-全媒體新聞編輯:案例教學(xué)-第7講
- 生理學(xué)泌尿系統(tǒng)6學(xué)時課件
- 數(shù)據(jù)結(jié)構(gòu)英文教學(xué)課件:chapter1 Introduction
- 人教三年級數(shù)學(xué)下冊表格式全冊
- 優(yōu)秀教研組評比制度及實施細(xì)則
評論
0/150
提交評論