INVOICEP.LST 61 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530
  1. Listing:
  2. 1 IMPLEMENTATION MODULE InvoicePrint;
  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 PMIGlobals IMPORT PMIScreens,Today,TodayStr,
  14. 13 TodayDays,Config,NormalTitle;
  15. 14 FROM PriceTable IMPORT ClearGrpCnt,AddGrp,GrpTotal,GetPrice,
  16. 15 GetPriceTable;
  17. 16 FROM DBFSalesrec IMPORT SalesRec,SalesrecDBF,SalesRecIdx,MoveSalesrecToDBF,
  18. 17 MoveSalesrecFromDBF,OpenSalesrecDBF,CloseSalesrecDBF;
  19. 18 FROM DBIndxes IMPORT FindPositionCh,CurrentRec;
  20. 19 FROM ModBase3 IMPORT AppendBlank,ReadDBRec,WriteDBRec;
  21. 20 FROM ScrnUtl1 IMPORT FieldNum;
  22. 21 FROM DBStuff IMPORT MakeKey;
  23. 22 FROM InputManager IMPORT ControlFrame;
  24. 23 FROM Customer IMPORT AddressRec,AddCustYTD,GetCustAddr,AddressTypes,
  25. 24 AddCustOutStd,SetCustLastInvDate;
  26. 25 FROM DateFunctions IMPORT DateToStr;
  27. 26 FROM DBFOrder IMPORT OrderRec,InvnbrIdx,OrderDBF,MoveOrderFromDBF;
  28. 27 FROM PosUtils IMPORT Equal,Pos;
  29. 28 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append,
  30. 29 CAPstr,OverWrite,RightJustify,Center;
  31. 30 FROM StrConv IMPORT CardinalToStr,RealToStr,StrToReal;
  32. 31 FROM M2Strings IMPORT Length,Assign,Concat;
  33. 32 FROM Gas IMPORT CheckOutGas,CheckInGas,DeleteGasFromInv;
  34. 33 FROM LowLevel IMPORT Fill;
  35. 34 FROM DBStuff IMPORT MakeSeqNbr,FindAll,ReadAllRecs,
  36. ***** ^ duplicate identifier
  37. 35 ConditionType,ChangeDateField,DeleteAllRecs;
  38. 36 FROM DBUtils IMPORT ReadCardField,ReadRealField,ReadDateField,
  39. 37 ChangeCardField,ChangeRealField,PrintFrame;
  40. 38 FROM ScrnTypes IMPORT AFrameName;
  41. 39 FROM NumTypes IMPORT Real8;
  42. 40 FROM StringIO IMPORT PrintMessage,ErrorMessage,WriteEol,WriteStr;
  43. 41 (* these next two are from stonybrook - the pmi version doesn't work*)
  44. 42 FROM Prompts IMPORT Prompt,PromptStr,PromptYN;
  45. 43 FROM SYSTEM IMPORT ADR,SIZE,TSIZE,ADDRESS,BYTE;
  46. 44 FROM HandleIO IMPORT FileExists,OpenFile,CloseHandle,BlockWrite;
  47. 45 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt,ElmtNow,GetElmtAdr,
  48. 46 JoinLists,ListDelete,ListInsert,DisposeList,ShellSortList;
  49. 47 FROM DBFInvoice IMPORT InvoiceDBF, OpenInvoiceDBF,InvoiceIdx,
  50. 48 CloseInvoiceDBF,InvoiceRec,FindInvoiceByInvoice,CustidIdx,
  51. 49 FindInvoiceByCustid,NextInvoice,PrevInvoice,InvoiceDBF,
  52. ***** ^ duplicate identifier
  53. 50 FirstInvoice,LastInvoice,MoveInvoiceToDBF,MoveInvoiceFromDBF;
  54. 51 FROM Invoice IMPORT InvoiceItem,FInvoice,Credit,GasOut,GasIn,
  55. 52 InvoiceHeadDF,OrderItemDF,CurrentInvoice,CurrInvOldAmt,OrderItemLst,
  56. 53 SummaryDF,CurrentItem,HeaderChanged,Recompute,Special,ReadHeader;
  57. 54
  58. 55
  59. 56 (***********************************************************************
  60. 57 invoices are stored with the invoice number indexed and the
  61. 58 customer number indexed.
  62. 59
  63. 60 The customer number is indexed as
  64. 61 Customer Number + Status
  65. 62 Where status =
  66. 63 'O' - Open - not yet printed so can be edited
  67. 64 'P' - Posted (printed ) - can not be editied but can be viewes
  68. 65 'C' - Invoice is closed i.e. paid off
  69. 66
  70. 67 Item Status = 'R' - Items still recorded
  71. 68 'D' - Items deleted
  72. 69
  73. 70 ********************************************************************)
  74. 71
  75. 72
  76. 73
  77. 74
  78. 75 PROCEDURE PostSales(InvNbr : ARRAY OF CHAR);
  79. ***** ^ not supported yet
  80. 76 (* go through the invoice and add items to inventory sales history*)
  81. 77 VAR
  82. 78 J : CARDINAL;
  83. 79 Key : ARRAY[0..15] OF CHAR;
  84. ***** ^ not supported yet
  85. ***** ^ not supported yet
  86. 80 Found : BOOLEAN;
  87. 81 Sales : SalesRec;
  88. 82 Size,Code : CARDINAL;
  89. 83 TheList : GenList;
  90. 84 Item : OrderRec;
  91. 85 RecNbr : LONGINT;
  92. 86 BEGIN
  93. 87 RETURN; (* * * * * * * * * * *TEMP FIX * * * * * * * * * * *)
  94. 88 NewList(TheList);
  95. ***** ^ not supported yet
  96. ***** ^ not supported yet
  97. 89 CrunchBlanks(InvNbr);
  98. ***** ^ not supported yet
  99. ***** ^ not supported yet
  100. 90 FindAll(InvnbrIdx,InvNbr,EQ,TheList); (* get items ordered *)
  101. ***** ^ not supported yet
  102. ***** ^ not supported yet
  103. ***** ^ not supported yet
  104. ***** ^ undeclared identifier
  105. ***** ^ not supported yet
  106. 91
  107. 92 OpenSalesrecDBF(TRUE);
  108. ***** ^ not supported yet
  109. ***** ^ not supported yet
  110. 93 FOR J := 1 TO ListLength(TheList) DO
  111. ***** ^ not supported yet
  112. ***** ^ not supported yet
  113. 94 GetElmt(TheList,J,RecNbr,Code);
  114. ***** ^ not supported yet
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. 95 ReadDBRec(OrderDBF,RecNbr);
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. 96 MoveOrderFromDBF(Item);
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. 97 IF NOT Special(Item.ITEMNBR)
  125. ***** ^ not supported yet
  126. ***** ^ not supported yet
  127. ***** ^ not supported yet
  128. 98 THEN
  129. 99 Assign( Item.ITEMNBR,Key );
  130. ***** ^ not supported yet
  131. ***** ^ not supported yet
  132. ***** ^ not supported yet
  133. ***** ^ not supported yet
  134. 100 FindPositionCh(SalesRecIdx,Key,Found);
  135. ***** ^ not supported yet
  136. ***** ^ not supported yet
  137. ***** ^ not supported yet
  138. ***** ^ not supported yet
  139. 101 IF Found
  140. 102 THEN
  141. 103 ReadDBRec(SalesrecDBF,CurrentRec(SalesRecIdx));
  142. ***** ^ not supported yet
  143. ***** ^ not supported yet
  144. ***** ^ not supported yet
  145. ***** ^ not supported yet
  146. 104 MoveSalesrecFromDBF(Sales);
  147. ***** ^ not supported yet
  148. ***** ^ not supported yet
  149. 105 Sales.Sold[Today.mo] := Sales.Sold[Today.mo] +
  150. ***** ^ not supported yet
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. ***** ^ not supported yet
  154. ***** ^ not supported yet
  155. ***** ^ not supported yet
  156. ***** ^ not supported yet
  157. ***** ^ not supported yet
  158. 106 Item.QNTSOLD;
  159. ***** ^ not supported yet
  160. ***** ^ not supported yet
  161. 107 MoveSalesrecToDBF(Sales);
  162. ***** ^ not supported yet
  163. ***** ^ not supported yet
  164. 108 ELSE
  165. 109 AppendBlank(SalesrecDBF);
  166. ***** ^ not supported yet
  167. ***** ^ not supported yet
  168. 110 Fill(ADR(Sales),SIZE(Sales),0);
  169. ***** ^ not supported yet
  170. ***** ^ not supported yet
  171. ***** ^ not supported yet
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. 111 Sales.Sold[Today.mo] := Item.QNTSOLD;
  176. ***** ^ not supported yet
  177. ***** ^ not supported yet
  178. ***** ^ not supported yet
  179. ***** ^ not supported yet
  180. ***** ^ not supported yet
  181. ***** ^ not supported yet
  182. 112 Assign( Item.ITEMNBR,Sales.ITEMNBR );
  183. ***** ^ not supported yet
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. ***** ^ not supported yet
  187. ***** ^ not supported yet
  188. 113 MoveSalesrecToDBF(Sales);
  189. ***** ^ not supported yet
  190. ***** ^ not supported yet
  191. 114 END;
  192. 115 WriteDBRec(SalesrecDBF);
  193. ***** ^ not supported yet
  194. ***** ^ not supported yet
  195. 116 END; (* end if not special order *)
  196. 117 END; (* end of loop *)
  197. 118 DisposeList(TheList);
  198. ***** ^ not supported yet
  199. ***** ^ not supported yet
  200. 119 CloseSalesrecDBF();
  201. ***** ^ not supported yet
  202. ***** ^ not supported yet
  203. 120 END PostSales;
  204. ***** ^ not supported yet
  205. 121
  206. 122
  207. 123 PROCEDURE PrintInvoice(PkgSlipOnly : BOOLEAN);
  208. 124 CONST
  209. 125 Blank = ' ';
  210. ***** ^ not supported yet
  211. 126 LinesPerPage = 32;
  212. 127 VAR
  213. 128 Str : ARRAY[0..100] OF CHAR;
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. 129 CurrentPage : CARDINAL;
  217. 130 CurrentLine : CARDINAL;
  218. 131 TotalPages : CARDINAL;
  219. 132 NextFrame : AFrameName;
  220. 133 BufCnt : CARDINAL;
  221. 134 FF : BYTE;
  222. 135 Prt : CARDINAL;
  223. 136 R : Real8;
  224. 137 J : CARDINAL;
  225. 138 EM : ErrorMessage;
  226. 139 Size,Code : CARDINAL;
  227. 140 ShipTo,BillTo : AddressRec;
  228. 141 TmpTotal : Real8;
  229. 142
  230. 143 PROCEDURE NbrOfPages() : CARDINAL;
  231. 144 (* calculate the number of pages for the invoice *)
  232. 145 VAR J : CARDINAL;
  233. 146 Lines : CARDINAL;
  234. 147 Size,Code : CARDINAL;
  235. 148 Tmp : ARRAY[0..80] OF CHAR;
  236. ***** ^ not supported yet
  237. ***** ^ not supported yet
  238. 149 PgNbr : CARDINAL;
  239. 150 PROCEDURE CountNoteLines();
  240. 151 BEGIN
  241. 152
  242. 153 CrunchBlanks(CurrentInvoice.NOTE1);
  243. ***** ^ not supported yet
  244. ***** ^ not supported yet
  245. ***** ^ not supported yet
  246. 154 IF Length(CurrentInvoice.NOTE1) > 1
  247. ***** ^ not supported yet
  248. ***** ^ not supported yet
  249. ***** ^ not supported yet
  250. 155 THEN INC(Lines);
  251. ***** ^ undeclared identifier
  252. ***** ^ not supported yet
  253. 156 END;
  254. 157 CrunchBlanks(CurrentInvoice.NOTE2);
  255. ***** ^ not supported yet
  256. ***** ^ not supported yet
  257. ***** ^ not supported yet
  258. 158 IF Length(CurrentInvoice.NOTE2) > 1
  259. ***** ^ not supported yet
  260. ***** ^ not supported yet
  261. ***** ^ not supported yet
  262. 159 THEN INC(Lines);
  263. ***** ^ undeclared identifier
  264. ***** ^ not supported yet
  265. 160 END;
  266. 161 CrunchBlanks(CurrentInvoice.NOTE3);
  267. ***** ^ not supported yet
  268. ***** ^ not supported yet
  269. ***** ^ not supported yet
  270. 162 IF Length(CurrentInvoice.NOTE3) > 1
  271. ***** ^ not supported yet
  272. ***** ^ not supported yet
  273. ***** ^ not supported yet
  274. 163 THEN INC(Lines);
  275. ***** ^ undeclared identifier
  276. ***** ^ not supported yet
  277. 164 END;
  278. 165 END CountNoteLines;
  279. ***** ^ not supported yet
  280. 166 BEGIN
  281. 167 Lines := 1; (**)
  282. 168 PgNbr := 1;
  283. 169 IF (CurrentInvoice.NOTESFOR = 'B')
  284. ***** ^ not supported yet
  285. ***** ^ not supported yet
  286. 170 THEN CountNoteLines();
  287. ***** ^ not supported yet
  288. ***** ^ not supported yet
  289. 171 ELSIF ((CurrentInvoice.NOTESFOR='P') AND PkgSlipOnly)
  290. ***** ^ not supported yet
  291. ***** ^ not supported yet
  292. 172 THEN CountNoteLines();
  293. ***** ^ not supported yet
  294. ***** ^ not supported yet
  295. 173 ELSIF ((CurrentInvoice.NOTESFOR='I') AND NOT PkgSlipOnly)
  296. ***** ^ not supported yet
  297. ***** ^ not supported yet
  298. 174 THEN CountNoteLines();
  299. ***** ^ not supported yet
  300. ***** ^ not supported yet
  301. 175 END;
  302. 176
  303. 177 FOR J := 1 TO ListLength(OrderItemLst) DO
  304. ***** ^ not supported yet
  305. ***** ^ not supported yet
  306. 178 INC(Lines);
  307. ***** ^ undeclared identifier
  308. ***** ^ not supported yet
  309. 179 IF Lines > LinesPerPage
  310. 180 THEN
  311. 181 INC (PgNbr);
  312. ***** ^ undeclared identifier
  313. ***** ^ not supported yet
  314. 182 Lines := 1;
  315. 183 END;
  316. 184 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code);
  317. ***** ^ not supported yet
  318. ***** ^ not supported yet
  319. ***** ^ not supported yet
  320. ***** ^ not supported yet
  321. 185 CrunchBlanks(CurrentItem^.ItemOrderRec.NOTES1);
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. ***** ^ not supported yet
  325. ***** ^ not supported yet
  326. 186 CrunchBlanks(CurrentItem^.ItemOrderRec.NOTES2);
  327. ***** ^ not supported yet
  328. ***** ^ not supported yet
  329. ***** ^ not supported yet
  330. ***** ^ not supported yet
  331. 187 CrunchBlanks(CurrentItem^.ItemOrderRec.NOTES3);
  332. ***** ^ not supported yet
  333. ***** ^ not supported yet
  334. ***** ^ not supported yet
  335. ***** ^ not supported yet
  336. 188 IF Length(CurrentItem^.ItemOrderRec.NOTES1 ) > 1
  337. ***** ^ not supported yet
  338. ***** ^ not supported yet
  339. ***** ^ not supported yet
  340. ***** ^ not supported yet
  341. 189 THEN
  342. 190 INC(Lines);
  343. ***** ^ undeclared identifier
  344. ***** ^ not supported yet
  345. 191 END;
  346. 192 IF Length(CurrentItem^.ItemOrderRec.NOTES2) > 1
  347. ***** ^ not supported yet
  348. ***** ^ not supported yet
  349. ***** ^ not supported yet
  350. ***** ^ not supported yet
  351. 193 THEN
  352. 194 INC(Lines);
  353. ***** ^ undeclared identifier
  354. ***** ^ not supported yet
  355. 195 END;
  356. 196 IF Length(CurrentItem^.ItemOrderRec.NOTES3) > 1
  357. ***** ^ not supported yet
  358. ***** ^ not supported yet
  359. ***** ^ not supported yet
  360. ***** ^ not supported yet
  361. 197 THEN
  362. 198 INC(Lines);
  363. ***** ^ undeclared identifier
  364. ***** ^ not supported yet
  365. 199 END;
  366. 200 END; (* end for j *)
  367. 201 (* Lines := Lines + 5; (* net, tax, discount, total *)*)
  368. 202 RETURN PgNbr;
  369. 203 END NbrOfPages;
  370. ***** ^ not supported yet
  371. 204
  372. 205 PROCEDURE PrintLine(Item : OrderRec; PksOnly : BOOLEAN);
  373. 206
  374. 207 VAR
  375. 208 Line : ARRAY[0..120] OF CHAR;
  376. ***** ^ not supported yet
  377. ***** ^ not supported yet
  378. 209
  379. 210 BEGIN
  380. 211 INC(CurrentLine); (* increment line counter *)
  381. ***** ^ undeclared identifier
  382. ***** ^ not supported yet
  383. 212 Fill(ADR(Line),102,' ');
  384. ***** ^ not supported yet
  385. ***** ^ not supported yet
  386. ***** ^ not supported yet
  387. ***** ^ not supported yet
  388. 213 RealToStr(Item.QNTSOLD,2,8,Str);
  389. ***** ^ not supported yet
  390. ***** ^ not supported yet
  391. ***** ^ not supported yet
  392. ***** ^ not supported yet
  393. 214 RightJustify(Str,8);
  394. ***** ^ not supported yet
  395. ***** ^ not supported yet
  396. ***** ^ not supported yet
  397. 215 (* CrunchBlanks(Str); *)
  398. 216 OverWrite(Str,Line,0);
  399. ***** ^ not supported yet
  400. ***** ^ not supported yet
  401. ***** ^ not supported yet
  402. ***** ^ not supported yet
  403. 217 OverWrite(Item.UNITS,Line,8);
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. ***** ^ not supported yet
  407. ***** ^ not supported yet
  408. ***** ^ not supported yet
  409. 218 OverWrite(Item.ITEMNBR,Line,14);
  410. ***** ^ not supported yet
  411. ***** ^ not supported yet
  412. ***** ^ not supported yet
  413. ***** ^ not supported yet
  414. ***** ^ not supported yet
  415. 219 OverWrite(Item.DESC,Line,23);
  416. ***** ^ not supported yet
  417. ***** ^ not supported yet
  418. ***** ^ not supported yet
  419. ***** ^ not supported yet
  420. ***** ^ not supported yet
  421. 220 IF NOT PksOnly
  422. 221 THEN
  423. 222 RealToStr(Item.UNITPRC,2,6,Str);
  424. ***** ^ not supported yet
  425. ***** ^ not supported yet
  426. ***** ^ not supported yet
  427. ***** ^ not supported yet
  428. 223 RightJustify(Str,6);
  429. ***** ^ not supported yet
  430. ***** ^ not supported yet
  431. ***** ^ not supported yet
  432. 224 OverWrite(Str,Line,78);
  433. ***** ^ not supported yet
  434. ***** ^ not supported yet
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. 225 RealToStr(Item.TOTAL,2,6,Str);
  438. ***** ^ not supported yet
  439. ***** ^ not supported yet
  440. ***** ^ not supported yet
  441. ***** ^ not supported yet
  442. 226 RightJustify(Str,7);
  443. ***** ^ not supported yet
  444. ***** ^ not supported yet
  445. ***** ^ not supported yet
  446. 227 OverWrite(Str,Line,88);
  447. ***** ^ not supported yet
  448. ***** ^ not supported yet
  449. ***** ^ not supported yet
  450. ***** ^ not supported yet
  451. 228 Line[96] := 0C;
  452. ***** ^ not supported yet
  453. ***** ^ not supported yet
  454. 229 ELSE
  455. 230 Line[79] := 0C;
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. 231 END;
  459. 232 WriteEol(Prt,Line);
  460. ***** ^ not supported yet
  461. ***** ^ not supported yet
  462. 233 CrunchBlanks(Item.NOTES1);
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ not supported yet
  466. 234 CrunchBlanks(Item.NOTES2);
  467. ***** ^ not supported yet
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. 235 CrunchBlanks(Item.NOTES3);
  471. ***** ^ not supported yet
  472. ***** ^ not supported yet
  473. ***** ^ not supported yet
  474. 236 IF Item.NOTES1[0] > 0C (* notes exist *)
  475. ***** ^ not supported yet
  476. ***** ^ not supported yet
  477. ***** ^ not supported yet
  478. 237 THEN
  479. 238 WriteStr(Prt,Blank);
  480. ***** ^ not supported yet
  481. ***** ^ not supported yet
  482. 239 WriteEol(Prt,Item.NOTES1);
  483. ***** ^ not supported yet
  484. ***** ^ not supported yet
  485. ***** ^ not supported yet
  486. 240 INC(CurrentLine);
  487. ***** ^ undeclared identifier
  488. ***** ^ not supported yet
  489. 241 IF Item.NOTES2[0] > 0C
  490. ***** ^ not supported yet
  491. ***** ^ not supported yet
  492. ***** ^ not supported yet
  493. 242 THEN
  494. 243 WriteStr(Prt,Blank);
  495. ***** ^ not supported yet
  496. ***** ^ not supported yet
  497. 244 WriteEol(Prt,Item.NOTES2);
  498. ***** ^ not supported yet
  499. ***** ^ not supported yet
  500. ***** ^ not supported yet
  501. 245 INC(CurrentLine);
  502. ***** ^ undeclared identifier
  503. ***** ^ not supported yet
  504. 246 IF Item.NOTES3[0] > 0C
  505. ***** ^ not supported yet
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. 247 THEN
  509. 248 WriteStr(Prt,Blank);
  510. ***** ^ not supported yet
  511. ***** ^ not supported yet
  512. 249 WriteEol(Prt,Item.NOTES3);
  513. ***** ^ not supported yet
  514. ***** ^ not supported yet
  515. ***** ^ not supported yet
  516. 250 INC(CurrentLine);
  517. ***** ^ undeclared identifier
  518. ***** ^ not supported yet
  519. 251 END;
  520. 252 END;
  521. 253 END;
  522. 254 END PrintLine;
  523. ***** ^ not supported yet
  524. 255
  525. 256 PROCEDURE PrintPkgSlpHeader();
  526. 257 VAR J : CARDINAL;
  527. 258 Str2 : ARRAY[0..10] OF CHAR;
  528. ***** ^ not supported yet
  529. ***** ^ not supported yet
  530. 259 BEGIN
  531. 260 Assign( Config.CompanyName,Str );
  532. ***** ^ not supported yet
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. ***** ^ not supported yet
  536. 261 Center(Str,80);
  537. ***** ^ not supported yet
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. 262 OverWrite(TodayStr,Str,64);
  541. ***** ^ not supported yet
  542. ***** ^ not supported yet
  543. ***** ^ not supported yet
  544. ***** ^ not supported yet
  545. 263 WriteEol(Prt,Str);
  546. ***** ^ not supported yet
  547. ***** ^ not supported yet
  548. 264 Fill(ADR(Str),SIZE(Str),' ');
  549. ***** ^ not supported yet
  550. ***** ^ not supported yet
  551. ***** ^ not supported yet
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ not supported yet
  555. 265
  556. 266 Assign( Config.CompanyAddr1,Str );
  557. ***** ^ not supported yet
  558. ***** ^ not supported yet
  559. ***** ^ not supported yet
  560. ***** ^ not supported yet
  561. 267 Center(Str,80);
  562. ***** ^ not supported yet
  563. ***** ^ not supported yet
  564. ***** ^ not supported yet
  565. 268 CardinalToStr(CurrentPage,2,Str2);
  566. ***** ^ not supported yet
  567. ***** ^ not supported yet
  568. 269 INC(CurrentPage);
  569. ***** ^ undeclared identifier
  570. ***** ^ not supported yet
  571. 270 OverWrite('Page ',Str,60);
  572. ***** ^ not supported yet
  573. ***** ^ not supported yet
  574. ***** ^ not supported yet
  575. ***** ^ not supported yet
  576. 271 OverWrite(Str2,Str,65);
  577. ***** ^ not supported yet
  578. ***** ^ not supported yet
  579. ***** ^ not supported yet
  580. ***** ^ not supported yet
  581. 272 OverWrite('OF ',Str,67);
  582. ***** ^ not supported yet
  583. ***** ^ not supported yet
  584. ***** ^ not supported yet
  585. ***** ^ not supported yet
  586. 273 CardinalToStr(TotalPages,2,Str2);
  587. ***** ^ not supported yet
  588. ***** ^ not supported yet
  589. 274 OverWrite(Str2,Str,70);
  590. ***** ^ not supported yet
  591. ***** ^ not supported yet
  592. ***** ^ not supported yet
  593. ***** ^ not supported yet
  594. 275 WriteEol(Prt,Str);
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. 276
  598. 277 Fill(ADR(Str),SIZE(Str),' ');
  599. ***** ^ not supported yet
  600. ***** ^ not supported yet
  601. ***** ^ not supported yet
  602. ***** ^ not supported yet
  603. ***** ^ not supported yet
  604. ***** ^ not supported yet
  605. 278
  606. 279 Assign( Config.CompanyAddr2,Str );
  607. ***** ^ not supported yet
  608. ***** ^ not supported yet
  609. ***** ^ not supported yet
  610. ***** ^ not supported yet
  611. 280 Center(Str,80);
  612. ***** ^ not supported yet
  613. ***** ^ not supported yet
  614. ***** ^ not supported yet
  615. 281 OverWrite(CurrentInvoice.CUSTID,Str,64);
  616. ***** ^ not supported yet
  617. ***** ^ not supported yet
  618. ***** ^ not supported yet
  619. ***** ^ not supported yet
  620. ***** ^ not supported yet
  621. 282 WriteEol(Prt,Str);
  622. ***** ^ not supported yet
  623. ***** ^ not supported yet
  624. 283
  625. 284 Assign( Config.Phone,Str );
  626. ***** ^ not supported yet
  627. ***** ^ not supported yet
  628. ***** ^ not supported yet
  629. ***** ^ not supported yet
  630. 285 Center(Str,80);
  631. ***** ^ not supported yet
  632. ***** ^ not supported yet
  633. ***** ^ not supported yet
  634. 286 WriteEol(Prt,Str);
  635. ***** ^ not supported yet
  636. ***** ^ not supported yet
  637. 287 Assign( TodayStr,Str );
  638. ***** ^ not supported yet
  639. ***** ^ not supported yet
  640. ***** ^ not supported yet
  641. 288 Center(Str,80);
  642. ***** ^ not supported yet
  643. ***** ^ not supported yet
  644. ***** ^ not supported yet
  645. 289 WriteEol(Prt,Str);
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 290 WriteEol(Prt,'');
  649. ***** ^ not supported yet
  650. ***** ^ not supported yet
  651. 291 WriteEol(Prt,'');
  652. ***** ^ not supported yet
  653. ***** ^ not supported yet
  654. 292 WriteEol(Prt,'');
  655. ***** ^ not supported yet
  656. ***** ^ not supported yet
  657. 293 Fill(ADR(Str),SIZE(Str),' ');
  658. ***** ^ not supported yet
  659. ***** ^ not supported yet
  660. ***** ^ not supported yet
  661. ***** ^ not supported yet
  662. ***** ^ not supported yet
  663. ***** ^ not supported yet
  664. 294 Str[79] := 0C;
  665. ***** ^ not supported yet
  666. ***** ^ not supported yet
  667. 295 OverWrite('SHIP TO: ',Str,10);
  668. ***** ^ not supported yet
  669. ***** ^ not supported yet
  670. ***** ^ not supported yet
  671. ***** ^ not supported yet
  672. 296 FOR J := 0 TO 3 DO
  673. 297 OverWrite(ShipTo.Line[J],Str,20);
  674. ***** ^ not supported yet
  675. ***** ^ not supported yet
  676. ***** ^ not supported yet
  677. ***** ^ not supported yet
  678. ***** ^ not supported yet
  679. ***** ^ not supported yet
  680. 298 WriteEol(Prt,Str);
  681. ***** ^ not supported yet
  682. ***** ^ not supported yet
  683. 299 Fill(ADR(Str),SIZE(Str),' ');
  684. ***** ^ not supported yet
  685. ***** ^ not supported yet
  686. ***** ^ not supported yet
  687. ***** ^ not supported yet
  688. ***** ^ not supported yet
  689. ***** ^ not supported yet
  690. 300 Str[79] := 0C;
  691. ***** ^ not supported yet
  692. ***** ^ not supported yet
  693. 301 END;
  694. 302 WriteEol(Prt,'');
  695. ***** ^ not supported yet
  696. ***** ^ not supported yet
  697. 303 WriteEol(Prt,'');
  698. ***** ^ not supported yet
  699. ***** ^ not supported yet
  700. 304 WriteEol(Prt,'');
  701. ***** ^ not supported yet
  702. ***** ^ not supported yet
  703. 305
  704. 306 WriteStr(Prt,'Ship VIA: ');
  705. ***** ^ not supported yet
  706. ***** ^ not supported yet
  707. 307 WriteStr(Prt,CurrentInvoice.SHIPVIA);
  708. ***** ^ not supported yet
  709. ***** ^ not supported yet
  710. ***** ^ not supported yet
  711. 308 WriteStr(Prt,' FF = ');
  712. ***** ^ not supported yet
  713. ***** ^ not supported yet
  714. 309 WriteStr(Prt,CurrentInvoice.FREEFRGHT);
  715. ***** ^ not supported yet
  716. ***** ^ not supported yet
  717. ***** ^ not supported yet
  718. 310 WriteStr(Prt,'Terms: ');
  719. ***** ^ not supported yet
  720. ***** ^ not supported yet
  721. 311 WriteStr(Prt,CurrentInvoice.TERMS);
  722. ***** ^ not supported yet
  723. ***** ^ not supported yet
  724. ***** ^ not supported yet
  725. 312 WriteEol(Prt,'');
  726. ***** ^ not supported yet
  727. ***** ^ not supported yet
  728. 313 WriteStr(Prt,'Invoice Number: ');
  729. ***** ^ not supported yet
  730. ***** ^ not supported yet
  731. 314 WriteStr(Prt,CurrentInvoice.INVOICE);
  732. ***** ^ not supported yet
  733. ***** ^ not supported yet
  734. ***** ^ not supported yet
  735. 315 WriteEol(Prt,'');
  736. ***** ^ not supported yet
  737. ***** ^ not supported yet
  738. 316 WriteEol(Prt,'');
  739. ***** ^ not supported yet
  740. ***** ^ not supported yet
  741. 317
  742. 318 END PrintPkgSlpHeader;
  743. ***** ^ not supported yet
  744. 319
  745. 320 PROCEDURE PrintHeader();
  746. 321 CONST
  747. 322 err = 'ASCII ERROR';
  748. ***** ^ not supported yet
  749. 323 VAR
  750. 324 Tmp : ARRAY[0..10] OF CHAR;
  751. ***** ^ not supported yet
  752. ***** ^ not supported yet
  753. 325 B : BOOLEAN;
  754. 326 J : CARDINAL;
  755. 327 TLines : CARDINAL;
  756. 328 Str2,
  757. 329 CPI12,
  758. 330 CPIPana : ARRAY[0..10] OF CHAR;
  759. ***** ^ not supported yet
  760. ***** ^ not supported yet
  761. 331 Str : ARRAY[0..120] OF CHAR;
  762. ***** ^ not supported yet
  763. ***** ^ not supported yet
  764. 332 BEGIN
  765. 333 Concat(CHR(27),':',CPI12);
  766. ***** ^ not supported yet
  767. ***** ^ undeclared identifier
  768. ***** ^ not supported yet
  769. ***** ^ not supported yet
  770. 334 Concat(CHR(27),CHR(15),CPIPana);
  771. ***** ^ not supported yet
  772. ***** ^ undeclared identifier
  773. ***** ^ not supported yet
  774. ***** ^ undeclared identifier
  775. ***** ^ not supported yet
  776. ***** ^ not supported yet
  777. 335 Str := err;
  778. ***** ^ not supported yet
  779. ***** ^ not supported yet
  780. 336 WriteStr(Prt,CPI12);
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. 337 CurrentLine := 1;
  784. 338 IF PkgSlipOnly
  785. 339 THEN
  786. 340 WriteStr(Prt,CPIPana);
  787. ***** ^ not supported yet
  788. ***** ^ not supported yet
  789. 341 PrintPkgSlpHeader();
  790. ***** ^ not supported yet
  791. ***** ^ not supported yet
  792. 342 RETURN;
  793. 343 END;
  794. 344 Fill(ADR(Str),SIZE(Str),' ');
  795. ***** ^ not supported yet
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. ***** ^ not supported yet
  799. ***** ^ not supported yet
  800. ***** ^ not supported yet
  801. 345 Str[95] := 0C;
  802. ***** ^ not supported yet
  803. ***** ^ not supported yet
  804. 346 WriteEol(Prt,'');
  805. ***** ^ not supported yet
  806. ***** ^ not supported yet
  807. 347 DateToStr(CurrentInvoice.INVDATE,Str2,B);
  808. ***** ^ not supported yet
  809. ***** ^ not supported yet
  810. ***** ^ not supported yet
  811. ***** ^ not supported yet
  812. ***** ^ not supported yet
  813. 348 OverWrite(Str2,Str,75);
  814. ***** ^ not supported yet
  815. ***** ^ not supported yet
  816. ***** ^ not supported yet
  817. ***** ^ not supported yet
  818. 349 WriteEol(Prt,Str);
  819. ***** ^ not supported yet
  820. ***** ^ not supported yet
  821. 350 Fill(ADR(Str),SIZE(Str),' ');
  822. ***** ^ not supported yet
  823. ***** ^ not supported yet
  824. ***** ^ not supported yet
  825. ***** ^ not supported yet
  826. ***** ^ not supported yet
  827. ***** ^ not supported yet
  828. 351 CardinalToStr(CurrentPage,2,Str2);
  829. ***** ^ not supported yet
  830. ***** ^ not supported yet
  831. 352 OverWrite(Str2,Str,76);
  832. ***** ^ not supported yet
  833. ***** ^ not supported yet
  834. ***** ^ not supported yet
  835. ***** ^ not supported yet
  836. 353 INC(CurrentPage);
  837. ***** ^ undeclared identifier
  838. ***** ^ not supported yet
  839. 354 OverWrite('OF ',Str,79);
  840. ***** ^ not supported yet
  841. ***** ^ not supported yet
  842. ***** ^ not supported yet
  843. ***** ^ not supported yet
  844. 355 TLines := TotalPages;
  845. 356 CardinalToStr(TLines,2,Str2);
  846. ***** ^ not supported yet
  847. ***** ^ not supported yet
  848. 357 (* CardinalToStr(TotalPages,2,Str[70..73]);*)
  849. 358 OverWrite(Str2,Str,82);
  850. ***** ^ not supported yet
  851. ***** ^ not supported yet
  852. ***** ^ not supported yet
  853. ***** ^ not supported yet
  854. 359 Str[96] := 0C;
  855. ***** ^ not supported yet
  856. ***** ^ not supported yet
  857. 360 WriteEol(Prt,Str);
  858. ***** ^ not supported yet
  859. ***** ^ not supported yet
  860. 361 Fill(ADR(Str),SIZE(Str),' ');
  861. ***** ^ not supported yet
  862. ***** ^ not supported yet
  863. ***** ^ not supported yet
  864. ***** ^ not supported yet
  865. ***** ^ not supported yet
  866. ***** ^ not supported yet
  867. 362 Str[96] := 0C;
  868. ***** ^ not supported yet
  869. ***** ^ not supported yet
  870. 363 OverWrite(CurrentInvoice.CUSTID,Str,76);
  871. ***** ^ not supported yet
  872. ***** ^ not supported yet
  873. ***** ^ not supported yet
  874. ***** ^ not supported yet
  875. ***** ^ not supported yet
  876. 364 WriteEol(Prt,Str);
  877. ***** ^ not supported yet
  878. ***** ^ not supported yet
  879. 365
  880. 366 WriteEol(Prt,'');
  881. ***** ^ not supported yet
  882. ***** ^ not supported yet
  883. 367 WriteEol(Prt,'');
  884. ***** ^ not supported yet
  885. ***** ^ not supported yet
  886. 368 WriteEol(Prt,'');
  887. ***** ^ not supported yet
  888. ***** ^ not supported yet
  889. 369 WriteEol(Prt,'');
  890. ***** ^ not supported yet
  891. ***** ^ not supported yet
  892. 370 WriteEol(Prt,'');
  893. ***** ^ not supported yet
  894. ***** ^ not supported yet
  895. 371 FOR J := 0 TO 3 DO
  896. 372 Fill(ADR(Str),SIZE(Str),' ');
  897. ***** ^ not supported yet
  898. ***** ^ not supported yet
  899. ***** ^ not supported yet
  900. ***** ^ not supported yet
  901. ***** ^ not supported yet
  902. ***** ^ not supported yet
  903. 373 OverWrite(BillTo.Line[J],Str,15);
  904. ***** ^ not supported yet
  905. ***** ^ not supported yet
  906. ***** ^ not supported yet
  907. ***** ^ not supported yet
  908. ***** ^ not supported yet
  909. ***** ^ not supported yet
  910. 374 OverWrite(ShipTo.Line[J],Str,66);
  911. ***** ^ not supported yet
  912. ***** ^ not supported yet
  913. ***** ^ not supported yet
  914. ***** ^ not supported yet
  915. ***** ^ not supported yet
  916. ***** ^ not supported yet
  917. 375 Str[94] := 0C;
  918. ***** ^ not supported yet
  919. ***** ^ not supported yet
  920. 376 WriteEol(Prt,Str);
  921. ***** ^ not supported yet
  922. ***** ^ not supported yet
  923. 377 END;
  924. 378
  925. 379 FOR J := 1 TO 5 DO
  926. 380 WriteEol(Prt,'');
  927. ***** ^ not supported yet
  928. ***** ^ not supported yet
  929. 381 END;
  930. 382 Fill(ADR(Str),SIZE(Str),' ');
  931. ***** ^ not supported yet
  932. ***** ^ not supported yet
  933. ***** ^ not supported yet
  934. ***** ^ not supported yet
  935. ***** ^ not supported yet
  936. ***** ^ not supported yet
  937. 383 Str[95] := 0C;
  938. ***** ^ not supported yet
  939. ***** ^ not supported yet
  940. 384 DateToStr(CurrentInvoice.INVDATE,Str2,B);
  941. ***** ^ not supported yet
  942. ***** ^ not supported yet
  943. ***** ^ not supported yet
  944. ***** ^ not supported yet
  945. ***** ^ not supported yet
  946. 385 OverWrite(Str2,Str,0);
  947. ***** ^ not supported yet
  948. ***** ^ not supported yet
  949. ***** ^ not supported yet
  950. ***** ^ not supported yet
  951. 386 OverWrite(CurrentInvoice.CUSTPO,Str,10);
  952. ***** ^ not supported yet
  953. ***** ^ not supported yet
  954. ***** ^ not supported yet
  955. ***** ^ not supported yet
  956. ***** ^ not supported yet
  957. 387 OverWrite(Str2,Str,23);
  958. ***** ^ not supported yet
  959. ***** ^ not supported yet
  960. ***** ^ not supported yet
  961. ***** ^ not supported yet
  962. 388 OverWrite(CurrentInvoice.SALESMAN,Str,33);
  963. ***** ^ not supported yet
  964. ***** ^ not supported yet
  965. ***** ^ not supported yet
  966. ***** ^ not supported yet
  967. ***** ^ not supported yet
  968. 389 OverWrite(CurrentInvoice.TERMS,Str,42);
  969. ***** ^ not supported yet
  970. ***** ^ not supported yet
  971. ***** ^ not supported yet
  972. ***** ^ not supported yet
  973. ***** ^ not supported yet
  974. 390 OverWrite(CurrentInvoice.SHIPVIA,Str,63);
  975. ***** ^ not supported yet
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. ***** ^ not supported yet
  979. ***** ^ not supported yet
  980. 391 OverWrite(CurrentInvoice.INVOICE,Str,88);
  981. ***** ^ not supported yet
  982. ***** ^ not supported yet
  983. ***** ^ not supported yet
  984. ***** ^ not supported yet
  985. ***** ^ not supported yet
  986. 392 WriteEol(Prt,Str);
  987. ***** ^ not supported yet
  988. ***** ^ not supported yet
  989. 393 FOR J := 1 TO 4 DO
  990. 394 WriteEol(Prt,'');
  991. ***** ^ not supported yet
  992. ***** ^ not supported yet
  993. 395 END;
  994. 396
  995. 397 END PrintHeader;
  996. ***** ^ not supported yet
  997. 398
  998. 399
  999. 400
  1000. 401 PROCEDURE WriteHeaderNotes();
  1001. 402 VAR
  1002. 403 TmpStr : ARRAY[0..30] OF CHAR;
  1003. ***** ^ not supported yet
  1004. ***** ^ not supported yet
  1005. 404
  1006. 405 BEGIN
  1007. 406 IF Length(CurrentInvoice.NOTE1) > 1
  1008. ***** ^ not supported yet
  1009. ***** ^ not supported yet
  1010. ***** ^ not supported yet
  1011. 407 THEN
  1012. 408 WriteStr(Prt,Blank);
  1013. ***** ^ not supported yet
  1014. ***** ^ not supported yet
  1015. 409 WriteEol(Prt,CurrentInvoice.NOTE1);
  1016. ***** ^ not supported yet
  1017. ***** ^ not supported yet
  1018. ***** ^ not supported yet
  1019. 410 INC(CurrentLine);
  1020. ***** ^ undeclared identifier
  1021. ***** ^ not supported yet
  1022. 411 END;
  1023. 412 IF Length(CurrentInvoice.NOTE2) > 1
  1024. ***** ^ not supported yet
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. 413 THEN
  1028. 414 WriteStr(Prt,Blank);
  1029. ***** ^ not supported yet
  1030. ***** ^ not supported yet
  1031. 415 WriteEol(Prt,CurrentInvoice.NOTE2);
  1032. ***** ^ not supported yet
  1033. ***** ^ not supported yet
  1034. ***** ^ not supported yet
  1035. 416 INC(CurrentLine);
  1036. ***** ^ undeclared identifier
  1037. ***** ^ not supported yet
  1038. 417 END;
  1039. 418 IF Length(CurrentInvoice.NOTE3) > 1
  1040. ***** ^ not supported yet
  1041. ***** ^ not supported yet
  1042. ***** ^ not supported yet
  1043. 419 THEN
  1044. 420 WriteStr(Prt,Blank);
  1045. ***** ^ not supported yet
  1046. ***** ^ not supported yet
  1047. 421 WriteEol(Prt,CurrentInvoice.NOTE3);
  1048. ***** ^ not supported yet
  1049. ***** ^ not supported yet
  1050. ***** ^ not supported yet
  1051. 422 INC(CurrentLine);
  1052. ***** ^ undeclared identifier
  1053. ***** ^ not supported yet
  1054. 423 END;
  1055. 424 END WriteHeaderNotes;
  1056. ***** ^ not supported yet
  1057. 425
  1058. 426 VAR
  1059. 427 TmpStr : ARRAY[0..10] OF CHAR;
  1060. ***** ^ not supported yet
  1061. ***** ^ not supported yet
  1062. 428
  1063. 429
  1064. 430 BEGIN (* print invoice *)
  1065. 431 TotalPages :=NbrOfPages();
  1066. ***** ^ not supported yet
  1067. ***** ^ not supported yet
  1068. 432 IF CurrentInvoice.INVPRNT # 'O'
  1069. ***** ^ not supported yet
  1070. ***** ^ not supported yet
  1071. 433 THEN
  1072. 434 IF NOT PromptYN('WARNING Invoice already posted - Continue (y/n)?',InvoiceHeadDF)
  1073. ***** ^ not supported yet
  1074. ***** ^ not supported yet
  1075. ***** ^ not supported yet
  1076. 435 THEN
  1077. 436 RETURN
  1078. 437 ELSE
  1079. 438 IF CurrentInvoice.HELIUM = 'Y'
  1080. ***** ^ not supported yet
  1081. ***** ^ not supported yet
  1082. 439 THEN
  1083. 440 DeleteGasFromInv(CurrentInvoice.INVOICE);
  1084. ***** ^ not supported yet
  1085. ***** ^ not supported yet
  1086. ***** ^ not supported yet
  1087. 441 END;
  1088. 442 R := - CurrInvOldAmt;
  1089. ***** ^ not supported yet
  1090. ***** ^ not supported yet
  1091. 443 AddCustYTD(R); (* subtract the value from invoice prior to *)
  1092. ***** ^ not supported yet
  1093. ***** ^ not supported yet
  1094. 444 END;
  1095. 445 END;
  1096. 446 GetCustAddr(BillTo,Billing);
  1097. ***** ^ not supported yet
  1098. ***** ^ not supported yet
  1099. ***** ^ undeclared identifier
  1100. 447 GetCustAddr(ShipTo, Shipping);
  1101. ***** ^ not supported yet
  1102. ***** ^ not supported yet
  1103. ***** ^ undeclared identifier
  1104. 448 IF PkgSlipOnly
  1105. 449 THEN EM := OpenFile(Prt,Config.PksSlipPrt) (* which printer *)
  1106. ***** ^ not supported yet
  1107. ***** ^ not supported yet
  1108. ***** ^ not supported yet
  1109. ***** ^ not supported yet
  1110. 450 ELSE
  1111. 451
  1112. 452 EM := OpenFile(Prt,Config.InvoicePrt);
  1113. ***** ^ not supported yet
  1114. ***** ^ not supported yet
  1115. ***** ^ not supported yet
  1116. ***** ^ not supported yet
  1117. 453 CurrentInvoice.INVPRNT := 'P'; (* printed/posted *)
  1118. ***** ^ not supported yet
  1119. ***** ^ not supported yet
  1120. 454 CurrentInvoice.AMTOUT := CurrentInvoice.TOTALAMT;
  1121. ***** ^ not supported yet
  1122. ***** ^ not supported yet
  1123. ***** ^ not supported yet
  1124. ***** ^ not supported yet
  1125. 455 HeaderChanged := TRUE;
  1126. ***** ^ not supported yet
  1127. 456 IF CurrentInvoice.AMTOUT = 0.0
  1128. ***** ^ not supported yet
  1129. ***** ^ not supported yet
  1130. 457 THEN IF PromptYN('Zero Invoice Amount - close invoice ',InvoiceHeadDF)
  1131. ***** ^ not supported yet
  1132. ***** ^ not supported yet
  1133. ***** ^ not supported yet
  1134. 458 THEN CurrentInvoice.INVPRNT := 'C';
  1135. ***** ^ not supported yet
  1136. ***** ^ not supported yet
  1137. 459 END;
  1138. 460 END;
  1139. 461 AddCustOutStd(CurrentInvoice.AMTOUT);
  1140. ***** ^ not supported yet
  1141. ***** ^ not supported yet
  1142. ***** ^ not supported yet
  1143. 462 SetCustLastInvDate(CurrentInvoice.INVDATE);
  1144. ***** ^ not supported yet
  1145. ***** ^ not supported yet
  1146. ***** ^ not supported yet
  1147. 463
  1148. 464 (*CurrentInvoice.INVDATE := Today; invoice date = date printed *)
  1149. 465 AddCustYTD(CurrentInvoice.INVNET); (* update YTD Amount *)
  1150. ***** ^ not supported yet
  1151. ***** ^ not supported yet
  1152. ***** ^ not supported yet
  1153. 466 CurrInvOldAmt := CurrentInvoice.INVNET;
  1154. ***** ^ not supported yet
  1155. ***** ^ not supported yet
  1156. ***** ^ not supported yet
  1157. 467 IF (CurrentInvoice.SHIPPING = 0.0 ) AND (CurrentInvoice.FREEFRGHT # 'Y')
  1158. ***** ^ not supported yet
  1159. ***** ^ not supported yet
  1160. ***** ^ not supported yet
  1161. ***** ^ not supported yet
  1162. 468 THEN
  1163. 469 R := - CurrentInvoice.AMTOUT;
  1164. ***** ^ not supported yet
  1165. ***** ^ not supported yet
  1166. ***** ^ not supported yet
  1167. 470 AddCustOutStd(R);
  1168. ***** ^ not supported yet
  1169. ***** ^ not supported yet
  1170. 471 ControlFrame(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Shipping'),'',FALSE,NextFrame);
  1171. ***** ^ not supported yet
  1172. ***** ^ not supported yet
  1173. ***** ^ not supported yet
  1174. ***** ^ not supported yet
  1175. ***** ^ not supported yet
  1176. ***** ^ not supported yet
  1177. 472 ReadHeader();
  1178. ***** ^ not supported yet
  1179. ***** ^ not supported yet
  1180. 473 Recompute(); (* get shipping charge *)
  1181. ***** ^ not supported yet
  1182. ***** ^ not supported yet
  1183. 474 CurrentInvoice.AMTOUT := CurrentInvoice.TOTALAMT;
  1184. ***** ^ not supported yet
  1185. ***** ^ not supported yet
  1186. ***** ^ not supported yet
  1187. ***** ^ not supported yet
  1188. 475
  1189. 476
  1190. 477 END;
  1191. 478 AddCustOutStd(CurrentInvoice.AMTOUT);
  1192. ***** ^ not supported yet
  1193. ***** ^ not supported yet
  1194. ***** ^ not supported yet
  1195. 479 END;
  1196. 480 CurrentPage := 1;
  1197. 481 CurrentLine := 1;
  1198. 482 PrintHeader();
  1199. ***** ^ not supported yet
  1200. ***** ^ not supported yet
  1201. 483 IF (CurrentInvoice.NOTESFOR = 'B')
  1202. ***** ^ not supported yet
  1203. ***** ^ not supported yet
  1204. 484 THEN WriteHeaderNotes();
  1205. ***** ^ not supported yet
  1206. ***** ^ not supported yet
  1207. 485 ELSIF ((CurrentInvoice.NOTESFOR = 'P') AND PkgSlipOnly)
  1208. ***** ^ not supported yet
  1209. ***** ^ not supported yet
  1210. 486 THEN WriteHeaderNotes();
  1211. ***** ^ not supported yet
  1212. ***** ^ not supported yet
  1213. 487 ELSIF ((CurrentInvoice.NOTESFOR = 'I') AND NOT PkgSlipOnly)
  1214. ***** ^ not supported yet
  1215. ***** ^ not supported yet
  1216. 488 THEN WriteHeaderNotes();
  1217. ***** ^ not supported yet
  1218. ***** ^ not supported yet
  1219. 489 END;
  1220. 490
  1221. 491 FOR J := 1 TO ListLength(OrderItemLst) DO
  1222. ***** ^ not supported yet
  1223. ***** ^ not supported yet
  1224. 492 IF((CurrentLine MOD LinesPerPage) = 0)
  1225. 493 THEN
  1226. 494 FF := 0C;
  1227. ***** ^ not supported yet
  1228. 495 EM := BlockWrite(Prt,ADR(FF),1);
  1229. ***** ^ not supported yet
  1230. ***** ^ not supported yet
  1231. ***** ^ not supported yet
  1232. ***** ^ not supported yet
  1233. ***** ^ not supported yet
  1234. 496 PrintHeader()
  1235. ***** ^ not supported yet
  1236. ***** ^ not supported yet
  1237. 497 END;
  1238. 498 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code); (* get the item*)
  1239. ***** ^ not supported yet
  1240. ***** ^ not supported yet
  1241. ***** ^ not supported yet
  1242. ***** ^ not supported yet
  1243. 499 PrintLine(CurrentItem^.ItemOrderRec,PkgSlipOnly);
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. ***** ^ not supported yet
  1247. ***** ^ not supported yet
  1248. 500 IF NOT PkgSlipOnly
  1249. 501 THEN
  1250. 502 IF Pos(GasOut,CurrentItem^.ItemOrderRec.ITEMNBR) = 0
  1251. ***** ^ not supported yet
  1252. ***** ^ not supported yet
  1253. ***** ^ not supported yet
  1254. ***** ^ not supported yet
  1255. ***** ^ not supported yet
  1256. 503 THEN
  1257. 504 CurrentInvoice.HELIUM := 'Y';
  1258. ***** ^ not supported yet
  1259. ***** ^ not supported yet
  1260. 505 CheckOutGas(CurrentInvoice.CUSTID,CurrentInvoice.INVOICE,
  1261. ***** ^ not supported yet
  1262. ***** ^ not supported yet
  1263. ***** ^ not supported yet
  1264. ***** ^ not supported yet
  1265. ***** ^ not supported yet
  1266. 506 CurrentItem^.ItemOrderRec.ITEMNBR,
  1267. ***** ^ not supported yet
  1268. ***** ^ not supported yet
  1269. ***** ^ not supported yet
  1270. 507 TRUNC(CurrentItem^.ItemOrderRec.QNTSOLD),
  1271. ***** ^ undeclared identifier
  1272. ***** ^ not supported yet
  1273. ***** ^ not supported yet
  1274. ***** ^ not supported yet
  1275. 508 CurrentInvoice.INVDATE);
  1276. ***** ^ not supported yet
  1277. ***** ^ not supported yet
  1278. 509 ELSIF Pos(GasIn,CurrentItem^.ItemOrderRec.ITEMNBR) = 0
  1279. ***** ^ not supported yet
  1280. ***** ^ not supported yet
  1281. ***** ^ not supported yet
  1282. ***** ^ not supported yet
  1283. ***** ^ not supported yet
  1284. 510 THEN
  1285. 511 CurrentInvoice.HELIUM := 'Y';
  1286. ***** ^ not supported yet
  1287. ***** ^ not supported yet
  1288. 512 CheckInGas(CurrentInvoice.CUSTID,CurrentInvoice.INVOICE,
  1289. ***** ^ not supported yet
  1290. ***** ^ not supported yet
  1291. ***** ^ not supported yet
  1292. ***** ^ not supported yet
  1293. ***** ^ not supported yet
  1294. 513 CurrentItem^.ItemOrderRec.ITEMNBR,
  1295. ***** ^ not supported yet
  1296. ***** ^ not supported yet
  1297. ***** ^ not supported yet
  1298. 514 TRUNC(CurrentItem^.ItemOrderRec.QNTSOLD),
  1299. ***** ^ undeclared identifier
  1300. ***** ^ not supported yet
  1301. ***** ^ not supported yet
  1302. ***** ^ not supported yet
  1303. 515 CurrentInvoice.INVDATE);
  1304. ***** ^ not supported yet
  1305. ***** ^ not supported yet
  1306. 516 END;
  1307. 517 END;
  1308. 518 END;
  1309. 519 IF NOT PkgSlipOnly
  1310. 520 THEN
  1311. 521 WriteEol(Prt,'');
  1312. ***** ^ not supported yet
  1313. ***** ^ not supported yet
  1314. 522
  1315. 523 Fill(ADR(Str),SIZE(Str)-2,' ');
  1316. ***** ^ not supported yet
  1317. ***** ^ not supported yet
  1318. ***** ^ not supported yet
  1319. ***** ^ not supported yet
  1320. ***** ^ not supported yet
  1321. ***** ^ not supported yet
  1322. 524
  1323. 525 OverWrite('========',Str,88);
  1324. ***** ^ not supported yet
  1325. ***** ^ not supported yet
  1326. ***** ^ not supported yet
  1327. ***** ^ not supported yet
  1328. 526 WriteEol(Prt,Str);
  1329. ***** ^ not supported yet
  1330. ***** ^ not supported yet
  1331. 527 Fill(ADR(Str),SIZE(Str)-2,' ');
  1332. ***** ^ not supported yet
  1333. ***** ^ not supported yet
  1334. ***** ^ not supported yet
  1335. ***** ^ not supported yet
  1336. ***** ^ not supported yet
  1337. ***** ^ not supported yet
  1338. 528 OverWrite('Net',Str,40);
  1339. ***** ^ not supported yet
  1340. ***** ^ not supported yet
  1341. ***** ^ not supported yet
  1342. ***** ^ not supported yet
  1343. 529 TmpTotal := CurrentInvoice.INVNET / (1.0 - (CurrentInvoice.INVDSCNT/100.0));
  1344. ***** ^ not supported yet
  1345. ***** ^ not supported yet
  1346. ***** ^ not supported yet
  1347. ***** ^ not supported yet
  1348. ***** ^ not supported yet
  1349. 530
  1350. 531 RealToStr(TmpTotal,2,8,TmpStr);
  1351. ***** ^ not supported yet
  1352. ***** ^ not supported yet
  1353. ***** ^ not supported yet
  1354. 532 OverWrite(Str,TmpStr,87);
  1355. ***** ^ not supported yet
  1356. ***** ^ not supported yet
  1357. ***** ^ not supported yet
  1358. ***** ^ not supported yet
  1359. 533 WriteEol(Prt,Str);
  1360. ***** ^ not supported yet
  1361. ***** ^ not supported yet
  1362. 534
  1363. 535 IF CurrentInvoice.INVDSCNT > 0.0
  1364. ***** ^ not supported yet
  1365. ***** ^ not supported yet
  1366. 536 THEN
  1367. 537 Fill(ADR(Str),SIZE(Str)-2,' ');
  1368. ***** ^ not supported yet
  1369. ***** ^ not supported yet
  1370. ***** ^ not supported yet
  1371. ***** ^ not supported yet
  1372. ***** ^ not supported yet
  1373. ***** ^ not supported yet
  1374. 538 OverWrite('Discount @',Str,40);
  1375. ***** ^ not supported yet
  1376. ***** ^ not supported yet
  1377. ***** ^ not supported yet
  1378. ***** ^ not supported yet
  1379. 539 RealToStr(CurrentInvoice.INVDSCNT ,1,4,TmpStr);
  1380. ***** ^ not supported yet
  1381. ***** ^ not supported yet
  1382. ***** ^ not supported yet
  1383. ***** ^ not supported yet
  1384. 540 OverWrite(Str,TmpStr,51);
  1385. ***** ^ not supported yet
  1386. ***** ^ not supported yet
  1387. ***** ^ not supported yet
  1388. ***** ^ not supported yet
  1389. 541 OverWrite('%',Str,56);
  1390. ***** ^ not supported yet
  1391. ***** ^ not supported yet
  1392. ***** ^ not supported yet
  1393. 542 IF Str[55] = 0C
  1394. ***** ^ not supported yet
  1395. ***** ^ not supported yet
  1396. 543 THEN
  1397. 544 Str[55] := ' ';
  1398. ***** ^ not supported yet
  1399. ***** ^ not supported yet
  1400. 545 END;
  1401. 546 RealToStr((-1.0 * TmpTotal * CurrentInvoice.INVDSCNT/100.0 ),
  1402. ***** ^ not supported yet
  1403. ***** ^ not supported yet
  1404. ***** ^ not supported yet
  1405. ***** ^ not supported yet
  1406. 547 2,8,TmpStr);
  1407. ***** ^ not supported yet
  1408. 548 OverWrite(TmpStr,Str,87);
  1409. ***** ^ not supported yet
  1410. ***** ^ not supported yet
  1411. ***** ^ not supported yet
  1412. ***** ^ not supported yet
  1413. 549 WriteEol(Prt,Str);
  1414. ***** ^ not supported yet
  1415. ***** ^ not supported yet
  1416. 550 END;
  1417. 551
  1418. 552 IF (CurrentInvoice. TAXABLE = 'Y')
  1419. ***** ^ not supported yet
  1420. ***** ^ not supported yet
  1421. 553 THEN
  1422. 554 Fill(ADR(Str),SIZE(Str)-2,' ');
  1423. ***** ^ not supported yet
  1424. ***** ^ not supported yet
  1425. ***** ^ not supported yet
  1426. ***** ^ not supported yet
  1427. ***** ^ not supported yet
  1428. ***** ^ not supported yet
  1429. 555 OverWrite('Tax ',Str,40);
  1430. ***** ^ not supported yet
  1431. ***** ^ not supported yet
  1432. ***** ^ not supported yet
  1433. ***** ^ not supported yet
  1434. 556 RealToStr(CurrentInvoice.INVTAX,2,8,TmpStr);
  1435. ***** ^ not supported yet
  1436. ***** ^ not supported yet
  1437. ***** ^ not supported yet
  1438. ***** ^ not supported yet
  1439. 557 OverWrite(TmpStr,Str,87);
  1440. ***** ^ not supported yet
  1441. ***** ^ not supported yet
  1442. ***** ^ not supported yet
  1443. ***** ^ not supported yet
  1444. 558 WriteEol(Prt,Str);
  1445. ***** ^ not supported yet
  1446. ***** ^ not supported yet
  1447. 559
  1448. 560 END;
  1449. 561
  1450. 562 IF CurrentInvoice.SHIPPING > 0.0
  1451. ***** ^ not supported yet
  1452. ***** ^ not supported yet
  1453. 563 THEN
  1454. 564 Fill(ADR(Str),SIZE(Str)-2,' ');
  1455. ***** ^ not supported yet
  1456. ***** ^ not supported yet
  1457. ***** ^ not supported yet
  1458. ***** ^ not supported yet
  1459. ***** ^ not supported yet
  1460. ***** ^ not supported yet
  1461. 565 OverWrite('Shipping/Handling',Str,40);
  1462. ***** ^ not supported yet
  1463. ***** ^ not supported yet
  1464. ***** ^ not supported yet
  1465. ***** ^ not supported yet
  1466. 566 RealToStr(CurrentInvoice.SHIPPING,2,8,TmpStr);
  1467. ***** ^ not supported yet
  1468. ***** ^ not supported yet
  1469. ***** ^ not supported yet
  1470. ***** ^ not supported yet
  1471. 567 OverWrite(TmpStr,Str,87);
  1472. ***** ^ not supported yet
  1473. ***** ^ not supported yet
  1474. ***** ^ not supported yet
  1475. ***** ^ not supported yet
  1476. 568 WriteEol(Prt,Str);
  1477. ***** ^ not supported yet
  1478. ***** ^ not supported yet
  1479. 569 END;
  1480. 570 WriteEol(Prt,'');
  1481. ***** ^ not supported yet
  1482. ***** ^ not supported yet
  1483. 571 Fill(ADR(Str),SIZE(Str)-2,' ');
  1484. ***** ^ not supported yet
  1485. ***** ^ not supported yet
  1486. ***** ^ not supported yet
  1487. ***** ^ not supported yet
  1488. ***** ^ not supported yet
  1489. ***** ^ not supported yet
  1490. 572 OverWrite('TOTAL DUE',Str,40);
  1491. ***** ^ not supported yet
  1492. ***** ^ not supported yet
  1493. ***** ^ not supported yet
  1494. ***** ^ not supported yet
  1495. 573 RealToStr(CurrentInvoice.TOTALAMT,2,8,TmpStr);
  1496. ***** ^ not supported yet
  1497. ***** ^ not supported yet
  1498. ***** ^ not supported yet
  1499. ***** ^ not supported yet
  1500. 574 OverWrite(TmpStr,Str,87);
  1501. ***** ^ not supported yet
  1502. ***** ^ not supported yet
  1503. ***** ^ not supported yet
  1504. ***** ^ not supported yet
  1505. 575 WriteEol(Prt,Str);
  1506. ***** ^ not supported yet
  1507. ***** ^ not supported yet
  1508. 576 END;
  1509. 577 WriteStr(Prt,12C); (* final form feed *)
  1510. ***** ^ not supported yet
  1511. ***** ^ not supported yet
  1512. 578 EM := CloseHandle(Prt);
  1513. ***** ^ not supported yet
  1514. ***** ^ not supported yet
  1515. ***** ^ not supported yet
  1516. 579
  1517. 580 (* if freight = 0.0 and invoice charge freight = y Then prompt for frieght*)
  1518. 581
  1519. 582 END PrintInvoice;
  1520. ***** ^ not supported yet
  1521. 583
  1522. 584
  1523. 585
  1524. 586 END InvoicePrint.
  1525. ***** ^ not supported yet
  1526. 938 errors