1
This commit is contained in:
@@ -26,6 +26,7 @@ def DataChanged(e):
|
||||
if e.NewValue != None and e.NewValue != 0:
|
||||
hasQRCost = this.View.Model.GetValue("FHasQRCost")
|
||||
idlist = [{ "materialId" : e.NewValue , "inRow" : e.Row}]
|
||||
# raise Exception(str(e.NewValue)+","+str(e.Row))
|
||||
GetcContractAnnualCost(idlist,hasQRCost)
|
||||
else:
|
||||
this.View.Model.SetValue("FTAXPRICE", 0, e.Row)
|
||||
@@ -40,7 +41,21 @@ def DataChanged(e):
|
||||
idlist = list(filter(lambda x:x["materialId"] > 0,map(lambda x:{ "materialId":x["MaterialId_Id"] ,"inRow": x["Seq"] - 1} ,entrys)))
|
||||
GetcContractAnnualCost(idlist,hasQRCost)
|
||||
|
||||
|
||||
def AfterCreateNewData(e):
|
||||
if DoCheckConditions():
|
||||
details = this.View.BusinessInfo.GetEntity("FEntity");
|
||||
if details != None :
|
||||
entrys = this.View.Model.GetEntityDataObject(details);
|
||||
if entrys != None and entrys.Count > 0:
|
||||
hasQRCost = this.View.Model.GetValue("FHasQRCost")
|
||||
idlist = []
|
||||
for entry in entrys:
|
||||
rowIndex = this.View.Model.GetRowIndex(details, entry)
|
||||
materialObjValue = entry["MaterialId_Id"]
|
||||
materialValue = 0 if materialObjValue == None else materialObjValue
|
||||
idlist.append({ "materialId" :materialValue , "inRow" : rowIndex})
|
||||
GetcContractAnnualCost(idlist,hasQRCost)
|
||||
|
||||
def GetcContractAnnualCost(idList,hasQRCost):
|
||||
# whereSql = " AND t0e.F_QNV_BASE1 IN ({0}) ".format(",".join(idList))
|
||||
intoSqlList = List[str]()
|
||||
@@ -125,18 +140,4 @@ def DoCheckConditions():
|
||||
orgObj = this.View.Model.GetValue("FApplicationOrgId")
|
||||
if orgObj["Id"] == 101542:
|
||||
return True
|
||||
return False
|
||||
|
||||
|
||||
# --alter table T_STK_MISDELIVERYENTRY alter column FReferPrice decimal(23,10) not null
|
||||
|
||||
|
||||
# --UPDATE T_STK_MISDELIVERYENTRY SET FReferPrice = 0
|
||||
# --WHERE FReferPrice = '' OR FReferPrice is null
|
||||
|
||||
# alter table T_STK_MISDELIVERYENTRY alter column FReferAmount decimal(23,10) not null
|
||||
|
||||
|
||||
# UPDATE T_STK_MISDELIVERYENTRY SET FReferAmount = 0
|
||||
# WHERE FReferAmount = '' OR FReferAmount is null
|
||||
|
||||
return False
|
||||
Reference in New Issue
Block a user