Total price in RITM level

deepika adimu
Tera Contributor

I want to change currency and change in country code script?

1 ACCEPTED SOLUTION

Mohan raj
Mega Sage

Hi @deepika adimu,

Try the below code which is one of the example for change currency and change in country code 

i.e., calculated the total price based on  quantity and price

 

Onload Client Script 

function onLoad() {
    var quantity = g_form.getValue('quantity');
	var price = g_form.getValue('price');
	var totalPrice = 0;
	var getPriceCode = price.split(';');
	var priceCode = getPriceCode[0]; 
	var actualPrice = getPriceCode[1];
	totalPrice = parseFloat(quantity) * parseFloat(actualPrice);
	g_form.setValue('u_total_price',priceCode+';'+totalPrice);
}

 

If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.

Regards,

T Mohan

View solution in original post

1 REPLY 1

Mohan raj
Mega Sage

Hi @deepika adimu,

Try the below code which is one of the example for change currency and change in country code 

i.e., calculated the total price based on  quantity and price

 

Onload Client Script 

function onLoad() {
    var quantity = g_form.getValue('quantity');
	var price = g_form.getValue('price');
	var totalPrice = 0;
	var getPriceCode = price.split(';');
	var priceCode = getPriceCode[0]; 
	var actualPrice = getPriceCode[1];
	totalPrice = parseFloat(quantity) * parseFloat(actualPrice);
	g_form.setValue('u_total_price',priceCode+';'+totalPrice);
}

 

If my response helps you to resolve the issue close the question by Accepting solution and hit thumb icon. From Correct answers others will get benefited in future.

Regards,

T Mohan