Baanboard.com

Go Back   Baanboard.com > Forum > Baan Quick Support: Functional & Technical > Tools Development

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
35%
Installation Wizard into new VRC
42%
Manual into existing VRC
3%
Manual into new VRC
19%
Total votes: 31

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 5th July 2017, 06:28
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
calculate forex PO
Baan: ERP LN 6.1 FP6
C/S: Both

Hi All,

I have this report when I compile my report script :

rtdsqldelpo92:
repgen '2tdB61Oa drb sqldelpo9 ' -c 'tdB61Oa drb ' -o "D:\infor\erpln\bse\tmp/tmp076989690" -T 0 -z -qe "D:\infor\erpln\bse\tmp/tmp076989691" -x "D:\infor\erpln\bse\tmp/tmp076989692" -L
bic "D:\infor\erpln\bse\tmp/tmp076989690" -z -u -o rtdsqldelpo90 -f "D:\infor\erpln\bse\tmp/tmp076989689" -qe "D:\infor\erpln\bse\tmp/tmp076989691"
rtdsqldelpo9 ( 46): Error: '}' not expected.
tmp076989690( 31): Fatal Error: FUNCTION within function 'calc.cur' not expected.

my report script :

declaration:
table ttdpur401
extern domain tcamnt amount
detail.1:
before.layout:

calc.cur()

functions:

function void calc.cur()

{

IF strip$(tdpur400.ccur)= "JPY" THEN

amount = tdpur401.oamt / 25.86198

IF ELSE strip$(tdpur400.ccur)= "EUR" THEN

amount = tdpur401.oamt / 0.207314

IF ELSE strip$(tdpur400.ccur)= "SGD" THEN

amount = tdpur401.oamt / 0.322758

IF ELSE strip$(tdpur400.ccur)= "USD" THEN

amount = tdpur401.oamt / 0.233155
ELSE
amount = tdpur401.oamt

ENDIF

}

currently only this 4 currency rate that we use.
I know that user will change the rate from time to time and I should create this script to able trace forex rate from PO as per forex activation date.
for beginning, If I could deliver the query with fix rate, its fine . improvement of this report will be next stage.

hope some one could share idea on this.

Thank you
Reply With Quote
Sponsored Links
  #2  
Old 5th July 2017, 10:06
bdittmar's Avatar
bdittmar bdittmar is offline
Guru
 
Join Date: Apr 2002
Location: Germany, 50.584097,8.544078
Posts: 1,639
bdittmar will become famous soon enough
Baan: 2.2/3.1/4c4/LN6.1 FP6/FP9/HiDox - DB: tbase, ms-sql7, oracle10gV1, 11g - OS: HP-UX, W2K3, SLES
if else ????

Hello,
try:
assign the amount value to variable on beginning
then check currancy
The ELSE Statements only are for secure calculation.

Code:
function void calc.cur()
{
	amount = tdpur401.oam

IF strip$(tdpur400.ccur)= "JPY" THEN
     	amount = tdpur401.oamt / 25.86198
ELSE
	amount = tdpur401.oam
ENDIF

IF strip$(tdpur400.ccur)= "EUR" THEN
	amount = tdpur401.oamt / 0.207314
ELSE
	amount = tdpur401.oam
ENDIF

IF strip$(tdpur400.ccur)= "SGD" THEN
     	amount = tdpur401.oamt / 0.322758
ELSE
	amount = tdpur401.oam
ENDIF 

IF strip$(tdpur400.ccur)= "USD" THEN
     	amount = tdpur401.oamt / 0.233155
ELSE
	amount = tdpur401.oam
ENDIF
}
But, why not currency and rates from tcmcs002 and tcmcs008 ?


Regards
__________________
//Bernd

Last edited by bdittmar : 5th July 2017 at 10:13. Reason: code tags
Reply With Quote
  #3  
Old 6th July 2017, 04:53
DatinN DatinN is offline
Member
 
Join Date: Aug 2014
Posts: 65
DatinN is on a distinguished road
Baan: FP7 - DB: SQL - OS: Windows
Hi Bdittmar,

thank you for your time and effort.
the if else resolve as per your suggestion.
Yes, I planned to have the infor tcmcs008 to link as per active date but I failed to do so.
at moment this could assist my user.
however, I plan to explore this opportunity to use tcmcs008 .

Thank you
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to calculate total line for array field tan.wang Tools Development 7 29th June 2015 04:27
Standard DLL to calculate Baan price vktonk Distribution, Transportation & Warehousing 0 15th June 2010 12:43
Calculate Due Date chub64 Blogs and Web links 0 4th March 2009 15:49
Calculate Currency Difference (GLD) in Ln mn3awmcmug Finance, Invoicing and Integration 0 26th April 2006 14:13
Calculate raw materials needed for Production rini pudjiastut Manufacturing & Supply Chain 6 2nd December 2003 10:50


All times are GMT +2. The time now is 04:28.


©2001-2017 - Baanboard.com - Baanforums.com