MaiXinRong 3 năm trước cách đây
mục cha
commit
0f129b041d
2 tập tin đã thay đổi với 5 bổ sung5 xóa
  1. 1 1
      Units/CacheTree.pas
  2. 4 4
      Units/ProjectCommands.pas

+ 1 - 1
Units/CacheTree.pas

@@ -332,7 +332,7 @@ end;
 function TCacheTree.GetFirstNode: TCacheNode;
 begin
   if FCacheNodes.Count > 0 then
-    Result := FCacheNodes.First
+    Result := FRoot.FirstChild
   else
     Result := nil;
 end;

+ 4 - 4
Units/ProjectCommands.pas

@@ -683,7 +683,7 @@ begin
   FCurNode.Rec.ValueByName('EndTotalPrice').AsFloat := AXmlNode.Attributes['EndTotalPrice'];
   FCurNode.Rec.ValueByName('PreTotalPrice').AsFloat := AXmlNode.Attributes['PreTotalPrice'];
   FCurNode.Rec.ValueByName('PhasePay').AsFloat := AXmlNode.Attributes['PhasePay'];          
-  FCurNode.Rec.ValueByName('EndPhasePay').AsFloat := AXmlNode.Attributes['EndPhasePay'];
+  FCurNode.Rec.ValueByName('EndPhasePay').AsFloat := VarToFloatDef(AXmlNode.Attributes['EndPhasePay'], 0);
   if AXmlNode.HasAttribute('Deal_BGLTotalPrice') then
     FCurNode.Rec.ValueByName('Deal_BGLTotalPrice').AsFloat := AXmlNode.Attributes['Deal_BGLTotalPrice'];
   FCurNode.Rec.ValueByName('PhaseCount').AsInteger := AXmlNode.Attributes['PhaseCount'];
@@ -848,7 +848,7 @@ begin
   vInfo.Attributes['EndTotalPrice'] := InfoRec.ValueByName('EndTotalPrice').AsFloat;
   vInfo.Attributes['PreTotalPrice'] := InfoRec.ValueByName('PreTotalPrice').AsFloat;
   vInfo.Attributes['PhasePay'] := InfoRec.ValueByName('PhasePay').AsFloat;          
-  vInfo.Attributes['EndPhasePay'] := InfoRec.ValueByName('EndPhasePay').AsFloat;
+  vInfo.Attributes['EndPhasePay'] := VarToFloatDef(InfoRec.ValueByName('EndPhasePay').AsFloat, 0);
   vInfo.Attributes['Deal_BGLTotalPrice'] := InfoRec.ValueByName('Deal_BGLTotalPrice').AsFloat;
   vInfo.Attributes['PhaseCount'] := InfoRec.ValueByName('PhaseCount').AsInteger;
   vInfo.Attributes['AuditStatus'] := InfoRec.ValueByName('AuditStatus').AsInteger;
@@ -1120,8 +1120,8 @@ begin
   FNewNode.Rec.ValueByName('EndChangeTotalPrice').AsFloat := AXmlNode.Attributes['EndChangeTotalPrice'];
   FNewNode.Rec.ValueByName('EndTotalPrice').AsFloat := AXmlNode.Attributes['EndTotalPrice'];
   FNewNode.Rec.ValueByName('PreTotalPrice').AsFloat := AXmlNode.Attributes['PreTotalPrice'];
-  FNewNode.Rec.ValueByName('PhasePay').AsFloat := AXmlNode.Attributes['PhasePay'];
-  FNewNode.Rec.ValueByName('EndPhasePay').AsFloat := AXmlNode.Attributes['EndPhasePay'];
+  FNewNode.Rec.ValueByName('PhasePay').AsFloat := VarToFloatDef(AXmlNode.Attributes['PhasePay'], 0);
+  FNewNode.Rec.ValueByName('EndPhasePay').AsFloat := VarToFloatDef(AXmlNode.Attributes['EndPhasePay'], 0);
   if AXmlNode.HasAttribute('Deal_BGLTotalPrice') then
     FNewNode.Rec.ValueByName('Deal_BGLTotalPrice').AsFloat := AXmlNode.Attributes['Deal_BGLTotalPrice'];
   FNewNode.Rec.ValueByName('PhaseCount').AsInteger := AXmlNode.Attributes['PhaseCount'];