home *** CD-ROM | disk | FTP | other *** search
/ Piper's Pit BBS/FTP: ibm 0010 - 0019 / ibm0010-0019 / ibm0010.tar / ibm0010 / MSWBASE4.ZIP / INVENTRY / STKCNTRL.SBP < prev    next >
Encoding:
Text File  |  1989-09-19  |  4.2 KB  |  149 lines

  1. SBP
  2.   ╜ Stock control program
  3.   ┤ Ö"PRODUCT": ╜ ***** Necessary to handle Edit selection off menu
  4.  
  5. stmenu:  Γ e: ┤ £"stmenu"
  6.   vsetup 
  7. stend:  Æ
  8.  
  9. setup:  ╜ set up prompts for forms
  10.   ╜ ******************************************************************** 
  11.   ╩ É e
  12.   │ _ wsterrtrap
  13.   ╜ ********************************************************************
  14.   ├
  15.  
  16.  
  17.  
  18.  
  19. supcntrl:  ╜ ************ pushbutton clicked from menu ******
  20.   ╜ ******************** load Supplier Section *********
  21.   ¿"supcntrl"
  22.   Æ
  23. qrcntrl:  ╜ ************* pushbuttons clicked from menu ****
  24.   ╜ ******************** load Query/Report/Update section*
  25.   ä"qrcntrl"
  26.   Æ
  27.  
  28.  
  29.   ╜ *************************************************************
  30.   ╜ Product - Entry and Amend and View
  31.   ╜ *************************************************************
  32.  
  33. prodent:  ╜ ************ REM pushbutton clicked from menu **
  34.   ╜ ******************** Add a New Product *************  
  35.   ┤ £"prodent"
  36.   vsetup
  37.   ü £: ö1,0
  38.   Æ
  39.  
  40. prodedit:  ╜ *********** REM pushbutton clicked ************
  41.   ╜ ******************** go from browse to Amend *******
  42.  key1$ Product_code.product
  43.   Γ e
  44.   ┤ £"prodamd"
  45.   vsetup
  46.   ╔ £ Ñkey1$: £
  47.   Æ
  48.  
  49. getprod:  ╜ ************* On entry or Amend Forms *******
  50.   ╜ ********************* After entry of Product-code ***
  51.   ╜ ********************* Also on Movement-Postings *****
  52.  key1$ product_code.product
  53.   í O J(key1$,product_code.product) p
  54.   ┬"Product file","Select a Product (or <CANCEL> to Enter New)",20,a%,key1$,60,product_code.product,description.product
  55.   ía% 0 p ┤ £"prodent": ü £: ö: Æ
  56.   Æ í
  57.   ╔ £ Ñkey1$: £
  58.   Æ
  59.  
  60.   ├
  61.  
  62. prodview:  ╜ ************ pushbutton clicked ****************
  63.   ╜ ********************* goto browse form **************
  64.   Γ │: ┤ £"prodview"
  65.   vsetup: ╔ £ Ñkey1$: £
  66.   Æ
  67.  
  68.   ╜ *************************************************************
  69.   ╜ Stock Movement Entry and View Phase
  70.   ╜ *************************************************************
  71.  
  72. stpostnu:  ╜ ** pushbutton clicked **************************
  73.   ╜ *********** A New Posting ***************************
  74.   Γ │: ┤ £"stmovpst": vsetup
  75.   ü £: ö1,9
  76.   Æ
  77.  
  78.  
  79. stpost:  ╜ **** the Posting phase ***********************
  80.   ╜ *********** Now Calculate and Post Effects of Entry *
  81.   ╜ *********** Arrived at from end Of Movement Entry ***
  82.   ╜ **********  unpack the 'effect' fields **************
  83.   ╔ ÑMovement_type.stmovmnt Ö"sttype"
  84.  x% Effect_On_Order.sttype: ╜ ** On Order *************
  85.  y$ "On Order": vstunp
  86.  On_order.product On_order.Product v%
  87.  x% Effect_In_Stock.sttype: ╜ ** In Stock *************
  88.  y$ "In Stock": vstunp
  89.  In_Stock.Product In_stock.Product v%
  90.   íMovement_Type.STType "GRN" p
  91.  ╜ ***** Goods Received - New Unit Price ? *********** 
  92.  ┬"Update Product Unit Cost ?","",21,a%
  93.  ía% punit_cost.product Movement_Value.STMovmnt Movement_Qty.StMovmnt
  94.   Æ í
  95.   íMovement_type.sttype "CDS" p
  96.  ╜ ***** Goods Dispatched - Update Sales Statistics **
  97. Sales_Val_per.product Sales_Val_per.product Movement_value.StMovmnt
  98. Sales_Val_yr.product Sales_Val_yr.product Movement_value.StMovmnt
  99. Sales_qty_per.product Sales_qty_per.product Movement_qty.StMovmnt
  100. Sales_qty_yr.product Sales_qty_yr.product Movement_qty.StMovmnt
  101.   Æ í
  102.  x% Effect_Alloc.sttype: ╜ ***** Allocated *************
  103.  y$ "Allocated": vstunp
  104.  Allocated.product Allocated.Product v%
  105.   ╠ Ö"Product"
  106.   ╠ £
  107.   ü £
  108.   Æ
  109.  
  110.  
  111. stunp:  ╜ **** get answer if Operator entry required ****
  112.   íx% 1 p
  113. stunp1:  ┬"Please enter effect on " y$,"( '+' or '-' or CANCEL>)",4,a%,a$,1
  114.  ía% 0 pa$ " "
  115. x% (a$ "+") {1:(a$ "-") { 1:(a$ " ") {0:99
  116.  íx% 2 p wstunp1 
  117.   Æ í
  118.  v% Movement_qty.stmovmnt x%
  119.   ├
  120.  
  121. stmoview:  ╜ ************ pushbutton clicked *************** 
  122.   ╜ ********************* View Movement Transactions *** 
  123.  key1$ product_code.product
  124.  
  125.   Γ │: ┤ £"stmoview"
  126.   vsetup
  127.   ╔ £ Ñkey1$
  128.   Æ
  129.  
  130. prgroup:  ╜ ************** product group entry ************
  131.   Γ e
  132.   ┤ £"prgroup"
  133.   vsetup
  134.   Æ
  135.  
  136. prodgrview:  ╜ *********** view product groups as transactions ****
  137.   Γ │
  138.   ┤ £"prgrpvu"
  139.   vsetup
  140.   Æ
  141.  
  142. sterrtrap:  í & 11 p Æ
  143.   í & 8 
  144.  & 10 p y
  145.   í & 50 p Æ
  146.   ┬"ERROR "  ( &,"9999"), (( &),2,a%: Æ
  147.  
  148.  
  149.  
  150.