
                      Ship Calculation module 

Program included:  ssship.exe (Strong Software ship calculation program)
                   modified soposd.scx/sct sales order form

There are no modification made to the ACCPAC programs with one minor 
  exception. The sales order form: soposd requires a command button that 
  is visible only when a Ship Type line item is entered. 

Overview:
  When entering a ship type line item, a "Calculate" command button will 
  appear on the order entry screen.  Clicking on this button, brings up 
  a form displaying the total weight computed from the weight field in 
  e inventory file.  You may enter a value from a chart, add a flat
  amount or add a percentage.

  Computing UPS rate is an optional feature. 
  
TRIAL vs LIVE MODE:
  The trial program runs in Pro Series for Company 99 (no install code 
  needed).
  
  For Live mode, you will need and activation code to enter into the 
  Rules table. Please supply Company Name (shown in Change System
  Information) for each company you wish to install.
  Once you have received the install code, enter it into the Pro Rules
  table:  Go to the Rules section of System Manager  
  Enter Rule SS_INST
  In the message line enter the 4 digit install code:
    example: 1234
 
INSTALL Ship Calculation module:
  Create a subdirectory off of the Pro system directory and name it "Ship" 
  Place all the supplied programs and files into this "Ship" directory.
  Copy the ssship.exe file into the Pro system directory. 

  See USING CUSTOMIZATION MANAGER TO ADD COMMAND BUTTON at bottom of this
  file.
  
Setting default values:  
  We use the price and cost fields from the inventory file as the default 
  values. These values may be overwritten in the Rules table so that
  you will have different defaults for entering with the calc module or
  without.

 Note: All these following rules are optional.

To enter the default price go to the Rules section of System Manager  
  Enter Rule SS_PRICE
  In the message line enter the value:
    example: 25.00
  For Cost, Rule is SS_COST
    Enter cost in message line. Example:18.25
  To determine price by adding fixed amount to cost, Rule is SS_ADD
    Enter add amount in message line. Example: 9.25
  To determine price by adding a percentage to cost, Rule is SS_PERCT
    Enter percent in message line. Example: 8.25

 Operational Modes:
  There are two modes for entering the price and cost values.
  Default is to set the cost either from inventory default (avg cost), Rules 
  table, or manually, then add a fixed or a percentage to get the price.
  You may click the radio button to calculate the cost separately. In 
  this case, the Cost is on the 2nd line and the Price is on the 1st line.
  
 Safety features:
  If there are line items on the order that do not have a weight from the
    inventory file, our program will indicate that on the screen.
  If there is already a ship type item on the order, we indicate this 
    and do not allow you to proceed with the Calc program. But of course,
    you may enter values from the ACCPAC order entry.
  If the 'base' price has a value but the final price is 0, we prompt for
    a calculation (by pressing Add or Percent).
  
USING CUSTOMIZATION MANAGER TO ADD COMMAND BUTTON 
  If you have existing modifications to the SOPOST form, please contact
  us as to how to place this button on the form.  
  
  To use Customization Manager, you must enter Pro through the VFP
  command box. 

  From Customization Manager, select Maintain/Customize Form.
  Click on the "+" box SO and select SOPOST. Click on "Add". In the Sub Class
  page that appears enter:
    Seq #: 10
    Name: ssShip
    Description: Calculate Shipping Charge
    Class Library: SHIP
  Save these settings.  Click on edit form.  Bring up the Form Controls Tool
  box (crossed hammer and wrench under the Format menu item). 

Step (1)
  Place a Command Button (3rd icon down on 1st row) anywhere on the form.  
  With "Command1" in the Properties Window, click on the Method tab and choose 
  Init Event and paste the following code:

* Code (1)  Command1.Init Event 
************************
= DODEFAULT()

*- Button attributes
    This.Caption = "Calculate Shipping Charge"
    *This.Name = "cmdShip" && cannot be renamed!
    This.fontbold = .t.
    This.fontsize = 11
    This.forecolor = RGB(128,0,0)
    This.height = 72
    This.left = 264
    This.top = 87
    This.width = 244
    This.visible = .f. && default but just to make sure
**********************************
Step (2)
From the Method tab, choose the Click event and paste the following code:

* Code (2)  Command1.Click Event 
***************************
DIMENSION la_return(2)

= ssShip(@la_return)

IF VARTYPE(la_return(1)) = "N"
   ThisForm.cntPgfMain.pgfMain.Page3.cntPageLineItemDetail.cntCost.txtCurrencyAmount.Value = la_return(1)
   ThisForm.cntPgfMain.pgfMain.Page3.cntPageLineItemDetail.cntPrice.txtCurrencyAmount.Value = la_return(2)
ENDIF 

ThisForm.cntPgfMain.pgfMain.Page3.cntPageLineItemDetail.cntPrice.txtCurrencyAmount.SetFocus
this.Visible = .f.
*****************************

Step (3) 
In the Properties pannel, you will see "frmMain" highlighted on the first line. Click on 
 selection bar and slide the "slider" down about 60% util you see Page3. About 10 items 
 down from there select cntPrice.  With "cntPrice" now highlighted in the window, click 
 on the Method tab and select GotFocus Event. Paste the following code in the GotFocus.

* Code (3)  cntPrice.GotFocus Event            
******************************
IF LEFT(This.Parent.cntItem.txtItem.Value, LEN(gc_shiptyp)) = ;
          gc_shiptyp AND NOT EMPTY(gc_shiptyp)

  ThisForm.Command1.Visible = .t.
  ThisForm.Command1.GotFocus

ENDIF                
******************************


    Thanks for using our products!

    Dwight Strong
    Strong Software
    433 Town Center#637
    Corte Madera, CA 94925
    415-927-3163

    www.strongsoftware.com
      
 
