|
@@ -273,25 +273,27 @@ end;
|
|
|
procedure TProjectPropertiesForm.InitDealPay;
|
|
|
begin
|
|
|
leContractPrice.Text := FloatToStr(FProjProperties.ContractPrice);
|
|
|
- leContractPrice.ReadOnly := FProjProperties.PhaseCount > 0;
|
|
|
+ leContractPrice.ReadOnly := (FProjProperties.PhaseCount > 1) or ((FProjProperties.PhaseCount = 1) and (FProjProperties.AuditStatus <> 0));
|
|
|
SetWindowLong(leContractPrice.Handle, GWL_STYLE, GetWindowLong(leContractPrice.Handle, GWL_STYLE) or ES_RIGHT);
|
|
|
|
|
|
leStartedSubsist.Text := FloatToStr(FProjProperties.StartedSubsisit);
|
|
|
- leStartedSubsist.ReadOnly := FProjProperties.PhaseCount > 0;
|
|
|
+ leStartedSubsist.ReadOnly := (FProjProperties.PhaseCount > 1) or ((FProjProperties.PhaseCount = 1) and (FProjProperties.AuditStatus <> 0));
|
|
|
SetWindowLong(leStartedSubsist.Handle, GWL_STYLE, GetWindowLong(leStartedSubsist.Handle, GWL_STYLE) or ES_RIGHT);
|
|
|
|
|
|
leMaterialSubsist.Text := FloatToStr(FProjProperties.MaterialSubsist);
|
|
|
- leMaterialSubsist.ReadOnly := FProjProperties.PhaseCount > 0;
|
|
|
+ leMaterialSubsist.ReadOnly := (FProjProperties.PhaseCount > 1) or ((FProjProperties.PhaseCount = 1) and (FProjProperties.AuditStatus <> 0));
|
|
|
SetWindowLong(leMaterialSubsist.Handle, GWL_STYLE, GetWindowLong(leMaterialSubsist.Handle, GWL_STYLE) or ES_RIGHT);
|
|
|
end;
|
|
|
|
|
|
procedure TProjectPropertiesForm.SaveDealPay;
|
|
|
begin
|
|
|
- if FProjProperties.PhaseCount > 0 then Exit;
|
|
|
+ if (FProjProperties.PhaseCount > 1) or ((FProjProperties.PhaseCount = 1) and (FProjProperties.AuditStatus <> 0)) then Exit;
|
|
|
FProjProperties.ContractPrice := StrToFloatDef(leContractPrice.Text, 0);
|
|
|
FProjProperties.StartedSubsisit := StrToFloatDef(leStartedSubsist.Text, 0);
|
|
|
FProjProperties.MaterialSubsist := StrToFloatDef(leMaterialSubsist.Text, 0);
|
|
|
FProjectData.DealPaymentData.CalcStarted_RangePrice;
|
|
|
+ if FProjectData.PhaseData.Active then
|
|
|
+ FProjectData.PhaseData.PhasePayData.CalculateAll;
|
|
|
end;
|
|
|
|
|
|
procedure TProjectPropertiesForm.leContractPriceClick(Sender: TObject);
|