| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558 |
- Listing:
- 1 IMPLEMENTATION MODULE PMIGlobals;
- 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 EnvironUtils IMPORT GetDate;
- 13 FROM DateFunctions IMPORT DatePlusDays,DateToStr,DayOfWeek,DaysSince1900;
- 14 FROM PosUtils IMPORT Equal;
- 15 FROM HandleIO IMPORT CreateFile,OpenFile,BlockRead,BlockWrite,FileExists;
- 16 FROM ScrnTypes IMPORT DisplayFrame,InitDisplayFrame;
- 17 FROM DspFiles IMPORT ReadDisplayFrame;
- 18 FROM ScrnUtl2 IMPORT CloseDisplayFrame;
- 19 FROM LowLevel IMPORT Fill;
- 20 FROM StrEdit IMPORT CrunchBlanks,Center,AssignStr;
- 21 FROM FramePainter IMPORT ShowDisplayFrame;
- 22 FROM ControlUtils IMPORT ChangeField,ReadInput,Control;
- 23 FROM DBUtils IMPORT ChangeCardField,ChangeRealField,
- 24 ReadCardField,ReadRealField;
- 25 FROM VWindows IMPORT CurrentWindow;
- 26 FROM StringIO IMPORT ErrorMessage;
- 27 FROM SYSTEM IMPORT ADR,SIZE;
- 28 FROM HandleIO IMPORT BlockRead, BlockWrite, CloseHandle, CreateFile,
- ***** ^ duplicate identifier
- ***** ^ duplicate identifier
- ***** ^ duplicate identifier
- ***** ^ duplicate identifier
- 29 FileExists, FileOffSet, OpenFile, SetFilePtr;
- ***** ^ duplicate identifier
- ***** ^ duplicate identifier
- 30 FROM DBUtils IMPORT PrintTitle;
- ***** ^ duplicate identifier
- 31 PROCEDURE EditConfig();
- 32 VAR
- 33 DF : DisplayFrame;
- 34 H : CARDINAL;
- 35 NextInvNbr : CARDINAL; (* updated only for display and reset *)
- 36 NextCustNbr : CARDINAL;
- 37 NextPONbr : CARDINAL;
- 38 EM : ErrorMessage;
- 39 BEGIN
- 40 InitDisplayFrame(DF,CurrentWindow);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 41 ReadDisplayFrame(PMIScreens,DF,'PMIConfig');
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 42 EM := OpenFile(H,'Inseq');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 43 EM := BlockRead(H,ADR(NextInvNbr),SIZE(NextInvNbr));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 44 EM := CloseHandle(H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 45
- 46 EM := OpenFile(H,'Cuseq');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 47 EM := BlockRead(H,ADR(NextCustNbr),SIZE(NextCustNbr));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 48 EM := CloseHandle(H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 49
- 50 EM := OpenFile(H,'POseq');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 51 EM := BlockRead(H,ADR(NextPONbr),SIZE(NextPONbr));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 52 EM := CloseHandle(H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 53
- 54
- 55 WITH Config DO
- ***** ^ undeclared identifier
- 56 ChangeField(DF,CompanyName,'CompanyName',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 57 ChangeField(DF,CompanyAddr1,'Address1',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 58 ChangeField(DF,CompanyAddr2,'Address2',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 59 ChangeField(DF,Phone,'Phone',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 60 ChangeField(DF,InvoicePrt,'invprn',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 61 ChangeField(DF,PksSlipPrt,'pkgprn',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 62 ChangeField(DF,ReportPrt,'rptprn',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 63 ChangeField(DF,LabelPrt,'labprn',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 64 ChangeField(DF,InvoicePre,'PreInvoice',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 65 ChangeField(DF,PurchOrdPre,'PrePONbr',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 66 ChangeField(DF,CustNbrPre,'PreCust',TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 67 ChangeRealField(DF,TaxRate,'TaxRate');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 68 ChangeCardField(DF,NextInvNbr,'NxtInvoice');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 69 ChangeCardField(DF,NextCustNbr,'NxtCust');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 70 ChangeCardField(DF,NextPONbr,'NxtPONbr');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 71 ChangeRealField(DF,OvertimeCharge,'GasChg');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 72 ChangeCardField(DF,KeepPaymentHist,'KeepDays');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 73 ShowDisplayFrame(DF,0,0,0,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 74 Control(DF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 75
- 76 ReadInput(DF,CompanyName,'CompanyName');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 77 ReadInput(DF,CompanyAddr1,'Address1');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 78 ReadInput(DF,CompanyAddr2,'Address2');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 79 ReadInput(DF,Phone,'Phone');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 80 ReadInput(DF,InvoicePrt,'invprn');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 81 ReadInput(DF,PksSlipPrt,'pkgprn');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 82 ReadInput(DF,ReportPrt,'rptprn');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 83 ReadInput(DF,LabelPrt,'labprn');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 84 ReadInput(DF,InvoicePre,'PreInvoice');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 85 ReadInput(DF,CustNbrPre,'PreCust');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 86 ReadInput(DF,PurchOrdPre,'PrePONbr');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 87 ReadRealField(DF,TaxRate,'TaxRate');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 88 ReadCardField(DF,NextInvNbr,'NxtInvoice');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 89 ReadCardField(DF,NextPONbr,'NxtPONbr');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 90 ReadCardField(DF,NextCustNbr,'NxtCust');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 91 ReadCardField(DF,KeepPaymentHist,'KeepDays');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 92 ReadRealField(DF,OvertimeCharge,'GasChg');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 93
- 94 END; (* end with *)
- ***** ^ not supported yet
- 95 EM := OpenFile(H,'PMI.cfg');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 96 EM := BlockWrite(H,ADR(Config),SIZE(Config));
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 97 EM := CloseHandle(H);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 98
- 99 EM := OpenFile(H,'Inseq');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 100 EM := BlockWrite(H,ADR(NextInvNbr),SIZE(NextInvNbr));
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 101 EM := CloseHandle(H);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 102
- 103 EM := OpenFile(H,'POSeq');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 104 EM := BlockWrite(H,ADR(NextPONbr),SIZE(NextPONbr));
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 105 EM := CloseHandle(H);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 106
- 107
- 108
- 109 EM := OpenFile(H,'Cuseq');
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 110 EM := BlockWrite(H,ADR(NextCustNbr),SIZE(NextCustNbr));
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 111 EM := CloseHandle(H);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 112
- 113 CloseDisplayFrame(DF);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 114 END EditConfig;
- ***** ^ not supported yet
- 115
- 116 PROCEDURE NormalTitle(VAR LastLine : ARRAY OF CHAR);
- ***** ^ not supported yet
- 117 VAR
- 118 J : CARDINAL;
- 119 BEGIN
- 120 AssignStr(PrintTitle[0], Config.CompanyName);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 121 AssignStr(PrintTitle[1], Config.CompanyAddr1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 122 AssignStr(PrintTitle[2], Config.CompanyAddr2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 123 AssignStr(PrintTitle[3], Config.Phone);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 124 PrintTitle[4,0] := CHR(0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 125 AssignStr(PrintTitle[5], TodayStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 126 AssignStr(PrintTitle[6], LastLine);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 127 FOR J := 0 TO 6 DO
- 128 CrunchBlanks(PrintTitle[J]);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 129 Center(PrintTitle[J],79);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 130 END;
- 131 END NormalTitle;
- ***** ^ not supported yet
- 132
- 133 PROCEDURE OpenReportDevice() : CARDINAL;
- 134 VAR EM : CARDINAL;
- 135 Handle : CARDINAL;
- 136 BEGIN
- 137
- 138 EM := OpenFile(Handle,Config.ReportPrt);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 139 IF EM = 0
- 140 THEN RETURN Handle;
- 141 ELSE RETURN 0;
- 142 END;
- 143 END OpenReportDevice;
- ***** ^ not supported yet
- 144
- 145 PROCEDURE CloseReportDevice(Device : CARDINAL);
- 146 VAR
- 147 EM : CARDINAL;
- 148 BEGIN
- 149 EM := CloseHandle(Device);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 150 END CloseReportDevice;
- ***** ^ not supported yet
- 151
- 152 PROCEDURE GlobalInit();
- 153 VAR
- 154 Str1,Str2 : ARRAY[0..15] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 155 B : BOOLEAN;
- 156 EM : CARDINAL;
- 157 H : CARDINAL;
- 158 BEGIN
- 159 IF FileExists('PMI.CFG')
- ***** ^ not supported yet
- ***** ^ not supported yet
- 160 THEN
- 161 EM := OpenFile(H,'PMI.cfg');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 EM := BlockRead(H,ADR(Config),SIZE(Config));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 163
- 164 ELSE
- 165 Fill(ADR(Config),SIZE(Config),0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 166 EM := CreateFile(H,'PMI.CFG');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 167 EM := BlockWrite(H,ADR(Config),SIZE(Config));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 168 END;
- 169 EM := CloseHandle(H);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 170 GetDate(Today.mo,Today.day,Today.yr,Str2,TodayStr);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 171 DateToStr(Today,TodayStr,B);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 172 TodayP30 := Today;
- ***** ^ undeclared identifier
- ***** ^ undeclared identifier
- 173 TodayDays := DaysSince1900(Today);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 174 DatePlusDays(TodayP30,30,B); (* today plus 30 *)
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 175 DayOfWeek(TodayP30,Str1);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 176 IF Equal(Str1,'SATURDAY')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 177 THEN DatePlusDays(TodayP30,2,B); (* make due date a weekday *)
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 178 ELSIF Equal(Str2,'SUNDAY')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 179 THEN DatePlusDays(TodayP30,1,B);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 180 END;
- 181 END GlobalInit;
- ***** ^ not supported yet
- 182
- 183 END PMIGlobals.
- ***** ^ not supported yet
- 369 errors
|