56:
57: get_info( x_to_currency, to_mau);
58:
59: if ( x_conversion_type is null ) then
60: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, default_conversion_type ))/to_mau ) * to_mau ;
61: else
62: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, x_conversion_type ))/to_mau ) * to_mau ;
63: end if;
64:
58:
59: if ( x_conversion_type is null ) then
60: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, default_conversion_type ))/to_mau ) * to_mau ;
61: else
62: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, x_conversion_type ))/to_mau ) * to_mau ;
63: end if;
64:
65: return( converted_amount );
66:
64:
65: return( converted_amount );
66:
67: EXCEPTION
68: WHEN gl_currency_api.NO_RATE THEN
69: --bmunagal, 11/05/02, for FPI, return null if there is no rate
70: --converted_amount := -1;
71: converted_amount := null;
72: return( converted_amount );
130: SELECT default_rate_type into default_conversion_type FROM po_system_parameters;
131: exception
132: WHEN OTHERS THEN default_conversion_type := null;
133: end;
134: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, default_conversion_type ))/to_mau ) * to_mau ;
135: else
136: -- Get the rate depending on rate type
137: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, x_conversion_type ))/to_mau ) * to_mau ;
138: end if;
133: end;
134: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, default_conversion_type ))/to_mau ) * to_mau ;
135: else
136: -- Get the rate depending on rate type
137: converted_amount := round ( ( x_amount * gl_currency_api.get_rate(x_from_currency,x_to_currency, x_conversion_date, x_conversion_type ))/to_mau ) * to_mau ;
138: end if;
139:
140: return( converted_amount );
141:
139:
140: return( converted_amount );
141:
142: EXCEPTION
143: WHEN gl_currency_api.NO_RATE THEN
144: --bmunagal, 11/05/02, for FPI, return null if there is no rate
145: --converted_amount := -1;
146: converted_amount := null;
147: return( converted_amount );