{ Omni Price - Customer Pricing External API as at 16-Jun-2005}

{ Usage: call with name "WDC_API_Calculate_Price" in dictionary 1999, {Parameter list as described below}. }
in 	integer 			IN_Mode; { 2 = Invoicing, 3 = SOP }
in 	'Customer Number' 		IN_Customer_Number;
in 	'Primary Billto Address Code' 	IN_Billto_Address_Code;
in 	'Primary Shipto Address Code' 	IN_Shipto_Address_Code;
in 	'Salesperson ID' 		IN_Salesperson_ID;
in 	'Sales Territory' 		IN_Sales_Territory;
in 	'Shipping Method' 		IN_Shipping_Method;
in 	'Payment Terms ID' 		IN_Payment_Terms_ID;
in 	'Location Code' 		IN_Location_Code;
in 	'Item Number' 			IN_Item_Number;
in 	'Currency ID' 			IN_Currency_ID;
in 	'PriceLevel' 			IN_Price_Level;
in 	'U Of M' 			IN_U_Of_M;
in 	'QTY' 				IN_QTY;
in 	'Date' 				IN_Date;
inout 	'Unit Price' 			INOUT_FuncUnitPrice; { Standard Calculated Functional Unit Price }
inout 	'Unit Price' 			INOUT_OrigUnitPrice; { Standard Calculated Originating Unit Price }
in 	'MC Def Structure' 		IN_MCDef;
out	string 				OUT_Contract_ID; { Will be set to Contract ID used, or empty if no Special Price }
optional in	integer			IN_Transaction_Type = 0; {eg. 'SOP Type' }
optional in	string			IN_Transaction_Number = ""; {eg. 'SOP Number' }
optional in	long			IN_Line_Item_Sequence = 0; {eg. 'Line Item Sequence' }
optional in	long			IN_Component_Sequence = 0; {eg. 'Component Sequence' }

----------------------------------------

{ Usage: call with name "WDC_API_Calculate_Price_With_UDFs" in dictionary 1999, {Parameter list as described below}. }

in 	integer 			IN_Mode; { 2 = Invoicing, 3 = SOP }
in 	'Customer Number' 		IN_Customer_Number;
in 	'Primary Billto Address Code' 	IN_Billto_Address_Code;
in 	'Primary Shipto Address Code' 	IN_Shipto_Address_Code;
in 	'Salesperson ID' 		IN_Salesperson_ID;
in 	'Sales Territory' 		IN_Sales_Territory;
in 	'Shipping Method' 		IN_Shipping_Method;
in 	'Payment Terms ID' 		IN_Payment_Terms_ID;
in 	'Location Code' 		IN_Location_Code;
in	'User Defined Table 1'		IN_User_Defined_Table_1; { SOP User Defined List 1 }
in	'User Defined Table 2'		IN_User_Defined_Table_2; { SOP User Defined List 2 }
in	'User Defined Table 3'		IN_User_Defined_Table_3; { SOP User Defined List 3 }
in	'User Defined 1'		IN_User_Defined_1; { SOP User Defined Text 1 }
in	'User Defined 2'		IN_User_Defined_2; { SOP User Defined Text 2 }
in	'User Defined 3'		IN_User_Defined_3; { SOP User Defined Text 3 }
in	'User Defined 4'		IN_User_Defined_4; { SOP User Defined Text 4 }
in	'User Defined 5'		IN_User_Defined_5; { SOP User Defined Text 5 }
in	'User Defined 1'		IN_IVC_User_Defined_1; { Invoicing User Defined 1 }
in	'User Defined 2'		IN_IVC_User_Defined_2; { Invoicing User Defined 2 }
in	'Item Number' 			IN_Item_Number;
in	'Currency ID' 			IN_Currency_ID;
in	'PriceLevel' 			IN_Price_Level;
in	'U Of M' 			IN_U_Of_M;
in	'QTY' 				IN_QTY;
in	'Date' 				IN_Date;
inout 	'Unit Price' 			INOUT_FuncUnitPrice; { Standard Calculated Functional Unit Price }
inout 	'Unit Price' 			INOUT_OrigUnitPrice; { Standard Calculated Originating Unit Price }
in	'MC Def Structure' 		IN_MCDef;
out	string 				OUT_Contract_ID; { Will be set to Contract ID used, or empty if no Special Price }
optional in	integer			IN_Transaction_Type = 0; {eg. 'SOP Type' }
optional in	string			IN_Transaction_Number = ""; {eg. 'SOP Number' }
optional in	long			IN_Line_Item_Sequence = 0; {eg. 'Line Item Sequence' }
optional in	long			IN_Component_Sequence = 0; {eg. 'Component Sequence' }

----------------------------------------


{ If calling function PriceList_CalcPrice of form ivPriceMatrix or function PriceList_DefaultPrice of form ivPriceMatrix }
{ use this call before using the above functions to do the preparation for Omni Price to alter the pricing. }

{ Usage: call with name "WDC_API_Set_Filter" in dictionary 1999, {Parameter list as described below}. }

in	integer				IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer				IN_Transaction_Type; {eg. 'SOP Type' }
in	string				IN_Transaction_Number; {eg. 'SOP Number' }
in	long				IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long				IN_Component_Sequence; {eg. 'Component Sequence' }
in 	'Customer Number' 		IN_Customer_Number;
in 	'Primary Billto Address Code' 	IN_Billto_Address_Code;
in 	'Primary Shipto Address Code' 	IN_Shipto_Address_Code;
in 	'Salesperson ID' 		IN_Salesperson_ID;
in 	'Sales Territory' 		IN_Sales_Territory;
in 	'Shipping Method' 		IN_Shipping_Method;
in 	'Payment Terms ID' 		IN_Payment_Terms_ID;
in 	'Location Code' 		IN_Location_Code;
in	date				IN_Effective_Date;

----------------------------------------

{ Usage: call with name "WDC_API_Set_Filter_With_UDFs" in dictionary 1999, {Parameter list as described below}. }

in	integer				IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer				IN_Transaction_Type; {eg. 'SOP Type' }
in	string				IN_Transaction_Number; {eg. 'SOP Number' }
in	long				IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long				IN_Component_Sequence; {eg. 'Component Sequence' }
in 	'Customer Number' 		IN_Customer_Number;
in 	'Primary Billto Address Code' 	IN_Billto_Address_Code;
in 	'Primary Shipto Address Code' 	IN_Shipto_Address_Code;
in 	'Salesperson ID' 		IN_Salesperson_ID;
in 	'Sales Territory' 		IN_Sales_Territory;
in 	'Shipping Method' 		IN_Shipping_Method;
in 	'Payment Terms ID' 		IN_Payment_Terms_ID;
in 	'Location Code' 		IN_Location_Code;
in	'User Defined Table 1'		IN_User_Defined_Table_1; { SOP User Defined List 1 }
in	'User Defined Table 2'		IN_User_Defined_Table_2; { SOP User Defined List 2 }
in	'User Defined Table 3'		IN_User_Defined_Table_3; { SOP User Defined List 3 }
in	'User Defined 1'		IN_User_Defined_1; { SOP User Defined Text 1 }
in	'User Defined 2'		IN_User_Defined_2; { SOP User Defined Text 2 }
in	'User Defined 3'		IN_User_Defined_3; { SOP User Defined Text 3 }
in	'User Defined 4'		IN_User_Defined_4; { SOP User Defined Text 4 }
in	'User Defined 5'		IN_User_Defined_5; { SOP User Defined Text 5 }
in	'User Defined 1'		IN_IVC_User_Defined_1; { Invoicing User Defined 1 }
in	'User Defined 2'		IN_IVC_User_Defined_2; { Invoicing User Defined 2 }
in	date				IN_Effective_Date;

----------------------------------------

{ If calling function PriceList_CalcPrice of form ivPriceMatrix or function PriceList_DefaultPrice of form ivPriceMatrix }
{ use this call before using the above functions to do the preparation for Omni Price to alter the pricing. }

{ Usage: call with name "WDC_API_Set_Filter_With_Markdown" in dictionary 1999, {Parameter list as described below}. }

in	integer				IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer				IN_Transaction_Type; {eg. 'SOP Type' }
in	string				IN_Transaction_Number; {eg. 'SOP Number' }
in	long				IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long				IN_Component_Sequence; {eg. 'Component Sequence' }
in 	'Customer Number' 		IN_Customer_Number;
in 	'Primary Billto Address Code' 	IN_Billto_Address_Code;
in 	'Primary Shipto Address Code' 	IN_Shipto_Address_Code;
in 	'Salesperson ID' 		IN_Salesperson_ID;
in 	'Sales Territory' 		IN_Sales_Territory;
in 	'Shipping Method' 		IN_Shipping_Method;
in 	'Payment Terms ID' 		IN_Payment_Terms_ID;
in 	'Location Code' 		IN_Location_Code;
in	date				IN_Effective_Date;
in	reference			IN_Markdown_Reference; { Reference pointing to Markdown Amount Field }
in	reference			IN_Originating_Markdown_Reference; { Reference pointing to Originating Markdown Amount Field }
in	reference			IN_Markdown_Account_Reference; { Reference pointing to Markdown Account Field }
in	reference			IN_Markdown_Type_Reference; { Reference pointing to Markdown Type Field }
in	reference			IN_Markdown_Percent_Reference; { Reference pointing to Markdown Percent Field }in	reference			IN_Contract_ID_Reference; { Reference pointing to Contract ID Field }

----------------------------------------

{ Usage: call with name "WDC_API_Set_Filter_With_Markdown_And_UDFs" in dictionary 1999, {Parameter list as described below}. }

in	integer				IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer				IN_Transaction_Type; {eg. 'SOP Type' }
in	string				IN_Transaction_Number; {eg. 'SOP Number' }
in	long				IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long				IN_Component_Sequence; {eg. 'Component Sequence' }
in 	'Customer Number' 		IN_Customer_Number;
in 	'Primary Billto Address Code' 	IN_Billto_Address_Code;
in 	'Primary Shipto Address Code' 	IN_Shipto_Address_Code;
in 	'Salesperson ID' 		IN_Salesperson_ID;
in 	'Sales Territory' 		IN_Sales_Territory;
in 	'Shipping Method' 		IN_Shipping_Method;
in 	'Payment Terms ID' 		IN_Payment_Terms_ID;
in 	'Location Code' 		IN_Location_Code;
in	'User Defined Table 1'		IN_User_Defined_Table_1; { SOP User Defined List 1 }
in	'User Defined Table 2'		IN_User_Defined_Table_2; { SOP User Defined List 2 }
in	'User Defined Table 3'		IN_User_Defined_Table_3; { SOP User Defined List 3 }
in	'User Defined 1'		IN_User_Defined_1; { SOP User Defined Text 1 }
in	'User Defined 2'		IN_User_Defined_2; { SOP User Defined Text 2 }
in	'User Defined 3'		IN_User_Defined_3; { SOP User Defined Text 3 }
in	'User Defined 4'		IN_User_Defined_4; { SOP User Defined Text 4 }
in	'User Defined 5'		IN_User_Defined_5; { SOP User Defined Text 5 }
in	'User Defined 1'		IN_IVC_User_Defined_1; { Invoicing User Defined 1 }
in	'User Defined 2'		IN_IVC_User_Defined_2; { Invoicing User Defined 2 }
in	date				IN_Effective_Date;
in	reference			IN_Markdown_Reference; { Reference pointing to Markdown Amount Field }
in	reference			IN_Originating_Markdown_Reference; { Reference pointing to Originating Markdown Amount Field }
in	reference			IN_Markdown_Account_Reference; { Reference pointing to Markdown Account Field }
in	reference			IN_Markdown_Type_Reference; { Reference pointing to Markdown Type Field }
in	reference			IN_Markdown_Percent_Reference; { Reference pointing to Markdown Percent Field }in	reference			IN_Contract_ID_Reference; { Reference pointing to Contract ID Field }

----------------------------------------

{ If calling function PriceList_CalcPrice of form ivPriceMatrix or function PriceList_DefaultPrice of form ivPriceMatrix }
{ use this call before using the above functions to prevent Omni Price from attempting to alter the pricing. }

{ Usage: call with name "WDC_API_Clear_Filter" in dictionary 1999. }

----------------------------------------


{ Report Writer Function to obtain Contract Used for SOP and Invoicing, only works if transaction logging is on }

{ Usage in a string Calculated Field: FUNCTION_SCRIPT( rw_TableLineString  1999  "SOP"  IN_Transaction_Number  IN_Transaction_Type  IN_Line_Item_Sequence  IN_Component_Sequence  1  ) }
{ Usage in a string Calculated Field: FUNCTION_SCRIPT( rw_TableLineString  1999  "IVC"  IN_Transaction_Number  IN_Transaction_Type  IN_Line_Item_Sequence  IN_Component_Sequence  1  ) }

function returns string sData; { Contract Used, if any }
in integer dict_id; {1999}
in string report_name; {Report Type: "SOP" or "IVC"}
in string sNumber; 	{eg. 'SOP Number' }
in integer sType; {eg. 'SOP Type' }
in currency cSequenceOne; {eg. 'Line Item Sequence' }
in currency cSequenceTwo; {eg. 'Component Sequence' }
in integer iControl; { 1 = Contract ID }


----------------------------------------

{ Report Writer Function to obtain Standard Price, only works if transaction logging is on and Contract has been used }

{ Usage in a currency Calculated Field: FUNCTION_SCRIPT( rw_TableLineCurrency  1999  "SOP"  IN_Transaction_Number  IN_Transaction_Type  IN_Line_Item_Sequence  IN_Component_Sequence  1  ) }
{ Usage in a currency Calculated Field: FUNCTION_SCRIPT( rw_TableLineCurrency  1999  "IVC"  IN_Transaction_Number  IN_Transaction_Type  IN_Line_Item_Sequence  IN_Component_Sequence  1  ) }

function returns currency sData; { Standard Price or Originating Standard Price if contract used }
in integer dict_id; {1999}
in string report_name; {Report Type: "SOP" or "IVC"}
in string sNumber; 	{eg. 'SOP Number' }
in integer sType; {eg. 'SOP Type' }
in currency cSequenceOne; {eg. 'Line Item Sequence' }
in currency cSequenceTwo; {eg. 'Component Sequence' }
in integer iControl; { 1 = Standard Price, 2 = Originating Standard Price }

----------------------------------------

{ Report Writer Function to obtain Originating Standard Price, only works if transaction logging is on and Contract has been used }

{ Usage in a currency Calculated Field: FUNCTION_SCRIPT( rw_TableLineCurrency  1999  "SOP"  IN_Transaction_Number  IN_Transaction_Type  IN_Line_Item_Sequence  IN_Component_Sequence  2  ) }
{ Usage in a currency Calculated Field: FUNCTION_SCRIPT( rw_TableLineCurrency  1999  "IVC"  IN_Transaction_Number  IN_Transaction_Type  IN_Line_Item_Sequence  IN_Component_Sequence  2  ) }

function returns currency sData; { Standard Price or Originating Standard Price if contract used }
in integer dict_id; {1999}
in string report_name; {Report Type: "SOP" or "IVC"}
in string sNumber; 	{eg. 'SOP Number' }
in integer sType; {eg. 'SOP Type' }
in currency cSequenceOne; {eg. 'Line Item Sequence' }
in currency cSequenceTwo; {eg. 'Component Sequence' }
in integer iControl; { 1 = Standard Price, 2 = Originating Standard Price }

----------------------------------------


{ Report Writer Function to obtain Contract Used, only works if transaction logging is on }

{ Usage in a string Calculated Field: FUNCTION_SCRIPT( RW_Pricing_Get_Contract_ID  IN_Mode  IN_Transaction_Type  IN_Transaction_Number  IN_Line_Item_Sequence  IN_Component_Sequence ) }

function returns string OUT_Contract;	{ Contract Used, if any }
in	integer		IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer		IN_Transaction_Type; {eg. 'SOP Type' }
in	string		IN_Transaction_Number; {eg. 'SOP Number' }
in	long		IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long		IN_Component_Sequence; {eg. 'Component Sequence' }

----------------------------------------

{ Report Writer Function to obtain Standard Price, only works if transaction logging is on and Contract has been used }

{ Usage in a currency Calculated Field: FUNCTION_SCRIPT( RW_Pricing_Get_Standard_Price  IN_Mode  IN_Transaction_Type  IN_Transaction_Number  IN_Line_Item_Sequence  IN_Component_Sequence ) }

function returns currency OUT_Price;	{ Standard Price if contract used }
in	integer		IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer		IN_Transaction_Type; {eg. 'SOP Type' }
in	string		IN_Transaction_Number; {eg. 'SOP Number' }
in	long		IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long		IN_Component_Sequence; {eg. 'Component Sequence' }

----------------------------------------

{ Report Writer Function to obtain Originating Standard Price, only works if transaction logging is on and Contract has been used }

{ Usage in a currency Calculated Field: FUNCTION_SCRIPT( RW_Pricing_Get_Originating_Standard_Price  IN_Mode  IN_Transaction_Type  IN_Transaction_Number  IN_Line_Item_Sequence  IN_Component_Sequence ) }

function returns currency OUT_Orig_Price;	{ Standard Price if contract used }
in	integer		IN_Mode; { 2 = Invoicing, 3 = SOP }
in	integer		IN_Transaction_Type; {eg. 'SOP Type' }
in	string		IN_Transaction_Number; {eg. 'SOP Number' }
in	long		IN_Line_Item_Sequence; {eg. 'Line Item Sequence' }
in	long		IN_Component_Sequence; {eg. 'Component Sequence' }

----------------------------------------


Omni Price Contract Setup Modes (* = Intra Range Selection)

Customer Filter:-
 1)    * Customer ID
 2)      Customer Name
 3)    * Class ID
 4)    * Salesperson ID
 5)    * Sales Territory
 6)    * PriceLevel
 7)    * Currency ID
 8)    * Shipping Method
 9)    * Payment Terms ID
10)      User Defined 1
11)      User Defined 2
12)      City
13)      State
14)      Zip Code
15)      Country
16)      UPS Zone
17)      Created Token Date

Item Filter:-
21)    * Item Number
22)      Item Description
23)    * Item Class
24-29) * User Category 1 to 6
30)    * WDC Product Group ID
31)    * WDC Product Subgroup ID
32)    * Price Group
33)    * PriceLevel
34)    * Currency ID
35)    * Location Code
36)    * U Of M Schedule
37)    * U Of M
38)      Short Name
39)      Generic Description
40)      Created Token Date

Date Filter:-
41)      Day of Week
42)      Token Date
43-46)   WDC Date Range 1 to 4

Additional Filter:-
61)    * Salesperson ID
62)    * Sales Territory
63)    * PriceLevel
64)    * Currency ID
65)    * Shipping Method
66)    * Payment Terms ID
67)    * Location Code
68-70) * SOP User Defined List 1 to 3
71-75)   SOP User Defined Text 1 to 5
76-77)   Invoicing User Defined 1 to 2


Contract Lines can specify; Item Number, Location Code, Currency ID, PriceLevel, U Of M. 
Pricing Modes include: Fixed Price, Fixed Adj, % Std or Cur cost, % List or Calc price. 
Quantity breaks are allowed and are updated automatically.

** End of File, Last Modified: 16-Jun-2005 **