用友T3/T+實(shí)施+售后打包價(jià)4折優(yōu)惠_十幾年行業(yè)技術(shù)值得信賴
T3批次結(jié)存表和庫存臺(tái)賬和現(xiàn)存量數(shù)量不一致
1、確認(rèn)正確數(shù)量 查詢st_totalaccount
2、查表 mainbatch 里對(duì)應(yīng)收發(fā)存匯總表的ID
mainbatch里isnull代表此批次是否已經(jīng)出完、
查詢總的出庫和入庫數(shù)量
-------------------------------------------------------------------------------
select case a.bRdFlag when 1 then ‘入庫’ when 0 then ‘出庫’ end ,
sum(b.iquantity) from rdrecord a
left join rdrecords b
on a.id=b.id
where b.cinvcode=‘0101039’ and b.cbatch=’/’
group by a.brdflag
更改有期初余額的數(shù)量、iSoutQuantity 代表累計(jì)出庫數(shù)量
select b.cInvcode,b.cBatch,b.iQuantity,b.iSoutQuantity
from rdrecord a
left join rdrecords b
on a.id=b.id
where b.cInvcode=‘0101039’ and a.bRdflag=‘1’
3、批次主文件 自動(dòng)ID -mainbatch.autoid=rdrecords.autoid
收發(fā)存匯總表ID關(guān)聯(lián)- rdrecord.id=rdrecords.id
4、找到對(duì)應(yīng)收發(fā)存匯總表ID和批次主文件ID
更改rdrecords字段 isoutquantity(累計(jì)出庫數(shù)量)為正確出庫數(shù)量
5、查詢批次結(jié)存表、臺(tái)賬、現(xiàn)存量。