Table of Content
HAL Forum
function Date StringToDate (
String datestr)
Description:
Data conversion - from String to Date
Parameters:
datestr String with date
global
procedure GetBasedOnDate(string custcode,Date orddatep,Date despatchdatep,string planship,var Date resp)
BEGIN
  record CUVc CUr;

  CUr.Code = custcode;
  if (ReadFirstMain(CUr,1,true)) then begin
    if (CUr.PriceBasedOn==2) then begin
      resp = despatchdatep;
    end;  
    if (CUr.PriceBasedOn==1) then begin
      resp = StringToDate(planship);
    end;
    if ((CUr.PriceBasedOn!=1) and (CUr.PriceBasedOn!=2)) then begin      
      resp = orddatep;
    end;
  end else begin
    resp = orddatep;
  end;
  RETURN;
END;
Related topics:
««