在批发销售单的打印样式里加一个客户欠款总额

2019-03-04 22:41:32
类型:应用级问题   版本:百威9000V6商业管理软件
问:

在做打印样式时没有把客户累计欠款打上勾,后又想打印时加一个显示欠款,只能通过语句方式加个客户欠款

图片点击可在新窗口打开查看

答:

添加一个计算列,如图:图片点击可在新窗口打开查看,在表达式里输入下面内容:

string(real(getdata('select sum(a.sheet_amount * a.pay_type - (a.paid_amount + a.free_money))
from rp_T_accout_payrec_flow a, (select supcust_flag, supcust_no, approve_date from rp_T_accout_payrec_flow 
where voucher_no = ? ) as b
where a.supcust_flag = b.supcust_flag and a.supcust_no = b.supcust_no and a.approve_date <= b.approve_date',max(sheet_no),0,0,0,0)),'0.00')