| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049 |
- Listing:
- 1 IMPLEMENTATION MODULE Customer;
- 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
- 13 FROM ModBase3 IMPORT UpdateDBFile,WriteDBRec,DeleteRecord,ReadDBRec,
- 14 AppendBlank;
- 15 FROM PMIGlobals IMPORT PMIScreens,Config,NormalTitle;
- 16 FROM DBStuff IMPORT MakeSeqNbr,MakeKey;
- 17 FROM DBUtils IMPORT ChangeDateField,ChangeRealField,PrintTitle;
- 18 FROM Scrn2DBF IMPORT FrameToDBF, DBFToFrame;
- 19 FROM NumTypes IMPORT Real8;
- 20 FROM DateFunctions IMPORT Date;
- 21 FROM Numbers IMPORT Max;
- 22 FROM PosUtils IMPORT Equal;
- 23 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append,CAPstr,
- 24 AssignStr,DeleteChar;
- 25 FROM M2Strings IMPORT Length,Assign,Concat;
- 26 FROM LowLevel IMPORT Fill;
- 27 FROM StringIO IMPORT PrintMessage,ErrorMessage,WriteEol,WriteStr;
- 28 (* these next two are from stonybrook - the pmi version doesn't work*)
- 29
- 30 FROM SmartScreen IMPORT ClearScreen;
- 31 FROM ScrnUtl1 IMPORT FieldNum;
- 32 FROM ScrnUtl2 IMPORT CloseDisplayFrame;
- 33 FROM VWindows IMPORT ClearPart, CurrentWindow, SetCursorHeight;
- 34 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame,AFrameName,DisplayFile;
- 35 FROM FramePainter IMPORT ShowDisplayFrame,RedrawField;
- 36 FROM InputManager IMPORT ControlFrame;
- 37 FROM FrameManager IMPORT EraseFrame;
- 38 FROM Prompts IMPORT Prompt,PromptStr,PromptNum,PromptYN;
- 39 FROM SYSTEM IMPORT ADR,SIZE,ADDRESS;
- 40 FROM ControlUtils IMPORT ControlSeparately, LoadFrameList,Control,ChangeField;
- 41 FROM DspFiles IMPORT OpenDisplayFile,ReadDisplayFrame;
- 42 FROM HandleIO IMPORT FileExists,OpenFile,CloseHandle;
- 43 FROM Prompts IMPORT Prompt;
- ***** ^ duplicate identifier
- ***** ^ duplicate identifier
- 44 FROM ManualInvoice IMPORT AddManualInvoice;
- 45 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt,
- 46 GetElmtAdr,DisposeList;
- 47
- 48 FROM Invoice IMPORT ControlInvoice,PayInvoice,InvoiceHistory,
- 49 MakeInvoicePrintLine,InvoiceDaysLate,GetOutstanding;
- 50 FROM DBFCustomer IMPORT CustomerDBF, OpenCustomerDBF,
- 51 CloseCustomerDBF,CustomerRec,FindCustomerByCin,FindCustomerByName,
- 52 NextCustomer,PrevCustomer,FirstCustomer,LastCustomer,MoveCustomerFromDBF,
- 53 MoveCustomerToDBF;
- 54 FROM Payments IMPORT ShowPaymentHist;
- 55 FROM Gas IMPORT ListOutstanding,ListHistory;
- 56
- 57 VAR
- 58 Status : INTEGER;
- 59 Environ : ARRAY [0..60] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 60 J : CARDINAL;
- 61 FirstTime: BOOLEAN;
- 62 NextFrame,EndingFrame : AFrameName;
- 63 SelChar : CHAR;
- 64 NoData : BOOLEAN; (* true when no data is on the screen *)
- 65 CustomerDF : DisplayFrame;
- 66 DSPFile : DisplayFile;
- 67 PullDnMenu : GenList;
- 68 CurrentCust : CustomerRec;
- 69
- 70
- 71
- 72 PROCEDURE GetCustNbr( VAR CustNbr : ARRAY OF CHAR);
- ***** ^ not supported yet
- 73 BEGIN
- 74 Assign(CurrentCust.CIN,CustNbr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 75 CrunchBlanks(CustNbr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 76 END GetCustNbr;
- ***** ^ not supported yet
- 77
- 78 PROCEDURE GetCustTerms(VAR Terms : ARRAY OF CHAR);
- ***** ^ not supported yet
- 79 BEGIN
- 80 Assign(CurrentCust.TERMS,Terms );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 81 END GetCustTerms;
- ***** ^ not supported yet
- 82
- 83 PROCEDURE GetCustSalesRep(VAR Rep : ARRAY OF CHAR);
- ***** ^ not supported yet
- 84 BEGIN
- 85 Assign(CurrentCust.SALESREP,Rep );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 86 END GetCustSalesRep;
- ***** ^ not supported yet
- 87
- 88 PROCEDURE GetCustSalesRepCom(VAR Percent : Real8);
- 89 BEGIN
- 90 Percent := CurrentCust.SALEREPCOM;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 91 END GetCustSalesRepCom;
- ***** ^ not supported yet
- 92
- 93 PROCEDURE GetCustShipVia(VAR Ship : ARRAY OF CHAR);
- ***** ^ not supported yet
- 94 BEGIN
- 95 Assign( CurrentCust.SHIPVIA,Ship);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 96 END GetCustShipVia;
- ***** ^ not supported yet
- 97
- 98 PROCEDURE GetCustDisAmount(VAR DcntAmount : Real8);
- 99 BEGIN
- 100 DcntAmount := CurrentCust.DISCAMOUNT;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 101 END GetCustDisAmount;
- ***** ^ not supported yet
- 102
- 103 PROCEDURE GetCustDisCntLvl(VAR DefaultLvl : CARDINAL);
- 104 BEGIN
- 105 DefaultLvl := CurrentCust.DISCLEVEL;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 106 END GetCustDisCntLvl;
- ***** ^ not supported yet
- 107
- 108 PROCEDURE GetCustTaxable(VAR Taxable : CHAR);
- 109 BEGIN
- 110 Taxable := CurrentCust.TAXABLE;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 111 CAPstr(Taxable);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 112 END GetCustTaxable;
- ***** ^ not supported yet
- 113
- 114 PROCEDURE GetCustFreeFrght(VAR FreeFrght : CHAR);
- 115 BEGIN
- 116 FreeFrght := CurrentCust.FREEFRGHT;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 117 CAPstr(FreeFrght);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 118 END GetCustFreeFrght;
- ***** ^ not supported yet
- 119
- 120
- 121 PROCEDURE GetCustAddr(VAR Addr : AddressRec; AddrType : AddressTypes);
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 122 VAR J : CARDINAL;
- 123 BEGIN
- 124 Fill(ADR(Addr),SIZE(Addr),0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 125 J := 1;
- 126 WITH CurrentCust DO
- ***** ^ not supported yet
- 127 IF AddrType = Billing
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 128 THEN
- 129 Assign(NAME,Addr.Line[0]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 130 Assign( BILLTOZP,Addr.ZipCode);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 131 Assign( BILLTOA1,Addr.Line[1]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 132 CrunchBlanks(Addr.Line[1]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 133 IF Length(Addr.Line[1]) > 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 134 THEN INC(J);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 135 END;
- 136 Assign( BILLTOA2,Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 137 CrunchBlanks(Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 138 IF Length(Addr.Line[J]) > 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 139 THEN INC(J);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 140 END;
- 141 Assign( BILLTOA3,Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 142 CrunchBlanks(Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 143 IF Length(Addr.Line[J]) = 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 144 THEN DEC(J);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 145 END;
- 146 Append(Addr.Line[J],' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 147 Append(Addr.Line[J],BILLTOZP);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 148 ELSE
- 149 Assign( NAME,Addr.Line[0]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 150 Assign( SHIPTOZP,Addr.ZipCode);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 151 Assign( SHIPTOA1,Addr.Line[1]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 152 CrunchBlanks(Addr.Line[1]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 153 IF Length(Addr.Line[1]) > 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 154 THEN INC(J);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 155 END;
- 156 Assign( SHIPTOA2,Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 157 CrunchBlanks(Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 158 IF Length(Addr.Line[J]) > 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 159 THEN INC(J);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 160 END;
- 161 Assign( SHIPTOA3,Addr.Line[J] );
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 CrunchBlanks(Addr.Line[J]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 163 IF Length(Addr.Line[J]) = 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 164 THEN DEC(J);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 165 END;
- 166 Append(Addr.Line[J],' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 167 Append(Addr.Line[J],' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 168 Append(Addr.Line[J],SHIPTOZP);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 169 END;
- 170 END; (* end of with *)
- ***** ^ not supported yet
- 171 END GetCustAddr;
- ***** ^ not supported yet
- 172
- 173 PROCEDURE GetCurrCustName(VAR Name : ARRAY OF CHAR);
- ***** ^ not supported yet
- 174 BEGIN
- 175 Assign( CurrentCust.NAME,Name);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 176 END GetCurrCustName;
- ***** ^ not supported yet
- 177
- 178 PROCEDURE SetCustomerRec(Cust : CustomerRec);
- 179 BEGIN
- 180 CurrentCust := Cust;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 181 END SetCustomerRec;
- ***** ^ not supported yet
- 182
- 183 PROCEDURE UpdateCustomerFile();
- 184 BEGIN
- 185 MoveCustomerToDBF(CurrentCust);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 186 WriteDBRec(CustomerDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 187 END UpdateCustomerFile;
- ***** ^ not supported yet
- 188
- 189
- 190 PROCEDURE SetCustLastInvDate( D : Date);
- 191 BEGIN
- 192 CurrentCust.LASTINV := D;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 193 ChangeDateField(CustomerDF,D,'LASTINV');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 194 (* RedrawField(CustomerDF,FieldNum(CustomerDF,'LASTINV'),FALSE); *)
- 195 UpdateCustomerFile();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 196 END SetCustLastInvDate;
- ***** ^ not supported yet
- 197
- 198 PROCEDURE SetCustOutStd(AmountOut : Real8);
- 199 BEGIN
- 200 CurrentCust.AMTOUT := AmountOut;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 201 ChangeRealField(CustomerDF,AmountOut,'AMTOUT');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 202 RedrawField(CustomerDF,FieldNum(CustomerDF,'AMTOUT'),FALSE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 203 UpdateCustomerFile();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 204 END SetCustOutStd;
- ***** ^ not supported yet
- 205
- 206 PROCEDURE AddCustOutStd(AmountOut : Real8);
- 207 BEGIN
- 208 CurrentCust.AMTOUT := CurrentCust.AMTOUT + AmountOut;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 209 ChangeRealField(CustomerDF,CurrentCust.AMTOUT,'AMTOUT');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 210 RedrawField(CustomerDF,FieldNum(CustomerDF,'AMTOUT'),FALSE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 211 UpdateCustomerFile();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 212 END AddCustOutStd;
- ***** ^ not supported yet
- 213
- 214 PROCEDURE AddCustYTD(AddAmount : Real8);
- 215 BEGIN
- 216 CurrentCust.YTDPURCH := CurrentCust.YTDPURCH + AddAmount;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 217 IF CurrentCust.YTDPURCH < 0.0
- ***** ^ not supported yet
- ***** ^ not supported yet
- 218 THEN
- 219 CurrentCust.YTDPURCH := 0.0;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 220 END;
- 221 ChangeRealField(CustomerDF,CurrentCust.YTDPURCH,'YTDPURCH');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 222 (* RedrawField(CustomerDF,FieldNum(CustomerDF,'YTDPURCH'),FALSE); *)
- 223 UpdateCustomerFile();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 224 END AddCustYTD;
- ***** ^ not supported yet
- 225
- 226 PROCEDURE GetCustName(CIN : ARRAY OF CHAR; VAR Name : ARRAY OF CHAR);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 227 VAR
- 228 TMP : CustomerRec;
- 229 BEGIN
- 230 MakeKey(CIN);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 231 IF NOT FindCustomerByCin(CIN)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 232 THEN AssignStr( '?????',Name);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 233 ELSE
- 234 MoveCustomerFromDBF(CurrentCust);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 235 Assign(CurrentCust.NAME,Name);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 236 END;
- 237 END GetCustName;
- ***** ^ not supported yet
- 238
- 239 PROCEDURE PrintLabels();
- 240 (* print shipping labels*)
- 241
- 242 CONST
- 243 ShipLines = CHR(12);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 244 FF = CHR(12);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 245
- 246 NorLength = CHR(66);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 247 (* L1:=ARRAY OF CHAR (CHR(27),'C');
- 248 L2:ARRAY OF CHAR=[CHR(27),'C',NorLength]; *)
- 249 VAR
- 250 Cnt : CARDINAL;
- 251 J,K : CARDINAL;
- 252 PrtHand : CARDINAL;
- 253 EM : ErrorMessage;
- 254 Addr : AddressRec;
- ***** ^ undeclared identifier
- 255 L1 : ARRAY[0..2] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 256 L2 : ARRAY[0..3] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 257 BEGIN
- 258 Concat(27C,'C',L1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 259 Concat(L1,NorLength,L2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 260 Cnt := PromptNum(' Enter number of labels to print ',1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 261 EM := OpenFile(PrtHand,Config.LabelPrt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 262 (* put the form length here *)
- 263 (* WriteStr(PrtHand,L1); *) (* set form length to lenght of lables*)
- 264 WriteStr(PrtHand,CHAR(18));
- ***** ^ not supported yet
- ***** ^ not supported yet
- 265 FOR J := 1 TO Cnt DO
- 266 WriteStr(PrtHand,'FROM ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 267 WriteEol(PrtHand,Config.CompanyName);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 268 WriteStr(PrtHand,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 269 WriteEol(PrtHand,Config.CompanyAddr1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 270 WriteStr(PrtHand,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 271 WriteEol(PrtHand,Config.CompanyAddr2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 272 WriteEol(PrtHand,''); (* go to the from part *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 273 WriteEol(PrtHand,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 274 WriteEol(PrtHand,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 275 WriteEol(PrtHand,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 276 WriteEol(PrtHand,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 277 WriteStr(PrtHand,'TO ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 278 GetCustAddr(Addr,Shipping);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 279 FOR K := 0 TO 3 DO
- 280 WriteEol(PrtHand,Addr.Line[K]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 281 WriteStr(PrtHand,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 282 END;
- 283 FOR K := 1 TO 6 DO
- 284 WriteEol(PrtHand,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 285 END;
- 286 END;
- 287 (* WriteStr(PrtHand,L2); (* reset lenght at 66 lines / inch *)*)
- 288 EM := CloseHandle(PrtHand);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 289 END PrintLabels;
- ***** ^ not supported yet
- 290
- 291
- 292
- 293 PROCEDURE FileMenu(SelChar: CHAR);
- 294 VAR
- 295 B : BOOLEAN;
- 296 Str : ARRAY [0..80] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 297 BEGIN
- 298 CASE SelChar OF
- 299 'A' : ReadDisplayFrame(PMIScreens,CustomerDF,'Customer'); (*Clear out any of the fields *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 300 MakeSeqNbr('Cust',Config.CustNbrPre,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 301 ChangeField(CustomerDF,Str,'CIN',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 302 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 303 Control(CustomerDF); (* alow user input *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 304 AppendBlank(CustomerDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 305 B := FrameToDBF(CustomerDBF,CustomerDF); (* do something if couldn't add*)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 306 MoveCustomerFromDBF(CurrentCust);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 307 WITH CurrentCust DO
- ***** ^ not supported yet
- 308 CrunchBlanks(BILLTOA1);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 309 IF (BILLTOA1[0] = CHR(0))
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 310 THEN
- 311 Assign( SHIPTOA1,BILLTOA1);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 312 Assign( SHIPTOA2,BILLTOA2);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 313 Assign(SHIPTOA3,BILLTOA3 );
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 314 Assign( SHIPTOZP,BILLTOZP);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 315 MoveCustomerToDBF(CurrentCust);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 316
- 317 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 318 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 319 END;
- 320 END; (* end of with *)
- ***** ^ not supported yet
- 321
- 322 WriteDBRec(CustomerDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 323
- 324 |'F' : FirstCustomer();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 325 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 326 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 327 |'L' : LastCustomer();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 328 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 329 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 330
- 331 |'N' : IF NextCustomer()
- ***** ^ not supported yet
- ***** ^ not supported yet
- 332 THEN
- 333 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 334 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 335 END;
- 336
- 337 |'P' : IF PrevCustomer()
- ***** ^ not supported yet
- ***** ^ not supported yet
- 338 THEN
- 339 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 340 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 341 END;
- 342
- 343
- 344 |'C' : (* The first unused letter in the index name or 'Q' *)
- 345 Fill(ADR(Str),SIZE(Str),0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 346
- 347 PromptStr('Enter Customer Cin ',Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 348
- 349 MakeKey(Str);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 350 IF NOT FindCustomerByCin(Str)
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 351 THEN
- 352 Prompt('Customer Not Found');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 353 ELSE
- 354 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 355 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 356 END;
- 357
- 358
- 359 |'M' : (* The first unused letter in the index name or 'Q' *)
- 360 Fill(ADR(Str),SIZE(Str),0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 361
- 362 PromptStr('Enter Customer Nameidx ',Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 363
- 364 MakeKey(Str);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 365 IF NOT FindCustomerByName(Str)
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 366 THEN (* always display the cust or the closet one *)
- 367 END;
- 368 DBFToFrame(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 369 ShowDisplayFrame(CustomerDF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 370 END; (* end of case *)
- 371 END FileMenu;
- ***** ^ not supported yet
- 372
- 373 PROCEDURE EditMenu(SelChar : CHAR);
- 374 VAR
- 375 B : BOOLEAN;
- 376 BEGIN
- 377 CASE SelChar OF
- 378 'U' : Control(CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 379 B := FrameToDBF(CustomerDBF,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 380 WriteDBRec(CustomerDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 381 |'D' : IF PromptYN('About to delete customer - continue ?',CustomerDF)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 382 THEN
- 383 DeleteRecord(CustomerDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 384 B :=NextCustomer();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 385 FileMenu('P');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 386 END;
- 387 END;
- 388 END EditMenu;
- ***** ^ not supported yet
- 389
- 390
- 391 PROCEDURE InvoiceMenu(SelChar: CHAR);
- 392 VAR
- 393 Inv : ARRAY[0..15] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 394 BEGIN
- 395 MoveCustomerFromDBF(CurrentCust);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 396 CASE SelChar OF
- 397 'A' : ControlInvoice('N');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 398 |'E' : ControlInvoice('E'); (*edit invoice *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 399 |'P' : ControlInvoice('P');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 400 |'C' : ControlInvoice('C');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 401 |'Y' : PayInvoice();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 402 |'M' : AddManualInvoice();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 403
- 404
- 405 END; (* end of case *)
- 406 ShowDisplayFrame(CustomerDF,0,0,0,0); (* clear out the invoice stuff*)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 END InvoiceMenu;
- ***** ^ not supported yet
- 408
- 409 PROCEDURE PrintMenu(SelChar : CHAR);
- 410 BEGIN
- 411 MoveCustomerFromDBF(CurrentCust);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 412 CrunchBlanks(CurrentCust.CIN);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 413 CASE SelChar OF
- 414 'H' : ListOutstanding(CurrentCust.CIN);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 415 |'L' : PrintLabels();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 416 |'E' : ListHistory(CurrentCust.CIN,CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 417 |'Y' : ShowPaymentHist(CurrentCust.CIN);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 418 |'V' : InvoiceHistory();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 419 END;
- 420 END PrintMenu;
- ***** ^ not supported yet
- 421
- 422 PROCEDURE ControlCustomer();
- 423 BEGIN
- 424 (* OpenCustomerDBF(TRUE); *)
- 425 ClearScreen();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 426 InitDisplayFrame(CustomerDF,CurrentWindow);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 427 NewList(PullDnMenu);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 428 LoadFrameList(PMIScreens,'TopMenu',PullDnMenu);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 429 NoData := TRUE;
- 430 ReadDisplayFrame(PMIScreens,CustomerDF,'Customer');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 431 REPEAT
- 432 NextFrame := 'TopMenu';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 433 ControlSeparately(PullDnMenu,NextFrame,SelChar,EndingFrame);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 434 IF Equal(EndingFrame,'FileMenu')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 435 THEN FileMenu(SelChar);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 436 ELSIF Equal(EndingFrame,'EditMenu')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 437 THEN EditMenu(SelChar);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 438 ELSIF Equal(EndingFrame,'InvoiceMenu')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 439 THEN InvoiceMenu(SelChar);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 440 ELSIF Equal(EndingFrame,'PrintMenu')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 441 THEN PrintMenu(SelChar);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 442 END;
- 443
- 444 UNTIL SelChar='X'; (* Assumes 'X' is only used to exit *)
- 445 CloseDisplayFrame(CustomerDF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 446 (* CloseCustomerDBF();*)
- 447 ClearScreen();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 448
- 449
- 450 END ControlCustomer;
- ***** ^ not supported yet
- 451
- 452 END Customer.
- ***** ^ not supported yet
- 591 errors
|