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