|
@@ -31,6 +31,8 @@ type
|
|
|
procedure UpdateParentRecord(ABillsID: Integer; ATotalPrice: Double; const AFieldName: string);
|
|
|
procedure UpdateComplete(ABillsID: Integer; AQuantity, ATotalPrice: Double);
|
|
|
|
|
|
+ function HasPriceMarginBills: Boolean;
|
|
|
+
|
|
|
// 向父项增量--PM_TotalPrice
|
|
|
procedure UpdateParentPriceMargin(ABillsID: Integer; ADiffer: Double);
|
|
|
// 向价差调整节点增量--GatherTotalPrice
|
|
@@ -812,6 +814,8 @@ var
|
|
|
Rec: TStageRecord;
|
|
|
fDiffer: Double;
|
|
|
begin
|
|
|
+ if not HasPriceMarginBills then Exit;
|
|
|
+
|
|
|
with TProjectData(TPhaseData(FPhaseData).ProjectData) do
|
|
|
begin
|
|
|
Rec := StageRecord(iPriceMarginID);
|
|
@@ -854,6 +858,8 @@ var
|
|
|
Rec: TStageRecord;
|
|
|
fPM, fPMDiffer: Double;
|
|
|
begin
|
|
|
+ if not HasPriceMarginBills then Exit;
|
|
|
+
|
|
|
Rec := StageRecord(ABillsID);
|
|
|
if not Assigned(Rec) then Exit;
|
|
|
|
|
@@ -940,4 +946,12 @@ begin
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+function TStageData.HasPriceMarginBills: Boolean;
|
|
|
+var
|
|
|
+ vPM_Node: TsdIDTreeNode;
|
|
|
+begin
|
|
|
+ vPM_Node := MainBillsTree.FindNode(iPriceMarginID);
|
|
|
+ Result := Assigned(vPM_Node);
|
|
|
+end;
|
|
|
+
|
|
|
end.
|