|
@@ -61,6 +61,8 @@ type
|
|
|
function MaterialSubsist: Double;
|
|
function MaterialSubsist: Double;
|
|
|
// 本期本阶段结算价
|
|
// 本期本阶段结算价
|
|
|
function StageSettlement: Double;
|
|
function StageSettlement: Double;
|
|
|
|
|
+ // 交投
|
|
|
|
|
+ function FirstPartPrice: Double;
|
|
|
// 100/200/.../900章本期完成计量
|
|
// 100/200/.../900章本期完成计量
|
|
|
function ChapterStageGather(AChapter: Integer): Double;
|
|
function ChapterStageGather(AChapter: Integer): Double;
|
|
|
|
|
|
|
@@ -76,7 +78,7 @@ type
|
|
|
implementation
|
|
implementation
|
|
|
|
|
|
|
|
uses
|
|
uses
|
|
|
- SysUtils, ProjectData, PhaseData, UtilMethods;
|
|
|
|
|
|
|
+ SysUtils, ProjectData, PhaseData, UtilMethods, StageDm;
|
|
|
|
|
|
|
|
{ TFormulaCalc }
|
|
{ TFormulaCalc }
|
|
|
|
|
|
|
@@ -272,13 +274,29 @@ begin
|
|
|
inherited;
|
|
inherited;
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
|
|
+function TPayFormula.FirstPartPrice: Double;
|
|
|
|
|
+begin
|
|
|
|
|
+ with TProjectData(FProjectData).PhaseData do
|
|
|
|
|
+ if Active then
|
|
|
|
|
+ begin
|
|
|
|
|
+ // 初次达到起扣金额时,取累计完成计量-起扣金额
|
|
|
|
|
+ if FStartedPrice = 0 then
|
|
|
|
|
+ Result := StageData.FirstPart[1, 4]
|
|
|
|
|
+ else
|
|
|
|
|
+ Result := StageData.FirstPart[2, 4] - FStartedPrice;
|
|
|
|
|
+ end
|
|
|
|
|
+ else
|
|
|
|
|
+ Result := 0;
|
|
|
|
|
+end;
|
|
|
|
|
+
|
|
|
function TPayFormula.GetCalcText: string;
|
|
function TPayFormula.GetCalcText: string;
|
|
|
begin
|
|
begin
|
|
|
Result := StringReplace(FDisplayText, 'htj', FloatToStr(ContractPrice), [rfReplaceAll, rfIgnoreCase]);
|
|
Result := StringReplace(FDisplayText, 'htj', FloatToStr(ContractPrice), [rfReplaceAll, rfIgnoreCase]);
|
|
|
Result := StringReplace(Result, 'kgyfk', FloatToStr(StartedSubsist), [rfReplaceAll, rfIgnoreCase]);
|
|
Result := StringReplace(Result, 'kgyfk', FloatToStr(StartedSubsist), [rfReplaceAll, rfIgnoreCase]);
|
|
|
Result := StringReplace(Result, 'clyfk', FloatToStr(MaterialSubsist), [rfReplaceAll, rfIgnoreCase]);
|
|
Result := StringReplace(Result, 'clyfk', FloatToStr(MaterialSubsist), [rfReplaceAll, rfIgnoreCase]);
|
|
|
Result := StringReplace(Result, 'ybbqwc', FloatToStr(ChapterStageGather(1)), [rfReplaceAll, rfIgnoreCase]);
|
|
Result := StringReplace(Result, 'ybbqwc', FloatToStr(ChapterStageGather(1)), [rfReplaceAll, rfIgnoreCase]);
|
|
|
- Result := StringReplace(Result, 'bqwc', FloatToStr(StageSettlement), [rfReplaceAll, rfIgnoreCase]);
|
|
|
|
|
|
|
+ // Task #1291 四川交投,本期完成计量应引用第一部分本期完成计量
|
|
|
|
|
+ Result := StringReplace(Result, 'bqwc', FloatToStr(FirstPartPrice), [rfReplaceAll, rfIgnoreCase]);
|
|
|
end;
|
|
end;
|
|
|
|
|
|
|
|
function TPayFormula.GetValue: Double;
|
|
function TPayFormula.GetValue: Double;
|