GetInvoiceSendToAddress

F03012 - Get Invoice Send to Address Number

Minor Business Rule

Object Name: B03B0055

Parent DLL: CFIN

Location: Client/Server

Language: C

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.


Data Structure

D03B0055 - F0301 - Get Invoice Send to Address Number

Parameter NameData ItemData TypeReq/OptI/O/Both
mnCustomerAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

mnSendToAddressNumberAN8MATH_NUMERICNONENONE

A number that identifies an entry in the Address Book system, such as employee, applicant, participant, customer, supplier, tenant, or 
location.

szCompanyCOcharREQNONE

A code that identifies a specific organization, fund, or other reporting entity. The company code must already exist in the Company 
Constants table (F0010) and must identify a reporting entity that has a complete balance sheet. At this level, you can have intercompany 
transactions. Note: You can use company 00000 for default values such as dates and automatic accounting instructions. You cannot use company 00000 
for transaction entries.

Related Functions

B0100002 A/B - Get Parent Address
N0100042 Customer Master -MBF

Related Tables

F0101 Address Book Master