|
@@ -331,13 +331,63 @@ procedure TProjectManagerData.sdvProjectsInfoGetText(var Text: String;
|
|
|
end;
|
|
|
end;
|
|
|
|
|
|
+ function GetFormatString(ADigitValue: TsdValue): string;
|
|
|
+ begin
|
|
|
+ if not ADigitValue.IsNull then
|
|
|
+ begin
|
|
|
+ case ADigitValue.AsInteger of
|
|
|
+ 0: Result := '0';
|
|
|
+ 1: Result := '0.#';
|
|
|
+ 2: Result := '0.##';
|
|
|
+ 3: Result := '0.###';
|
|
|
+ 4: Result := '0.####';
|
|
|
+ 5: Result := '0.#####';
|
|
|
+ 6: Result := '0.######';
|
|
|
+ 7: Result := '0.#######';
|
|
|
+ 8: Result := '0.########';
|
|
|
+ 9: Result := '0.#########';
|
|
|
+ else
|
|
|
+ Result := '0.##########';
|
|
|
+ end;
|
|
|
+ end
|
|
|
+ else
|
|
|
+ Result := '';
|
|
|
+ end;
|
|
|
+
|
|
|
+ function FormatCommonTotalPrice(ATotalPrice: Double): string;
|
|
|
+ var
|
|
|
+ sFormat: string;
|
|
|
+ begin
|
|
|
+ Result := Text;
|
|
|
+ sFormat := GetFormatString(ARecord.ValueByName('CommonDigit'));
|
|
|
+ if sFormat <> '' then
|
|
|
+ Result := FormatFloat(sFormat, ATotalPrice);
|
|
|
+ end;
|
|
|
+
|
|
|
+ function FormatDealPayTotalPrice(ATotalPrice: Double): string;
|
|
|
+ var
|
|
|
+ sFormat: string;
|
|
|
+ begin
|
|
|
+ Result := Text;
|
|
|
+ sFormat := GetFormatString(ARecord.ValueByName('DealPayDigit'));
|
|
|
+ if sFormat <> '' then
|
|
|
+ Result := FormatFloat(sFormat, ATotalPrice);
|
|
|
+ end;
|
|
|
+
|
|
|
begin
|
|
|
if not Assigned(ARecord) then Exit;
|
|
|
if SameText(AColumn.FieldName, 'AuditStatus') then
|
|
|
if ARecord.ValueByName('Type').AsInteger = 1 then
|
|
|
Text := NumToAuditStatus(AValue.AsInteger)
|
|
|
else
|
|
|
- Text := '';
|
|
|
+ Text := ''
|
|
|
+ else if DisplayText then
|
|
|
+ begin
|
|
|
+ if Pos('TotalPrice', AColumn.FieldName) > 0 then
|
|
|
+ Text := FormatCommonTotalPrice(AValue.AsFloat)
|
|
|
+ else if SameText('PhasePay', AColumn.FieldName) then
|
|
|
+ Text := FormatDealPayTotalPrice(AValue.AsFloat);
|
|
|
+ end;
|
|
|
end;
|
|
|
|
|
|
procedure TProjectManagerData.DeleteAllTenderFiles(ANode: TsdIDTreeNode);
|