|
Packs the date variable and returns it in byte-format. For example date "23/02/2011" will return (given in HEX values) "05 00 06 00 17 00 02 07 DB 00 00" where 5th byte is the date 7th byte is day and 8th,9th byte is year. |
|
ToBePacked |
Date that will be returned in byte format |
|
procedure PrintAT2FYWrofRn(record RcVc RepSpec)
BEGIN
Integer rw;
string 255 tstr,tstr2;
string 30 frinv,toinv;
record CYBlock CYb;
row YearBlock Ybrw;
FindFiscalYearBlockRow(RepSpec.sStartDate,Ybrw);
BlockLoad(CYb);
frinv = FirstInRange(RepSpec.f2,30);
toinv = LastInRange(RepSpec.f2,30);
rw = 1;
// HT2Per(RepSpec.sStartDate,RepSpec.sEndDate,tstr);
// Header(rw, tstr, 1);
Header(rw,Ybrw.YearCode, 1);
rw = rw + 1;
tstr2 = PackStrDate(Ybrw.StartDate);
tstr = USetStr(17353) & " ";
tstr = tstr & tstr2;
tstr = tstr & " : ";
tstr2 = PackStrDate(Ybrw.EndDate);
tstr = tstr & tstr2;
Header(rw,tstr,0);
Header(rw,USetStr(17350),1);
rw = rw + 1;
Header(rw,CYb.VATNr, 0);
if (nonblank(CYb.LineOfBusiness)) then begin
Header(rw,CYb.LineOfBusiness,1);
end;
rw = rw + 1;
HTModel(RepSpec.flags[1],tstr);
Header(rw, tstr, 0);
HTInventoryNrs(frinv,toinv,tstr);
Header(rw, tstr, 1);
rw = rw + 1;
tstr = USetStr(17354) & ": ";
if (RepSpec.flags[9]==0) then begin
tstr = tstr & USetStr(17355);
end else begin
tstr = tstr & USetStr(17356);
end;
Header(rw,tstr,0);
HTAssetType(RepSpec.flags[5],RepSpec.flags[6],RepSpec.flags[7],0,tstr);
Header(rw, tstr, 1);
rw = rw + 1;
HTValuesPerMonth(RepSpec.Comparison,tstr);
Header(rw, tstr, 0);
if (RepSpec.flags[2]==0) then begin
Header(rw, USetStr(17351), 1);
end else begin
Header(rw,USetStr(17352), 1);
end;
rw = rw + 1;
if (nonblank(RepSpec.f1)) then begin
tstr = USetStr(7111);
tstr = tstr & " ";
tstr = tstr & RepSpec.f1;
Header(rw, tstr, 1);
rw = rw + 1;
end;
return;
end;
|
««