Functional Description
Purpose
This function is used to retrieve the Address Number of the entity that should receive an invoice on
behalf of a customer. This value is determined from the Send Invoice To (SITO) field in the Customer
Master.
Setup Notes and Prerequisites
A valid company number (CO) is required by this function. A valid customer Address Number is also
required.
Special Logic
This function will return the following value to the SendToAddressNumber parameter depending on the
value of the SITO field:
The customer's Address Number if SITO = 'C',
The customer's Parent Address Number if SITO = 'P',
0 if SITO = 'N' (this means do not print invoices),
The customer's Payor Address Number if SITO = 'R',
A corresponding address number from Address Book if SITO = 1 through 6.
Technical Specification
Parameters
Item Description I/O Req?Notes
AN8mnCustomerAddressNumberIYCustomer Number.
AN8mnSendToAddressNumberON
COszCompanyIYCompany Number.
Related Tables
F0101Address Book Master
Related Functions
N0100042Customer Master MBF
B0100002A/B - Get Parent Address
Processing
Perform Initializations.
If (Customer Address Number is not equal to '0'),
Call Customer MBF to get value of SITO field.
If (SITO = 'C'),
Return the Customer Address Number.
Endif.
If (SITO = 'P'),
Call 'GetParentAddress' to get the customer's Parent AN8.
Return the customer's Parent Address Number.
Endif.
If (SITO = 'N'),
Return the value of '0'.
Endif.
If (SITO = 'R'),
Return the customer's Payor Address Number.
Endif.
If (SITO = '1' through '6'),
Open the F0101 table.
Retrieve the appropriate Address Number.
Return the Address Number retrieved.
Endif.
Else,
Set error.
Endif.
Perform Function clean up.
D03B0055 - F0301 - Get Invoice Send to Address Number
Parameter Name | Data Item | Data Type | Req/Opt | I/O/Both |
---|---|---|---|---|
mnCustomerAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
mnSendToAddressNumber | AN8 | MATH_NUMERIC | NONE | NONE |
A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or
| ||||
szCompany | CO | char | REQ | NONE |
A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company
|
B0100002 A/B - Get Parent Address | ||||
N0100042 Customer Master -MBF |
F0101 Address Book Master |