您当前的位置: 首页 > 

[易飞]销售成本分析

发布时间:2011-02-23 17:00:00 ,浏览量:0

抓已开票的销货单和退货单 关联INVLA抓取相关的数据

/*
*用途:统计销售实际 已开票抓INVLA档抓成本
*作者:龚德辉
*日期:2010-05--23
*/

CREATE Procedure UP_SALRealyCost
(
  @year as char(4)='2010'
)
as
begin 
declare  @plan Table
(
   type nvarchar(20)
  ,area nvarchar(20)
  ,sort int
  ,acct_month1 decimal(18,9)
  ,acct_month2 decimal(18,9)
  ,acct_month3 decimal(18,9)
  ,acct_month4 decimal(18,9)
  ,acct_month5 decimal(18,9)
  ,acct_month6 decimal(18,9)
  ,acct_month7 decimal(18,9)
  ,acct_month8 decimal(18,9)
  ,acct_month9 decimal(18,9)
  ,acct_month10 decimal(18,9)
  ,acct_month11 decimal(18,9)
  ,acct_month12 decimal(18,9)
)
  declare @account as decimal(18,9),@date as nvarchar(8),@type as nvarchar(20),@area as nvarchar(20),@sort as int ,@newyear as nvarchar(6),@curryear as nvarchar(4) 
  set @newyear=@year+substring(convert(varchar(10),getdate(),120),6,2)--当前年月
  set @curryear=d
关注
打赏
1688896170
查看更多评论

暂无认证

  • 0浏览

    0关注

    103104博文

    0收益

  • 0浏览

    0点赞

    0打赏

    0留言

私信
关注
热门博文
立即登录/注册

微信扫码登录

0.0477s