generate/cbs2.gif Format Assignment Hook (R-SIPFMT.MAC) generate/enh73.jpg

Stock Tracing Component Only


 

The script file must be located in your CAPITAL program directory and must have the file name R-SIPFMT.MAC. It is used to control the formatting display of assignment information on transactions.

Entry Values

Variable

Purpose

Mode

1 = the assignment is standard.

2 = the assignment is nested.

aDescriptions

This is an array of assignments that will placed underneath the transaction line item. This could be a list of serial or batch numbers, sizes, colours, styles, etc.

 

Elemet No.

aDescription Element Description

1

The Stock Tracing ID as a numeric value.

2

The Stock Tracing header description. E.g., "Batch", "Lot", "Serial Number".

3

The 'raw' description of the Stock Tracing Assignment. For example, if the property was a serial number, this would be the actual serial number.

4

The first element of the allocation's description. For a serial number or any property checked as 'Unique' the 3rd and 4th elements will be identical. Otherwise this will be the quantity of the allocation as a character string.

5

The Multiplies Description if applicable, otherwise blank. E.g., "x".

6

The allocation's description. E.g., the serial or batch number for a non-unique item. Otherwise this element will be blank.

Return Values

This scripting hook may return either FALSE to allow CAPITAL to process formatting in the normal way, or it may return an array of strings to be displayed under the item. The returned array must have one dimension only and each character string element cannot exceed 40 characters.

Description

This script hook can be used to control the formatting of Stock Tracing items as they appear on transactions such as invoices, sales orders and pick lists.

generate/notepad2.gifFor more information on stock tracing properties consult the topic: Stock Tracing Specifications.

Example #1

This scripting hook formats stock tracing information in a manner similar to the standard way CAPITAL presents information, except that it places the Stock Tracing Stock ID number in front of each line:

Declare nCount Type Numeric

nCount := 0

Declare aList Type Array

aList := {}

If Len(aDescriptions) = 0

   Return FALSE

Endif

:Loop

nCount := nCount + 1

If nCount > Len(aDescriptions)

   Goto End

Endif

AADD(aList, STR(aDescription[nCount,1], 1) + ". " + aDescription[nCount,4] + " " + aDescription[nCount,5] + " " + aDescription[nCount,6])

Goto Loop

:End

RETURN ( aList )

____________________________

Related Topics:

Stock Tracing Concepts

Stock Tracing Item Allotment

Scripting Hooks

Script Programming



Help Topic Map