INVTRY.LST 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Invtry;
  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 FROM ModBase3 IMPORT UpdateDBFile,WriteDBRec,DeleteRecord,ReadDBRec,
  15. 14 AppendBlank;
  16. 15 FROM DBIndxes IMPORT CurrentRec;
  17. 16 FROM PMIGlobals IMPORT PMIScreens;
  18. 17 FROM DBStuff IMPORT MakeKey;
  19. 18 FROM FrameManager IMPORT EraseFrame;
  20. 19 FROM Scrn2DBF IMPORT FrameToDBF, DBFToFrame;
  21. 20 FROM PosUtils IMPORT Equal;
  22. 21 FROM ScrnUtl2 IMPORT CloseDisplayFrame;
  23. 22 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,CAPstr,AssignStr;
  24. 23 FROM M2Strings IMPORT Length;
  25. 24 FROM StrConv IMPORT StrToReal;
  26. 25 FROM LowLevel IMPORT Fill;
  27. 26 FROM StringIO IMPORT PrintMessage,WriteStr,WriteEol,outp;
  28. 27 (* these next two are from stonybrook - the pmi version doesn't work*)
  29. 28 FROM EnvironUtils IMPORT ReadEnvironment;
  30. 29 FROM SmartScreen IMPORT ClearScreen;
  31. 30 FROM VWindows IMPORT ClearPart, CurrentWindow, SetCursorHeight;
  32. 31 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName,
  33. 32 ContinueInput,CancelInput,SubmitInput;
  34. 33 FROM FramePainter IMPORT ShowDisplayFrame;
  35. 34 FROM InputManager IMPORT ControlFrame;
  36. 35 FROM Prompts IMPORT Prompt,PromptStr,PromptYN;
  37. 36 FROM SYSTEM IMPORT ADR,SIZE;
  38. 37 FROM ControlUtils IMPORT ControlSeparately, LoadFrameList,Control,ReadInput;
  39. 38 FROM DspFiles IMPORT ReadDisplayFrame;
  40. 39 FROM HandleIO IMPORT FileExists;
  41. 40 FROM LowLevel IMPORT Fill;
  42. ***** ^ duplicate identifier
  43. ***** ^ duplicate identifier
  44. 41 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt,DisposeList;
  45. 42 FROM ScrnTypes IMPORT AFrameName, InitDisplayFrame,DisplayFile;
  46. ***** ^ duplicate identifier
  47. ***** ^ duplicate identifier
  48. ***** ^ duplicate identifier
  49. 43 FROM DBFInvtry IMPORT InvtryDBF, OpenInvtryDBF,
  50. 44 CloseInvtryDBF,FixInvRec,InvtryRec,MoveInvtryToDBF,MoveInvtryFromDBF,
  51. 45 FindInvtryByInvcode, FindInvtryByOrderfrm, NextInvtry,
  52. 46 PrevInvtry,FirstInvtry,LastInvtry,InvcodeIdx;
  53. 47 IMPORT InitCompilerMods;
  54. 48 FROM NumTypes IMPORT Real8;
  55. 49 FROM UOpsExt IMPORT Lookup,LookupProc;
  56. 50 FROM UserOps IMPORT AKeyHandler,TheKeyHandler;
  57. 51 IMPORT Key;
  58. 52
  59. 53 VAR
  60. 54 Status : INTEGER;
  61. 55 Environ : ARRAY [0..60] OF CHAR;
  62. ***** ^ not supported yet
  63. ***** ^ not supported yet
  64. 56 J : CARDINAL;
  65. 57 TopMenu : GenList;
  66. 58 FirstTime: BOOLEAN;
  67. 59 NextFrame,EndingFrame : AFrameName;
  68. 60 SelChar : CHAR;
  69. 61 NoData : BOOLEAN; (* true when no data is on the screen *)
  70. 62 InvtryDF : DisplayFrame;
  71. 63 PullDnMenu : GenList;
  72. 64 CurrentDF : DisplayFrame; (* used with lookup *)
  73. 65 LookUpOk : BOOLEAN;
  74. 66 InitInvtry : BOOLEAN;
  75. 67
  76. 68
  77. 69
  78. 70
  79. 71 PROCEDURE LookUpInvty(VAR Key : ARRAY OF CHAR);
  80. ***** ^ not supported yet
  81. 72 (* this routine will be called to lookup the database item
  82. 73 and fill in the blanks *)
  83. 74 VAR
  84. 75 Inv : InvtryRec;
  85. 76 CKey : ARRAY[0..10] OF CHAR;
  86. ***** ^ not supported yet
  87. ***** ^ not supported yet
  88. 77 B : BOOLEAN;
  89. 78 BEGIN
  90. 79 CAPstr(Key);
  91. ***** ^ not supported yet
  92. ***** ^ not supported yet
  93. 80 AssignStr(Key,CKey);
  94. ***** ^ not supported yet
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 81 MakeKey(CKey);
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 82 IF NOT FindInvtryByInvcode(CKey)
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. 83 THEN
  104. 84 GeneralInventory(CKey)
  105. ***** ^ undeclared identifier
  106. ***** ^ not supported yet
  107. 85 END;
  108. 86 AssignStr(Key,CKey);
  109. ***** ^ not supported yet
  110. ***** ^ not supported yet
  111. ***** ^ not supported yet
  112. 87 LookUpOk := TRUE;
  113. 88
  114. 89 DBFToFrame(InvtryDBF,CurrentDF); (* fill in the frame and update*)
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. ***** ^ not supported yet
  118. 90 ShowDisplayFrame(CurrentDF,0,0,0,0);
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. 91 END LookUpInvty;
  123. ***** ^ not supported yet
  124. 92
  125. 93 PROCEDURE UpdateInvQuant(InvtryNbr : ARRAY OF CHAR; ChangeAmt: Real8);
  126. ***** ^ not supported yet
  127. 94 (* add the change amount to the on hand amount. The change amount could
  128. 95 be positive or negative *)
  129. 96
  130. 97 END UpdateInvQuant;
  131. ***** ^ not supported yet
  132. 98
  133. 99
  134. 100
  135. 101 PROCEDURE AddInvBatch();
  136. 102 (* take the value from the screen and add to the inventory record*)
  137. 103 (* used when new orders come in *)
  138. 104 VAR
  139. 105 OldLookup : Lookup;
  140. 106 FrameName : AFrameName;
  141. 107 AddStr : ARRAY[0..10] OF CHAR;
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. 108 AddAmt : Real8;
  145. 109 B : BOOLEAN;
  146. 110 InvRec : InvtryRec;
  147. 111 BEGIN
  148. 112 OldLookup := LookupProc; (* save old lookup proc *)
  149. ***** ^ not supported yet
  150. ***** ^ not supported yet
  151. 113 LookupProc :=LookUpInvty;
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. 114 InitDisplayFrame(CurrentDF,CurrentWindow);
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. 115 REPEAT
  159. 116 ReadDisplayFrame(PMIScreens,CurrentDF,'InvAdd');
  160. ***** ^ not supported yet
  161. ***** ^ not supported yet
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. 117 ShowDisplayFrame(CurrentDF,0,0,0,0);
  165. ***** ^ not supported yet
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. 118 ControlFrame(CurrentDF,0,'',FALSE,FrameName);
  169. ***** ^ not supported yet
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. 119 IF NOT LookUpOk
  173. 120 THEN
  174. 121 Prompt('Item not found ');
  175. ***** ^ not supported yet
  176. ***** ^ not supported yet
  177. 122 ELSE
  178. 123 ReadInput(CurrentDF,AddStr,'AddAmt');
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. ***** ^ not supported yet
  183. 124 B := StrToReal(AddStr,0,AddAmt);
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. 125 B := FrameToDBF(InvtryDBF,CurrentDF);
  188. ***** ^ not supported yet
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. 126 MoveInvtryFromDBF(InvRec);
  192. ***** ^ not supported yet
  193. ***** ^ not supported yet
  194. 127 InvRec.ONHAND := InvRec.ONHAND + AddAmt;
  195. ***** ^ not supported yet
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. 128 InvRec.ONORDER := 'N';
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 129 MoveInvtryToDBF(InvRec);
  204. ***** ^ not supported yet
  205. ***** ^ not supported yet
  206. 130 WriteDBRec(InvtryDBF);
  207. ***** ^ not supported yet
  208. ***** ^ not supported yet
  209. 131 END;
  210. 132 UNTIL NOT Equal(FrameName,'InvAdd');
  211. ***** ^ not supported yet
  212. ***** ^ not supported yet
  213. ***** ^ not supported yet
  214. 133 CloseDisplayFrame(CurrentDF);
  215. ***** ^ not supported yet
  216. ***** ^ not supported yet
  217. 134 LookupProc := OldLookup;
  218. ***** ^ not supported yet
  219. ***** ^ not supported yet
  220. 135 END AddInvBatch;
  221. ***** ^ not supported yet
  222. 136
  223. 137 PROCEDURE CtlKeyHandler(FrameRec : DisplayFrame; VAR LastKey : CARDINAL;
  224. 138 VAR NextFrame : AFrameName);
  225. 139 VAR
  226. 140 B : BOOLEAN;
  227. 141
  228. 142
  229. 143 BEGIN
  230. 144 NextFrame := ContinueInput;
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. 145 CASE LastKey OF
  234. 146 Key.PgUp : B:= PrevInvtry();
  235. ***** ^ not supported yet
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. ***** ^ not supported yet
  239. 147 |Key.PgDn : B:= NextInvtry();
  240. ***** ^ not supported yet
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. ***** ^ not supported yet
  244. 148 |Key.CtrlPgDn : LastInvtry();
  245. ***** ^ not supported yet
  246. ***** ^ not supported yet
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. 149 |Key.CtrlPgUp : FirstInvtry();
  250. ***** ^ not supported yet
  251. ***** ^ not supported yet
  252. ***** ^ not supported yet
  253. ***** ^ not supported yet
  254. 150 |Key.Escape : NextFrame := CancelInput;
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. ***** ^ not supported yet
  259. 151 |Key.Return : NextFrame := SubmitInput;
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. ***** ^ not supported yet
  263. ***** ^ not supported yet
  264. 152 ELSE
  265. 153 END;
  266. 154 IF NOT (LastKey = Key.Escape) (* update the display *)
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. 155 THEN
  270. 156 DBFToFrame(InvtryDBF,FrameRec);
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. 157 ShowDisplayFrame(FrameRec,0,0,0,0);
  275. ***** ^ not supported yet
  276. ***** ^ not supported yet
  277. ***** ^ not supported yet
  278. 158 END;
  279. 159
  280. 160 END CtlKeyHandler;
  281. ***** ^ not supported yet
  282. 161
  283. 162
  284. 163 PROCEDURE GetInvItem( VAR InvItem : InvtryRec): BOOLEAN;
  285. 164 (* this routine controls the problems associated with not finding
  286. 165 the inventory item on a lookup - will allow the user to
  287. 166 go forward, backward in the inventory records till the
  288. 167 correct item is found -
  289. 168 Returns the item in the record
  290. 169 otherwise returns false *)
  291. 170 VAR
  292. 171 OldKeyHandler : AKeyHandler;
  293. 172 NxtFrame : AFrameName;
  294. 173 B : BOOLEAN;
  295. 174 BEGIN
  296. 175 OldKeyHandler := TheKeyHandler;
  297. ***** ^ not supported yet
  298. ***** ^ not supported yet
  299. 176 TheKeyHandler := CtlKeyHandler;
  300. ***** ^ not supported yet
  301. ***** ^ not supported yet
  302. 177 InitDisplayFrame(InvtryDF,CurrentWindow);
  303. ***** ^ not supported yet
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. 178 ReadDisplayFrame(PMIScreens,InvtryDF,'InvSearch');
  307. ***** ^ not supported yet
  308. ***** ^ not supported yet
  309. ***** ^ not supported yet
  310. ***** ^ not supported yet
  311. 179 ReadDBRec(InvtryDBF,CurrentRec(InvcodeIdx)); (* get closest rec*)
  312. ***** ^ not supported yet
  313. ***** ^ not supported yet
  314. ***** ^ not supported yet
  315. ***** ^ not supported yet
  316. 180 DBFToFrame(InvtryDBF,InvtryDF);
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. 181 ShowDisplayFrame(InvtryDF,0,0,0,0);
  321. ***** ^ not supported yet
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. 182 ControlFrame(InvtryDF,1,'',TRUE,NxtFrame);
  325. ***** ^ not supported yet
  326. ***** ^ not supported yet
  327. ***** ^ not supported yet
  328. 183
  329. 184
  330. 185 TheKeyHandler := OldKeyHandler;
  331. ***** ^ not supported yet
  332. ***** ^ not supported yet
  333. 186 B := Equal('SUBMIT',NxtFrame);
  334. ***** ^ not supported yet
  335. ***** ^ not supported yet
  336. ***** ^ not supported yet
  337. 187 CloseDisplayFrame(InvtryDF);
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. 188 IF B
  341. 189 THEN
  342. 190 MoveInvtryFromDBF(InvItem);
  343. ***** ^ not supported yet
  344. ***** ^ not supported yet
  345. 191 RETURN TRUE;
  346. 192 ELSE
  347. 193 RETURN FALSE;
  348. 194 END;
  349. 195 END GetInvItem;
  350. ***** ^ not supported yet
  351. 196
  352. 197
  353. 198 PROCEDURE UpdateInvBatch();
  354. 199 (* this routine will update the inventory items in a batch mode*)
  355. 200 (* until the user hits esc key*)
  356. 201 VAR
  357. 202 OldLookup : Lookup;
  358. 203 FrameName : AFrameName;
  359. 204 B : BOOLEAN;
  360. 205 BEGIN
  361. 206 OldLookup := LookupProc; (* save old lookup proc *)
  362. ***** ^ not supported yet
  363. ***** ^ not supported yet
  364. 207 LookupProc := LookUpInvty;
  365. ***** ^ not supported yet
  366. ***** ^ not supported yet
  367. 208 InitDisplayFrame(CurrentDF,CurrentWindow);
  368. ***** ^ not supported yet
  369. ***** ^ not supported yet
  370. ***** ^ not supported yet
  371. 209 REPEAT
  372. 210 ReadDisplayFrame(PMIScreens,CurrentDF,'InvUpdate');
  373. ***** ^ not supported yet
  374. ***** ^ not supported yet
  375. ***** ^ not supported yet
  376. ***** ^ not supported yet
  377. 211 ShowDisplayFrame(CurrentDF,0,0,0,0);
  378. ***** ^ not supported yet
  379. ***** ^ not supported yet
  380. ***** ^ not supported yet
  381. 212 ControlFrame(CurrentDF,0,'',FALSE,FrameName);
  382. ***** ^ not supported yet
  383. ***** ^ not supported yet
  384. ***** ^ not supported yet
  385. 213 IF NOT LookUpOk
  386. 214 THEN
  387. 215 Prompt('Item not found ');
  388. ***** ^ not supported yet
  389. ***** ^ not supported yet
  390. 216 ELSE
  391. 217 B := FrameToDBF(InvtryDBF,CurrentDF);
  392. ***** ^ not supported yet
  393. ***** ^ not supported yet
  394. ***** ^ not supported yet
  395. 218 FixInvRec();
  396. ***** ^ not supported yet
  397. ***** ^ not supported yet
  398. 219 WriteDBRec(InvtryDBF);
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. 220 END;
  402. 221 UNTIL NOT Equal(FrameName,'Update');
  403. ***** ^ not supported yet
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. 222 CloseDisplayFrame(CurrentDF);
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. 223 LookupProc := OldLookup;
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. 224 END UpdateInvBatch;
  413. ***** ^ not supported yet
  414. 225
  415. 226 PROCEDURE FileMenu(SelChar: CHAR);
  416. 227 VAR
  417. 228 B : BOOLEAN;
  418. 229 Str : ARRAY [0..80] OF CHAR;
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. 230 BEGIN
  422. 231 CASE SelChar OF
  423. 232 'A' : ReadDisplayFrame(PMIScreens,InvtryDF,'Invtry'); (*Clear out any of the fields *)
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. 233 ShowDisplayFrame(InvtryDF,0,0,0,0);
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 234 Control(InvtryDF); (* alow user input *)
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. 235 AppendBlank(InvtryDBF);
  436. ***** ^ not supported yet
  437. ***** ^ not supported yet
  438. 236 B := FrameToDBF(InvtryDBF,InvtryDF); (* do something if couldn't add*)
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. 237 FixInvRec();
  443. ***** ^ not supported yet
  444. ***** ^ not supported yet
  445. 238 WriteDBRec(InvtryDBF);
  446. ***** ^ not supported yet
  447. ***** ^ not supported yet
  448. 239 |'F' : FirstInvtry();
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. 240 DBFToFrame(InvtryDBF,InvtryDF);
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. ***** ^ not supported yet
  455. 241 ShowDisplayFrame(InvtryDF,0,0,0,0);
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. ***** ^ not supported yet
  459. 242 |'L' : LastInvtry();
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. 243 DBFToFrame(InvtryDBF,InvtryDF);
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. 244 ShowDisplayFrame(InvtryDF,0,0,0,0);
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. 245
  471. 246 |'N' : IF NextInvtry()
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. 247 THEN
  475. 248 DBFToFrame(InvtryDBF,InvtryDF);
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. ***** ^ not supported yet
  479. 249 ShowDisplayFrame(InvtryDF,0,0,0,0);
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. 250 END;
  484. 251
  485. 252 |'P' : IF PrevInvtry()
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. 253 THEN
  489. 254 DBFToFrame(InvtryDBF,InvtryDF);
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. ***** ^ not supported yet
  493. 255 ShowDisplayFrame(InvtryDF,0,0,0,0);
  494. ***** ^ not supported yet
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 256 END;
  498. 257
  499. 258
  500. 259 |'I' : (* The first unused letter in the index name or 'Q' *)
  501. 260 Fill(ADR(Str),SIZE(Str),0);
  502. ***** ^ not supported yet
  503. ***** ^ not supported yet
  504. ***** ^ not supported yet
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. 261
  509. 262 PromptStr('Enter Invtry Invcode ',Str);
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. ***** ^ not supported yet
  513. 263
  514. 264
  515. 265 CrunchBlanks(Str);
  516. ***** ^ not supported yet
  517. ***** ^ not supported yet
  518. 266 CAPstr(Str);
  519. ***** ^ not supported yet
  520. ***** ^ not supported yet
  521. 267 IF NOT FindInvtryByInvcode(Str)
  522. ***** ^ not supported yet
  523. ***** ^ not supported yet
  524. 268 THEN
  525. 269 END;
  526. 270 DBFToFrame(InvtryDBF,InvtryDF);
  527. ***** ^ not supported yet
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. 271 ShowDisplayFrame(InvtryDF,0,0,0,0);
  531. ***** ^ not supported yet
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. 272
  535. 273
  536. 274 |'O' : (* The first unused letter in the index name or 'Q' *)
  537. 275 Fill(ADR(Str),SIZE(Str),0);
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. ***** ^ not supported yet
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. 276
  545. 277 PromptStr('Enter Invtry Orderfrm ',Str);
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. ***** ^ not supported yet
  549. 278
  550. 279
  551. 280 CrunchBlanks(Str);
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. 281 IF NOT FindInvtryByOrderfrm(Str)
  555. ***** ^ not supported yet
  556. ***** ^ not supported yet
  557. 282 THEN
  558. 283 Prompt('Invtry Not Found');
  559. ***** ^ not supported yet
  560. ***** ^ not supported yet
  561. 284 ELSE
  562. 285 DBFToFrame(InvtryDBF,InvtryDF);
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. ***** ^ not supported yet
  566. 286 ShowDisplayFrame(InvtryDF,0,0,0,0);
  567. ***** ^ not supported yet
  568. ***** ^ not supported yet
  569. ***** ^ not supported yet
  570. 287 END;
  571. 288 END; (* end of case *)
  572. 289 END FileMenu;
  573. ***** ^ not supported yet
  574. 290
  575. 291 PROCEDURE EditMenu(SelChar : CHAR);
  576. 292 VAR
  577. 293 B : BOOLEAN;
  578. 294 BEGIN
  579. 295 CASE SelChar OF
  580. 296 'U' : Control(InvtryDF);
  581. ***** ^ not supported yet
  582. ***** ^ not supported yet
  583. 297 B := FrameToDBF(InvtryDBF,InvtryDF);
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. ***** ^ not supported yet
  587. 298 FixInvRec();
  588. ***** ^ not supported yet
  589. ***** ^ not supported yet
  590. 299 WriteDBRec(InvtryDBF);
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. 300 |'D' : IF PromptYN('About to delete inventory ',InvtryDF)
  594. ***** ^ not supported yet
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. 301 THEN
  598. 302 DeleteRecord(InvtryDBF);
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. 303 B := NextInvtry(); (* set the index to next - then prev to point to *)
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. 304 (* the correct item *)
  605. 305
  606. 306 FileMenu('P'); (* display the next customer *)
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. 307 NoData := TRUE;
  610. 308 END;
  611. 309 END;
  612. 310 END EditMenu;
  613. ***** ^ not supported yet
  614. 311
  615. 312 PROCEDURE Init();
  616. 313 BEGIN
  617. 314 NewList(PullDnMenu);
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. 315 LoadFrameList(PMIScreens,'InvtryTopMenu',PullDnMenu);
  621. ***** ^ not supported yet
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. ***** ^ not supported yet
  625. 316 InitInvtry := TRUE;
  626. 317 END Init;
  627. ***** ^ not supported yet
  628. 318
  629. 319 PROCEDURE GeneralInventory(VAR InvtyCode : ARRAY OF CHAR);
  630. ***** ^ not supported yet
  631. 320 VAR
  632. 321 Inv : InvtryRec;
  633. 322 B : BOOLEAN;
  634. 323 BEGIN
  635. 324 InitDisplayFrame(InvtryDF,CurrentWindow);
  636. ***** ^ not supported yet
  637. ***** ^ not supported yet
  638. ***** ^ not supported yet
  639. 325 ReadDisplayFrame(PMIScreens,InvtryDF,'Invtry');
  640. ***** ^ not supported yet
  641. ***** ^ not supported yet
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. 326 MakeKey(InvtyCode);
  645. ***** ^ not supported yet
  646. ***** ^ not supported yet
  647. 327 IF InvtyCode[0] = CHR(0)
  648. ***** ^ not supported yet
  649. ***** ^ not supported yet
  650. ***** ^ undeclared identifier
  651. ***** ^ not supported yet
  652. 328 THEN FirstInvtry();
  653. ***** ^ not supported yet
  654. ***** ^ not supported yet
  655. 329 ELSE
  656. 330 IF NOT NextInvtry() (* assume already did a find by number *)
  657. ***** ^ not supported yet
  658. ***** ^ not supported yet
  659. 331 THEN
  660. 332 B := PrevInvtry();
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. 333 END;
  664. 334 END;
  665. 335 DBFToFrame(InvtryDBF,InvtryDF);
  666. ***** ^ not supported yet
  667. ***** ^ not supported yet
  668. ***** ^ not supported yet
  669. 336 ShowDisplayFrame(InvtryDF,0,0,0,0);
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. ***** ^ not supported yet
  673. 337 IF NOT InitInvtry
  674. 338 THEN Init();
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. 339 END;
  678. 340 NoData := TRUE;
  679. 341 REPEAT
  680. 342 NextFrame := 'InvtryTopMenu';
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. 343 ControlSeparately(PullDnMenu,NextFrame,SelChar,EndingFrame);
  684. ***** ^ not supported yet
  685. ***** ^ not supported yet
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. 344 IF Equal(EndingFrame,'InvtryFileMenu')
  689. ***** ^ not supported yet
  690. ***** ^ not supported yet
  691. ***** ^ not supported yet
  692. 345 THEN FileMenu(SelChar);
  693. ***** ^ not supported yet
  694. ***** ^ not supported yet
  695. 346 ELSIF Equal(EndingFrame,'InvtEditMenu')
  696. ***** ^ not supported yet
  697. ***** ^ not supported yet
  698. ***** ^ not supported yet
  699. 347 THEN EditMenu(SelChar);
  700. ***** ^ not supported yet
  701. ***** ^ not supported yet
  702. 348 END;
  703. 349
  704. 350 UNTIL SelChar='X'; (* Assumes 'X' is only used to exit *)
  705. 351 MoveInvtryFromDBF(Inv);
  706. ***** ^ not supported yet
  707. ***** ^ not supported yet
  708. 352 AssignStr(Inv.INVCODE,InvtyCode);
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. ***** ^ not supported yet
  712. ***** ^ not supported yet
  713. 353 CloseDisplayFrame(InvtryDF);
  714. ***** ^ not supported yet
  715. ***** ^ not supported yet
  716. 354
  717. 355 END GeneralInventory;
  718. ***** ^ not supported yet
  719. 356
  720. 357
  721. 358
  722. 359
  723. 360 PROCEDURE ControlInvtry();
  724. 361 VAR
  725. 362 NextFrame : AFrameName;
  726. 363 Str : ARRAY[0..10] OF CHAR;
  727. ***** ^ not supported yet
  728. ***** ^ not supported yet
  729. 364 DF : DisplayFrame;
  730. 365 BEGIN
  731. 366 ClearScreen();
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. 367 InitDisplayFrame(DF,CurrentWindow);
  735. ***** ^ not supported yet
  736. ***** ^ not supported yet
  737. ***** ^ not supported yet
  738. 368
  739. 369 OpenInvtryDBF(TRUE);
  740. ***** ^ not supported yet
  741. ***** ^ not supported yet
  742. 370
  743. 371 REPEAT
  744. 372 ReadDisplayFrame(PMIScreens,DF,'InvtryMain');
  745. ***** ^ not supported yet
  746. ***** ^ not supported yet
  747. ***** ^ not supported yet
  748. ***** ^ not supported yet
  749. 373 ControlFrame(DF,1,'',TRUE,NextFrame);
  750. ***** ^ not supported yet
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. 374 IF Equal(NextFrame,'GenInv')
  754. ***** ^ not supported yet
  755. ***** ^ not supported yet
  756. ***** ^ not supported yet
  757. 375 THEN Str := '';
  758. ***** ^ not supported yet
  759. ***** ^ incompatible assignment
  760. 376 GeneralInventory(Str);
  761. ***** ^ not supported yet
  762. ***** ^ not supported yet
  763. 377 ELSIF Equal(NextFrame,'AddInv')
  764. ***** ^ not supported yet
  765. ***** ^ not supported yet
  766. ***** ^ not supported yet
  767. 378 THEN AddInvBatch();
  768. ***** ^ not supported yet
  769. ***** ^ not supported yet
  770. 379 ELSIF Equal(NextFrame,'UpdateInv')
  771. ***** ^ not supported yet
  772. ***** ^ not supported yet
  773. ***** ^ not supported yet
  774. 380 THEN UpdateInvBatch();
  775. ***** ^ not supported yet
  776. ***** ^ not supported yet
  777. 381 END;
  778. 382 ClearScreen();
  779. ***** ^ not supported yet
  780. ***** ^ not supported yet
  781. 383 UNTIL Equal(NextFrame,'Exit');
  782. ***** ^ not supported yet
  783. ***** ^ not supported yet
  784. ***** ^ not supported yet
  785. 384
  786. 385
  787. 386 CloseDisplayFrame(DF);
  788. ***** ^ not supported yet
  789. ***** ^ not supported yet
  790. 387 END ControlInvtry;
  791. ***** ^ not supported yet
  792. 388 BEGIN
  793. 389 InitInvtry := FALSE;
  794. 390 END Invtry.
  795. ***** ^ not supported yet
  796. 404 errors