INVREPOR.LST 51 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265126612671268126912701271127212731274127512761277127812791280128112821283128412851286128712881289129012911292129312941295129612971298129913001301130213031304
  1. Listing:
  2. 1 IMPLEMENTATION MODULE InvReports;
  3. 2 (*
  4. 3 * ModBase
  5. 4 * Release 3.0
  6. 5 * (c) Copyright 1986 - 1991 PMI
  7. 6 * P.O. Box 8402
  8. 7 * Green Bay Wi 53308
  9. 8 * All Rights Reserved
  10. 9 * by Ed Ross
  11. 10 *)
  12. 11
  13. 12
  14. 13
  15. 14 FROM DBFInvoice IMPORT InvoiceRec,MoveInvoiceFromDBF,
  16. 15 OpenInvoiceDBF,CloseInvoiceDBF,InvoiceDBF;
  17. 16 FROM Invoice IMPORT MakeInvoicePrintLine,FInvoice;
  18. 17 FROM PosUtils IMPORT Equal;
  19. 18 FROM PMIGlobals IMPORT Today,TodayDays,NormalTitle,PMIScreens,
  20. 19 OpenReportDevice,CloseReportDevice;
  21. 20 FROM Customer IMPORT GetCustName;
  22. 21 FROM DBFCustomer IMPORT OpenCustomerDBF,CloseCustomerDBF;
  23. 22 FROM DBUtils IMPORT GetDateRange,PrintFrame;
  24. 23 FROM GenLists IMPORT GenList,ListInsert,DisposeList,
  25. 24 GetElmt,GetElmtAdr,NewList,ListLength,SortList;
  26. 25 FROM DateFunctions IMPORT Comparison,CompareDates,Date,DateToStr,
  27. 26 CardToDate,DaysSince1900;
  28. 27 FROM StrConv IMPORT RealToStr,CardinalToStr;
  29. 28 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append,
  30. 29 CAPstr,OverWrite,RightJustify,Center,SetLength;
  31. 30 FROM ModBase3 IMPORT ReadDBRec,CloseDBF,NumberRecords;
  32. 31 FROM M2Strings IMPORT Length,CompareStr,Assign;
  33. 32 FROM LowLevel IMPORT Fill;
  34. 33 FROM NumTypes IMPORT Real8;
  35. 34 IMPORT VWindows;
  36. 35 FROM ScrnUtl2 IMPORT CloseDisplayFrame;
  37. 36 FROM ScrnUtl1 IMPORT GetFieldRec,PutFieldRec,FieldNum,FieldListTotal;
  38. 37 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName,
  39. 38 DispCode,ContinueInput,CancelInput,SubmitInput,InputFieldRecord;
  40. 39 FROM FramePainter IMPORT ShowDisplayFrame,RedrawField;
  41. 40 FROM ControlUtils IMPORT Control,AddStrField,AddMenuItem;
  42. 41 FROM Prompts IMPORT Prompt,PromptStr,PromptYN;
  43. 42 FROM ScrnTypes IMPORT AFrameName, InitDisplayFrame,DisplayFile;
  44. ***** ^ duplicate identifier
  45. ***** ^ duplicate identifier
  46. ***** ^ duplicate identifier
  47. 43 FROM SYSTEM IMPORT ADDRESS,ADR,SIZE;
  48. 44 TYPE
  49. 45 InvCust = RECORD
  50. 46 Invoice : InvoiceRec;
  51. 47 CustName : ARRAY[0..40] OF CHAR;
  52. ***** ^ not supported yet
  53. ***** ^ not supported yet
  54. 48 END;
  55. ***** ^ not supported yet
  56. 49
  57. 50
  58. 51 VAR
  59. 52 IncludeSet : SET OF CHAR;
  60. ***** ^ not supported yet
  61. 53 StartDate, EndDate : Date;
  62. 54 PROCEDURE MakeInvoiceList(VAR InvList : GenList);
  63. 55 VAR
  64. 56 LI : LONGINT;
  65. 57 InvRec : InvCust;
  66. ***** ^ not supported yet
  67. 58 D : CARDINAL;
  68. 59 BEGIN
  69. 60 D := DaysSince1900(StartDate); (* adjust to days so I get =>, <=*)
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 61 CardToDate(D,StartDate);
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 62 D := DaysSince1900(EndDate);
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. 63 INC(D);
  79. ***** ^ undeclared identifier
  80. ***** ^ not supported yet
  81. 64 CardToDate(D,EndDate);
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. 65 NewList(InvList);
  85. ***** ^ not supported yet
  86. ***** ^ not supported yet
  87. 66 OpenInvoiceDBF(FALSE); (* Dont need the index *)
  88. ***** ^ not supported yet
  89. ***** ^ not supported yet
  90. 67 OpenCustomerDBF(TRUE);
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 68 FOR LI := 1 TO NumberRecords(InvoiceDBF) DO
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. 69 ReadDBRec(InvoiceDBF,LI);
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 70 MoveInvoiceFromDBF(InvRec.Invoice);
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. 71 CrunchBlanks(InvRec.Invoice.INVOICE);
  105. ***** ^ not supported yet
  106. ***** ^ not supported yet
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. 72
  110. 73 IF (InvRec.Invoice.INVPRNT IN IncludeSet) AND
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. ***** ^ not supported yet
  115. 74 (CompareDates(InvRec.Invoice.INVDATE,StartDate) = DateGreater) AND
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. ***** ^ undeclared identifier
  122. 75 (CompareDates(InvRec.Invoice.INVDATE,EndDate) = DateLess)
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. ***** ^ undeclared identifier
  129. 76 THEN
  130. 77 GetCustName(InvRec.Invoice.CUSTID,InvRec.CustName);
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. 78 ListInsert(InvRec,3,InvList,30000);
  138. ***** ^ not supported yet
  139. ***** ^ not supported yet
  140. ***** ^ not supported yet
  141. ***** ^ not supported yet
  142. 79 END;
  143. 80 END;
  144. 81 CloseDBF(InvoiceDBF);
  145. ***** ^ not supported yet
  146. ***** ^ not supported yet
  147. 82 CloseCustomerDBF();
  148. ***** ^ not supported yet
  149. ***** ^ not supported yet
  150. 83 END MakeInvoiceList;
  151. ***** ^ not supported yet
  152. 84
  153. 85
  154. 86
  155. 87 PROCEDURE SortByCustName(Item1 : ADDRESS; Size1 : CARDINAL;
  156. 88 Item2 : ADDRESS; Size2 : CARDINAL): INTEGER;
  157. 89
  158. 90 (* sort by name here becase want an alpha sort rather than CIN sort*)
  159. 91
  160. 92 VAR
  161. 93 P1, P2 : POINTER TO InvCust;
  162. ***** ^ not supported yet
  163. 94 BEGIN
  164. 95 P1 := Item1;
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. 96 P2 := Item2;
  168. ***** ^ not supported yet
  169. ***** ^ not supported yet
  170. 97 IF NOT Equal(P1^.CustName,P2^.CustName)
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. ***** ^ not supported yet
  176. 98 THEN
  177. 99 RETURN CompareStr(P1^.CustName,P2^.CustName);
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. 100 ELSE
  184. 101 RETURN CompareStr(P1^.Invoice.INVOICE,P2^.Invoice.INVOICE);
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. ***** ^ not supported yet
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. 102 END;
  193. 103
  194. 104 END SortByCustName;
  195. ***** ^ not supported yet
  196. 105
  197. 106
  198. 107
  199. 108 PROCEDURE SortByInvoiceNbr(Item1 : ADDRESS; Size1 : CARDINAL;
  200. 109 Item2 : ADDRESS; Size2 : CARDINAL): INTEGER;
  201. 110
  202. 111 (* sort by name here becase want an alpha sort rather than CIN sort*)
  203. 112
  204. 113 VAR
  205. 114 P1, P2 : POINTER TO InvCust;
  206. ***** ^ not supported yet
  207. 115 BEGIN
  208. 116 P1 := Item1;
  209. ***** ^ not supported yet
  210. ***** ^ not supported yet
  211. 117 P2 := Item2;
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 118 RETURN CompareStr(P1^.Invoice.INVOICE,P2^.Invoice.INVOICE);
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. ***** ^ not supported yet
  221. ***** ^ not supported yet
  222. 119 END SortByInvoiceNbr;
  223. ***** ^ not supported yet
  224. 120
  225. 121
  226. 122 PROCEDURE InvHistory();
  227. 123 VAR
  228. 124 J : CARDINAL;
  229. 125 InvTotal : Real8;
  230. 126 InvRec : InvCust;
  231. ***** ^ not supported yet
  232. 127 InvList : GenList;
  233. 128 Code : CARDINAL;
  234. 129 FieldRec : InputFieldRecord;
  235. 130 DF : DisplayFrame;
  236. 131 DF2 : DisplayFrame;
  237. 132 B : BOOLEAN;
  238. 133 Str : ARRAY[0..12] OF CHAR;
  239. ***** ^ not supported yet
  240. ***** ^ not supported yet
  241. 134 Line : ARRAY[0..80] OF CHAR;
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 135 NbrO,NbrP,NbrC : CARDINAL;
  245. 136 InvTotP,InvTotO,InvTotC : Real8;
  246. 137 InvNetP,InvNetO,InvNetC : Real8;
  247. 138 Handle : CARDINAL;
  248. 139
  249. 140 PROCEDURE DisplayTotals();
  250. 141
  251. 142 BEGIN
  252. 143
  253. 144 ShowDisplayFrame(DF,1,1,80,24);
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. 145 DF2^.startcol := 5;
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. 146 DF2^.endcol := 75;
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. 147 DF2^.startrow := 5;
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. 148 DF2^.endrow := 20;
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. 149
  270. 150
  271. 151 AddStrField(DF,2,2,
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. 152 ' Num Net Total',50);
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. 153 Fill(ADR(Line),SIZE(Line),' ');
  278. ***** ^ not supported yet
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. ***** ^ not supported yet
  284. 154 OverWrite(' Outstanding ',Line,3);
  285. ***** ^ not supported yet
  286. ***** ^ not supported yet
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. 155 CardinalToStr(NbrO,3,Str);
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. 156 OverWrite(Str,Line,13);
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. 157
  298. 158 RealToStr(InvNetO,2,8,Str);
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. 159 OverWrite(Str,Line,22);
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. 160 RealToStr(InvTotO,2,8,Str);
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. 161 OverWrite(Str,Line,34);
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 162 AddStrField(DF2,2,4,Line,50);
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 163
  322. 164 Fill(ADR(Line),SIZE(Line),' ');
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. ***** ^ not supported yet
  329. 165 OverWrite(' Posted ',Line,3);
  330. ***** ^ not supported yet
  331. ***** ^ not supported yet
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. 166 CardinalToStr(NbrP,3,Str);
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. 167 OverWrite(Str,Line,13);
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. ***** ^ not supported yet
  342. 168
  343. 169 RealToStr(InvNetP,2,8,Str);
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. ***** ^ not supported yet
  347. 170 OverWrite(Str,Line,22);
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. ***** ^ not supported yet
  352. 171 RealToStr(InvTotP,2,8,Str);
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. ***** ^ not supported yet
  356. 172 OverWrite(Str,Line,32);
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 173 AddStrField(DF2,2,5,Line,50);
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. 174
  367. 175 Fill(ADR(Line),SIZE(Line),' ');
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. ***** ^ not supported yet
  374. 176 OverWrite(' Closed ',Line,3);
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. ***** ^ not supported yet
  379. 177 CardinalToStr(NbrC,3,Str);
  380. ***** ^ not supported yet
  381. ***** ^ not supported yet
  382. 178 OverWrite(Str,Line,13);
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. ***** ^ not supported yet
  387. 179
  388. 180 RealToStr(InvNetC,2,8,Str);
  389. ***** ^ not supported yet
  390. ***** ^ not supported yet
  391. ***** ^ not supported yet
  392. 181 OverWrite(Str,Line,22);
  393. ***** ^ not supported yet
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 182 RealToStr(InvTotC,2,8,Str);
  398. ***** ^ not supported yet
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. 183 OverWrite(Str,Line,32);
  402. ***** ^ not supported yet
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. 184 AddStrField(DF2,2,6,Line,50);
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. ***** ^ not supported yet
  411. 185
  412. 186 ShowDisplayFrame(DF2,0,0,0,0);
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. ***** ^ not supported yet
  416. 187 Control(DF2);
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. 188
  420. 189
  421. 190 END DisplayTotals;
  422. ***** ^ not supported yet
  423. 191
  424. 192 BEGIN
  425. 193 GetDateRange(StartDate,EndDate,PMIScreens);
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. ***** ^ not supported yet
  429. ***** ^ not supported yet
  430. 194 IncludeSet := IncludeSet / IncludeSet; (* clear the set *)
  431. ***** ^ not supported yet
  432. ***** ^ not supported yet
  433. ***** ^ not supported yet
  434. 195 INCL(IncludeSet,'P');
  435. ***** ^ undeclared identifier
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. 196 INCL(IncludeSet,'O');
  439. ***** ^ undeclared identifier
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. 197 INCL(IncludeSet,'C');
  443. ***** ^ undeclared identifier
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. 198 MakeInvoiceList(InvList);
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. 199 NbrO := 0;
  450. 200 NbrP := 0;
  451. 201 NbrC := 0;
  452. 202 InvTotP := 0.0;
  453. ***** ^ not supported yet
  454. 203 InvTotO := 0.0;
  455. ***** ^ not supported yet
  456. 204 InvTotC := 0.0;
  457. ***** ^ not supported yet
  458. 205 InvNetO := 0.0;
  459. ***** ^ not supported yet
  460. 206 InvNetP := 0.0;
  461. ***** ^ not supported yet
  462. 207 InvNetC := 0.0;
  463. ***** ^ not supported yet
  464. 208
  465. 209 InitDisplayFrame(DF,VWindows.CurrentWindow);
  466. ***** ^ not supported yet
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. 210 InitDisplayFrame(DF2,VWindows.CurrentWindow);
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. 211 AddStrField(DF,2,2,
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 212 'Inv Nbr Customer Name Date Inv Total OutStd Stat',79);
  479. ***** ^ not supported yet
  480. ***** ^ not supported yet
  481. 213 GetFieldRec(DF,1,FieldRec);
  482. ***** ^ not supported yet
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. 214 FieldRec.typ := DispCode; (* headline = display code *)
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. 215 PutFieldRec(FieldRec,DF,1);
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. ***** ^ not supported yet
  493. ***** ^ not supported yet
  494. 216 DF^.headline := 2;
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 217
  498. 218
  499. 219 FOR J := 1 TO ListLength(InvList) DO
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. 220 GetElmt(InvList,J,InvRec,Code);
  503. ***** ^ not supported yet
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. 221 Fill(ADR(Line),80,' ');
  508. ***** ^ not supported yet
  509. ***** ^ not supported yet
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. 222 Line[77] := 0C;
  513. ***** ^ not supported yet
  514. ***** ^ not supported yet
  515. 223
  516. 224 CASE InvRec.Invoice.INVPRNT OF
  517. ***** ^ not supported yet
  518. ***** ^ not supported yet
  519. ***** ^ not supported yet
  520. 225 'O' :INC(NbrO);
  521. ***** ^ undeclared identifier
  522. ***** ^ not supported yet
  523. 226 InvTotO := InvTotO + InvRec.Invoice.TOTALAMT;
  524. ***** ^ not supported yet
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. 227 InvNetO := InvNetO + InvRec.Invoice.INVNET;
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. 228 |'P' :INC(NbrP);
  536. ***** ^ undeclared identifier
  537. ***** ^ not supported yet
  538. 229 InvTotP := InvTotP + InvRec.Invoice.TOTALAMT;
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. 230 InvNetP := InvNetP + InvRec.Invoice.INVNET;
  545. ***** ^ not supported yet
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. ***** ^ not supported yet
  550. 231 |'C' :INC(NbrC);
  551. ***** ^ undeclared identifier
  552. ***** ^ not supported yet
  553. 232 InvTotC := InvTotC + InvRec.Invoice.TOTALAMT;
  554. ***** ^ not supported yet
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. 233 InvNetC := InvNetC + InvRec.Invoice.INVNET;
  560. ***** ^ not supported yet
  561. ***** ^ not supported yet
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. 234 END;
  566. 235
  567. 236 OverWrite(InvRec.Invoice.INVOICE,Line,1);
  568. ***** ^ not supported yet
  569. ***** ^ not supported yet
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. 237 SetLength(InvRec.CustName,25);
  575. ***** ^ not supported yet
  576. ***** ^ not supported yet
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. 238 OverWrite(InvRec.CustName,Line,11);
  580. ***** ^ not supported yet
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. ***** ^ not supported yet
  585. 239
  586. 240 DateToStr(InvRec.Invoice.INVDATE,Str,B);
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. 241 OverWrite(Str,Line,40);
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. ***** ^ not supported yet
  598. 242 RealToStr(InvRec.Invoice.TOTALAMT,2,9,Str);
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. 243 OverWrite(Str,Line,49);
  605. ***** ^ not supported yet
  606. ***** ^ not supported yet
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. 244
  610. 245 RealToStr(InvRec.Invoice.AMTOUT,2,9,Str);
  611. ***** ^ not supported yet
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. ***** ^ not supported yet
  616. 246 OverWrite(Str,Line,58);
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. 247 OverWrite(InvRec.Invoice.INVPRNT,Line,75);
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. ***** ^ not supported yet
  625. ***** ^ not supported yet
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. 248 AddMenuItem(DF,2,J+2,Line,78,0,' ');
  629. ***** ^ not supported yet
  630. ***** ^ not supported yet
  631. ***** ^ not supported yet
  632. ***** ^ not supported yet
  633. 249 END;
  634. 250 DisposeList(InvList);
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. 251 (* DisplayTotals(); *)
  638. 252
  639. 253 Control(DF);
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. 254 DisplayTotals();
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. 255 IF PromptYN(' Print Report ',DF)
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. ***** ^ not supported yet
  649. 256 THEN
  650. 257 Line := 'INVOICE HISTORY';
  651. ***** ^ not supported yet
  652. ***** ^ not supported yet
  653. 258 NormalTitle(Line);
  654. ***** ^ not supported yet
  655. ***** ^ not supported yet
  656. 259 Handle := OpenReportDevice ();
  657. ***** ^ not supported yet
  658. ***** ^ not supported yet
  659. 260 PrintFrame(DF,Handle);
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. 261 Line := 'Invoice Totals ';
  664. ***** ^ not supported yet
  665. ***** ^ not supported yet
  666. 262 NormalTitle(Line);
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. 263 PrintFrame(DF2,Handle);
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. 264 CloseReportDevice(Handle);
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. 265 END;
  677. 266 CloseDisplayFrame(DF);
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. 267 CloseDisplayFrame(DF2);
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. 268
  684. 269
  685. 270 END InvHistory;
  686. ***** ^ not supported yet
  687. 271
  688. 272
  689. 273
  690. 274
  691. 275 PROCEDURE InvOutstanding();
  692. 276 VAR
  693. 277 J : CARDINAL;
  694. 278 InvTotal : Real8;
  695. 279 InvRec : InvCust;
  696. ***** ^ not supported yet
  697. 280 InvList : GenList;
  698. 281 Code : CARDINAL;
  699. 282 FieldRec : InputFieldRecord;
  700. 283 DF : DisplayFrame;
  701. 284 B : BOOLEAN;
  702. 285 Str : ARRAY[0..12] OF CHAR;
  703. ***** ^ not supported yet
  704. ***** ^ not supported yet
  705. 286 Line : ARRAY[0..80] OF CHAR;
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. 287 LastCust : ARRAY[0..40] OF CHAR;
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. 288 CustTotal: Real8;
  712. 289 TotalOut : Real8;
  713. 290 LineCnt : CARDINAL;
  714. 291 Handle : CARDINAL;
  715. 292
  716. 293 PROCEDURE MakeLine();
  717. 294 BEGIN
  718. 295 OverWrite(InvRec.Invoice.INVOICE,Line,30);
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. ***** ^ not supported yet
  722. ***** ^ not supported yet
  723. ***** ^ not supported yet
  724. ***** ^ not supported yet
  725. 296 DateToStr(InvRec.Invoice.INVDATE,Str,B);
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. ***** ^ not supported yet
  732. 297 OverWrite(Str,Line,40);
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. 298 RealToStr(InvRec.Invoice.TOTALAMT,2,9,Str);
  738. ***** ^ not supported yet
  739. ***** ^ not supported yet
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. ***** ^ not supported yet
  743. 299 OverWrite(Str,Line,49);
  744. ***** ^ not supported yet
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. 300 RealToStr(InvRec.Invoice.AMTOUT,2,9,Str);
  749. ***** ^ not supported yet
  750. ***** ^ not supported yet
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. 301 OverWrite(Str,Line,58);
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. ***** ^ not supported yet
  758. ***** ^ not supported yet
  759. 302 OverWrite(InvRec.Invoice.INVPRNT,Line,75);
  760. ***** ^ not supported yet
  761. ***** ^ not supported yet
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. ***** ^ not supported yet
  765. ***** ^ not supported yet
  766. 303 END MakeLine;
  767. ***** ^ not supported yet
  768. 304
  769. 305 BEGIN
  770. 306 GetDateRange(StartDate,EndDate,PMIScreens);
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. ***** ^ not supported yet
  774. ***** ^ not supported yet
  775. 307 IncludeSet := IncludeSet / IncludeSet; (* clear the set *)
  776. ***** ^ not supported yet
  777. ***** ^ not supported yet
  778. ***** ^ not supported yet
  779. 308 INCL(IncludeSet,'P');
  780. ***** ^ undeclared identifier
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. 309 MakeInvoiceList(InvList);
  784. ***** ^ not supported yet
  785. ***** ^ not supported yet
  786. 310 SortList(InvList,SortByCustName);
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. 311 InitDisplayFrame(DF,VWindows.CurrentWindow);
  791. ***** ^ not supported yet
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. ***** ^ not supported yet
  795. 312 AddStrField(DF,2,2,
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. 313 ' Customer Name Invoice Date Inv Total OutStd Stat',79);
  799. ***** ^ not supported yet
  800. ***** ^ not supported yet
  801. 314 GetFieldRec(DF,1,FieldRec);
  802. ***** ^ not supported yet
  803. ***** ^ not supported yet
  804. ***** ^ not supported yet
  805. 315 FieldRec.typ := DispCode; (* headline = display code *)
  806. ***** ^ not supported yet
  807. ***** ^ not supported yet
  808. ***** ^ not supported yet
  809. 316 PutFieldRec(FieldRec,DF,1);
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. ***** ^ not supported yet
  813. ***** ^ not supported yet
  814. 317 DF^.headline := 2;
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. 318
  818. 319 LastCust := '';
  819. ***** ^ not supported yet
  820. ***** ^ incompatible assignment
  821. 320 CustTotal := 0.0;
  822. ***** ^ not supported yet
  823. 321 TotalOut := 0.0;
  824. ***** ^ not supported yet
  825. 322 LineCnt := 2;
  826. 323 FOR J := 1 TO ListLength(InvList) DO
  827. ***** ^ not supported yet
  828. ***** ^ not supported yet
  829. 324 INC(LineCnt);
  830. ***** ^ undeclared identifier
  831. ***** ^ not supported yet
  832. 325 GetElmt(InvList,J,InvRec,Code);
  833. ***** ^ not supported yet
  834. ***** ^ not supported yet
  835. ***** ^ not supported yet
  836. ***** ^ not supported yet
  837. 326 SetLength(InvRec.CustName,25);
  838. ***** ^ not supported yet
  839. ***** ^ not supported yet
  840. ***** ^ not supported yet
  841. ***** ^ not supported yet
  842. 327 Fill(ADR(Line),80,' ');
  843. ***** ^ not supported yet
  844. ***** ^ not supported yet
  845. ***** ^ not supported yet
  846. ***** ^ not supported yet
  847. 328 Line[78] := 0C;
  848. ***** ^ not supported yet
  849. ***** ^ not supported yet
  850. 329 IF LastCust[0] = 0C (* first time *)
  851. ***** ^ not supported yet
  852. ***** ^ not supported yet
  853. 330 THEN
  854. 331 Assign( InvRec.CustName,LastCust );
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. ***** ^ not supported yet
  858. ***** ^ not supported yet
  859. 332 OverWrite(InvRec.CustName,Line,1);
  860. ***** ^ not supported yet
  861. ***** ^ not supported yet
  862. ***** ^ not supported yet
  863. ***** ^ not supported yet
  864. ***** ^ not supported yet
  865. 333 END;
  866. 334 TotalOut := TotalOut + InvRec.Invoice.AMTOUT;
  867. ***** ^ not supported yet
  868. ***** ^ not supported yet
  869. ***** ^ not supported yet
  870. ***** ^ not supported yet
  871. ***** ^ not supported yet
  872. 335 IF Equal(LastCust,InvRec.CustName)
  873. ***** ^ not supported yet
  874. ***** ^ not supported yet
  875. ***** ^ not supported yet
  876. ***** ^ not supported yet
  877. 336 THEN
  878. 337 CustTotal := CustTotal + InvRec.Invoice.AMTOUT;
  879. ***** ^ not supported yet
  880. ***** ^ not supported yet
  881. ***** ^ not supported yet
  882. ***** ^ not supported yet
  883. ***** ^ not supported yet
  884. 338 MakeLine();
  885. ***** ^ not supported yet
  886. ***** ^ not supported yet
  887. 339 AddMenuItem(DF,2,LineCnt,Line,78,0,' ');
  888. ***** ^ not supported yet
  889. ***** ^ not supported yet
  890. ***** ^ not supported yet
  891. ***** ^ not supported yet
  892. 340 ELSE
  893. 341 OverWrite('===========',Line,58);
  894. ***** ^ not supported yet
  895. ***** ^ not supported yet
  896. ***** ^ not supported yet
  897. ***** ^ not supported yet
  898. 342 AddMenuItem(DF,2,LineCnt,Line,78,0,' ');
  899. ***** ^ not supported yet
  900. ***** ^ not supported yet
  901. ***** ^ not supported yet
  902. ***** ^ not supported yet
  903. 343 Fill(ADR(Line),80,' ');
  904. ***** ^ not supported yet
  905. ***** ^ not supported yet
  906. ***** ^ not supported yet
  907. ***** ^ not supported yet
  908. 344 Line[78] := 0C;
  909. ***** ^ not supported yet
  910. ***** ^ not supported yet
  911. 345 RealToStr(CustTotal,2,9,Str);
  912. ***** ^ not supported yet
  913. ***** ^ not supported yet
  914. ***** ^ not supported yet
  915. 346 OverWrite(Str,Line,58);
  916. ***** ^ not supported yet
  917. ***** ^ not supported yet
  918. ***** ^ not supported yet
  919. ***** ^ not supported yet
  920. 347 AddMenuItem(DF,2,LineCnt+1,Line,78,0,' ');
  921. ***** ^ not supported yet
  922. ***** ^ not supported yet
  923. ***** ^ not supported yet
  924. ***** ^ not supported yet
  925. 348 Fill(ADR(Line),80,' ');
  926. ***** ^ not supported yet
  927. ***** ^ not supported yet
  928. ***** ^ not supported yet
  929. ***** ^ not supported yet
  930. 349 Line[78] := 0C;
  931. ***** ^ not supported yet
  932. ***** ^ not supported yet
  933. 350 AddMenuItem(DF,2,LineCnt+2,Line,78,0,' '); (* add blank line *)
  934. ***** ^ not supported yet
  935. ***** ^ not supported yet
  936. ***** ^ not supported yet
  937. ***** ^ not supported yet
  938. 351 Assign( InvRec.CustName,LastCust);
  939. ***** ^ not supported yet
  940. ***** ^ not supported yet
  941. ***** ^ not supported yet
  942. ***** ^ not supported yet
  943. 352 SetLength(InvRec.CustName,25);
  944. ***** ^ not supported yet
  945. ***** ^ not supported yet
  946. ***** ^ not supported yet
  947. ***** ^ not supported yet
  948. 353 OverWrite(InvRec.CustName,Line,1);
  949. ***** ^ not supported yet
  950. ***** ^ not supported yet
  951. ***** ^ not supported yet
  952. ***** ^ not supported yet
  953. ***** ^ not supported yet
  954. 354 CustTotal := InvRec.Invoice.AMTOUT;
  955. ***** ^ not supported yet
  956. ***** ^ not supported yet
  957. ***** ^ not supported yet
  958. ***** ^ not supported yet
  959. 355 MakeLine();
  960. ***** ^ not supported yet
  961. ***** ^ not supported yet
  962. 356 AddMenuItem(DF,2,LineCnt+3,Line,78,0,' ');
  963. ***** ^ not supported yet
  964. ***** ^ not supported yet
  965. ***** ^ not supported yet
  966. ***** ^ not supported yet
  967. 357 INC(LineCnt,3);
  968. ***** ^ undeclared identifier
  969. ***** ^ not supported yet
  970. 358 END;
  971. 359
  972. 360 END;
  973. 361 Fill(ADR(Line),80,' ');
  974. ***** ^ not supported yet
  975. ***** ^ not supported yet
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. 362 Line[78] := 0C;
  979. ***** ^ not supported yet
  980. ***** ^ not supported yet
  981. 363 OverWrite('===========',Line,58);
  982. ***** ^ not supported yet
  983. ***** ^ not supported yet
  984. ***** ^ not supported yet
  985. ***** ^ not supported yet
  986. 364 AddMenuItem(DF,2,LineCnt+1,Line,78,0,' ');
  987. ***** ^ not supported yet
  988. ***** ^ not supported yet
  989. ***** ^ not supported yet
  990. ***** ^ not supported yet
  991. 365 Fill(ADR(Line),80,' ');
  992. ***** ^ not supported yet
  993. ***** ^ not supported yet
  994. ***** ^ not supported yet
  995. ***** ^ not supported yet
  996. 366 Line[78] := 0C;
  997. ***** ^ not supported yet
  998. ***** ^ not supported yet
  999. 367 RealToStr(CustTotal,2,9,Str);
  1000. ***** ^ not supported yet
  1001. ***** ^ not supported yet
  1002. ***** ^ not supported yet
  1003. 368 OverWrite(Str,Line,58);
  1004. ***** ^ not supported yet
  1005. ***** ^ not supported yet
  1006. ***** ^ not supported yet
  1007. ***** ^ not supported yet
  1008. 369 AddMenuItem(DF,2,LineCnt+2,Line,78,0,' ');
  1009. ***** ^ not supported yet
  1010. ***** ^ not supported yet
  1011. ***** ^ not supported yet
  1012. ***** ^ not supported yet
  1013. 370
  1014. 371
  1015. 372 OverWrite('===========',Line,58);
  1016. ***** ^ not supported yet
  1017. ***** ^ not supported yet
  1018. ***** ^ not supported yet
  1019. ***** ^ not supported yet
  1020. 373 AddMenuItem(DF,2,LineCnt+3,Line,78,0,' ');
  1021. ***** ^ not supported yet
  1022. ***** ^ not supported yet
  1023. ***** ^ not supported yet
  1024. ***** ^ not supported yet
  1025. 374 Fill(ADR(Line),80,' ');
  1026. ***** ^ not supported yet
  1027. ***** ^ not supported yet
  1028. ***** ^ not supported yet
  1029. ***** ^ not supported yet
  1030. 375 Line[78] := 0C;
  1031. ***** ^ not supported yet
  1032. ***** ^ not supported yet
  1033. 376 OverWrite(' Total outstanding ',Line,2);
  1034. ***** ^ not supported yet
  1035. ***** ^ not supported yet
  1036. ***** ^ not supported yet
  1037. ***** ^ not supported yet
  1038. 377 RealToStr(TotalOut,2,9,Str);
  1039. ***** ^ not supported yet
  1040. ***** ^ not supported yet
  1041. ***** ^ not supported yet
  1042. 378 OverWrite(Str,Line,58);
  1043. ***** ^ not supported yet
  1044. ***** ^ not supported yet
  1045. ***** ^ not supported yet
  1046. ***** ^ not supported yet
  1047. 379 AddMenuItem(DF,2,LineCnt+4,Line,78,0,' ');
  1048. ***** ^ not supported yet
  1049. ***** ^ not supported yet
  1050. ***** ^ not supported yet
  1051. ***** ^ not supported yet
  1052. 380
  1053. 381
  1054. 382
  1055. 383 DisposeList(InvList);
  1056. ***** ^ not supported yet
  1057. ***** ^ not supported yet
  1058. 384 ShowDisplayFrame(DF,1,1,80,24);
  1059. ***** ^ not supported yet
  1060. ***** ^ not supported yet
  1061. ***** ^ not supported yet
  1062. 385 Control(DF);
  1063. ***** ^ not supported yet
  1064. ***** ^ not supported yet
  1065. 386 IF PromptYN(' Print Report ',DF)
  1066. ***** ^ not supported yet
  1067. ***** ^ not supported yet
  1068. ***** ^ not supported yet
  1069. 387 THEN
  1070. 388 Line := 'INVOICE HISTORY';
  1071. ***** ^ not supported yet
  1072. ***** ^ not supported yet
  1073. 389 NormalTitle(Line);
  1074. ***** ^ not supported yet
  1075. ***** ^ not supported yet
  1076. 390 Handle := OpenReportDevice();
  1077. ***** ^ not supported yet
  1078. ***** ^ not supported yet
  1079. 391 PrintFrame(DF,Handle);
  1080. ***** ^ not supported yet
  1081. ***** ^ not supported yet
  1082. ***** ^ not supported yet
  1083. 392 CloseReportDevice(Handle);
  1084. ***** ^ not supported yet
  1085. ***** ^ not supported yet
  1086. 393 END;
  1087. 394 CloseDisplayFrame(DF);
  1088. ***** ^ not supported yet
  1089. ***** ^ not supported yet
  1090. 395
  1091. 396
  1092. 397 END InvOutstanding;
  1093. ***** ^ not supported yet
  1094. 398
  1095. 399
  1096. 400
  1097. 401
  1098. 402 PROCEDURE InvOutByDate();
  1099. 403
  1100. 404 VAR
  1101. 405 J : CARDINAL;
  1102. 406 InvTotal : Real8;
  1103. 407 InvRec : InvCust;
  1104. ***** ^ not supported yet
  1105. 408 InvList : GenList;
  1106. 409 Code : CARDINAL;
  1107. 410 FieldRec : InputFieldRecord;
  1108. 411 DF : DisplayFrame;
  1109. 412 B : BOOLEAN;
  1110. 413 Str : ARRAY[0..12] OF CHAR;
  1111. ***** ^ not supported yet
  1112. ***** ^ not supported yet
  1113. 414 Line : ARRAY[0..80] OF CHAR;
  1114. ***** ^ not supported yet
  1115. ***** ^ not supported yet
  1116. 415 Days : CARDINAL;
  1117. 416 Handle : CARDINAL;
  1118. 417 BEGIN
  1119. 418 GetDateRange(StartDate,EndDate,PMIScreens);
  1120. ***** ^ not supported yet
  1121. ***** ^ not supported yet
  1122. ***** ^ not supported yet
  1123. ***** ^ not supported yet
  1124. 419 IncludeSet := IncludeSet / IncludeSet; (* clear the set *)
  1125. ***** ^ not supported yet
  1126. ***** ^ not supported yet
  1127. ***** ^ not supported yet
  1128. 420 INCL(IncludeSet,'P');
  1129. ***** ^ undeclared identifier
  1130. ***** ^ not supported yet
  1131. ***** ^ not supported yet
  1132. 421 MakeInvoiceList(InvList);
  1133. ***** ^ not supported yet
  1134. ***** ^ not supported yet
  1135. 422 SortList(InvList,SortByInvoiceNbr);
  1136. ***** ^ not supported yet
  1137. ***** ^ not supported yet
  1138. ***** ^ not supported yet
  1139. 423 InitDisplayFrame(DF,VWindows.CurrentWindow);
  1140. ***** ^ not supported yet
  1141. ***** ^ not supported yet
  1142. ***** ^ not supported yet
  1143. ***** ^ not supported yet
  1144. 424 AddStrField(DF,2,2,
  1145. ***** ^ not supported yet
  1146. ***** ^ not supported yet
  1147. 425 'Inv Nbr Customer Name Date Inv Total OutStd Late',79);
  1148. ***** ^ not supported yet
  1149. ***** ^ not supported yet
  1150. 426 GetFieldRec(DF,1,FieldRec);
  1151. ***** ^ not supported yet
  1152. ***** ^ not supported yet
  1153. ***** ^ not supported yet
  1154. 427 FieldRec.typ := DispCode; (* headline = display code *)
  1155. ***** ^ not supported yet
  1156. ***** ^ not supported yet
  1157. ***** ^ not supported yet
  1158. 428 PutFieldRec(FieldRec,DF,1);
  1159. ***** ^ not supported yet
  1160. ***** ^ not supported yet
  1161. ***** ^ not supported yet
  1162. ***** ^ not supported yet
  1163. 429 DF^.headline := 2;
  1164. ***** ^ not supported yet
  1165. ***** ^ not supported yet
  1166. 430
  1167. 431
  1168. 432 FOR J := 1 TO ListLength(InvList) DO
  1169. ***** ^ not supported yet
  1170. ***** ^ not supported yet
  1171. 433 GetElmt(InvList,J,InvRec,Code);
  1172. ***** ^ not supported yet
  1173. ***** ^ not supported yet
  1174. ***** ^ not supported yet
  1175. ***** ^ not supported yet
  1176. 434 Fill(ADR(Line),80,' ');
  1177. ***** ^ not supported yet
  1178. ***** ^ not supported yet
  1179. ***** ^ not supported yet
  1180. ***** ^ not supported yet
  1181. 435 Line[77] := 0C;
  1182. ***** ^ not supported yet
  1183. ***** ^ not supported yet
  1184. 436 OverWrite(InvRec.Invoice.INVOICE,Line,1);
  1185. ***** ^ not supported yet
  1186. ***** ^ not supported yet
  1187. ***** ^ not supported yet
  1188. ***** ^ not supported yet
  1189. ***** ^ not supported yet
  1190. ***** ^ not supported yet
  1191. 437 SetLength(InvRec.CustName,25);
  1192. ***** ^ not supported yet
  1193. ***** ^ not supported yet
  1194. ***** ^ not supported yet
  1195. ***** ^ not supported yet
  1196. 438 OverWrite(InvRec.CustName,Line,11);
  1197. ***** ^ not supported yet
  1198. ***** ^ not supported yet
  1199. ***** ^ not supported yet
  1200. ***** ^ not supported yet
  1201. ***** ^ not supported yet
  1202. 439 DateToStr(InvRec.Invoice.INVDATE,Str,B);
  1203. ***** ^ not supported yet
  1204. ***** ^ not supported yet
  1205. ***** ^ not supported yet
  1206. ***** ^ not supported yet
  1207. ***** ^ not supported yet
  1208. ***** ^ not supported yet
  1209. 440 OverWrite(Str,Line,40);
  1210. ***** ^ not supported yet
  1211. ***** ^ not supported yet
  1212. ***** ^ not supported yet
  1213. ***** ^ not supported yet
  1214. 441 RealToStr(InvRec.Invoice.TOTALAMT,2,9,Str);
  1215. ***** ^ not supported yet
  1216. ***** ^ not supported yet
  1217. ***** ^ not supported yet
  1218. ***** ^ not supported yet
  1219. ***** ^ not supported yet
  1220. 442 OverWrite(Str,Line,49);
  1221. ***** ^ not supported yet
  1222. ***** ^ not supported yet
  1223. ***** ^ not supported yet
  1224. ***** ^ not supported yet
  1225. 443
  1226. 444 RealToStr(InvRec.Invoice.AMTOUT,2,9,Str);
  1227. ***** ^ not supported yet
  1228. ***** ^ not supported yet
  1229. ***** ^ not supported yet
  1230. ***** ^ not supported yet
  1231. ***** ^ not supported yet
  1232. 445 OverWrite(Str,Line,58);
  1233. ***** ^ not supported yet
  1234. ***** ^ not supported yet
  1235. ***** ^ not supported yet
  1236. ***** ^ not supported yet
  1237. 446
  1238. 447
  1239. 448 CardinalToStr(TodayDays -DaysSince1900(InvRec.Invoice.INVDATE),3,Str);
  1240. ***** ^ not supported yet
  1241. ***** ^ not supported yet
  1242. ***** ^ not supported yet
  1243. ***** ^ not supported yet
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. ***** ^ not supported yet
  1247. 449 OverWrite(Str,Line,72);
  1248. ***** ^ not supported yet
  1249. ***** ^ not supported yet
  1250. ***** ^ not supported yet
  1251. ***** ^ not supported yet
  1252. 450 AddMenuItem(DF,2,J+2,Line,78,0,' ');
  1253. ***** ^ not supported yet
  1254. ***** ^ not supported yet
  1255. ***** ^ not supported yet
  1256. ***** ^ not supported yet
  1257. 451 END;
  1258. 452 DisposeList(InvList);
  1259. ***** ^ not supported yet
  1260. ***** ^ not supported yet
  1261. 453 ShowDisplayFrame(DF,1,1,80,24);
  1262. ***** ^ not supported yet
  1263. ***** ^ not supported yet
  1264. ***** ^ not supported yet
  1265. 454 Control(DF);
  1266. ***** ^ not supported yet
  1267. ***** ^ not supported yet
  1268. 455 IF PromptYN(' Print Report ',DF)
  1269. ***** ^ not supported yet
  1270. ***** ^ not supported yet
  1271. ***** ^ not supported yet
  1272. 456 THEN
  1273. 457 Line := 'INVOICE HISTORY';
  1274. ***** ^ not supported yet
  1275. ***** ^ not supported yet
  1276. 458 NormalTitle(Line);
  1277. ***** ^ not supported yet
  1278. ***** ^ not supported yet
  1279. 459 Handle := OpenReportDevice();
  1280. ***** ^ not supported yet
  1281. ***** ^ not supported yet
  1282. 460 PrintFrame(DF,Handle);
  1283. ***** ^ not supported yet
  1284. ***** ^ not supported yet
  1285. ***** ^ not supported yet
  1286. 461 CloseReportDevice(Handle);
  1287. ***** ^ not supported yet
  1288. ***** ^ not supported yet
  1289. 462 END;
  1290. 463 CloseDisplayFrame(DF);
  1291. ***** ^ not supported yet
  1292. ***** ^ not supported yet
  1293. 464 END InvOutByDate;
  1294. ***** ^ not supported yet
  1295. 465
  1296. 466
  1297. 467
  1298. 468 END InvReports.
  1299. ***** ^ not supported yet
  1300. 830 errors