Baanboard.com

Go Back   Baanboard.com > Forum > Baan SIGs > Code & Utilities

User login

Frontpage Sponsor

Main

Poll
For ERP LN feature pack upgrade, what method of install are you using?
Installation Wizard into existing VRC
37%
Installation Wizard into new VRC
39%
Manual into existing VRC
3%
Manual into new VRC
21%
Total votes: 38

Baanboard at LinkedIn


Reference Content

Reply
 
Thread Tools Display Modes
  #1  
Old 17th August 2005, 15:46
baanfans's Avatar
baanfans baanfans is offline
Member
 
Join Date: Oct 2003
Location: Maracay, Venezuela
Posts: 49
baanfans is on a distinguished road
Baan: BaanERP5.0c - DB: ORACLE 10g - OS: HP-UX
Red face Home currencies converter

I have written a program using native baan tools. In this program you can converter one amount in the three company currencies, for a rate date and exchange type, (simulated normal Baan process, using standards dll's)

Enclosed source code...

It works good on UNIX, BaanERP5.0c.

Code:
|******************************************************************************
|* tccoro203  0  VRC B50P c  prod
|* Conversor de importes en divisas propias
|* ID979130, Arístides José Romero Rivas.            
|* 2005-08-16
|******************************************************************************
|* All Rights Reserved
|*
|* Permission to use, copy, modify, and distribute this software and its
|* documentation for any purpose and without fee is hereby granted,
|* provided that the above copyright notice appear in all copies and that
|* both that copyright notice and this permission notice appear in
|* supporting documentation.
|*
|* Josef N. and Baanboard.com DISCLAIM ALL WARRANTIES WITH REGARD TO THIS
|* SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
|* AND FITNESS, IN NO EVENT SHALL Norbert Wimmer nor Baanboard.com BE LIABLE FOR ANY
|* SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
|* WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|* WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
|* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE
|* OR PERFORMANCE OF THIS SOFTWARE.
|******************************************************************************
                                                                                
|****************************** declaration section ***************************
declaration:

|************************************ tables **********************************

	table 	ttcmcs040	|* Tipos de cambio

|********************************** variables *********************************

		long	i

		domain tcmcs.long	no.hcur
		domain tcemm.depe 	curr.sys
		domain tcccur		ref.curr
		domain	tcyesno		dummy.excb(3)

	extern	domain 	tcccur		fico.hcur(3)
	extern	domain	tcdate		ratd.disp
	extern	domain	tcrtyp		rtyp.disp
	extern	domain	tfgld.amnt	amnt.disp
	extern	domain	tfgld.amnt	amnt.dp.disp(3)
	extern	domain	tcratc		rate.dp.disp(3)
	extern	domain	tcratf		ratf.dp.disp(3)
	extern	domain	tccrnd		crnd.f(3)
	extern	domain	tcncmp		b.cono

|**************************** program section *********************************

before.program:
	b.cono = get.compnr()
	if not tcemm.dll5000.get.home.currency.system(b.cono, fico.hcur,
						      no.hcur, curr.sys, ref.curr) then
		mess("tfglds1100", 1,b.cono)
		|* No se han definido divisas propias para la compañía %s
		stop()
	endif

|****************************** form section **********************************

form.1:
init.form:
	get.screen.defaults()
	
|****************************** field section *********************************

field.rtyp.disp:
check.input:
	select 	tcmcs040.*
	from	tcmcs040
	where	tcmcs040._index1 = {:rtyp.disp}
	selectdo
		|* No actions here
	selectempty
		set.input.error("ttstps0108", "Tipo de cambio")
		|* No se permite Tipo de cambio
	endselect
	
|***************************** choice section *********************************

choice.cont.process:
before.choice:
	checK.all.input()

on.choice:
	if not tcemm.dll5010.put.rates.in.an.array.utc(b.cono,
						fico.hcur(1,1),
						ratd.disp,
						rtyp.disp,
						rate.dp.disp,
						ratf.dp.disp,
						crnd.f,
						dummy.excb) then
		for i = 1 to no.hcur
			rate.dp.disp(i) = 1
			ratf.dp.disp(i) = 1
		endfor
	endif
	tcemm.dll5010.calculate.amounts.in.hc.utc(fico.hcur(1,1),
						  amnt.disp,
						  b.cono,
						  rate.dp.disp,
						  ratf.dp.disp,
						  ratd.disp,
						  rtyp.disp,
						  amnt.dp.disp)
	tccom.dll0001.round.amount(amnt.dp.disp, no.hcur, "tfgld.amnt", fico.hcur, crnd.f)
	for i = 1 to no.hcur
		attr.element = i
		display.all()
	endfor

|****************************** end of source *********************************
Attached Images
File Type: jpg tccoro203m000.JPG (28.1 KB, 77 views)
__________________
Arístides José Romero Rivas

Last edited by ~Vamsi : 17th August 2005 at 17:43.
Reply With Quote
Sponsored Links
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 Off
[IMG] code is Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How to get User's Home Directory Arnold Magno Tools Development 2 1st June 2005 04:19
utc date/time converter en@frrom Tools Development 4 9th September 2003 19:36
Its coming home, EURO's coming home Ravenscross Baan & the EURO 8 21st August 2001 17:30


All times are GMT +2. The time now is 00:11.


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