Просмотр исходного кода

合同支付,删除金额报错,改进计提期限提示

MaiXinRong 9 лет назад
Родитель
Сommit
d0fe9f94f7
2 измененных файлов с 7 добавлено и 1 удалено
  1. 1 0
      DataModules/DealPaymentDm.pas
  2. 6 1
      Frames/DealPaymentFme.pas

+ 1 - 0
DataModules/DealPaymentDm.pas

@@ -438,6 +438,7 @@ procedure TDealPaymentData.sdvDealPaymentSetText(var Text: string;
     begin
       Rec.ValueByName('Formula').AsString := '';
       AValue.Owner.ValueByName(sFField).AsString := '';
+      AID := ARecord.ValueByName('ID').AsInteger;
       fTotalPrice := StrToFloatDef(Text, 0) - AValue.AsFloat;
       if CheckStartedPrice(AID) then
         Text := FloatToStr(AValue.AsFloat + GetAllowTotalPrice(AID, fTotalPrice))

+ 6 - 1
Frames/DealPaymentFme.pas

@@ -350,11 +350,16 @@ begin
   if (ACoord.X = 3) and (ACoord.Y > 0) and (ACoord.Y <= zgDealPayment.RowCount - 3) then
   begin  
     Rec := sdDealPayment.DataView.Records[ACoord.Y - 1];
+    if Assigned(Rec) and (Rec.ValueByName('PlanType').AsInteger <> 0) then
+    begin
+      CanShow := True;
+      HintStr := Format('计提期限为(%s)', [FDealPaymentData.PlanStr(Rec)]);
+    end;
     if (zgDealPayment.Cells[ACoord.X, ACoord.Y].Text <> '') and Assigned(Rec) then
       if FDealPaymentData.CheckReachPlan(Rec) then
       begin
         CanShow := True;
-        HintStr := '已达到计提期限,当前金额须一次性计提至限额' + #13#10 +
+        HintStr := '已达到计提期限,当金额须一次性计提至限额' + #13#10 +
             Format('计提期限为(%s)', [FDealPaymentData.PlanStr(Rec)]);
       end;
   end;