|
@@ -147,18 +147,36 @@ procedure TBillsCompileData.sdvBillsCompileGetText(var Text: String;
|
|
|
ARecord: TsdDataRecord; AValue: TsdValue; AColumn: TsdViewColumn;
|
|
|
DisplayText: Boolean);
|
|
|
|
|
|
+ function GetQtyEditText(const AFormulaField: string): Boolean;
|
|
|
+ begin
|
|
|
+
|
|
|
+ end;
|
|
|
+
|
|
|
procedure GetEditText;
|
|
|
var
|
|
|
sFormula: string;
|
|
|
+ sFormulaField: string;
|
|
|
begin
|
|
|
- if SameText('OrgQuantity', AColumn.FieldName) then
|
|
|
- sFormula := ARecord.ValueByName('OrgFormula').AsString
|
|
|
- else if SameText('MisQuantity', AColumn.FieldName) then
|
|
|
- sFormula := ARecord.ValueByName('MisFormula').AsString
|
|
|
- else if SameText('OthQuantity', AColumn.FieldName) then
|
|
|
- sFormula := ARecord.ValueByName('OthFormula').AsString
|
|
|
- else
|
|
|
- sFormula := '';
|
|
|
+ sFormula := '';
|
|
|
+ if ARecord.ValueByName('CalcType').AsInteger = 0 then
|
|
|
+ begin
|
|
|
+ if SameText('OrgQuantity', AColumn.FieldName) then
|
|
|
+ sFormula := ARecord.ValueByName('OrgFormula').AsString
|
|
|
+ else if SameText('MisQuantity', AColumn.FieldName) then
|
|
|
+ sFormula := ARecord.ValueByName('MisFormula').AsString
|
|
|
+ else if SameText('OthQuantity', AColumn.FieldName) then
|
|
|
+ sFormula := ARecord.ValueByName('OthFormula').AsString;
|
|
|
+ end
|
|
|
+ else if ARecord.ValueByName('CalcType').AsInteger = 1 then
|
|
|
+ begin
|
|
|
+ if SameText('OrgTotalPrice', AColumn.FieldName) then
|
|
|
+ sFormula := ARecord.ValueByName('OrgFormula').AsString
|
|
|
+ else if SameText('MisTotalPrice', AColumn.FieldName) then
|
|
|
+ sFormula := ARecord.ValueByName('MisFormula').AsString
|
|
|
+ else if SameText('OthTotalPrice', AColumn.FieldName) then
|
|
|
+ sFormula := ARecord.ValueByName('OthFormula').AsString;
|
|
|
+ end;
|
|
|
+
|
|
|
if sFormula <> '' then
|
|
|
Text := sFormula;
|
|
|
end;
|