當(dāng)前位置:財(cái)稅問(wèn)題 >
實(shí)務(wù)
問(wèn)題已解決
老師,金碟K3的現(xiàn)金流量表如何核對(duì)正確還是錯(cuò)誤



自從用了K/3的現(xiàn)金流量表,財(cái)務(wù)出報(bào)表時(shí)經(jīng)常發(fā)現(xiàn)K/3的現(xiàn)金流量表余額與科目余額表現(xiàn)金類科目的余額總和不相等,??在T型賬戶上檢查只能檢查到一些比較明顯的問(wèn)題,一些細(xì)節(jié)問(wèn)題還是檢查不出來(lái),有時(shí)一個(gè)細(xì)節(jié)的問(wèn)題要查找一兩天,比較典型的兩個(gè)問(wèn)題是:1.在流量指定界面,[對(duì)方分錄科目]列出現(xiàn)空白行 2.還是在流量指定界面,[本位幣]列的余額不等于上方現(xiàn)金科目的金額.經(jīng)過(guò)多賬套的測(cè)試,可以肯定的講,這是系統(tǒng)的BUG.目前用V12.1,希望下一個(gè)版本此問(wèn)題能得以解決.為了方便財(cái)務(wù)部同事能自己查找原因,寫了SQL代碼輔助找原因,取數(shù)原理是將現(xiàn)金流量表的收入-支出的值與憑證的現(xiàn)金類科目的借方-貸方的值作差異比較.代碼與效果圖如下:
--以下代碼是針對(duì)現(xiàn)金流量表主表
create?proc [dbo].[現(xiàn)金流量表故障分析表]
@FYear int,
@FPeriod int
as
select b.FNumber as 憑證號(hào),FAmount1 流量表金額,FAmount2 憑證金額,FAmount1-FAmount2 差額
from (
??select d.FName+-+ltrim(b.FNumber) FNumber,
????sum(case
??????when c.FNumber like CI[1-4].01% then a.famount
??????when c.FNumber like CI[1-4].02% then -a.famount
??????else 0
??????end) FAmount1
??from t_CashFlowBal a
????join t_Voucher b on a.FVoucherID=b.FVoucherID and a.FItemID>0
????join t_Item c on a.FItemID=c.FItemID and c.FItemClassID=9
????join t_VoucherGroup d on b.FGroupID=d.FGroupID
??where?b.FYear=@FYear?and?b.FPeriod=@FPeriod
??group by b.FNumber,d.FName
??) a
??right join (
????select d.FName+-+ltrim(a.FNumber) FNumber,
??????sum(case b.FDC when 1 then b.FAmount else -b.FAmount end) FAmount2
????from t_Voucher a
??????join t_VoucherEntry b on a.FVoucherID=b.FVoucherID
??????join t_VoucherGroup d on a.FGroupID=d.FGroupID
????where?a.FYear=@FYear?and?a.FPeriod=@FPeriod
????and b.FAccountID IN(select FAccountID from t_Account where??(FIsCash=1 or FIsBank=1 or FIsCashFlow=1) and FDetail=1)
????group by a.FNumber,d.FName
????) b
??????on a.FNumber=b.FNumber
where isnull(FAmount1,FAmount2)<>0
union all
select 合計(jì),FAmount1 流量表金額,FAmount2 憑證金額,FAmount1-FAmount2 差額
from (
??select
????sum(case
??????when c.FNumber like CI[1-4].01% then a.famount
??????when c.FNumber like CI[1-4].02% then -a.famount
??????else 0
??????end) FAmount1
??from t_CashFlowBal a
????join t_Voucher b on a.FVoucherID=b.FVoucherID and FItemID>0
????join t_Item c on a.FItemID=c.FItemID and c.FItemClassID=9
??where?b.FYear=@FYear?and?b.FPeriod=@FPeriod
??) a
??cross join (
????select
??????sum(case b.FDC when 1 then b.FAmount else -b.FAmount end) FAmount2
????from t_Voucher a
??????join t_VoucherEntry b on a.FVoucherID=b.FVoucherID
????where?a.FYear=@FYear?and?a.FPeriod=@FPeriod
????and b.FAccountID IN(select FAccountID from t_Account where??(FIsCash=1 or FIsBank=1 or FIsCashFlow=1) and FDetail=1)
????) b
GO
2022 02/17 14:29

84785016 

2022 02/17 14:33
看不懂啊

玲老師 

2022 02/17 14:43
可以看報(bào)表的關(guān)系也能判斷??
一、現(xiàn)金流量表與資產(chǎn)負(fù)債表、利潤(rùn)表相關(guān)項(xiàng)目的勾稽關(guān)系:
資產(chǎn)負(fù)債表“貨幣資金”項(xiàng)目期末與期初差額,與現(xiàn)金流量表“現(xiàn)金及現(xiàn)金等價(jià)物凈增加”勾稽關(guān)系是否合理。
一般企業(yè)的“現(xiàn)金及現(xiàn)金等價(jià)物”所包括的內(nèi)容大多與“貨幣資金”口徑一致;銷售商品、提供勞務(wù)收到現(xiàn)金≈(主營(yíng)業(yè)務(wù)收入+其他業(yè)務(wù)收入)×(1+17%)+預(yù)收賬款增加額-應(yīng)收賬款增加額-應(yīng)收票據(jù)增加額;購(gòu)買商品、接受勞務(wù)支付現(xiàn)金≈(主營(yíng)業(yè)務(wù)成本+其他業(yè)務(wù)成本+存貨增加額)×(1+17%)+預(yù)付賬款增加額-應(yīng)付賬款增加額-應(yīng)付票據(jù)增加額。
利潤(rùn)及利潤(rùn)分配表中“未分配利潤(rùn)”項(xiàng)目與資產(chǎn)負(fù)債表“未分配利潤(rùn)”項(xiàng)目數(shù)據(jù)勾稽關(guān)系是否恰當(dāng)。注意利潤(rùn)及利潤(rùn)分配表中,“年初未分配利潤(rùn)”項(xiàng)目“本年累計(jì)數(shù)”欄的數(shù)額應(yīng)等于“未分配利潤(rùn)”項(xiàng)目“上年數(shù)”欄的數(shù)額,應(yīng)等于資產(chǎn)負(fù)債表“未分配利潤(rùn)”項(xiàng)目的期初數(shù)、
二、資產(chǎn)負(fù)債表與利潤(rùn)表間勾稽關(guān)系:
利潤(rùn)及利潤(rùn)分配表中“未分配利潤(rùn)”項(xiàng)目與資產(chǎn)負(fù)債表“未分配利潤(rùn)”項(xiàng)目數(shù)據(jù)勾稽關(guān)系是否恰當(dāng)。
注意利潤(rùn)及利潤(rùn)分配表中,“年初未分配利潤(rùn)”項(xiàng)目“本年累計(jì)數(shù)”欄的數(shù)額應(yīng)等于“未分配利潤(rùn)”項(xiàng)目“上年數(shù)”欄的數(shù)額,應(yīng)等于資產(chǎn)負(fù)債表“未分配利潤(rùn)”項(xiàng)目的期初數(shù)。
三、現(xiàn)金流量表與資產(chǎn)負(fù)債表、利潤(rùn)表相關(guān)項(xiàng)目的勾稽關(guān)系:
資產(chǎn)負(fù)債表“貨幣資金”項(xiàng)目期末與期初差額,與現(xiàn)金流量表“現(xiàn)金及現(xiàn)金等價(jià)物凈增加”勾稽關(guān)系是否合理。
一般企業(yè)的“現(xiàn)金及現(xiàn)金等價(jià)物”所包括的內(nèi)容大多與“貨幣資金”口徑一致;
銷售商品、提供勞務(wù)收到現(xiàn)金≈(主營(yíng)業(yè)務(wù)收入+其他業(yè)務(wù)收入)×(1+17%)+預(yù)收賬款增加額-應(yīng)收賬款增加額-應(yīng)收票據(jù)增加額;購(gòu)買商品、接受勞務(wù)支付現(xiàn)金≈(主營(yíng)業(yè)務(wù)成本+其他業(yè)務(wù)成本+存貨增加額)×(1+17%)+預(yù)付賬款增加額-應(yīng)付賬款增加額-應(yīng)付票據(jù)增加額。
