Browse Source

1. 合同支付,“不参与本期应付计算”项,也应自动公式计算
2. 开始计量前,可设置是否为“不参与本期应付计算”项

MaiXinRong 8 năm trước cách đây
mục cha
commit
3f05468dc5

+ 1 - 1
DataModules/PhasePayDm.pas

@@ -170,7 +170,7 @@ begin
   for iIndex := 0 to sddPhasePay.RecordCount - 1 do
   begin
     Rec := sddPhasePay.Records[iIndex];
-    if GetCalcType(Rec.ValueByName('ID').AsInteger) = 0 then
+    if GetCalcType(Rec.ValueByName('ID').AsInteger) in [0, 3] then
       Calculate(Rec.ValueByName('ID').AsInteger);
   end;
   CalculateCurPay;

+ 1 - 0
Frames/DealPaymentFme.dfm

@@ -317,6 +317,7 @@ object DealPaymentFrame: TDealPaymentFrame
         Visible = True
       end
       item
+        BeginGroup = True
         Item = MainForm.dxbtnWithoutCalcCurPay
         Visible = True
       end>

+ 2 - 2
Frames/DealPaymentFme.pas

@@ -466,8 +466,8 @@ begin
     TAction(Sender).Visible := False;
     Exit;
   end;
-  TAction(Sender).Visible := TProjectData(FDealPaymentData.ProjectData).ValidStageIsRefer and
-      (TProjectData(FDealPaymentData.ProjectData).PhaseIndex = Rec.ValueByName('CreatePhaseID').AsInteger);
+  TAction(Sender).Visible := (TProjectData(FDealPaymentData.ProjectData).PhaseIndex = Rec.ValueByName('CreatePhaseID').AsInteger) and
+    (TProjectData(FDealPaymentData.ProjectData).ValidStageIsRefer or (not TProjectData(FDealPaymentData.ProjectData).StartMeasure));
 end;
 
 end.

+ 7 - 0
Units/ProjectData.pas

@@ -101,6 +101,7 @@ type
     procedure SetStageIndex(const Value: Integer);
     function GetCanInsertNormalBills: Boolean;
     function GetValidStageIsRefer: Boolean;
+    function GetStartMeasure: Boolean;
   public
     constructor Create;
     destructor Destroy; override;
@@ -226,6 +227,7 @@ type
     property StageDataReadOnly: Boolean read GetStageDataReadOnly;
     property PriceMarginReadOnly: Boolean read GetPriceMarginReadOnly;
     property ValidStageIsRefer: Boolean read GetValidStageIsRefer;
+    property StartMeasure: Boolean read GetStartMeasure; 
 
     property CanUnlockInfo: Boolean read FCanUnlockInfo write FCanUnlockInfo;
     property CanInsertNormalBills: Boolean read GetCanInsertNormalBills;
@@ -2088,4 +2090,9 @@ begin
   FBillsMeasureData.ResetTreeNodeStageRec;
 end;
 
+function TProjectData.GetStartMeasure: Boolean;
+begin
+  Result := ProjProperties.PhaseCount > 0;
+end;
+
 end.