K3Cloud Python套打插件開發記錄
阿新 • • 發佈:2018-09-26
col not enc 打印 pre help cut execute 匯總
背景
費用報銷單分錄的報銷未付款金額,客戶需要打印出來一個匯總,不顯示單據體。
1,拖一個金額字段冗余在單據頭。
2,套打裏面吧這個字段設置到對應的打印位置。
3,掛插件
1 import clr 2 clr.AddReference("System") 3 clr.AddReference("Kingdee.BOS.Core") 4 clr.AddReference("Kingdee.BOS.ServiceHelper") 5 from Kingdee.BOS import * 6 from Kingdee.BOS.Core import * 7 from Kingdee.BOS.ServiceHelper import* 8 from System import * 9 10 def OnPrepareNotePrintData(e): 11 if e.DataSourceId == "FBillHead": 12 qureyObjs = e.DataObjects 13 sql = "select sum(FREIMBNOTPAYAMOUNT) as FREIMBNOTPAYAMOUNT from t_ER_ExpenseReimbEntry where fid = " + str(qureyObjs[0][0]) 14 dyc = DBServiceHelper.ExecuteDynamicObject(this.Context, sql)15 if dyc != None: 16 Amount = dyc[0][0] 17 qureyObjs[0]["F_PAEZ_Amount"] = Amount;
4,完成。
K3Cloud Python套打插件開發記錄