1
This commit is contained in:
@@ -36,6 +36,7 @@ def OnPreparePropertys(e):
|
||||
e.FieldKeys.Add("FBillAllAmount");
|
||||
e.FieldKeys.Add("F_SFYFH");
|
||||
e.FieldKeys.Add("FSaleOrgId");
|
||||
e.FieldKeys.Add("FDocumentStatus");
|
||||
|
||||
def BeforeDoSaveExecute(e):
|
||||
# if this.FormOperation.OperationId == 8:
|
||||
@@ -82,12 +83,13 @@ WHERE t0.FID IN ({0})
|
||||
if res != None and res.Count > 0:
|
||||
# raise Exception(JsonUtil.Serialize(res))
|
||||
item = res[0]
|
||||
|
||||
currAmount = entity["SAL_DELIVERYNOTICEFIN"][0]["BillAllAmount"]
|
||||
# raise Exception(str(currAmount))
|
||||
isYFHFlag = item["累计核销金额"] < item["款到发货应收金额"]
|
||||
isYFHFlag1 = isYFHFlag == True and (item["收款计划条数"] == 1)
|
||||
isYFHFlag2 = isYFHFlag == True and (True if isYFHFlag1 else ((item["累计核销金额"] - item["累计已发货金额"]) < currAmount))
|
||||
entity["F_SFYFH"] = '是' if isYFHFlag2 == True else '否'
|
||||
|
||||
if entity["SAL_DELIVERYNOTICEFIN"] != None and entity["SAL_DELIVERYNOTICEFIN"].Count > 0:
|
||||
currAmount = entity["SAL_DELIVERYNOTICEFIN"][0]["BillAllAmount"]
|
||||
# raise Exception(str(currAmount))
|
||||
isYFHFlag = item["累计核销金额"] < item["款到发货应收金额"]
|
||||
isYFHFlag1 = isYFHFlag == True and (item["收款计划条数"] == 1)
|
||||
isYFHFlag2 = isYFHFlag == True and (True if isYFHFlag1 else ((item["累计核销金额"] - item["累计已发货金额"]) < currAmount))
|
||||
entity["F_SFYFH"] = '是' if isYFHFlag2 == True else '否'
|
||||
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user