277083: Difference between revisions

From CTMS
(New page: {{Doc_Title|System=FUNCTIONAL SPECIFICATION|Title=Amend System to allow Currency|Reference=FS 277083 PA-85DBGC |Version=2.0|Date=|Sysver=10.5|Client=DHL MTS}} == Client Requirement == Am...)
 
Line 58: Line 58:


For example, code below from INT.sql:
For example, code below from INT.sql:
[[Image:277083_2.png]]


  '''IF''' ADM.Get_Param_vchar( 'ACC_ALLOW_MULTIPLE_CCY' ) = 'Y' '''THEN''' '''IF''' v_acc_type = 'CARRIER' '''THEN''' v_ccy := CNT.get_contract_currency(i_invoice.account_id, i_invoice.credit_acc, i_invoice.invoice_date, v_errmsg); '''ELSE''' v_ccy := CNT.get_contract_currency(i_invoice.credit_acc, i_invoice.account_id, i_invoice.invoice_date, v_errmsg); '''END''' '''IF'''<nowiki>;</nowiki> '''ELSE''' '''OPEN''' get_currency; '''FETCH''' get_currency '''into''' v_ccy; '''CLOSE''' get_currency; '''END''' '''IF'''<nowiki>;</nowiki> '''IF''' v_ccy '''IS''' '''NULL''' '''THEN''' o_errmsg := 'No currency has been configured for ' || i_invoice.account_id || ' and ' || i_invoice.credit_acc || ', invoice not created.'<nowiki>;</nowiki> '''RETURN''' 0<nowiki>;</nowiki> '''END''' '''IF'''<nowiki>;</nowiki>
  '''IF''' ADM.Get_Param_vchar( 'ACC_ALLOW_MULTIPLE_CCY' ) = 'Y' '''THEN''' '''IF''' v_acc_type = 'CARRIER' '''THEN''' v_ccy := CNT.get_contract_currency(i_invoice.account_id, i_invoice.credit_acc, i_invoice.invoice_date, v_errmsg); '''ELSE''' v_ccy := CNT.get_contract_currency(i_invoice.credit_acc, i_invoice.account_id, i_invoice.invoice_date, v_errmsg); '''END''' '''IF'''<nowiki>;</nowiki> '''ELSE''' '''OPEN''' get_currency; '''FETCH''' get_currency '''into''' v_ccy; '''CLOSE''' get_currency; '''END''' '''IF'''<nowiki>;</nowiki> '''IF''' v_ccy '''IS''' '''NULL''' '''THEN''' o_errmsg := 'No currency has been configured for ' || i_invoice.account_id || ' and ' || i_invoice.credit_acc || ', invoice not created.'<nowiki>;</nowiki> '''RETURN''' 0<nowiki>;</nowiki> '''END''' '''IF'''<nowiki>;</nowiki>

Revision as of 11:15, 20 May 2011

Aptean Logo.png







DHL MTS

Amend System to allow Currency


FUNCTIONAL SPECIFICATION - 10.5

- 2.0


Reference: FS 277083 PA-85DBGC













































Client Requirement

Amend System to allow Currency selection Allan Butterworth/St Albans/UK/Exel.

Solution

The use of multiple currencies is controlled by a system parameter called ACC_ALLOW_MULTIPLE_CURRENCY. If this is set to Y, when creating an invoice, order revenue or trip cost, the system will look for a contract to determine what the currency is.

The system will check for the currency value before determining whether a payment record is actually required. Currently if the currency cannot be determined any action being undertaken is cancelled with an error regarding currency. In certain cases (own fleet carriers), contracts are not created, so users will not be able to change the status on any trips with own fleet carriers even though payment records are not required.

Once the parameter has been set to Yes, for any new contracts required the local and counter parties must have a record on the Currency Usage table which indicates which currencies can be assigned. The Currency Usage table allows users to add Cost Centre, Carrier and Customer records; this will be amended to allow users to add Group Names for Internal Charging purposes.

The solution will be based on the Currency Usage table, all carriers (including own fleet) , customers, cost centres and group names will require a record in this table. When the system checks if a contract exists to find the currency, and returns null, a further check will be carried out of the Currency Usage table,

If no record is found in this table, an error will be returned informing the user they must add the cost centre/ carrier or customer to the table. Each Customer / Carrier should only have one entry in this table. If a customer / carrier is required to work in multiple currencies, a separate carrier or customer should be created eg

WDK_Transport_GBP

WDK_Transport_EUR

Each will have a record created in the Currency Usage table – WDK_Transport_GBP to use GBP and WDK_Transport_EUR to use EUR, rather than the carrier WDK_Transport having two currency_usage records.

The Invoice, Order and Trip Manipulation packages will require amendments to accommodate this change.

Scope

This change will be applied to system version 10.5

Set-up

Pre-requisites

Menu Structure

Standard reports menu

Data

None


Functional Description

Changes to Account Maintenance screen

The use of multiple currencies is controlled by a system parameter called ACC_ALLOW_MULTIPLE_CURRENCY. If this is set to Y, when creating an invoice, order revenue or trip cost, the system will look for a contract to determine what the currency is.

The system will check for the currency value before determining whether a payment record is actually required. Currently if the currency cannot be determined any action being undertaken is cancelled with an error regarding currency. In certain cases (own fleet carriers), contracts are not created, so users will not be able to change the status on any trips with own fleet carriers even though payment records are not required.

Once the parameter has been set to Yes, for any new contracts required the local and counter parties must have a record on the Currency Usage table which indicates which currencies can be assigned. The Currency Usage table allows users to add Cost Centre, Carrier and Customer records at moment; this will be amended to allow users to add Group Names for Internal Charging purposes i.e. change usage entry screen, add group name to the usage Type drop down list.

277083 1.png

Changes to the Packages

All carriers (including own fleet), customers, cost centres and group names will require a record in the currency usage table. When creating the payment, the system checks if a contract exists. If the contract doesn’t exist a further check will be carried out to see if a record exists in the acc_currency_usage table. If no record is found in this table, an error will be returned informing the user that they must add the cost centre/ carrier or customer to the acc_currency_usage table.

Each Customer / Carrier should only have one entry in this table. If a customer/carrier is required to work in multiple currencies, a separate carrier or customer should be created e.g.

WDK_Transport_GBP

WDK_Transport_EUR

Each will have a record created in the acc_currency_usage table which WDK_Transport_GBP will use GBP and WDK_Transport_EUR will use EUR.

The Invoice (INT.sql), Order (OMS.sql) and Trip Manipulation(TRM.sql) packages will be changed to accommodate this change.

For example, code below from INT.sql:

277083 2.png

IF ADM.Get_Param_vchar( 'ACC_ALLOW_MULTIPLE_CCY' ) = 'Y' THEN IF v_acc_type = 'CARRIER' THEN v_ccy := CNT.get_contract_currency(i_invoice.account_id, i_invoice.credit_acc, i_invoice.invoice_date, v_errmsg); ELSE v_ccy := CNT.get_contract_currency(i_invoice.credit_acc, i_invoice.account_id, i_invoice.invoice_date, v_errmsg); END IF; ELSE OPEN get_currency; FETCH get_currency into v_ccy; CLOSE get_currency; END IF; IF v_ccy IS NULL THEN o_errmsg := 'No currency has been configured for ' || i_invoice.account_id || ' and ' || i_invoice.credit_acc || ', invoice not created.'; RETURN 0; END IF;

Code above will be changed to get the currency from acc_currency_usage when v_ccy is null. If a record does not exists in acc_currency_usage, then an error message will be produced to inform user to create an entry to the currency usage table.

Similar changes will be also made to OMS.sql and TRM.sql.


Table Updates Required

None


References

Ref No
Document Title & ID
Version
Date
1
EST-277083 PA-85DBGC Amend System to allow Currency.doc
1.0
07/06/10


Document History

Version
Date
Status
Reason
Initials
0.1
16/06/10
Draft
Initial version
SLX
1.0
12/07/10
Issued
Reviewed for posting
SW
2.0
20/07/10
Issued
Revised costs
MJC

AUTHORISED BY

Matt Crisford Development Manager
Peter Greer TMSCC MTS Product Manager