您好,请您先 登陆 或者 注册

【官方】批发销售单中添加已生效未生效、部分付款、全部付款、未付款信息?

已生效未生效:
if (db_data2(~"select app_sign from t_pf_out_master where sheet_no=?~",sheet_No)=~"1~",~"已生效~",~"未生效~")
部分付款、全部付款、未付款信息:
if (db_data2(~"select app_sign from t_pf_out_master where sheet_no=?~",sheet_No)=~"1~",case( db_data2(~"select case when sheet_amt-order_amt-paid_amt-free_amt=sheet_amt then 0 when sheet_amt-order_amt-paid_amt-free_amt>0 then 1 else 2 end from t_cust_accout_flow where sheet_No=?~",sheet_No) when ~"0~" then ~"没有付款~" when ~"1~" then ~"部分付款~" else ~"全部付款~") ,~"~"
)

提问者: ytkf007
等级:问不倒翁
时间:2013-07-04 11:44
悬赏:0
解决时间:2013-07-05 15:44
最佳答案
这个之前技术也提供给我了!不错的!
回答者:bonchen
等级:问不倒翁
时间:2013-07-05 00:33
您觉得最佳答案好不好?
目前有 2 个人评价
50% (1)
不好 50% (1)
提问者对最佳回答的评论:
以上语句如果不行,请参考下面的语句。上面的缺少个max!在有的情况下不能正常运行。

已生效未生效:
if (db_data2(~"select app_sign from t_pf_out_master where sheet_no=?~",max(sheet_No))=~"1~",~"已生效~",~"未生效~")
部分付款、全部付款、未付款信息:
if (db_data2(~"select app_sign from t_pf_out_master where sheet_no=?~",sheet_No)=~"1~",case( db_data2(~"select case when sheet_amt-order_amt-paid_amt-free_amt=sheet_amt then 0 when sheet_amt-order_amt-paid_amt-free_amt>0 then 1 else 2 end from t_cust_accout_flow where sheet_No=?~",max(sheet_No) )when ~"0~" then ~"没有付款~" when ~"1~" then ~"部分付款~" else ~"全部付款~") ,~"~"
)
其它回答 共 1 条
学习了
回答者:kh359
等级:问不倒翁
时间:2013-07-04 15:37
对最佳答案的评论:

评论字数200字以内
快到期问题
总积分排行
ytkf00720058 4704
kh35927124 3414
赢通技术43602 3117
bonchen13219 2797
赢通技术37615 2590
JCLH11087 1917
浅逝1873 1873
李祥19958 1542
xiaobird3309 1254
daoptt3310 1237