下載本文檔
版權(quán)說明:本文檔由用戶提供并上傳,收益歸屬內(nèi)容提供方,若內(nèi)容存在侵權(quán),請(qǐng)進(jìn)行舉報(bào)或認(rèn)領(lǐng)
文檔簡介
報(bào)表呈現(xiàn),查詢范圍:只考慮已審批且未完成全部收貨的生產(chǎn)訂單按款號(hào)匯總生產(chǎn)所需原材料匯總,出結(jié)果后可直接賦值至采購訂單進(jìn)行采購,如涉及到多個(gè)供應(yīng)商,需進(jìn)行刪減。復(fù)制到采購訂單后自動(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)需采購量合計(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))增購的損耗備用量,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),'未采購過')采購單價(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))采購金額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ì)自己和他人造成任何形式的傷害或損失。
最新文檔
- 2025年度智慧城市運(yùn)營管理出資合同4篇
- 二零二五年度危險(xiǎn)品運(yùn)輸合同框架協(xié)議2篇
- 二零二五年度寵物活體活體領(lǐng)養(yǎng)援助合同4篇
- 二零二五年度彩鋼復(fù)合板制造與銷售合作協(xié)議3篇
- 2025年度藝術(shù)衍生品設(shè)計(jì)制作服務(wù)協(xié)議4篇
- 二零二五年度電子商務(wù)平臺(tái)安全保障合同
- 2025年二零二五年度環(huán)保瀝青混凝土供應(yīng)合同3篇
- 2025版廢棄電池回收處理設(shè)施承包運(yùn)營合同3篇
- 二零二五年昆山辦公樓物業(yè)費(fèi)標(biāo)準(zhǔn)與設(shè)施維護(hù)升級(jí)合同3篇
- 2025版別墅室內(nèi)裝飾合同含智能家居系統(tǒng)定制與施工6篇
- 【社會(huì)工作介入精神障礙社區(qū)康復(fù)問題探究的文獻(xiàn)綜述5800字】
- 節(jié)前停工停產(chǎn)與節(jié)后復(fù)工復(fù)產(chǎn)安全注意事項(xiàng)課件
- 設(shè)備管理績效考核細(xì)則
- 中國人民銀行清算總中心直屬企業(yè)2023年招聘筆試上岸歷年典型考題與考點(diǎn)剖析附帶答案詳解
- (正式版)SJT 11449-2024 集中空調(diào)電子計(jì)費(fèi)信息系統(tǒng)工程技術(shù)規(guī)范
- 人教版四年級(jí)上冊加減乘除四則混合運(yùn)算300題及答案
- 合成生物學(xué)技術(shù)在生物制藥中的應(yīng)用
- 消化系統(tǒng)疾病的負(fù)性情緒與心理護(hù)理
- 高考語文文學(xué)類閱讀分類訓(xùn)練:戲劇類(含答案)
- 協(xié)會(huì)監(jiān)事會(huì)工作報(bào)告大全(12篇)
- WS-T 813-2023 手術(shù)部位標(biāo)識(shí)標(biāo)準(zhǔn)
評(píng)論
0/150
提交評(píng)論