Browse Source

项目管理,文件夹信息,计算Bug

MaiXinRong 7 years ago
parent
commit
a89fcf7971
1 changed files with 9 additions and 9 deletions
  1. 9 9
      DataModules/ProjectManagerDm.pas

+ 9 - 9
DataModules/ProjectManagerDm.pas

@@ -679,7 +679,7 @@ procedure TProjectManagerData.CalculateParentInfo(AID: Integer);
   procedure ReCalculateInfo(ANode: TsdIDTreeNode);
   var
     fDeal, fDeal_BGL, fPhase, fEndDeal, fEndChange, fEnd, fPre, fPhasePay: Double;
-    iChild: Integer;
+    iChild, iCommonDigit, iDealPayDigit: Integer;
     vChild: TsdIDTreeNode;
   begin
     fDeal := 0;
@@ -702,14 +702,14 @@ procedure TProjectManagerData.CalculateParentInfo(AID: Integer);
       fPre := fPre + vChild.Rec.ValueByName('PreTotalPrice').AsFloat;
       fPhasePay := fPhasePay + vChild.Rec.ValueByName('PhasePay').AsFloat;
     end;
-    ANode.Rec.ValueByName('DealTotalPrice').AsFloat := fDeal;
-    ANode.Rec.ValueByName('Deal_BGLTotalPrice').AsFloat := fDeal_BGL;
-    ANode.Rec.ValueByName('PhaseTotalPrice').AsFloat := fPhase;
-    ANode.Rec.ValueByName('EndDealTotalPrice').AsFloat := fEndDeal;
-    ANode.Rec.ValueByName('EndChangeTotalPrice').AsFloat := fEndChange;
-    ANode.Rec.ValueByName('EndTotalPrice').AsFloat := fEnd;
-    ANode.Rec.ValueByName('PreTotalPrice').AsFloat := fPre;
-    ANode.Rec.ValueByName('PhasePay').AsFloat := fPhasePay;
+    ANode.Rec.ValueByName('DealTotalPrice').AsFloat := CommonRoundTo(fDeal, iCommonDigit);
+    ANode.Rec.ValueByName('Deal_BGLTotalPrice').AsFloat := CommonRoundTo(fDeal_BGL, iCommonDigit);
+    ANode.Rec.ValueByName('PhaseTotalPrice').AsFloat := CommonRoundTo(fPhase, iCommonDigit);
+    ANode.Rec.ValueByName('EndDealTotalPrice').AsFloat := CommonRoundTo(fEndDeal, iCommonDigit);
+    ANode.Rec.ValueByName('EndChangeTotalPrice').AsFloat := CommonRoundTo(fEndChange, iCommonDigit);
+    ANode.Rec.ValueByName('EndTotalPrice').AsFloat := CommonRoundTo(fEnd, iCommonDigit);
+    ANode.Rec.ValueByName('PreTotalPrice').AsFloat := CommonRoundTo(fPre, iCommonDigit);
+    ANode.Rec.ValueByName('PhasePay').AsFloat := CommonRoundTo(fPhasePay, iDealPayDigit);
   end;
 
 var