Calculate numbers which are in textbox1,textbox2,etc

You seem to be having trouble with percentages.

In Excel, you can format a column or cell as a percentage.
This has the effect of showing 100 times the fractional value and JOINing a '%' after it to show it is a percentage.

AI2 does not have a native percentage data type or any such formatting capability.
It only stores percentages as the fractions that they really are, like 0.18

Does this explanation help?

1 Like

I already showed one way of handling numbers as percentage here (above):

2 Likes

I am going to assume your app is working in rupees (text)
since you use 18% and 'GST' and are exceptionally polite to us.

From looking at your Designer
Designer
your label text lacks sufficient detail to express the units (rupee vs pure number vs percentage of WHAT(PP?)) of the associated text input.

You have 3 text boxes that are in percentages (B3, B5, B10), but you fail to do the required divide by 100 in the value procedures for those numbers.
Designer

Here is my take on a fix, with some non-numeric cleanup added as a separate pass over the inputs ...



B3
B5
B10
taxcalculator (1).aia (166.7 KB)

4 Likes

hello again,
yes sir i am working on rupee (INR)
I have given link below for excel file so you can calculate result yourself also ive done one mistake in Total expenses formula at B18 it will be B12 INSTEAD OF B5+B6+B7+B8+B9+B13+B14+B15 THIS IS WRONG
B12+B6+B7+B8+B9+B13+B14+B15 THIS IS RIGHT

https://docs.google.com/spreadsheets/d/1vBLi_wHvuNfLrJZjG2nXU5p0QA2JdQ1U/edit?usp=sharing&ouid=102092703762048461106&rtpof=true&sd=true

hi,
i did it but result is correct in B12 AND B14 only rest are different answers
taxcalculatorrevised.aia (167.3 KB)
see results yourself in excel sheet link is
TAX CALCULATOR EXCELOK.xlsx - Google Sheets

Check your formulas carefully. These are not correct.

yes you were right i mistaken in formula thank you mam

OMG! It is working as I wanted and calculations are correct thank you all admins
would ask one last favour I need three solutions
1, when we enter value in textbox and on keyboard when click enter it would go to next box.
2, is there any way that all calculations after putting values updates realtime without clicking calculate button.
3. How to round off result,and I can't align all my textbox and labels straight I used label as space in editor it shows straight but in mobile it crumbles

Not sure about keyboard enter key - you can have a 'submit' button.
Make a Block List of all those Text Boxes, in the same order as they are displayed. When the submit button is tapped, it can set the focus to the next TextBox in the List.

Not a good idea - if you want to do it, the code will have to check which values are already entered and calculate only a semi-result, due to the dependency of the calculations. There is no real advantage in doing that.

You can round (nearest) or ceiling or floor

ROUND

Put them in Arrangements and ensure all the text boxes are sized the same in % and all the labels are sized the same in %

Some GUI tips:
https://www.professorcad.co.uk/appinventortips#TipsGui

Set the Labels to right align:
LABEL SETTINGS

... and ensure you specify the Font Typeface and size

Same goes for the text boxes but you probably want to left align them.

Without wishing to spoil, where money is concerned programs do not usually calculate float values - for precision it's normally all done with integers. Much depends on how the currency works. The UK currency is measured in pounds and pence for example. There are 100 pence in a pound. The user might enter a value of 2 pounds and 55 pence. The money program would process that as 255 pence. Sounds simple but in fact it can be a bit of a headache, which is why the UK Taxman asks us to enter whole values only - so if it was an income value, 2 pounds would be entered and if it was an expense value, 3 pounds would be entered.

Where did you get the formula Slao, from the Tax Office? In most countries GST is applied to only the Sale Price of the item and/or Service. What does ADS mean? Advertisments?

I notice in your example that net profit > gross profit, which shouldn't be possible?

Is this APP just for your own use or will it be distributed to others?

Hi,
thank you for responding,
ive done the designing part whole night and figured it

and as you said about auto updating of values im dropping off the idea and leave it on button click

also i need user to accept user agreement for using the app after installing as my app is a calculator for sellers who need to know their cost and selling price (any example how to do it)

im creating this app to publish on google play
ads means advertisement = yes
what did you mean by netprofit>gross profit why is not possible?
GST is a tax in India (goods and service tax)

Net = (Gross - eligible expenses).

I think it is down to terminology, you can't have values for 'net profit' and 'gross profit' if the calculation only considers sales tax (GST) as there could be Corporation tax (Business Tax) Business Rates, Dividend tax, Income tax, National Insurance, Capital Gains Tax, Employee Remuneration, Premises Insurance, 3rd Party Services etc in the mix too.

Snap1

I see you can use a digital representation of the values where 25.20 is
25 rupees and .20 paise. So if you use the Hundreds method, this will be accurate without requiring rounding.

Either a Notifier, or a Virtual Screen.

Hello again,
Actually I was quite weak in mathematics since childhood and got punished a lot for it
I am having 2 issues for my app to get it on Google Play actually I'm just 2 months old in app development and had to learn a lot and also need money for living that' why is get in to app development
1, you mentioned about notifier for user agreement so it should ask once to accept when user install app
2. This is not a problem just ui improvement.. when in B20 amount is positive number it's text background should turn green else if negative /in minus amount should turn red
Sorry for asking lots of questions.