Browse Source

哈白定制表,清单根据计算模式汇总,其中金额模式下清单不可重算金额

MaiXinRong 9 years ago
parent
commit
36b8510dae
1 changed files with 9 additions and 2 deletions
  1. 9 2
      DataModules/ReportMemoryDm/rmHaBaiCustomizedDm.pas

+ 9 - 2
DataModules/ReportMemoryDm/rmHaBaiCustomizedDm.pas

@@ -1,6 +1,6 @@
 unit rmHaBaiCustomizedDm;
 
-// 内蒙古 哈白项目定制汇总表 严禁任何其他项目或标表调用该单元
+// 内蒙古 哈白项目/国道306定制汇总表 严禁任何其他项目或标表调用该单元
 // 包括支表2/3/14/3-1/4-1
 
 interface
@@ -22,6 +22,7 @@ type
     FName: string;
     FUnits: string;
     FPrice: Double;
+    FCalcType: Integer;
 
     FQuantity: Double;
     FTotalPrice: Double;
@@ -55,6 +56,7 @@ type
     property Name: string read FName write FName;
     property Units: string read FUnits write FUnits;
     property Price: Double read FPrice write FPrice;
+    property CalcType: Integer read FCalcType write FCalcType;
 
     property Quantity: Double read FQuantity write FQuantity;
     property TotalPrice: Double read FTotalPrice write FTotalPrice;
@@ -988,6 +990,9 @@ procedure TGclNode.Calculate;
 var
   i: Integer;
 begin
+  // 金额模式下不重算
+  if CalcType <> 0 then Exit;
+
   FTotalPrice := FPrice * FQuantity;
   FCurGatherTotalPrice := FPrice * FCurGatherQuantity;
   FEndGatherTotalPrice := FPrice * FEndGatherQuantity;
@@ -1171,7 +1176,8 @@ begin
     if (vGclNode.B_Code = ARec.B_Code.AsString) and
         (vGclNode.Name = ARec.Name.AsString) and
         (vGclNode.Units = ARec.Units.AsString) and
-        (vGclNode.Price = ARec.Price.AsFloat) then
+        (vGclNode.Price = ARec.Price.AsFloat) and
+        (vGclNode.CalcType = ARec.CalcType.AsInteger)then
       begin
         Result := vGclNode;
         Break;
@@ -1227,6 +1233,7 @@ begin
   Result.Name := ARec.Name.AsString;
   Result.Units := ARec.Units.AsString;
   Result.Price := ARec.Price.AsFloat;
+  Result.CalcType := ARec.CalcType.AsInteger;
   LinkGclChapter(Result);
 end;