Changeset 8 for trunk/EdcProject.pas


Ignore:
Timestamp:
Apr 13, 2026, 11:12:39 PM (2 weeks ago)
Author:
chronos
Message:
  • Fixed: Data tab populating and refreshing.
  • Fixed: Used currency as decimal type for measured values instead inaccurate double type.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/EdcProject.pas

    r7 r8  
    147147  TimeFrom: TDateTime;
    148148  TimeTo: TDateTime;
    149   CellValueIn: Double;
    150   CellValueOut: Double;
     149  CellValueIn: Currency;
     150  CellValueOut: Currency;
    151151  Ean: TEan;
    152152  EanKind: TEanKind;
    153153  Number: string;
     154  A: Currency;
    154155begin
    155156  CSVDoc := TCSVDocument.Create;
     
    186187
    187188        CellValueIn := 0;
    188         if TryStrToFloat(CSVDoc.Cells[3 + C * 2, R], CellValueIn) then begin
     189        if TryStrToCurr(CSVDoc.Cells[3 + C * 2, R], CellValueIn) then begin
    189190          if EanKind = ekConsumption then CellValueIn := -CellValueIn;
    190191        end;
    191192
    192193        CellValueOut := 0;
    193         if TryStrToFloat(CSVDoc.Cells[3 + C * 2 + 1, R], CellValueOut) then begin
     194        if TryStrToCurr(CSVDoc.Cells[3 + C * 2 + 1, R], CellValueOut) then begin
    194195          if EanKind = ekConsumption then CellValueOut := -CellValueOut;
    195196        end;
Note: See TracChangeset for help on using the changeset viewer.