Browse Source

修改项目属性--合同支付中数据后,起扣金额、扣款限额设置为金额的项,起扣金额、扣款限额不应被清除。

MaiXinRong 5 years ago
parent
commit
38c2a64509
2 changed files with 5 additions and 2 deletions
  1. 1 0
      DataModules/DealPaymentDm.dfm
  2. 4 2
      DataModules/DealPaymentDm.pas

+ 1 - 0
DataModules/DealPaymentDm.dfm

@@ -11,6 +11,7 @@ object DealPaymentData: TDealPaymentData
   end
   object sddDealPayment: TsdDataSet
     Active = False
+    Filtered = False
     Provider = sdpDealPayment
     BeforeAddRecord = sddDealPaymentBeforeAddRecord
     AfterAddRecord = sddDealPaymentAfterAddRecord

+ 4 - 2
DataModules/DealPaymentDm.pas

@@ -557,8 +557,10 @@ begin
   begin
     Rec := sddDealPayment.Records[I];
     if Rec.ValueByName('CalcType').AsInteger <> 0 then Continue;
-    Rec.ValueByName('StartedPrice').AsFloat := FPayFormula.Calculate(Rec.ValueByName('SFormula').AsString);
-    Rec.ValueByName('RangePrice').AsFloat := FPayFormula.Calculate(Rec.ValueByName('RFormula').AsString);
+    if Rec.ValueByName('SFormula').AsString <> '' then
+      Rec.ValueByName('StartedPrice').AsFloat := FPayFormula.Calculate(Rec.ValueByName('SFormula').AsString);
+    if Rec.ValueByName('RFormula').AsString <> '' then
+      Rec.ValueByName('RangePrice').AsFloat := FPayFormula.Calculate(Rec.ValueByName('RFormula').AsString);
   end;
 end;