问题描述:打印本次派工单,结果显示所有派工项目(除了空开和多开)
问题截图:
第一次派工项目
第二次派工项目
错误导致打印显示
实际应该显示:
错误原因:查询语句中以维修单号为依据查询所有的项目。
实际情况应该是以派工单号为依据查询
错误版本号:
V6.18.0521、V6.18.0705、V6.18.0831、V6.18.0906、V6.18.0911、V6.18.0919、V6.18.1025、V6.18.1122、V6.18.1214
解决方案:
报表设置调整sql语句——>选择主报表明细(当升级到V6.15.0710版本或者之后的版本时,则需要删除 文件pgbc_config.json和pgbc_detail.json)
select ritem_id,
ritem_name,
ritem_sort,
ritem_unit,
payway,
time_money,
amount,
money,
repair_man,
repair_squad,
squad_account,
dispatch_man,
dispatch_time,
paysort,
work_time=(case when payway='标准工时' then time_money*amount else null end),
work_price=(case when payway='标准工时' then work_price else null end),
work_money=(case when payway='金额计价' then time_money*amount else null end),
rem
from t_repair_ritem
where
dispatch_id=(select top 1 dispatch_id from t_repair_ritem where repair_id='[#维修编号#]' order by id desc)
and paysort not in('空开(派)','多开')
order by id