热门关键词用友NC 用友U8 用友U9 T+ 好业财 T3 好会计

    详细信息

    您现在的位置:网站首页 >> 百科问答 >> 详细信息

    T+13.0 手工填制出库调整单,凭证生成,但存货明细账中没有出库调整单记录

    发布时间:2024-6-17  

    特价活动:>>>> 畅云管家新购、续费7折优惠,畅捷通T+cloud、好会计、易代账、好业财、好生意云产品8折优惠 

    问题描述:

    手工填制出库调整单,凭证生成,但存货明细账中没有出库调整单记录。


    问题回复:

    备份数据。 执行脚本补调整单。 

    INSERT INTO ST_SubsidiaryBook ( voucherCode, idvouchertype, voucherID, voucherdate, voucherDetailID, idinventory, idwarehouse, batch, idbaseunit, idsubunit, isInStock, isRedVoucher, accountDate, isPeriodInit, backVoucher, accountYear, accountPeriod, AccountYearPeriod, iscarriedforwardin, iscarriedforwardout, inAmount, outAmount, isTrueAccount, idvouchertypeflowunite, voucherIDFlowUnite, voucherCodeFlowUnite, voucherDetailIDFlowUnite, createdtime, AccountTime, isAdjustVoucher, isManual ) SELECT v.code, v.idvouchertype, v.id, v.voucherdate, detail.id, detail.idinventory, detail.idwarehouse, detail.batch, detail.idBaseUnit, detail.idSubUnit, CASE WHEN vt.code = N'ST2004' THEN 1 ELSE 0 END, 0, v.voucherdate, 0, 0, period.currentyear, period.currentperiod, (CAST(period.currentyear AS CHAR(4)) + (CASE WHEN LEN(period.currentperiod) = 2 THEN CAST(period.currentperiod AS CHAR(2)) ELSE N'0' + STR(period.currentperiod, 1, 0) END ) ), v.iscarriedforwardin, v.iscarriedforwardout, CAST(CASE WHEN vt.code = N'ST2004' THEN detail.amount ELSE NULL END AS DECIMAL(28, 2)), CAST(CASE WHEN vt.code = N'ST2005' THEN detail.amount ELSE NULL END AS DECIMAL(28, 2)), 1, v.idvouchertype, v.id, v.code, detail.id, v.createdtime, detail.AccountTime, 1, 0 FROM ST_AdjustCostVoucher v LEFT JOIN ST_AdjustCostVoucher_b detail ON v.id = detail.idAdjustCostVoucherDTO LEFT JOIN SM_Period period ON v.voucherdate BETWEEN period.begindate AND period.enddate LEFT JOIN AA_Inventory Inventory ON detail.idinventory = Inventory.id LEFT JOIN SM_VoucherType vt ON vt.ID = v.idvouchertype LEFT JOIN eap_EnumItem pricemode ON Inventory.valueType = pricemode.ID LEFT JOIN eap_EnumItem adjustflag ON detail.adjustFlag = adjustflag.ID LEFT JOIN AA_Warehouse Warehouse ON detail.idwarehouse = Warehouse.id LEFT JOIN AA_InventoryClass InventoryClass ON Inventory.idinventoryclass = InventoryClass.id WHERE v.voucherState = N'189' AND 1 = 1 AND v.voucherdate >= N'2019-12-01' AND adjustflag.Code IN ( N'01', N'02', N'03' ) AND NOT EXISTS ( SELECT id FROM ST_SubsidiaryBook WHERE ST_SubsidiaryBook.idvouchertype = v.idvouchertype AND ST_SubsidiaryBook.voucherID = v.id AND ST_SubsidiaryBook.voucherDetailID = detail.id ); EXEC dbo.SCM_SP_RebuildSummarybook


     

     

    上一篇:T+13.0 单据编码设置

    客服电话:400-665-0028

    关键字:用友财务软件,畅捷通软件,财务软件,进销存软件,U9官网,用友U8,用友T1,用友T+,用友T3,用友T6,畅捷通好会计,好生意,智+好业财,用友培训服务售后公司,畅捷通运营培训服务公司

    版权所有:用友畅捷通软件 Copyright © 2025 All rights reserved.

    鲁ICP备2020041017号-6