home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MSWBASE4.ZIP / TRADING / STKM.SBP < prev    next >
Encoding:
Text File  |  1989-10-06  |  8.6 KB  |  360 lines

  1. SBP
  2.   ╜   -----------------------------------------
  3.   ╜   STKM                                
  4.   ╜   Microsoft Securities Trading System 
  5.   ╜   Master Menu Program                        
  6.   ╜   Last updated Sep 27, 89
  7.   ╜   -----------------------------------------
  8.   │ _ wm99
  9.   ç: ▓"-9999999.00"
  10.   íret% 0 p ┤ £"banner"
  11.  
  12.   ┤ Ö"TRANS": ┤ Ö"CLIENTS": ┤ Ö"STOCKS": ┤ Ö"CTRL"
  13.  h3$ "Microsoft Securities Trading System"
  14.  ms1$ "Is entry correct?":ms2$ "Continue with data entry?"
  15.  ms3$ "Do you wish to reprint?": ms4$ "Has all output been correctly printed?"
  16.   Γ e: ╦ e
  17.   íret% 1 p ç: wl1
  18.  
  19. l0: ╜ Define menu structure
  20.   ¼ à
  21.   vs1: ╜ Set heading
  22.   ¼1,0,1,"&File"
  23.   ¼1,1,1,"&Clients"
  24.   ¼1,2,1,"&Stocks"
  25.   ¼1,3,1,"C&ountries"
  26.   ¼1,4,1,"C&urrencies"
  27.   ¼1,5,tran.CTRL,"&Transactions"
  28.   ¼1,6,1,"&Exit"
  29.   ¼1,7,1,"&About"
  30.  
  31.   ¼2,0,1,"&Daily"
  32.   ¼2,1,1,"&Currency Rates"
  33.   ¼2,2,1,"&Stock Prices"
  34.   ¼2,3,cent.CTRL,"Certificate &Nos"
  35.   ¼2,4,1,"Cash &Receipts"
  36.   ¼2,5,1,"Cash &Payments"
  37.  
  38.   ¼3,0,1,"D&ocuments"
  39.   ¼3,1,cert.CTRL,"&Certificates":
  40.   ¼3,2,cerl.CTRL,"C&ert Labels"
  41.   ¼3,3,cont.CTRL,"C&ontract Notes"
  42.   ¼3,4,conl.CTRL,"Co&ntract Labels"
  43.   ¼3,5,1,"&Statements"
  44.  
  45.   ¼4,0,1,"&Update"
  46.   ¼4,1,1,"Stock &Highs"
  47.   ¼4,2,1,"Stock &Lows"
  48.   ¼4,3,ceru.CTRL,"&Certs Sent"
  49.   ¼4,4,conu.CTRL,"&Notes Sent"
  50. 
  51.   ¼5,0,1,"&Reports"
  52.   ¼5,1,1,"&Traded Stocks"
  53.   ¼5,2,1,"Stock &Highs"
  54.   ¼5,3,1,"Stock &Lows"
  55.   ¼5,4,1,"T&rading Balances"
  56.   ¼5,5,1,"-----------------"
  57.   ¼5,6,1,"Telephone &Nos"
  58.   ¼5,7,1,"Client &Balances"
  59.   ¼5,8,1,"&Cash Audit"
  60.  
  61. l1: ╜ Menu item selection
  62.   ¼ │ma%,mb%
  63.   ╪ Oma%
  64.  íh2%  :( R) p vs1
  65.   ┘
  66.   å £
  67.   │ma% wm1,m2,m3,m4,m5
  68.  
  69. m1: ╜ File routines
  70.   │mb% wm11,m12,m13,m14,m15,m16,m17
  71.  
  72. m11: ╜ Clients
  73.   ä"stkfc"
  74. m12: ╜ Stocks
  75.   ä"stkfs"
  76. m13: ╜ Countries
  77.   ä"stkfo"
  78. m14: ╜ Currencies
  79.   ä"stkfu"
  80. m15: ╜ Transactions
  81.   ä"stkft"
  82. m16: ╜ Exit
  83.   å t: Γ │: ╩ ƒ"": ╦ │: Æ
  84. m17: ╜ About
  85.   ┤ £"banner"
  86.   wl1
  87.  
  88. m2: ╜ Daily routines
  89.   │mb% wm21,m22,m23,m24,m24
  90.  
  91. m21: ╜ Enter daily currency xrates
  92.   ┤ £"stkdc":b% 1
  93.  
  94. m211: 
  95.   öUSD Xrate.CURRENCY "b%
  96.   ┬ms1$,"",1,a%: ía% 0 p wm211
  97.  Date of Xrate.CURRENCY  Q: ╠
  98.  b% b% 1: íb% 
  99. 12 p wm211 
  100.   å £: wl1
  101.  
  102. m22: ╜ Enter daily stock prices
  103.   ä"stkds"
  104. m23: ╜ Enter Certificate numbers
  105.   ä"stkdn"
  106. m24: ╜ Enter Cash Receipts or Payments
  107.   ä"stkdr"
  108.  
  109. m3: ╜ Documents 
  110.  p$ "d":a% 1
  111.   ╔ µmb%
  112.  µ1,3,5
  113.  ┬"(d)isplay or (p)rint?","",4,a%,p$,1
  114. p$  =(p$)
  115.   Æ ╔
  116.   ía% 0 wl1
  117.   íp$ "d" p íp$ "p" p wm3
  118.   │mb% vm31,m32,m33,m34,m35
  119.   wl1
  120.  
  121. m31: ╜ Print Certificate Advices
  122.   ┬"This produces certificate advices for transactions","where certificate numbers have been entered",1,a%
  123.   ía% 0 p ├
  124.   í J("certs.sbf") p ╛ Ö"certs"
  125.   ╔Customer_Ref.TRANS,Quantity.TRANS,Certificate_No.TRANS,Title.CLIENTS,Firstname.CLIENTS,
  126.  Lastname.CLIENTS, Company.CLIENTS,Street.CLIENTS,Address.CLIENTS,
  127.  City.CLIENTS,State.CLIENTS, Zip_Code.CLIENTS,Country.CLIENTS,
  128.  Company Name.STOCKS,Stock_Type
  129.   ╨Customer_Ref.TRANS Customer_Ref.CLIENTS  Stock_Key.TRANS Stock_Key.STOCKS  Trans_Type.TRANS "b"  Certificate_No.TRANS ""  Cert_Sent_yn.TRANS "n"
  130.   ╡Stock_Key.TRANS,Certificate_No.TRANS
  131.   q Ö"certs"
  132.   Æ ╔
  133.   ┤ Ö"certs"
  134.  
  135. m311:  ╜ Print routine
  136.   ¿ o"lecerts": ╔ `
  137.   ╪ O B("certs")
  138.  íp$ "p" p ¡ o"lecerts"
  139.  íp$ "d" p { o ¡
  140.  ╔ ▒
  141.   ┘
  142.   ┬ms4$,"",1,a%
  143.   ía% 0 p
  144.  ┬ms3$,"",1,a%
  145.  ía% 1 p wm311
  146.  ╛ Ö"certs"
  147.   ^
  148.  Ö"ctrl"
  149. tran.CTRL 0:cent.CTRL 0:cert.CTRL 0:cerl.CTRL 1
  150.  ╠
  151.  ¼1,5,tran.CTRL,"&Transactions"
  152.  ¼2,3,cent.CTRL,"Certificate &Nos"
  153.  ¼3,1,cert.CTRL,"&Certificates"
  154.  ¼3,2,cerl.CTRL,"C&ert Labels"
  155.   Æ í
  156.   íp$ "d" p ç
  157.   ├
  158.  
  159. m32: ╜ Print Certificate Labels
  160.   ┬"This produces labels to go with certificates","",1,a%
  161.   ía% 0 p ├
  162.  
  163. m321:  ╜ Print routine
  164.   ┤ Ö"certs"
  165.   ┤ ÿ Ö"certs" Title,Firstname,Lastname,Company,Street,Address,City,State,Zip_Code,Country
  166.   ª s3,1,1,1,1,1,1,1,0,0,1,35,40,12,1,2,0,0
  167.   ┬"Have all labels been correctly printed?","",1,a%
  168.   ía% 0 p
  169.  ┬ms3$,"",1,a%
  170.  ía% 1 p wm321
  171.   ^
  172.  Ö"ctrl"
  173. cerl.CTRL 0:ceru.CTRL 1
  174.  ╠
  175.  ¼3,2,cerl.CTRL,"C&ert Labels"
  176.  ¼4,3,ceru.CTRL,"&Certs Sent"
  177.   Æ í
  178.   ├
  179.  
  180. m33: ╜ Print contract notes
  181.   ┬"This produces contract notes","for all new transactions",1,a%
  182.   ía% 0 p ├
  183.   í J("invs.sbf") p ╛ Ö"invs"
  184.   ╔Stock_Key.TRANS,Customer_Ref.TRANS,Transaction ref,Trans_Type,Trans_Desc,Trans_Date,Settlement_Date, (Quantity.TRANS,6,0) U"QTY", (Stock_Price.TRANS,6,2) U"PR",Currency.TRANS,USD Xrate.TRANS,
  185.   ( (USD Value.TRANS),6,2) U"USDV",(Comm_Value) U"Com", ( (USD Value.TRANS Comm_Value),6,2) U"TV",&24(Client.CLIENTS) U"Client",Company.CLIENTS,Street.CLIENTS,Address.CLIENTS,City.CLIENTS,
  186.  State.CLIENTS,Zip_Code.CLIENTS,Country.CLIENTS,Company Name.STOCKS,Stock_Type,Exchange
  187.   ╨Customer_Ref.TRANS Customer_Ref.CLIENTS  Stock_Key.TRANS Stock_Key.STOCKS  Invoice_Sent_yn.TRANS "n"
  188.   ╡Customer_Ref.TRANS,Transaction ref
  189.   q Ö"invs"
  190.   Æ ╔
  191.   ┤ Ö"invs"
  192.  
  193. m331:  ╜ Print routine
  194.   ¿ o"leinvs": ╔ `
  195.   ╪ O B("invs")
  196.  íp$ "p" p ¡ o"leinvs"
  197.  íp$ "d" p { o ¡
  198.  ╔ ▒
  199.   ┘
  200.   ┬ms4$,"",1,a%
  201.   ía% 0 p
  202.  ┬ms3$,"",1,a%
  203.  ía% 1 p wm331
  204.  ╛ Ö"invs"
  205.   ^
  206.  Ö"ctrl"
  207. tran.CTRL 0:cont.CTRL 0:conl.CTRL 1
  208.  ╠
  209.  ¼1,5,tran.CTRL,"&Transactions"
  210.  ¼3,3,cont.CTRL,"C&ontract Notes"
  211.  ¼3,4,conl.CTRL,"Co&ntract Labels"
  212.   Æ í
  213.   íp$ "d" p ç
  214.   ├
  215.  
  216. m34: ╜ Print Contract Labels
  217.   ┬"This produces labels to go with contract notes","",1,a%
  218.   ía% 0 p ├
  219.  
  220. m341:  ╜ Print routine
  221.   ┤ Ö"invs"
  222.   ┤ ÿ Ö"invs"Client,Company,Street,Address,City,State,Zip_Code,Country
  223.   ª s1,1,1,1,1,1,1,1,0,0,1,35,40,12,1,2,0,0
  224.   ┬ms4$,"",1,a%
  225.   ía% 0 p
  226.  ┬ms3$,"",1,a%
  227.  ía% 1 p wm341
  228.   ^
  229.  Ö"ctrl"
  230. conl.CTRL 0:conu.CTRL 1
  231.  ╠
  232.  ¼3,4,conl.CTRL,"Co&ntract Labels"
  233.  ¼4,4,conu.CTRL,"&Notes Sent"
  234.   Æ í
  235.   ├
  236.  
  237. m35: ╜ Statements
  238.   Ö"TRANS": ╔ ╨: ╜ removes any pre-set filter 
  239.   Ö"CLIENTS"
  240.   íp$ "d" p
  241.  ┤ £"stkos"
  242.   ^ íp$ "p" p
  243.  ┤ £"stkos2"
  244.   ^
  245.  wm35
  246.   Æ í
  247.  ind$ "Customer_Ref"
  248.   ┬"Select index sequence","",7,a%,ind$
  249.   ía% 0 p wm359 
  250.   úind$: ╔ £ ╨ ~
  251.   íp$ "p" wm355
  252.  
  253. m351:  ╜ Display statements
  254.   │ _ wm352
  255.   ╧ Γ: Γ e
  256.   │ _ wm99
  257.   wm359
  258.  
  259. m352:  ╜ Panel errors
  260.   ┬ (( &),"",2,a%
  261.   ╔ £ Y: ym351
  262.  
  263. m355:  ╜ Print statements
  264.   ╔ £ `
  265.   ╪ O B("clients")
  266.  ╣ Y
  267.  ╔ £ ▒
  268.   ┘
  269.   ┬ms4$,"",1,a%
  270.   ía% 1 wm359 
  271.   ┬ms3$,"",1,a%
  272.   ía% 1 p wm355
  273.  
  274. m359: 
  275.   å £: ╔ ╨: ç: ├
  276.  
  277. m4: ╜ Update routines
  278.   │mb% vm41,m42,m43,m44
  279.   wl1
  280.  
  281. m41: ╜ New Highs
  282.   ┬"This updates the current year highs from the","latest price data",1,a%
  283.   ía% 0 p wl1
  284.   ═Year_High.STOCKS Price Middle.STOCKS:Date of High.STOCKS Price Date.STOCKS
  285.  ╨Price Middle.STOCKS Year_High.STOCKS 
  286.  6(Price Date.STOCKS)  6(Date of High.STOCKS)
  287.   Æ ═: ├
  288.  
  289. m42: ╜ New Lows
  290.   ┬"This updates the current year lows from the","latest price data",1,a%
  291.   ía% 0 p ├
  292.   ═Year_Low.STOCKS Price Middle.STOCKS:Date of Low.STOCKS Price Date.STOCKS
  293.  ╨Price Middle.STOCKS     Year_Low.STOCKS 
  294.  6(Price Date.STOCKS)  6(Date of Low.STOCKS)
  295.   Æ ═: ├
  296.  
  297. m43: ╜ Certs Sent
  298.   ┬"This updates the transaction file to indicate","that certificates have been sent",1,a%
  299.   ía% 0 p ├
  300.   ═Cert_Sent_YN.TRANS "y"
  301.  ╨Certificate_No.TRANS ""  Cert_Sent_YN.TRANS "n"
  302.   Æ ═
  303.   Ö"ctrl"
  304.  tran.CTRL 1:cent.CTRL 1:cert.CTRL 1:ceru.CTRL 0
  305.   ╠
  306.   ¼1,5,tran.CTRL,"&Transactions"
  307.   ¼2,3,cent.CTRL,"Certificate &Nos"
  308.   ¼3,1,cert.CTRL,"&Certificates"
  309.   ¼4,3,ceru.CTRL,"&Certs Sent"
  310.   ├
  311.  
  312. m44: ╜ Notes Sent
  313.   ┬"This updates the transaction file to indicate","that contract notes have been sent",1,a%
  314.   ía% 0 p ├
  315.   ═Invoice_Sent_yn.TRANS "y" ╨Invoice_Sent_yn.TRANS "n"
  316.   Æ ═
  317.   Ö"ctrl"
  318.  tran.CTRL 1:cont.CTRL 1:conu.CTRL 0
  319.   ╠
  320.   ¼1,5,tran.CTRL,"&Transactions"
  321.   ¼3,3,cont.CTRL,"C&ontract Notes"
  322.   ¼4,4,conu.CTRL,"&Notes Sent"
  323.   ├
  324.  
  325. m5: ╜ Reports
  326.   │mb% wm51,m52,m53,m54,m55,m56,m57,m58
  327.  
  328. m51: ╜ Traded Stocks Report
  329.   ä"stkrte"
  330. m52: ╜ Stock Highs Report
  331.   ä"stkrhe"
  332. m53: ╜ Stock Lows Report
  333.   ä"stkrle"
  334. m54: ╜ Stock Trading Balances Report
  335.   ä"stkrre"
  336. m55: ╜ Blank
  337.   wl1
  338. m56: ╜ Client Telephone List
  339.   ä"stkrne"
  340. m57: ╜ Client Trading Balances Report
  341.   ä"stkrbe"
  342. m58: ╜ Cash Audit
  343.   ä"stkrce"
  344.  
  345. s1: ╜ Set heading
  346.  h2%  :( R)
  347.  h1$  ( Q,"mmm dd, yy")
  348.  h2$  7( R,"hh:mm am")
  349.  h3% (46  /(h3$)) 2
  350.  h4$ h1$  '(h3%) h3$  '(h3%) h2$
  351.   ╩ ƒh4$
  352.   ├
  353.  
  354. m99: ╜ On error
  355.   í & 11 p y ▒: ╜ cancel out of ASK 
  356.   í & 88 p ┬"Insufficient memory to open banner","",0,a%: y ▒
  357.   ┬ (( &),"Press OK to make another selection",1,a%
  358.   ía% 1 p yl0  ^ Æ
  359.  
  360.  
  361.  
  362.