Listing: 1 IMPLEMENTATION MODULE InvReports; 2 (* 3 * ModBase 4 * Release 3.0 5 * (c) Copyright 1986 - 1991 PMI 6 * P.O. Box 8402 7 * Green Bay Wi 53308 8 * All Rights Reserved 9 * by Ed Ross 10 *) 11 12 13 14 FROM DBFInvoice IMPORT InvoiceRec,MoveInvoiceFromDBF, 15 OpenInvoiceDBF,CloseInvoiceDBF,InvoiceDBF; 16 FROM Invoice IMPORT MakeInvoicePrintLine,FInvoice; 17 FROM PosUtils IMPORT Equal; 18 FROM PMIGlobals IMPORT Today,TodayDays,NormalTitle,PMIScreens, 19 OpenReportDevice,CloseReportDevice; 20 FROM Customer IMPORT GetCustName; 21 FROM DBFCustomer IMPORT OpenCustomerDBF,CloseCustomerDBF; 22 FROM DBUtils IMPORT GetDateRange,PrintFrame; 23 FROM GenLists IMPORT GenList,ListInsert,DisposeList, 24 GetElmt,GetElmtAdr,NewList,ListLength,SortList; 25 FROM DateFunctions IMPORT Comparison,CompareDates,Date,DateToStr, 26 CardToDate,DaysSince1900; 27 FROM StrConv IMPORT RealToStr,CardinalToStr; 28 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append, 29 CAPstr,OverWrite,RightJustify,Center,SetLength; 30 FROM ModBase3 IMPORT ReadDBRec,CloseDBF,NumberRecords; 31 FROM M2Strings IMPORT Length,CompareStr,Assign; 32 FROM LowLevel IMPORT Fill; 33 FROM NumTypes IMPORT Real8; 34 IMPORT VWindows; 35 FROM ScrnUtl2 IMPORT CloseDisplayFrame; 36 FROM ScrnUtl1 IMPORT GetFieldRec,PutFieldRec,FieldNum,FieldListTotal; 37 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName, 38 DispCode,ContinueInput,CancelInput,SubmitInput,InputFieldRecord; 39 FROM FramePainter IMPORT ShowDisplayFrame,RedrawField; 40 FROM ControlUtils IMPORT Control,AddStrField,AddMenuItem; 41 FROM Prompts IMPORT Prompt,PromptStr,PromptYN; 42 FROM ScrnTypes IMPORT AFrameName, InitDisplayFrame,DisplayFile; ***** ^ duplicate identifier ***** ^ duplicate identifier ***** ^ duplicate identifier 43 FROM SYSTEM IMPORT ADDRESS,ADR,SIZE; 44 TYPE 45 InvCust = RECORD 46 Invoice : InvoiceRec; 47 CustName : ARRAY[0..40] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 48 END; ***** ^ not supported yet 49 50 51 VAR 52 IncludeSet : SET OF CHAR; ***** ^ not supported yet 53 StartDate, EndDate : Date; 54 PROCEDURE MakeInvoiceList(VAR InvList : GenList); 55 VAR 56 LI : LONGINT; 57 InvRec : InvCust; ***** ^ not supported yet 58 D : CARDINAL; 59 BEGIN 60 D := DaysSince1900(StartDate); (* adjust to days so I get =>, <=*) ***** ^ not supported yet ***** ^ not supported yet 61 CardToDate(D,StartDate); ***** ^ not supported yet ***** ^ not supported yet 62 D := DaysSince1900(EndDate); ***** ^ not supported yet ***** ^ not supported yet 63 INC(D); ***** ^ undeclared identifier ***** ^ not supported yet 64 CardToDate(D,EndDate); ***** ^ not supported yet ***** ^ not supported yet 65 NewList(InvList); ***** ^ not supported yet ***** ^ not supported yet 66 OpenInvoiceDBF(FALSE); (* Dont need the index *) ***** ^ not supported yet ***** ^ not supported yet 67 OpenCustomerDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 68 FOR LI := 1 TO NumberRecords(InvoiceDBF) DO ***** ^ not supported yet ***** ^ not supported yet 69 ReadDBRec(InvoiceDBF,LI); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 70 MoveInvoiceFromDBF(InvRec.Invoice); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 71 CrunchBlanks(InvRec.Invoice.INVOICE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 72 73 IF (InvRec.Invoice.INVPRNT IN IncludeSet) AND ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 74 (CompareDates(InvRec.Invoice.INVDATE,StartDate) = DateGreater) AND ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 75 (CompareDates(InvRec.Invoice.INVDATE,EndDate) = DateLess) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 76 THEN 77 GetCustName(InvRec.Invoice.CUSTID,InvRec.CustName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 78 ListInsert(InvRec,3,InvList,30000); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 79 END; 80 END; 81 CloseDBF(InvoiceDBF); ***** ^ not supported yet ***** ^ not supported yet 82 CloseCustomerDBF(); ***** ^ not supported yet ***** ^ not supported yet 83 END MakeInvoiceList; ***** ^ not supported yet 84 85 86 87 PROCEDURE SortByCustName(Item1 : ADDRESS; Size1 : CARDINAL; 88 Item2 : ADDRESS; Size2 : CARDINAL): INTEGER; 89 90 (* sort by name here becase want an alpha sort rather than CIN sort*) 91 92 VAR 93 P1, P2 : POINTER TO InvCust; ***** ^ not supported yet 94 BEGIN 95 P1 := Item1; ***** ^ not supported yet ***** ^ not supported yet 96 P2 := Item2; ***** ^ not supported yet ***** ^ not supported yet 97 IF NOT Equal(P1^.CustName,P2^.CustName) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 98 THEN 99 RETURN CompareStr(P1^.CustName,P2^.CustName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 100 ELSE 101 RETURN CompareStr(P1^.Invoice.INVOICE,P2^.Invoice.INVOICE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 102 END; 103 104 END SortByCustName; ***** ^ not supported yet 105 106 107 108 PROCEDURE SortByInvoiceNbr(Item1 : ADDRESS; Size1 : CARDINAL; 109 Item2 : ADDRESS; Size2 : CARDINAL): INTEGER; 110 111 (* sort by name here becase want an alpha sort rather than CIN sort*) 112 113 VAR 114 P1, P2 : POINTER TO InvCust; ***** ^ not supported yet 115 BEGIN 116 P1 := Item1; ***** ^ not supported yet ***** ^ not supported yet 117 P2 := Item2; ***** ^ not supported yet ***** ^ not supported yet 118 RETURN CompareStr(P1^.Invoice.INVOICE,P2^.Invoice.INVOICE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 119 END SortByInvoiceNbr; ***** ^ not supported yet 120 121 122 PROCEDURE InvHistory(); 123 VAR 124 J : CARDINAL; 125 InvTotal : Real8; 126 InvRec : InvCust; ***** ^ not supported yet 127 InvList : GenList; 128 Code : CARDINAL; 129 FieldRec : InputFieldRecord; 130 DF : DisplayFrame; 131 DF2 : DisplayFrame; 132 B : BOOLEAN; 133 Str : ARRAY[0..12] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 134 Line : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 135 NbrO,NbrP,NbrC : CARDINAL; 136 InvTotP,InvTotO,InvTotC : Real8; 137 InvNetP,InvNetO,InvNetC : Real8; 138 Handle : CARDINAL; 139 140 PROCEDURE DisplayTotals(); 141 142 BEGIN 143 144 ShowDisplayFrame(DF,1,1,80,24); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 145 DF2^.startcol := 5; ***** ^ not supported yet ***** ^ not supported yet 146 DF2^.endcol := 75; ***** ^ not supported yet ***** ^ not supported yet 147 DF2^.startrow := 5; ***** ^ not supported yet ***** ^ not supported yet 148 DF2^.endrow := 20; ***** ^ not supported yet ***** ^ not supported yet 149 150 151 AddStrField(DF,2,2, ***** ^ not supported yet ***** ^ not supported yet 152 ' Num Net Total',50); ***** ^ not supported yet ***** ^ not supported yet 153 Fill(ADR(Line),SIZE(Line),' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 154 OverWrite(' Outstanding ',Line,3); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 155 CardinalToStr(NbrO,3,Str); ***** ^ not supported yet ***** ^ not supported yet 156 OverWrite(Str,Line,13); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 157 158 RealToStr(InvNetO,2,8,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 159 OverWrite(Str,Line,22); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 160 RealToStr(InvTotO,2,8,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 161 OverWrite(Str,Line,34); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 162 AddStrField(DF2,2,4,Line,50); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 163 164 Fill(ADR(Line),SIZE(Line),' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 165 OverWrite(' Posted ',Line,3); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 166 CardinalToStr(NbrP,3,Str); ***** ^ not supported yet ***** ^ not supported yet 167 OverWrite(Str,Line,13); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 168 169 RealToStr(InvNetP,2,8,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 170 OverWrite(Str,Line,22); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 171 RealToStr(InvTotP,2,8,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 172 OverWrite(Str,Line,32); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 173 AddStrField(DF2,2,5,Line,50); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 174 175 Fill(ADR(Line),SIZE(Line),' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 176 OverWrite(' Closed ',Line,3); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 177 CardinalToStr(NbrC,3,Str); ***** ^ not supported yet ***** ^ not supported yet 178 OverWrite(Str,Line,13); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 179 180 RealToStr(InvNetC,2,8,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 181 OverWrite(Str,Line,22); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 182 RealToStr(InvTotC,2,8,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 183 OverWrite(Str,Line,32); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 184 AddStrField(DF2,2,6,Line,50); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 185 186 ShowDisplayFrame(DF2,0,0,0,0); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 187 Control(DF2); ***** ^ not supported yet ***** ^ not supported yet 188 189 190 END DisplayTotals; ***** ^ not supported yet 191 192 BEGIN 193 GetDateRange(StartDate,EndDate,PMIScreens); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 194 IncludeSet := IncludeSet / IncludeSet; (* clear the set *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 195 INCL(IncludeSet,'P'); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 196 INCL(IncludeSet,'O'); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 197 INCL(IncludeSet,'C'); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 198 MakeInvoiceList(InvList); ***** ^ not supported yet ***** ^ not supported yet 199 NbrO := 0; 200 NbrP := 0; 201 NbrC := 0; 202 InvTotP := 0.0; ***** ^ not supported yet 203 InvTotO := 0.0; ***** ^ not supported yet 204 InvTotC := 0.0; ***** ^ not supported yet 205 InvNetO := 0.0; ***** ^ not supported yet 206 InvNetP := 0.0; ***** ^ not supported yet 207 InvNetC := 0.0; ***** ^ not supported yet 208 209 InitDisplayFrame(DF,VWindows.CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 210 InitDisplayFrame(DF2,VWindows.CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 211 AddStrField(DF,2,2, ***** ^ not supported yet ***** ^ not supported yet 212 'Inv Nbr Customer Name Date Inv Total OutStd Stat',79); ***** ^ not supported yet ***** ^ not supported yet 213 GetFieldRec(DF,1,FieldRec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 214 FieldRec.typ := DispCode; (* headline = display code *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 215 PutFieldRec(FieldRec,DF,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 216 DF^.headline := 2; ***** ^ not supported yet ***** ^ not supported yet 217 218 219 FOR J := 1 TO ListLength(InvList) DO ***** ^ not supported yet ***** ^ not supported yet 220 GetElmt(InvList,J,InvRec,Code); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 221 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 222 Line[77] := 0C; ***** ^ not supported yet ***** ^ not supported yet 223 224 CASE InvRec.Invoice.INVPRNT OF ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 225 'O' :INC(NbrO); ***** ^ undeclared identifier ***** ^ not supported yet 226 InvTotO := InvTotO + InvRec.Invoice.TOTALAMT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 227 InvNetO := InvNetO + InvRec.Invoice.INVNET; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 228 |'P' :INC(NbrP); ***** ^ undeclared identifier ***** ^ not supported yet 229 InvTotP := InvTotP + InvRec.Invoice.TOTALAMT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 230 InvNetP := InvNetP + InvRec.Invoice.INVNET; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 231 |'C' :INC(NbrC); ***** ^ undeclared identifier ***** ^ not supported yet 232 InvTotC := InvTotC + InvRec.Invoice.TOTALAMT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 233 InvNetC := InvNetC + InvRec.Invoice.INVNET; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 234 END; 235 236 OverWrite(InvRec.Invoice.INVOICE,Line,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 237 SetLength(InvRec.CustName,25); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 238 OverWrite(InvRec.CustName,Line,11); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 239 240 DateToStr(InvRec.Invoice.INVDATE,Str,B); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 241 OverWrite(Str,Line,40); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 242 RealToStr(InvRec.Invoice.TOTALAMT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 243 OverWrite(Str,Line,49); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 244 245 RealToStr(InvRec.Invoice.AMTOUT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 246 OverWrite(Str,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 247 OverWrite(InvRec.Invoice.INVPRNT,Line,75); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 248 AddMenuItem(DF,2,J+2,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 249 END; 250 DisposeList(InvList); ***** ^ not supported yet ***** ^ not supported yet 251 (* DisplayTotals(); *) 252 253 Control(DF); ***** ^ not supported yet ***** ^ not supported yet 254 DisplayTotals(); ***** ^ not supported yet ***** ^ not supported yet 255 IF PromptYN(' Print Report ',DF) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 256 THEN 257 Line := 'INVOICE HISTORY'; ***** ^ not supported yet ***** ^ not supported yet 258 NormalTitle(Line); ***** ^ not supported yet ***** ^ not supported yet 259 Handle := OpenReportDevice (); ***** ^ not supported yet ***** ^ not supported yet 260 PrintFrame(DF,Handle); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 261 Line := 'Invoice Totals '; ***** ^ not supported yet ***** ^ not supported yet 262 NormalTitle(Line); ***** ^ not supported yet ***** ^ not supported yet 263 PrintFrame(DF2,Handle); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 264 CloseReportDevice(Handle); ***** ^ not supported yet ***** ^ not supported yet 265 END; 266 CloseDisplayFrame(DF); ***** ^ not supported yet ***** ^ not supported yet 267 CloseDisplayFrame(DF2); ***** ^ not supported yet ***** ^ not supported yet 268 269 270 END InvHistory; ***** ^ not supported yet 271 272 273 274 275 PROCEDURE InvOutstanding(); 276 VAR 277 J : CARDINAL; 278 InvTotal : Real8; 279 InvRec : InvCust; ***** ^ not supported yet 280 InvList : GenList; 281 Code : CARDINAL; 282 FieldRec : InputFieldRecord; 283 DF : DisplayFrame; 284 B : BOOLEAN; 285 Str : ARRAY[0..12] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 286 Line : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 287 LastCust : ARRAY[0..40] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 288 CustTotal: Real8; 289 TotalOut : Real8; 290 LineCnt : CARDINAL; 291 Handle : CARDINAL; 292 293 PROCEDURE MakeLine(); 294 BEGIN 295 OverWrite(InvRec.Invoice.INVOICE,Line,30); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 296 DateToStr(InvRec.Invoice.INVDATE,Str,B); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 297 OverWrite(Str,Line,40); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 298 RealToStr(InvRec.Invoice.TOTALAMT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 299 OverWrite(Str,Line,49); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 300 RealToStr(InvRec.Invoice.AMTOUT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 301 OverWrite(Str,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 302 OverWrite(InvRec.Invoice.INVPRNT,Line,75); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 303 END MakeLine; ***** ^ not supported yet 304 305 BEGIN 306 GetDateRange(StartDate,EndDate,PMIScreens); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 307 IncludeSet := IncludeSet / IncludeSet; (* clear the set *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 308 INCL(IncludeSet,'P'); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 309 MakeInvoiceList(InvList); ***** ^ not supported yet ***** ^ not supported yet 310 SortList(InvList,SortByCustName); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 311 InitDisplayFrame(DF,VWindows.CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 312 AddStrField(DF,2,2, ***** ^ not supported yet ***** ^ not supported yet 313 ' Customer Name Invoice Date Inv Total OutStd Stat',79); ***** ^ not supported yet ***** ^ not supported yet 314 GetFieldRec(DF,1,FieldRec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 315 FieldRec.typ := DispCode; (* headline = display code *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 316 PutFieldRec(FieldRec,DF,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 317 DF^.headline := 2; ***** ^ not supported yet ***** ^ not supported yet 318 319 LastCust := ''; ***** ^ not supported yet ***** ^ incompatible assignment 320 CustTotal := 0.0; ***** ^ not supported yet 321 TotalOut := 0.0; ***** ^ not supported yet 322 LineCnt := 2; 323 FOR J := 1 TO ListLength(InvList) DO ***** ^ not supported yet ***** ^ not supported yet 324 INC(LineCnt); ***** ^ undeclared identifier ***** ^ not supported yet 325 GetElmt(InvList,J,InvRec,Code); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 326 SetLength(InvRec.CustName,25); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 327 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 328 Line[78] := 0C; ***** ^ not supported yet ***** ^ not supported yet 329 IF LastCust[0] = 0C (* first time *) ***** ^ not supported yet ***** ^ not supported yet 330 THEN 331 Assign( InvRec.CustName,LastCust ); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 332 OverWrite(InvRec.CustName,Line,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 333 END; 334 TotalOut := TotalOut + InvRec.Invoice.AMTOUT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 335 IF Equal(LastCust,InvRec.CustName) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 336 THEN 337 CustTotal := CustTotal + InvRec.Invoice.AMTOUT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 338 MakeLine(); ***** ^ not supported yet ***** ^ not supported yet 339 AddMenuItem(DF,2,LineCnt,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 340 ELSE 341 OverWrite('===========',Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 342 AddMenuItem(DF,2,LineCnt,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 343 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 344 Line[78] := 0C; ***** ^ not supported yet ***** ^ not supported yet 345 RealToStr(CustTotal,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 346 OverWrite(Str,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 347 AddMenuItem(DF,2,LineCnt+1,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 348 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 349 Line[78] := 0C; ***** ^ not supported yet ***** ^ not supported yet 350 AddMenuItem(DF,2,LineCnt+2,Line,78,0,' '); (* add blank line *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 351 Assign( InvRec.CustName,LastCust); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 352 SetLength(InvRec.CustName,25); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 353 OverWrite(InvRec.CustName,Line,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 354 CustTotal := InvRec.Invoice.AMTOUT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 355 MakeLine(); ***** ^ not supported yet ***** ^ not supported yet 356 AddMenuItem(DF,2,LineCnt+3,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 357 INC(LineCnt,3); ***** ^ undeclared identifier ***** ^ not supported yet 358 END; 359 360 END; 361 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 362 Line[78] := 0C; ***** ^ not supported yet ***** ^ not supported yet 363 OverWrite('===========',Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 364 AddMenuItem(DF,2,LineCnt+1,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 365 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 366 Line[78] := 0C; ***** ^ not supported yet ***** ^ not supported yet 367 RealToStr(CustTotal,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 368 OverWrite(Str,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 369 AddMenuItem(DF,2,LineCnt+2,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 370 371 372 OverWrite('===========',Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 373 AddMenuItem(DF,2,LineCnt+3,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 374 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 375 Line[78] := 0C; ***** ^ not supported yet ***** ^ not supported yet 376 OverWrite(' Total outstanding ',Line,2); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 377 RealToStr(TotalOut,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 378 OverWrite(Str,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 379 AddMenuItem(DF,2,LineCnt+4,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 380 381 382 383 DisposeList(InvList); ***** ^ not supported yet ***** ^ not supported yet 384 ShowDisplayFrame(DF,1,1,80,24); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 385 Control(DF); ***** ^ not supported yet ***** ^ not supported yet 386 IF PromptYN(' Print Report ',DF) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 387 THEN 388 Line := 'INVOICE HISTORY'; ***** ^ not supported yet ***** ^ not supported yet 389 NormalTitle(Line); ***** ^ not supported yet ***** ^ not supported yet 390 Handle := OpenReportDevice(); ***** ^ not supported yet ***** ^ not supported yet 391 PrintFrame(DF,Handle); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 392 CloseReportDevice(Handle); ***** ^ not supported yet ***** ^ not supported yet 393 END; 394 CloseDisplayFrame(DF); ***** ^ not supported yet ***** ^ not supported yet 395 396 397 END InvOutstanding; ***** ^ not supported yet 398 399 400 401 402 PROCEDURE InvOutByDate(); 403 404 VAR 405 J : CARDINAL; 406 InvTotal : Real8; 407 InvRec : InvCust; ***** ^ not supported yet 408 InvList : GenList; 409 Code : CARDINAL; 410 FieldRec : InputFieldRecord; 411 DF : DisplayFrame; 412 B : BOOLEAN; 413 Str : ARRAY[0..12] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 414 Line : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 415 Days : CARDINAL; 416 Handle : CARDINAL; 417 BEGIN 418 GetDateRange(StartDate,EndDate,PMIScreens); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 419 IncludeSet := IncludeSet / IncludeSet; (* clear the set *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 420 INCL(IncludeSet,'P'); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 421 MakeInvoiceList(InvList); ***** ^ not supported yet ***** ^ not supported yet 422 SortList(InvList,SortByInvoiceNbr); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 423 InitDisplayFrame(DF,VWindows.CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 424 AddStrField(DF,2,2, ***** ^ not supported yet ***** ^ not supported yet 425 'Inv Nbr Customer Name Date Inv Total OutStd Late',79); ***** ^ not supported yet ***** ^ not supported yet 426 GetFieldRec(DF,1,FieldRec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 427 FieldRec.typ := DispCode; (* headline = display code *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 428 PutFieldRec(FieldRec,DF,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 429 DF^.headline := 2; ***** ^ not supported yet ***** ^ not supported yet 430 431 432 FOR J := 1 TO ListLength(InvList) DO ***** ^ not supported yet ***** ^ not supported yet 433 GetElmt(InvList,J,InvRec,Code); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 434 Fill(ADR(Line),80,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 435 Line[77] := 0C; ***** ^ not supported yet ***** ^ not supported yet 436 OverWrite(InvRec.Invoice.INVOICE,Line,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 437 SetLength(InvRec.CustName,25); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 438 OverWrite(InvRec.CustName,Line,11); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 439 DateToStr(InvRec.Invoice.INVDATE,Str,B); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 440 OverWrite(Str,Line,40); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 441 RealToStr(InvRec.Invoice.TOTALAMT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 442 OverWrite(Str,Line,49); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 443 444 RealToStr(InvRec.Invoice.AMTOUT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 445 OverWrite(Str,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 446 447 448 CardinalToStr(TodayDays -DaysSince1900(InvRec.Invoice.INVDATE),3,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 449 OverWrite(Str,Line,72); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 450 AddMenuItem(DF,2,J+2,Line,78,0,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 451 END; 452 DisposeList(InvList); ***** ^ not supported yet ***** ^ not supported yet 453 ShowDisplayFrame(DF,1,1,80,24); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 454 Control(DF); ***** ^ not supported yet ***** ^ not supported yet 455 IF PromptYN(' Print Report ',DF) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 456 THEN 457 Line := 'INVOICE HISTORY'; ***** ^ not supported yet ***** ^ not supported yet 458 NormalTitle(Line); ***** ^ not supported yet ***** ^ not supported yet 459 Handle := OpenReportDevice(); ***** ^ not supported yet ***** ^ not supported yet 460 PrintFrame(DF,Handle); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 461 CloseReportDevice(Handle); ***** ^ not supported yet ***** ^ not supported yet 462 END; 463 CloseDisplayFrame(DF); ***** ^ not supported yet ***** ^ not supported yet 464 END InvOutByDate; ***** ^ not supported yet 465 466 467 468 END InvReports. ***** ^ not supported yet 830 errors