INVOICE.LST 140 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663166416651666166716681669167016711672167316741675167616771678167916801681168216831684168516861687168816891690169116921693169416951696169716981699170017011702170317041705170617071708170917101711171217131714171517161717171817191720172117221723172417251726172717281729173017311732173317341735173617371738173917401741174217431744174517461747174817491750175117521753175417551756175717581759176017611762176317641765176617671768176917701771177217731774177517761777177817791780178117821783178417851786178717881789179017911792179317941795179617971798179918001801180218031804180518061807180818091810181118121813181418151816181718181819182018211822182318241825182618271828182918301831183218331834183518361837183818391840184118421843184418451846184718481849185018511852185318541855185618571858185918601861186218631864186518661867186818691870187118721873187418751876187718781879188018811882188318841885188618871888188918901891189218931894189518961897189818991900190119021903190419051906190719081909191019111912191319141915191619171918191919201921192219231924192519261927192819291930193119321933193419351936193719381939194019411942194319441945194619471948194919501951195219531954195519561957195819591960196119621963196419651966196719681969197019711972197319741975197619771978197919801981198219831984198519861987198819891990199119921993199419951996199719981999200020012002200320042005200620072008200920102011201220132014201520162017201820192020202120222023202420252026202720282029203020312032203320342035203620372038203920402041204220432044204520462047204820492050205120522053205420552056205720582059206020612062206320642065206620672068206920702071207220732074207520762077207820792080208120822083208420852086208720882089209020912092209320942095209620972098209921002101210221032104210521062107210821092110211121122113211421152116211721182119212021212122212321242125212621272128212921302131213221332134213521362137213821392140214121422143214421452146214721482149215021512152215321542155215621572158215921602161216221632164216521662167216821692170217121722173217421752176217721782179218021812182218321842185218621872188218921902191219221932194219521962197219821992200220122022203220422052206220722082209221022112212221322142215221622172218221922202221222222232224222522262227222822292230223122322233223422352236223722382239224022412242224322442245224622472248224922502251225222532254225522562257225822592260226122622263226422652266226722682269227022712272227322742275227622772278227922802281228222832284228522862287228822892290229122922293229422952296229722982299230023012302230323042305230623072308230923102311231223132314231523162317231823192320232123222323232423252326232723282329233023312332233323342335233623372338233923402341234223432344234523462347234823492350235123522353235423552356235723582359236023612362236323642365236623672368236923702371237223732374237523762377237823792380238123822383238423852386238723882389239023912392239323942395239623972398239924002401240224032404240524062407240824092410241124122413241424152416241724182419242024212422242324242425242624272428242924302431243224332434243524362437243824392440244124422443244424452446244724482449245024512452245324542455245624572458245924602461246224632464246524662467246824692470247124722473247424752476247724782479248024812482248324842485248624872488248924902491249224932494249524962497249824992500250125022503250425052506250725082509251025112512251325142515251625172518251925202521252225232524252525262527252825292530253125322533253425352536253725382539254025412542254325442545254625472548254925502551255225532554255525562557255825592560256125622563256425652566256725682569257025712572257325742575257625772578257925802581258225832584258525862587258825892590259125922593259425952596259725982599260026012602260326042605260626072608260926102611261226132614261526162617261826192620262126222623262426252626262726282629263026312632263326342635263626372638263926402641264226432644264526462647264826492650265126522653265426552656265726582659266026612662266326642665266626672668266926702671267226732674267526762677267826792680268126822683268426852686268726882689269026912692269326942695269626972698269927002701270227032704270527062707270827092710271127122713271427152716271727182719272027212722272327242725272627272728272927302731273227332734273527362737273827392740274127422743274427452746274727482749275027512752275327542755275627572758275927602761276227632764276527662767276827692770277127722773277427752776277727782779278027812782278327842785278627872788278927902791279227932794279527962797279827992800280128022803280428052806280728082809281028112812281328142815281628172818281928202821282228232824282528262827282828292830283128322833283428352836283728382839284028412842284328442845284628472848284928502851285228532854285528562857285828592860286128622863286428652866286728682869287028712872287328742875287628772878287928802881288228832884288528862887288828892890289128922893289428952896289728982899290029012902290329042905290629072908290929102911291229132914291529162917291829192920292129222923292429252926292729282929293029312932293329342935293629372938293929402941294229432944294529462947294829492950295129522953295429552956295729582959296029612962296329642965296629672968296929702971297229732974297529762977297829792980298129822983298429852986298729882989299029912992299329942995299629972998299930003001300230033004300530063007300830093010301130123013301430153016301730183019302030213022302330243025302630273028302930303031303230333034303530363037303830393040304130423043304430453046304730483049305030513052305330543055305630573058305930603061306230633064306530663067306830693070307130723073307430753076307730783079308030813082308330843085308630873088308930903091309230933094309530963097309830993100310131023103310431053106310731083109311031113112311331143115311631173118311931203121312231233124312531263127312831293130313131323133313431353136313731383139314031413142314331443145314631473148314931503151315231533154315531563157315831593160316131623163316431653166316731683169317031713172317331743175317631773178317931803181318231833184318531863187318831893190319131923193319431953196319731983199320032013202320332043205320632073208320932103211321232133214321532163217321832193220322132223223322432253226322732283229323032313232323332343235323632373238323932403241324232433244324532463247324832493250325132523253325432553256325732583259326032613262326332643265326632673268326932703271327232733274
  1. Listing:
  2. 1 IMPLEMENTATION MODULE Invoice;
  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 UpdateDBFile,WriteDBRec,DeleteRecord,ReadDBRec,
  14. 13 AppendBlank,Record;
  15. 14 FROM Gas IMPORT CheckOutGas,CheckInGas,GasAmountDue,DeleteGasFromInv;
  16. 15 FROM PMIGlobals IMPORT PMIScreens,Today,TodayStr,TodayDays,Config,
  17. 16 OpenReportDevice,CloseReportDevice,NormalTitle;
  18. 17 FROM PriceTable IMPORT ClearGrpCnt,AddGrp,GrpTotal,GetPrice,
  19. 18 GetPriceTable;
  20. 19 FROM DateFunctions IMPORT DateToStr,Date,DaysSince1900;
  21. 20 FROM PosUtils IMPORT Equal,Pos;
  22. 21 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append,
  23. 22 CAPstr,OverWrite,RightJustify,Center;
  24. 23 FROM StrConv IMPORT CardinalToStr,RealToStr,StrToReal;
  25. 24 FROM M2Strings IMPORT Length,CompareStr,Assign;
  26. 25 FROM LowLevel IMPORT Fill;
  27. 26 FROM DBStuff IMPORT MakeSeqNbr,FindAll,ReadAllRecs,MakeKey,
  28. 27 ConditionType,ChangeDateField,DeleteAllRecs;
  29. 28 FROM DBUtils IMPORT ReadCardField,ReadRealField,ReadDateField,
  30. 29 ChangeCardField,ChangeRealField,PrintFrame;
  31. 30 FROM NumTypes IMPORT Real8;
  32. 31 FROM Payments IMPORT MakePayment;
  33. 32 FROM DBFPayments IMPORT OpenPaymentsDBF,ClosePaymentsDBF;
  34. 33 FROM Customer IMPORT GetCustNbr,GetCustTerms,GetCustSalesRep,GetCustShipVia,
  35. 34 GetCustDisAmount,GetCustDisCntLvl,GetCustTaxable,SetCustOutStd,
  36. 35 GetCustFreeFrght,AddressRec,AddressTypes,GetCustAddr,GetCurrCustName,
  37. 36 SetCustLastInvDate,AddCustYTD,AddCustOutStd;
  38. 37 FROM StringIO IMPORT PrintMessage,ErrorMessage,WriteEol,WriteStr;
  39. 38 (* these next two are from stonybrook - the pmi version doesn't work*)
  40. 39 FROM SmartScreen IMPORT ClearScreen;
  41. 40 FROM VWindows IMPORT ClearPart, CurrentWindow, SetCursorHeight;
  42. 41 FROM ScrnUtl2 IMPORT CloseDisplayFrame;
  43. 42 FROM ScrnUtl1 IMPORT GetFieldRec,PutFieldRec,FieldNum,FieldListTotal;
  44. 43 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName,
  45. 44 DispCode,ContinueInput,CancelInput,SubmitInput,InputFieldRecord;
  46. 45 FROM FramePainter IMPORT ShowDisplayFrame,RedrawField,RedrawArea;
  47. 46 FROM InputManager IMPORT ControlFrame;
  48. 47 FROM FrameManager IMPORT EraseFrame;
  49. 48 FROM Prompts IMPORT Prompt,PromptStr,PromptYN;
  50. 49 FROM SYSTEM IMPORT ADR,SIZE,TSIZE,ADDRESS;
  51. 50 FROM ControlUtils IMPORT ControlSeparately, LoadFrameList,Control,ReadInput,
  52. 51 ChangeField,AddMenuItem,AddStrField;
  53. 52 FROM DspFiles IMPORT OpenDisplayFile,ReadDisplayFrame;
  54. 53 FROM HandleIO IMPORT FileExists,OpenFile,CloseHandle;
  55. 54 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt,ElmtNow,GetElmtAdr,
  56. 55 JoinLists,ListDelete,ListInsert,DisposeList,ShellSortList,SortList,NilList;
  57. 56 FROM Invtry IMPORT UpdateInvQuant,GeneralInventory;
  58. 57 FROM DBFInvtry IMPORT InvtryRec,MoveInvtryToDBF,MoveInvtryFromDBF,
  59. 58 FindInvtryByInvcode,NextInvtry,PrevInvtry,LastInvtry,InvtryDBF,
  60. 59 InvcodeIdx;
  61. 60 FROM DBFOrder IMPORT OrderRec,MoveOrderToDBF,MoveOrderFromDBF,OrderDBF,
  62. 61 InvnbrIdx,OpenOrderDBF,CloseOrderDBF;
  63. 62 FROM Invtry IMPORT GetInvItem;
  64. ***** ^ duplicate identifier
  65. 63 FROM UOpsExt IMPORT Lookup,LookupProc;
  66. 64 FROM UserOps IMPORT AKeyHandler,TheKeyHandler;
  67. 65 IMPORT Key;
  68. 66 FROM VStorage IMPORT DosAlloc,DosDealloc;
  69. 67 FROM InvoicePrint IMPORT PrintInvoice,PostSales;
  70. 68 FROM DBFInvoice IMPORT InvoiceDBF, OpenInvoiceDBF,InvoiceIdx,
  71. 69 CloseInvoiceDBF,InvoiceRec,FindInvoiceByInvoice,CustidIdx,
  72. 70 FindInvoiceByCustid,NextInvoice,PrevInvoice,InvoiceDBF,
  73. ***** ^ duplicate identifier
  74. 71 FirstInvoice,LastInvoice,MoveInvoiceToDBF,MoveInvoiceFromDBF;
  75. 72
  76. 73 (***********************************************************************
  77. 74 invoices are stored with the invoice number indexed and the
  78. 75 customer number indexed.
  79. 76
  80. 77 The customer number is indexed as
  81. 78 Customer Number + Status
  82. 79 Where status =
  83. 80 'O' - Open - not yet printed so can be edited
  84. 81 'P' - Posted (printed ) - can not be editied but can be viewes
  85. 82 'C' - Invoice is closed i.e. paid off
  86. 83
  87. 84 Item Status = 'R' - Items still recorded
  88. 85 'D' - Items deleted
  89. 86
  90. 87 ********************************************************************)
  91. 88
  92. 89
  93. 90 VAR
  94. 91 Status : INTEGER;
  95. 92 J : CARDINAL;
  96. 93 NextFrame,EndingFrame : AFrameName;
  97. 94 SelChar : CHAR;
  98. 95
  99. 96 PullDnMenu : GenList;
  100. 97
  101. 98
  102. 99 ItemsChanged : BOOLEAN;
  103. 100
  104. 101
  105. 102 PROCEDURE SortItemList(Item1 : ADDRESS; Size1 : CARDINAL;
  106. 103 Item2 : ADDRESS; Size2 : CARDINAL) : INTEGER;
  107. 104 VAR
  108. 105 I1,I2 : POINTER TO InvoiceItem;
  109. ***** ^ undeclared identifier
  110. 106 BEGIN
  111. 107 I1 := Item1;
  112. ***** ^ not supported yet
  113. ***** ^ not supported yet
  114. 108 I2 := Item2;
  115. ***** ^ not supported yet
  116. ***** ^ not supported yet
  117. 109 RETURN CompareStr(I1^.ItemOrderRec.ITEMNBR,I2^.ItemOrderRec.ITEMNBR);
  118. ***** ^ not supported yet
  119. ***** ^ not supported yet
  120. ***** ^ not supported yet
  121. ***** ^ not supported yet
  122. ***** ^ not supported yet
  123. ***** ^ not supported yet
  124. ***** ^ not supported yet
  125. 110
  126. 111
  127. 112 END SortItemList;
  128. ***** ^ not supported yet
  129. 113
  130. 114 PROCEDURE UpdateOrderScreen();
  131. 115 (* redraw just the fields on the screen rather than the entire screen*)
  132. 116 VAR
  133. 117 J,K : CARDINAL;
  134. 118 BEGIN
  135. 119 K := FieldListTotal(OrderItemDF);
  136. ***** ^ not supported yet
  137. ***** ^ undeclared identifier
  138. 120 FOR J := 1 TO K DO
  139. 121 RedrawField(OrderItemDF,J,(K=1)); (* make first field active field*)
  140. ***** ^ not supported yet
  141. ***** ^ undeclared identifier
  142. ***** ^ not supported yet
  143. 122 END;
  144. 123
  145. 124 END UpdateOrderScreen;
  146. ***** ^ not supported yet
  147. 125
  148. 126
  149. 127 PROCEDURE UpdateOrd( );
  150. 128 VAR Str : ARRAY[0..12] OF CHAR;
  151. ***** ^ not supported yet
  152. ***** ^ not supported yet
  153. 129 BEGIN
  154. 130
  155. 131 WITH CurrentItem^.ItemOrderRec DO
  156. ***** ^ undeclared identifier
  157. ***** ^ not supported yet
  158. 132
  159. 133 ChangeField(OrderItemDF,ITEMNBR,'Item',TRUE);
  160. ***** ^ not supported yet
  161. ***** ^ undeclared identifier
  162. ***** ^ undeclared identifier
  163. ***** ^ not supported yet
  164. ***** ^ not supported yet
  165. 134 RealToStr(TOTAL,2,8,Str);
  166. ***** ^ not supported yet
  167. ***** ^ undeclared identifier
  168. ***** ^ not supported yet
  169. 135 ChangeField(OrderItemDF,Str,'Total',TRUE); (* computed field *)
  170. ***** ^ not supported yet
  171. ***** ^ undeclared identifier
  172. ***** ^ not supported yet
  173. ***** ^ not supported yet
  174. ***** ^ not supported yet
  175. 136 ChangeRealField(OrderItemDF,QNTSOLD,'Quant');
  176. ***** ^ not supported yet
  177. ***** ^ undeclared identifier
  178. ***** ^ undeclared identifier
  179. ***** ^ not supported yet
  180. 137 ChangeField(OrderItemDF,UNITS,'Units',TRUE); (* alow override *)
  181. ***** ^ not supported yet
  182. ***** ^ undeclared identifier
  183. ***** ^ undeclared identifier
  184. ***** ^ not supported yet
  185. ***** ^ not supported yet
  186. 138 ChangeField(OrderItemDF,DESC,'Desc',TRUE);
  187. ***** ^ not supported yet
  188. ***** ^ undeclared identifier
  189. ***** ^ undeclared identifier
  190. ***** ^ not supported yet
  191. ***** ^ not supported yet
  192. 139 ChangeField(OrderItemDF,NOTES1,'Notes1',TRUE);
  193. ***** ^ not supported yet
  194. ***** ^ undeclared identifier
  195. ***** ^ undeclared identifier
  196. ***** ^ not supported yet
  197. ***** ^ not supported yet
  198. 140 ChangeField(OrderItemDF,NOTES2,'Notes2',TRUE);
  199. ***** ^ not supported yet
  200. ***** ^ undeclared identifier
  201. ***** ^ undeclared identifier
  202. ***** ^ not supported yet
  203. ***** ^ not supported yet
  204. 141 ChangeField(OrderItemDF,NOTES3,'Notes3',TRUE);
  205. ***** ^ not supported yet
  206. ***** ^ undeclared identifier
  207. ***** ^ undeclared identifier
  208. ***** ^ not supported yet
  209. ***** ^ not supported yet
  210. 142 ChangeField(OrderItemDF,MANPRICE,'Override',TRUE);
  211. ***** ^ not supported yet
  212. ***** ^ undeclared identifier
  213. ***** ^ undeclared identifier
  214. ***** ^ not supported yet
  215. ***** ^ not supported yet
  216. 143 ChangeRealField(OrderItemDF,UNITPRC,'UnitPrice');
  217. ***** ^ not supported yet
  218. ***** ^ undeclared identifier
  219. ***** ^ undeclared identifier
  220. ***** ^ not supported yet
  221. 144 END;
  222. ***** ^ not supported yet
  223. 145 WITH CurrentItem^.InventoryItem DO
  224. ***** ^ undeclared identifier
  225. ***** ^ not supported yet
  226. 146
  227. 147 ChangeField(OrderItemDF,GROUP,'Group',TRUE);
  228. ***** ^ not supported yet
  229. ***** ^ undeclared identifier
  230. ***** ^ undeclared identifier
  231. ***** ^ not supported yet
  232. ***** ^ not supported yet
  233. 148 RealToStr(ONHAND,2,8,Str);
  234. ***** ^ not supported yet
  235. ***** ^ undeclared identifier
  236. ***** ^ undeclared identifier
  237. 149 ChangeField(OrderItemDF,Str,'OnHand',TRUE);
  238. ***** ^ not supported yet
  239. ***** ^ undeclared identifier
  240. ***** ^ undeclared identifier
  241. ***** ^ not supported yet
  242. ***** ^ not supported yet
  243. 150 CardinalToStr(MINORDER,5,Str);
  244. ***** ^ not supported yet
  245. ***** ^ undeclared identifier
  246. ***** ^ undeclared identifier
  247. 151 ChangeField(OrderItemDF,Str,'MinOrder',TRUE);
  248. ***** ^ not supported yet
  249. ***** ^ undeclared identifier
  250. ***** ^ undeclared identifier
  251. ***** ^ not supported yet
  252. ***** ^ not supported yet
  253. 152 ChangeCardField(OrderItemDF,PRICETBL,'TableNbr');
  254. ***** ^ not supported yet
  255. ***** ^ undeclared identifier
  256. ***** ^ undeclared identifier
  257. ***** ^ not supported yet
  258. 153 END;
  259. ***** ^ not supported yet
  260. 154 WITH CurrentItem^ DO
  261. ***** ^ undeclared identifier
  262. 155 ChangeCardField(OrderItemDF,Q1,'Q1');
  263. ***** ^ not supported yet
  264. ***** ^ undeclared identifier
  265. ***** ^ undeclared identifier
  266. ***** ^ not supported yet
  267. 156 ChangeCardField(OrderItemDF,Q2,'Q2');
  268. ***** ^ not supported yet
  269. ***** ^ undeclared identifier
  270. ***** ^ undeclared identifier
  271. ***** ^ not supported yet
  272. 157 ChangeCardField(OrderItemDF,Q3,'Q3');
  273. ***** ^ not supported yet
  274. ***** ^ undeclared identifier
  275. ***** ^ undeclared identifier
  276. ***** ^ not supported yet
  277. 158 ChangeCardField(OrderItemDF,Q4,'Q4');
  278. ***** ^ not supported yet
  279. ***** ^ undeclared identifier
  280. ***** ^ undeclared identifier
  281. ***** ^ not supported yet
  282. 159 ChangeRealField(OrderItemDF,P1,'P1');
  283. ***** ^ not supported yet
  284. ***** ^ undeclared identifier
  285. ***** ^ undeclared identifier
  286. ***** ^ not supported yet
  287. 160 ChangeRealField(OrderItemDF,P2,'P2');
  288. ***** ^ not supported yet
  289. ***** ^ undeclared identifier
  290. ***** ^ undeclared identifier
  291. ***** ^ not supported yet
  292. 161 ChangeRealField(OrderItemDF,P3,'P3');
  293. ***** ^ not supported yet
  294. ***** ^ undeclared identifier
  295. ***** ^ undeclared identifier
  296. ***** ^ not supported yet
  297. 162 ChangeRealField(OrderItemDF,P4,'P4');
  298. ***** ^ not supported yet
  299. ***** ^ undeclared identifier
  300. ***** ^ undeclared identifier
  301. ***** ^ not supported yet
  302. 163
  303. 164 END;
  304. ***** ^ not supported yet
  305. 165 UpdateOrderScreen();
  306. ***** ^ not supported yet
  307. ***** ^ not supported yet
  308. 166 END UpdateOrd;
  309. ***** ^ not supported yet
  310. 167
  311. 168
  312. 169
  313. 170
  314. 171 PROCEDURE LookUpInv(VAR ItmCode : ARRAY OF CHAR);
  315. ***** ^ not supported yet
  316. 172 (* called from userops to lookup an item when the user exists an item
  317. 173 fields
  318. 174 This routine will always store the results in the current item
  319. 175 inventory record *)
  320. 176 VAR
  321. 177 Tmp : ARRAY[0..20] OF CHAR;
  322. ***** ^ not supported yet
  323. ***** ^ not supported yet
  324. 178
  325. 179 PROCEDURE InitOrder();
  326. 180 BEGIN
  327. 181 WITH CurrentItem^ DO
  328. ***** ^ undeclared identifier
  329. 182 Assign( CurrentInvoice.INVOICE,ItemOrderRec.INVNBR );
  330. ***** ^ not supported yet
  331. ***** ^ undeclared identifier
  332. ***** ^ not supported yet
  333. ***** ^ undeclared identifier
  334. ***** ^ not supported yet
  335. 183 Assign( InventoryItem.INVCODE,ItemOrderRec.ITEMNBR);
  336. ***** ^ not supported yet
  337. ***** ^ undeclared identifier
  338. ***** ^ not supported yet
  339. ***** ^ undeclared identifier
  340. ***** ^ not supported yet
  341. 184 Assign( InventoryItem.DESC,ItemOrderRec.DESC );
  342. ***** ^ not supported yet
  343. ***** ^ undeclared identifier
  344. ***** ^ not supported yet
  345. ***** ^ undeclared identifier
  346. ***** ^ not supported yet
  347. 185 ItemOrderRec.UNITPRC := InventoryItem.UNITPRICE;
  348. ***** ^ undeclared identifier
  349. ***** ^ not supported yet
  350. ***** ^ undeclared identifier
  351. ***** ^ not supported yet
  352. 186 Assign(InventoryItem.UNITS,ItemOrderRec.UNITS );
  353. ***** ^ not supported yet
  354. ***** ^ undeclared identifier
  355. ***** ^ not supported yet
  356. ***** ^ undeclared identifier
  357. ***** ^ not supported yet
  358. 187 ItemOrderRec.MANPRICE := 'N';
  359. ***** ^ undeclared identifier
  360. ***** ^ not supported yet
  361. 188 GetPriceTable(InventoryItem.PRICETBL,Q1,Q2,Q3,Q4,P1,P2,P3,P4);
  362. ***** ^ not supported yet
  363. ***** ^ undeclared identifier
  364. ***** ^ not supported yet
  365. ***** ^ undeclared identifier
  366. ***** ^ undeclared identifier
  367. ***** ^ undeclared identifier
  368. ***** ^ undeclared identifier
  369. ***** ^ undeclared identifier
  370. ***** ^ undeclared identifier
  371. ***** ^ undeclared identifier
  372. ***** ^ undeclared identifier
  373. 189 END;
  374. ***** ^ not supported yet
  375. 190
  376. 191
  377. 192 END InitOrder;
  378. ***** ^ not supported yet
  379. 193
  380. 194
  381. 195 BEGIN
  382. 196 CAPstr(ItmCode);
  383. ***** ^ not supported yet
  384. ***** ^ undeclared identifier
  385. 197 IF CurrentItem^.BeenAdded
  386. ***** ^ undeclared identifier
  387. ***** ^ not supported yet
  388. 198 THEN
  389. 199 (* IF NOT Special(ItmCode)
  390. 200 THEN
  391. 201 ItmCode := CurrentItem^.ItemOrderRec.INVNBR;
  392. 202 END; *)
  393. 203 RETURN
  394. 204 END;
  395. 205 IF Special(ItmCode)
  396. ***** ^ undeclared identifier
  397. ***** ^ undeclared identifier
  398. 206 THEN (* credit or special order *)
  399. 207 Assign( CurrentInvoice.INVOICE,CurrentItem^.ItemOrderRec.INVNBR );
  400. ***** ^ not supported yet
  401. ***** ^ undeclared identifier
  402. ***** ^ not supported yet
  403. ***** ^ undeclared identifier
  404. ***** ^ not supported yet
  405. ***** ^ not supported yet
  406. 208 CurrentItem^.ItemOrderRec.MANPRICE := 'Y';
  407. ***** ^ undeclared identifier
  408. ***** ^ not supported yet
  409. ***** ^ not supported yet
  410. 209 Assign(ItmCode,CurrentItem^.ItemOrderRec.ITEMNBR );
  411. ***** ^ not supported yet
  412. ***** ^ undeclared identifier
  413. ***** ^ undeclared identifier
  414. ***** ^ not supported yet
  415. ***** ^ not supported yet
  416. 210 Assign( ItmCode,Tmp);
  417. ***** ^ not supported yet
  418. ***** ^ undeclared identifier
  419. ***** ^ undeclared identifier
  420. 211 UpdateOrd();
  421. ***** ^ not supported yet
  422. ***** ^ not supported yet
  423. 212 RETURN
  424. 213 END;
  425. 214 Assign( ItmCode,Tmp);
  426. ***** ^ not supported yet
  427. ***** ^ undeclared identifier
  428. ***** ^ undeclared identifier
  429. 215 CrunchBlanks(Tmp);
  430. ***** ^ not supported yet
  431. ***** ^ undeclared identifier
  432. 216 CrunchBlanks(CurrentItem^.InventoryItem.INVCODE);
  433. ***** ^ not supported yet
  434. ***** ^ undeclared identifier
  435. ***** ^ not supported yet
  436. ***** ^ not supported yet
  437. 217 IF Equal(Tmp,CurrentItem^.InventoryItem.INVCODE)
  438. ***** ^ not supported yet
  439. ***** ^ undeclared identifier
  440. ***** ^ undeclared identifier
  441. ***** ^ not supported yet
  442. ***** ^ not supported yet
  443. 218 THEN
  444. 219 RETURN; (* didn't change the items - so we're ok *)
  445. 220 END;
  446. 221 IF FindInvtryByInvcode(Tmp)
  447. ***** ^ not supported yet
  448. ***** ^ undeclared identifier
  449. 222 THEN
  450. 223 MoveInvtryFromDBF(CurrentItem^.InventoryItem);
  451. ***** ^ not supported yet
  452. ***** ^ undeclared identifier
  453. ***** ^ not supported yet
  454. 224 CurrentItem^.InventoryFilePos := Record(InvtryDBF);
  455. ***** ^ undeclared identifier
  456. ***** ^ not supported yet
  457. ***** ^ not supported yet
  458. ***** ^ not supported yet
  459. 225 InitOrder(); (* re init the display frame *)
  460. ***** ^ undeclared identifier
  461. ***** ^ not supported yet
  462. 226 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem');
  463. ***** ^ not supported yet
  464. ***** ^ not supported yet
  465. ***** ^ undeclared identifier
  466. ***** ^ not supported yet
  467. 227 UpdateOrd();
  468. ***** ^ not supported yet
  469. ***** ^ not supported yet
  470. 228 ELSE
  471. 229 GeneralInventory(ItmCode);
  472. ***** ^ not supported yet
  473. ***** ^ undeclared identifier
  474. 230 MoveInvtryFromDBF(CurrentItem^.InventoryItem);
  475. ***** ^ not supported yet
  476. ***** ^ undeclared identifier
  477. ***** ^ not supported yet
  478. 231 Assign( CurrentItem^.InventoryItem.INVCODE,ItmCode );
  479. ***** ^ not supported yet
  480. ***** ^ undeclared identifier
  481. ***** ^ not supported yet
  482. ***** ^ not supported yet
  483. ***** ^ undeclared identifier
  484. 232 CurrentItem^.InventoryFilePos := Record(InvtryDBF);
  485. ***** ^ undeclared identifier
  486. ***** ^ not supported yet
  487. ***** ^ not supported yet
  488. ***** ^ not supported yet
  489. 233 InitOrder();
  490. ***** ^ undeclared identifier
  491. ***** ^ not supported yet
  492. 234 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem');
  493. ***** ^ not supported yet
  494. ***** ^ not supported yet
  495. ***** ^ undeclared identifier
  496. ***** ^ not supported yet
  497. 235 ShowDisplayFrame(OrderItemDF,0,0,0,0);
  498. ***** ^ not supported yet
  499. ***** ^ undeclared identifier
  500. ***** ^ not supported yet
  501. 236 RedrawArea(InvoiceHeadDF,1,10,80,13);
  502. ***** ^ not supported yet
  503. ***** ^ undeclared identifier
  504. ***** ^ not supported yet
  505. 237 UpdateOrd();
  506. ***** ^ not supported yet
  507. ***** ^ not supported yet
  508. 238 END;
  509. 239
  510. 240 END LookUpInv;
  511. ***** ^ not supported yet
  512. 241
  513. 242
  514. 243
  515. 244 PROCEDURE ReadAnInvoice(VAR AddrOfRec : ADDRESS; VAR SizeOfRec: CARDINAL);
  516. 245 (* a procedure passed to reall all recs to read an invoice record *)
  517. 246 VAR
  518. 247 P : POINTER TO FInvoice;
  519. ***** ^ undeclared identifier
  520. 248 BEGIN
  521. 249 SizeOfRec := SIZE(FInvoice);
  522. ***** ^ not supported yet
  523. ***** ^ undeclared identifier
  524. 250 DosAlloc(P,SizeOfRec);
  525. ***** ^ not supported yet
  526. ***** ^ not supported yet
  527. ***** ^ not supported yet
  528. 251 MoveInvoiceFromDBF(P^.Invoice);
  529. ***** ^ not supported yet
  530. ***** ^ not supported yet
  531. ***** ^ not supported yet
  532. 252 P^.LI := Record(InvoiceDBF);
  533. ***** ^ not supported yet
  534. ***** ^ not supported yet
  535. ***** ^ not supported yet
  536. ***** ^ not supported yet
  537. 253 AddrOfRec := P;
  538. ***** ^ not supported yet
  539. ***** ^ not supported yet
  540. 254
  541. 255 END ReadAnInvoice;
  542. ***** ^ not supported yet
  543. 256
  544. 257
  545. 258
  546. 259 PROCEDURE Special(Item:ARRAY OF CHAR) : BOOLEAN;
  547. ***** ^ not supported yet
  548. 260 BEGIN
  549. 261 IF (Pos(Credit,Item) = 0) OR (Pos(SpecialOrd,Item) = 0)
  550. ***** ^ not supported yet
  551. ***** ^ undeclared identifier
  552. ***** ^ not supported yet
  553. ***** ^ not supported yet
  554. ***** ^ undeclared identifier
  555. ***** ^ not supported yet
  556. 262 THEN RETURN TRUE;
  557. 263 ELSE RETURN FALSE;
  558. 264 END;
  559. 265 END Special;
  560. ***** ^ not supported yet
  561. 266
  562. 267
  563. 268
  564. 269
  565. 270
  566. 271
  567. 272 PROCEDURE ReadScrn();
  568. 273 VAR
  569. 274 Str : ARRAY[0..15] OF CHAR;
  570. ***** ^ not supported yet
  571. ***** ^ not supported yet
  572. 275 B : BOOLEAN;
  573. 276 BEGIN
  574. 277 IF NOT OrderItemDF^.FrameChanged (* just looked - nothing changed *)
  575. ***** ^ undeclared identifier
  576. ***** ^ not supported yet
  577. 278 THEN
  578. 279 RETURN;
  579. 280 END;
  580. 281 WITH CurrentItem^.ItemOrderRec DO
  581. ***** ^ undeclared identifier
  582. ***** ^ not supported yet
  583. 282 ReadInput(OrderItemDF,Str,'Quant');
  584. ***** ^ not supported yet
  585. ***** ^ undeclared identifier
  586. ***** ^ not supported yet
  587. ***** ^ not supported yet
  588. 283 B := StrToReal(Str,0,QNTSOLD);
  589. ***** ^ not supported yet
  590. ***** ^ not supported yet
  591. ***** ^ undeclared identifier
  592. 284 ReadInput(OrderItemDF,Str,'UnitPrice');
  593. ***** ^ not supported yet
  594. ***** ^ undeclared identifier
  595. ***** ^ not supported yet
  596. ***** ^ not supported yet
  597. 285 B := StrToReal(Str,0,UNITPRC);
  598. ***** ^ not supported yet
  599. ***** ^ not supported yet
  600. ***** ^ undeclared identifier
  601. 286 ReadInput(OrderItemDF,DESC,'Desc');
  602. ***** ^ not supported yet
  603. ***** ^ undeclared identifier
  604. ***** ^ undeclared identifier
  605. ***** ^ not supported yet
  606. 287 ReadInput(OrderItemDF,UNITS,'Units');
  607. ***** ^ not supported yet
  608. ***** ^ undeclared identifier
  609. ***** ^ undeclared identifier
  610. ***** ^ not supported yet
  611. 288 ReadInput(OrderItemDF,MANPRICE,'Override');
  612. ***** ^ not supported yet
  613. ***** ^ undeclared identifier
  614. ***** ^ undeclared identifier
  615. ***** ^ not supported yet
  616. 289 CAPstr(MANPRICE);
  617. ***** ^ not supported yet
  618. ***** ^ undeclared identifier
  619. 290 ReadInput(OrderItemDF,NOTES1,'Notes1');
  620. ***** ^ not supported yet
  621. ***** ^ undeclared identifier
  622. ***** ^ undeclared identifier
  623. ***** ^ not supported yet
  624. 291 ReadInput(OrderItemDF,NOTES2,'Notes2');
  625. ***** ^ not supported yet
  626. ***** ^ undeclared identifier
  627. ***** ^ undeclared identifier
  628. ***** ^ not supported yet
  629. 292 ReadInput(OrderItemDF,NOTES3,'Notes3');
  630. ***** ^ not supported yet
  631. ***** ^ undeclared identifier
  632. ***** ^ undeclared identifier
  633. ***** ^ not supported yet
  634. 293
  635. 294 END;
  636. ***** ^ not supported yet
  637. 295
  638. 296 END ReadScrn;
  639. ***** ^ not supported yet
  640. 297
  641. 298 PROCEDURE ReadHeader();
  642. 299 VAR
  643. 300 C : CARDINAL;
  644. 301 R : Real8;
  645. 302 Str : ARRAY[0..15] OF CHAR;
  646. ***** ^ not supported yet
  647. ***** ^ not supported yet
  648. 303 BEGIN
  649. 304 WITH CurrentInvoice DO
  650. ***** ^ undeclared identifier
  651. 305 ReadInput(InvoiceHeadDF,CUSTPO,'PONbr');
  652. ***** ^ not supported yet
  653. ***** ^ undeclared identifier
  654. ***** ^ undeclared identifier
  655. ***** ^ not supported yet
  656. 306 ReadInput(InvoiceHeadDF,SALESMAN,'SalesRep');
  657. ***** ^ not supported yet
  658. ***** ^ undeclared identifier
  659. ***** ^ undeclared identifier
  660. ***** ^ not supported yet
  661. 307 ReadInput(InvoiceHeadDF,TERMS,'Terms');
  662. ***** ^ not supported yet
  663. ***** ^ undeclared identifier
  664. ***** ^ undeclared identifier
  665. ***** ^ not supported yet
  666. 308 ReadInput(InvoiceHeadDF,SHIPVIA,'ShipVia');
  667. ***** ^ not supported yet
  668. ***** ^ undeclared identifier
  669. ***** ^ undeclared identifier
  670. ***** ^ not supported yet
  671. 309 ReadInput(InvoiceHeadDF,TAXABLE,'Taxable');
  672. ***** ^ not supported yet
  673. ***** ^ undeclared identifier
  674. ***** ^ undeclared identifier
  675. ***** ^ not supported yet
  676. 310 ReadDateField(InvoiceHeadDF,INVDATE,'InvDate');
  677. ***** ^ not supported yet
  678. ***** ^ undeclared identifier
  679. ***** ^ undeclared identifier
  680. ***** ^ not supported yet
  681. 311 ReadRealField(InvoiceHeadDF,INVDSCNT,'Discount');
  682. ***** ^ not supported yet
  683. ***** ^ undeclared identifier
  684. ***** ^ undeclared identifier
  685. ***** ^ not supported yet
  686. 312 ReadCardField(InvoiceHeadDF,DFLTLVL,'DefaultLevel');
  687. ***** ^ not supported yet
  688. ***** ^ undeclared identifier
  689. ***** ^ undeclared identifier
  690. ***** ^ not supported yet
  691. 313 ReadRealField(InvoiceHeadDF,SHIPPING,'Shipping');
  692. ***** ^ not supported yet
  693. ***** ^ undeclared identifier
  694. ***** ^ undeclared identifier
  695. ***** ^ not supported yet
  696. 314 ReadInput(InvoiceHeadDF,NOTE1,'NOTE1');
  697. ***** ^ not supported yet
  698. ***** ^ undeclared identifier
  699. ***** ^ undeclared identifier
  700. ***** ^ not supported yet
  701. 315 ReadInput(InvoiceHeadDF,NOTE2,'NOTE2');
  702. ***** ^ not supported yet
  703. ***** ^ undeclared identifier
  704. ***** ^ undeclared identifier
  705. ***** ^ not supported yet
  706. 316 ReadInput(InvoiceHeadDF,NOTE3,'NOTE3');
  707. ***** ^ not supported yet
  708. ***** ^ undeclared identifier
  709. ***** ^ undeclared identifier
  710. ***** ^ not supported yet
  711. 317 ReadInput(InvoiceHeadDF,NOTESFOR,'NOTESFOR');
  712. ***** ^ not supported yet
  713. ***** ^ undeclared identifier
  714. ***** ^ undeclared identifier
  715. ***** ^ not supported yet
  716. 318 CAPstr(NOTESFOR);
  717. ***** ^ not supported yet
  718. ***** ^ undeclared identifier
  719. 319 END;
  720. ***** ^ not supported yet
  721. 320
  722. 321 END ReadHeader;
  723. ***** ^ not supported yet
  724. 322
  725. 323
  726. 324
  727. 325 PROCEDURE UpdateInventory();
  728. 326
  729. 327 VAR
  730. 328 Str : ARRAY[0..30] OF CHAR;
  731. ***** ^ not supported yet
  732. ***** ^ not supported yet
  733. 329 StrNum : ARRAY[0..10] OF CHAR;
  734. ***** ^ not supported yet
  735. ***** ^ not supported yet
  736. 330 R : Real8;
  737. 331 BEGIN
  738. 332 WITH CurrentItem^ DO
  739. ***** ^ undeclared identifier
  740. 333 IF Special(ItemOrderRec.ITEMNBR)
  741. ***** ^ not supported yet
  742. ***** ^ undeclared identifier
  743. ***** ^ not supported yet
  744. 334 THEN RETURN;
  745. 335 END;
  746. 336 ItemOrderRec.QNTORDER := ItemOrderRec.QNTSOLD;
  747. ***** ^ undeclared identifier
  748. ***** ^ not supported yet
  749. ***** ^ undeclared identifier
  750. ***** ^ not supported yet
  751. 337 ReadDBRec(InvtryDBF,InventoryFilePos); (* get uptodate inventory item
  752. ***** ^ not supported yet
  753. ***** ^ not supported yet
  754. ***** ^ undeclared identifier
  755. 338 and position the file pointer to the item *)
  756. 339 IF ItemOrderRec.QNTORDER > InventoryItem.ONHAND
  757. ***** ^ undeclared identifier
  758. ***** ^ not supported yet
  759. ***** ^ undeclared identifier
  760. ***** ^ not supported yet
  761. 340 THEN
  762. 341 ItemOrderRec.QNTSOLD := InventoryItem.ONHAND;
  763. ***** ^ undeclared identifier
  764. ***** ^ not supported yet
  765. ***** ^ undeclared identifier
  766. ***** ^ not supported yet
  767. 342 RealToStr(ItemOrderRec.QNTORDER - ItemOrderRec.QNTSOLD,2,5,StrNum);
  768. ***** ^ not supported yet
  769. ***** ^ undeclared identifier
  770. ***** ^ not supported yet
  771. ***** ^ undeclared identifier
  772. ***** ^ not supported yet
  773. ***** ^ not supported yet
  774. 343 ItemOrderRec.NOTES1 := 'Short - ';
  775. ***** ^ undeclared identifier
  776. ***** ^ not supported yet
  777. ***** ^ not supported yet
  778. 344 Append(ItemOrderRec.NOTES1,StrNum);
  779. ***** ^ not supported yet
  780. ***** ^ undeclared identifier
  781. ***** ^ not supported yet
  782. ***** ^ not supported yet
  783. 345 InventoryItem.ONHAND := 0.0;
  784. ***** ^ undeclared identifier
  785. ***** ^ not supported yet
  786. 346 IF InventoryItem.STOCKED
  787. ***** ^ undeclared identifier
  788. ***** ^ not supported yet
  789. 347 THEN Append(ItemOrderRec.NOTES1,' - Please reorder');
  790. ***** ^ not supported yet
  791. ***** ^ undeclared identifier
  792. ***** ^ not supported yet
  793. ***** ^ not supported yet
  794. 348 ELSE ItemOrderRec.NOTES1 := ' -Item no longer stocked'
  795. ***** ^ undeclared identifier
  796. ***** ^ not supported yet
  797. ***** ^ not supported yet
  798. 349 END;
  799. 350 Prompt(ItemOrderRec.NOTES1);
  800. ***** ^ not supported yet
  801. ***** ^ undeclared identifier
  802. ***** ^ not supported yet
  803. 351 ELSE
  804. 352 InventoryItem.ONHAND := InventoryItem.ONHAND - ItemOrderRec.QNTSOLD;
  805. ***** ^ undeclared identifier
  806. ***** ^ not supported yet
  807. ***** ^ undeclared identifier
  808. ***** ^ not supported yet
  809. ***** ^ undeclared identifier
  810. ***** ^ not supported yet
  811. 353 END;
  812. 354 END; (* end of with *)
  813. ***** ^ not supported yet
  814. 355 (* update the inventory record immediately *)
  815. 356 MoveInvtryToDBF(CurrentItem^.InventoryItem);
  816. ***** ^ not supported yet
  817. ***** ^ undeclared identifier
  818. ***** ^ not supported yet
  819. 357 WriteDBRec(InvtryDBF);
  820. ***** ^ not supported yet
  821. ***** ^ not supported yet
  822. 358
  823. 359 END UpdateInventory;
  824. ***** ^ not supported yet
  825. 360
  826. 361 PROCEDURE AddItems(VAR Inv : InvoiceRec);
  827. 362 VAR
  828. 363
  829. 364 NxtFrame : AFrameName;
  830. 365
  831. 366 OldLookup : Lookup;
  832. 367 J : CARDINAL;
  833. 368
  834. 369 PROCEDURE InsertInList();
  835. 370
  836. 371 BEGIN
  837. 372 IF CurrentItem^.BeenAdded
  838. ***** ^ undeclared identifier
  839. ***** ^ not supported yet
  840. 373 THEN
  841. 374 RETURN
  842. 375 END;
  843. 376 CurrentItem^.BeenAdded := TRUE;
  844. ***** ^ undeclared identifier
  845. ***** ^ not supported yet
  846. 377 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR)
  847. ***** ^ not supported yet
  848. ***** ^ undeclared identifier
  849. ***** ^ not supported yet
  850. ***** ^ not supported yet
  851. 378 THEN
  852. 379 UpdateInventory();
  853. ***** ^ not supported yet
  854. ***** ^ not supported yet
  855. 380 END; (* if not special*)
  856. 381 ListInsert(CurrentItem^,2,OrderItemLst,9999); (* insert at end *)
  857. ***** ^ not supported yet
  858. ***** ^ undeclared identifier
  859. ***** ^ undeclared identifier
  860. ***** ^ not supported yet
  861. 382 Recompute();
  862. ***** ^ undeclared identifier
  863. ***** ^ not supported yet
  864. 383 END InsertInList;
  865. ***** ^ not supported yet
  866. 384
  867. 385
  868. 386 PROCEDURE ShowSummary();
  869. 387 CONST
  870. 388 Title =
  871. 389 'Item Units Quant Description Price Total';
  872. ***** ^ not supported yet
  873. 390 VAR
  874. 391 Cnt, LL : CARDINAL;
  875. 392 Size,Code : CARDINAL;
  876. 393 Line : ARRAY[0..80] OF CHAR;
  877. ***** ^ not supported yet
  878. ***** ^ not supported yet
  879. 394 Tmp : ARRAY[0..12] OF CHAR;
  880. ***** ^ not supported yet
  881. ***** ^ not supported yet
  882. 395 FieldRec : InputFieldRecord;
  883. 396 (*
  884. 397 012345678901234567890123456789012345678901234567890123456789012345678901234
  885. 398 0 1 2 3 4 5 6 7
  886. 399 Item Units Quant Description Price Total
  887. 400 xxxxxx xxxxx xxx.x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx.xx xxxxx.xx
  888. 401 *)
  889. 402
  890. 403
  891. 404 BEGIN
  892. 405 Recompute();
  893. ***** ^ undeclared identifier
  894. ***** ^ not supported yet
  895. 406 SortList(OrderItemLst,SortItemList);
  896. ***** ^ not supported yet
  897. ***** ^ undeclared identifier
  898. ***** ^ not supported yet
  899. 407 InitDisplayFrame(SummaryDF,CurrentWindow);
  900. ***** ^ not supported yet
  901. ***** ^ undeclared identifier
  902. ***** ^ not supported yet
  903. 408 AddStrField(SummaryDF,2,2,Title,75);
  904. ***** ^ not supported yet
  905. ***** ^ undeclared identifier
  906. ***** ^ not supported yet
  907. ***** ^ not supported yet
  908. 409 GetFieldRec(SummaryDF,1,FieldRec);
  909. ***** ^ not supported yet
  910. ***** ^ undeclared identifier
  911. ***** ^ not supported yet
  912. 410 FieldRec.typ := DispCode; (* headline = display code *)
  913. ***** ^ not supported yet
  914. ***** ^ not supported yet
  915. ***** ^ not supported yet
  916. 411 PutFieldRec(FieldRec,SummaryDF,1);
  917. ***** ^ not supported yet
  918. ***** ^ not supported yet
  919. ***** ^ undeclared identifier
  920. ***** ^ not supported yet
  921. 412 SummaryDF^.headline := 2;
  922. ***** ^ undeclared identifier
  923. ***** ^ not supported yet
  924. 413 LL := ListLength(OrderItemLst);
  925. ***** ^ not supported yet
  926. ***** ^ undeclared identifier
  927. 414 FOR Cnt := 1 TO LL DO
  928. 415 GetElmtAdr(OrderItemLst,Cnt,CurrentItem,Size,Code);
  929. ***** ^ not supported yet
  930. ***** ^ undeclared identifier
  931. ***** ^ undeclared identifier
  932. ***** ^ not supported yet
  933. 416 Fill(ADR(Line),SIZE(Line),' ');
  934. ***** ^ not supported yet
  935. ***** ^ not supported yet
  936. ***** ^ not supported yet
  937. ***** ^ not supported yet
  938. ***** ^ not supported yet
  939. ***** ^ not supported yet
  940. 417 Line[78] := 0C; (* force end of line *)
  941. ***** ^ not supported yet
  942. ***** ^ not supported yet
  943. 418 WITH CurrentItem^.ItemOrderRec DO
  944. ***** ^ undeclared identifier
  945. ***** ^ not supported yet
  946. 419 OverWrite(ITEMNBR,Line,0);
  947. ***** ^ not supported yet
  948. ***** ^ undeclared identifier
  949. ***** ^ not supported yet
  950. ***** ^ not supported yet
  951. 420 OverWrite(UNITS,Line,8);
  952. ***** ^ not supported yet
  953. ***** ^ undeclared identifier
  954. ***** ^ not supported yet
  955. ***** ^ not supported yet
  956. 421 RealToStr(QNTSOLD,1,5,Tmp);
  957. ***** ^ not supported yet
  958. ***** ^ undeclared identifier
  959. ***** ^ not supported yet
  960. 422 OverWrite(Tmp,Line,15);
  961. ***** ^ not supported yet
  962. ***** ^ not supported yet
  963. ***** ^ not supported yet
  964. ***** ^ not supported yet
  965. 423 OverWrite(DESC,Line,22);
  966. ***** ^ not supported yet
  967. ***** ^ undeclared identifier
  968. ***** ^ not supported yet
  969. ***** ^ not supported yet
  970. 424 RealToStr(UNITPRC,2,7,Tmp);
  971. ***** ^ not supported yet
  972. ***** ^ undeclared identifier
  973. ***** ^ not supported yet
  974. 425 OverWrite(Tmp,Line,58);
  975. ***** ^ not supported yet
  976. ***** ^ not supported yet
  977. ***** ^ not supported yet
  978. ***** ^ not supported yet
  979. 426 RealToStr(TOTAL,2,7,Tmp);
  980. ***** ^ not supported yet
  981. ***** ^ undeclared identifier
  982. ***** ^ not supported yet
  983. 427 OverWrite(Tmp,Line,67);
  984. ***** ^ not supported yet
  985. ***** ^ not supported yet
  986. ***** ^ not supported yet
  987. ***** ^ not supported yet
  988. 428 AddMenuItem(SummaryDF,2,Cnt+2,Line,78,0,ITEMNBR);
  989. ***** ^ not supported yet
  990. ***** ^ undeclared identifier
  991. ***** ^ not supported yet
  992. ***** ^ undeclared identifier
  993. 429 END; (* end of with *)
  994. ***** ^ not supported yet
  995. 430
  996. 431 END; (* end of for *)
  997. 432 ShowDisplayFrame(SummaryDF,1,13,80,24);
  998. ***** ^ not supported yet
  999. ***** ^ undeclared identifier
  1000. ***** ^ not supported yet
  1001. 433
  1002. 434 END ShowSummary;
  1003. ***** ^ not supported yet
  1004. 435
  1005. 436
  1006. 437 PROCEDURE InList(ItemCode : ARRAY OF CHAR) : BOOLEAN;
  1007. ***** ^ not supported yet
  1008. 438 VAR Tmp : POINTER TO InvoiceItem;
  1009. ***** ^ undeclared identifier
  1010. 439 J : CARDINAL;
  1011. 440 Code,Size : CARDINAL;
  1012. 441 BEGIN
  1013. 442 FOR J := 1 TO ListLength(OrderItemLst) DO
  1014. ***** ^ not supported yet
  1015. ***** ^ undeclared identifier
  1016. 443 GetElmtAdr(OrderItemLst,J,Tmp,Size,Code);
  1017. ***** ^ not supported yet
  1018. ***** ^ undeclared identifier
  1019. ***** ^ not supported yet
  1020. ***** ^ not supported yet
  1021. 444 IF Equal(Tmp^.ItemOrderRec.ITEMNBR,ItemCode)
  1022. ***** ^ not supported yet
  1023. ***** ^ not supported yet
  1024. ***** ^ not supported yet
  1025. ***** ^ not supported yet
  1026. ***** ^ not supported yet
  1027. 445 THEN
  1028. 446 Prompt('Item already in invoice - can not add');
  1029. ***** ^ not supported yet
  1030. ***** ^ not supported yet
  1031. 447 RETURN TRUE;
  1032. 448 END;
  1033. 449 END; (* end for j *)
  1034. 450 RETURN FALSE;
  1035. 451 END InList;
  1036. ***** ^ not supported yet
  1037. 452
  1038. 453 BEGIN (* additems *)
  1039. 454 InitDisplayFrame(OrderItemDF,CurrentWindow);
  1040. ***** ^ not supported yet
  1041. ***** ^ undeclared identifier
  1042. ***** ^ not supported yet
  1043. 455 OldLookup := LookupProc;
  1044. ***** ^ undeclared identifier
  1045. ***** ^ not supported yet
  1046. 456 (* call(reg_param=>()) *)
  1047. 457 LookupProc := LookUpInv;
  1048. ***** ^ not supported yet
  1049. ***** ^ not supported yet
  1050. 458 (* call(reg_param=>(ax,bx,cx,dx,st0,st6,st5,st4,st3)) *)
  1051. 459 ItemsChanged := TRUE;
  1052. 460 REPEAT
  1053. 461 DosAlloc(CurrentItem,SIZE(CurrentItem^));
  1054. ***** ^ not supported yet
  1055. ***** ^ undeclared identifier
  1056. ***** ^ not supported yet
  1057. ***** ^ undeclared identifier
  1058. 462 Fill(CurrentItem,SIZE(CurrentItem^),0);
  1059. ***** ^ not supported yet
  1060. ***** ^ undeclared identifier
  1061. ***** ^ not supported yet
  1062. ***** ^ undeclared identifier
  1063. ***** ^ not supported yet
  1064. 463 CurrentItem^.BeenAdded := FALSE;
  1065. ***** ^ undeclared identifier
  1066. ***** ^ not supported yet
  1067. 464 CurrentItem^.GasPriced := FALSE;
  1068. ***** ^ undeclared identifier
  1069. ***** ^ not supported yet
  1070. 465 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem');
  1071. ***** ^ not supported yet
  1072. ***** ^ not supported yet
  1073. ***** ^ undeclared identifier
  1074. ***** ^ not supported yet
  1075. 466 ControlFrame(OrderItemDF,1,'',TRUE,NxtFrame);
  1076. ***** ^ not supported yet
  1077. ***** ^ undeclared identifier
  1078. ***** ^ undeclared identifier
  1079. 467 ReadScrn();
  1080. ***** ^ not supported yet
  1081. ***** ^ not supported yet
  1082. 468 IF CurrentItem^.ItemOrderRec.ITEMNBR[0] > 0C (* F10 pressed not data*)
  1083. ***** ^ undeclared identifier
  1084. ***** ^ not supported yet
  1085. ***** ^ not supported yet
  1086. ***** ^ not supported yet
  1087. 469 THEN (* the f10 key pressed - data on the screen *)
  1088. 470 IF NOT InList(CurrentItem^.ItemOrderRec.ITEMNBR)
  1089. ***** ^ not supported yet
  1090. ***** ^ undeclared identifier
  1091. ***** ^ not supported yet
  1092. ***** ^ not supported yet
  1093. 471 THEN
  1094. 472 InsertInList();
  1095. ***** ^ undeclared identifier
  1096. ***** ^ not supported yet
  1097. 473 ELSE
  1098. 474 DosDealloc(CurrentItem,SIZE(CurrentItem^));
  1099. ***** ^ not supported yet
  1100. ***** ^ undeclared identifier
  1101. ***** ^ not supported yet
  1102. ***** ^ undeclared identifier
  1103. 475 END;
  1104. 476 ELSE (* f10 or Esc key pressed - not data on screen *)
  1105. 477 IF NOT CurrentItem^.BeenAdded (* if blank screen - done*)
  1106. ***** ^ undeclared identifier
  1107. ***** ^ not supported yet
  1108. 478 THEN
  1109. 479 NxtFrame := ''; (* blank screen - exit time*)
  1110. ***** ^ undeclared identifier
  1111. 480 DosDealloc(CurrentItem,SIZE(CurrentItem^));
  1112. ***** ^ not supported yet
  1113. ***** ^ undeclared identifier
  1114. ***** ^ not supported yet
  1115. ***** ^ undeclared identifier
  1116. 481 END;
  1117. 482 END;
  1118. 483 UNTIL NOT Equal(OrderItemDF^.normlnext,NxtFrame);
  1119. ***** ^ not supported yet
  1120. ***** ^ undeclared identifier
  1121. ***** ^ not supported yet
  1122. ***** ^ undeclared identifier
  1123. 484 LookupProc := OldLookup;
  1124. ***** ^ not supported yet
  1125. ***** ^ undeclared identifier
  1126. 485 CloseDisplayFrame(OrderItemDF);
  1127. ***** ^ not supported yet
  1128. ***** ^ undeclared identifier
  1129. 486 ShowSummary();
  1130. ***** ^ undeclared identifier
  1131. ***** ^ not supported yet
  1132. 487 END AddItems;
  1133. ***** ^ not supported yet
  1134. 488
  1135. 489 PROCEDURE ShowSummary();
  1136. 490 CONST
  1137. 491 Title =
  1138. 492 'Item Units Quant Description Price Total';
  1139. ***** ^ not supported yet
  1140. 493 VAR
  1141. 494 Cnt, LL : CARDINAL;
  1142. 495 Size,Code : CARDINAL;
  1143. 496 Line : ARRAY[0..80] OF CHAR;
  1144. ***** ^ not supported yet
  1145. ***** ^ not supported yet
  1146. 497 Tmp : ARRAY[0..12] OF CHAR;
  1147. ***** ^ not supported yet
  1148. ***** ^ not supported yet
  1149. 498 FieldRec : InputFieldRecord;
  1150. 499 (*
  1151. 500 012345678901234567890123456789012345678901234567890123456789012345678901234
  1152. 501 0 1 2 3 4 5 6 7
  1153. 502 Item Units Quant Description Price Total
  1154. 503 xxxxxx xxxxx xxx.x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx.xx xxxxx.xx
  1155. 504 *)
  1156. 505
  1157. 506
  1158. 507 BEGIN
  1159. 508 Recompute();
  1160. ***** ^ undeclared identifier
  1161. ***** ^ not supported yet
  1162. 509 SortList(OrderItemLst,SortItemList);
  1163. ***** ^ not supported yet
  1164. ***** ^ undeclared identifier
  1165. ***** ^ not supported yet
  1166. 510 InitDisplayFrame(SummaryDF,CurrentWindow);
  1167. ***** ^ not supported yet
  1168. ***** ^ undeclared identifier
  1169. ***** ^ not supported yet
  1170. 511 AddStrField(SummaryDF,2,2,Title,75);
  1171. ***** ^ not supported yet
  1172. ***** ^ undeclared identifier
  1173. ***** ^ not supported yet
  1174. ***** ^ not supported yet
  1175. 512 GetFieldRec(SummaryDF,1,FieldRec);
  1176. ***** ^ not supported yet
  1177. ***** ^ undeclared identifier
  1178. ***** ^ not supported yet
  1179. 513 FieldRec.typ := DispCode; (* headline = display code *)
  1180. ***** ^ not supported yet
  1181. ***** ^ not supported yet
  1182. ***** ^ not supported yet
  1183. 514 PutFieldRec(FieldRec,SummaryDF,1);
  1184. ***** ^ not supported yet
  1185. ***** ^ not supported yet
  1186. ***** ^ undeclared identifier
  1187. ***** ^ not supported yet
  1188. 515 SummaryDF^.headline := 2;
  1189. ***** ^ undeclared identifier
  1190. ***** ^ not supported yet
  1191. 516 LL := ListLength(OrderItemLst);
  1192. ***** ^ not supported yet
  1193. ***** ^ undeclared identifier
  1194. 517 FOR Cnt := 1 TO LL DO
  1195. 518 GetElmtAdr(OrderItemLst,Cnt,CurrentItem,Size,Code);
  1196. ***** ^ not supported yet
  1197. ***** ^ undeclared identifier
  1198. ***** ^ undeclared identifier
  1199. ***** ^ not supported yet
  1200. 519 Fill(ADR(Line),SIZE(Line),' ');
  1201. ***** ^ not supported yet
  1202. ***** ^ not supported yet
  1203. ***** ^ not supported yet
  1204. ***** ^ not supported yet
  1205. ***** ^ not supported yet
  1206. ***** ^ not supported yet
  1207. 520 Line[78] := 0C; (* force end of line *)
  1208. ***** ^ not supported yet
  1209. ***** ^ not supported yet
  1210. 521 WITH CurrentItem^.ItemOrderRec DO
  1211. ***** ^ undeclared identifier
  1212. ***** ^ not supported yet
  1213. 522 OverWrite(ITEMNBR,Line,0);
  1214. ***** ^ not supported yet
  1215. ***** ^ undeclared identifier
  1216. ***** ^ not supported yet
  1217. ***** ^ not supported yet
  1218. 523 OverWrite(UNITS,Line,8);
  1219. ***** ^ not supported yet
  1220. ***** ^ undeclared identifier
  1221. ***** ^ not supported yet
  1222. ***** ^ not supported yet
  1223. 524 RealToStr(QNTSOLD,1,5,Tmp);
  1224. ***** ^ not supported yet
  1225. ***** ^ undeclared identifier
  1226. ***** ^ not supported yet
  1227. 525 OverWrite(Tmp,Line,15);
  1228. ***** ^ not supported yet
  1229. ***** ^ not supported yet
  1230. ***** ^ not supported yet
  1231. ***** ^ not supported yet
  1232. 526 OverWrite(DESC,Line,22);
  1233. ***** ^ not supported yet
  1234. ***** ^ undeclared identifier
  1235. ***** ^ not supported yet
  1236. ***** ^ not supported yet
  1237. 527 RealToStr(UNITPRC,2,7,Tmp);
  1238. ***** ^ not supported yet
  1239. ***** ^ undeclared identifier
  1240. ***** ^ not supported yet
  1241. 528 OverWrite(Tmp,Line,58);
  1242. ***** ^ not supported yet
  1243. ***** ^ not supported yet
  1244. ***** ^ not supported yet
  1245. ***** ^ not supported yet
  1246. 529 RealToStr(TOTAL,2,7,Tmp);
  1247. ***** ^ not supported yet
  1248. ***** ^ undeclared identifier
  1249. ***** ^ not supported yet
  1250. 530 OverWrite(Tmp,Line,67);
  1251. ***** ^ not supported yet
  1252. ***** ^ not supported yet
  1253. ***** ^ not supported yet
  1254. ***** ^ not supported yet
  1255. 531 AddMenuItem(SummaryDF,2,Cnt+2,Line,78,0,ITEMNBR);
  1256. ***** ^ not supported yet
  1257. ***** ^ undeclared identifier
  1258. ***** ^ not supported yet
  1259. ***** ^ undeclared identifier
  1260. 532 END; (* end of with *)
  1261. ***** ^ not supported yet
  1262. 533
  1263. 534 END; (* end of for *)
  1264. 535 ShowDisplayFrame(SummaryDF,1,13,80,24);
  1265. ***** ^ not supported yet
  1266. ***** ^ undeclared identifier
  1267. ***** ^ not supported yet
  1268. 536
  1269. 537 END ShowSummary;
  1270. ***** ^ not supported yet
  1271. 538
  1272. 539 PROCEDURE SelectFromSummary();
  1273. 540 (* select an item from the list and put into current item *)
  1274. 541 VAR
  1275. 542 NextFrame : AFrameName;
  1276. 543 K : CARDINAL;
  1277. 544 Size,Code : CARDINAL;
  1278. 545 BEGIN
  1279. 546 ControlFrame(SummaryDF,1,'',FALSE,NextFrame);
  1280. ***** ^ not supported yet
  1281. ***** ^ undeclared identifier
  1282. ***** ^ not supported yet
  1283. 547 (* CrunchBlanks(NextFrame); *)
  1284. 548 K := 1;
  1285. 549 LOOP
  1286. 550 IF K > ListLength(OrderItemLst)
  1287. ***** ^ not supported yet
  1288. ***** ^ undeclared identifier
  1289. 551 THEN EXIT;
  1290. 552 END;
  1291. 553 GetElmtAdr(OrderItemLst,K,CurrentItem,Size,Code);
  1292. ***** ^ not supported yet
  1293. ***** ^ undeclared identifier
  1294. ***** ^ undeclared identifier
  1295. ***** ^ not supported yet
  1296. 554 IF Equal(NextFrame,CurrentItem^.ItemOrderRec.ITEMNBR)
  1297. ***** ^ not supported yet
  1298. ***** ^ not supported yet
  1299. ***** ^ undeclared identifier
  1300. ***** ^ not supported yet
  1301. ***** ^ not supported yet
  1302. 555 THEN EXIT;
  1303. 556 END;
  1304. 557 INC(K);
  1305. ***** ^ undeclared identifier
  1306. ***** ^ not supported yet
  1307. 558 END; (* end of loop *)
  1308. 559 CloseDisplayFrame(SummaryDF);
  1309. ***** ^ not supported yet
  1310. ***** ^ undeclared identifier
  1311. 560 END SelectFromSummary;
  1312. ***** ^ not supported yet
  1313. 561
  1314. 562
  1315. 563
  1316. 564 PROCEDURE Recompute();
  1317. 565 (* go through the list twice
  1318. 566 1 - count the items in each group
  1319. 567 2 - get price based on group *)
  1320. 568 VAR
  1321. 569 Total : Real8;
  1322. 570 LL : CARDINAL;
  1323. 571 J : CARDINAL;
  1324. 572 Code,Size : CARDINAL;
  1325. 573
  1326. 574
  1327. 575 PROCEDURE CreditCompute(VAR ItemOrderRec :OrderRec) : Real8;
  1328. 576 BEGIN
  1329. 577 IF ItemOrderRec.UNITPRC > 0.0 (* credit items are negative *)
  1330. ***** ^ not supported yet
  1331. ***** ^ not supported yet
  1332. 578 THEN ItemOrderRec.UNITPRC := - ItemOrderRec.UNITPRC;
  1333. ***** ^ not supported yet
  1334. ***** ^ not supported yet
  1335. ***** ^ not supported yet
  1336. ***** ^ not supported yet
  1337. 579 END;
  1338. 580 ItemOrderRec.TOTAL := ItemOrderRec.UNITPRC;
  1339. ***** ^ not supported yet
  1340. ***** ^ not supported yet
  1341. ***** ^ not supported yet
  1342. ***** ^ not supported yet
  1343. 581 RETURN ItemOrderRec.TOTAL;
  1344. ***** ^ not supported yet
  1345. ***** ^ not supported yet
  1346. 582 END CreditCompute;
  1347. ***** ^ not supported yet
  1348. 583
  1349. 584 PROCEDURE GasCompute(VAR ItemOrderRec : OrderRec; VAR GasPriced : BOOLEAN) : Real8;
  1350. 585 BEGIN
  1351. 586 IF ItemOrderRec.MANPRICE = 'Y'
  1352. ***** ^ not supported yet
  1353. ***** ^ not supported yet
  1354. 587 THEN RETURN ItemOrderRec.TOTAL; (* already priced - *)
  1355. ***** ^ not supported yet
  1356. ***** ^ not supported yet
  1357. 588 END;
  1358. 589 ItemOrderRec.MANPRICE := 'Y';
  1359. ***** ^ not supported yet
  1360. ***** ^ not supported yet
  1361. 590 GasAmountDue(CurrentInvoice.CUSTID,
  1362. ***** ^ not supported yet
  1363. ***** ^ undeclared identifier
  1364. ***** ^ not supported yet
  1365. 591 ItemOrderRec.ITEMNBR,
  1366. ***** ^ not supported yet
  1367. ***** ^ not supported yet
  1368. 592 TRUNC(ItemOrderRec.QNTSOLD),
  1369. ***** ^ undeclared identifier
  1370. ***** ^ not supported yet
  1371. ***** ^ not supported yet
  1372. 593 CurrentInvoice.INVDATE,
  1373. ***** ^ undeclared identifier
  1374. ***** ^ not supported yet
  1375. 594 ItemOrderRec.TOTAL,
  1376. ***** ^ not supported yet
  1377. ***** ^ not supported yet
  1378. 595 ItemOrderRec.NOTES1);
  1379. ***** ^ not supported yet
  1380. ***** ^ not supported yet
  1381. 596 RETURN ItemOrderRec.TOTAL;
  1382. ***** ^ not supported yet
  1383. ***** ^ not supported yet
  1384. 597 END GasCompute;
  1385. ***** ^ not supported yet
  1386. 598
  1387. 599 PROCEDURE ComputeNormal() : Real8;
  1388. 600 BEGIN
  1389. 601 WITH CurrentItem^ DO
  1390. ***** ^ undeclared identifier
  1391. 602 IF (InventoryItem.PRICETBL > 0) AND
  1392. ***** ^ undeclared identifier
  1393. ***** ^ not supported yet
  1394. 603 (ItemOrderRec.MANPRICE = 'N')
  1395. ***** ^ undeclared identifier
  1396. ***** ^ not supported yet
  1397. 604 THEN
  1398. 605 IF InventoryItem.GROUP[0] > 0C (* a group exists *)
  1399. ***** ^ undeclared identifier
  1400. ***** ^ not supported yet
  1401. ***** ^ not supported yet
  1402. 606 THEN
  1403. 607 ItemOrderRec.UNITPRC := GetPrice(InventoryItem.PRICETBL,
  1404. ***** ^ undeclared identifier
  1405. ***** ^ not supported yet
  1406. ***** ^ not supported yet
  1407. ***** ^ undeclared identifier
  1408. ***** ^ not supported yet
  1409. 608 GrpTotal(InventoryItem.GROUP),
  1410. ***** ^ not supported yet
  1411. ***** ^ undeclared identifier
  1412. ***** ^ not supported yet
  1413. 609 CurrentInvoice.DFLTLVL);
  1414. ***** ^ undeclared identifier
  1415. ***** ^ not supported yet
  1416. 610 ELSE (* price based on this item alone *)
  1417. 611 (* use the qntorder for computing the unit price*)
  1418. 612 ItemOrderRec.UNITPRC := GetPrice(InventoryItem.PRICETBL,
  1419. ***** ^ undeclared identifier
  1420. ***** ^ not supported yet
  1421. ***** ^ not supported yet
  1422. ***** ^ undeclared identifier
  1423. ***** ^ not supported yet
  1424. 613 TRUNC(ItemOrderRec.QNTORDER),
  1425. ***** ^ undeclared identifier
  1426. ***** ^ undeclared identifier
  1427. ***** ^ not supported yet
  1428. 614 CurrentInvoice.DFLTLVL);
  1429. ***** ^ undeclared identifier
  1430. ***** ^ not supported yet
  1431. 615 END; (* not table priced - *)
  1432. 616
  1433. 617 END;
  1434. 618 ItemOrderRec.TOTAL := ItemOrderRec.QNTSOLD * ItemOrderRec.UNITPRC;
  1435. ***** ^ undeclared identifier
  1436. ***** ^ not supported yet
  1437. ***** ^ undeclared identifier
  1438. ***** ^ not supported yet
  1439. ***** ^ undeclared identifier
  1440. ***** ^ not supported yet
  1441. 619 END; (* end with *)
  1442. ***** ^ not supported yet
  1443. 620 RETURN CurrentItem^.ItemOrderRec.TOTAL;
  1444. ***** ^ undeclared identifier
  1445. ***** ^ not supported yet
  1446. ***** ^ not supported yet
  1447. 621
  1448. 622 END ComputeNormal;
  1449. ***** ^ not supported yet
  1450. 623
  1451. 624 BEGIN
  1452. 625 ClearGrpCnt();
  1453. ***** ^ not supported yet
  1454. ***** ^ not supported yet
  1455. 626 HeaderChanged := TRUE;
  1456. ***** ^ undeclared identifier
  1457. 627 LL := ListLength(OrderItemLst); (* go through the list and add items *)
  1458. ***** ^ undeclared identifier
  1459. ***** ^ not supported yet
  1460. ***** ^ undeclared identifier
  1461. 628 FOR J := 1 TO LL DO
  1462. ***** ^ undeclared identifier
  1463. 629 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code);
  1464. ***** ^ not supported yet
  1465. ***** ^ undeclared identifier
  1466. ***** ^ undeclared identifier
  1467. ***** ^ undeclared identifier
  1468. ***** ^ undeclared identifier
  1469. 630 IF CurrentItem^.InventoryItem.GROUP[0] > 0C (*a group exists *)
  1470. ***** ^ undeclared identifier
  1471. ***** ^ not supported yet
  1472. ***** ^ not supported yet
  1473. ***** ^ not supported yet
  1474. 631 THEN
  1475. 632 AddGrp(CurrentItem^.InventoryItem.GROUP,TRUNC(CurrentItem^.ItemOrderRec.QNTSOLD));
  1476. ***** ^ not supported yet
  1477. ***** ^ undeclared identifier
  1478. ***** ^ not supported yet
  1479. ***** ^ not supported yet
  1480. ***** ^ undeclared identifier
  1481. ***** ^ undeclared identifier
  1482. ***** ^ not supported yet
  1483. ***** ^ not supported yet
  1484. 633 END;
  1485. 634 CurrentInvoice.INVNET := 0.0;
  1486. ***** ^ undeclared identifier
  1487. ***** ^ not supported yet
  1488. 635 END;
  1489. 636 FOR J := 1 TO LL DO (* now compute price *)
  1490. ***** ^ undeclared identifier
  1491. 637 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code);
  1492. ***** ^ not supported yet
  1493. ***** ^ undeclared identifier
  1494. ***** ^ undeclared identifier
  1495. ***** ^ undeclared identifier
  1496. ***** ^ undeclared identifier
  1497. 638 WITH CurrentItem^ DO
  1498. ***** ^ undeclared identifier
  1499. 639 IF Pos(Credit,ItemOrderRec.ITEMNBR) = 0 (* credit item *)
  1500. ***** ^ not supported yet
  1501. ***** ^ undeclared identifier
  1502. ***** ^ undeclared identifier
  1503. ***** ^ not supported yet
  1504. 640 THEN
  1505. 641 CurrentInvoice.INVNET := CurrentInvoice.INVNET +
  1506. ***** ^ undeclared identifier
  1507. ***** ^ not supported yet
  1508. ***** ^ undeclared identifier
  1509. ***** ^ not supported yet
  1510. 642 CreditCompute(ItemOrderRec);
  1511. ***** ^ undeclared identifier
  1512. ***** ^ undeclared identifier
  1513. 643
  1514. 644 ELSIF Pos(GasIn,CurrentItem^.ItemOrderRec.ITEMNBR) = 0
  1515. ***** ^ not supported yet
  1516. ***** ^ undeclared identifier
  1517. ***** ^ undeclared identifier
  1518. ***** ^ not supported yet
  1519. ***** ^ not supported yet
  1520. 645 THEN
  1521. 646 CurrentInvoice.INVNET := CurrentInvoice.INVNET +
  1522. ***** ^ undeclared identifier
  1523. ***** ^ not supported yet
  1524. ***** ^ undeclared identifier
  1525. ***** ^ not supported yet
  1526. 647 GasCompute(ItemOrderRec,GasPriced);
  1527. ***** ^ undeclared identifier
  1528. ***** ^ undeclared identifier
  1529. ***** ^ undeclared identifier
  1530. 648 ELSE
  1531. 649 CurrentInvoice.INVNET := CurrentInvoice.INVNET +
  1532. ***** ^ undeclared identifier
  1533. ***** ^ not supported yet
  1534. ***** ^ undeclared identifier
  1535. ***** ^ not supported yet
  1536. 650 ComputeNormal();
  1537. ***** ^ undeclared identifier
  1538. ***** ^ not supported yet
  1539. 651 END;
  1540. 652 END; (* end with current item *)
  1541. ***** ^ not supported yet
  1542. 653 END; (* end for j *)
  1543. 654 CurrentInvoice.INVNET := CurrentInvoice.INVNET * (1.0 - CurrentInvoice.INVDSCNT/100.0);
  1544. ***** ^ undeclared identifier
  1545. ***** ^ not supported yet
  1546. ***** ^ undeclared identifier
  1547. ***** ^ not supported yet
  1548. ***** ^ undeclared identifier
  1549. ***** ^ not supported yet
  1550. 655 CAPstr(CurrentInvoice.TAXABLE);
  1551. ***** ^ not supported yet
  1552. ***** ^ undeclared identifier
  1553. ***** ^ not supported yet
  1554. 656 IF (CurrentInvoice.TAXABLE = 'Y')
  1555. ***** ^ undeclared identifier
  1556. ***** ^ not supported yet
  1557. 657 THEN
  1558. 658 CurrentInvoice.INVTAX := CurrentInvoice.INVNET * (Config.TaxRate/100.0); (* add tax *)
  1559. ***** ^ undeclared identifier
  1560. ***** ^ not supported yet
  1561. ***** ^ undeclared identifier
  1562. ***** ^ not supported yet
  1563. ***** ^ not supported yet
  1564. ***** ^ not supported yet
  1565. 659 ELSE
  1566. 660 CurrentInvoice.INVTAX := 0.0;
  1567. ***** ^ undeclared identifier
  1568. ***** ^ not supported yet
  1569. 661 END;
  1570. 662 CurrentInvoice.TOTALAMT := CurrentInvoice.INVNET + CurrentInvoice.INVTAX +
  1571. ***** ^ undeclared identifier
  1572. ***** ^ not supported yet
  1573. ***** ^ undeclared identifier
  1574. ***** ^ not supported yet
  1575. ***** ^ undeclared identifier
  1576. ***** ^ not supported yet
  1577. 663 CurrentInvoice.SHIPPING;
  1578. ***** ^ undeclared identifier
  1579. ***** ^ not supported yet
  1580. 664 ChangeRealField(InvoiceHeadDF,CurrentInvoice.TOTALAMT,'Total'); (*update header screen*)
  1581. ***** ^ not supported yet
  1582. ***** ^ undeclared identifier
  1583. ***** ^ undeclared identifier
  1584. ***** ^ not supported yet
  1585. ***** ^ not supported yet
  1586. 665 ChangeRealField(InvoiceHeadDF,CurrentInvoice.INVTAX,'Tax');
  1587. ***** ^ not supported yet
  1588. ***** ^ undeclared identifier
  1589. ***** ^ undeclared identifier
  1590. ***** ^ not supported yet
  1591. ***** ^ not supported yet
  1592. 666 ChangeRealField(InvoiceHeadDF,CurrentInvoice.INVNET,'Net');
  1593. ***** ^ not supported yet
  1594. ***** ^ undeclared identifier
  1595. ***** ^ undeclared identifier
  1596. ***** ^ not supported yet
  1597. ***** ^ not supported yet
  1598. 667 RedrawField(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Tax'),FALSE);
  1599. ***** ^ not supported yet
  1600. ***** ^ undeclared identifier
  1601. ***** ^ not supported yet
  1602. ***** ^ undeclared identifier
  1603. ***** ^ not supported yet
  1604. ***** ^ not supported yet
  1605. 668 RedrawField(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Net'),FALSE);
  1606. ***** ^ not supported yet
  1607. ***** ^ undeclared identifier
  1608. ***** ^ not supported yet
  1609. ***** ^ undeclared identifier
  1610. ***** ^ not supported yet
  1611. ***** ^ not supported yet
  1612. 669 RedrawField(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Total'),FALSE);
  1613. ***** ^ not supported yet
  1614. ***** ^ undeclared identifier
  1615. ***** ^ not supported yet
  1616. ***** ^ undeclared identifier
  1617. ***** ^ not supported yet
  1618. ***** ^ not supported yet
  1619. 670
  1620. 671 END Recompute;
  1621. ***** ^ not supported yet
  1622. 672
  1623. 673 PROCEDURE UpdateInvHeader();
  1624. 674 (* update the invoice header and display *)
  1625. 675 BEGIN
  1626. 676 WITH CurrentInvoice DO
  1627. ***** ^ undeclared identifier
  1628. 677 CrunchBlanks(INVOICE);
  1629. ***** ^ not supported yet
  1630. ***** ^ undeclared identifier
  1631. 678 ChangeField(InvoiceHeadDF,INVOICE,'InvNbr',TRUE);
  1632. ***** ^ not supported yet
  1633. ***** ^ undeclared identifier
  1634. ***** ^ undeclared identifier
  1635. ***** ^ not supported yet
  1636. ***** ^ not supported yet
  1637. 679 ChangeDateField(InvoiceHeadDF,INVDATE,'InvDate');
  1638. ***** ^ not supported yet
  1639. ***** ^ undeclared identifier
  1640. ***** ^ undeclared identifier
  1641. ***** ^ not supported yet
  1642. 680 ChangeField(InvoiceHeadDF,SALESMAN,'SalesRep',TRUE);
  1643. ***** ^ not supported yet
  1644. ***** ^ undeclared identifier
  1645. ***** ^ undeclared identifier
  1646. ***** ^ not supported yet
  1647. ***** ^ not supported yet
  1648. 681 ChangeField(InvoiceHeadDF,TERMS,'Terms',TRUE);
  1649. ***** ^ not supported yet
  1650. ***** ^ undeclared identifier
  1651. ***** ^ undeclared identifier
  1652. ***** ^ not supported yet
  1653. ***** ^ not supported yet
  1654. 682 ChangeField(InvoiceHeadDF,SHIPVIA,'ShipVia',TRUE);
  1655. ***** ^ not supported yet
  1656. ***** ^ undeclared identifier
  1657. ***** ^ undeclared identifier
  1658. ***** ^ not supported yet
  1659. ***** ^ not supported yet
  1660. 683 ChangeField(InvoiceHeadDF,TAXABLE,'Taxable',TRUE);
  1661. ***** ^ not supported yet
  1662. ***** ^ undeclared identifier
  1663. ***** ^ undeclared identifier
  1664. ***** ^ not supported yet
  1665. ***** ^ not supported yet
  1666. 684 ChangeRealField(InvoiceHeadDF,INVDSCNT,'Discount');
  1667. ***** ^ not supported yet
  1668. ***** ^ undeclared identifier
  1669. ***** ^ undeclared identifier
  1670. ***** ^ not supported yet
  1671. 685 ChangeRealField(InvoiceHeadDF,INVTAX,'Tax');
  1672. ***** ^ not supported yet
  1673. ***** ^ undeclared identifier
  1674. ***** ^ undeclared identifier
  1675. ***** ^ not supported yet
  1676. 686 ChangeRealField(InvoiceHeadDF,INVNET,'Net');
  1677. ***** ^ not supported yet
  1678. ***** ^ undeclared identifier
  1679. ***** ^ undeclared identifier
  1680. ***** ^ not supported yet
  1681. 687 ChangeRealField(InvoiceHeadDF,SHIPPING,'Shipping');
  1682. ***** ^ not supported yet
  1683. ***** ^ undeclared identifier
  1684. ***** ^ undeclared identifier
  1685. ***** ^ not supported yet
  1686. 688 ChangeCardField(InvoiceHeadDF,DFLTLVL,'DefaultLevel');
  1687. ***** ^ not supported yet
  1688. ***** ^ undeclared identifier
  1689. ***** ^ undeclared identifier
  1690. ***** ^ not supported yet
  1691. 689 ChangeRealField(InvoiceHeadDF,TOTALAMT,'Total');
  1692. ***** ^ not supported yet
  1693. ***** ^ undeclared identifier
  1694. ***** ^ undeclared identifier
  1695. ***** ^ not supported yet
  1696. 690 ChangeField(InvoiceHeadDF,NOTE1,'NOTE1',TRUE);
  1697. ***** ^ not supported yet
  1698. ***** ^ undeclared identifier
  1699. ***** ^ undeclared identifier
  1700. ***** ^ not supported yet
  1701. ***** ^ not supported yet
  1702. 691 ChangeField(InvoiceHeadDF,NOTE2,'NOTE2',TRUE);
  1703. ***** ^ not supported yet
  1704. ***** ^ undeclared identifier
  1705. ***** ^ undeclared identifier
  1706. ***** ^ not supported yet
  1707. ***** ^ not supported yet
  1708. 692 ChangeField(InvoiceHeadDF,NOTE3,'NOTE3',TRUE);
  1709. ***** ^ not supported yet
  1710. ***** ^ undeclared identifier
  1711. ***** ^ undeclared identifier
  1712. ***** ^ not supported yet
  1713. ***** ^ not supported yet
  1714. 693 ChangeField(InvoiceHeadDF,NOTESFOR,'NOTESFOR',TRUE);
  1715. ***** ^ not supported yet
  1716. ***** ^ undeclared identifier
  1717. ***** ^ undeclared identifier
  1718. ***** ^ not supported yet
  1719. ***** ^ not supported yet
  1720. 694
  1721. 695 END;
  1722. ***** ^ not supported yet
  1723. 696 ShowDisplayFrame(InvoiceHeadDF,0,0,0,0);
  1724. ***** ^ not supported yet
  1725. ***** ^ undeclared identifier
  1726. ***** ^ not supported yet
  1727. 697
  1728. 698 END UpdateInvHeader;
  1729. ***** ^ not supported yet
  1730. 699
  1731. 700
  1732. 701 PROCEDURE GetInvoice(InvNbr : ARRAY OF CHAR);
  1733. ***** ^ not supported yet
  1734. 702 (* get the invoice header, get the invoice items, get the inventory items*)
  1735. 703 VAR
  1736. 704 Items : GenList;
  1737. 705 LI : LONGINT;
  1738. 706 J : CARDINAL;
  1739. 707 Code : CARDINAL;
  1740. 708 Tmp : InvoiceItem;
  1741. ***** ^ undeclared identifier
  1742. 709 BEGIN
  1743. 710 NewList(Items); (* get all items *)
  1744. ***** ^ not supported yet
  1745. ***** ^ not supported yet
  1746. 711 FindAll(InvnbrIdx,InvNbr,EQ,Items);
  1747. ***** ^ not supported yet
  1748. ***** ^ not supported yet
  1749. ***** ^ not supported yet
  1750. ***** ^ undeclared identifier
  1751. ***** ^ not supported yet
  1752. 712 FOR J := 1 TO ListLength(Items) DO
  1753. ***** ^ not supported yet
  1754. ***** ^ not supported yet
  1755. 713 GetElmt(Items,J,LI,Code);
  1756. ***** ^ not supported yet
  1757. ***** ^ not supported yet
  1758. ***** ^ not supported yet
  1759. 714 ReadDBRec(OrderDBF,LI); (* read the record *)
  1760. ***** ^ not supported yet
  1761. ***** ^ not supported yet
  1762. ***** ^ not supported yet
  1763. 715 MoveOrderFromDBF(Tmp.ItemOrderRec);
  1764. ***** ^ not supported yet
  1765. ***** ^ not supported yet
  1766. ***** ^ not supported yet
  1767. 716 IF NOT Special(Tmp.ItemOrderRec.ITEMNBR)
  1768. ***** ^ not supported yet
  1769. ***** ^ not supported yet
  1770. ***** ^ not supported yet
  1771. ***** ^ not supported yet
  1772. 717 THEN
  1773. 718 IF NOT FindInvtryByInvcode(Tmp.ItemOrderRec.ITEMNBR)
  1774. ***** ^ not supported yet
  1775. ***** ^ not supported yet
  1776. ***** ^ not supported yet
  1777. ***** ^ not supported yet
  1778. 719 THEN Prompt(' could not find inventory');
  1779. ***** ^ not supported yet
  1780. ***** ^ not supported yet
  1781. 720 ELSE
  1782. 721 MoveInvtryFromDBF(Tmp.InventoryItem);
  1783. ***** ^ not supported yet
  1784. ***** ^ not supported yet
  1785. ***** ^ not supported yet
  1786. 722 Tmp.InventoryFilePos := Record(InvtryDBF);
  1787. ***** ^ not supported yet
  1788. ***** ^ not supported yet
  1789. ***** ^ not supported yet
  1790. ***** ^ not supported yet
  1791. 723 END;
  1792. 724 ELSE Fill(ADR(Tmp.InventoryItem ),SIZE(Tmp.InventoryItem),0);
  1793. ***** ^ not supported yet
  1794. ***** ^ not supported yet
  1795. ***** ^ not supported yet
  1796. ***** ^ not supported yet
  1797. ***** ^ not supported yet
  1798. ***** ^ not supported yet
  1799. ***** ^ not supported yet
  1800. ***** ^ not supported yet
  1801. 725 END;
  1802. 726 Tmp.OldQuant := Tmp.ItemOrderRec.QNTSOLD;
  1803. ***** ^ not supported yet
  1804. ***** ^ not supported yet
  1805. ***** ^ not supported yet
  1806. ***** ^ not supported yet
  1807. ***** ^ not supported yet
  1808. 727 Tmp.BeenAdded := TRUE;
  1809. ***** ^ not supported yet
  1810. ***** ^ not supported yet
  1811. 728 Tmp.GasPriced := TRUE;
  1812. ***** ^ not supported yet
  1813. ***** ^ not supported yet
  1814. 729 GetPriceTable(Tmp.InventoryItem.PRICETBL,Tmp.Q1,Tmp.Q2,Tmp.Q3,Tmp.Q4,
  1815. ***** ^ not supported yet
  1816. ***** ^ not supported yet
  1817. ***** ^ not supported yet
  1818. ***** ^ not supported yet
  1819. ***** ^ not supported yet
  1820. ***** ^ not supported yet
  1821. ***** ^ not supported yet
  1822. ***** ^ not supported yet
  1823. ***** ^ not supported yet
  1824. ***** ^ not supported yet
  1825. ***** ^ not supported yet
  1826. ***** ^ not supported yet
  1827. 730 Tmp.P1,Tmp.P2,Tmp.P3,Tmp.P4);
  1828. ***** ^ not supported yet
  1829. ***** ^ not supported yet
  1830. ***** ^ not supported yet
  1831. ***** ^ not supported yet
  1832. ***** ^ not supported yet
  1833. ***** ^ not supported yet
  1834. ***** ^ not supported yet
  1835. ***** ^ not supported yet
  1836. 731 ListInsert(Tmp,1,OrderItemLst,1);
  1837. ***** ^ not supported yet
  1838. ***** ^ not supported yet
  1839. ***** ^ undeclared identifier
  1840. ***** ^ not supported yet
  1841. 732 END; (* end for j *)
  1842. 733 ShellSortList(OrderItemLst,SortItemList);
  1843. ***** ^ not supported yet
  1844. ***** ^ undeclared identifier
  1845. ***** ^ not supported yet
  1846. 734 END GetInvoice;
  1847. ***** ^ not supported yet
  1848. 735
  1849. 736
  1850. 737
  1851. 738 PROCEDURE MakeInvoicePrintLine(InvAddr : ADDRESS; VAR Line : ARRAY OF CHAR);
  1852. ***** ^ not supported yet
  1853. 739 VAR
  1854. 740 TmpInv : POINTER TO FInvoice;
  1855. ***** ^ undeclared identifier
  1856. 741 B : BOOLEAN;
  1857. 742 Str : ARRAY[0..10] OF CHAR;
  1858. ***** ^ not supported yet
  1859. ***** ^ not supported yet
  1860. 743 BEGIN
  1861. 744 TmpInv := InvAddr;
  1862. ***** ^ not supported yet
  1863. ***** ^ not supported yet
  1864. 745 Fill(ADR(Line),70,' ');
  1865. ***** ^ not supported yet
  1866. ***** ^ not supported yet
  1867. ***** ^ not supported yet
  1868. ***** ^ not supported yet
  1869. 746 Line[60] := 0C;
  1870. ***** ^ not supported yet
  1871. ***** ^ not supported yet
  1872. 747 OverWrite(TmpInv^.Invoice.INVOICE,Line,0);
  1873. ***** ^ not supported yet
  1874. ***** ^ not supported yet
  1875. ***** ^ not supported yet
  1876. ***** ^ not supported yet
  1877. ***** ^ not supported yet
  1878. ***** ^ not supported yet
  1879. 748 DateToStr(TmpInv^.Invoice.INVDATE,Str,B);
  1880. ***** ^ not supported yet
  1881. ***** ^ not supported yet
  1882. ***** ^ not supported yet
  1883. ***** ^ not supported yet
  1884. ***** ^ not supported yet
  1885. ***** ^ not supported yet
  1886. 749 OverWrite(Str,Line,10);
  1887. ***** ^ not supported yet
  1888. ***** ^ not supported yet
  1889. ***** ^ not supported yet
  1890. ***** ^ not supported yet
  1891. 750 RealToStr(TmpInv^.Invoice.TOTALAMT,2,9,Str);
  1892. ***** ^ not supported yet
  1893. ***** ^ not supported yet
  1894. ***** ^ not supported yet
  1895. ***** ^ not supported yet
  1896. ***** ^ not supported yet
  1897. 751 OverWrite(Str,Line,20);
  1898. ***** ^ not supported yet
  1899. ***** ^ not supported yet
  1900. ***** ^ not supported yet
  1901. ***** ^ not supported yet
  1902. 752
  1903. 753 RealToStr(TmpInv^.Invoice.AMTOUT,2,9,Str);
  1904. ***** ^ not supported yet
  1905. ***** ^ not supported yet
  1906. ***** ^ not supported yet
  1907. ***** ^ not supported yet
  1908. ***** ^ not supported yet
  1909. 754 OverWrite(Str,Line,33);
  1910. ***** ^ not supported yet
  1911. ***** ^ not supported yet
  1912. ***** ^ not supported yet
  1913. ***** ^ not supported yet
  1914. 755 OverWrite(TmpInv^.Invoice.INVPRNT,Line,53);
  1915. ***** ^ not supported yet
  1916. ***** ^ not supported yet
  1917. ***** ^ not supported yet
  1918. ***** ^ not supported yet
  1919. ***** ^ not supported yet
  1920. ***** ^ not supported yet
  1921. 756
  1922. 757 END MakeInvoicePrintLine;
  1923. ***** ^ not supported yet
  1924. 758
  1925. 759
  1926. 760 PROCEDURE DisplayInvList(TheList : GenList);
  1927. 761 VAR
  1928. 762 Code,Size: CARDINAL;
  1929. 763 K : CARDINAL;
  1930. 764 TmpInv : POINTER TO FInvoice;
  1931. ***** ^ undeclared identifier
  1932. 765 Line : ARRAY[0..80] OF CHAR;
  1933. ***** ^ not supported yet
  1934. ***** ^ not supported yet
  1935. 766 CustID : ARRAY[0..15] OF CHAR;
  1936. ***** ^ not supported yet
  1937. ***** ^ not supported yet
  1938. 767 B : BOOLEAN;
  1939. 768 Str : ARRAY[0..10] OF CHAR;
  1940. ***** ^ not supported yet
  1941. ***** ^ not supported yet
  1942. 769 found : BOOLEAN;
  1943. 770 FieldRec : InputFieldRecord;
  1944. 771 BEGIN
  1945. 772 (*
  1946. 773 1 2 3 4 5
  1947. 774 012345678901234567890123456789012345678901234567890123456
  1948. 775 Inv Nbr Inv Date Inv Total Amount Out Status
  1949. 776 *)
  1950. 777 InitDisplayFrame(SummaryDF,CurrentWindow);
  1951. ***** ^ not supported yet
  1952. ***** ^ undeclared identifier
  1953. ***** ^ not supported yet
  1954. 778 AddStrField(SummaryDF,2,2,
  1955. ***** ^ not supported yet
  1956. ***** ^ undeclared identifier
  1957. 779 'Inv Nbr Inv Date Inv Total Amount Outstanding Status',60);
  1958. ***** ^ not supported yet
  1959. ***** ^ not supported yet
  1960. 780 GetFieldRec(SummaryDF,1,FieldRec);
  1961. ***** ^ not supported yet
  1962. ***** ^ undeclared identifier
  1963. ***** ^ not supported yet
  1964. 781 FieldRec.typ := DispCode; (* headline = display code *)
  1965. ***** ^ not supported yet
  1966. ***** ^ not supported yet
  1967. ***** ^ not supported yet
  1968. 782 PutFieldRec(FieldRec,SummaryDF,1);
  1969. ***** ^ not supported yet
  1970. ***** ^ not supported yet
  1971. ***** ^ undeclared identifier
  1972. ***** ^ not supported yet
  1973. 783 SummaryDF^.headline := 2;
  1974. ***** ^ undeclared identifier
  1975. ***** ^ not supported yet
  1976. 784 K := ListLength(TheList); (*debug trap *)
  1977. ***** ^ not supported yet
  1978. ***** ^ not supported yet
  1979. 785 FOR J := 1 TO K DO
  1980. 786 GetElmtAdr(TheList,J,TmpInv,Size,Code);
  1981. ***** ^ not supported yet
  1982. ***** ^ not supported yet
  1983. ***** ^ not supported yet
  1984. ***** ^ not supported yet
  1985. 787 MakeInvoicePrintLine(TmpInv,Line);
  1986. ***** ^ not supported yet
  1987. ***** ^ not supported yet
  1988. ***** ^ not supported yet
  1989. 788
  1990. 789 AddMenuItem(SummaryDF,2,J+2,Line,60,0,TmpInv^.Invoice.INVOICE);
  1991. ***** ^ not supported yet
  1992. ***** ^ undeclared identifier
  1993. ***** ^ not supported yet
  1994. ***** ^ not supported yet
  1995. ***** ^ not supported yet
  1996. ***** ^ not supported yet
  1997. 790 END; (* end of for *)
  1998. 791 ShowDisplayFrame(SummaryDF,1,13,80,24);
  1999. ***** ^ not supported yet
  2000. ***** ^ undeclared identifier
  2001. ***** ^ not supported yet
  2002. 792 END DisplayInvList;
  2003. ***** ^ not supported yet
  2004. 793
  2005. 794
  2006. 795 PROCEDURE SelectInvoiceFromList(VAR TheList : GenList; ReadInvtry : BOOLEAN);
  2007. 796 (* returns the selected invoice in current invoice *)
  2008. 797 (* assumes summary df already set up *)
  2009. 798
  2010. 799 VAR NextFrame : AFrameName;
  2011. 800 Size,Code : CARDINAL;
  2012. 801 found : BOOLEAN;
  2013. 802 K : CARDINAL;
  2014. 803 TmpInv : POINTER TO FInvoice;
  2015. ***** ^ undeclared identifier
  2016. 804 BEGIN
  2017. 805 ControlFrame(SummaryDF,1,'',TRUE,NextFrame);
  2018. ***** ^ not supported yet
  2019. ***** ^ undeclared identifier
  2020. ***** ^ not supported yet
  2021. 806 K := 1;
  2022. 807 found := TRUE;
  2023. 808 CrunchBlanks(NextFrame);
  2024. ***** ^ not supported yet
  2025. ***** ^ not supported yet
  2026. 809 LOOP
  2027. 810 IF K > ListLength(TheList)
  2028. ***** ^ not supported yet
  2029. ***** ^ not supported yet
  2030. 811 THEN
  2031. 812 (* Prompt('Could not find invoice '); *)
  2032. 813 found := FALSE;
  2033. 814 EXIT;
  2034. 815 END;
  2035. 816 GetElmtAdr(TheList,K,TmpInv,Size,Code);
  2036. ***** ^ not supported yet
  2037. ***** ^ not supported yet
  2038. ***** ^ not supported yet
  2039. ***** ^ not supported yet
  2040. 817 CrunchBlanks(TmpInv^.Invoice.INVOICE);
  2041. ***** ^ not supported yet
  2042. ***** ^ not supported yet
  2043. ***** ^ not supported yet
  2044. ***** ^ not supported yet
  2045. 818 IF Equal(TmpInv^.Invoice.INVOICE,NextFrame)
  2046. ***** ^ not supported yet
  2047. ***** ^ not supported yet
  2048. ***** ^ not supported yet
  2049. ***** ^ not supported yet
  2050. ***** ^ not supported yet
  2051. 819 THEN EXIT;
  2052. 820 END;
  2053. 821 INC(K);
  2054. ***** ^ undeclared identifier
  2055. ***** ^ not supported yet
  2056. 822 END; (* end of loop *)
  2057. 823 CloseDisplayFrame(SummaryDF);
  2058. ***** ^ not supported yet
  2059. ***** ^ undeclared identifier
  2060. 824 IF found
  2061. 825 THEN
  2062. 826 ReadDBRec(InvoiceDBF,TmpInv^.LI); (* read the selected item *)
  2063. ***** ^ not supported yet
  2064. ***** ^ not supported yet
  2065. ***** ^ not supported yet
  2066. ***** ^ not supported yet
  2067. 827 CurrentInvoice := TmpInv^.Invoice; (* make current invoice *)
  2068. ***** ^ undeclared identifier
  2069. ***** ^ not supported yet
  2070. ***** ^ not supported yet
  2071. 828 IF CurrentInvoice.INVPRNT = 'P'
  2072. ***** ^ undeclared identifier
  2073. ***** ^ not supported yet
  2074. 829 THEN
  2075. 830 CurrInvOldAmt := CurrentInvoice.INVNET; (* if they reprint *)
  2076. ***** ^ undeclared identifier
  2077. ***** ^ undeclared identifier
  2078. ***** ^ not supported yet
  2079. 831 ELSE
  2080. 832 CurrInvOldAmt := 0.0; (* keep the ytd amount correct*)
  2081. ***** ^ undeclared identifier
  2082. 833 END;
  2083. 834 IF ReadInvtry (* if this call from select invoice to update*)
  2084. 835 THEN
  2085. 836 UpdateInvHeader();
  2086. ***** ^ not supported yet
  2087. ***** ^ not supported yet
  2088. 837 GetInvoice(CurrentInvoice.INVOICE);
  2089. ***** ^ not supported yet
  2090. ***** ^ undeclared identifier
  2091. ***** ^ not supported yet
  2092. 838 ShowSummary();
  2093. ***** ^ not supported yet
  2094. ***** ^ not supported yet
  2095. 839 END;
  2096. 840
  2097. 841 ELSE
  2098. 842 CurrentInvoice.INVOICE := '';
  2099. ***** ^ undeclared identifier
  2100. ***** ^ not supported yet
  2101. 843 END;
  2102. 844
  2103. 845 END SelectInvoiceFromList;
  2104. ***** ^ not supported yet
  2105. 846
  2106. 847 PROCEDURE SelectInvoice( );
  2107. 848 (* this routine will select from the set of invoices owned by a customer
  2108. 849 and return the invoice number of the selected - If esc is hit then no
  2109. 850 invoice is selected *)
  2110. 851
  2111. 852 VAR
  2112. 853 SelList : GenList;
  2113. 854 PrnList : GenList;
  2114. 855 J,K : CARDINAL;
  2115. 856 Code,Size: CARDINAL;
  2116. 857 TmpInv : POINTER TO FInvoice;
  2117. ***** ^ undeclared identifier
  2118. 858 CustID : ARRAY[0..15] OF CHAR;
  2119. ***** ^ not supported yet
  2120. ***** ^ not supported yet
  2121. 859 B : BOOLEAN;
  2122. 860 found : BOOLEAN;
  2123. 861 BEGIN
  2124. 862 GetCustNbr(CustID); (* get the open invoice *)
  2125. ***** ^ not supported yet
  2126. ***** ^ not supported yet
  2127. 863 Append(CustID,'O'); (* only get the open ones *)
  2128. ***** ^ not supported yet
  2129. ***** ^ not supported yet
  2130. ***** ^ not supported yet
  2131. 864 MakeKey(CustID);
  2132. ***** ^ not supported yet
  2133. ***** ^ not supported yet
  2134. 865 NilList(SelList);
  2135. ***** ^ not supported yet
  2136. ***** ^ not supported yet
  2137. 866 FindAll(CustidIdx,CustID,EQ,SelList);
  2138. ***** ^ not supported yet
  2139. ***** ^ not supported yet
  2140. ***** ^ not supported yet
  2141. ***** ^ undeclared identifier
  2142. ***** ^ not supported yet
  2143. 867 ReadAllRecs(InvoiceDBF,ReadAnInvoice,SelList);
  2144. ***** ^ not supported yet
  2145. ***** ^ not supported yet
  2146. ***** ^ not supported yet
  2147. ***** ^ not supported yet
  2148. 868
  2149. 869 GetCustNbr(CustID); (* get all of the printed ones *)
  2150. ***** ^ not supported yet
  2151. ***** ^ not supported yet
  2152. 870 Append(CustID,'P');
  2153. ***** ^ not supported yet
  2154. ***** ^ not supported yet
  2155. ***** ^ not supported yet
  2156. 871 MakeKey(CustID);
  2157. ***** ^ not supported yet
  2158. ***** ^ not supported yet
  2159. 872 NilList(PrnList);
  2160. ***** ^ not supported yet
  2161. ***** ^ not supported yet
  2162. 873 FindAll(CustidIdx,CustID,EQ,PrnList);
  2163. ***** ^ not supported yet
  2164. ***** ^ not supported yet
  2165. ***** ^ not supported yet
  2166. ***** ^ undeclared identifier
  2167. ***** ^ not supported yet
  2168. 874 ReadAllRecs(InvoiceDBF,ReadAnInvoice,PrnList);
  2169. ***** ^ not supported yet
  2170. ***** ^ not supported yet
  2171. ***** ^ not supported yet
  2172. ***** ^ not supported yet
  2173. 875
  2174. 876 JoinLists(PrnList,SelList,1); (* join the two lists - all outstanding*)
  2175. ***** ^ not supported yet
  2176. ***** ^ not supported yet
  2177. ***** ^ not supported yet
  2178. ***** ^ not supported yet
  2179. 877 IF ListLength(SelList) = 0
  2180. ***** ^ not supported yet
  2181. ***** ^ not supported yet
  2182. 878 THEN Prompt('No open invoices');
  2183. ***** ^ not supported yet
  2184. ***** ^ not supported yet
  2185. 879 CurrentInvoice.INVOICE := '';
  2186. ***** ^ undeclared identifier
  2187. ***** ^ not supported yet
  2188. 880 DisposeList(SelList);
  2189. ***** ^ not supported yet
  2190. ***** ^ not supported yet
  2191. 881 RETURN;
  2192. 882 END;
  2193. 883 DisplayInvList(SelList);
  2194. ***** ^ not supported yet
  2195. ***** ^ not supported yet
  2196. 884 SelectInvoiceFromList(SelList,TRUE);
  2197. ***** ^ not supported yet
  2198. ***** ^ not supported yet
  2199. ***** ^ not supported yet
  2200. 885 DisposeList(SelList);
  2201. ***** ^ not supported yet
  2202. ***** ^ not supported yet
  2203. 886
  2204. 887 END SelectInvoice;
  2205. ***** ^ not supported yet
  2206. 888
  2207. 889
  2208. 890 PROCEDURE InvoiceHistory();
  2209. 891 VAR
  2210. 892 PrnList : GenList;
  2211. 893 CustID : ARRAY[0..15] OF CHAR;
  2212. ***** ^ not supported yet
  2213. ***** ^ not supported yet
  2214. 894 B : BOOLEAN;
  2215. 895 J : CARDINAL;
  2216. 896 Code,Size : CARDINAL;
  2217. 897 TotalDue : Real8;
  2218. 898 P :POINTER TO FInvoice;
  2219. ***** ^ undeclared identifier
  2220. 899 Title1 : ARRAY[0..80] OF CHAR;
  2221. ***** ^ not supported yet
  2222. ***** ^ not supported yet
  2223. 900 Handle : CARDINAL;
  2224. 901 BEGIN
  2225. 902 OpenInvoiceDBF(TRUE);
  2226. ***** ^ not supported yet
  2227. ***** ^ not supported yet
  2228. 903 GetCustNbr(CustID); (* get all of the printed ones *)
  2229. ***** ^ not supported yet
  2230. ***** ^ not supported yet
  2231. 904 NilList(PrnList);
  2232. ***** ^ not supported yet
  2233. ***** ^ not supported yet
  2234. 905 FindAll(CustidIdx,CustID,BeginsWith,PrnList);
  2235. ***** ^ not supported yet
  2236. ***** ^ not supported yet
  2237. ***** ^ not supported yet
  2238. ***** ^ undeclared identifier
  2239. ***** ^ not supported yet
  2240. 906 ReadAllRecs(InvoiceDBF,ReadAnInvoice,PrnList);
  2241. ***** ^ not supported yet
  2242. ***** ^ not supported yet
  2243. ***** ^ not supported yet
  2244. ***** ^ not supported yet
  2245. 907 IF ListLength(PrnList) = 0
  2246. ***** ^ not supported yet
  2247. ***** ^ not supported yet
  2248. 908 THEN Prompt('No invoice History');
  2249. ***** ^ not supported yet
  2250. ***** ^ not supported yet
  2251. 909 DisposeList(PrnList);
  2252. ***** ^ not supported yet
  2253. ***** ^ not supported yet
  2254. 910 RETURN;
  2255. 911 END;
  2256. 912 DisplayInvList(PrnList);
  2257. ***** ^ not supported yet
  2258. ***** ^ not supported yet
  2259. 913 Control(SummaryDF);
  2260. ***** ^ not supported yet
  2261. ***** ^ undeclared identifier
  2262. 914 IF PromptYN(' Print the report ',SummaryDF)
  2263. ***** ^ not supported yet
  2264. ***** ^ not supported yet
  2265. ***** ^ undeclared identifier
  2266. 915 THEN
  2267. 916 GetCurrCustName(Title1);
  2268. ***** ^ not supported yet
  2269. ***** ^ not supported yet
  2270. 917 Append(Title1,' - Invoice History ');
  2271. ***** ^ not supported yet
  2272. ***** ^ not supported yet
  2273. ***** ^ not supported yet
  2274. 918 Handle := OpenReportDevice();
  2275. ***** ^ not supported yet
  2276. ***** ^ not supported yet
  2277. 919 NormalTitle(Title1);
  2278. ***** ^ not supported yet
  2279. ***** ^ not supported yet
  2280. 920 PrintFrame(SummaryDF,Handle);
  2281. ***** ^ not supported yet
  2282. ***** ^ undeclared identifier
  2283. ***** ^ not supported yet
  2284. 921 CloseReportDevice(Handle);
  2285. ***** ^ not supported yet
  2286. ***** ^ not supported yet
  2287. 922 END;
  2288. 923
  2289. 924 DisposeList(PrnList);
  2290. ***** ^ not supported yet
  2291. ***** ^ not supported yet
  2292. 925 CloseInvoiceDBF();
  2293. ***** ^ not supported yet
  2294. ***** ^ not supported yet
  2295. 926 END InvoiceHistory;
  2296. ***** ^ not supported yet
  2297. 927
  2298. 928
  2299. 929 PROCEDURE DeleteInvItems(InvNbr : ARRAY OF CHAR);
  2300. ***** ^ not supported yet
  2301. 930 VAR TheList : GenList;
  2302. 931 BEGIN
  2303. 932
  2304. 933 CrunchBlanks(InvNbr);
  2305. ***** ^ not supported yet
  2306. ***** ^ not supported yet
  2307. 934 NilList(TheList);
  2308. ***** ^ not supported yet
  2309. ***** ^ not supported yet
  2310. 935 FindAll(InvnbrIdx,InvNbr,EQ,TheList); (* get old invoices *)
  2311. ***** ^ not supported yet
  2312. ***** ^ not supported yet
  2313. ***** ^ not supported yet
  2314. ***** ^ undeclared identifier
  2315. ***** ^ not supported yet
  2316. 936 IF ListLength(TheList) > 0 (* some invoice have zero items from conversion*)
  2317. ***** ^ not supported yet
  2318. ***** ^ not supported yet
  2319. 937 THEN
  2320. 938 DeleteAllRecs(OrderDBF,TheList);
  2321. ***** ^ not supported yet
  2322. ***** ^ not supported yet
  2323. ***** ^ not supported yet
  2324. 939 END;
  2325. 940 DisposeList(TheList);
  2326. ***** ^ not supported yet
  2327. ***** ^ not supported yet
  2328. 941 END DeleteInvItems;
  2329. ***** ^ not supported yet
  2330. 942
  2331. 943 PROCEDURE InvoiceDaysLate(InvAddr : ADDRESS) : CARDINAL;
  2332. 944 (* return the nubmer of days late for an invoice*)
  2333. 945 VAR
  2334. 946 TodaysDays,
  2335. 947 InvoiceDays :CARDINAL;
  2336. 948 InvPoint : POINTER TO FInvoice;
  2337. ***** ^ undeclared identifier
  2338. 949 BEGIN
  2339. 950 InvPoint := InvAddr;
  2340. ***** ^ not supported yet
  2341. ***** ^ not supported yet
  2342. 951 InvoiceDays := DaysSince1900(InvPoint^.Invoice.INVDATE);
  2343. ***** ^ not supported yet
  2344. ***** ^ not supported yet
  2345. ***** ^ not supported yet
  2346. ***** ^ not supported yet
  2347. 952 RETURN (InvoiceDays - TodaysDays);
  2348. 953 END InvoiceDaysLate;
  2349. ***** ^ not supported yet
  2350. 954
  2351. 955
  2352. 956 PROCEDURE GetOutstanding(CustID : ARRAY OF CHAR; VAR TheList:GenList);
  2353. ***** ^ not supported yet
  2354. 957 BEGIN
  2355. 958 (* assumes the database is open *)
  2356. 959 Append(CustID,'P');
  2357. ***** ^ not supported yet
  2358. ***** ^ not supported yet
  2359. ***** ^ not supported yet
  2360. 960 NilList(TheList);
  2361. ***** ^ not supported yet
  2362. ***** ^ not supported yet
  2363. 961 FindAll(CustidIdx,CustID,EQ,TheList);
  2364. ***** ^ not supported yet
  2365. ***** ^ not supported yet
  2366. ***** ^ not supported yet
  2367. ***** ^ undeclared identifier
  2368. ***** ^ not supported yet
  2369. 962 ReadAllRecs(InvoiceDBF,ReadAnInvoice,TheList);
  2370. ***** ^ not supported yet
  2371. ***** ^ not supported yet
  2372. ***** ^ not supported yet
  2373. ***** ^ not supported yet
  2374. 963
  2375. 964 END GetOutstanding;
  2376. ***** ^ not supported yet
  2377. 965
  2378. 966
  2379. 967 PROCEDURE PayInvoice();
  2380. 968 VAR
  2381. 969 PrnList : GenList;
  2382. 970 CustID : ARRAY[0..15] OF CHAR;
  2383. ***** ^ not supported yet
  2384. ***** ^ not supported yet
  2385. 971 PymtDF : DisplayFrame;
  2386. 972 ManualPay : BOOLEAN;
  2387. 973 FldRec : InputFieldRecord;
  2388. 974 PymtAmount : Real8;
  2389. 975 Remaining : Real8;
  2390. 976 B : BOOLEAN;
  2391. 977 CheckNbr : ARRAY[0..10] OF CHAR;
  2392. ***** ^ not supported yet
  2393. ***** ^ not supported yet
  2394. 978 PymtDate : Date;
  2395. 979 J : CARDINAL;
  2396. 980 Code,Size : CARDINAL;
  2397. 981 TotalDue : Real8;
  2398. 982 P :POINTER TO FInvoice;
  2399. ***** ^ undeclared identifier
  2400. 983 BEGIN
  2401. 984 OpenInvoiceDBF(TRUE);
  2402. ***** ^ not supported yet
  2403. ***** ^ not supported yet
  2404. 985 GetCustNbr(CustID); (* get all of the printed ones *)
  2405. ***** ^ not supported yet
  2406. ***** ^ not supported yet
  2407. 986 Append(CustID,'P');
  2408. ***** ^ not supported yet
  2409. ***** ^ not supported yet
  2410. ***** ^ not supported yet
  2411. 987 NilList(PrnList);
  2412. ***** ^ not supported yet
  2413. ***** ^ not supported yet
  2414. 988 FindAll(CustidIdx,CustID,EQ,PrnList);
  2415. ***** ^ not supported yet
  2416. ***** ^ not supported yet
  2417. ***** ^ not supported yet
  2418. ***** ^ undeclared identifier
  2419. ***** ^ not supported yet
  2420. 989 ReadAllRecs(InvoiceDBF,ReadAnInvoice,PrnList);
  2421. ***** ^ not supported yet
  2422. ***** ^ not supported yet
  2423. ***** ^ not supported yet
  2424. ***** ^ not supported yet
  2425. 990 IF ListLength(PrnList) = 0
  2426. ***** ^ not supported yet
  2427. ***** ^ not supported yet
  2428. 991 THEN Prompt('No outstanding invoices');
  2429. ***** ^ not supported yet
  2430. ***** ^ not supported yet
  2431. 992 DisposeList(PrnList);
  2432. ***** ^ not supported yet
  2433. ***** ^ not supported yet
  2434. 993 RETURN;
  2435. 994 END;
  2436. 995 TotalDue := 0.0;
  2437. ***** ^ not supported yet
  2438. 996 FOR J := 1 TO ListLength(PrnList) DO (* zip through and get total out*)
  2439. ***** ^ not supported yet
  2440. ***** ^ not supported yet
  2441. 997 GetElmtAdr(PrnList,J,P,Code,Size);
  2442. ***** ^ not supported yet
  2443. ***** ^ not supported yet
  2444. ***** ^ not supported yet
  2445. ***** ^ not supported yet
  2446. 998 TotalDue := TotalDue + P^.Invoice.AMTOUT;
  2447. ***** ^ not supported yet
  2448. ***** ^ not supported yet
  2449. ***** ^ not supported yet
  2450. ***** ^ not supported yet
  2451. ***** ^ not supported yet
  2452. 999 END;
  2453. 1000
  2454. 1001 InitDisplayFrame(PymtDF,CurrentWindow);
  2455. ***** ^ not supported yet
  2456. ***** ^ not supported yet
  2457. ***** ^ not supported yet
  2458. 1002 ReadDisplayFrame(PMIScreens,PymtDF,'Pymts');
  2459. ***** ^ not supported yet
  2460. ***** ^ not supported yet
  2461. ***** ^ not supported yet
  2462. ***** ^ not supported yet
  2463. 1003 GetFieldRec(PymtDF,FieldNum(PymtDF,'PymtAmt'),FldRec); (* make max amout*)
  2464. ***** ^ not supported yet
  2465. ***** ^ not supported yet
  2466. ***** ^ not supported yet
  2467. ***** ^ not supported yet
  2468. ***** ^ not supported yet
  2469. ***** ^ not supported yet
  2470. 1004 FldRec.rMax := TotalDue;
  2471. ***** ^ not supported yet
  2472. ***** ^ not supported yet
  2473. ***** ^ not supported yet
  2474. 1005 FldRec.decimalPlace := 2;
  2475. ***** ^ not supported yet
  2476. ***** ^ not supported yet
  2477. 1006 PutFieldRec(FldRec,PymtDF,FieldNum(PymtDF,'PymtAmt'));
  2478. ***** ^ not supported yet
  2479. ***** ^ not supported yet
  2480. ***** ^ not supported yet
  2481. ***** ^ not supported yet
  2482. ***** ^ not supported yet
  2483. ***** ^ not supported yet
  2484. 1007 SetCustOutStd(TotalDue);
  2485. ***** ^ not supported yet
  2486. ***** ^ not supported yet
  2487. 1008 ChangeField(PymtDF,TodayStr,'PymtDate',TRUE);
  2488. ***** ^ not supported yet
  2489. ***** ^ not supported yet
  2490. ***** ^ not supported yet
  2491. ***** ^ not supported yet
  2492. ***** ^ not supported yet
  2493. 1009
  2494. 1010 ShowDisplayFrame(PymtDF,0,0,0,0);
  2495. ***** ^ not supported yet
  2496. ***** ^ not supported yet
  2497. ***** ^ not supported yet
  2498. 1011 DisplayInvList(PrnList);
  2499. ***** ^ not supported yet
  2500. ***** ^ not supported yet
  2501. 1012 Control(PymtDF);
  2502. ***** ^ not supported yet
  2503. ***** ^ not supported yet
  2504. 1013 (* if the user selected manual payments *)
  2505. 1014 (* then select which invoice to pay *)
  2506. 1015 (* otherwise select invoices until payments *)
  2507. 1016 (* reach zero *)
  2508. 1017
  2509. 1018 ReadInput(PymtDF,CheckNbr,'ChkNumber');
  2510. ***** ^ not supported yet
  2511. ***** ^ not supported yet
  2512. ***** ^ not supported yet
  2513. ***** ^ not supported yet
  2514. 1019 ReadRealField(PymtDF,PymtAmount,'PymtAmt');
  2515. ***** ^ not supported yet
  2516. ***** ^ not supported yet
  2517. ***** ^ not supported yet
  2518. ***** ^ not supported yet
  2519. 1020 ReadDateField(PymtDF,PymtDate,'PymtDate');
  2520. ***** ^ not supported yet
  2521. ***** ^ not supported yet
  2522. ***** ^ not supported yet
  2523. ***** ^ not supported yet
  2524. 1021 GetFieldRec(PymtDF,FieldNum(PymtDF,'Manual'),FldRec);
  2525. ***** ^ not supported yet
  2526. ***** ^ not supported yet
  2527. ***** ^ not supported yet
  2528. ***** ^ not supported yet
  2529. ***** ^ not supported yet
  2530. ***** ^ not supported yet
  2531. 1022 SetCustOutStd(TotalDue-PymtAmount);
  2532. ***** ^ not supported yet
  2533. ***** ^ not supported yet
  2534. ***** ^ not supported yet
  2535. 1023 OpenPaymentsDBF(TRUE);
  2536. ***** ^ not supported yet
  2537. ***** ^ not supported yet
  2538. 1024 OpenOrderDBF(TRUE);
  2539. ***** ^ not supported yet
  2540. ***** ^ not supported yet
  2541. 1025 REPEAT (* loop through here until the full payment is used *)
  2542. 1026 (* can not enter a payment greater than total due *)
  2543. 1027
  2544. 1028 IF FldRec.selected (* manual invoice entry *)
  2545. ***** ^ not supported yet
  2546. ***** ^ not supported yet
  2547. 1029 THEN
  2548. 1030 SelectInvoiceFromList(PrnList,FALSE); (* take selected *)
  2549. ***** ^ not supported yet
  2550. ***** ^ not supported yet
  2551. ***** ^ not supported yet
  2552. 1031 IF CurrentInvoice.INVOICE[0] = 0C (* nothing selected *)
  2553. ***** ^ undeclared identifier
  2554. ***** ^ not supported yet
  2555. ***** ^ not supported yet
  2556. 1032 THEN
  2557. 1033 GetElmtAdr(PrnList,1,P,Size,Code); (* or take the first *)
  2558. ***** ^ not supported yet
  2559. ***** ^ not supported yet
  2560. ***** ^ not supported yet
  2561. ***** ^ not supported yet
  2562. 1034 CurrentInvoice := P^.Invoice;
  2563. ***** ^ undeclared identifier
  2564. ***** ^ not supported yet
  2565. ***** ^ not supported yet
  2566. 1035 ReadDBRec(InvoiceDBF,P^.LI); (* set the file to correct invoice*)
  2567. ***** ^ not supported yet
  2568. ***** ^ not supported yet
  2569. ***** ^ not supported yet
  2570. ***** ^ not supported yet
  2571. 1036 PymtAmount := 0.0;
  2572. ***** ^ not supported yet
  2573. 1037
  2574. 1038 END;
  2575. 1039 ELSE
  2576. 1040 GetElmtAdr(PrnList,1,P,Size,Code); (* or take the first *)
  2577. ***** ^ not supported yet
  2578. ***** ^ not supported yet
  2579. ***** ^ not supported yet
  2580. ***** ^ not supported yet
  2581. 1041 CurrentInvoice := P^.Invoice;
  2582. ***** ^ undeclared identifier
  2583. ***** ^ not supported yet
  2584. ***** ^ not supported yet
  2585. 1042 ReadDBRec(InvoiceDBF,P^.LI); (* set the file to correct invoice*)
  2586. ***** ^ not supported yet
  2587. ***** ^ not supported yet
  2588. ***** ^ not supported yet
  2589. ***** ^ not supported yet
  2590. 1043 END;
  2591. 1044 ListDelete(PrnList,ElmtNow(PrnList),1);(* delete the chosen invoice from the list *)
  2592. ***** ^ not supported yet
  2593. ***** ^ not supported yet
  2594. ***** ^ not supported yet
  2595. ***** ^ not supported yet
  2596. ***** ^ not supported yet
  2597. 1045 Remaining := PymtAmount - CurrentInvoice.AMTOUT;
  2598. ***** ^ not supported yet
  2599. ***** ^ not supported yet
  2600. ***** ^ undeclared identifier
  2601. ***** ^ not supported yet
  2602. 1046
  2603. 1047
  2604. 1048 IF PymtAmount >= CurrentInvoice.AMTOUT
  2605. ***** ^ not supported yet
  2606. ***** ^ undeclared identifier
  2607. ***** ^ not supported yet
  2608. 1049 THEN
  2609. 1050 MakePayment(CurrentInvoice.INVOICE,PymtDate,CurrentInvoice.AMTOUT,
  2610. ***** ^ not supported yet
  2611. ***** ^ undeclared identifier
  2612. ***** ^ not supported yet
  2613. ***** ^ not supported yet
  2614. ***** ^ undeclared identifier
  2615. ***** ^ not supported yet
  2616. 1051 CheckNbr,CurrentInvoice.CUSTID);
  2617. ***** ^ not supported yet
  2618. ***** ^ undeclared identifier
  2619. ***** ^ not supported yet
  2620. 1052 CurrentInvoice.AMTOUT := 0.0; (* pay in full *)
  2621. ***** ^ undeclared identifier
  2622. ***** ^ not supported yet
  2623. 1053 CurrentInvoice.INVPRNT := 'C'; (* closed *)
  2624. ***** ^ undeclared identifier
  2625. ***** ^ not supported yet
  2626. 1054 PostSales(CurrentInvoice.INVOICE);
  2627. ***** ^ not supported yet
  2628. ***** ^ undeclared identifier
  2629. ***** ^ not supported yet
  2630. 1055 DeleteInvItems(CurrentInvoice.INVOICE);
  2631. ***** ^ not supported yet
  2632. ***** ^ undeclared identifier
  2633. ***** ^ not supported yet
  2634. 1056 ELSE
  2635. 1057 MakePayment(CurrentInvoice.INVOICE,PymtDate,PymtAmount,
  2636. ***** ^ not supported yet
  2637. ***** ^ undeclared identifier
  2638. ***** ^ not supported yet
  2639. ***** ^ not supported yet
  2640. ***** ^ not supported yet
  2641. 1058 CheckNbr,CurrentInvoice.CUSTID);
  2642. ***** ^ not supported yet
  2643. ***** ^ undeclared identifier
  2644. ***** ^ not supported yet
  2645. 1059 CurrentInvoice.AMTOUT := CurrentInvoice.AMTOUT - PymtAmount;
  2646. ***** ^ undeclared identifier
  2647. ***** ^ not supported yet
  2648. ***** ^ undeclared identifier
  2649. ***** ^ not supported yet
  2650. ***** ^ not supported yet
  2651. 1060 IF CurrentInvoice.AMTOUT < 0.01 (* rounding remainder *)
  2652. ***** ^ undeclared identifier
  2653. ***** ^ not supported yet
  2654. 1061 THEN
  2655. 1062 CurrentInvoice.AMTOUT := 0.0;
  2656. ***** ^ undeclared identifier
  2657. ***** ^ not supported yet
  2658. 1063 CurrentInvoice.INVPRNT := 'C'; (* close *)
  2659. ***** ^ undeclared identifier
  2660. ***** ^ not supported yet
  2661. 1064 PostSales(CurrentInvoice.INVOICE);
  2662. ***** ^ not supported yet
  2663. ***** ^ undeclared identifier
  2664. ***** ^ not supported yet
  2665. 1065 DeleteInvItems(CurrentInvoice.INVOICE);
  2666. ***** ^ not supported yet
  2667. ***** ^ undeclared identifier
  2668. ***** ^ not supported yet
  2669. 1066 END;
  2670. 1067 END;
  2671. 1068 MoveInvoiceToDBF(CurrentInvoice);
  2672. ***** ^ not supported yet
  2673. ***** ^ undeclared identifier
  2674. 1069 WriteDBRec(InvoiceDBF);
  2675. ***** ^ not supported yet
  2676. ***** ^ not supported yet
  2677. 1070 IF FldRec.selected AND (Remaining > 0.01) (* manual invoice entry *)
  2678. ***** ^ not supported yet
  2679. ***** ^ not supported yet
  2680. ***** ^ not supported yet
  2681. 1071 THEN
  2682. 1072 DisplayInvList(PrnList); (* display remaining invoice *)
  2683. ***** ^ not supported yet
  2684. ***** ^ not supported yet
  2685. 1073 END;
  2686. 1074 PymtAmount := Remaining;
  2687. ***** ^ not supported yet
  2688. ***** ^ not supported yet
  2689. 1075 UNTIL (PymtAmount < 0.01); (* go through until out of money *)
  2690. ***** ^ not supported yet
  2691. 1076 CloseDisplayFrame(PymtDF);
  2692. ***** ^ not supported yet
  2693. ***** ^ not supported yet
  2694. 1077 ClosePaymentsDBF();
  2695. ***** ^ not supported yet
  2696. ***** ^ not supported yet
  2697. 1078 CloseOrderDBF();
  2698. ***** ^ not supported yet
  2699. ***** ^ not supported yet
  2700. 1079 IF NOT FldRec.selected
  2701. ***** ^ not supported yet
  2702. ***** ^ not supported yet
  2703. 1080 THEN (* remove for automatic payments *)
  2704. 1081 CloseDisplayFrame(SummaryDF);
  2705. ***** ^ not supported yet
  2706. ***** ^ undeclared identifier
  2707. 1082 END;
  2708. 1083 DisposeList(PrnList);
  2709. ***** ^ not supported yet
  2710. ***** ^ not supported yet
  2711. 1084 CloseInvoiceDBF();
  2712. ***** ^ not supported yet
  2713. ***** ^ not supported yet
  2714. 1085 END PayInvoice;
  2715. ***** ^ not supported yet
  2716. 1086
  2717. 1087 PROCEDURE CancelInvoice();
  2718. 1088 VAR
  2719. 1089 CustID : ARRAY[0..10] OF CHAR;
  2720. ***** ^ not supported yet
  2721. ***** ^ not supported yet
  2722. 1090 TheList : GenList;
  2723. 1091 J : CARDINAL;
  2724. 1092 Size,Code : CARDINAL;
  2725. 1093 BEGIN
  2726. 1094 FOR J := 1 TO ListLength(OrderItemLst) DO
  2727. ***** ^ not supported yet
  2728. ***** ^ undeclared identifier
  2729. 1095 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code);
  2730. ***** ^ not supported yet
  2731. ***** ^ undeclared identifier
  2732. ***** ^ undeclared identifier
  2733. ***** ^ not supported yet
  2734. 1096 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR)
  2735. ***** ^ not supported yet
  2736. ***** ^ undeclared identifier
  2737. ***** ^ not supported yet
  2738. ***** ^ not supported yet
  2739. 1097 THEN
  2740. 1098 CurrentItem^.InventoryItem.ONHAND :=
  2741. ***** ^ undeclared identifier
  2742. ***** ^ not supported yet
  2743. ***** ^ not supported yet
  2744. 1099 CurrentItem^.InventoryItem.ONHAND+CurrentItem^.ItemOrderRec.QNTSOLD;
  2745. ***** ^ undeclared identifier
  2746. ***** ^ not supported yet
  2747. ***** ^ not supported yet
  2748. ***** ^ undeclared identifier
  2749. ***** ^ not supported yet
  2750. ***** ^ not supported yet
  2751. 1100 CurrentItem^.ItemOrderRec.QNTSOLD := 0.0;
  2752. ***** ^ undeclared identifier
  2753. ***** ^ not supported yet
  2754. ***** ^ not supported yet
  2755. 1101 UpdateInventory();
  2756. ***** ^ not supported yet
  2757. ***** ^ not supported yet
  2758. 1102 END;
  2759. 1103 END;
  2760. 1104 DeleteGasFromInv(CurrentInvoice.INVOICE);
  2761. ***** ^ not supported yet
  2762. ***** ^ undeclared identifier
  2763. ***** ^ not supported yet
  2764. 1105 DeleteInvItems(CurrentInvoice.INVOICE);
  2765. ***** ^ not supported yet
  2766. ***** ^ undeclared identifier
  2767. ***** ^ not supported yet
  2768. 1106 CurrentInvoice.INVPRNT := 'X';
  2769. ***** ^ undeclared identifier
  2770. ***** ^ not supported yet
  2771. 1107 HeaderChanged := TRUE;
  2772. ***** ^ undeclared identifier
  2773. 1108 END CancelInvoice;
  2774. ***** ^ not supported yet
  2775. 1109
  2776. 1110
  2777. 1111
  2778. 1112 PROCEDURE SaveInvoice();
  2779. 1113 (* save the invoice header - replace if one is already there*)
  2780. 1114 VAR
  2781. 1115
  2782. 1116 BEGIN
  2783. 1117 IF NOT HeaderChanged
  2784. ***** ^ undeclared identifier
  2785. 1118 THEN RETURN;
  2786. 1119 END;
  2787. 1120 IF NOT FindInvoiceByInvoice(CurrentInvoice.INVOICE)
  2788. ***** ^ not supported yet
  2789. ***** ^ undeclared identifier
  2790. ***** ^ not supported yet
  2791. 1121 THEN
  2792. 1122 AppendBlank(InvoiceDBF);
  2793. ***** ^ not supported yet
  2794. ***** ^ not supported yet
  2795. 1123 END;
  2796. 1124 MoveInvoiceToDBF(CurrentInvoice);
  2797. ***** ^ not supported yet
  2798. ***** ^ undeclared identifier
  2799. 1125 WriteDBRec(InvoiceDBF);
  2800. ***** ^ not supported yet
  2801. ***** ^ not supported yet
  2802. 1126 END SaveInvoice;
  2803. ***** ^ not supported yet
  2804. 1127
  2805. 1128
  2806. 1129
  2807. 1130 PROCEDURE SaveItems();
  2808. 1131 (* go through the items list and save the items
  2809. 1132 Then go through the inventory list and update the
  2810. 1133 inventory records
  2811. 1134 *)
  2812. 1135 VAR
  2813. 1136 OldList : GenList;
  2814. 1137 TmpItem : OrderRec;
  2815. 1138 Code: CARDINAL;
  2816. 1139 L : LONGINT;
  2817. 1140 J, Size,LL : CARDINAL;
  2818. 1141 K : CARDINAL;
  2819. 1142 Inv : InvtryRec;
  2820. 1143 BEGIN
  2821. 1144 IF NOT ItemsChanged (* if nothing changed - dont resave the items*)
  2822. 1145 THEN
  2823. 1146 DisposeList(OrderItemLst);
  2824. ***** ^ not supported yet
  2825. ***** ^ undeclared identifier
  2826. 1147 RETURN;
  2827. 1148 END;
  2828. 1149
  2829. 1150 NewList(OldList); (* first delete any existing entries *)
  2830. ***** ^ not supported yet
  2831. ***** ^ not supported yet
  2832. 1151
  2833. 1152 (* find the position of the inventory item id in the record *)
  2834. 1153 (* so I can adjust the inventory amount by the deleted record *)
  2835. 1154 (* must do this in the case of the update changing the quanity *)
  2836. 1155 DeleteInvItems(CurrentInvoice.INVOICE);
  2837. ***** ^ not supported yet
  2838. ***** ^ undeclared identifier
  2839. ***** ^ not supported yet
  2840. 1156
  2841. 1157 (* now update with the new entries *)
  2842. 1158
  2843. 1159
  2844. 1160 LL := ListLength(OrderItemLst);
  2845. ***** ^ not supported yet
  2846. ***** ^ undeclared identifier
  2847. 1161 FOR J := 1 TO LL DO
  2848. 1162 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code);
  2849. ***** ^ not supported yet
  2850. ***** ^ undeclared identifier
  2851. ***** ^ undeclared identifier
  2852. ***** ^ not supported yet
  2853. 1163 AppendBlank(OrderDBF);
  2854. ***** ^ not supported yet
  2855. ***** ^ not supported yet
  2856. 1164 MoveOrderToDBF(CurrentItem^.ItemOrderRec);
  2857. ***** ^ not supported yet
  2858. ***** ^ undeclared identifier
  2859. ***** ^ not supported yet
  2860. 1165 WriteDBRec(OrderDBF);
  2861. ***** ^ not supported yet
  2862. ***** ^ not supported yet
  2863. 1166
  2864. 1167
  2865. 1168 END;
  2866. 1169 END SaveItems;
  2867. ***** ^ not supported yet
  2868. 1170
  2869. 1171
  2870. 1172
  2871. 1173
  2872. 1174
  2873. 1175
  2874. 1176
  2875. 1177 PROCEDURE AddInvoice();
  2876. 1178 VAR
  2877. 1179 Weekday,mmddyy : ARRAY[0..15] OF CHAR;
  2878. ***** ^ not supported yet
  2879. ***** ^ not supported yet
  2880. 1180 BEGIN
  2881. 1181 CurrInvOldAmt := 0.0;
  2882. ***** ^ undeclared identifier
  2883. 1182 Fill(ADR(CurrentInvoice),SIZE(CurrentInvoice),0);
  2884. ***** ^ not supported yet
  2885. ***** ^ not supported yet
  2886. ***** ^ undeclared identifier
  2887. ***** ^ not supported yet
  2888. ***** ^ undeclared identifier
  2889. ***** ^ not supported yet
  2890. 1183 GetCustNbr(CurrentInvoice.CUSTID);
  2891. ***** ^ not supported yet
  2892. ***** ^ undeclared identifier
  2893. ***** ^ not supported yet
  2894. 1184 GetCustSalesRep(CurrentInvoice.SALESMAN);
  2895. ***** ^ not supported yet
  2896. ***** ^ undeclared identifier
  2897. ***** ^ not supported yet
  2898. 1185 GetCustTerms(CurrentInvoice.TERMS);
  2899. ***** ^ not supported yet
  2900. ***** ^ undeclared identifier
  2901. ***** ^ not supported yet
  2902. 1186 GetCustShipVia(CurrentInvoice.SHIPVIA);
  2903. ***** ^ not supported yet
  2904. ***** ^ undeclared identifier
  2905. ***** ^ not supported yet
  2906. 1187 GetCustDisCntLvl(CurrentInvoice.DFLTLVL);
  2907. ***** ^ not supported yet
  2908. ***** ^ undeclared identifier
  2909. ***** ^ not supported yet
  2910. 1188 GetCustTaxable(CurrentInvoice.TAXABLE);
  2911. ***** ^ not supported yet
  2912. ***** ^ undeclared identifier
  2913. ***** ^ not supported yet
  2914. 1189 GetCustFreeFrght(CurrentInvoice.FREEFRGHT);
  2915. ***** ^ not supported yet
  2916. ***** ^ undeclared identifier
  2917. ***** ^ not supported yet
  2918. 1190 IF CurrentInvoice.DFLTLVL < 0
  2919. ***** ^ undeclared identifier
  2920. ***** ^ not supported yet
  2921. 1191 THEN CurrentInvoice.DFLTLVL := 1
  2922. ***** ^ undeclared identifier
  2923. ***** ^ not supported yet
  2924. 1192 ELSIF CurrentInvoice.DFLTLVL > 3
  2925. ***** ^ undeclared identifier
  2926. ***** ^ not supported yet
  2927. 1193 THEN CurrentInvoice.DFLTLVL := 3;
  2928. ***** ^ undeclared identifier
  2929. ***** ^ not supported yet
  2930. 1194 END;
  2931. 1195 GetCustDisAmount(CurrentInvoice.INVDSCNT);
  2932. ***** ^ not supported yet
  2933. ***** ^ undeclared identifier
  2934. ***** ^ not supported yet
  2935. 1196 MakeSeqNbr('Invoice',Config.InvoicePre,CurrentInvoice.INVOICE);
  2936. ***** ^ not supported yet
  2937. ***** ^ not supported yet
  2938. ***** ^ not supported yet
  2939. ***** ^ not supported yet
  2940. ***** ^ undeclared identifier
  2941. ***** ^ not supported yet
  2942. 1197 CrunchBlanks(CurrentInvoice.INVOICE);
  2943. ***** ^ not supported yet
  2944. ***** ^ undeclared identifier
  2945. ***** ^ not supported yet
  2946. 1198 CurrentInvoice.INVDATE := Today;
  2947. ***** ^ undeclared identifier
  2948. ***** ^ not supported yet
  2949. ***** ^ not supported yet
  2950. 1199 CurrentInvoice.INVPRNT := 'O'; (* invoice opened *)
  2951. ***** ^ undeclared identifier
  2952. ***** ^ not supported yet
  2953. 1200 NewList(OrderItemLst);
  2954. ***** ^ not supported yet
  2955. ***** ^ undeclared identifier
  2956. 1201 UpdateInvHeader();
  2957. ***** ^ not supported yet
  2958. ***** ^ not supported yet
  2959. 1202 HeaderChanged := TRUE;
  2960. ***** ^ undeclared identifier
  2961. 1203 AddItems(CurrentInvoice); (* get inventory items *)
  2962. ***** ^ not supported yet
  2963. ***** ^ undeclared identifier
  2964. 1204
  2965. 1205 END AddInvoice;
  2966. ***** ^ not supported yet
  2967. 1206
  2968. 1207
  2969. 1208
  2970. 1209 PROCEDURE ControlInvoice( CtlType : CHAR);
  2971. 1210 VAR InvNbr : ARRAY[0..10] OF CHAR;
  2972. ***** ^ not supported yet
  2973. ***** ^ not supported yet
  2974. 1211 FldNum : CARDINAL;
  2975. 1212 FldRec : InputFieldRecord;
  2976. 1213 CtrlInv : BOOLEAN;
  2977. 1214 Size, Code : CARDINAL;
  2978. 1215 BEGIN
  2979. 1216 CtrlInv := TRUE;
  2980. 1217 HeaderChanged := FALSE;
  2981. ***** ^ undeclared identifier
  2982. 1218 ItemsChanged := FALSE;
  2983. 1219 NewList(OrderItemLst);
  2984. ***** ^ not supported yet
  2985. ***** ^ undeclared identifier
  2986. 1220 InitDisplayFrame(InvoiceHeadDF,CurrentWindow);
  2987. ***** ^ not supported yet
  2988. ***** ^ undeclared identifier
  2989. ***** ^ not supported yet
  2990. 1221 ReadDisplayFrame(PMIScreens,InvoiceHeadDF,'InvHeader');
  2991. ***** ^ not supported yet
  2992. ***** ^ not supported yet
  2993. ***** ^ undeclared identifier
  2994. ***** ^ not supported yet
  2995. 1222 OpenOrderDBF(TRUE);
  2996. ***** ^ not supported yet
  2997. ***** ^ not supported yet
  2998. 1223 OpenInvoiceDBF(TRUE);
  2999. ***** ^ not supported yet
  3000. ***** ^ not supported yet
  3001. 1224 IF (CtlType # 'N')
  3002. 1225 THEN SelectInvoice(); (* always select one if not new *)
  3003. ***** ^ not supported yet
  3004. ***** ^ not supported yet
  3005. 1226 IF CurrentInvoice.INVOICE[0] = 0C
  3006. ***** ^ undeclared identifier
  3007. ***** ^ not supported yet
  3008. ***** ^ not supported yet
  3009. 1227 THEN RETURN (* no open invoice *)
  3010. 1228 END;
  3011. 1229 ELSE AddInvoice();
  3012. ***** ^ not supported yet
  3013. ***** ^ not supported yet
  3014. 1230 END;
  3015. 1231 IF (CtlType = 'C')
  3016. 1232 THEN CancelInvoice();
  3017. ***** ^ not supported yet
  3018. ***** ^ not supported yet
  3019. 1233 CtrlInv := FALSE;
  3020. 1234 END;
  3021. 1235 (* CASE CtlType OF
  3022. 1236 |'P' : PrintPkg( InvNbr);
  3023. 1237 |'I' : PrintInv(InvNbr);
  3024. 1238 |'C' : CancellInv(InvNbr);
  3025. 1239
  3026. 1240 END; *)
  3027. 1241 IF CtrlInv
  3028. 1242 THEN
  3029. 1243 NewList(PullDnMenu);
  3030. ***** ^ not supported yet
  3031. ***** ^ not supported yet
  3032. 1244 LoadFrameList(PMIScreens,'InvoiceMain',PullDnMenu);
  3033. ***** ^ not supported yet
  3034. ***** ^ not supported yet
  3035. ***** ^ not supported yet
  3036. ***** ^ not supported yet
  3037. 1245 REPEAT
  3038. 1246 NextFrame := 'InvoiceMain';
  3039. ***** ^ not supported yet
  3040. ***** ^ not supported yet
  3041. 1247 ControlSeparately(PullDnMenu,NextFrame,SelChar,EndingFrame);
  3042. ***** ^ not supported yet
  3043. ***** ^ not supported yet
  3044. ***** ^ not supported yet
  3045. ***** ^ not supported yet
  3046. 1248
  3047. 1249 CASE SelChar OF
  3048. 1250 'H' : ShowDisplayFrame(InvoiceHeadDF,0,0,0,0); (* show bottom part *)
  3049. ***** ^ not supported yet
  3050. ***** ^ undeclared identifier
  3051. ***** ^ not supported yet
  3052. 1251 Control(InvoiceHeadDF); (* edit header *)
  3053. ***** ^ not supported yet
  3054. ***** ^ undeclared identifier
  3055. 1252 ReadHeader();
  3056. ***** ^ not supported yet
  3057. ***** ^ not supported yet
  3058. 1253 Recompute();
  3059. ***** ^ not supported yet
  3060. ***** ^ not supported yet
  3061. 1254 UpdateInvHeader();
  3062. ***** ^ not supported yet
  3063. ***** ^ not supported yet
  3064. 1255 ShowDisplayFrame(SummaryDF,0,0,0,0);
  3065. ***** ^ not supported yet
  3066. ***** ^ undeclared identifier
  3067. ***** ^ not supported yet
  3068. 1256 |'E' : SelectFromSummary();
  3069. ***** ^ not supported yet
  3070. ***** ^ not supported yet
  3071. 1257 InitDisplayFrame(OrderItemDF,CurrentWindow);
  3072. ***** ^ not supported yet
  3073. ***** ^ undeclared identifier
  3074. ***** ^ not supported yet
  3075. 1258 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem');
  3076. ***** ^ not supported yet
  3077. ***** ^ not supported yet
  3078. ***** ^ undeclared identifier
  3079. ***** ^ not supported yet
  3080. 1259 ShowDisplayFrame(OrderItemDF,0,0,0,0);
  3081. ***** ^ not supported yet
  3082. ***** ^ undeclared identifier
  3083. ***** ^ not supported yet
  3084. 1260 FldNum := FieldNum(OrderItemDF,'Item');
  3085. ***** ^ not supported yet
  3086. ***** ^ undeclared identifier
  3087. ***** ^ not supported yet
  3088. 1261 ItemsChanged := TRUE; (* make sure to update the items*)
  3089. 1262 GetFieldRec(OrderItemDF,FldNum,FldRec);
  3090. ***** ^ not supported yet
  3091. ***** ^ undeclared identifier
  3092. ***** ^ not supported yet
  3093. 1263 FldRec.typ := 'D'; (* make display field *)
  3094. ***** ^ not supported yet
  3095. ***** ^ not supported yet
  3096. 1264 PutFieldRec(FldRec,OrderItemDF,FldNum);
  3097. ***** ^ not supported yet
  3098. ***** ^ not supported yet
  3099. ***** ^ undeclared identifier
  3100. ***** ^ not supported yet
  3101. 1265 UpdateOrd();
  3102. ***** ^ not supported yet
  3103. ***** ^ not supported yet
  3104. 1266 CurrentItem^.OldQuant := CurrentItem^.ItemOrderRec.QNTSOLD;
  3105. ***** ^ undeclared identifier
  3106. ***** ^ not supported yet
  3107. ***** ^ undeclared identifier
  3108. ***** ^ not supported yet
  3109. ***** ^ not supported yet
  3110. 1267 ControlFrame(OrderItemDF,2,'',FALSE,NextFrame);
  3111. ***** ^ not supported yet
  3112. ***** ^ undeclared identifier
  3113. ***** ^ not supported yet
  3114. 1268 ReadScrn();
  3115. ***** ^ not supported yet
  3116. ***** ^ not supported yet
  3117. 1269 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR)
  3118. ***** ^ not supported yet
  3119. ***** ^ undeclared identifier
  3120. ***** ^ not supported yet
  3121. ***** ^ not supported yet
  3122. 1270 THEN
  3123. 1271 IF CurrentItem^.OldQuant <> CurrentItem^.ItemOrderRec.QNTSOLD
  3124. ***** ^ undeclared identifier
  3125. ***** ^ not supported yet
  3126. ***** ^ undeclared identifier
  3127. ***** ^ not supported yet
  3128. ***** ^ not supported yet
  3129. 1272 THEN
  3130. 1273 CurrentItem^.InventoryItem.ONHAND :=
  3131. ***** ^ undeclared identifier
  3132. ***** ^ not supported yet
  3133. ***** ^ not supported yet
  3134. 1274 CurrentItem^.InventoryItem.ONHAND+
  3135. ***** ^ undeclared identifier
  3136. ***** ^ not supported yet
  3137. ***** ^ not supported yet
  3138. 1275 CurrentItem^.OldQuant;
  3139. ***** ^ undeclared identifier
  3140. ***** ^ not supported yet
  3141. 1276 CurrentItem^.ItemOrderRec.NOTES1 := ''; (* zero out back orer*)
  3142. ***** ^ undeclared identifier
  3143. ***** ^ not supported yet
  3144. ***** ^ not supported yet
  3145. 1277 CurrentItem^.ItemOrderRec.NOTES2 := '';
  3146. ***** ^ undeclared identifier
  3147. ***** ^ not supported yet
  3148. ***** ^ not supported yet
  3149. 1278 CurrentItem^.ItemOrderRec.NOTES3 := '';
  3150. ***** ^ undeclared identifier
  3151. ***** ^ not supported yet
  3152. ***** ^ not supported yet
  3153. 1279 UpdateInventory();
  3154. ***** ^ not supported yet
  3155. ***** ^ not supported yet
  3156. 1280 END;
  3157. 1281 CloseDisplayFrame(OrderItemDF);
  3158. ***** ^ not supported yet
  3159. ***** ^ undeclared identifier
  3160. 1282 END;
  3161. 1283 ShowSummary();
  3162. ***** ^ not supported yet
  3163. ***** ^ not supported yet
  3164. 1284 |'V' : SelectFromSummary(); (* view items *)
  3165. ***** ^ not supported yet
  3166. ***** ^ not supported yet
  3167. 1285 ShowSummary();
  3168. ***** ^ not supported yet
  3169. ***** ^ not supported yet
  3170. 1286 |'A' : CloseDisplayFrame(SummaryDF);
  3171. ***** ^ not supported yet
  3172. ***** ^ undeclared identifier
  3173. 1287 AddItems(CurrentInvoice);
  3174. ***** ^ not supported yet
  3175. ***** ^ undeclared identifier
  3176. 1288 |'D' : SelectFromSummary();
  3177. ***** ^ not supported yet
  3178. ***** ^ not supported yet
  3179. 1289 GetElmtAdr(OrderItemLst,ElmtNow(OrderItemLst),CurrentItem,Size,Code);
  3180. ***** ^ not supported yet
  3181. ***** ^ undeclared identifier
  3182. ***** ^ not supported yet
  3183. ***** ^ undeclared identifier
  3184. ***** ^ undeclared identifier
  3185. ***** ^ not supported yet
  3186. 1290
  3187. 1291 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR)
  3188. ***** ^ not supported yet
  3189. ***** ^ undeclared identifier
  3190. ***** ^ not supported yet
  3191. ***** ^ not supported yet
  3192. 1292 THEN
  3193. 1293 CurrentItem^.InventoryItem.ONHAND :=
  3194. ***** ^ undeclared identifier
  3195. ***** ^ not supported yet
  3196. ***** ^ not supported yet
  3197. 1294 CurrentItem^.InventoryItem.ONHAND+CurrentItem^.ItemOrderRec.QNTSOLD;
  3198. ***** ^ undeclared identifier
  3199. ***** ^ not supported yet
  3200. ***** ^ not supported yet
  3201. ***** ^ undeclared identifier
  3202. ***** ^ not supported yet
  3203. ***** ^ not supported yet
  3204. 1295 CurrentItem^.ItemOrderRec.QNTSOLD := 0.0;
  3205. ***** ^ undeclared identifier
  3206. ***** ^ not supported yet
  3207. ***** ^ not supported yet
  3208. 1296 UpdateInventory();
  3209. ***** ^ not supported yet
  3210. ***** ^ not supported yet
  3211. 1297 END;
  3212. 1298 ListDelete(OrderItemLst,ElmtNow(OrderItemLst),1);
  3213. ***** ^ not supported yet
  3214. ***** ^ undeclared identifier
  3215. ***** ^ not supported yet
  3216. ***** ^ undeclared identifier
  3217. ***** ^ not supported yet
  3218. 1299 ShowSummary();
  3219. ***** ^ not supported yet
  3220. ***** ^ not supported yet
  3221. 1300 ItemsChanged := TRUE;
  3222. 1301 |'P' : (*SelectFromSummary(); *)
  3223. 1302 PrintInvoice(FALSE);
  3224. ***** ^ not supported yet
  3225. ***** ^ not supported yet
  3226. 1303 |'K' : (* Print Packing slip *)
  3227. 1304 (* SelectFromSummary(); *)
  3228. 1305 PrintInvoice(TRUE);
  3229. ***** ^ not supported yet
  3230. ***** ^ not supported yet
  3231. 1306 |'C' : IF PromptYN('About to cancel invoice - continue',InvoiceHeadDF)
  3232. ***** ^ not supported yet
  3233. ***** ^ not supported yet
  3234. ***** ^ undeclared identifier
  3235. 1307 THEN
  3236. 1308 CancelInvoice ();
  3237. ***** ^ not supported yet
  3238. ***** ^ not supported yet
  3239. 1309 SelChar := 'X';
  3240. 1310 END;
  3241. 1311
  3242. 1312
  3243. 1313 END;
  3244. 1314
  3245. 1315 UNTIL SelChar='X'; (* Assumes 'X' is only used to exit *)
  3246. 1316 END; (* end if control *)
  3247. 1317
  3248. 1318 (* ClearScreen(); *)
  3249. 1319 CloseDisplayFrame(InvoiceHeadDF);
  3250. ***** ^ not supported yet
  3251. ***** ^ undeclared identifier
  3252. 1320 SaveInvoice();
  3253. ***** ^ not supported yet
  3254. ***** ^ not supported yet
  3255. 1321 SaveItems();
  3256. ***** ^ not supported yet
  3257. ***** ^ not supported yet
  3258. 1322 CloseInvoiceDBF();
  3259. ***** ^ not supported yet
  3260. ***** ^ not supported yet
  3261. 1323 CloseOrderDBF();
  3262. ***** ^ not supported yet
  3263. ***** ^ not supported yet
  3264. 1324 END ControlInvoice;
  3265. ***** ^ not supported yet
  3266. 1325
  3267. 1326
  3268. 1327 END Invoice.
  3269. ***** ^ not supported yet
  3270. 1941 errors