//check 生产销售成本和利润表开始
let &By=Getint("请输入要审核产品生产销售成本和利润表的月份!")
Open Report "d:\批处理审核\13主要产品单位成本明细一采.rep"
Data
Find For 月=&by
Let &BYSC1 =E6 //取1采本月生产
Let &BNSC1 =E8 //取1采本年生产
let &BYXS1 =J5 //取1采本月销售
let &BNXS1 =J7 //取1采本年销售
Let &BYKC1 =O5 //取1采本月库存
close
Open Report "d:\批处理审核\13主要产品单位成本明细二采.rep"
Data
Find For 月=&by
Let &BYSC2 =E6 //2采本月生产
Let &BNSC2 =E8 //2采本年生产
let &BYXS2 =J5 //2采本月销售
let &BNXS2 =J7 //2采本年销售
Let &BYKC2 =O5 //2采本月库存
close
Open Report "d:\批处理审核\10产品生产成本.rep"
Data
Find For 月=&by
Let &BYCB =D27 //取本月生产成本
Let &BNCB =E27 //取本年生产成本
close
Open Report "d:\批处理审核\利润表.rep"
Data
Find For 月=&by
Let &XSSR =C6 //取本月销售收入
Let &XSSJ =C11 //取本月销售税金
Let &XSCB =C9 //取本月主营业务成本
Let &XSFY =C12 //取本月销售费用
Let &XSLR =G5 //取本月销售利润
close
Open Report "d:\批处理审核\11产品生产销售利润表.rep"
Data
Find For 月=&by
Let &Str=""
if E7<>&BYSC1+&BYSC2
Let &Str=&Str+"本月生产数<>一采加二采"
end
if F7<>&BNSC1+&BNSC2
Let &Str=&Str+"本年生产数<>一采加二采"
end
if G7<>&BYXS1+&BYXS2
Let &Str=&Str+"本月销售数<>一采加二采"
end
if I7<>&BNXS1+&BNXS2
Let &Str=&Str+"本年销售数<>一采加二采"
end
if N15<>&BYCB
Let &Str=&Str+"本月成本<>产品生产成本相关数字"
end
if O15<>&BNCB
Let &Str=&Str+"本年成本<>产品生产成本相关数字"
end
if C23<>&XSSR
Let &Str=&Str+"本月销售收入<>利润表"
end
if E23<>&XSSJ
Let &Str=&Str+"本月销售税金<>利润表"
end
if G23<>&XSCB
Let &Str=&Str+"本月销售成本<>利润表"
end
if I23<>&XSFY
Let &Str=&Str+"本月销售费用<>利润表"
end
if L23<>&XSLR
Let &Str=&Str+"本月销售利润<>利润表"
end
close
if &str=""
Let &Str="产品生产销售成本和利润表已合部审核通过没有错误!"
end
Disp &Str
Free All
//check 基本情况表结束