|
@@ -56,7 +56,7 @@ type
|
|
implementation
|
|
implementation
|
|
|
|
|
|
uses
|
|
uses
|
|
- ProjectData;
|
|
|
|
|
|
+ ProjectData, UtilMethods, CalcDecimal;
|
|
|
|
|
|
{$R *.dfm}
|
|
{$R *.dfm}
|
|
|
|
|
|
@@ -141,7 +141,7 @@ procedure TBillsGatherFrame.zgGclBillsCellGetColor(Sender: TObject;
|
|
function CheckOverRange(ARecIndex: Integer): Boolean;
|
|
function CheckOverRange(ARecIndex: Integer): Boolean;
|
|
var
|
|
var
|
|
Rec: TsdDataRecord;
|
|
Rec: TsdDataRecord;
|
|
- fQuantity, fDealQuantity, fEndDealQuantity: Double;
|
|
|
|
|
|
+ fQuantity, fDealQuantity, fEndDealQuantity, fCompare: Double;
|
|
begin
|
|
begin
|
|
Rec := saGclBills.DataView.Records[ARecIndex];
|
|
Rec := saGclBills.DataView.Records[ARecIndex];
|
|
Result := False;
|
|
Result := False;
|
|
@@ -150,10 +150,12 @@ procedure TBillsGatherFrame.zgGclBillsCellGetColor(Sender: TObject;
|
|
fDealQuantity := Rec.ValueByName('DealQuantity').AsFloat;
|
|
fDealQuantity := Rec.ValueByName('DealQuantity').AsFloat;
|
|
fQuantity := Rec.ValueByName('Quantity').AsFloat;
|
|
fQuantity := Rec.ValueByName('Quantity').AsFloat;
|
|
fEndDealQuantity := Rec.ValueByName('EndDealQuantity').AsFloat;
|
|
fEndDealQuantity := Rec.ValueByName('EndDealQuantity').AsFloat;
|
|
|
|
+ fCompare := TProjectData(FBillsGatherData.ProjectData).ProjProperties.DecimalManager.Common.Quantity.CompareValue;
|
|
case SupportManager.ConfigInfo.OverRangeType of
|
|
case SupportManager.ConfigInfo.OverRangeType of
|
|
- 0: Result := fEndDealQuantity > fQuantity;
|
|
|
|
- 1: Result := fEndDealQuantity > fDealQuantity;
|
|
|
|
- 2: Result := (fEndDealQuantity > fQuantity) or (fEndDealQuantity > fDealQuantity);
|
|
|
|
|
|
+ 0: Result := QuantityRoundTo(fEndDealQuantity - fQuantity) > fCompare;
|
|
|
|
+ 1: Result := QuantityRoundTo(fEndDealQuantity - fDealQuantity) > fCompare;
|
|
|
|
+ 2: Result := (QuantityRoundTo(fEndDealQuantity - fQuantity) > fCompare)
|
|
|
|
+ or (QuantityRoundTo(fEndDealQuantity - fQuantity) > fCompare);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|