- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-13-2019 04:59 AM
Hi All,
1. Rent with VAT = Rent w/o VAT * with Tax VAT
2. Rent with VAT = 550 * 7.7% = 592.00
3. Rent with VAT = 550
Anyone having knowledge on this please help me.
Thanks
Raj
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 10:52 PM
H again,
The decimal separator i cannot manipulate. Thats the browser that determines that.
In Google Chrome i get:
And in Firefox i get:
Opposite group separators and decimal deparators
I have edited the script to take care of this but i cannot change the way its displayed
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue == 'no'){ //Check the value of the "No" choice and adjust this if its not correct (maybe it "No" or something like that)
g_form.setValue('u_rent_with_vat', g_form.getValue('u_rent'));
}else{
var decimal_separator = g_user_decimal_separator; //We get decimal separator
var group_separator = g_user_grouping_separator; //Group separator - can be 1.000,50 as an example then the group separator is .
var re = new RegExp(RegExp.quote(group_separator),"g"); //Because we cannot just replace . through regex then we need to add \ before the . char
var rent = g_form.getValue('u_rent');
//rent is a currency field so format is currency;amount : USD;50.50
var currency = rent.split(';')[0]; //to get current currency
rent = parseFloat(rent.split(';')[1].replace(re, '').replace(decimal_separator, '.'));
var calculatedValue = ((rent / 100) * parseFloat(newValue)) + rent;
g_form.setValue('u_rent_with_vat', currency + ';' + calculatedValue);
}
}
RegExp.quote = function(str) {
return str.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-14-2019 10:52 PM
H again,
The decimal separator i cannot manipulate. Thats the browser that determines that.
In Google Chrome i get:
And in Firefox i get:
Opposite group separators and decimal deparators
I have edited the script to take care of this but i cannot change the way its displayed
function onChange(control, oldValue, newValue, isLoading, isTemplate) {
if (isLoading || newValue === '') {
return;
}
if(newValue == 'no'){ //Check the value of the "No" choice and adjust this if its not correct (maybe it "No" or something like that)
g_form.setValue('u_rent_with_vat', g_form.getValue('u_rent'));
}else{
var decimal_separator = g_user_decimal_separator; //We get decimal separator
var group_separator = g_user_grouping_separator; //Group separator - can be 1.000,50 as an example then the group separator is .
var re = new RegExp(RegExp.quote(group_separator),"g"); //Because we cannot just replace . through regex then we need to add \ before the . char
var rent = g_form.getValue('u_rent');
//rent is a currency field so format is currency;amount : USD;50.50
var currency = rent.split(';')[0]; //to get current currency
rent = parseFloat(rent.split(';')[1].replace(re, '').replace(decimal_separator, '.'));
var calculatedValue = ((rent / 100) * parseFloat(newValue)) + rent;
g_form.setValue('u_rent_with_vat', currency + ';' + calculatedValue);
}
}
RegExp.quote = function(str) {
return str.replace(/([.?*+^$[\]\\(){}|-])/g, "\\$1");
};
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-20-2022 01:13 PM
In fact, it is very simple to calculate rent with VAT. You just need to look at the detailed instructions on the Internet or use the help of Youtube and just enter the data, for example, so you can already know the exact numbers. By the way, I use a similar service only for estimating construction costs because I am engaged in real estate and apartment repairs, and I always need accurate calculations, so I trust only calculators and computers for this. I hope I have helped you somehow. Good luck to you, my man.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
03-15-2023 10:37 AM - edited 03-16-2023 06:43 PM
Hey there! Calculating rent with VAT can be a bit tricky, but fortunately, there are tools out there to make it easier. Personally, I've used the-vat-calculator.com for all of my VAT calculations and it has been a lifesaver. All you need to do is enter the rental amount and select the appropriate VAT rate, and the calculator does the rest. It's quick, easy, and reliable. I hope this helps with your rent calculations!
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
09-23-2023 05:39 AM
Don't know the VAT rates in the UK? Want to find the exact VAT percentage in the UK? Don't worry; VAT rates are well explained. Visit now: vat rate in uk .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-02-2024 11:14 PM - edited 05-14-2025 10:02 PM
I hope this topic helps with your rent calculations