home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
OS/2 Shareware BBS: 10 Tools
/
10-Tools.zip
/
pds.zip
/
loan.pnl
< prev
next >
Wrap
Text File
|
1994-05-04
|
10KB
|
244 lines
)PANEL NAME=PANEL000 CLS=Y XID=(ZESC,ZF3)
)PANEL NAME=PANEL001 CLS=N XID=(ZESC,ZF3) AID=(ZF1_A,ZF1,ZENTER)
)COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITE
)ROW 5
Beginning Balance ...: _fDlbegbal + (Form $$$$$$.##)
Interest Rate .......: _fDlrate + (Form ##.##)
# payments per year .: _fDlfactor + (Form #####)
# of payments .......: _fDlnumpay + (Form #####)
)PROC
Call rxPDZVarDefine 'ZF1_A', 'ZF1'
/* The following defines the possible return codes */
Call rxPDZVarDefine 'ZVERIFYPROC_RC_NORETURN'
if ZKey = ZF1_A then
do
svid = rxPDSaveScreen(ZBid)
rc = rxPDDisplay(ZBid,'HELP001')
rc = rxPDRestoreScreen(ZBid,svid)
return ZVERIFYPROC_RC_NORETURN
end
if ZKey = ZF1 then
do
select
when ZFName = 'fDlbegbal' then
do
svid = rxPDSaveScreen(ZBid)
rc = rxPDDisplay(ZBid,'PUPBBAL1')
rc = rxPDRestoreScreen(ZBid,svid)
return ZVERIFYPROC_RC_NORETURN
end
when ZFName = 'fDlrate' then
do
svid = rxPDSaveScreen(ZBid)
rc = rxPDDisplay(ZBid,'PUPLRTE1')
rc = rxPDRestoreScreen(ZBid,svid)
return ZVERIFYPROC_RC_NORETURN
end
when ZFName = 'fDlfactor' then
do
svid = rxPDSaveScreen(ZBid)
rc = rxPDDisplay(ZBid,'PUPLFCT1')
rc = rxPDRestoreScreen(ZBid,svid)
return ZVERIFYPROC_RC_NORETURN
end
when ZFName = 'fDlnumpay' then
do
svid = rxPDSaveScreen(ZBid)
rc = rxPDDisplay(ZBid,'PUPLNPY1')
rc = rxPDRestoreScreen(ZBid,svid)
return ZVERIFYPROC_RC_NORETURN
end
otherwise
do
return ZVERIFYPROC_RC_NORETURN
end
end /* End of select */
end
/* At this point it MUST be ZENTER */
if '' = fDlbegbal then
do
rc = rxPDSetMsgText(ZBid,'LOAN001E ', ' <<Beginning balance required>> ','PUPBBAL1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlbegbal'
return ZVERIFYPROC_RC_NORETURN
end
if 'NUM' <> DATATYPE(fDlbegbal) then
do
rc = rxPDSetMsgText(ZBid,'LOAN002E ', ' <<Beginning balance "'STRIP(fDlbegbal)'" not numeric>> ','PUPBBAL1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlbegbal'
return ZVERIFYPROC_RC_NORETURN
end
if 0 >= fDlbegbal then
do
rc = rxPDSetMsgText(ZBid,'LOAN001E ', ' <<Positive, Non-Zero Beginning balance required>> ','PUPBBAL1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlbegbal'
return ZVERIFYPROC_RC_NORETURN
end
if '' = fDlrate then
do
rc = rxPDSetMsgText(ZBid,'LOAN003E ', ' <<Interest rate required>> ','PUPLRTE1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlratE'
return ZVERIFYPROC_RC_NORETURN
end
if 'NUM' <> DATATYPE(fDlrate) then
do
rc = rxPDSetMsgText(ZBid,'LOAN004E ', ' <<Interest rate "'STRIP(fDlrate)'" not numeric>> ','PUPLRTE1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlrate'
return ZVERIFYPROC_RC_NORETURN
end
if 0 >= fDlrate then
do
rc = rxPDSetMsgText(ZBid,'LOAN003E ', ' <<Positive, Non-Zero Interest rate required>> ','PUPLRTE1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlrate'
return ZVERIFYPROC_RC_NORETURN
end
if fDlrate >= 100 then
do
rc = rxPDSetMsgText(ZBid,'LOAN005E ', ' <<Interest rate "'STRIP(fDlrate)'" is ridiculous!>> ','PUPLRTE1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlrate'
return ZVERIFYPROC_RC_NORETURN
end
if '' = fDlfactor then
do
rc = rxPDSetMsgText(ZBid,'LOAN006E ', ' <<# payments per year required>> ','PUPLFCT1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlfactor'
return ZVERIFYPROC_RC_NORETURN
end
if 'NUM' <> DATATYPE(fDlfactor) then
do
rc = rxPDSetMsgText(ZBid,'LOAN007E ', ' <<# payments per year "'STRIP(fDlfactor)'" not numeric>> ','PUPLFCT1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlfactor'
return ZVERIFYPROC_RC_NORETURN
end
if 0 >= fDlfactor then
do
rc = rxPDSetMsgText(ZBid,'LOAN006E ', ' <<Positive, Non-Zero # payments per year required>> ','PUPLFCT1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlfactor'
return ZVERIFYPROC_RC_NORETURN
end
if '' = fDlnumpay then
do
rc = rxPDSetMsgText(ZBid,'LOAN008E ', ' <<# of payments required>> ','PUPLNPY1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlnumpay'
return ZVERIFYPROC_RC_NORETURN
end
if 'NUM' <> DATATYPE(fDlnumpay) then
do
rc = rxPDSetMsgText(ZBid,'LOAN009E ', ' <<# of payments "'STRIP(fDlnumpay)'" not numeric>> ','PUPLNPY1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlnumpay'
return ZVERIFYPROC_RC_NORETURN
end
if 0 >= fDlnumpay then
do
rc = rxPDSetMsgText(ZBid,'LOAN008E ', ' <<Positive, Non-Zero # of payments required>> ','PUPLNPY1','1')
Call rxPDSetCursorFld ZBid, ZPName, 'fDlnumpay'
return ZVERIFYPROC_RC_NORETURN
end
return ZKey
)END FLDS="<F1=Help(Contextual) AF1=Help(Overview) F3=Exit ENTER=Process>"
)PANEL NAME=PANEL002 CLS=N
)COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITE
)VARS fDwpa fDwip fDwfp fDwnop fDwpp fDwdpb fDwpia fDwaib
)ROW 10
<*************************************>
<Principle : %* +>
<Interest & Periods : %* +& %* +>
<Number of Payments : %* +>
<*************************************>
Period Payment = %* +
Total Amount of Payments = %* +
- Amount of Loan = %* +
-----------
Total Interest Payed = %* +
)PANEL NAME=PUPBBAL1 XID=(ZESC)
)COLORS TEXT=RED
)ROW 5 7 FLDS="Beginning Balance"
)ROW 10 15 FLDS="<<*******************************************>>"
)ROW 11 15 FLDS="<<** **>>"
)ROW 12 15 FLDS="<<** 'Beginning Balance' is the total **>>"
)ROW 13 15 FLDS="<<** amount loaned to you by the lendor. **>>"
)ROW 14 15 FLDS="<<** It is the 'Principle' which you will **>>"
)ROW 15 15 FLDS="<<** have to pay back in installments. **>>"
)ROW 16 15 FLDS="<<** **>>"
)ROW 17 15 FLDS="<<*******************************************>>"
)END )BLANK FLDS="<Press ESC to end Help>"
)PANEL NAME=PUPLRTE1 XID=(ZESC)
)COLORS TEXT=RED
)ROW 6 7 FLDS="Interest Rate"
)ROW 10 15 FLDS="<<*******************************************>>"
)ROW 11 15 FLDS="<<** **>>"
)ROW 12 15 FLDS="<<** 'Interest Rate' is the percentage of **>>"
)ROW 13 15 FLDS="<<** the principle which will be charged **>>"
)ROW 14 15 FLDS="<<** to you over the life of the loan. The **>>"
)ROW 15 15 FLDS="<<** total amount of interest for a full **>>"
)ROW 16 15 FLDS="<<** term loan is precalculated and then **>>"
)ROW 17 15 FLDS="<<** amortized over the life of the loan. **>>"
)ROW 18 15 FLDS="<<** **>>"
)ROW 19 15 FLDS="<<*******************************************>>"
)END )BLANK FLDS="<Press ESC to end Help>"
)PANEL NAME=PUPLFCT1 XID=(ZESC)
)COLORS TEXT=RED
)ROW 7 7 FLDS="# payments per year"
)ROW 10 15 FLDS="<<*****************************************>>"
)ROW 11 15 FLDS="<<** **>>"
)ROW 12 15 FLDS="<<** '# payments per year' is the total **>>"
)ROW 13 15 FLDS="<<** number of payments you will have to **>>"
)ROW 14 15 FLDS="<<** make during the life of the loan. **>>"
)ROW 15 15 FLDS="<<** This is also know as your payment **>>"
)ROW 16 15 FLDS="<<** 'period'. **>>"
)ROW 17 15 FLDS="<<** **>>"
)ROW 18 15 FLDS="<<*****************************************>>"
)END )BLANK FLDS="<Press ESC to end Help>"
)PANEL NAME=PUPLNPY1 XID=(ZESC)
)COLORS TEXT=RED
)ROW 8 7 FLDS="# of payments"
)ROW 10 15 FLDS="<<******************************************>>"
)ROW 11 15 FLDS="<<** **>>"
)ROW 12 15 FLDS="<<** '# of payments' is the total number **>>"
)ROW 13 15 FLDS="<<** of payments you will have to make **>>"
)ROW 14 15 FLDS="<<** during the life of the loan. This **>>"
)ROW 15 15 FLDS="<<** is total number of payments you will **>>"
)ROW 16 15 FLDS="<<** make if you let the loan go its full **>>"
)ROW 17 15 FLDS="<<** term. **>>"
)ROW 18 15 FLDS="<<** **>>"
)ROW 19 15 FLDS="<<******************************************>>"
)END )BLANK FLDS="<Press ESC to end Help>"
)PANEL NAME=HELP001 CLS=Y XID=(ZESC)
)COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITE
On this panel you will be asked to enter the following:
Beginning Balance ...: %fDlbegbal + (Form $$$$$$.##)
The "Beginning Balance" field is the amount of the loan. I.E. Purchase
price less down payment plus any other financed expenditures.
Interest Rate .......: %fDlrate + (Form ##.##)
The "Interest Rate" field is the "Annual Percentage Rate" (APR) incurred
by this loan.
# payments per year .: %fDlfactor + (Form #####)
The "# payments per year" field is the number of times per year that you
will have to make a payment on the loan. Enter 12 for monthly, 6 for
bi-monthly 2 for semi-annually, etc...
# of payments .......: %fDlnumpay + (Form #####)
The "# of payments" field is the total number of payments to be made for
the life of the loan. Enter 60 for a 5 year monthly payment loan, enter
9 for an 18 month bi-monthly loan.
)END FLDS="<Press ESC to end Help>"