固定资产自动计算已计提月份 【字体:小 大】
固定资产自动计算已计提月份
作者:佚名 文章来源:本站原创 点击数:26 更新时间:2008-6-19
自动编号: 18956 产品版本: 76-47
产品模块: 3-通用 所属行业: 0-用友通标准版10.3
开放状态: 2-UU会员 关 键 字: 自动计算已计提月份
适用产品: 补 丁 号:
问题名称: 根据"开始使用日期"和"录入日期"自动计算已计提月份
问题现象: 用通10.3系统工具导入固定资产卡片,在EXCEL表格输了"开始使用日期"和"录入日期",顺利导入到固定资产系统中了,可是"已计提月份"没法根据"开始使用日期"和"录入日期"进行自动计算获得,而显示的是"0",必须在原始卡片中删掉"开始使用日期"重新录入就可自动计算已计提月份,由于原始卡片数量巨大,请问有没办法自动根据录入的"开始使用日期"和"录入日期"计算出已计提月份"
原因分析: 执行以下脚本;
update fa_cards set lUsedMonths=year(dInputdate)*12+month(dInputdate)-(year(dStartdate)*12+month(dStartdate))-1
update fa_cards set lUsedMonths=0 where lUsedMonths<0
update fa_deprTransactions set fa_deprTransactions.lDeprMonths4=fa_cards.lUsedMonths,fa_deprTransactions.lUsedMonths4=fa_cards.lUsedMonths,
fa_deprTransactions.lInputDeprMonths=fa_cards.lUsedMonths
from fa_deprTransactions,fa_cards where fa_deprTransactions.sCardNum=fa_cards.sCardNum
解决方案: 执行以下脚本;
update fa_cards set lUsedMonths=year(dInputdate)*12+month(dInputdate)-(year(dStartdate)*12+month(dStartdate))-1
update fa_cards set lUsedMonths=0 where lUsedMonths<0
update fa_deprTransactions set fa_deprTransactions.lDeprMonths4=fa_cards.lUsedMonths,fa_deprTransactions.lUsedMonths4=fa_cards.lUsedMonths,
fa_deprTransactions.lInputDeprMonths=fa_cards.lUsedMonths
from fa_deprTransactions,fa_cards where fa_deprTransactions.sCardNum=fa_cards.sCardNum