home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / pds.zip / loan.pnl < prev    next >
Text File  |  1994-05-04  |  10KB  |  244 lines

  1. )PANEL NAME=PANEL000 CLS=Y XID=(ZESC,ZF3)
  2.  
  3. )PANEL NAME=PANEL001 CLS=N XID=(ZESC,ZF3) AID=(ZF1_A,ZF1,ZENTER)
  4. )COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITE
  5. )ROW 5
  6.       Beginning Balance ...: _fDlbegbal +  (Form $$$$$$.##)
  7.       Interest Rate .......: _fDlrate   +  (Form ##.##)
  8.       # payments per year .: _fDlfactor +  (Form #####)
  9.       # of payments .......: _fDlnumpay +  (Form #####)
  10. )PROC
  11.   Call rxPDZVarDefine 'ZF1_A', 'ZF1'
  12.  
  13.   /* The following defines the possible return codes */
  14.   Call rxPDZVarDefine 'ZVERIFYPROC_RC_NORETURN'
  15.  
  16.   if ZKey = ZF1_A then
  17.    do
  18.     svid = rxPDSaveScreen(ZBid)
  19.     rc = rxPDDisplay(ZBid,'HELP001')
  20.     rc = rxPDRestoreScreen(ZBid,svid)
  21.     return ZVERIFYPROC_RC_NORETURN
  22.    end
  23.   if ZKey = ZF1 then
  24.    do
  25.     select
  26.      when ZFName = 'fDlbegbal' then
  27.       do
  28.        svid = rxPDSaveScreen(ZBid)
  29.        rc = rxPDDisplay(ZBid,'PUPBBAL1')
  30.        rc = rxPDRestoreScreen(ZBid,svid)
  31.        return ZVERIFYPROC_RC_NORETURN
  32.       end
  33.      when ZFName = 'fDlrate' then
  34.       do
  35.        svid = rxPDSaveScreen(ZBid)
  36.        rc = rxPDDisplay(ZBid,'PUPLRTE1')
  37.        rc = rxPDRestoreScreen(ZBid,svid)
  38.        return ZVERIFYPROC_RC_NORETURN
  39.       end
  40.      when ZFName = 'fDlfactor' then
  41.       do
  42.        svid = rxPDSaveScreen(ZBid)
  43.        rc = rxPDDisplay(ZBid,'PUPLFCT1')
  44.        rc = rxPDRestoreScreen(ZBid,svid)
  45.        return ZVERIFYPROC_RC_NORETURN
  46.       end
  47.      when ZFName = 'fDlnumpay' then
  48.       do
  49.        svid = rxPDSaveScreen(ZBid)
  50.        rc = rxPDDisplay(ZBid,'PUPLNPY1')
  51.        rc = rxPDRestoreScreen(ZBid,svid)
  52.        return ZVERIFYPROC_RC_NORETURN
  53.       end
  54.      otherwise
  55.       do
  56.        return ZVERIFYPROC_RC_NORETURN
  57.       end
  58.     end /* End of select */
  59.    end
  60.  
  61.   /* At this point it MUST be ZENTER */
  62.   if '' = fDlbegbal then
  63.    do
  64.     rc = rxPDSetMsgText(ZBid,'LOAN001E ', ' <<Beginning balance required>> ','PUPBBAL1','1')
  65.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlbegbal'
  66.     return ZVERIFYPROC_RC_NORETURN
  67.    end
  68.   if 'NUM' <> DATATYPE(fDlbegbal) then
  69.    do
  70.     rc = rxPDSetMsgText(ZBid,'LOAN002E ', ' <<Beginning balance "'STRIP(fDlbegbal)'" not numeric>> ','PUPBBAL1','1')
  71.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlbegbal'
  72.     return ZVERIFYPROC_RC_NORETURN
  73.    end
  74.   if 0 >= fDlbegbal then
  75.    do
  76.     rc = rxPDSetMsgText(ZBid,'LOAN001E ', ' <<Positive, Non-Zero Beginning balance required>> ','PUPBBAL1','1')
  77.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlbegbal'
  78.     return ZVERIFYPROC_RC_NORETURN
  79.    end
  80.   if '' = fDlrate then
  81.    do
  82.     rc = rxPDSetMsgText(ZBid,'LOAN003E ', ' <<Interest rate required>> ','PUPLRTE1','1')
  83.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlratE'
  84.     return ZVERIFYPROC_RC_NORETURN
  85.    end
  86.   if 'NUM' <> DATATYPE(fDlrate) then
  87.    do
  88.     rc = rxPDSetMsgText(ZBid,'LOAN004E ', ' <<Interest rate "'STRIP(fDlrate)'" not numeric>> ','PUPLRTE1','1')
  89.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlrate'
  90.     return ZVERIFYPROC_RC_NORETURN
  91.    end
  92.   if 0 >= fDlrate then
  93.    do
  94.     rc = rxPDSetMsgText(ZBid,'LOAN003E ', ' <<Positive, Non-Zero Interest rate required>> ','PUPLRTE1','1')
  95.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlrate'
  96.     return ZVERIFYPROC_RC_NORETURN
  97.    end
  98.   if fDlrate >= 100 then
  99.    do
  100.     rc = rxPDSetMsgText(ZBid,'LOAN005E ', ' <<Interest rate "'STRIP(fDlrate)'" is ridiculous!>> ','PUPLRTE1','1')
  101.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlrate'
  102.     return ZVERIFYPROC_RC_NORETURN
  103.    end
  104.   if '' = fDlfactor then
  105.    do
  106.     rc = rxPDSetMsgText(ZBid,'LOAN006E ', ' <<# payments per year required>> ','PUPLFCT1','1')
  107.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlfactor'
  108.     return ZVERIFYPROC_RC_NORETURN
  109.    end
  110.   if 'NUM' <> DATATYPE(fDlfactor) then
  111.    do
  112.     rc = rxPDSetMsgText(ZBid,'LOAN007E ', ' <<# payments per year "'STRIP(fDlfactor)'" not numeric>> ','PUPLFCT1','1')
  113.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlfactor'
  114.     return ZVERIFYPROC_RC_NORETURN
  115.    end
  116.   if 0 >= fDlfactor then
  117.    do
  118.     rc = rxPDSetMsgText(ZBid,'LOAN006E ', ' <<Positive, Non-Zero # payments per year required>> ','PUPLFCT1','1')
  119.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlfactor'
  120.     return ZVERIFYPROC_RC_NORETURN
  121.    end
  122.   if '' = fDlnumpay then
  123.    do
  124.     rc = rxPDSetMsgText(ZBid,'LOAN008E ', ' <<# of payments required>> ','PUPLNPY1','1')
  125.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlnumpay'
  126.     return ZVERIFYPROC_RC_NORETURN
  127.    end
  128.   if 'NUM' <> DATATYPE(fDlnumpay) then
  129.    do
  130.     rc = rxPDSetMsgText(ZBid,'LOAN009E ', ' <<# of payments "'STRIP(fDlnumpay)'" not numeric>> ','PUPLNPY1','1')
  131.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlnumpay'
  132.     return ZVERIFYPROC_RC_NORETURN
  133.    end
  134.   if 0 >= fDlnumpay then
  135.    do
  136.     rc = rxPDSetMsgText(ZBid,'LOAN008E ', ' <<Positive, Non-Zero # of payments required>> ','PUPLNPY1','1')
  137.     Call rxPDSetCursorFld ZBid, ZPName, 'fDlnumpay'
  138.     return ZVERIFYPROC_RC_NORETURN
  139.    end
  140.   return ZKey
  141. )END FLDS="<F1=Help(Contextual) AF1=Help(Overview) F3=Exit ENTER=Process>"
  142.  
  143. )PANEL NAME=PANEL002 CLS=N
  144. )COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITE
  145. )VARS fDwpa fDwip fDwfp fDwnop fDwpp fDwdpb fDwpia fDwaib
  146. )ROW 10
  147.  
  148.                                         <*************************************>
  149.                                         <Principle            : %*           +>
  150.                                         <Interest & Periods   : %*    +& %*  +>
  151.                                         <Number of Payments   : %*           +>
  152.                                         <*************************************>
  153.  
  154.   Period Payment = %*         +
  155.  
  156.   Total Amount of Payments = %*         +
  157.   - Amount of Loan         = %*         +
  158.                              -----------
  159.   Total Interest Payed     = %*         +
  160.  
  161. )PANEL NAME=PUPBBAL1 XID=(ZESC)
  162. )COLORS TEXT=RED
  163. )ROW  5  7 FLDS="Beginning Balance"
  164. )ROW 10 15 FLDS="<<*******************************************>>"
  165. )ROW 11 15 FLDS="<<**                                       **>>"
  166. )ROW 12 15 FLDS="<<** 'Beginning Balance' is the total      **>>"
  167. )ROW 13 15 FLDS="<<** amount loaned to you by the lendor.   **>>"
  168. )ROW 14 15 FLDS="<<** It is the 'Principle' which you will  **>>"
  169. )ROW 15 15 FLDS="<<** have to pay back in installments.     **>>"
  170. )ROW 16 15 FLDS="<<**                                       **>>"
  171. )ROW 17 15 FLDS="<<*******************************************>>"
  172. )END )BLANK FLDS="<Press ESC to end Help>"
  173.  
  174. )PANEL NAME=PUPLRTE1 XID=(ZESC)
  175. )COLORS TEXT=RED
  176. )ROW  6  7 FLDS="Interest Rate"
  177. )ROW 10 15 FLDS="<<*******************************************>>"
  178. )ROW 11 15 FLDS="<<**                                       **>>"
  179. )ROW 12 15 FLDS="<<** 'Interest Rate' is the percentage of  **>>"
  180. )ROW 13 15 FLDS="<<** the principle which will be charged   **>>"
  181. )ROW 14 15 FLDS="<<** to you over the life of the loan. The **>>"
  182. )ROW 15 15 FLDS="<<** total amount of interest for a full   **>>"
  183. )ROW 16 15 FLDS="<<** term loan is precalculated and then   **>>"
  184. )ROW 17 15 FLDS="<<** amortized over the life of the loan.  **>>"
  185. )ROW 18 15 FLDS="<<**                                       **>>"
  186. )ROW 19 15 FLDS="<<*******************************************>>"
  187. )END )BLANK FLDS="<Press ESC to end Help>"
  188.  
  189. )PANEL NAME=PUPLFCT1 XID=(ZESC)
  190. )COLORS TEXT=RED
  191. )ROW  7  7 FLDS="# payments per year"
  192. )ROW 10 15 FLDS="<<*****************************************>>"
  193. )ROW 11 15 FLDS="<<**                                     **>>"
  194. )ROW 12 15 FLDS="<<** '# payments per year' is the total  **>>"
  195. )ROW 13 15 FLDS="<<** number of payments you will have to **>>"
  196. )ROW 14 15 FLDS="<<** make during the life of the loan.   **>>"
  197. )ROW 15 15 FLDS="<<** This is also know as your payment   **>>"
  198. )ROW 16 15 FLDS="<<** 'period'.                           **>>"
  199. )ROW 17 15 FLDS="<<**                                     **>>"
  200. )ROW 18 15 FLDS="<<*****************************************>>"
  201. )END )BLANK FLDS="<Press ESC to end Help>"
  202.  
  203. )PANEL NAME=PUPLNPY1 XID=(ZESC)
  204. )COLORS TEXT=RED
  205. )ROW  8  7 FLDS="# of payments"
  206. )ROW 10 15 FLDS="<<******************************************>>"
  207. )ROW 11 15 FLDS="<<**                                      **>>"
  208. )ROW 12 15 FLDS="<<** '# of payments' is the total number  **>>"
  209. )ROW 13 15 FLDS="<<** of payments you will have to make    **>>"
  210. )ROW 14 15 FLDS="<<** during the life of the loan. This    **>>"
  211. )ROW 15 15 FLDS="<<** is total number of payments you will **>>"
  212. )ROW 16 15 FLDS="<<** make if you let the loan go its full **>>"
  213. )ROW 17 15 FLDS="<<** term.                                **>>"
  214. )ROW 18 15 FLDS="<<**                                      **>>"
  215. )ROW 19 15 FLDS="<<******************************************>>"
  216. )END )BLANK FLDS="<Press ESC to end Help>"
  217.  
  218. )PANEL NAME=HELP001 CLS=Y XID=(ZESC)
  219. )COLORS INPUT=GREENHI OUTPUT=YELLOWHI TEXT=WHITE
  220. On this panel you will be asked to enter the following:
  221.  
  222.       Beginning Balance ...: %fDlbegbal +  (Form $$$$$$.##)
  223.  
  224. The "Beginning Balance" field is the amount of the loan. I.E. Purchase
  225. price less down payment plus any other financed expenditures.
  226.  
  227.       Interest Rate .......: %fDlrate   +  (Form ##.##)
  228.  
  229. The "Interest Rate" field is the "Annual Percentage Rate" (APR) incurred
  230. by this loan.
  231.  
  232.       # payments per year .: %fDlfactor +  (Form #####)
  233.  
  234. The "# payments per year" field is the number of times per year that you
  235. will have to make a payment on the loan. Enter 12 for monthly, 6 for
  236. bi-monthly 2 for semi-annually, etc...
  237.  
  238.       # of payments .......: %fDlnumpay +  (Form #####)
  239.  
  240. The "# of payments" field is the total number of payments to be made for
  241. the life of the loan. Enter 60 for a 5 year monthly payment loan, enter
  242. 9 for an 18 month bi-monthly loan.
  243. )END FLDS="<Press ESC to end Help>"
  244.