| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161116211631164116511661167116811691170117111721173117411751176117711781179118011811182118311841185118611871188118911901191119211931194119511961197119811991200120112021203120412051206120712081209121012111212121312141215121612171218121912201221122212231224122512261227122812291230123112321233123412351236123712381239124012411242124312441245124612471248124912501251125212531254125512561257125812591260126112621263126412651266126712681269127012711272127312741275127612771278127912801281128212831284128512861287128812891290129112921293129412951296129712981299130013011302130313041305130613071308130913101311131213131314131513161317131813191320132113221323132413251326132713281329133013311332133313341335133613371338133913401341134213431344134513461347134813491350135113521353135413551356135713581359136013611362136313641365136613671368136913701371137213731374137513761377137813791380138113821383138413851386138713881389139013911392139313941395139613971398139914001401140214031404140514061407140814091410141114121413141414151416141714181419142014211422142314241425142614271428142914301431143214331434143514361437143814391440144114421443144414451446144714481449145014511452145314541455145614571458145914601461146214631464146514661467146814691470147114721473147414751476147714781479148014811482148314841485148614871488148914901491149214931494149514961497149814991500150115021503150415051506150715081509151015111512151315141515151615171518151915201521152215231524152515261527152815291530 |
- Listing:
- 1 IMPLEMENTATION MODULE InvoicePrint;
- 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 PMIGlobals IMPORT PMIScreens,Today,TodayStr,
- 13 TodayDays,Config,NormalTitle;
- 14 FROM PriceTable IMPORT ClearGrpCnt,AddGrp,GrpTotal,GetPrice,
- 15 GetPriceTable;
- 16 FROM DBFSalesrec IMPORT SalesRec,SalesrecDBF,SalesRecIdx,MoveSalesrecToDBF,
- 17 MoveSalesrecFromDBF,OpenSalesrecDBF,CloseSalesrecDBF;
- 18 FROM DBIndxes IMPORT FindPositionCh,CurrentRec;
- 19 FROM ModBase3 IMPORT AppendBlank,ReadDBRec,WriteDBRec;
- 20 FROM ScrnUtl1 IMPORT FieldNum;
- 21 FROM DBStuff IMPORT MakeKey;
- 22 FROM InputManager IMPORT ControlFrame;
- 23 FROM Customer IMPORT AddressRec,AddCustYTD,GetCustAddr,AddressTypes,
- 24 AddCustOutStd,SetCustLastInvDate;
- 25 FROM DateFunctions IMPORT DateToStr;
- 26 FROM DBFOrder IMPORT OrderRec,InvnbrIdx,OrderDBF,MoveOrderFromDBF;
- 27 FROM PosUtils IMPORT Equal,Pos;
- 28 FROM StrEdit IMPORT CrunchBlanks,DeleteRightJustified,Append,
- 29 CAPstr,OverWrite,RightJustify,Center;
- 30 FROM StrConv IMPORT CardinalToStr,RealToStr,StrToReal;
- 31 FROM M2Strings IMPORT Length,Assign,Concat;
- 32 FROM Gas IMPORT CheckOutGas,CheckInGas,DeleteGasFromInv;
- 33 FROM LowLevel IMPORT Fill;
- 34 FROM DBStuff IMPORT MakeSeqNbr,FindAll,ReadAllRecs,
- ***** ^ duplicate identifier
- 35 ConditionType,ChangeDateField,DeleteAllRecs;
- 36 FROM DBUtils IMPORT ReadCardField,ReadRealField,ReadDateField,
- 37 ChangeCardField,ChangeRealField,PrintFrame;
- 38 FROM ScrnTypes IMPORT AFrameName;
- 39 FROM NumTypes IMPORT Real8;
- 40 FROM StringIO IMPORT PrintMessage,ErrorMessage,WriteEol,WriteStr;
- 41 (* these next two are from stonybrook - the pmi version doesn't work*)
- 42 FROM Prompts IMPORT Prompt,PromptStr,PromptYN;
- 43 FROM SYSTEM IMPORT ADR,SIZE,TSIZE,ADDRESS,BYTE;
- 44 FROM HandleIO IMPORT FileExists,OpenFile,CloseHandle,BlockWrite;
- 45 FROM GenLists IMPORT GenList, NewList,ListLength,GetElmt,ElmtNow,GetElmtAdr,
- 46 JoinLists,ListDelete,ListInsert,DisposeList,ShellSortList;
- 47 FROM DBFInvoice IMPORT InvoiceDBF, OpenInvoiceDBF,InvoiceIdx,
- 48 CloseInvoiceDBF,InvoiceRec,FindInvoiceByInvoice,CustidIdx,
- 49 FindInvoiceByCustid,NextInvoice,PrevInvoice,InvoiceDBF,
- ***** ^ duplicate identifier
- 50 FirstInvoice,LastInvoice,MoveInvoiceToDBF,MoveInvoiceFromDBF;
- 51 FROM Invoice IMPORT InvoiceItem,FInvoice,Credit,GasOut,GasIn,
- 52 InvoiceHeadDF,OrderItemDF,CurrentInvoice,CurrInvOldAmt,OrderItemLst,
- 53 SummaryDF,CurrentItem,HeaderChanged,Recompute,Special,ReadHeader;
- 54
- 55
- 56 (***********************************************************************
- 57 invoices are stored with the invoice number indexed and the
- 58 customer number indexed.
- 59
- 60 The customer number is indexed as
- 61 Customer Number + Status
- 62 Where status =
- 63 'O' - Open - not yet printed so can be edited
- 64 'P' - Posted (printed ) - can not be editied but can be viewes
- 65 'C' - Invoice is closed i.e. paid off
- 66
- 67 Item Status = 'R' - Items still recorded
- 68 'D' - Items deleted
- 69
- 70 ********************************************************************)
- 71
- 72
- 73
- 74
- 75 PROCEDURE PostSales(InvNbr : ARRAY OF CHAR);
- ***** ^ not supported yet
- 76 (* go through the invoice and add items to inventory sales history*)
- 77 VAR
- 78 J : CARDINAL;
- 79 Key : ARRAY[0..15] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 80 Found : BOOLEAN;
- 81 Sales : SalesRec;
- 82 Size,Code : CARDINAL;
- 83 TheList : GenList;
- 84 Item : OrderRec;
- 85 RecNbr : LONGINT;
- 86 BEGIN
- 87 RETURN; (* * * * * * * * * * *TEMP FIX * * * * * * * * * * *)
- 88 NewList(TheList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 89 CrunchBlanks(InvNbr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 90 FindAll(InvnbrIdx,InvNbr,EQ,TheList); (* get items ordered *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 91
- 92 OpenSalesrecDBF(TRUE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 93 FOR J := 1 TO ListLength(TheList) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 94 GetElmt(TheList,J,RecNbr,Code);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 95 ReadDBRec(OrderDBF,RecNbr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 96 MoveOrderFromDBF(Item);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 97 IF NOT Special(Item.ITEMNBR)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 98 THEN
- 99 Assign( Item.ITEMNBR,Key );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 100 FindPositionCh(SalesRecIdx,Key,Found);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 101 IF Found
- 102 THEN
- 103 ReadDBRec(SalesrecDBF,CurrentRec(SalesRecIdx));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 104 MoveSalesrecFromDBF(Sales);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 105 Sales.Sold[Today.mo] := Sales.Sold[Today.mo] +
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 106 Item.QNTSOLD;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 107 MoveSalesrecToDBF(Sales);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 108 ELSE
- 109 AppendBlank(SalesrecDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 110 Fill(ADR(Sales),SIZE(Sales),0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 111 Sales.Sold[Today.mo] := Item.QNTSOLD;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 112 Assign( Item.ITEMNBR,Sales.ITEMNBR );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 113 MoveSalesrecToDBF(Sales);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 114 END;
- 115 WriteDBRec(SalesrecDBF);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 116 END; (* end if not special order *)
- 117 END; (* end of loop *)
- 118 DisposeList(TheList);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 119 CloseSalesrecDBF();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 120 END PostSales;
- ***** ^ not supported yet
- 121
- 122
- 123 PROCEDURE PrintInvoice(PkgSlipOnly : BOOLEAN);
- 124 CONST
- 125 Blank = ' ';
- ***** ^ not supported yet
- 126 LinesPerPage = 32;
- 127 VAR
- 128 Str : ARRAY[0..100] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 129 CurrentPage : CARDINAL;
- 130 CurrentLine : CARDINAL;
- 131 TotalPages : CARDINAL;
- 132 NextFrame : AFrameName;
- 133 BufCnt : CARDINAL;
- 134 FF : BYTE;
- 135 Prt : CARDINAL;
- 136 R : Real8;
- 137 J : CARDINAL;
- 138 EM : ErrorMessage;
- 139 Size,Code : CARDINAL;
- 140 ShipTo,BillTo : AddressRec;
- 141 TmpTotal : Real8;
- 142
- 143 PROCEDURE NbrOfPages() : CARDINAL;
- 144 (* calculate the number of pages for the invoice *)
- 145 VAR J : CARDINAL;
- 146 Lines : CARDINAL;
- 147 Size,Code : CARDINAL;
- 148 Tmp : ARRAY[0..80] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 149 PgNbr : CARDINAL;
- 150 PROCEDURE CountNoteLines();
- 151 BEGIN
- 152
- 153 CrunchBlanks(CurrentInvoice.NOTE1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 154 IF Length(CurrentInvoice.NOTE1) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 155 THEN INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 156 END;
- 157 CrunchBlanks(CurrentInvoice.NOTE2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 158 IF Length(CurrentInvoice.NOTE2) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 159 THEN INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 160 END;
- 161 CrunchBlanks(CurrentInvoice.NOTE3);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 162 IF Length(CurrentInvoice.NOTE3) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 163 THEN INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 164 END;
- 165 END CountNoteLines;
- ***** ^ not supported yet
- 166 BEGIN
- 167 Lines := 1; (**)
- 168 PgNbr := 1;
- 169 IF (CurrentInvoice.NOTESFOR = 'B')
- ***** ^ not supported yet
- ***** ^ not supported yet
- 170 THEN CountNoteLines();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 171 ELSIF ((CurrentInvoice.NOTESFOR='P') AND PkgSlipOnly)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 172 THEN CountNoteLines();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 173 ELSIF ((CurrentInvoice.NOTESFOR='I') AND NOT PkgSlipOnly)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 174 THEN CountNoteLines();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 175 END;
- 176
- 177 FOR J := 1 TO ListLength(OrderItemLst) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 178 INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 179 IF Lines > LinesPerPage
- 180 THEN
- 181 INC (PgNbr);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 182 Lines := 1;
- 183 END;
- 184 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 185 CrunchBlanks(CurrentItem^.ItemOrderRec.NOTES1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 186 CrunchBlanks(CurrentItem^.ItemOrderRec.NOTES2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 187 CrunchBlanks(CurrentItem^.ItemOrderRec.NOTES3);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 188 IF Length(CurrentItem^.ItemOrderRec.NOTES1 ) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 189 THEN
- 190 INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 191 END;
- 192 IF Length(CurrentItem^.ItemOrderRec.NOTES2) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 193 THEN
- 194 INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 195 END;
- 196 IF Length(CurrentItem^.ItemOrderRec.NOTES3) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 197 THEN
- 198 INC(Lines);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 199 END;
- 200 END; (* end for j *)
- 201 (* Lines := Lines + 5; (* net, tax, discount, total *)*)
- 202 RETURN PgNbr;
- 203 END NbrOfPages;
- ***** ^ not supported yet
- 204
- 205 PROCEDURE PrintLine(Item : OrderRec; PksOnly : BOOLEAN);
- 206
- 207 VAR
- 208 Line : ARRAY[0..120] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 209
- 210 BEGIN
- 211 INC(CurrentLine); (* increment line counter *)
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 212 Fill(ADR(Line),102,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 213 RealToStr(Item.QNTSOLD,2,8,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 214 RightJustify(Str,8);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 215 (* CrunchBlanks(Str); *)
- 216 OverWrite(Str,Line,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 217 OverWrite(Item.UNITS,Line,8);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 218 OverWrite(Item.ITEMNBR,Line,14);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 219 OverWrite(Item.DESC,Line,23);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 220 IF NOT PksOnly
- 221 THEN
- 222 RealToStr(Item.UNITPRC,2,6,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 223 RightJustify(Str,6);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 224 OverWrite(Str,Line,78);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 225 RealToStr(Item.TOTAL,2,6,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 226 RightJustify(Str,7);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 227 OverWrite(Str,Line,88);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 228 Line[96] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 229 ELSE
- 230 Line[79] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 231 END;
- 232 WriteEol(Prt,Line);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 233 CrunchBlanks(Item.NOTES1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 234 CrunchBlanks(Item.NOTES2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 235 CrunchBlanks(Item.NOTES3);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 236 IF Item.NOTES1[0] > 0C (* notes exist *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 237 THEN
- 238 WriteStr(Prt,Blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 239 WriteEol(Prt,Item.NOTES1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 240 INC(CurrentLine);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 241 IF Item.NOTES2[0] > 0C
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 242 THEN
- 243 WriteStr(Prt,Blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 244 WriteEol(Prt,Item.NOTES2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 245 INC(CurrentLine);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 246 IF Item.NOTES3[0] > 0C
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 247 THEN
- 248 WriteStr(Prt,Blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 249 WriteEol(Prt,Item.NOTES3);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 250 INC(CurrentLine);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 251 END;
- 252 END;
- 253 END;
- 254 END PrintLine;
- ***** ^ not supported yet
- 255
- 256 PROCEDURE PrintPkgSlpHeader();
- 257 VAR J : CARDINAL;
- 258 Str2 : ARRAY[0..10] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 259 BEGIN
- 260 Assign( Config.CompanyName,Str );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 261 Center(Str,80);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 262 OverWrite(TodayStr,Str,64);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 263 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 264 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 265
- 266 Assign( Config.CompanyAddr1,Str );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 267 Center(Str,80);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 268 CardinalToStr(CurrentPage,2,Str2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 269 INC(CurrentPage);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 270 OverWrite('Page ',Str,60);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 271 OverWrite(Str2,Str,65);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 272 OverWrite('OF ',Str,67);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 273 CardinalToStr(TotalPages,2,Str2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 274 OverWrite(Str2,Str,70);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 275 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 276
- 277 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 278
- 279 Assign( Config.CompanyAddr2,Str );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 280 Center(Str,80);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 281 OverWrite(CurrentInvoice.CUSTID,Str,64);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 282 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 283
- 284 Assign( Config.Phone,Str );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 285 Center(Str,80);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 286 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 287 Assign( TodayStr,Str );
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 288 Center(Str,80);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 289 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 290 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 291 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 292 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 293 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 294 Str[79] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 295 OverWrite('SHIP TO: ',Str,10);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 296 FOR J := 0 TO 3 DO
- 297 OverWrite(ShipTo.Line[J],Str,20);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 298 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 299 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 300 Str[79] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 301 END;
- 302 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 303 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 304 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 305
- 306 WriteStr(Prt,'Ship VIA: ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 307 WriteStr(Prt,CurrentInvoice.SHIPVIA);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 308 WriteStr(Prt,' FF = ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 309 WriteStr(Prt,CurrentInvoice.FREEFRGHT);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 310 WriteStr(Prt,'Terms: ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 311 WriteStr(Prt,CurrentInvoice.TERMS);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 312 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 313 WriteStr(Prt,'Invoice Number: ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 314 WriteStr(Prt,CurrentInvoice.INVOICE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 315 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 316 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 317
- 318 END PrintPkgSlpHeader;
- ***** ^ not supported yet
- 319
- 320 PROCEDURE PrintHeader();
- 321 CONST
- 322 err = 'ASCII ERROR';
- ***** ^ not supported yet
- 323 VAR
- 324 Tmp : ARRAY[0..10] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 325 B : BOOLEAN;
- 326 J : CARDINAL;
- 327 TLines : CARDINAL;
- 328 Str2,
- 329 CPI12,
- 330 CPIPana : ARRAY[0..10] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 331 Str : ARRAY[0..120] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 332 BEGIN
- 333 Concat(CHR(27),':',CPI12);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 334 Concat(CHR(27),CHR(15),CPIPana);
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- 335 Str := err;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 336 WriteStr(Prt,CPI12);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 337 CurrentLine := 1;
- 338 IF PkgSlipOnly
- 339 THEN
- 340 WriteStr(Prt,CPIPana);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 341 PrintPkgSlpHeader();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 342 RETURN;
- 343 END;
- 344 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 345 Str[95] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 346 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 347 DateToStr(CurrentInvoice.INVDATE,Str2,B);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 348 OverWrite(Str2,Str,75);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 349 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 350 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 351 CardinalToStr(CurrentPage,2,Str2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 352 OverWrite(Str2,Str,76);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 353 INC(CurrentPage);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 354 OverWrite('OF ',Str,79);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 355 TLines := TotalPages;
- 356 CardinalToStr(TLines,2,Str2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 357 (* CardinalToStr(TotalPages,2,Str[70..73]);*)
- 358 OverWrite(Str2,Str,82);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 359 Str[96] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 360 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 361 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 362 Str[96] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 363 OverWrite(CurrentInvoice.CUSTID,Str,76);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 364 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 365
- 366 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 367 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 368 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 369 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 370 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 371 FOR J := 0 TO 3 DO
- 372 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 373 OverWrite(BillTo.Line[J],Str,15);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 374 OverWrite(ShipTo.Line[J],Str,66);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 375 Str[94] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 376 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 377 END;
- 378
- 379 FOR J := 1 TO 5 DO
- 380 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 381 END;
- 382 Fill(ADR(Str),SIZE(Str),' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 383 Str[95] := 0C;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 384 DateToStr(CurrentInvoice.INVDATE,Str2,B);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 385 OverWrite(Str2,Str,0);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 386 OverWrite(CurrentInvoice.CUSTPO,Str,10);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 387 OverWrite(Str2,Str,23);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 388 OverWrite(CurrentInvoice.SALESMAN,Str,33);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 389 OverWrite(CurrentInvoice.TERMS,Str,42);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 390 OverWrite(CurrentInvoice.SHIPVIA,Str,63);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 391 OverWrite(CurrentInvoice.INVOICE,Str,88);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 392 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 393 FOR J := 1 TO 4 DO
- 394 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 395 END;
- 396
- 397 END PrintHeader;
- ***** ^ not supported yet
- 398
- 399
- 400
- 401 PROCEDURE WriteHeaderNotes();
- 402 VAR
- 403 TmpStr : ARRAY[0..30] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 404
- 405 BEGIN
- 406 IF Length(CurrentInvoice.NOTE1) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 407 THEN
- 408 WriteStr(Prt,Blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 409 WriteEol(Prt,CurrentInvoice.NOTE1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 410 INC(CurrentLine);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 411 END;
- 412 IF Length(CurrentInvoice.NOTE2) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 413 THEN
- 414 WriteStr(Prt,Blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 415 WriteEol(Prt,CurrentInvoice.NOTE2);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 416 INC(CurrentLine);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 417 END;
- 418 IF Length(CurrentInvoice.NOTE3) > 1
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 419 THEN
- 420 WriteStr(Prt,Blank);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 421 WriteEol(Prt,CurrentInvoice.NOTE3);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 422 INC(CurrentLine);
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- 423 END;
- 424 END WriteHeaderNotes;
- ***** ^ not supported yet
- 425
- 426 VAR
- 427 TmpStr : ARRAY[0..10] OF CHAR;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 428
- 429
- 430 BEGIN (* print invoice *)
- 431 TotalPages :=NbrOfPages();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 432 IF CurrentInvoice.INVPRNT # 'O'
- ***** ^ not supported yet
- ***** ^ not supported yet
- 433 THEN
- 434 IF NOT PromptYN('WARNING Invoice already posted - Continue (y/n)?',InvoiceHeadDF)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 435 THEN
- 436 RETURN
- 437 ELSE
- 438 IF CurrentInvoice.HELIUM = 'Y'
- ***** ^ not supported yet
- ***** ^ not supported yet
- 439 THEN
- 440 DeleteGasFromInv(CurrentInvoice.INVOICE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 441 END;
- 442 R := - CurrInvOldAmt;
- ***** ^ not supported yet
- ***** ^ not supported yet
- 443 AddCustYTD(R); (* subtract the value from invoice prior to *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 444 END;
- 445 END;
- 446 GetCustAddr(BillTo,Billing);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 447 GetCustAddr(ShipTo, Shipping);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ undeclared identifier
- 448 IF PkgSlipOnly
- 449 THEN EM := OpenFile(Prt,Config.PksSlipPrt) (* which printer *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 450 ELSE
- 451
- 452 EM := OpenFile(Prt,Config.InvoicePrt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 453 CurrentInvoice.INVPRNT := 'P'; (* printed/posted *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 454 CurrentInvoice.AMTOUT := CurrentInvoice.TOTALAMT;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 455 HeaderChanged := TRUE;
- ***** ^ not supported yet
- 456 IF CurrentInvoice.AMTOUT = 0.0
- ***** ^ not supported yet
- ***** ^ not supported yet
- 457 THEN IF PromptYN('Zero Invoice Amount - close invoice ',InvoiceHeadDF)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 458 THEN CurrentInvoice.INVPRNT := 'C';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 459 END;
- 460 END;
- 461 AddCustOutStd(CurrentInvoice.AMTOUT);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 462 SetCustLastInvDate(CurrentInvoice.INVDATE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 463
- 464 (*CurrentInvoice.INVDATE := Today; invoice date = date printed *)
- 465 AddCustYTD(CurrentInvoice.INVNET); (* update YTD Amount *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 466 CurrInvOldAmt := CurrentInvoice.INVNET;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 467 IF (CurrentInvoice.SHIPPING = 0.0 ) AND (CurrentInvoice.FREEFRGHT # 'Y')
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 468 THEN
- 469 R := - CurrentInvoice.AMTOUT;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 470 AddCustOutStd(R);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 471 ControlFrame(InvoiceHeadDF,FieldNum(InvoiceHeadDF,'Shipping'),'',FALSE,NextFrame);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 472 ReadHeader();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 473 Recompute(); (* get shipping charge *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 474 CurrentInvoice.AMTOUT := CurrentInvoice.TOTALAMT;
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 475
- 476
- 477 END;
- 478 AddCustOutStd(CurrentInvoice.AMTOUT);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 479 END;
- 480 CurrentPage := 1;
- 481 CurrentLine := 1;
- 482 PrintHeader();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 483 IF (CurrentInvoice.NOTESFOR = 'B')
- ***** ^ not supported yet
- ***** ^ not supported yet
- 484 THEN WriteHeaderNotes();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 485 ELSIF ((CurrentInvoice.NOTESFOR = 'P') AND PkgSlipOnly)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 486 THEN WriteHeaderNotes();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 487 ELSIF ((CurrentInvoice.NOTESFOR = 'I') AND NOT PkgSlipOnly)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 488 THEN WriteHeaderNotes();
- ***** ^ not supported yet
- ***** ^ not supported yet
- 489 END;
- 490
- 491 FOR J := 1 TO ListLength(OrderItemLst) DO
- ***** ^ not supported yet
- ***** ^ not supported yet
- 492 IF((CurrentLine MOD LinesPerPage) = 0)
- 493 THEN
- 494 FF := 0C;
- ***** ^ not supported yet
- 495 EM := BlockWrite(Prt,ADR(FF),1);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 496 PrintHeader()
- ***** ^ not supported yet
- ***** ^ not supported yet
- 497 END;
- 498 GetElmtAdr(OrderItemLst,J,CurrentItem,Size,Code); (* get the item*)
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 499 PrintLine(CurrentItem^.ItemOrderRec,PkgSlipOnly);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 500 IF NOT PkgSlipOnly
- 501 THEN
- 502 IF Pos(GasOut,CurrentItem^.ItemOrderRec.ITEMNBR) = 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 503 THEN
- 504 CurrentInvoice.HELIUM := 'Y';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 505 CheckOutGas(CurrentInvoice.CUSTID,CurrentInvoice.INVOICE,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 506 CurrentItem^.ItemOrderRec.ITEMNBR,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 507 TRUNC(CurrentItem^.ItemOrderRec.QNTSOLD),
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 508 CurrentInvoice.INVDATE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 509 ELSIF Pos(GasIn,CurrentItem^.ItemOrderRec.ITEMNBR) = 0
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 510 THEN
- 511 CurrentInvoice.HELIUM := 'Y';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 512 CheckInGas(CurrentInvoice.CUSTID,CurrentInvoice.INVOICE,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 513 CurrentItem^.ItemOrderRec.ITEMNBR,
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 514 TRUNC(CurrentItem^.ItemOrderRec.QNTSOLD),
- ***** ^ undeclared identifier
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 515 CurrentInvoice.INVDATE);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 516 END;
- 517 END;
- 518 END;
- 519 IF NOT PkgSlipOnly
- 520 THEN
- 521 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 522
- 523 Fill(ADR(Str),SIZE(Str)-2,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 524
- 525 OverWrite('========',Str,88);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 526 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 527 Fill(ADR(Str),SIZE(Str)-2,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 528 OverWrite('Net',Str,40);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 529 TmpTotal := CurrentInvoice.INVNET / (1.0 - (CurrentInvoice.INVDSCNT/100.0));
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 530
- 531 RealToStr(TmpTotal,2,8,TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 532 OverWrite(Str,TmpStr,87);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 533 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 534
- 535 IF CurrentInvoice.INVDSCNT > 0.0
- ***** ^ not supported yet
- ***** ^ not supported yet
- 536 THEN
- 537 Fill(ADR(Str),SIZE(Str)-2,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 538 OverWrite('Discount @',Str,40);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 539 RealToStr(CurrentInvoice.INVDSCNT ,1,4,TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 540 OverWrite(Str,TmpStr,51);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 541 OverWrite('%',Str,56);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 542 IF Str[55] = 0C
- ***** ^ not supported yet
- ***** ^ not supported yet
- 543 THEN
- 544 Str[55] := ' ';
- ***** ^ not supported yet
- ***** ^ not supported yet
- 545 END;
- 546 RealToStr((-1.0 * TmpTotal * CurrentInvoice.INVDSCNT/100.0 ),
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 547 2,8,TmpStr);
- ***** ^ not supported yet
- 548 OverWrite(TmpStr,Str,87);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 549 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 550 END;
- 551
- 552 IF (CurrentInvoice. TAXABLE = 'Y')
- ***** ^ not supported yet
- ***** ^ not supported yet
- 553 THEN
- 554 Fill(ADR(Str),SIZE(Str)-2,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 555 OverWrite('Tax ',Str,40);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 556 RealToStr(CurrentInvoice.INVTAX,2,8,TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 557 OverWrite(TmpStr,Str,87);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 558 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 559
- 560 END;
- 561
- 562 IF CurrentInvoice.SHIPPING > 0.0
- ***** ^ not supported yet
- ***** ^ not supported yet
- 563 THEN
- 564 Fill(ADR(Str),SIZE(Str)-2,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 565 OverWrite('Shipping/Handling',Str,40);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 566 RealToStr(CurrentInvoice.SHIPPING,2,8,TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 567 OverWrite(TmpStr,Str,87);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 568 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 569 END;
- 570 WriteEol(Prt,'');
- ***** ^ not supported yet
- ***** ^ not supported yet
- 571 Fill(ADR(Str),SIZE(Str)-2,' ');
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 572 OverWrite('TOTAL DUE',Str,40);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 573 RealToStr(CurrentInvoice.TOTALAMT,2,8,TmpStr);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 574 OverWrite(TmpStr,Str,87);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 575 WriteEol(Prt,Str);
- ***** ^ not supported yet
- ***** ^ not supported yet
- 576 END;
- 577 WriteStr(Prt,12C); (* final form feed *)
- ***** ^ not supported yet
- ***** ^ not supported yet
- 578 EM := CloseHandle(Prt);
- ***** ^ not supported yet
- ***** ^ not supported yet
- ***** ^ not supported yet
- 579
- 580 (* if freight = 0.0 and invoice charge freight = y Then prompt for frieght*)
- 581
- 582 END PrintInvoice;
- ***** ^ not supported yet
- 583
- 584
- 585
- 586 END InvoicePrint.
- ***** ^ not supported yet
- 938 errors
|