Ignore:
Timestamp:
May 7, 2015, 12:34:29 PM (9 years ago)
Author:
healthsevak
Message:

Updating the working copy to CPRS version 28

File:
1 edited

Legend:

Unmodified
Added
Removed
  • cprs/trunk/CPRS-Chart/Orders/fOrdersRenew.pas

    r829 r1679  
    262262  FixHeaderControlDelphi2006Bug(hdrOrders);
    263263  OKPressed := False;
     264  hdrOrders.Sections[0].Width := Round(self.width * 0.75);
     265  hdrOrders.Sections[1].Width := Round(self.width * 0.25);
    264266  ResizeFormToFont(Self);
    265   SetFormPosition(Self); 
     267  SetFormPosition(Self);
    266268end;
    267269
     
    410412var
    411413  ARect: TRect;
    412 begin
     414  cnt: integer;
     415  x: string;
     416begin
     417  cnt := 0;
    413418  ARect.Left := 0;
    414419  ARect.Top := 0;
     
    416421  ARect.Right := hdrOrders.Sections[Column].Width -6;
    417422  Result := WrappedTextHeightByFont(lstOrders.Canvas,lstOrders.Font,TheOrderText,ARect);
     423  //AGP 28.0 this fix address the issue of WrappedTextHeightByFont appearing to not take in account CRLF
     424  if Pos(CRLF, TheOrderText) > 0 then
     425    begin
     426      repeat
     427        x := Copy(TheOrderText, 1, Pos(CRLF, TheOrderText) - 1);
     428        if Length(x) = 0 then x := TheOrderText;
     429        Delete(TheOrderText, 1, Length(x) + 2);  {delete text + CRLF}
     430        cnt := cnt + 1;
     431      until TheOrderText = '';
     432      if cnt > 0 then Result := Result + (cnt * Abs(self.Font.Height));
     433      if Result > 255 then Result := 255;
     434    end;
     435 
    418436end;
    419437
     
    423441  OIInfo,FillerID: string;
    424442  AnOIList: TStringList;
     443  subI: integer;
    425444begin
    426445  AnOIList := TStringList.Create;
    427446  OIInfo := DataForOrderCheck(AnOrderID);
    428447  FillerID := Piece(OIInfo,'^',2);
    429   AnOIList.Add(OIInfo);
    430   OrderChecksOnAccept(OCList, FillerID, '', AnOIList, AnOrderID);
     448  subI := 1;
     449  while Length(Piece(OIInfo,'|',subI))>1 do
     450  begin
     451    AnOIList.Add(Piece(OIInfo,'|',subI));
     452    subI := subI + 1;
     453  end;
     454  OrderChecksOnAccept(OCList, FillerID, '', AnOIList, AnOrderID,'1');
    431455  Result :=  AcceptOrderWithChecks(OCList);
    432456end;
Note: See TracChangeset for help on using the changeset viewer.