/* Titles for HOA Author: Les Koehler Date: 4Jan2007 Invoked as a function and passed either the Account Number or Title in a financial report, this program will return the 4 digit Account Number and Title. This makes up for the shortfall in the TOPS program that our property management company uses to create PRT files for us instead of PDF files, so we can move the data in to Excel to control the font and prettify the reports. For an example, see: Cash12toExcel.rex */ parse arg ix acct.='No Title' /* Indexed by Account, holds the Title */ title.='????' /* Indexed by Title, holds the Account number */ t.1='03000 Maintenance Fees' t.2='03030 Prepaid Assessments' t.3='03060 Prepaid Income' t.4='03100 Operating Interest' t.5='03120 Reserve Interest' t.6='03130 Res Interest Restore' t.7='03140 Res. Interest Replace' t.8='03200 Other Income' t.9='04060 Management & Bookkeeping' t.10='04120 Office Expense' t.11='04130 Other Assn Exp' t.12='04140 Bank Expense' t.13='04510 License/Fees/Corp Filing' t.14='04730 CPA Review/Legal' t.15='04740 Taxes' t.16='04970 Insurance (Liability/D&O)' t.17='05000 Maintenance' t.18='05400 Pest Control' t.19='06010 Grounds Contract' t.20='06020 Irrigation' t.21='06310 Tree Trimming/Pruning' t.22='06550 Pool Service' t.23='06600 Contingency Fund' t.24='07510 Electricity' t.25='07640 Water' t.26='07650 Trash' t.27='09010 Reserves - Roof' t.28='09020 Reserves - Replacement' t.29='09030 Reserves - Restoration' t.30='09040 Reserve Int. Expense' t.31='09050 Reserve Loan Pymt Restoration' t.32='01010 Checking - Colonial' t.33='01030 MM Res - EQ7914 Replcmt' t.34='01040 MM Res - EQ8714 Restoration' t.35='01041 Res CD EQ853 Restore' t.36='01042 Res CD EQ887 Replace' t.37='01043 Res CD EQ861 Replace' t.38='01044 Res CD EQ879 Replace' t.39='01400 A/R - Maintenance Fees' t.40='01450 Utility Deposits' t.41='01710 EQ Note Payable Reserves' t.42='01800 Prepaid Maintenance Fees' t.43='01910 Reserves - Roof' t.44='01920 Reserves - Replacement' t.45='01930 Reserves - Restoration' t.46='02000 Retained Earnings' t.0=46 do ix=1 to t.0 parse var t.ix num rest acct.num=rest /* Save Title, indexed by Acct */ title.rest=num /* Save Acct, indexed by Title */ end .local~accts=acct. .local~titles=title. ::routine titles public use arg ix acct.=.local~accts /* retrieve stem from .local-environment */ title.=.local~titles skip='TOTAL NET CURRENT' /* Ignore these */ if wordpos(translate(word(ix,1)),skip)>0 then answer=ix else do if datatype(ix,'W') then do /* We have an account number */ ix=right(ix,5,0) answer=ix+0 acct.ix /* Return number and title */ end else do if datatype(word(ix,1),'W') then do /* We have acct AND title */ parse var ix ix rest /* Rather unusual, but... */ answer=ix+0 rest /* Strip leading zero */ end else do /* We have the title */ num=title.ix /* Get the account number */ if datatype(num,'W') then num=num+0 /* And format it */ answer=num ix end end end return answer