ConvTransAmttoCustCurr

Convert Transaction Amt to Customer Ccy & Upd F0301

Major Business Rule

Object Name: B0100024

Parent DLL: CFIN

Location: Client/Server

Language: C





1.Functional Description

1.1Purpose

This functions allows the updating of key Accounts Receivable transaction amounts and dates in the Customer Master table. The function will 

determine whether a user is running the new A/R system (03B), or the old system (03) and update the correct table (i.e. either F03B01 or F0301).


The function should be passed a Type, so it knows what type of transaction is being processed and which fields it should update. For example, 

an invoice transaction type will be programmed to update the Amount Invoiced Year-to-Date, Date of Last Invoice, and Date First Invoice (if this is a new 

invoice).  


The function should be passed the amount of a transaction in domestic currency and, if relevant, the amount in the transaction (foreign) 

currency. These amounts should be the non-taxable amounts recorded in the transaction file, eg F0311, F4211, etc. This function will determine whether it will use 

the domestic amount, the foreign amount, or whether it needs to convert the domestic amount, to update the Customer Master in the customer's default 

currency. A date may also be passed to be updated to the Customer Master table, if it is relevant for the type of update you wish to have performed.


The "types" currently supported by this function will be:


TypeCustomer Master fields to be updated:

   1InvoiceInvoiced Amount YTD. Parameter amount will be added to A5ASTY. Date - Last Invoice. If a non-zero date is 

passed into the function, this will replace A5DLIJ. Date - First Invoice. If a non-zero date is passed into the function & A5DFIJ is 

not yet loaded, this will replace A5DFIJ..

   2ReceiptAmount Last Paid. Parameter amount will replace A5ALP. Date - Last Paid. If a non-zero date is passed in, this 

will replace A5DLP.

   3Order Amount Open Order. Parameter amount will be added to A5APRC.

   4Finance/ Interest Charge Finance Charge YTD. Parameter amount will be added to A5FCY

   5Miscellaneous Amount Due. Parameter amount will be added to A5AD.

   6 Amount High Balance. Parameter amount will replace to A5AHB. Date - High Balance. Parameter date will replace 

A5DHB if it is non-zero.

   7Amount Address Book. Parameter amount will replace to AM.

   8Amount Address Book. Parameter amount will accumulate to A5ABAM.

   9Amount Address Book 1. Parameter amount will replace to A5ABA1.

  10Amount Address Book 1. Parameter amount will accumulate to A5ABA1.

  11User Reserved Amount. Parameter amount will replace to A5URAT. User Reserved Date. If a non-zero date is passed into 

this function, it will replace A5URDT. 

  12User Reserved Amount. Parameter amount will accumulate to A5URAT. User Reserved Date. If a non-zero date is passed 

into this function, it will replace A5URDT.

 


1.2Setup Notes and Prerequisites

For this function to perform currency conversion, the Currency Conversion flag in the General Constants must be set to either "Y" or "Z". If this flag is 
set to "N", no currency conversion can occur and the function will not update the Customer Master table when amounts require conversion.



1.3Special Logic


2.Technical Specifications


2.1Parameters:

2.2Related Tables 

Table Table Description
F0301Customer Master

F03B01Customer Master


2.3Related Business Functions

Source NameFunction Name
B0000027Currency Conversion

B0000033Get Exchange Rate

B0100024Convert Transaction Amount to Customer Currency


2.4Processing 


1. If the customer master row for the given Address Number cannot be found then error message 0037 will be returned.

2. If the database or the table cannot be found then error message 3143 will be returned.

3. If an error occurs converting any of the amounts to the customer's default currency then error message 0488 will be returned and the table will not 

be updated.  

4. If an error occurs during the update process, error message 0001 will be returned.



Data Structure

D0100024 - Convert Transaction Amount to Customer Currency

Parameter NameData ItemData TypeReq/OptI/O/Both
mnAddressNumberAN8MATH_NUMERICNONENONE

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

jdDateExchangeRateDATE01JDEDATENONENONE

Event point for JDE Date.

szDomCurrencycodeCRCEcharNONENONE

mnDomTaxableAmtSTAMMATH_NUMERICNONENONE

The amount assessed and payable to tax authorities. It is the total of the VAT, use, and sales taxes (PST).

szTransCurrencycodeCRCDcharNONENONE

A code that identifies the currency of a transaction. 

mnForeigntaxableamountCTXAMATH_NUMERICNONENONE

That portion of the sale that is subject to tax in foreign currency.

cErrorFlagEV01charNONENONE

An option that specifies the type of processing for an event.

nTypeINT01integerNONENONE

Number of Days in Future to Query for Responses Due. 

jdDateDTEJDEDATENONENONE

You can enter a date with or without slashes (/) or dashes (-) as separators. If you leave a date entry field blank, the system supplies the 
current date.

mnTimelastupdatedUPMTMATH_NUMERICNONENONE

The time that specifies when the program executed the last update to this record.

jdDateupdatedUPMJJDEDATENONENONE

The date that specifies the last update to the file record.

szUseridUSERcharNONENONE

The code that identifies a user profile.

szWorkstationidJOBNcharNONENONE

The code that identifies the work station ID that executed a particular job.

szProgramidPIDcharNONENONE

The number that identifies the batch or interactive program (batch or interactive object). For example, the number of the Sales Order Entry 
interactive program is P4210, and the number of the Print Invoices batch process report is R42565. The program ID is a variable length value. 
It is assigned according to a structured syntax in the form TSSXXX, where: T The first character of the number is alphabetic and identifies the 
type, such as P for Program, R for Report, and so on. For example, the value P in the number P4210 indicates that the object is a 
program. SS The second and third characters of the number are numeric and identify the system code. For example, the value 42 in the number P4210 
indicates that this program belongs to system 42, which is the Sales Order Processing system. XXX The remaining characters of the numer are 
numeric and identify a unique program or report. For example, the value 10 in the number P4210 indicates that this is the Sales Order Entry 
program.

szCompanyCOcharNONENONE

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

B0000027 CurrencyConvForAndDom
B0000033 Get Exchange Rate
B0100056 F03012 - Update A/R Data on Customer Master
B9800100 Get Audit Information
N0100042 Customer Master -MBF

Related Tables

None