LATELETT.LST 28 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693
  1. Listing:
  2. 1 IMPLEMENTATION MODULE LateLetters;
  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 FROM ModBase3 IMPORT ReadDBRec,NumberRecords,Deleted;
  14. 13 FROM DBFInvoice IMPORT OpenInvoiceDBF,OpenInvoiceDBF,CloseInvoiceDBF,
  15. ***** ^ duplicate identifier
  16. 14 InvoiceDBF,MoveInvoiceFromDBF,InvoiceRec;
  17. 15 FROM DateFunctions IMPORT DateDiff,ValidDate;
  18. 16 FROM DspFiles IMPORT ReadDisplayFrame;
  19. 17 FROM PMIGlobals IMPORT Today,TodayStr,Config,PMIScreens;
  20. 18 FROM ScrnUtl2 IMPORT CloseDisplayFrame;
  21. 19 FROM ScrnUtl1 IMPORT FieldNum;
  22. 20 FROM NumTypes IMPORT Real8;
  23. 21 FROM ScreenInput IMPORT ListToEdField,ListFromEdField;
  24. 22 FROM DBFCustomer IMPORT OpenCustomerDBF,MoveCustomerFromDBF,FindCustomerByCin;
  25. 23 FROM Customer IMPORT GetCustAddr,GetCustName,AddressRec,AddressTypes;
  26. 24 FROM M2Strings IMPORT CompareStr,Length,Assign;
  27. 25 FROM StringIO IMPORT WriteStr,WriteEol,outp;
  28. 26 FROM StrEdit IMPORT CrunchBlanks;
  29. 27 FROM PosUtils IMPORT Equal;
  30. 28 FROM ScrnTypes IMPORT DisplayFrame,
  31. 29 InitDisplayFrame;
  32. 30 FROM GenLists IMPORT GenList,GetElmt,NewList,DisposeList,ListInsert,SortList,
  33. 31 ListLength,GetElmtAdr;
  34. 32 FROM ListUtils IMPORT TextFileToList,TextListToFile;
  35. 33 FROM FramePainter IMPORT ShowDisplayFrame;
  36. 34 FROM ControlUtils IMPORT Control;
  37. 35 IMPORT VWindows;
  38. 36 FROM SYSTEM IMPORT ADDRESS,ADR;
  39. 37 FROM HandleIO IMPORT FileExists,CloseHandle,CreateFile,OpenFile;
  40. 38 FROM PrinterUtils IMPORT DisplayLine,SetupDisplayLine,RemoveDisplayLine,
  41. 39 AddPrintElemt,PrintDisplayLine,ClearDisplayLine;
  42. 40
  43. 41
  44. 42 CONST
  45. 43 FileNamePre = 'Late30.Pre';
  46. ***** ^ not supported yet
  47. 44 FileNameSuf = 'Late30.Suf';
  48. ***** ^ not supported yet
  49. 45
  50. 46
  51. 47 PROCEDURE CreateLateLetters();
  52. 48
  53. 49
  54. 50 VAR DF : DisplayFrame;
  55. 51 Pre,Suf : GenList;
  56. 52 Err : CARDINAL;
  57. 53 B : BOOLEAN;
  58. 54 FN : ARRAY[0..20] OF CHAR;
  59. ***** ^ not supported yet
  60. ***** ^ not supported yet
  61. 55 BEGIN
  62. 56 InitDisplayFrame(DF,VWindows.CurrentWindow);
  63. ***** ^ not supported yet
  64. ***** ^ not supported yet
  65. ***** ^ not supported yet
  66. ***** ^ not supported yet
  67. 57 ReadDisplayFrame(PMIScreens,DF,'LateLetter');
  68. ***** ^ not supported yet
  69. ***** ^ not supported yet
  70. ***** ^ not supported yet
  71. ***** ^ not supported yet
  72. 58 NewList(Pre);
  73. ***** ^ not supported yet
  74. ***** ^ not supported yet
  75. 59 NewList(Suf);
  76. ***** ^ not supported yet
  77. ***** ^ not supported yet
  78. 60 FN := FileNamePre;
  79. ***** ^ not supported yet
  80. ***** ^ not supported yet
  81. 61 Err := TextFileToList(FN,Pre);
  82. ***** ^ not supported yet
  83. ***** ^ not supported yet
  84. ***** ^ not supported yet
  85. 62 FN := FileNameSuf;
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. 63 Err := TextFileToList(FN,Suf);
  89. ***** ^ not supported yet
  90. ***** ^ not supported yet
  91. ***** ^ not supported yet
  92. 64 B := ListToEdField(Pre,DF,FieldNum(DF,'Prefix'));
  93. ***** ^ not supported yet
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. ***** ^ not supported yet
  98. ***** ^ not supported yet
  99. 65 B := ListToEdField(Suf,DF,FieldNum(DF,'Suffix'));
  100. ***** ^ not supported yet
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ not supported yet
  105. ***** ^ not supported yet
  106. 66 ShowDisplayFrame(DF,0,0,0,0);
  107. ***** ^ not supported yet
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. 67 Control(DF);
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. 68 B := ListFromEdField(DF,FieldNum(DF,'Prefix'),Pre);
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. 69 B := ListFromEdField(DF,FieldNum(DF,'Suffix'),Suf);
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. 70 Err := TextListToFile(Pre,FileNamePre);
  128. ***** ^ not supported yet
  129. ***** ^ not supported yet
  130. ***** ^ not supported yet
  131. 71 Err := TextListToFile(Suf,FileNameSuf);
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. ***** ^ not supported yet
  135. 72 CloseDisplayFrame(DF);
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. 73
  139. 74 END CreateLateLetters;
  140. ***** ^ not supported yet
  141. 75
  142. 76 PROCEDURE SortInvList(A1 : ADDRESS; Len1 : CARDINAL;
  143. 77 A2 : ADDRESS; Len2 : CARDINAL) : INTEGER;
  144. 78 VAR
  145. 79 I1 : POINTER TO InvoiceRec;
  146. ***** ^ not supported yet
  147. 80 I2 : POINTER TO InvoiceRec;
  148. ***** ^ not supported yet
  149. 81 BEGIN
  150. 82 I1 := A1;
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. 83 I2 := A2;
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. 84
  157. 85 IF NOT Equal(I1^.CUSTID,I2^.CUSTID)
  158. ***** ^ not supported yet
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. 86 THEN RETURN CompareStr(I1^.CUSTID,I2^.CUSTID);
  164. ***** ^ not supported yet
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. ***** ^ not supported yet
  169. 87 ELSE IF NOT Equal(I1^.INVOICE,I2^.INVOICE)
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. 88 THEN RETURN CompareStr(I1^.INVOICE,I2^.INVOICE)
  176. ***** ^ not supported yet
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. 89 ELSE RETURN 0;
  182. 90 END;
  183. 91 END;
  184. 92
  185. 93 END SortInvList;
  186. ***** ^ not supported yet
  187. 94
  188. 95 PROCEDURE ProduceLateLetters();
  189. 96 CONST
  190. 97 FF = CHR(12);
  191. ***** ^ undeclared identifier
  192. ***** ^ not supported yet
  193. 98 VAR
  194. 99 B : BOOLEAN;
  195. 100 L : LONGINT;
  196. 101 J : LONGINT;
  197. 102 M : CARDINAL;
  198. 103 Code : CARDINAL;
  199. 104 Inv : InvoiceRec;
  200. 105 OutStd : GenList;
  201. 106 Pre,Suf : GenList;
  202. 107 ER,prt : CARDINAL;
  203. 108 CurrentCIN : ARRAY[0..20] OF CHAR;
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. 109 CustName : ARRAY[0..60] OF CHAR;
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. 110 TotalOut : Real8;
  210. 111 Line : DisplayLine;
  211. 112 L1,L2,L3,L4,L5 : DisplayLine;
  212. 113 Hand : CARDINAL;
  213. 114 Err : CARDINAL;
  214. 115
  215. 116 FN : ARRAY[0..40] OF CHAR;
  216. ***** ^ not supported yet
  217. ***** ^ not supported yet
  218. 117
  219. 118
  220. 119
  221. 120 PROCEDURE PrintHeader();
  222. 121 CONST
  223. 122 Blanks = ' ';
  224. ***** ^ not supported yet
  225. 123 VAR
  226. 124 J : CARDINAL;
  227. 125 P : POINTER TO ARRAY[0..500] OF CHAR;
  228. ***** ^ not supported yet
  229. ***** ^ not supported yet
  230. 126 Code,Size : CARDINAL;
  231. 127 CompName : ARRAY[0..60] OF CHAR;
  232. ***** ^ not supported yet
  233. ***** ^ not supported yet
  234. 128 CompAddr : AddressRec;
  235. 129 BEGIN
  236. 130 PrintDisplayLine(L1,Hand);
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. ***** ^ not supported yet
  240. 131 PrintDisplayLine(L2,Hand);
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 132 PrintDisplayLine(L3,Hand);
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. 133 PrintDisplayLine(L4,Hand);
  249. ***** ^ not supported yet
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. 134 (* print comany name and address here *)
  253. 135 GetCustName(CurrentCIN,CustName);
  254. ***** ^ not supported yet
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. 136 GetCustAddr(CompAddr,Billing);
  258. ***** ^ not supported yet
  259. ***** ^ not supported yet
  260. ***** ^ undeclared identifier
  261. 137 (* WriteEol(Hand,CustName); *)
  262. 138 FOR J := 1 TO 6 DO
  263. 139 WriteEol(Hand,'');
  264. ***** ^ not supported yet
  265. ***** ^ not supported yet
  266. 140 END;
  267. 141 WriteStr(Hand,Blanks);
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. 142 WriteEol(Hand,CompAddr.Line[0]);
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. ***** ^ not supported yet
  275. 143 WriteStr(Hand,Blanks);
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. 144 WriteEol(Hand,CompAddr.Line[1]);
  279. ***** ^ not supported yet
  280. ***** ^ not supported yet
  281. ***** ^ not supported yet
  282. ***** ^ not supported yet
  283. 145 WriteStr(Hand,Blanks);
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 146 WriteEol(Hand,CompAddr.Line[2]);
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. ***** ^ not supported yet
  290. ***** ^ not supported yet
  291. 147 WriteStr(Hand,Blanks);
  292. ***** ^ not supported yet
  293. ***** ^ not supported yet
  294. 148 WriteEol(Hand,CompAddr.Line[3]);
  295. ***** ^ not supported yet
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. 149 FOR J := 1 TO 2 DO
  300. 150 WriteEol(Hand,'');
  301. ***** ^ not supported yet
  302. ***** ^ not supported yet
  303. 151 END;
  304. 152 FOR J := 1 TO ListLength(Pre) DO
  305. ***** ^ not supported yet
  306. ***** ^ not supported yet
  307. 153 GetElmtAdr(Pre,J,P,Size,Code);
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. ***** ^ not supported yet
  312. 154 WriteEol(Hand,P^);
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. 155 END;
  316. 156 WriteEol(Hand,' ');
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. 157
  320. 158
  321. 159 WriteEol(Hand,' ');
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. 160 PrintDisplayLine(L5,Hand);
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. 161 END PrintHeader;
  329. ***** ^ not supported yet
  330. 162
  331. 163 PROCEDURE PrintFooter();
  332. 164
  333. 165 VAR J, Size,Code : CARDINAL;
  334. 166 P : ARRAY[0..100] OF CHAR;
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. 167 BEGIN
  338. 168 ClearDisplayLine(Line);
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. 169 AddPrintElemt(Line,TotalOut,'R',45,14,'L');
  342. ***** ^ not supported yet
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. ***** ^ not supported yet
  346. 170 AddPrintElemt(Line,'Total outstanding ','S',15,15,'L');
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. 171 PrintDisplayLine(Line,Hand);
  352. ***** ^ not supported yet
  353. ***** ^ not supported yet
  354. ***** ^ not supported yet
  355. 172 WriteEol(Hand,' ');
  356. ***** ^ not supported yet
  357. ***** ^ not supported yet
  358. 173 FOR J := 1 TO ListLength(Suf) DO
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 174 GetElmt(Suf,J,P,Code);
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. ***** ^ not supported yet
  365. ***** ^ not supported yet
  366. 175 WriteEol(Hand,P);
  367. ***** ^ not supported yet
  368. ***** ^ not supported yet
  369. 176 END;
  370. 177 WriteStr(Hand,12C);
  371. ***** ^ not supported yet
  372. ***** ^ not supported yet
  373. 178 END PrintFooter;
  374. ***** ^ not supported yet
  375. 179
  376. 180 PROCEDURE PrintLine();
  377. 181 (* print line should look like this
  378. 182 1 2 3 4 5 6 7
  379. 183 01234567890123456789012345678901234567890123456789012345678901234567890
  380. 184 Invoice Date Invoice Amount Amount Due
  381. 185 xx-xxxxxx xx-xx-xx $xxxxxxxxx.xx $xxxxxxxxxx.xx
  382. 186 *)
  383. 187 VAR B : BOOLEAN;
  384. 188 BEGIN
  385. 189 WITH Inv DO
  386. ***** ^ not supported yet
  387. 190 ClearDisplayLine(Line);
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 191 AddPrintElemt(Line,INVOICE,'S',2,10,'L');
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. ***** ^ undeclared identifier
  394. ***** ^ not supported yet
  395. 192 AddPrintElemt(Line,INVDATE,'D',14,20,'L');
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. ***** ^ undeclared identifier
  399. ***** ^ not supported yet
  400. 193 AddPrintElemt(Line,TOTALAMT,'R',28,10,'R');
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. ***** ^ undeclared identifier
  404. ***** ^ not supported yet
  405. 194 AddPrintElemt(Line,AMTOUT,'R',45,10,'R');
  406. ***** ^ not supported yet
  407. ***** ^ not supported yet
  408. ***** ^ undeclared identifier
  409. ***** ^ not supported yet
  410. 195 PrintDisplayLine(Line,Hand);
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. 196 ClearDisplayLine(Line);
  415. ***** ^ not supported yet
  416. ***** ^ not supported yet
  417. 197 END;
  418. ***** ^ not supported yet
  419. 198 END PrintLine;
  420. ***** ^ not supported yet
  421. 199
  422. 200
  423. 201 BEGIN
  424. 202 (* Set up the titles and the prefix * suffix *)
  425. 203 SetupDisplayLine(Line,76);
  426. ***** ^ not supported yet
  427. ***** ^ undeclared identifier
  428. ***** ^ not supported yet
  429. 204 SetupDisplayLine(L1,76);
  430. ***** ^ not supported yet
  431. ***** ^ undeclared identifier
  432. ***** ^ not supported yet
  433. 205 SetupDisplayLine(L2,76);
  434. ***** ^ not supported yet
  435. ***** ^ undeclared identifier
  436. ***** ^ not supported yet
  437. 206 SetupDisplayLine(L3,76);
  438. ***** ^ not supported yet
  439. ***** ^ undeclared identifier
  440. ***** ^ not supported yet
  441. 207 SetupDisplayLine(L4,76);
  442. ***** ^ not supported yet
  443. ***** ^ undeclared identifier
  444. ***** ^ not supported yet
  445. 208 SetupDisplayLine(L5,76);
  446. ***** ^ not supported yet
  447. ***** ^ undeclared identifier
  448. ***** ^ not supported yet
  449. 209 CrunchBlanks(Config.CompanyName);
  450. ***** ^ not supported yet
  451. ***** ^ not supported yet
  452. ***** ^ not supported yet
  453. 210 CrunchBlanks(Config.CompanyAddr1);
  454. ***** ^ not supported yet
  455. ***** ^ not supported yet
  456. ***** ^ not supported yet
  457. 211 CrunchBlanks(Config.CompanyAddr2);
  458. ***** ^ not supported yet
  459. ***** ^ not supported yet
  460. ***** ^ not supported yet
  461. 212 CrunchBlanks(Config.Phone);
  462. ***** ^ not supported yet
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. 213 AddPrintElemt(L1,Config.CompanyName,'S',
  466. ***** ^ not supported yet
  467. ***** ^ undeclared identifier
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. 214 40-(Length(Config.CompanyName) DIV 2),30,'L');
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. ***** ^ not supported yet
  475. 215 AddPrintElemt(L1,Today,'D',65,Length(TodayStr),'L');
  476. ***** ^ not supported yet
  477. ***** ^ undeclared identifier
  478. ***** ^ not supported yet
  479. ***** ^ not supported yet
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. 216
  483. 217 AddPrintElemt(L2,Config.CompanyAddr1,'S',
  484. ***** ^ not supported yet
  485. ***** ^ undeclared identifier
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. 218 40- (Length(Config.CompanyAddr1) DIV 2),79,'L');
  489. ***** ^ not supported yet
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. ***** ^ not supported yet
  493. 219
  494. 220 AddPrintElemt(L3,Config.CompanyAddr2,'S',
  495. ***** ^ not supported yet
  496. ***** ^ undeclared identifier
  497. ***** ^ not supported yet
  498. ***** ^ not supported yet
  499. 221 40- (Length(Config.CompanyAddr2) DIV 2),79,'L');
  500. ***** ^ not supported yet
  501. ***** ^ not supported yet
  502. ***** ^ not supported yet
  503. ***** ^ not supported yet
  504. 222 AddPrintElemt(L4,Config.Phone,'S',
  505. ***** ^ not supported yet
  506. ***** ^ undeclared identifier
  507. ***** ^ not supported yet
  508. ***** ^ not supported yet
  509. 223 40 - (Length(Config.Phone) DIV 2),20,'L');
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. ***** ^ not supported yet
  514. 224 AddPrintElemt(L5,
  515. ***** ^ not supported yet
  516. ***** ^ undeclared identifier
  517. 225 ' Invoice Date Invoice Amount Amount Due', 'S',0,75,'L');
  518. ***** ^ not supported yet
  519. ***** ^ not supported yet
  520. 226 NewList(Pre);
  521. ***** ^ not supported yet
  522. ***** ^ undeclared identifier
  523. 227 NewList(Suf);
  524. ***** ^ not supported yet
  525. ***** ^ undeclared identifier
  526. 228 FN := FileNamePre;
  527. ***** ^ undeclared identifier
  528. ***** ^ not supported yet
  529. 229 Err := TextFileToList(FN,Pre);
  530. ***** ^ undeclared identifier
  531. ***** ^ not supported yet
  532. ***** ^ undeclared identifier
  533. ***** ^ undeclared identifier
  534. 230 FN := FileNameSuf;
  535. ***** ^ undeclared identifier
  536. ***** ^ not supported yet
  537. 231 Err := TextFileToList(FN,Suf);
  538. ***** ^ undeclared identifier
  539. ***** ^ not supported yet
  540. ***** ^ undeclared identifier
  541. ***** ^ undeclared identifier
  542. 232 OpenInvoiceDBF(FALSE);
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. 233 NewList(OutStd);
  546. ***** ^ not supported yet
  547. ***** ^ undeclared identifier
  548. 234 L := NumberRecords(InvoiceDBF);
  549. ***** ^ undeclared identifier
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. 235 FOR J := 1 TO L DO
  553. ***** ^ undeclared identifier
  554. ***** ^ undeclared identifier
  555. 236 ReadDBRec(InvoiceDBF,J);
  556. ***** ^ not supported yet
  557. ***** ^ not supported yet
  558. ***** ^ undeclared identifier
  559. 237 IF NOT Deleted(InvoiceDBF)
  560. ***** ^ not supported yet
  561. ***** ^ not supported yet
  562. 238 THEN
  563. 239 MoveInvoiceFromDBF(Inv);
  564. ***** ^ not supported yet
  565. ***** ^ undeclared identifier
  566. 240 IF (Inv.INVPRNT = 'P') AND ValidDate(Inv.INVDATE) (* Been printed but not closed *)
  567. ***** ^ undeclared identifier
  568. ***** ^ not supported yet
  569. ***** ^ not supported yet
  570. ***** ^ undeclared identifier
  571. ***** ^ not supported yet
  572. 241 THEN
  573. 242 IF DateDiff(Today,Inv.INVDATE) > 30
  574. ***** ^ not supported yet
  575. ***** ^ not supported yet
  576. ***** ^ undeclared identifier
  577. ***** ^ not supported yet
  578. 243 THEN ListInsert(Inv,1,OutStd,1);
  579. ***** ^ not supported yet
  580. ***** ^ undeclared identifier
  581. ***** ^ undeclared identifier
  582. ***** ^ not supported yet
  583. 244 END; (*out longer than 30 days *)
  584. 245 END; (* been printed *)
  585. 246 END; (* not deleted *)
  586. 247 END; (* loop reading out *)
  587. 248 CloseInvoiceDBF();
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. 249 SortList(OutStd,SortInvList); (* sort by cust by invoice number *)
  591. ***** ^ not supported yet
  592. ***** ^ undeclared identifier
  593. ***** ^ not supported yet
  594. 250 CurrentCIN := 'XxXxX??'; (* make sure the first doesn't match *)
  595. ***** ^ undeclared identifier
  596. ***** ^ not supported yet
  597. 251 ER := OpenFile(Hand,Config.ReportPrt); (* open report printer *)
  598. ***** ^ undeclared identifier
  599. ***** ^ not supported yet
  600. ***** ^ undeclared identifier
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. 252
  604. 253 FOR M :=1 TO ListLength(OutStd) DO
  605. ***** ^ undeclared identifier
  606. ***** ^ not supported yet
  607. ***** ^ undeclared identifier
  608. 254 GetElmt(OutStd,M,Inv,Code);
  609. ***** ^ not supported yet
  610. ***** ^ undeclared identifier
  611. ***** ^ undeclared identifier
  612. ***** ^ undeclared identifier
  613. ***** ^ undeclared identifier
  614. 255 CrunchBlanks(Inv.CUSTID);
  615. ***** ^ not supported yet
  616. ***** ^ undeclared identifier
  617. ***** ^ not supported yet
  618. 256 IF NOT Equal(CurrentCIN,Inv.CUSTID)
  619. ***** ^ not supported yet
  620. ***** ^ undeclared identifier
  621. ***** ^ undeclared identifier
  622. ***** ^ not supported yet
  623. 257 THEN (* new customer in list *)
  624. 258 IF NOT (Equal(CurrentCIN,'XxXxX??')) (* if not the first cust*)
  625. ***** ^ not supported yet
  626. ***** ^ undeclared identifier
  627. ***** ^ not supported yet
  628. 259 THEN
  629. 260 PrintFooter();
  630. ***** ^ undeclared identifier
  631. ***** ^ not supported yet
  632. 261 END;
  633. 262 Assign( Inv.CUSTID,CurrentCIN );
  634. ***** ^ not supported yet
  635. ***** ^ undeclared identifier
  636. ***** ^ not supported yet
  637. ***** ^ undeclared identifier
  638. 263 B := FindCustomerByCin(CurrentCIN);
  639. ***** ^ undeclared identifier
  640. ***** ^ not supported yet
  641. ***** ^ undeclared identifier
  642. 264 PrintHeader();
  643. ***** ^ undeclared identifier
  644. ***** ^ not supported yet
  645. 265 TotalOut := 0.0;
  646. ***** ^ undeclared identifier
  647. 266 END; (* end new customer *)
  648. 267 TotalOut := TotalOut + Inv.AMTOUT;
  649. ***** ^ undeclared identifier
  650. ***** ^ undeclared identifier
  651. ***** ^ undeclared identifier
  652. ***** ^ not supported yet
  653. 268 PrintLine();
  654. ***** ^ undeclared identifier
  655. ***** ^ not supported yet
  656. 269 END;
  657. 270 Err := CloseHandle(Hand);
  658. ***** ^ undeclared identifier
  659. ***** ^ not supported yet
  660. ***** ^ undeclared identifier
  661. 271 DisposeList(Pre);
  662. ***** ^ not supported yet
  663. ***** ^ undeclared identifier
  664. 272 DisposeList(Suf);
  665. ***** ^ not supported yet
  666. ***** ^ undeclared identifier
  667. 273 RemoveDisplayLine(Line);
  668. ***** ^ not supported yet
  669. ***** ^ undeclared identifier
  670. 274 RemoveDisplayLine(L1);
  671. ***** ^ not supported yet
  672. ***** ^ undeclared identifier
  673. 275 RemoveDisplayLine(L2);
  674. ***** ^ not supported yet
  675. ***** ^ undeclared identifier
  676. 276 RemoveDisplayLine(L3);
  677. ***** ^ not supported yet
  678. ***** ^ undeclared identifier
  679. 277 RemoveDisplayLine(L4);
  680. ***** ^ not supported yet
  681. ***** ^ undeclared identifier
  682. 278 RemoveDisplayLine(L5);
  683. ***** ^ not supported yet
  684. ***** ^ undeclared identifier
  685. 279 END ProduceLateLetters;
  686. ***** ^ not supported yet
  687. 280 END LateLetters.
  688. ***** ^ not supported yet
  689. 407 errors