Contract Currency Issue
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎02-01-2024 03:29 AM
Hi Coding Experts,
Need a small help.
I have below fields on contract form
I have written a client script , where If I select a currency in contract currency field , same currency will appear in below fields
Payment amount
Yearly Cost
Tax Cost
Total Cost
Contract Sum
--------------------------------------
Code
-----------
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
//Type appropriate comment here, and begin script below
var currencyCode = newValue;
var currency_amount = 0.00;
g_form.setValue('payment_amount', currencyCode + ';' + currency_amount);
g_form.setValue('u_one_time_cost', currencyCode + ';' + currency_amount);
g_form.setValue('yearly_cost', currencyCode + ';' + currency_amount);
g_form.setValue('total_cost', currencyCode + ';' + currency_amount);
g_form.setValue('tax_cost', currencyCode + ';' + currency_amount);
g_form.setValue('u_contract_sum', currencyCode + ';' + currency_amount);
}
--------------------------------------------------
This code works fine for few of the currencies like USD, AUD, DKK, SEK, EUR, AUD and for some currencies it gives below error
Need Help Here
------------------------------------------------------------------------------------------
I tired 2nd option to mitigate this error - This fixes the issue mentioned above, but then it messes "
where If I select a currency in contract currency field , same currency will appear in below fields
Payment amount
Yearly Cost
Tax Cost
Total Cost
Contract Sum
"
Need Help Here
--------------------------------------------------