计算列内容如下:
db_data2("select real_price From t_cg_in_detail where sheet_no in (select max(sheet_no) from t_cg_in_detail group by item_no) and item_no=?",item_no)
【官方】A5怎么在单据中取商品最近一次的入库价?
- 提问者: ytkf007
- 等级:问不倒翁
- 时间:2012-05-07 17:18
- 悬赏:0
- 解决时间:2012-05-07 17:38
最佳答案
哦
- 回答者:wangze2005
- 等级:问不倒翁
- 时间:2012-05-07 17:32
- 提问者对最佳回答的评论:
- 用这个可以取所有机构的最后一次进价:string(real(db_data3(~"select real_price From t_cg_in_detail where sheet_no in(select max(sheet_no) from (select a.branch_no,b.* from t_cg_in_master a,t_cg_in_detail b where a.sheet_no=b.sheet_no) xx where xx.item_no=? and xx.branch_no=? group by xx.item_no,xx.branch_no)~",item_no,branch_no)),'0.00')
快到期问题