Could one of you wonderful people post a AppGini project that will do a calculation from fields:
ID
day1
day2
day3
total
I want to see how its done. and where to put the code.
A simple calculation Example
Re: A simple calculation Example
Hello mwilliam , will you put dates like 11/4/2018 or numbers like 5 days
Re: A simple calculation Example
Hi mwilliam,
where would you like to see the total calculated? You have an option in AppGini "Show column sum" in the field definition.
where would you like to see the total calculated? You have an option in AppGini "Show column sum" in the field definition.
Any help offered comes with the best of intentions. Use it at your own risk. In any case, please make a backup of your existing environment before applying any changes.
Re: A simple calculation Example
mwilliam , here's another idea , you can make the new project normally and just open the project folder
go to hooks file , then table name and put the following line in before inset and before update function , and it will sum them automatically
go to hooks file , then table name and put the following line in before inset and before update function , and it will sum them automatically
Code: Select all
$data['total'] = $data['day1'] + $data['day2'] + $data['day3'];
Re: A simple calculation Example
Hello guys, I have same question, please any one with help
I have 3 table
1 - clients
2 - credit (loan)
3- versement (payment)
it the table client, I want to display
- total of credit
- total of loan
- balance Please any solution.
Thank you
I have 3 table
1 - clients
2 - credit (loan)
3- versement (payment)
it the table client, I want to display
- total of credit
- total of loan
- balance Please any solution.
Thank you
Re: A simple calculation Example
Hello Moh Youba,
i will explain the idea for you,
you will need to use after insert function in hook
after inserting in credit table ot after inserting in vestments table
you should first select sum of credits where customerid = logged customer and then use this value to update the credits field in cousomter table
and so on you can go through this logic for tota versement and for balance
i will explain the idea for you,
you will need to use after insert function in hook
after inserting in credit table ot after inserting in vestments table
you should first select sum of credits where customerid = logged customer and then use this value to update the credits field in cousomter table
and so on you can go through this logic for tota versement and for balance
Re: A simple calculation Example
Hello R Tammam
Thank you for your reply. I will try to follow your suggestions.
Thank you for your reply. I will try to follow your suggestions.
Re: A simple calculation Example
Were you able to make it work?