Listing: 1 IMPLEMENTATION MODULE Invoice; 2 (* 3 * ModBase 4 * Release 3.0 5 * (c) Copyright 1986 - 1991 PMI 6 * P.O. Box 8402 7 * Green Bay Wi 53308 8 * All Rights Reserved 9 * by Ed Ross 10 *) 11 12 FROM ModBase3 IMPORT UpdateDBFile,WriteDBRec,DeleteRecord,ReadDBRec, 13 AppendBlank,Record; 14 FROM Gas IMPORT CheckOutGas,CheckInGas,GasAmountDue,DeleteGasFromInv; 15 FROM PMIGlobals IMPORT PMIScreens,Today,TodayStr,TodayDays,Config, 16 OpenReportDevice,CloseReportDevice,NormalTitle; 17 FROM PriceTable IMPORT ClearGrpCnt,AddGrp,GrpTotal,GetPrice, 18 GetPriceTable; 19 FROM DateFunctions IMPORT DateToStr,Date,DaysSince1900; 20 FROM PosUtils IMPORT Equal,Pos; 21 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append, 22 CAPstr,OverWrite,RightJustify,Center; 23 FROM StrConv IMPORT CardinalToStr,RealToStr,StrToReal; 24 FROM M2Strings IMPORT Length,CompareStr,Assign; 25 FROM LowLevel IMPORT Fill; 26 FROM DBStuff IMPORT MakeSeqNbr,FindAll,ReadAllRecs,MakeKey, 27 ConditionType,ChangeDateField,DeleteAllRecs; 28 FROM DBUtils IMPORT ReadCardField,ReadRealField,ReadDateField, 29 ChangeCardField,ChangeRealField,PrintFrame; 30 FROM NumTypes IMPORT Real8; 31 FROM Payments IMPORT MakePayment; 32 FROM DBFPayments IMPORT OpenPaymentsDBF,ClosePaymentsDBF; 33 FROM Customer IMPORT GetCustNbr,GetCustTerms,GetCustSalesRep,GetCustShipVia, 34 GetCustDisAmount,GetCustDisCntLvl,GetCustTaxable,SetCustOutStd, 35 GetCustFreeFrght,AddressRec,AddressTypes,GetCustAddr,GetCurrCustName, 36 SetCustLastInvDate,AddCustYTD,AddCustOutStd; 37 FROM StringIO IMPORT PrintMessage,ErrorMessage,WriteEol,WriteStr; 38 (* these next two are from stonybrook - the pmi version doesn't work*) 39 FROM SmartScreen IMPORT ClearScreen; 40 FROM VWindows IMPORT ClearPart, CurrentWindow, SetCursorHeight; 41 FROM ScrnUtl2 IMPORT CloseDisplayFrame; 42 FROM ScrnUtl1 IMPORT GetFieldRec,PutFieldRec,FieldNum,FieldListTotal; 43 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName, 44 DispCode,ContinueInput,CancelInput,SubmitInput,InputFieldRecord; 45 FROM FramePainter IMPORT ShowDisplayFrame,RedrawField,RedrawArea; 46 FROM InputManager IMPORT ControlFrame; 47 FROM FrameManager IMPORT EraseFrame; 48 FROM Prompts IMPORT Prompt,PromptStr,PromptYN; 49 FROM SYSTEM IMPORT ADR,SIZE,TSIZE,ADDRESS; 50 FROM ControlUtils IMPORT ControlSeparately, LoadFrameList,Control,ReadInput, 51 ChangeField,AddMenuItem,AddStrField; 52 FROM DspFiles IMPORT OpenDisplayFile,ReadDisplayFrame; 53 FROM HandleIO IMPORT FileExists,OpenFile,CloseHandle; 54 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt,ElmtNow,GetElmtAdr, 55 JoinLists,ListDelete,ListInsert,DisposeList,ShellSortList,SortList,NilList; 56 FROM Invtry IMPORT UpdateInvQuant,GeneralInventory; 57 FROM DBFInvtry IMPORT InvtryRec,MoveInvtryToDBF,MoveInvtryFromDBF, 58 FindInvtryByInvcode,NextInvtry,PrevInvtry,LastInvtry,InvtryDBF, 59 InvcodeIdx; 60 FROM DBFOrder IMPORT OrderRec,MoveOrderToDBF,MoveOrderFromDBF,OrderDBF, 61 InvnbrIdx,OpenOrderDBF,CloseOrderDBF; 62 FROM Invtry IMPORT GetInvItem; ***** ^ duplicate identifier 63 FROM UOpsExt IMPORT Lookup,LookupProc; 64 FROM UserOps IMPORT AKeyHandler,TheKeyHandler; 65 IMPORT Key; 66 FROM VStorage IMPORT DosAlloc,DosDealloc; 67 FROM InvoicePrint IMPORT PrintInvoice,PostSales; 68 FROM DBFInvoice IMPORT InvoiceDBF, OpenInvoiceDBF,InvoiceIdx, 69 CloseInvoiceDBF,InvoiceRec,FindInvoiceByInvoice,CustidIdx, 70 FindInvoiceByCustid,NextInvoice,PrevInvoice,InvoiceDBF, ***** ^ duplicate identifier 71 FirstInvoice,LastInvoice,MoveInvoiceToDBF,MoveInvoiceFromDBF; 72 73 (*********************************************************************** 74 invoices are stored with the invoice number indexed and the 75 customer number indexed. 76 77 The customer number is indexed as 78 Customer Number + Status 79 Where status = 80 'O' - Open - not yet printed so can be edited 81 'P' - Posted (printed ) - can not be editied but can be viewes 82 'C' - Invoice is closed i.e. paid off 83 84 Item Status = 'R' - Items still recorded 85 'D' - Items deleted 86 87 ********************************************************************) 88 89 90 VAR 91 Status : INTEGER; 92 J : CARDINAL; 93 NextFrame,EndingFrame : AFrameName; 94 SelChar : CHAR; 95 96 PullDnMenu : GenList; 97 98 99 ItemsChanged : BOOLEAN; 100 101 102 PROCEDURE SortItemList(Item1 : ADDRESS; Size1 : CARDINAL; 103 Item2 : ADDRESS; Size2 : CARDINAL) : INTEGER; 104 VAR 105 I1,I2 : POINTER TO InvoiceItem; ***** ^ undeclared identifier 106 BEGIN 107 I1 := Item1; ***** ^ not supported yet ***** ^ not supported yet 108 I2 := Item2; ***** ^ not supported yet ***** ^ not supported yet 109 RETURN CompareStr(I1^.ItemOrderRec.ITEMNBR,I2^.ItemOrderRec.ITEMNBR); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 110 111 112 END SortItemList; ***** ^ not supported yet 113 114 PROCEDURE UpdateOrderScreen(); 115 (* redraw just the fields on the screen rather than the entire screen*) 116 VAR 117 J,K : CARDINAL; 118 BEGIN 119 K := FieldListTotal(OrderItemDF); ***** ^ not supported yet ***** ^ undeclared identifier 120 FOR J := 1 TO K DO 121 RedrawField(OrderItemDF,J,(K=1)); (* make first field active field*) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 122 END; 123 124 END UpdateOrderScreen; ***** ^ not supported yet 125 126 127 PROCEDURE UpdateOrd( ); 128 VAR Str : ARRAY[0..12] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 129 BEGIN 130 131 WITH CurrentItem^.ItemOrderRec DO ***** ^ undeclared identifier ***** ^ not supported yet 132 133 ChangeField(OrderItemDF,ITEMNBR,'Item',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 134 RealToStr(TOTAL,2,8,Str); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 135 ChangeField(OrderItemDF,Str,'Total',TRUE); (* computed field *) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 136 ChangeRealField(OrderItemDF,QNTSOLD,'Quant'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 137 ChangeField(OrderItemDF,UNITS,'Units',TRUE); (* alow override *) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 138 ChangeField(OrderItemDF,DESC,'Desc',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 139 ChangeField(OrderItemDF,NOTES1,'Notes1',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 140 ChangeField(OrderItemDF,NOTES2,'Notes2',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 141 ChangeField(OrderItemDF,NOTES3,'Notes3',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 142 ChangeField(OrderItemDF,MANPRICE,'Override',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 143 ChangeRealField(OrderItemDF,UNITPRC,'UnitPrice'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 144 END; ***** ^ not supported yet 145 WITH CurrentItem^.InventoryItem DO ***** ^ undeclared identifier ***** ^ not supported yet 146 147 ChangeField(OrderItemDF,GROUP,'Group',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 148 RealToStr(ONHAND,2,8,Str); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier 149 ChangeField(OrderItemDF,Str,'OnHand',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 150 CardinalToStr(MINORDER,5,Str); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier 151 ChangeField(OrderItemDF,Str,'MinOrder',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 152 ChangeCardField(OrderItemDF,PRICETBL,'TableNbr'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 153 END; ***** ^ not supported yet 154 WITH CurrentItem^ DO ***** ^ undeclared identifier 155 ChangeCardField(OrderItemDF,Q1,'Q1'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 156 ChangeCardField(OrderItemDF,Q2,'Q2'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 157 ChangeCardField(OrderItemDF,Q3,'Q3'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 158 ChangeCardField(OrderItemDF,Q4,'Q4'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 159 ChangeRealField(OrderItemDF,P1,'P1'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 160 ChangeRealField(OrderItemDF,P2,'P2'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 161 ChangeRealField(OrderItemDF,P3,'P3'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 162 ChangeRealField(OrderItemDF,P4,'P4'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 163 164 END; ***** ^ not supported yet 165 UpdateOrderScreen(); ***** ^ not supported yet ***** ^ not supported yet 166 END UpdateOrd; ***** ^ not supported yet 167 168 169 170 171 PROCEDURE LookUpInv(VAR ItmCode : ARRAY OF CHAR); ***** ^ not supported yet 172 (* called from userops to lookup an item when the user exists an item 173 fields 174 This routine will always store the results in the current item 175 inventory record *) 176 VAR 177 Tmp : ARRAY[0..20] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 178 179 PROCEDURE InitOrder(); 180 BEGIN 181 WITH CurrentItem^ DO ***** ^ undeclared identifier 182 Assign( CurrentInvoice.INVOICE,ItemOrderRec.INVNBR ); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 183 Assign( InventoryItem.INVCODE,ItemOrderRec.ITEMNBR); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 184 Assign( InventoryItem.DESC,ItemOrderRec.DESC ); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 185 ItemOrderRec.UNITPRC := InventoryItem.UNITPRICE; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 186 Assign(InventoryItem.UNITS,ItemOrderRec.UNITS ); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 187 ItemOrderRec.MANPRICE := 'N'; ***** ^ undeclared identifier ***** ^ not supported yet 188 GetPriceTable(InventoryItem.PRICETBL,Q1,Q2,Q3,Q4,P1,P2,P3,P4); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier 189 END; ***** ^ not supported yet 190 191 192 END InitOrder; ***** ^ not supported yet 193 194 195 BEGIN 196 CAPstr(ItmCode); ***** ^ not supported yet ***** ^ undeclared identifier 197 IF CurrentItem^.BeenAdded ***** ^ undeclared identifier ***** ^ not supported yet 198 THEN 199 (* IF NOT Special(ItmCode) 200 THEN 201 ItmCode := CurrentItem^.ItemOrderRec.INVNBR; 202 END; *) 203 RETURN 204 END; 205 IF Special(ItmCode) ***** ^ undeclared identifier ***** ^ undeclared identifier 206 THEN (* credit or special order *) 207 Assign( CurrentInvoice.INVOICE,CurrentItem^.ItemOrderRec.INVNBR ); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 208 CurrentItem^.ItemOrderRec.MANPRICE := 'Y'; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 209 Assign(ItmCode,CurrentItem^.ItemOrderRec.ITEMNBR ); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 210 Assign( ItmCode,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier 211 UpdateOrd(); ***** ^ not supported yet ***** ^ not supported yet 212 RETURN 213 END; 214 Assign( ItmCode,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier 215 CrunchBlanks(Tmp); ***** ^ not supported yet ***** ^ undeclared identifier 216 CrunchBlanks(CurrentItem^.InventoryItem.INVCODE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 217 IF Equal(Tmp,CurrentItem^.InventoryItem.INVCODE) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 218 THEN 219 RETURN; (* didn't change the items - so we're ok *) 220 END; 221 IF FindInvtryByInvcode(Tmp) ***** ^ not supported yet ***** ^ undeclared identifier 222 THEN 223 MoveInvtryFromDBF(CurrentItem^.InventoryItem); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 224 CurrentItem^.InventoryFilePos := Record(InvtryDBF); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 225 InitOrder(); (* re init the display frame *) ***** ^ undeclared identifier ***** ^ not supported yet 226 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 227 UpdateOrd(); ***** ^ not supported yet ***** ^ not supported yet 228 ELSE 229 GeneralInventory(ItmCode); ***** ^ not supported yet ***** ^ undeclared identifier 230 MoveInvtryFromDBF(CurrentItem^.InventoryItem); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 231 Assign( CurrentItem^.InventoryItem.INVCODE,ItmCode ); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 232 CurrentItem^.InventoryFilePos := Record(InvtryDBF); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 233 InitOrder(); ***** ^ undeclared identifier ***** ^ not supported yet 234 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 235 ShowDisplayFrame(OrderItemDF,0,0,0,0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 236 RedrawArea(InvoiceHeadDF,1,10,80,13); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 237 UpdateOrd(); ***** ^ not supported yet ***** ^ not supported yet 238 END; 239 240 END LookUpInv; ***** ^ not supported yet 241 242 243 244 PROCEDURE ReadAnInvoice(VAR AddrOfRec : ADDRESS; VAR SizeOfRec: CARDINAL); 245 (* a procedure passed to reall all recs to read an invoice record *) 246 VAR 247 P : POINTER TO FInvoice; ***** ^ undeclared identifier 248 BEGIN 249 SizeOfRec := SIZE(FInvoice); ***** ^ not supported yet ***** ^ undeclared identifier 250 DosAlloc(P,SizeOfRec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 251 MoveInvoiceFromDBF(P^.Invoice); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 252 P^.LI := Record(InvoiceDBF); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 253 AddrOfRec := P; ***** ^ not supported yet ***** ^ not supported yet 254 255 END ReadAnInvoice; ***** ^ not supported yet 256 257 258 259 PROCEDURE Special(Item:ARRAY OF CHAR) : BOOLEAN; ***** ^ not supported yet 260 BEGIN 261 IF (Pos(Credit,Item) = 0) OR (Pos(SpecialOrd,Item) = 0) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 262 THEN RETURN TRUE; 263 ELSE RETURN FALSE; 264 END; 265 END Special; ***** ^ not supported yet 266 267 268 269 270 271 272 PROCEDURE ReadScrn(); 273 VAR 274 Str : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 275 B : BOOLEAN; 276 BEGIN 277 IF NOT OrderItemDF^.FrameChanged (* just looked - nothing changed *) ***** ^ undeclared identifier ***** ^ not supported yet 278 THEN 279 RETURN; 280 END; 281 WITH CurrentItem^.ItemOrderRec DO ***** ^ undeclared identifier ***** ^ not supported yet 282 ReadInput(OrderItemDF,Str,'Quant'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 283 B := StrToReal(Str,0,QNTSOLD); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 284 ReadInput(OrderItemDF,Str,'UnitPrice'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 285 B := StrToReal(Str,0,UNITPRC); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 286 ReadInput(OrderItemDF,DESC,'Desc'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 287 ReadInput(OrderItemDF,UNITS,'Units'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 288 ReadInput(OrderItemDF,MANPRICE,'Override'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 289 CAPstr(MANPRICE); ***** ^ not supported yet ***** ^ undeclared identifier 290 ReadInput(OrderItemDF,NOTES1,'Notes1'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 291 ReadInput(OrderItemDF,NOTES2,'Notes2'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 292 ReadInput(OrderItemDF,NOTES3,'Notes3'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 293 294 END; ***** ^ not supported yet 295 296 END ReadScrn; ***** ^ not supported yet 297 298 PROCEDURE ReadHeader(); 299 VAR 300 C : CARDINAL; 301 R : Real8; 302 Str : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 303 BEGIN 304 WITH CurrentInvoice DO ***** ^ undeclared identifier 305 ReadInput(InvoiceHeadDF,CUSTPO,'PONbr'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 306 ReadInput(InvoiceHeadDF,SALESMAN,'SalesRep'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 307 ReadInput(InvoiceHeadDF,TERMS,'Terms'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 308 ReadInput(InvoiceHeadDF,SHIPVIA,'ShipVia'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 309 ReadInput(InvoiceHeadDF,TAXABLE,'Taxable'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 310 ReadDateField(InvoiceHeadDF,INVDATE,'InvDate'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 311 ReadRealField(InvoiceHeadDF,INVDSCNT,'Discount'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 312 ReadCardField(InvoiceHeadDF,DFLTLVL,'DefaultLevel'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 313 ReadRealField(InvoiceHeadDF,SHIPPING,'Shipping'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 314 ReadInput(InvoiceHeadDF,NOTE1,'NOTE1'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 315 ReadInput(InvoiceHeadDF,NOTE2,'NOTE2'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 316 ReadInput(InvoiceHeadDF,NOTE3,'NOTE3'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 317 ReadInput(InvoiceHeadDF,NOTESFOR,'NOTESFOR'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 318 CAPstr(NOTESFOR); ***** ^ not supported yet ***** ^ undeclared identifier 319 END; ***** ^ not supported yet 320 321 END ReadHeader; ***** ^ not supported yet 322 323 324 325 PROCEDURE UpdateInventory(); 326 327 VAR 328 Str : ARRAY[0..30] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 329 StrNum : ARRAY[0..10] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 330 R : Real8; 331 BEGIN 332 WITH CurrentItem^ DO ***** ^ undeclared identifier 333 IF Special(ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 334 THEN RETURN; 335 END; 336 ItemOrderRec.QNTORDER := ItemOrderRec.QNTSOLD; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 337 ReadDBRec(InvtryDBF,InventoryFilePos); (* get uptodate inventory item ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 338 and position the file pointer to the item *) 339 IF ItemOrderRec.QNTORDER > InventoryItem.ONHAND ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 340 THEN 341 ItemOrderRec.QNTSOLD := InventoryItem.ONHAND; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 342 RealToStr(ItemOrderRec.QNTORDER - ItemOrderRec.QNTSOLD,2,5,StrNum); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 343 ItemOrderRec.NOTES1 := 'Short - '; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 344 Append(ItemOrderRec.NOTES1,StrNum); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 345 InventoryItem.ONHAND := 0.0; ***** ^ undeclared identifier ***** ^ not supported yet 346 IF InventoryItem.STOCKED ***** ^ undeclared identifier ***** ^ not supported yet 347 THEN Append(ItemOrderRec.NOTES1,' - Please reorder'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 348 ELSE ItemOrderRec.NOTES1 := ' -Item no longer stocked' ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 349 END; 350 Prompt(ItemOrderRec.NOTES1); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 351 ELSE 352 InventoryItem.ONHAND := InventoryItem.ONHAND - ItemOrderRec.QNTSOLD; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 353 END; 354 END; (* end of with *) ***** ^ not supported yet 355 (* update the inventory record immediately *) 356 MoveInvtryToDBF(CurrentItem^.InventoryItem); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 357 WriteDBRec(InvtryDBF); ***** ^ not supported yet ***** ^ not supported yet 358 359 END UpdateInventory; ***** ^ not supported yet 360 361 PROCEDURE AddItems(VAR Inv : InvoiceRec); 362 VAR 363 364 NxtFrame : AFrameName; 365 366 OldLookup : Lookup; 367 J : CARDINAL; 368 369 PROCEDURE InsertInList(); 370 371 BEGIN 372 IF CurrentItem^.BeenAdded ***** ^ undeclared identifier ***** ^ not supported yet 373 THEN 374 RETURN 375 END; 376 CurrentItem^.BeenAdded := TRUE; ***** ^ undeclared identifier ***** ^ not supported yet 377 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 378 THEN 379 UpdateInventory(); ***** ^ not supported yet ***** ^ not supported yet 380 END; (* if not special*) 381 ListInsert(CurrentItem^,2,OrderItemLst,9999); (* insert at end *) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 382 Recompute(); ***** ^ undeclared identifier ***** ^ not supported yet 383 END InsertInList; ***** ^ not supported yet 384 385 386 PROCEDURE ShowSummary(); 387 CONST 388 Title = 389 'Item Units Quant Description Price Total'; ***** ^ not supported yet 390 VAR 391 Cnt, LL : CARDINAL; 392 Size,Code : CARDINAL; 393 Line : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 394 Tmp : ARRAY[0..12] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 395 FieldRec : InputFieldRecord; 396 (* 397 012345678901234567890123456789012345678901234567890123456789012345678901234 398 0 1 2 3 4 5 6 7 399 Item Units Quant Description Price Total 400 xxxxxx xxxxx xxx.x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx.xx xxxxx.xx 401 *) 402 403 404 BEGIN 405 Recompute(); ***** ^ undeclared identifier ***** ^ not supported yet 406 SortList(OrderItemLst,SortItemList); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 407 InitDisplayFrame(SummaryDF,CurrentWindow); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 408 AddStrField(SummaryDF,2,2,Title,75); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 409 GetFieldRec(SummaryDF,1,FieldRec); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 410 FieldRec.typ := DispCode; (* headline = display code *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 411 PutFieldRec(FieldRec,SummaryDF,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 412 SummaryDF^.headline := 2; ***** ^ undeclared identifier ***** ^ not supported yet 413 LL := ListLength(OrderItemLst); ***** ^ not supported yet ***** ^ undeclared identifier 414 FOR Cnt := 1 TO LL DO 415 GetElmtAdr(OrderItemLst,Cnt,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 416 Fill(ADR(Line),SIZE(Line),' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 417 Line[78] := 0C; (* force end of line *) ***** ^ not supported yet ***** ^ not supported yet 418 WITH CurrentItem^.ItemOrderRec DO ***** ^ undeclared identifier ***** ^ not supported yet 419 OverWrite(ITEMNBR,Line,0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 420 OverWrite(UNITS,Line,8); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 421 RealToStr(QNTSOLD,1,5,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 422 OverWrite(Tmp,Line,15); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 423 OverWrite(DESC,Line,22); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 424 RealToStr(UNITPRC,2,7,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 425 OverWrite(Tmp,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 426 RealToStr(TOTAL,2,7,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 427 OverWrite(Tmp,Line,67); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 428 AddMenuItem(SummaryDF,2,Cnt+2,Line,78,0,ITEMNBR); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 429 END; (* end of with *) ***** ^ not supported yet 430 431 END; (* end of for *) 432 ShowDisplayFrame(SummaryDF,1,13,80,24); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 433 434 END ShowSummary; ***** ^ not supported yet 435 436 437 PROCEDURE InList(ItemCode : ARRAY OF CHAR) : BOOLEAN; ***** ^ not supported yet 438 VAR Tmp : POINTER TO InvoiceItem; ***** ^ undeclared identifier 439 J : CARDINAL; 440 Code,Size : CARDINAL; 441 BEGIN 442 FOR J := 1 TO ListLength(OrderItemLst) DO ***** ^ not supported yet ***** ^ undeclared identifier 443 GetElmtAdr(OrderItemLst,J,Tmp,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 444 IF Equal(Tmp^.ItemOrderRec.ITEMNBR,ItemCode) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 445 THEN 446 Prompt('Item already in invoice - can not add'); ***** ^ not supported yet ***** ^ not supported yet 447 RETURN TRUE; 448 END; 449 END; (* end for j *) 450 RETURN FALSE; 451 END InList; ***** ^ not supported yet 452 453 BEGIN (* additems *) 454 InitDisplayFrame(OrderItemDF,CurrentWindow); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 455 OldLookup := LookupProc; ***** ^ undeclared identifier ***** ^ not supported yet 456 (* call(reg_param=>()) *) 457 LookupProc := LookUpInv; ***** ^ not supported yet ***** ^ not supported yet 458 (* call(reg_param=>(ax,bx,cx,dx,st0,st6,st5,st4,st3)) *) 459 ItemsChanged := TRUE; 460 REPEAT 461 DosAlloc(CurrentItem,SIZE(CurrentItem^)); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 462 Fill(CurrentItem,SIZE(CurrentItem^),0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 463 CurrentItem^.BeenAdded := FALSE; ***** ^ undeclared identifier ***** ^ not supported yet 464 CurrentItem^.GasPriced := FALSE; ***** ^ undeclared identifier ***** ^ not supported yet 465 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 466 ControlFrame(OrderItemDF,1,'',TRUE,NxtFrame); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier 467 ReadScrn(); ***** ^ not supported yet ***** ^ not supported yet 468 IF CurrentItem^.ItemOrderRec.ITEMNBR[0] > 0C (* F10 pressed not data*) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 469 THEN (* the f10 key pressed - data on the screen *) 470 IF NOT InList(CurrentItem^.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 471 THEN 472 InsertInList(); ***** ^ undeclared identifier ***** ^ not supported yet 473 ELSE 474 DosDealloc(CurrentItem,SIZE(CurrentItem^)); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 475 END; 476 ELSE (* f10 or Esc key pressed - not data on screen *) 477 IF NOT CurrentItem^.BeenAdded (* if blank screen - done*) ***** ^ undeclared identifier ***** ^ not supported yet 478 THEN 479 NxtFrame := ''; (* blank screen - exit time*) ***** ^ undeclared identifier 480 DosDealloc(CurrentItem,SIZE(CurrentItem^)); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 481 END; 482 END; 483 UNTIL NOT Equal(OrderItemDF^.normlnext,NxtFrame); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 484 LookupProc := OldLookup; ***** ^ not supported yet ***** ^ undeclared identifier 485 CloseDisplayFrame(OrderItemDF); ***** ^ not supported yet ***** ^ undeclared identifier 486 ShowSummary(); ***** ^ undeclared identifier ***** ^ not supported yet 487 END AddItems; ***** ^ not supported yet 488 489 PROCEDURE ShowSummary(); 490 CONST 491 Title = 492 'Item Units Quant Description Price Total'; ***** ^ not supported yet 493 VAR 494 Cnt, LL : CARDINAL; 495 Size,Code : CARDINAL; 496 Line : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 497 Tmp : ARRAY[0..12] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 498 FieldRec : InputFieldRecord; 499 (* 500 012345678901234567890123456789012345678901234567890123456789012345678901234 501 0 1 2 3 4 5 6 7 502 Item Units Quant Description Price Total 503 xxxxxx xxxxx xxx.x xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx xxxx.xx xxxxx.xx 504 *) 505 506 507 BEGIN 508 Recompute(); ***** ^ undeclared identifier ***** ^ not supported yet 509 SortList(OrderItemLst,SortItemList); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 510 InitDisplayFrame(SummaryDF,CurrentWindow); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 511 AddStrField(SummaryDF,2,2,Title,75); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 512 GetFieldRec(SummaryDF,1,FieldRec); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 513 FieldRec.typ := DispCode; (* headline = display code *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 514 PutFieldRec(FieldRec,SummaryDF,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 515 SummaryDF^.headline := 2; ***** ^ undeclared identifier ***** ^ not supported yet 516 LL := ListLength(OrderItemLst); ***** ^ not supported yet ***** ^ undeclared identifier 517 FOR Cnt := 1 TO LL DO 518 GetElmtAdr(OrderItemLst,Cnt,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 519 Fill(ADR(Line),SIZE(Line),' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 520 Line[78] := 0C; (* force end of line *) ***** ^ not supported yet ***** ^ not supported yet 521 WITH CurrentItem^.ItemOrderRec DO ***** ^ undeclared identifier ***** ^ not supported yet 522 OverWrite(ITEMNBR,Line,0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 523 OverWrite(UNITS,Line,8); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 524 RealToStr(QNTSOLD,1,5,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 525 OverWrite(Tmp,Line,15); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 526 OverWrite(DESC,Line,22); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 527 RealToStr(UNITPRC,2,7,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 528 OverWrite(Tmp,Line,58); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 529 RealToStr(TOTAL,2,7,Tmp); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 530 OverWrite(Tmp,Line,67); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 531 AddMenuItem(SummaryDF,2,Cnt+2,Line,78,0,ITEMNBR); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 532 END; (* end of with *) ***** ^ not supported yet 533 534 END; (* end of for *) 535 ShowDisplayFrame(SummaryDF,1,13,80,24); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 536 537 END ShowSummary; ***** ^ not supported yet 538 539 PROCEDURE SelectFromSummary(); 540 (* select an item from the list and put into current item *) 541 VAR 542 NextFrame : AFrameName; 543 K : CARDINAL; 544 Size,Code : CARDINAL; 545 BEGIN 546 ControlFrame(SummaryDF,1,'',FALSE,NextFrame); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 547 (* CrunchBlanks(NextFrame); *) 548 K := 1; 549 LOOP 550 IF K > ListLength(OrderItemLst) ***** ^ not supported yet ***** ^ undeclared identifier 551 THEN EXIT; 552 END; 553 GetElmtAdr(OrderItemLst,K,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 554 IF Equal(NextFrame,CurrentItem^.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 555 THEN EXIT; 556 END; 557 INC(K); ***** ^ undeclared identifier ***** ^ not supported yet 558 END; (* end of loop *) 559 CloseDisplayFrame(SummaryDF); ***** ^ not supported yet ***** ^ undeclared identifier 560 END SelectFromSummary; ***** ^ not supported yet 561 562 563 564 PROCEDURE Recompute(); 565 (* go through the list twice 566 1 - count the items in each group 567 2 - get price based on group *) 568 VAR 569 Total : Real8; 570 LL : CARDINAL; 571 J : CARDINAL; 572 Code,Size : CARDINAL; 573 574 575 PROCEDURE CreditCompute(VAR ItemOrderRec :OrderRec) : Real8; 576 BEGIN 577 IF ItemOrderRec.UNITPRC > 0.0 (* credit items are negative *) ***** ^ not supported yet ***** ^ not supported yet 578 THEN ItemOrderRec.UNITPRC := - ItemOrderRec.UNITPRC; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 579 END; 580 ItemOrderRec.TOTAL := ItemOrderRec.UNITPRC; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 581 RETURN ItemOrderRec.TOTAL; ***** ^ not supported yet ***** ^ not supported yet 582 END CreditCompute; ***** ^ not supported yet 583 584 PROCEDURE GasCompute(VAR ItemOrderRec : OrderRec; VAR GasPriced : BOOLEAN) : Real8; 585 BEGIN 586 IF ItemOrderRec.MANPRICE = 'Y' ***** ^ not supported yet ***** ^ not supported yet 587 THEN RETURN ItemOrderRec.TOTAL; (* already priced - *) ***** ^ not supported yet ***** ^ not supported yet 588 END; 589 ItemOrderRec.MANPRICE := 'Y'; ***** ^ not supported yet ***** ^ not supported yet 590 GasAmountDue(CurrentInvoice.CUSTID, ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 591 ItemOrderRec.ITEMNBR, ***** ^ not supported yet ***** ^ not supported yet 592 TRUNC(ItemOrderRec.QNTSOLD), ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 593 CurrentInvoice.INVDATE, ***** ^ undeclared identifier ***** ^ not supported yet 594 ItemOrderRec.TOTAL, ***** ^ not supported yet ***** ^ not supported yet 595 ItemOrderRec.NOTES1); ***** ^ not supported yet ***** ^ not supported yet 596 RETURN ItemOrderRec.TOTAL; ***** ^ not supported yet ***** ^ not supported yet 597 END GasCompute; ***** ^ not supported yet 598 599 PROCEDURE ComputeNormal() : Real8; 600 BEGIN 601 WITH CurrentItem^ DO ***** ^ undeclared identifier 602 IF (InventoryItem.PRICETBL > 0) AND ***** ^ undeclared identifier ***** ^ not supported yet 603 (ItemOrderRec.MANPRICE = 'N') ***** ^ undeclared identifier ***** ^ not supported yet 604 THEN 605 IF InventoryItem.GROUP[0] > 0C (* a group exists *) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 606 THEN 607 ItemOrderRec.UNITPRC := GetPrice(InventoryItem.PRICETBL, ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 608 GrpTotal(InventoryItem.GROUP), ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 609 CurrentInvoice.DFLTLVL); ***** ^ undeclared identifier ***** ^ not supported yet 610 ELSE (* price based on this item alone *) 611 (* use the qntorder for computing the unit price*) 612 ItemOrderRec.UNITPRC := GetPrice(InventoryItem.PRICETBL, ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 613 TRUNC(ItemOrderRec.QNTORDER), ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 614 CurrentInvoice.DFLTLVL); ***** ^ undeclared identifier ***** ^ not supported yet 615 END; (* not table priced - *) 616 617 END; 618 ItemOrderRec.TOTAL := ItemOrderRec.QNTSOLD * ItemOrderRec.UNITPRC; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 619 END; (* end with *) ***** ^ not supported yet 620 RETURN CurrentItem^.ItemOrderRec.TOTAL; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 621 622 END ComputeNormal; ***** ^ not supported yet 623 624 BEGIN 625 ClearGrpCnt(); ***** ^ not supported yet ***** ^ not supported yet 626 HeaderChanged := TRUE; ***** ^ undeclared identifier 627 LL := ListLength(OrderItemLst); (* go through the list and add items *) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier 628 FOR J := 1 TO LL DO ***** ^ undeclared identifier 629 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier 630 IF CurrentItem^.InventoryItem.GROUP[0] > 0C (*a group exists *) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 631 THEN 632 AddGrp(CurrentItem^.InventoryItem.GROUP,TRUNC(CurrentItem^.ItemOrderRec.QNTSOLD)); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 633 END; 634 CurrentInvoice.INVNET := 0.0; ***** ^ undeclared identifier ***** ^ not supported yet 635 END; 636 FOR J := 1 TO LL DO (* now compute price *) ***** ^ undeclared identifier 637 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier 638 WITH CurrentItem^ DO ***** ^ undeclared identifier 639 IF Pos(Credit,ItemOrderRec.ITEMNBR) = 0 (* credit item *) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 640 THEN 641 CurrentInvoice.INVNET := CurrentInvoice.INVNET + ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 642 CreditCompute(ItemOrderRec); ***** ^ undeclared identifier ***** ^ undeclared identifier 643 644 ELSIF Pos(GasIn,CurrentItem^.ItemOrderRec.ITEMNBR) = 0 ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 645 THEN 646 CurrentInvoice.INVNET := CurrentInvoice.INVNET + ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 647 GasCompute(ItemOrderRec,GasPriced); ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ undeclared identifier 648 ELSE 649 CurrentInvoice.INVNET := CurrentInvoice.INVNET + ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 650 ComputeNormal(); ***** ^ undeclared identifier ***** ^ not supported yet 651 END; 652 END; (* end with current item *) ***** ^ not supported yet 653 END; (* end for j *) 654 CurrentInvoice.INVNET := CurrentInvoice.INVNET * (1.0 - CurrentInvoice.INVDSCNT/100.0); ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 655 CAPstr(CurrentInvoice.TAXABLE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 656 IF (CurrentInvoice.TAXABLE = 'Y') ***** ^ undeclared identifier ***** ^ not supported yet 657 THEN 658 CurrentInvoice.INVTAX := CurrentInvoice.INVNET * (Config.TaxRate/100.0); (* add tax *) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 659 ELSE 660 CurrentInvoice.INVTAX := 0.0; ***** ^ undeclared identifier ***** ^ not supported yet 661 END; 662 CurrentInvoice.TOTALAMT := CurrentInvoice.INVNET + CurrentInvoice.INVTAX + ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 663 CurrentInvoice.SHIPPING; ***** ^ undeclared identifier ***** ^ not supported yet 664 ChangeRealField(InvoiceHeadDF,CurrentInvoice.TOTALAMT,'Total'); (*update header screen*) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 665 ChangeRealField(InvoiceHeadDF,CurrentInvoice.INVTAX,'Tax'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 666 ChangeRealField(InvoiceHeadDF,CurrentInvoice.INVNET,'Net'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 667 RedrawField(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Tax'),FALSE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 668 RedrawField(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Net'),FALSE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 669 RedrawField(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Total'),FALSE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 670 671 END Recompute; ***** ^ not supported yet 672 673 PROCEDURE UpdateInvHeader(); 674 (* update the invoice header and display *) 675 BEGIN 676 WITH CurrentInvoice DO ***** ^ undeclared identifier 677 CrunchBlanks(INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier 678 ChangeField(InvoiceHeadDF,INVOICE,'InvNbr',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 679 ChangeDateField(InvoiceHeadDF,INVDATE,'InvDate'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 680 ChangeField(InvoiceHeadDF,SALESMAN,'SalesRep',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 681 ChangeField(InvoiceHeadDF,TERMS,'Terms',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 682 ChangeField(InvoiceHeadDF,SHIPVIA,'ShipVia',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 683 ChangeField(InvoiceHeadDF,TAXABLE,'Taxable',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 684 ChangeRealField(InvoiceHeadDF,INVDSCNT,'Discount'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 685 ChangeRealField(InvoiceHeadDF,INVTAX,'Tax'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 686 ChangeRealField(InvoiceHeadDF,INVNET,'Net'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 687 ChangeRealField(InvoiceHeadDF,SHIPPING,'Shipping'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 688 ChangeCardField(InvoiceHeadDF,DFLTLVL,'DefaultLevel'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 689 ChangeRealField(InvoiceHeadDF,TOTALAMT,'Total'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 690 ChangeField(InvoiceHeadDF,NOTE1,'NOTE1',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 691 ChangeField(InvoiceHeadDF,NOTE2,'NOTE2',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 692 ChangeField(InvoiceHeadDF,NOTE3,'NOTE3',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 693 ChangeField(InvoiceHeadDF,NOTESFOR,'NOTESFOR',TRUE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 694 695 END; ***** ^ not supported yet 696 ShowDisplayFrame(InvoiceHeadDF,0,0,0,0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 697 698 END UpdateInvHeader; ***** ^ not supported yet 699 700 701 PROCEDURE GetInvoice(InvNbr : ARRAY OF CHAR); ***** ^ not supported yet 702 (* get the invoice header, get the invoice items, get the inventory items*) 703 VAR 704 Items : GenList; 705 LI : LONGINT; 706 J : CARDINAL; 707 Code : CARDINAL; 708 Tmp : InvoiceItem; ***** ^ undeclared identifier 709 BEGIN 710 NewList(Items); (* get all items *) ***** ^ not supported yet ***** ^ not supported yet 711 FindAll(InvnbrIdx,InvNbr,EQ,Items); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 712 FOR J := 1 TO ListLength(Items) DO ***** ^ not supported yet ***** ^ not supported yet 713 GetElmt(Items,J,LI,Code); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 714 ReadDBRec(OrderDBF,LI); (* read the record *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 715 MoveOrderFromDBF(Tmp.ItemOrderRec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 716 IF NOT Special(Tmp.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 717 THEN 718 IF NOT FindInvtryByInvcode(Tmp.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 719 THEN Prompt(' could not find inventory'); ***** ^ not supported yet ***** ^ not supported yet 720 ELSE 721 MoveInvtryFromDBF(Tmp.InventoryItem); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 722 Tmp.InventoryFilePos := Record(InvtryDBF); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 723 END; 724 ELSE Fill(ADR(Tmp.InventoryItem ),SIZE(Tmp.InventoryItem),0); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 725 END; 726 Tmp.OldQuant := Tmp.ItemOrderRec.QNTSOLD; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 727 Tmp.BeenAdded := TRUE; ***** ^ not supported yet ***** ^ not supported yet 728 Tmp.GasPriced := TRUE; ***** ^ not supported yet ***** ^ not supported yet 729 GetPriceTable(Tmp.InventoryItem.PRICETBL,Tmp.Q1,Tmp.Q2,Tmp.Q3,Tmp.Q4, ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 730 Tmp.P1,Tmp.P2,Tmp.P3,Tmp.P4); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 731 ListInsert(Tmp,1,OrderItemLst,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 732 END; (* end for j *) 733 ShellSortList(OrderItemLst,SortItemList); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 734 END GetInvoice; ***** ^ not supported yet 735 736 737 738 PROCEDURE MakeInvoicePrintLine(InvAddr : ADDRESS; VAR Line : ARRAY OF CHAR); ***** ^ not supported yet 739 VAR 740 TmpInv : POINTER TO FInvoice; ***** ^ undeclared identifier 741 B : BOOLEAN; 742 Str : ARRAY[0..10] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 743 BEGIN 744 TmpInv := InvAddr; ***** ^ not supported yet ***** ^ not supported yet 745 Fill(ADR(Line),70,' '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 746 Line[60] := 0C; ***** ^ not supported yet ***** ^ not supported yet 747 OverWrite(TmpInv^.Invoice.INVOICE,Line,0); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 748 DateToStr(TmpInv^.Invoice.INVDATE,Str,B); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 749 OverWrite(Str,Line,10); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 750 RealToStr(TmpInv^.Invoice.TOTALAMT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 751 OverWrite(Str,Line,20); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 752 753 RealToStr(TmpInv^.Invoice.AMTOUT,2,9,Str); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 754 OverWrite(Str,Line,33); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 755 OverWrite(TmpInv^.Invoice.INVPRNT,Line,53); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 756 757 END MakeInvoicePrintLine; ***** ^ not supported yet 758 759 760 PROCEDURE DisplayInvList(TheList : GenList); 761 VAR 762 Code,Size: CARDINAL; 763 K : CARDINAL; 764 TmpInv : POINTER TO FInvoice; ***** ^ undeclared identifier 765 Line : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 766 CustID : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 767 B : BOOLEAN; 768 Str : ARRAY[0..10] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 769 found : BOOLEAN; 770 FieldRec : InputFieldRecord; 771 BEGIN 772 (* 773 1 2 3 4 5 774 012345678901234567890123456789012345678901234567890123456 775 Inv Nbr Inv Date Inv Total Amount Out Status 776 *) 777 InitDisplayFrame(SummaryDF,CurrentWindow); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 778 AddStrField(SummaryDF,2,2, ***** ^ not supported yet ***** ^ undeclared identifier 779 'Inv Nbr Inv Date Inv Total Amount Outstanding Status',60); ***** ^ not supported yet ***** ^ not supported yet 780 GetFieldRec(SummaryDF,1,FieldRec); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 781 FieldRec.typ := DispCode; (* headline = display code *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 782 PutFieldRec(FieldRec,SummaryDF,1); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 783 SummaryDF^.headline := 2; ***** ^ undeclared identifier ***** ^ not supported yet 784 K := ListLength(TheList); (*debug trap *) ***** ^ not supported yet ***** ^ not supported yet 785 FOR J := 1 TO K DO 786 GetElmtAdr(TheList,J,TmpInv,Size,Code); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 787 MakeInvoicePrintLine(TmpInv,Line); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 788 789 AddMenuItem(SummaryDF,2,J+2,Line,60,0,TmpInv^.Invoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 790 END; (* end of for *) 791 ShowDisplayFrame(SummaryDF,1,13,80,24); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 792 END DisplayInvList; ***** ^ not supported yet 793 794 795 PROCEDURE SelectInvoiceFromList(VAR TheList : GenList; ReadInvtry : BOOLEAN); 796 (* returns the selected invoice in current invoice *) 797 (* assumes summary df already set up *) 798 799 VAR NextFrame : AFrameName; 800 Size,Code : CARDINAL; 801 found : BOOLEAN; 802 K : CARDINAL; 803 TmpInv : POINTER TO FInvoice; ***** ^ undeclared identifier 804 BEGIN 805 ControlFrame(SummaryDF,1,'',TRUE,NextFrame); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 806 K := 1; 807 found := TRUE; 808 CrunchBlanks(NextFrame); ***** ^ not supported yet ***** ^ not supported yet 809 LOOP 810 IF K > ListLength(TheList) ***** ^ not supported yet ***** ^ not supported yet 811 THEN 812 (* Prompt('Could not find invoice '); *) 813 found := FALSE; 814 EXIT; 815 END; 816 GetElmtAdr(TheList,K,TmpInv,Size,Code); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 817 CrunchBlanks(TmpInv^.Invoice.INVOICE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 818 IF Equal(TmpInv^.Invoice.INVOICE,NextFrame) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 819 THEN EXIT; 820 END; 821 INC(K); ***** ^ undeclared identifier ***** ^ not supported yet 822 END; (* end of loop *) 823 CloseDisplayFrame(SummaryDF); ***** ^ not supported yet ***** ^ undeclared identifier 824 IF found 825 THEN 826 ReadDBRec(InvoiceDBF,TmpInv^.LI); (* read the selected item *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 827 CurrentInvoice := TmpInv^.Invoice; (* make current invoice *) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 828 IF CurrentInvoice.INVPRNT = 'P' ***** ^ undeclared identifier ***** ^ not supported yet 829 THEN 830 CurrInvOldAmt := CurrentInvoice.INVNET; (* if they reprint *) ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 831 ELSE 832 CurrInvOldAmt := 0.0; (* keep the ytd amount correct*) ***** ^ undeclared identifier 833 END; 834 IF ReadInvtry (* if this call from select invoice to update*) 835 THEN 836 UpdateInvHeader(); ***** ^ not supported yet ***** ^ not supported yet 837 GetInvoice(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 838 ShowSummary(); ***** ^ not supported yet ***** ^ not supported yet 839 END; 840 841 ELSE 842 CurrentInvoice.INVOICE := ''; ***** ^ undeclared identifier ***** ^ not supported yet 843 END; 844 845 END SelectInvoiceFromList; ***** ^ not supported yet 846 847 PROCEDURE SelectInvoice( ); 848 (* this routine will select from the set of invoices owned by a customer 849 and return the invoice number of the selected - If esc is hit then no 850 invoice is selected *) 851 852 VAR 853 SelList : GenList; 854 PrnList : GenList; 855 J,K : CARDINAL; 856 Code,Size: CARDINAL; 857 TmpInv : POINTER TO FInvoice; ***** ^ undeclared identifier 858 CustID : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 859 B : BOOLEAN; 860 found : BOOLEAN; 861 BEGIN 862 GetCustNbr(CustID); (* get the open invoice *) ***** ^ not supported yet ***** ^ not supported yet 863 Append(CustID,'O'); (* only get the open ones *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 864 MakeKey(CustID); ***** ^ not supported yet ***** ^ not supported yet 865 NilList(SelList); ***** ^ not supported yet ***** ^ not supported yet 866 FindAll(CustidIdx,CustID,EQ,SelList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 867 ReadAllRecs(InvoiceDBF,ReadAnInvoice,SelList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 868 869 GetCustNbr(CustID); (* get all of the printed ones *) ***** ^ not supported yet ***** ^ not supported yet 870 Append(CustID,'P'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 871 MakeKey(CustID); ***** ^ not supported yet ***** ^ not supported yet 872 NilList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 873 FindAll(CustidIdx,CustID,EQ,PrnList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 874 ReadAllRecs(InvoiceDBF,ReadAnInvoice,PrnList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 875 876 JoinLists(PrnList,SelList,1); (* join the two lists - all outstanding*) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 877 IF ListLength(SelList) = 0 ***** ^ not supported yet ***** ^ not supported yet 878 THEN Prompt('No open invoices'); ***** ^ not supported yet ***** ^ not supported yet 879 CurrentInvoice.INVOICE := ''; ***** ^ undeclared identifier ***** ^ not supported yet 880 DisposeList(SelList); ***** ^ not supported yet ***** ^ not supported yet 881 RETURN; 882 END; 883 DisplayInvList(SelList); ***** ^ not supported yet ***** ^ not supported yet 884 SelectInvoiceFromList(SelList,TRUE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 885 DisposeList(SelList); ***** ^ not supported yet ***** ^ not supported yet 886 887 END SelectInvoice; ***** ^ not supported yet 888 889 890 PROCEDURE InvoiceHistory(); 891 VAR 892 PrnList : GenList; 893 CustID : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 894 B : BOOLEAN; 895 J : CARDINAL; 896 Code,Size : CARDINAL; 897 TotalDue : Real8; 898 P :POINTER TO FInvoice; ***** ^ undeclared identifier 899 Title1 : ARRAY[0..80] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 900 Handle : CARDINAL; 901 BEGIN 902 OpenInvoiceDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 903 GetCustNbr(CustID); (* get all of the printed ones *) ***** ^ not supported yet ***** ^ not supported yet 904 NilList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 905 FindAll(CustidIdx,CustID,BeginsWith,PrnList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 906 ReadAllRecs(InvoiceDBF,ReadAnInvoice,PrnList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 907 IF ListLength(PrnList) = 0 ***** ^ not supported yet ***** ^ not supported yet 908 THEN Prompt('No invoice History'); ***** ^ not supported yet ***** ^ not supported yet 909 DisposeList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 910 RETURN; 911 END; 912 DisplayInvList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 913 Control(SummaryDF); ***** ^ not supported yet ***** ^ undeclared identifier 914 IF PromptYN(' Print the report ',SummaryDF) ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 915 THEN 916 GetCurrCustName(Title1); ***** ^ not supported yet ***** ^ not supported yet 917 Append(Title1,' - Invoice History '); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 918 Handle := OpenReportDevice(); ***** ^ not supported yet ***** ^ not supported yet 919 NormalTitle(Title1); ***** ^ not supported yet ***** ^ not supported yet 920 PrintFrame(SummaryDF,Handle); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 921 CloseReportDevice(Handle); ***** ^ not supported yet ***** ^ not supported yet 922 END; 923 924 DisposeList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 925 CloseInvoiceDBF(); ***** ^ not supported yet ***** ^ not supported yet 926 END InvoiceHistory; ***** ^ not supported yet 927 928 929 PROCEDURE DeleteInvItems(InvNbr : ARRAY OF CHAR); ***** ^ not supported yet 930 VAR TheList : GenList; 931 BEGIN 932 933 CrunchBlanks(InvNbr); ***** ^ not supported yet ***** ^ not supported yet 934 NilList(TheList); ***** ^ not supported yet ***** ^ not supported yet 935 FindAll(InvnbrIdx,InvNbr,EQ,TheList); (* get old invoices *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 936 IF ListLength(TheList) > 0 (* some invoice have zero items from conversion*) ***** ^ not supported yet ***** ^ not supported yet 937 THEN 938 DeleteAllRecs(OrderDBF,TheList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 939 END; 940 DisposeList(TheList); ***** ^ not supported yet ***** ^ not supported yet 941 END DeleteInvItems; ***** ^ not supported yet 942 943 PROCEDURE InvoiceDaysLate(InvAddr : ADDRESS) : CARDINAL; 944 (* return the nubmer of days late for an invoice*) 945 VAR 946 TodaysDays, 947 InvoiceDays :CARDINAL; 948 InvPoint : POINTER TO FInvoice; ***** ^ undeclared identifier 949 BEGIN 950 InvPoint := InvAddr; ***** ^ not supported yet ***** ^ not supported yet 951 InvoiceDays := DaysSince1900(InvPoint^.Invoice.INVDATE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 952 RETURN (InvoiceDays - TodaysDays); 953 END InvoiceDaysLate; ***** ^ not supported yet 954 955 956 PROCEDURE GetOutstanding(CustID : ARRAY OF CHAR; VAR TheList:GenList); ***** ^ not supported yet 957 BEGIN 958 (* assumes the database is open *) 959 Append(CustID,'P'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 960 NilList(TheList); ***** ^ not supported yet ***** ^ not supported yet 961 FindAll(CustidIdx,CustID,EQ,TheList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 962 ReadAllRecs(InvoiceDBF,ReadAnInvoice,TheList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 963 964 END GetOutstanding; ***** ^ not supported yet 965 966 967 PROCEDURE PayInvoice(); 968 VAR 969 PrnList : GenList; 970 CustID : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 971 PymtDF : DisplayFrame; 972 ManualPay : BOOLEAN; 973 FldRec : InputFieldRecord; 974 PymtAmount : Real8; 975 Remaining : Real8; 976 B : BOOLEAN; 977 CheckNbr : ARRAY[0..10] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 978 PymtDate : Date; 979 J : CARDINAL; 980 Code,Size : CARDINAL; 981 TotalDue : Real8; 982 P :POINTER TO FInvoice; ***** ^ undeclared identifier 983 BEGIN 984 OpenInvoiceDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 985 GetCustNbr(CustID); (* get all of the printed ones *) ***** ^ not supported yet ***** ^ not supported yet 986 Append(CustID,'P'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 987 NilList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 988 FindAll(CustidIdx,CustID,EQ,PrnList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 989 ReadAllRecs(InvoiceDBF,ReadAnInvoice,PrnList); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 990 IF ListLength(PrnList) = 0 ***** ^ not supported yet ***** ^ not supported yet 991 THEN Prompt('No outstanding invoices'); ***** ^ not supported yet ***** ^ not supported yet 992 DisposeList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 993 RETURN; 994 END; 995 TotalDue := 0.0; ***** ^ not supported yet 996 FOR J := 1 TO ListLength(PrnList) DO (* zip through and get total out*) ***** ^ not supported yet ***** ^ not supported yet 997 GetElmtAdr(PrnList,J,P,Code,Size); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 998 TotalDue := TotalDue + P^.Invoice.AMTOUT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 999 END; 1000 1001 InitDisplayFrame(PymtDF,CurrentWindow); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1002 ReadDisplayFrame(PMIScreens,PymtDF,'Pymts'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1003 GetFieldRec(PymtDF,FieldNum(PymtDF,'PymtAmt'),FldRec); (* make max amout*) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1004 FldRec.rMax := TotalDue; ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1005 FldRec.decimalPlace := 2; ***** ^ not supported yet ***** ^ not supported yet 1006 PutFieldRec(FldRec,PymtDF,FieldNum(PymtDF,'PymtAmt')); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1007 SetCustOutStd(TotalDue); ***** ^ not supported yet ***** ^ not supported yet 1008 ChangeField(PymtDF,TodayStr,'PymtDate',TRUE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1009 1010 ShowDisplayFrame(PymtDF,0,0,0,0); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1011 DisplayInvList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 1012 Control(PymtDF); ***** ^ not supported yet ***** ^ not supported yet 1013 (* if the user selected manual payments *) 1014 (* then select which invoice to pay *) 1015 (* otherwise select invoices until payments *) 1016 (* reach zero *) 1017 1018 ReadInput(PymtDF,CheckNbr,'ChkNumber'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1019 ReadRealField(PymtDF,PymtAmount,'PymtAmt'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1020 ReadDateField(PymtDF,PymtDate,'PymtDate'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1021 GetFieldRec(PymtDF,FieldNum(PymtDF,'Manual'),FldRec); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1022 SetCustOutStd(TotalDue-PymtAmount); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1023 OpenPaymentsDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 1024 OpenOrderDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 1025 REPEAT (* loop through here until the full payment is used *) 1026 (* can not enter a payment greater than total due *) 1027 1028 IF FldRec.selected (* manual invoice entry *) ***** ^ not supported yet ***** ^ not supported yet 1029 THEN 1030 SelectInvoiceFromList(PrnList,FALSE); (* take selected *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1031 IF CurrentInvoice.INVOICE[0] = 0C (* nothing selected *) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1032 THEN 1033 GetElmtAdr(PrnList,1,P,Size,Code); (* or take the first *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1034 CurrentInvoice := P^.Invoice; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1035 ReadDBRec(InvoiceDBF,P^.LI); (* set the file to correct invoice*) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1036 PymtAmount := 0.0; ***** ^ not supported yet 1037 1038 END; 1039 ELSE 1040 GetElmtAdr(PrnList,1,P,Size,Code); (* or take the first *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1041 CurrentInvoice := P^.Invoice; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1042 ReadDBRec(InvoiceDBF,P^.LI); (* set the file to correct invoice*) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1043 END; 1044 ListDelete(PrnList,ElmtNow(PrnList),1);(* delete the chosen invoice from the list *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1045 Remaining := PymtAmount - CurrentInvoice.AMTOUT; ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1046 1047 1048 IF PymtAmount >= CurrentInvoice.AMTOUT ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1049 THEN 1050 MakePayment(CurrentInvoice.INVOICE,PymtDate,CurrentInvoice.AMTOUT, ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1051 CheckNbr,CurrentInvoice.CUSTID); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1052 CurrentInvoice.AMTOUT := 0.0; (* pay in full *) ***** ^ undeclared identifier ***** ^ not supported yet 1053 CurrentInvoice.INVPRNT := 'C'; (* closed *) ***** ^ undeclared identifier ***** ^ not supported yet 1054 PostSales(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1055 DeleteInvItems(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1056 ELSE 1057 MakePayment(CurrentInvoice.INVOICE,PymtDate,PymtAmount, ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1058 CheckNbr,CurrentInvoice.CUSTID); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1059 CurrentInvoice.AMTOUT := CurrentInvoice.AMTOUT - PymtAmount; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1060 IF CurrentInvoice.AMTOUT < 0.01 (* rounding remainder *) ***** ^ undeclared identifier ***** ^ not supported yet 1061 THEN 1062 CurrentInvoice.AMTOUT := 0.0; ***** ^ undeclared identifier ***** ^ not supported yet 1063 CurrentInvoice.INVPRNT := 'C'; (* close *) ***** ^ undeclared identifier ***** ^ not supported yet 1064 PostSales(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1065 DeleteInvItems(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1066 END; 1067 END; 1068 MoveInvoiceToDBF(CurrentInvoice); ***** ^ not supported yet ***** ^ undeclared identifier 1069 WriteDBRec(InvoiceDBF); ***** ^ not supported yet ***** ^ not supported yet 1070 IF FldRec.selected AND (Remaining > 0.01) (* manual invoice entry *) ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1071 THEN 1072 DisplayInvList(PrnList); (* display remaining invoice *) ***** ^ not supported yet ***** ^ not supported yet 1073 END; 1074 PymtAmount := Remaining; ***** ^ not supported yet ***** ^ not supported yet 1075 UNTIL (PymtAmount < 0.01); (* go through until out of money *) ***** ^ not supported yet 1076 CloseDisplayFrame(PymtDF); ***** ^ not supported yet ***** ^ not supported yet 1077 ClosePaymentsDBF(); ***** ^ not supported yet ***** ^ not supported yet 1078 CloseOrderDBF(); ***** ^ not supported yet ***** ^ not supported yet 1079 IF NOT FldRec.selected ***** ^ not supported yet ***** ^ not supported yet 1080 THEN (* remove for automatic payments *) 1081 CloseDisplayFrame(SummaryDF); ***** ^ not supported yet ***** ^ undeclared identifier 1082 END; 1083 DisposeList(PrnList); ***** ^ not supported yet ***** ^ not supported yet 1084 CloseInvoiceDBF(); ***** ^ not supported yet ***** ^ not supported yet 1085 END PayInvoice; ***** ^ not supported yet 1086 1087 PROCEDURE CancelInvoice(); 1088 VAR 1089 CustID : ARRAY[0..10] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 1090 TheList : GenList; 1091 J : CARDINAL; 1092 Size,Code : CARDINAL; 1093 BEGIN 1094 FOR J := 1 TO ListLength(OrderItemLst) DO ***** ^ not supported yet ***** ^ undeclared identifier 1095 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 1096 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1097 THEN 1098 CurrentItem^.InventoryItem.ONHAND := ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1099 CurrentItem^.InventoryItem.ONHAND+CurrentItem^.ItemOrderRec.QNTSOLD; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1100 CurrentItem^.ItemOrderRec.QNTSOLD := 0.0; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1101 UpdateInventory(); ***** ^ not supported yet ***** ^ not supported yet 1102 END; 1103 END; 1104 DeleteGasFromInv(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1105 DeleteInvItems(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1106 CurrentInvoice.INVPRNT := 'X'; ***** ^ undeclared identifier ***** ^ not supported yet 1107 HeaderChanged := TRUE; ***** ^ undeclared identifier 1108 END CancelInvoice; ***** ^ not supported yet 1109 1110 1111 1112 PROCEDURE SaveInvoice(); 1113 (* save the invoice header - replace if one is already there*) 1114 VAR 1115 1116 BEGIN 1117 IF NOT HeaderChanged ***** ^ undeclared identifier 1118 THEN RETURN; 1119 END; 1120 IF NOT FindInvoiceByInvoice(CurrentInvoice.INVOICE) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1121 THEN 1122 AppendBlank(InvoiceDBF); ***** ^ not supported yet ***** ^ not supported yet 1123 END; 1124 MoveInvoiceToDBF(CurrentInvoice); ***** ^ not supported yet ***** ^ undeclared identifier 1125 WriteDBRec(InvoiceDBF); ***** ^ not supported yet ***** ^ not supported yet 1126 END SaveInvoice; ***** ^ not supported yet 1127 1128 1129 1130 PROCEDURE SaveItems(); 1131 (* go through the items list and save the items 1132 Then go through the inventory list and update the 1133 inventory records 1134 *) 1135 VAR 1136 OldList : GenList; 1137 TmpItem : OrderRec; 1138 Code: CARDINAL; 1139 L : LONGINT; 1140 J, Size,LL : CARDINAL; 1141 K : CARDINAL; 1142 Inv : InvtryRec; 1143 BEGIN 1144 IF NOT ItemsChanged (* if nothing changed - dont resave the items*) 1145 THEN 1146 DisposeList(OrderItemLst); ***** ^ not supported yet ***** ^ undeclared identifier 1147 RETURN; 1148 END; 1149 1150 NewList(OldList); (* first delete any existing entries *) ***** ^ not supported yet ***** ^ not supported yet 1151 1152 (* find the position of the inventory item id in the record *) 1153 (* so I can adjust the inventory amount by the deleted record *) 1154 (* must do this in the case of the update changing the quanity *) 1155 DeleteInvItems(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1156 1157 (* now update with the new entries *) 1158 1159 1160 LL := ListLength(OrderItemLst); ***** ^ not supported yet ***** ^ undeclared identifier 1161 FOR J := 1 TO LL DO 1162 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 1163 AppendBlank(OrderDBF); ***** ^ not supported yet ***** ^ not supported yet 1164 MoveOrderToDBF(CurrentItem^.ItemOrderRec); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1165 WriteDBRec(OrderDBF); ***** ^ not supported yet ***** ^ not supported yet 1166 1167 1168 END; 1169 END SaveItems; ***** ^ not supported yet 1170 1171 1172 1173 1174 1175 1176 1177 PROCEDURE AddInvoice(); 1178 VAR 1179 Weekday,mmddyy : ARRAY[0..15] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 1180 BEGIN 1181 CurrInvOldAmt := 0.0; ***** ^ undeclared identifier 1182 Fill(ADR(CurrentInvoice),SIZE(CurrentInvoice),0); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1183 GetCustNbr(CurrentInvoice.CUSTID); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1184 GetCustSalesRep(CurrentInvoice.SALESMAN); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1185 GetCustTerms(CurrentInvoice.TERMS); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1186 GetCustShipVia(CurrentInvoice.SHIPVIA); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1187 GetCustDisCntLvl(CurrentInvoice.DFLTLVL); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1188 GetCustTaxable(CurrentInvoice.TAXABLE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1189 GetCustFreeFrght(CurrentInvoice.FREEFRGHT); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1190 IF CurrentInvoice.DFLTLVL < 0 ***** ^ undeclared identifier ***** ^ not supported yet 1191 THEN CurrentInvoice.DFLTLVL := 1 ***** ^ undeclared identifier ***** ^ not supported yet 1192 ELSIF CurrentInvoice.DFLTLVL > 3 ***** ^ undeclared identifier ***** ^ not supported yet 1193 THEN CurrentInvoice.DFLTLVL := 3; ***** ^ undeclared identifier ***** ^ not supported yet 1194 END; 1195 GetCustDisAmount(CurrentInvoice.INVDSCNT); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1196 MakeSeqNbr('Invoice',Config.InvoicePre,CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1197 CrunchBlanks(CurrentInvoice.INVOICE); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1198 CurrentInvoice.INVDATE := Today; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1199 CurrentInvoice.INVPRNT := 'O'; (* invoice opened *) ***** ^ undeclared identifier ***** ^ not supported yet 1200 NewList(OrderItemLst); ***** ^ not supported yet ***** ^ undeclared identifier 1201 UpdateInvHeader(); ***** ^ not supported yet ***** ^ not supported yet 1202 HeaderChanged := TRUE; ***** ^ undeclared identifier 1203 AddItems(CurrentInvoice); (* get inventory items *) ***** ^ not supported yet ***** ^ undeclared identifier 1204 1205 END AddInvoice; ***** ^ not supported yet 1206 1207 1208 1209 PROCEDURE ControlInvoice( CtlType : CHAR); 1210 VAR InvNbr : ARRAY[0..10] OF CHAR; ***** ^ not supported yet ***** ^ not supported yet 1211 FldNum : CARDINAL; 1212 FldRec : InputFieldRecord; 1213 CtrlInv : BOOLEAN; 1214 Size, Code : CARDINAL; 1215 BEGIN 1216 CtrlInv := TRUE; 1217 HeaderChanged := FALSE; ***** ^ undeclared identifier 1218 ItemsChanged := FALSE; 1219 NewList(OrderItemLst); ***** ^ not supported yet ***** ^ undeclared identifier 1220 InitDisplayFrame(InvoiceHeadDF,CurrentWindow); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1221 ReadDisplayFrame(PMIScreens,InvoiceHeadDF,'InvHeader'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1222 OpenOrderDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 1223 OpenInvoiceDBF(TRUE); ***** ^ not supported yet ***** ^ not supported yet 1224 IF (CtlType # 'N') 1225 THEN SelectInvoice(); (* always select one if not new *) ***** ^ not supported yet ***** ^ not supported yet 1226 IF CurrentInvoice.INVOICE[0] = 0C ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1227 THEN RETURN (* no open invoice *) 1228 END; 1229 ELSE AddInvoice(); ***** ^ not supported yet ***** ^ not supported yet 1230 END; 1231 IF (CtlType = 'C') 1232 THEN CancelInvoice(); ***** ^ not supported yet ***** ^ not supported yet 1233 CtrlInv := FALSE; 1234 END; 1235 (* CASE CtlType OF 1236 |'P' : PrintPkg( InvNbr); 1237 |'I' : PrintInv(InvNbr); 1238 |'C' : CancellInv(InvNbr); 1239 1240 END; *) 1241 IF CtrlInv 1242 THEN 1243 NewList(PullDnMenu); ***** ^ not supported yet ***** ^ not supported yet 1244 LoadFrameList(PMIScreens,'InvoiceMain',PullDnMenu); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1245 REPEAT 1246 NextFrame := 'InvoiceMain'; ***** ^ not supported yet ***** ^ not supported yet 1247 ControlSeparately(PullDnMenu,NextFrame,SelChar,EndingFrame); ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet ***** ^ not supported yet 1248 1249 CASE SelChar OF 1250 'H' : ShowDisplayFrame(InvoiceHeadDF,0,0,0,0); (* show bottom part *) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1251 Control(InvoiceHeadDF); (* edit header *) ***** ^ not supported yet ***** ^ undeclared identifier 1252 ReadHeader(); ***** ^ not supported yet ***** ^ not supported yet 1253 Recompute(); ***** ^ not supported yet ***** ^ not supported yet 1254 UpdateInvHeader(); ***** ^ not supported yet ***** ^ not supported yet 1255 ShowDisplayFrame(SummaryDF,0,0,0,0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1256 |'E' : SelectFromSummary(); ***** ^ not supported yet ***** ^ not supported yet 1257 InitDisplayFrame(OrderItemDF,CurrentWindow); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1258 ReadDisplayFrame(PMIScreens,OrderItemDF,'OrderItem'); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1259 ShowDisplayFrame(OrderItemDF,0,0,0,0); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1260 FldNum := FieldNum(OrderItemDF,'Item'); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1261 ItemsChanged := TRUE; (* make sure to update the items*) 1262 GetFieldRec(OrderItemDF,FldNum,FldRec); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1263 FldRec.typ := 'D'; (* make display field *) ***** ^ not supported yet ***** ^ not supported yet 1264 PutFieldRec(FldRec,OrderItemDF,FldNum); ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1265 UpdateOrd(); ***** ^ not supported yet ***** ^ not supported yet 1266 CurrentItem^.OldQuant := CurrentItem^.ItemOrderRec.QNTSOLD; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1267 ControlFrame(OrderItemDF,2,'',FALSE,NextFrame); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1268 ReadScrn(); ***** ^ not supported yet ***** ^ not supported yet 1269 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1270 THEN 1271 IF CurrentItem^.OldQuant <> CurrentItem^.ItemOrderRec.QNTSOLD ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1272 THEN 1273 CurrentItem^.InventoryItem.ONHAND := ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1274 CurrentItem^.InventoryItem.ONHAND+ ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1275 CurrentItem^.OldQuant; ***** ^ undeclared identifier ***** ^ not supported yet 1276 CurrentItem^.ItemOrderRec.NOTES1 := ''; (* zero out back orer*) ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1277 CurrentItem^.ItemOrderRec.NOTES2 := ''; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1278 CurrentItem^.ItemOrderRec.NOTES3 := ''; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1279 UpdateInventory(); ***** ^ not supported yet ***** ^ not supported yet 1280 END; 1281 CloseDisplayFrame(OrderItemDF); ***** ^ not supported yet ***** ^ undeclared identifier 1282 END; 1283 ShowSummary(); ***** ^ not supported yet ***** ^ not supported yet 1284 |'V' : SelectFromSummary(); (* view items *) ***** ^ not supported yet ***** ^ not supported yet 1285 ShowSummary(); ***** ^ not supported yet ***** ^ not supported yet 1286 |'A' : CloseDisplayFrame(SummaryDF); ***** ^ not supported yet ***** ^ undeclared identifier 1287 AddItems(CurrentInvoice); ***** ^ not supported yet ***** ^ undeclared identifier 1288 |'D' : SelectFromSummary(); ***** ^ not supported yet ***** ^ not supported yet 1289 GetElmtAdr(OrderItemLst,ElmtNow(OrderItemLst),CurrentItem,Size,Code); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ undeclared identifier ***** ^ not supported yet 1290 1291 IF NOT Special(CurrentItem^.ItemOrderRec.ITEMNBR) ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1292 THEN 1293 CurrentItem^.InventoryItem.ONHAND := ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1294 CurrentItem^.InventoryItem.ONHAND+CurrentItem^.ItemOrderRec.QNTSOLD; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1295 CurrentItem^.ItemOrderRec.QNTSOLD := 0.0; ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ not supported yet 1296 UpdateInventory(); ***** ^ not supported yet ***** ^ not supported yet 1297 END; 1298 ListDelete(OrderItemLst,ElmtNow(OrderItemLst),1); ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet ***** ^ undeclared identifier ***** ^ not supported yet 1299 ShowSummary(); ***** ^ not supported yet ***** ^ not supported yet 1300 ItemsChanged := TRUE; 1301 |'P' : (*SelectFromSummary(); *) 1302 PrintInvoice(FALSE); ***** ^ not supported yet ***** ^ not supported yet 1303 |'K' : (* Print Packing slip *) 1304 (* SelectFromSummary(); *) 1305 PrintInvoice(TRUE); ***** ^ not supported yet ***** ^ not supported yet 1306 |'C' : IF PromptYN('About to cancel invoice - continue',InvoiceHeadDF) ***** ^ not supported yet ***** ^ not supported yet ***** ^ undeclared identifier 1307 THEN 1308 CancelInvoice (); ***** ^ not supported yet ***** ^ not supported yet 1309 SelChar := 'X'; 1310 END; 1311 1312 1313 END; 1314 1315 UNTIL SelChar='X'; (* Assumes 'X' is only used to exit *) 1316 END; (* end if control *) 1317 1318 (* ClearScreen(); *) 1319 CloseDisplayFrame(InvoiceHeadDF); ***** ^ not supported yet ***** ^ undeclared identifier 1320 SaveInvoice(); ***** ^ not supported yet ***** ^ not supported yet 1321 SaveItems(); ***** ^ not supported yet ***** ^ not supported yet 1322 CloseInvoiceDBF(); ***** ^ not supported yet ***** ^ not supported yet 1323 CloseOrderDBF(); ***** ^ not supported yet ***** ^ not supported yet 1324 END ControlInvoice; ***** ^ not supported yet 1325 1326 1327 END Invoice. ***** ^ not supported yet 1941 errors