How can i get FCY2FCY Currency Factor
yukon
Member Posts: 361
Hi Expert,
Our navision has build in function FCY2LCY,LCY2FCY and FCY2FCY. But that all are amount convert. i can not find FCY2FCY currency factor. It is has in our system. If don't has it, please give me a guide line.
Best Regards,
Yukon
Our navision has build in function FCY2LCY,LCY2FCY and FCY2FCY. But that all are amount convert. i can not find FCY2FCY currency factor. It is has in our system. If don't has it, please give me a guide line.
Best Regards,
Yukon
Make Simple & Easy
0
Comments
-
There are functions in Table 330. E.g. ExchangeAmtFCYToFCY(). Parameters are two currencies, amount and date. This function convert amount from one foreign currency to another for specific date. Basicaly You are interested of currency factor related between LCY and FCY and this is included in this table too for each record. If You need currency factor for two FCYs You need calculate it. I don`t know any standard function doing it, but maybe there is someone...0
-
The ExchangeAmtFCYToFCY function doesn't round it's return value, so just give it a '1' in the amount and it'll return the factor.Robert de Bath
TVision Technology Ltd0 -
Hi rdebath and koubek,
Thx 4 your reply.
If i give 1 in amount, it will be return some value, it is LCY2FCY factory. I wann FCY2FCY factory. Any idea ???? :shock:
Best Regards,
YukonMake Simple & Easy0 -
Use rdebath`s method, it is the simplest and correct way. This is simple calculator:
OBJECT Form 61240 FCY2FCY Convertor { OBJECT-PROPERTIES { Date=21.12.09; Time=[ 8:16:01]; Modified=Yes; Version List=; } PROPERTIES { Width=6930; Height=4290; CaptionML=[CSY=FCY2FCY konvertor; ENU=FCY2FCY Convertor]; SaveValues=Yes; } CONTROLS { { 1000000000;TextBox;3630 ;220 ;3080 ;440 ;SourceExpr=gdeAmount } { 1000000001;TextBox;3630 ;770 ;3080 ;440 ;SourceExpr=gcoCF1; TableRelation=Currency } { 1000000002;TextBox;3630 ;1320 ;3080 ;440 ;SourceExpr=gcoCF2; TableRelation=Currency } { 1000000003;TextBox;3630 ;2750 ;3080 ;440 ;Editable=No; SourceExpr=gdeResult } { 1000000004;CommandButton;3630;3520;3080;550; HorzGlue=Right; VertGlue=Bottom; CaptionML=[CSY=Spoźˇtej; ENU=Calculate]; OnPush=BEGIN gdeResult := Calculate(gdeAmount,gcoCF1,gcoCF2,gdaDate); CurrForm.UPDATE(FALSE); END; } { 1000000005;TextBox;3630 ;1870 ;3080 ;440 ;SourceExpr=gdaDate } { 1000000006;Label ;220 ;220 ;3300 ;440 ;CaptionML=[CSY=¬ stka; ENU=Amount] } { 1000000007;Label ;220 ;770 ;3300 ;440 ;CaptionML=[CSY=Z mŘny; ENU=From Currency] } { 1000000008;Label ;220 ;1320 ;3300 ;440 ;CaptionML=[CSY=Na mŘnu; ENU=To Currency] } { 1000000009;Label ;220 ;1870 ;3300 ;440 ;CaptionML=[CSY=Datum; ENU=Date] } { 1000000010;Label ;220 ;2750 ;3300 ;440 ;CaptionML=[CSY=Věsledek; ENU=Result] } } CODE { VAR gdeAmount@1000000000 : Decimal; gcoCF1@1000000001 : Code[10]; gcoCF2@1000000002 : Code[10]; gdeResult@1000000003 : Decimal; gdaDate@1000000004 : Date; PROCEDURE Calculate@1000000001(ideAmount@1000000003 : Decimal;icoCF1@1000000002 : Code[10];icoCF2@1000000001 : Code[10];idaDate@1000000004 : Date) Result : Decimal; VAR lreCurrExRate@1000000000 : Record 330; BEGIN EXIT(lreCurrExRate.ExchangeAmtFCYToFCY(idaDate,icoCF1,icoCF2,ideAmount)); END; BEGIN END. } }If Amount is equal to zero, the currency factorwill be calculated for selected currencies... You need to insert rates for specific date into Table 330.0 -
Hi koubek,
Thk 4 your help. Now, I got it. Your code help 2 me.Your one
EXIT(lreCurrExRate.ExchangeAmtFCYToFCY(idaDate,icoCF1,icoCF2,ideAmount));
My One
From := lreCurrExRate.ExchangeRate(FromDate,FromCurrency);
To := lreCurrExRate.ExchangeRate(FromDate,ToCurrency);
Exit(To/From);
Your code is so pretty.
Thanks and Regards,
YukonMake Simple & Easy0
Categories
- All Categories
- 73 General
- 73 Announcements
- 66.7K Microsoft Dynamics NAV
- 18.8K NAV Three Tier
- 38.4K NAV/Navision Classic Client
- 3.6K Navision Attain
- 2.4K Navision Financials
- 116 Navision DOS
- 851 Navision e-Commerce
- 1K NAV Tips & Tricks
- 772 NAV Dutch speaking only
- 617 NAV Courses, Exams & Certification
- 2K Microsoft Dynamics-Other
- 1.5K Dynamics AX
- 328 Dynamics CRM
- 111 Dynamics GP
- 10 Dynamics SL
- 1.5K Other
- 990 SQL General
- 383 SQL Performance
- 34 SQL Tips & Tricks
- 35 Design Patterns (General & Best Practices)
- 1 Architectural Patterns
- 10 Design Patterns
- 5 Implementation Patterns
- 53 3rd Party Products, Services & Events
- 1.6K General
- 1.1K General Chat
- 1.6K Website
- 83 Testing
- 1.2K Download section
- 23 How Tos section
- 252 Feedback
- 12 NAV TechDays 2013 Sessions
- 13 NAV TechDays 2012 Sessions